@carbon/charts 1.22.3 → 1.22.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/{angle-utils-RQSA_x-9.mjs → angle-utils-Cxvps4Hd.mjs} +29 -29
- package/dist/{angle-utils-RQSA_x-9.mjs.map → angle-utils-Cxvps4Hd.mjs.map} +1 -1
- package/dist/{array-DUMAG1_w.mjs → array-DjPCniaL.mjs} +2 -2
- package/dist/{array-DUMAG1_w.mjs.map → array-DjPCniaL.mjs.map} +1 -1
- package/dist/{choropleth-C1BTZZfm.mjs → choropleth-CtLw9e8_.mjs} +42 -23
- package/dist/{choropleth-C1BTZZfm.mjs.map → choropleth-CtLw9e8_.mjs.map} +1 -1
- package/dist/{color-scale-utils-CKd_DujW.mjs → color-scale-utils-Bxw257YA.mjs} +12 -10
- package/dist/{color-scale-utils-CKd_DujW.mjs.map → color-scale-utils-Bxw257YA.mjs.map} +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/{index-CiAo-vQV.mjs → index-Kltqng9e.mjs} +10 -10
- package/dist/{index-CiAo-vQV.mjs.map → index-Kltqng9e.mjs.map} +1 -1
- package/dist/index.mjs +35 -35
- package/dist/model/index.mjs +4 -4
- package/dist/services/index.mjs +3 -3
- package/dist/umd/bundle.umd.cjs +9 -4
- package/dist/umd/bundle.umd.cjs.map +1 -1
- package/dist/umd/bundle.umd.js +9 -4
- package/package.json +7 -7
package/dist/umd/bundle.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(W,Pe){typeof exports=="object"&&typeof module<"u"?Pe(exports):typeof define=="function"&&define.amd?define(["exports"],Pe):(W=typeof globalThis<"u"?globalThis:W||self,Pe(W.Charts={}))})(this,function(W){"use strict";function Pe(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function S0(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Do(e){let t,n,r;e.length!==2?(t=Pe,n=(o,l)=>Pe(e(o),l),r=(o,l)=>e(o)-l):(t=e===Pe||e===S0?e:T0,n=e,r=e);function i(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<0?c=d+1:u=d}while(c<u)}return c}function s(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(o,l,c=0,u=o.length){const d=i(o,l,c,u-1);return d>c&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:i,center:a,right:s}}function T0(){return 0}function O0(e){return e===null?NaN:+e}function*w0(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Lo=Do(Pe).right;Do(O0).center;function M0(e,t){let n=0;for(let r of e)r!=null&&(r=+r)>=r&&++n;return n}function Ne(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 Gn{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 sh extends Map{constructor(t,n=D0){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(ah(this,t))}has(t){return super.has(ah(this,t))}set(t,n){return super.set(A0(this,t),n)}delete(t){return super.delete(C0(this,t))}}function ah({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function A0({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function C0({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function D0(e){return e!==null&&typeof e=="object"?e.valueOf():e}function L0(e){return e}function R0(e=Pe){if(e===Pe)return oh;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 oh(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var I0=Array.prototype,k0=I0.slice;function Ro(e){return()=>e}const P0=Math.sqrt(50),N0=Math.sqrt(10),$0=Math.sqrt(2);function Ms(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>=P0?10:s>=N0?5:s>=$0?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?Ms(e,t,n*2):[o,l,c]}function As(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?Ms(t,e,n):Ms(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 mr(e,t,n){return t=+t,e=+e,n=+n,Ms(e,t,n)[2]}function Io(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?mr(t,e,n):mr(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function F0(e,t,n){let r;for(;;){const i=mr(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 U0(e){return Math.max(1,Math.ceil(Math.log(M0(e))/Math.LN2)+1)}function B0(){var e=L0,t=Ne,n=U0;function r(i){Array.isArray(i)||(i=Array.from(i));var s,a=i.length,o,l,c=new Array(a);for(s=0;s<a;++s)c[s]=e(i[s],s,i);var u=t(c),d=u[0],h=u[1],f=n(c,d,h);if(!Array.isArray(f)){const y=h,x=+f;if(t===Ne&&([d,h]=F0(d,h,x)),f=As(d,h,x),f[0]<=d&&(l=mr(d,h,x)),f[f.length-1]>=h)if(y>=h&&t===Ne){const S=mr(d,h,x);isFinite(S)&&(S>0?h=(Math.floor(h/S)+1)*S:S<0&&(h=(Math.ceil(h*-S)+1)/-S))}else f.pop()}for(var p=f.length,g=0,m=p;f[g]<=d;)++g;for(;f[m-1]>h;)--m;(g||m<p)&&(f=f.slice(g,m),p=m-g);var v=new Array(p+1),E;for(s=0;s<=p;++s)E=v[s]=[],E.x0=s>0?f[s-1]:d,E.x1=s<p?f[s]:h;if(isFinite(l)){if(l>0)for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&v[Math.min(p,Math.floor((o-d)/l))].push(i[s]);else if(l<0){for(s=0;s<a;++s)if((o=c[s])!=null&&d<=o&&o<=h){const y=Math.floor((d-o)*l);v[Math.min(p,y+(f[y]<=o))].push(i[s])}}}else for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&v[Lo(f,o,0,p)].push(i[s]);return v}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:Ro(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:Ro([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Ro(Array.isArray(i)?k0.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 In(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function lh(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?oh:R0(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),f=Math.max(n,Math.floor(t-c*d/l+h)),p=Math.min(r,Math.floor(t+(l-c)*d/l+h));lh(e,t,f,p,i)}const s=e[t];let a=n,o=r;for(ci(e,n,t),i(e[r],s)>0&&ci(e,n,r);a<o;){for(ci(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}i(e[n],s)===0?ci(e,n,o):(++o,ci(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function ci(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ko(e,t,n){if(e=Float64Array.from(w0(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return In(e);if(t>=1)return Vn(e);var r,i=(r-1)*t,s=Math.floor(i),a=Vn(lh(e,s).subarray(0,s+1)),o=In(e.subarray(s+1));return a+(o-a)*(i-s)}}function*H0(e){for(const t of e)yield*t}function ch(e){return Array.from(H0(e))}function G0(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 V0(e){return e}var Cs=1,Ds=2,Po=3,ui=4,uh=1e-6;function z0(e){return"translate("+e+",0)"}function W0(e){return"translate(0,"+e+")"}function Y0(e){return t=>+e(t)}function q0(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function X0(){return!this.__axis}function Ls(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===ui?-1:1,u=e===ui||e===Ds?"x":"y",d=e===Cs||e===Po?z0:W0;function h(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),g=i??(t.tickFormat?t.tickFormat.apply(t,n):V0),m=Math.max(s,0)+o,v=t.range(),E=+v[0]+l,y=+v[v.length-1]+l,x=(t.bandwidth?q0:Y0)(t.copy(),l),S=f.selection?f.selection():f,_=S.selectAll(".domain").data([null]),A=S.selectAll(".tick").data(p,t).order(),L=A.exit(),B=A.enter().append("g").attr("class","tick"),k=A.select("line"),O=A.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(B),k=k.merge(B.append("line").attr("stroke","currentColor").attr(u+"2",c*s)),O=O.merge(B.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===Cs?"0em":e===Po?"0.71em":"0.32em")),f!==S&&(_=_.transition(f),A=A.transition(f),k=k.transition(f),O=O.transition(f),L=L.transition(f).attr("opacity",uh).attr("transform",function(H){return isFinite(H=x(H))?d(H+l):this.getAttribute("transform")}),B.attr("opacity",uh).attr("transform",function(H){var P=this.parentNode.__axis;return d((P&&isFinite(P=P(H))?P:x(H))+l)})),L.remove(),_.attr("d",e===ui||e===Ds?a?"M"+c*a+","+E+"H"+l+"V"+y+"H"+c*a:"M"+l+","+E+"V"+y:a?"M"+E+","+c*a+"V"+l+"H"+y+"V"+c*a:"M"+E+","+l+"H"+y),A.attr("opacity",1).attr("transform",function(H){return d(x(H)+l)}),k.attr(u+"2",c*s),O.attr(u,c*m).text(g),S.filter(X0).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Ds?"start":e===ui?"end":"middle"),S.each(function(){this.__axis=x})}return h.scale=function(f){return arguments.length?(t=f,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(f){return arguments.length?(n=f==null?[]:Array.from(f),h):n.slice()},h.tickValues=function(f){return arguments.length?(r=f==null?null:Array.from(f),h):r&&r.slice()},h.tickFormat=function(f){return arguments.length?(i=f,h):i},h.tickSize=function(f){return arguments.length?(s=a=+f,h):s},h.tickSizeInner=function(f){return arguments.length?(s=+f,h):s},h.tickSizeOuter=function(f){return arguments.length?(a=+f,h):a},h.tickPadding=function(f){return arguments.length?(o=+f,h):o},h.offset=function(f){return arguments.length?(l=+f,h):l},h}function j0(e){return Ls(Cs,e)}function Z0(e){return Ls(Ds,e)}function No(e){return Ls(Po,e)}function hh(e){return Ls(ui,e)}var K0={value:()=>{}};function $o(){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 Rs(n)}function Rs(e){this._=e}function Q0(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}})}Rs.prototype=$o.prototype={constructor:Rs,on:function(e,t){var n=this._,r=Q0(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=J0(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=dh(n[i],e.name,t);else if(t==null)for(i in n)n[i]=dh(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 Rs(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function J0(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function dh(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=K0,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Fo="http://www.w3.org/1999/xhtml";const fh={svg:"http://www.w3.org/2000/svg",xhtml:Fo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Is(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),fh.hasOwnProperty(t)?{space:fh[t],local:e}:e}function ty(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Fo&&t.documentElement.namespaceURI===Fo?t.createElement(e):t.createElementNS(n,e)}}function ey(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ph(e){var t=Is(e);return(t.local?ey:ty)(t)}function ny(){}function Uo(e){return e==null?ny:function(){return this.querySelector(e)}}function ry(e){typeof e!="function"&&(e=Uo(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 ve(r,this._parents)}function iy(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function sy(){return[]}function gh(e){return e==null?sy:function(){return this.querySelectorAll(e)}}function ay(e){return function(){return iy(e.apply(this,arguments))}}function oy(e){typeof e=="function"?e=ay(e):e=gh(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 ve(r,i)}function mh(e){return function(){return this.matches(e)}}function vh(e){return function(t){return t.matches(e)}}var ly=Array.prototype.find;function cy(e){return function(){return ly.call(this.children,e)}}function uy(){return this.firstElementChild}function hy(e){return this.select(e==null?uy:cy(typeof e=="function"?e:vh(e)))}var dy=Array.prototype.filter;function fy(){return Array.from(this.children)}function py(e){return function(){return dy.call(this.children,e)}}function gy(e){return this.selectAll(e==null?fy:py(typeof e=="function"?e:vh(e)))}function my(e){typeof e!="function"&&(e=mh(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 ve(r,this._parents)}function yh(e){return new Array(e.length)}function vy(){return new ve(this._enter||this._groups.map(yh),this._parents)}function ks(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ks.prototype={constructor:ks,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 yy(e){return function(){return e}}function Ey(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 ks(e,s[a]);for(;a<l;++a)(o=t[a])&&(i[a]=o)}function by(e,t,n,r,i,s,a){var o,l,c=new Map,u=t.length,d=s.length,h=new Array(u),f;for(o=0;o<u;++o)(l=t[o])&&(h[o]=f=a.call(l,l.__data__,o,t)+"",c.has(f)?i[o]=l:c.set(f,l));for(o=0;o<d;++o)f=a.call(e,s[o],o,s)+"",(l=c.get(f))?(r[o]=l,l.__data__=s[o],c.delete(f)):n[o]=new ks(e,s[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(h[o])===l&&(i[o]=l)}function xy(e){return e.__data__}function _y(e,t){if(!arguments.length)return Array.from(this,xy);var n=t?by:Ey,r=this._parents,i=this._groups;typeof e!="function"&&(e=yy(e));for(var s=i.length,a=new Array(s),o=new Array(s),l=new Array(s),c=0;c<s;++c){var u=r[c],d=i[c],h=d.length,f=Sy(e.call(u,u&&u.__data__,c,r)),p=f.length,g=o[c]=new Array(p),m=a[c]=new Array(p),v=l[c]=new Array(h);n(u,d,g,m,v,f,t);for(var E=0,y=0,x,S;E<p;++E)if(x=g[E]){for(E>=y&&(y=E+1);!(S=m[y])&&++y<p;);x._next=S||null}}return a=new ve(a,r),a._enter=o,a._exit=l,a}function Sy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ty(){return new ve(this._exit||this._groups.map(yh),this._parents)}function Oy(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 wy(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,a=Math.min(i,s),o=new Array(i),l=0;l<a;++l)for(var c=n[l],u=r[l],d=c.length,h=o[l]=new Array(d),f,p=0;p<d;++p)(f=c[p]||u[p])&&(h[p]=f);for(;l<i;++l)o[l]=n[l];return new ve(o,this._parents)}function My(){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 Ay(e){e||(e=Cy);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var a=n[s],o=a.length,l=i[s]=new Array(o),c,u=0;u<o;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new ve(i,this._parents).order()}function Cy(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Dy(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ly(){return Array.from(this)}function Ry(){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 Iy(){let e=0;for(const t of this)++e;return e}function ky(){return!this.node()}function Py(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 Ny(e){return function(){this.removeAttribute(e)}}function $y(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Fy(e,t){return function(){this.setAttribute(e,t)}}function Uy(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function By(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Hy(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 Gy(e,t){var n=Is(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?$y:Ny:typeof t=="function"?n.local?Hy:By:n.local?Uy:Fy)(n,t))}function Eh(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Vy(e){return function(){this.style.removeProperty(e)}}function zy(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Wy(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Yy(e,t,n){return arguments.length>1?this.each((t==null?Vy:typeof t=="function"?Wy:zy)(e,t,n??"")):vr(this.node(),e)}function vr(e,t){return e.style.getPropertyValue(t)||Eh(e).getComputedStyle(e,null).getPropertyValue(t)}function qy(e){return function(){delete this[e]}}function Xy(e,t){return function(){this[e]=t}}function jy(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Zy(e,t){return arguments.length>1?this.each((t==null?qy:typeof t=="function"?jy:Xy)(e,t)):this.node()[e]}function bh(e){return e.trim().split(/^|\s+/)}function Bo(e){return e.classList||new xh(e)}function xh(e){this._node=e,this._names=bh(e.getAttribute("class")||"")}xh.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 _h(e,t){for(var n=Bo(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Sh(e,t){for(var n=Bo(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ky(e){return function(){_h(this,e)}}function Qy(e){return function(){Sh(this,e)}}function Jy(e,t){return function(){(t.apply(this,arguments)?_h:Sh)(this,e)}}function t1(e,t){var n=bh(e+"");if(arguments.length<2){for(var r=Bo(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Jy:t?Ky:Qy)(n,t))}function e1(){this.textContent=""}function n1(e){return function(){this.textContent=e}}function r1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function i1(e){return arguments.length?this.each(e==null?e1:(typeof e=="function"?r1:n1)(e)):this.node().textContent}function s1(){this.innerHTML=""}function a1(e){return function(){this.innerHTML=e}}function o1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function l1(e){return arguments.length?this.each(e==null?s1:(typeof e=="function"?o1:a1)(e)):this.node().innerHTML}function c1(){this.nextSibling&&this.parentNode.appendChild(this)}function u1(){return this.each(c1)}function h1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function d1(){return this.each(h1)}function f1(e){var t=typeof e=="function"?e:ph(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function p1(){return null}function g1(e,t){var n=typeof e=="function"?e:ph(e),r=t==null?p1:typeof t=="function"?t:Uo(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function m1(){var e=this.parentNode;e&&e.removeChild(this)}function v1(){return this.each(m1)}function y1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function E1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function b1(e){return this.select(e?E1:y1)}function x1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function _1(e){return function(t){e.call(this,t,this.__data__)}}function S1(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 T1(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 O1(e,t,n){return function(){var r=this.__on,i,s=_1(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 w1(e,t,n){var r=S1(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?O1:T1,i=0;i<s;++i)this.each(o(r[i],t,n));return this}function Th(e,t,n){var r=Eh(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 M1(e,t){return function(){return Th(this,e,t)}}function A1(e,t){return function(){return Th(this,e,t.apply(this,arguments))}}function C1(e,t){return this.each((typeof t=="function"?A1:M1)(e,t))}function*D1(){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 Oh=[null];function ve(e,t){this._groups=e,this._parents=t}function hi(){return new ve([[document.documentElement]],Oh)}function L1(){return this}ve.prototype=hi.prototype={constructor:ve,select:ry,selectAll:oy,selectChild:hy,selectChildren:gy,filter:my,data:_y,enter:vy,exit:Ty,join:Oy,merge:wy,selection:L1,order:My,sort:Ay,call:Dy,nodes:Ly,node:Ry,size:Iy,empty:ky,each:Py,attr:Gy,style:Yy,property:Zy,classed:t1,text:i1,html:l1,raise:u1,lower:d1,append:f1,insert:g1,remove:v1,clone:b1,datum:x1,on:w1,dispatch:C1,[Symbol.iterator]:D1};function R(e){return typeof e=="string"?new ve([[document.querySelector(e)]],[document.documentElement]):new ve([[e]],Oh)}function R1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function zn(e,t){if(e=R1(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 Ho={capture:!0,passive:!1};function Go(e){e.preventDefault(),e.stopImmediatePropagation()}function I1(e){var t=e.document.documentElement,n=R(e).on("dragstart.drag",Go,Ho);"onselectstart"in t?n.on("selectstart.drag",Go,Ho):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function k1(e,t){var n=e.document.documentElement,r=R(e).on("dragstart.drag",null);t&&(r.on("click.drag",Go,Ho),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 Vo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function wh(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function di(){}var fi=.7,Ps=1/fi,yr="\\s*([+-]?\\d+)\\s*",pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",P1=/^#([0-9a-f]{3,8})$/,N1=new RegExp(`^rgb\\(${yr},${yr},${yr}\\)$`),$1=new RegExp(`^rgb\\(${je},${je},${je}\\)$`),F1=new RegExp(`^rgba\\(${yr},${yr},${yr},${pi}\\)$`),U1=new RegExp(`^rgba\\(${je},${je},${je},${pi}\\)$`),B1=new RegExp(`^hsl\\(${pi},${je},${je}\\)$`),H1=new RegExp(`^hsla\\(${pi},${je},${je},${pi}\\)$`),Mh={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};Vo(di,hn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ah,formatHex:Ah,formatHex8:G1,formatHsl:V1,formatRgb:Ch,toString:Ch});function Ah(){return this.rgb().formatHex()}function G1(){return this.rgb().formatHex8()}function V1(){return kh(this).formatHsl()}function Ch(){return this.rgb().formatRgb()}function hn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=P1.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Dh(t):n===3?new ue(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ns(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ns(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=N1.exec(e))?new ue(t[1],t[2],t[3],1):(t=$1.exec(e))?new ue(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=F1.exec(e))?Ns(t[1],t[2],t[3],t[4]):(t=U1.exec(e))?Ns(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=B1.exec(e))?Ih(t[1],t[2]/100,t[3]/100,1):(t=H1.exec(e))?Ih(t[1],t[2]/100,t[3]/100,t[4]):Mh.hasOwnProperty(e)?Dh(Mh[e]):e==="transparent"?new ue(NaN,NaN,NaN,0):null}function Dh(e){return new ue(e>>16&255,e>>8&255,e&255,1)}function Ns(e,t,n,r){return r<=0&&(e=t=n=NaN),new ue(e,t,n,r)}function z1(e){return e instanceof di||(e=hn(e)),e?(e=e.rgb(),new ue(e.r,e.g,e.b,e.opacity)):new ue}function zo(e,t,n,r){return arguments.length===1?z1(e):new ue(e,t,n,r??1)}function ue(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Vo(ue,zo,wh(di,{brighter(e){return e=e==null?Ps:Math.pow(Ps,e),new ue(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?fi:Math.pow(fi,e),new ue(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ue(Wn(this.r),Wn(this.g),Wn(this.b),$s(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:Lh,formatHex:Lh,formatHex8:W1,formatRgb:Rh,toString:Rh}));function Lh(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}`}function W1(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}${Yn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Rh(){const e=$s(this.opacity);return`${e===1?"rgb(":"rgba("}${Wn(this.r)}, ${Wn(this.g)}, ${Wn(this.b)}${e===1?")":`, ${e})`}`}function $s(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Yn(e){return e=Wn(e),(e<16?"0":"")+e.toString(16)}function Ih(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new $e(e,t,n,r)}function kh(e){if(e instanceof $e)return new $e(e.h,e.s,e.l,e.opacity);if(e instanceof di||(e=hn(e)),!e)return new $e;if(e instanceof $e)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 $e(a,o,l,e.opacity)}function Ph(e,t,n,r){return arguments.length===1?kh(e):new $e(e,t,n,r??1)}function $e(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Vo($e,Ph,wh(di,{brighter(e){return e=e==null?Ps:Math.pow(Ps,e),new $e(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?fi:Math.pow(fi,e),new $e(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 ue(Wo(e>=240?e-240:e+120,i,r),Wo(e,i,r),Wo(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new $e(Nh(this.h),Fs(this.s),Fs(this.l),$s(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=$s(this.opacity);return`${e===1?"hsl(":"hsla("}${Nh(this.h)}, ${Fs(this.s)*100}%, ${Fs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Nh(e){return e=(e||0)%360,e<0?e+360:e}function Fs(e){return Math.max(0,Math.min(1,e||0))}function Wo(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 Yo=e=>()=>e;function Y1(e,t){return function(n){return e+n*t}}function q1(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 X1(e){return(e=+e)==1?$h:function(t,n){return n-t?q1(t,n,e):Yo(isNaN(t)?n:t)}}function $h(e,t){var n=t-e;return n?Y1(e,n):Yo(isNaN(e)?t:e)}const Us=function e(t){var n=X1(t);function r(i,s){var a=n((i=zo(i)).r,(s=zo(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),c=$h(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 j1(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 Z1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function K1(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]=gi(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 Q1(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ye(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function J1(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=gi(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var qo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xo=new RegExp(qo.source,"g");function tE(e){return function(){return e}}function eE(e){return function(t){return e(t)+""}}function Fh(e,t){var n=qo.lastIndex=Xo.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(r=qo.exec(e))&&(i=Xo.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:ye(r,i)})),n=Xo.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?eE(l[0].x):tE(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)o[(d=l[u]).i]=d.x(c);return o.join("")})}function gi(e,t){var n=typeof t,r;return t==null||n==="boolean"?Yo(t):(n==="number"?ye:n==="string"?(r=hn(t))?(t=r,Us):Fh:t instanceof hn?Us:t instanceof Date?Q1:Z1(t)?j1:Array.isArray(t)?K1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?J1:ye)(e,t)}function Uh(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Bh=180/Math.PI,jo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Hh(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)*Bh,skewX:Math.atan(l)*Bh,scaleX:a,scaleY:o}}var Bs;function nE(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?jo:Hh(t.a,t.b,t.c,t.d,t.e,t.f)}function rE(e){return e==null||(Bs||(Bs=document.createElementNS("http://www.w3.org/2000/svg","g")),Bs.setAttribute("transform",e),!(e=Bs.transform.baseVal.consolidate()))?jo:(e=e.matrix,Hh(e.a,e.b,e.c,e.d,e.e,e.f))}function Gh(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function s(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push("translate(",null,t,null,n);p.push({i:g-4,x:ye(c,d)},{i:g-2,x:ye(u,h)})}else(d||h)&&f.push("translate("+d+t+h+n)}function a(c,u,d,h){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:ye(c,u)})):u&&d.push(i(d)+"rotate("+u+r)}function o(c,u,d,h){c!==u?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:ye(c,u)}):u&&d.push(i(d)+"skewX("+u+r)}function l(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push(i(f)+"scale(",null,",",null,")");p.push({i:g-4,x:ye(c,d)},{i:g-2,x:ye(u,h)})}else(d!==1||h!==1)&&f.push(i(f)+"scale("+d+","+h+")")}return function(c,u){var d=[],h=[];return c=e(c),u=e(u),s(c.translateX,c.translateY,u.translateX,u.translateY,d,h),a(c.rotate,u.rotate,d,h),o(c.skewX,u.skewX,d,h),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var p=-1,g=h.length,m;++p<g;)d[(m=h[p]).i]=m.x(f);return d.join("")}}}var iE=Gh(nE,"px, ","px)","deg)"),sE=Gh(rE,", ",")",")");function aE(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var Er=0,mi=0,vi=0,Vh=1e3,Hs,yi,Gs=0,qn=0,Vs=0,Ei=typeof performance=="object"&&performance.now?performance:Date,zh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Zo(){return qn||(zh(oE),qn=Ei.now()+Vs)}function oE(){qn=0}function zs(){this._call=this._time=this._next=null}zs.prototype=Wh.prototype={constructor:zs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Zo():+n)+(t==null?0:+t),!this._next&&yi!==this&&(yi?yi._next=this:Hs=this,yi=this),this._call=e,this._time=n,Ko()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ko())}};function Wh(e,t,n){var r=new zs;return r.restart(e,t,n),r}function lE(){Zo(),++Er;for(var e=Hs,t;e;)(t=qn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Er}function Yh(){qn=(Gs=Ei.now())+Vs,Er=mi=0;try{lE()}finally{Er=0,uE(),qn=0}}function cE(){var e=Ei.now(),t=e-Gs;t>Vh&&(Vs-=t,Gs=e)}function uE(){for(var e,t=Hs,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:Hs=n);yi=e,Ko(r)}function Ko(e){if(!Er){mi&&(mi=clearTimeout(mi));var t=e-qn;t>24?(e<1/0&&(mi=setTimeout(Yh,e-Ei.now()-Vs)),vi&&(vi=clearInterval(vi))):(vi||(Gs=Ei.now(),vi=setInterval(cE,Vh)),Er=1,zh(Yh))}}function qh(e,t,n){var r=new zs;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var hE=$o("start","end","cancel","interrupt"),dE=[],Xh=0,jh=1,Qo=2,Ws=3,Zh=4,Jo=5,Ys=6;function qs(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;fE(e,n,{name:t,index:r,group:i,on:hE,tween:dE,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Xh})}function tl(e,t){var n=Fe(e,t);if(n.state>Xh)throw new Error("too late; already scheduled");return n}function Ze(e,t){var n=Fe(e,t);if(n.state>Ws)throw new Error("too late; already running");return n}function Fe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function fE(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Wh(s,0,n.time);function s(c){n.state=jh,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var u,d,h,f;if(n.state!==jh)return l();for(u in r)if(f=r[u],f.name===n.name){if(f.state===Ws)return qh(a);f.state===Zh?(f.state=Ys,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[u]):+u<t&&(f.state=Ys,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[u])}if(qh(function(){n.state===Ws&&(n.state=Zh,n.timer.restart(o,n.delay,n.time),o(c))}),n.state=Qo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Qo){for(n.state=Ws,i=new Array(h=n.tween.length),u=0,d=-1;u<h;++u)(f=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=f);i.length=d+1}}function o(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Jo,1),d=-1,h=i.length;++d<h;)i[d].call(e,u);n.state===Jo&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Ys,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function el(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>Qo&&r.state<Jo,r.state=Ys,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}function pE(e){return this.each(function(){el(this,e)})}function gE(e,t){var n,r;return function(){var i=Ze(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 mE(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Ze(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 vE(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Fe(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?gE:mE)(n,e,t))}function nl(e,t,n){var r=e._id;return e.each(function(){var i=Ze(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Fe(i,r).value[t]}}function Kh(e,t){var n;return(typeof t=="number"?ye:t instanceof hn?Us:(n=hn(t))?(t=n,Us):Fh)(e,t)}function yE(e){return function(){this.removeAttribute(e)}}function EE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function bE(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 xE(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 _E(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 SE(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 TE(e,t){var n=Is(e),r=n==="transform"?sE:Kh;return this.attrTween(e,typeof t=="function"?(n.local?SE:_E)(n,r,nl(this,"attr."+e,t)):t==null?(n.local?EE:yE)(n):(n.local?xE:bE)(n,r,t))}function OE(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function wE(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ME(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&wE(e,s)),n}return i._value=t,i}function AE(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&OE(e,s)),n}return i._value=t,i}function CE(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=Is(e);return this.tween(n,(r.local?ME:AE)(r,t))}function DE(e,t){return function(){tl(this,e).delay=+t.apply(this,arguments)}}function LE(e,t){return t=+t,function(){tl(this,e).delay=t}}function RE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?DE:LE)(t,e)):Fe(this.node(),t).delay}function IE(e,t){return function(){Ze(this,e).duration=+t.apply(this,arguments)}}function kE(e,t){return t=+t,function(){Ze(this,e).duration=t}}function PE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?IE:kE)(t,e)):Fe(this.node(),t).duration}function NE(e,t){if(typeof t!="function")throw new Error;return function(){Ze(this,e).ease=t}}function $E(e){var t=this._id;return arguments.length?this.each(NE(t,e)):Fe(this.node(),t).ease}function FE(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ze(this,e).ease=n}}function UE(e){if(typeof e!="function")throw new Error;return this.each(FE(this._id,e))}function BE(e){typeof e!="function"&&(e=mh(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 dn(r,this._parents,this._name,this._id)}function HE(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),a=new Array(r),o=0;o<s;++o)for(var l=t[o],c=n[o],u=l.length,d=a[o]=new Array(u),h,f=0;f<u;++f)(h=l[f]||c[f])&&(d[f]=h);for(;o<r;++o)a[o]=t[o];return new dn(a,this._parents,this._name,this._id)}function GE(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 VE(e,t,n){var r,i,s=GE(t)?tl:Ze;return function(){var a=s(this,e),o=a.on;o!==r&&(i=(r=o).copy()).on(t,n),a.on=i}}function zE(e,t){var n=this._id;return arguments.length<2?Fe(this.node(),n).on.on(e):this.each(VE(n,e,t))}function WE(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function YE(){return this.on("end.remove",WE(this._id))}function qE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Uo(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var o=r[a],l=o.length,c=s[a]=new Array(l),u,d,h=0;h<l;++h)(u=o[h])&&(d=e.call(u,u.__data__,h,o))&&("__data__"in u&&(d.__data__=u.__data__),c[h]=d,qs(c[h],t,n,h,c,Fe(u,n)));return new dn(s,this._parents,t,n)}function XE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=gh(e));for(var r=this._groups,i=r.length,s=[],a=[],o=0;o<i;++o)for(var l=r[o],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var h=e.call(u,u.__data__,d,l),f,p=Fe(u,n),g=0,m=h.length;g<m;++g)(f=h[g])&&qs(f,t,n,g,h,p);s.push(h),a.push(u)}return new dn(s,a,t,n)}var jE=hi.prototype.constructor;function ZE(){return new jE(this._groups,this._parents)}function KE(e,t){var n,r,i;return function(){var s=vr(this,e),a=(this.style.removeProperty(e),vr(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}function Qh(e){return function(){this.style.removeProperty(e)}}function QE(e,t,n){var r,i=n+"",s;return function(){var a=vr(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}function JE(e,t,n){var r,i,s;return function(){var a=vr(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),vr(this,e))),a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o))}}function tb(e,t){var n,r,i,s="style."+t,a="end."+s,o;return function(){var l=Ze(this,e),c=l.on,u=l.value[s]==null?o||(o=Qh(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(a,i=u),l.on=r}}function eb(e,t,n){var r=(e+="")=="transform"?iE:Kh;return t==null?this.styleTween(e,KE(e,r)).on("end.style."+e,Qh(e)):typeof t=="function"?this.styleTween(e,JE(e,r,nl(this,"style."+e,t))).each(tb(this._id,e)):this.styleTween(e,QE(e,r,t),n).on("end.style."+e,null)}function nb(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function rb(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&nb(e,a,n)),r}return s._value=t,s}function ib(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,rb(e,t,n??""))}function sb(e){return function(){this.textContent=e}}function ab(e){return function(){var t=e(this);this.textContent=t??""}}function ob(e){return this.tween("text",typeof e=="function"?ab(nl(this,"text",e)):sb(e==null?"":e+""))}function lb(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)&&lb(i)),t}return r._value=e,r}function ub(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 hb(){for(var e=this._name,t=this._id,n=Jh(),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=Fe(l,t);qs(l,e,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new dn(r,this._parents,e,n)}function db(){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=Ze(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 fb=0;function dn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Jh(){return++fb}var fn=hi.prototype;dn.prototype={constructor:dn,select:qE,selectAll:XE,selectChild:fn.selectChild,selectChildren:fn.selectChildren,filter:BE,merge:HE,selection:ZE,transition:hb,call:fn.call,nodes:fn.nodes,node:fn.node,size:fn.size,empty:fn.empty,each:fn.each,on:zE,attr:TE,attrTween:CE,style:eb,styleTween:ib,text:ob,textTween:ub,remove:YE,tween:vE,delay:RE,duration:PE,ease:$E,easeVarying:UE,end:db,[Symbol.iterator]:fn[Symbol.iterator]};const pb=e=>+e;function td(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var gb={time:null,delay:0,duration:250,ease:td};function mb(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 vb(e){var t,n;e instanceof dn?(t=e._id,e=e._name):(t=Jh(),(n=gb).time=Zo(),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])&&qs(l,e,t,c,a,n||mb(l,t));return new dn(r,this._parents,e,t)}hi.prototype.interrupt=pE,hi.prototype.transition=vb;const rl=e=>()=>e;function yb(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 Eb(e){e.stopImmediatePropagation()}function il(e){e.preventDefault(),e.stopImmediatePropagation()}var ed={name:"drag"},sl={name:"space"},br={name:"handle"},xr={name:"center"};const{abs:nd,max:Kt,min:Qt}=Math;function rd(e){return[+e[0],+e[1]]}function id(e){return[rd(e[0]),rd(e[1])]}var Xs={name:"x",handles:["w","e"].map(js),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]]}},al={name:"y",handles:["n","s"].map(js),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]]}},pn={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"},sd={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},ad={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},xb={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function js(e){return{type:e}}function _b(e){return!e.ctrlKey&&!e.button}function Sb(){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 Tb(){return navigator.maxTouchPoints||"ontouchstart"in this}function ol(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Ob(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function od(){return wb(Xs)}function wb(e){var t=Sb,n=_b,r=Tb,i=!0,s=$o("start","brush","end"),a=6,o;function l(m){var v=m.property("__brush",g).selectAll(".overlay").data([js("overlay")]);v.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",pn.overlay).merge(v).each(function(){var y=ol(this).extent;R(this).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1])}),m.selectAll(".selection").data([js("selection")]).enter().append("rect").attr("class","selection").attr("cursor",pn.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var E=m.selectAll(".handle").data(e.handles,function(y){return y.type});E.exit().remove(),E.enter().append("rect").attr("class",function(y){return"handle handle--"+y.type}).attr("cursor",function(y){return pn[y.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(m,v,E){m.tween?m.on("start.brush",function(y){u(this,arguments).beforestart().start(y)}).on("interrupt.brush end.brush",function(y){u(this,arguments).end(y)}).tween("brush",function(){var y=this,x=y.__brush,S=u(y,arguments),_=x.selection,A=e.input(typeof v=="function"?v.apply(this,arguments):v,x.extent),L=gi(_,A);function B(k){x.selection=k===1&&A===null?null:L(k),c.call(y),S.brush()}return _!==null&&A!==null?B:B(1)}):m.each(function(){var y=this,x=arguments,S=y.__brush,_=e.input(typeof v=="function"?v.apply(y,x):v,S.extent),A=u(y,x).beforestart();el(y),S.selection=_===null?null:_,c.call(y),A.start(E).brush(E).end(E)})},l.clear=function(m,v){l.move(m,null,v)};function c(){var m=R(this),v=ol(this).selection;v?(m.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]),m.selectAll(".handle").style("display",null).attr("x",function(E){return E.type[E.type.length-1]==="e"?v[1][0]-a/2:v[0][0]-a/2}).attr("y",function(E){return E.type[0]==="s"?v[1][1]-a/2:v[0][1]-a/2}).attr("width",function(E){return E.type==="n"||E.type==="s"?v[1][0]-v[0][0]+a:a}).attr("height",function(E){return E.type==="e"||E.type==="w"?v[1][1]-v[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(m,v,E){var y=m.__brush.emitter;return y&&(!E||!y.clean)?y:new d(m,v,E)}function d(m,v,E){this.that=m,this.args=v,this.state=m.__brush,this.active=0,this.clean=E}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,v){return this.starting?(this.starting=!1,this.emit("start",m,v)):this.emit("brush",m),this},brush:function(m,v){return this.emit("brush",m,v),this},end:function(m,v){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,v)),this},emit:function(m,v,E){var y=R(this.that).datum();s.call(m,this.that,new yb(m,{sourceEvent:v,target:l,selection:e.output(this.state.selection),mode:E,dispatch:s}),y)}};function h(m){if(o&&!m.touches||!n.apply(this,arguments))return;var v=this,E=m.target.__data__.type,y=(i&&m.metaKey?E="overlay":E)==="selection"?ed:i&&m.altKey?xr:br,x=e===al?null:bb[E],S=e===Xs?null:xb[E],_=ol(v),A=_.extent,L=_.selection,B=A[0][0],k,O,H=A[0][1],P,M,w=A[1][0],U,$,N=A[1][1],F,j,q=0,ot=0,it,mt=x&&S&&i&&m.shiftKey,st,Z,et=Array.from(m.touches||[m],rt=>{const Ct=rt.identifier;return rt=zn(rt,v),rt.point0=rt.slice(),rt.identifier=Ct,rt});el(v);var vt=u(v,arguments,!0).beforestart();if(E==="overlay"){L&&(it=!0);const rt=[et[0],et[1]||et[0]];_.selection=L=[[k=e===al?B:Qt(rt[0][0],rt[1][0]),P=e===Xs?H:Qt(rt[0][1],rt[1][1])],[U=e===al?w:Kt(rt[0][0],rt[1][0]),F=e===Xs?N:Kt(rt[0][1],rt[1][1])]],et.length>1&&z(m)}else k=L[0][0],P=L[0][1],U=L[1][0],F=L[1][1];O=k,M=P,$=U,j=F;var Y=R(v).attr("pointer-events","none"),K=Y.selectAll(".overlay").attr("cursor",pn[E]);if(m.touches)vt.moved=C,vt.ended=V;else{var ut=R(m.view).on("mousemove.brush",C,!0).on("mouseup.brush",V,!0);i&&ut.on("keydown.brush",At,!0).on("keyup.brush",Wt,!0),I1(m.view)}c.call(v),vt.start(m,y.name);function C(rt){for(const Ct of rt.changedTouches||[rt])for(const ln of et)ln.identifier===Ct.identifier&&(ln.cur=zn(Ct,v));if(mt&&!st&&!Z&&et.length===1){const Ct=et[0];nd(Ct.cur[0]-Ct[0])>nd(Ct.cur[1]-Ct[1])?Z=!0:st=!0}for(const Ct of et)Ct.cur&&(Ct[0]=Ct.cur[0],Ct[1]=Ct.cur[1]);it=!0,il(rt),z(rt)}function z(rt){const Ct=et[0],ln=Ct.point0;var Xe;switch(q=Ct[0]-ln[0],ot=Ct[1]-ln[1],y){case sl:case ed:{x&&(q=Kt(B-k,Qt(w-U,q)),O=k+q,$=U+q),S&&(ot=Kt(H-P,Qt(N-F,ot)),M=P+ot,j=F+ot);break}case br:{et[1]?(x&&(O=Kt(B,Qt(w,et[0][0])),$=Kt(B,Qt(w,et[1][0])),x=1),S&&(M=Kt(H,Qt(N,et[0][1])),j=Kt(H,Qt(N,et[1][1])),S=1)):(x<0?(q=Kt(B-k,Qt(w-k,q)),O=k+q,$=U):x>0&&(q=Kt(B-U,Qt(w-U,q)),O=k,$=U+q),S<0?(ot=Kt(H-P,Qt(N-P,ot)),M=P+ot,j=F):S>0&&(ot=Kt(H-F,Qt(N-F,ot)),M=P,j=F+ot));break}case xr:{x&&(O=Kt(B,Qt(w,k-q*x)),$=Kt(B,Qt(w,U+q*x))),S&&(M=Kt(H,Qt(N,P-ot*S)),j=Kt(H,Qt(N,F+ot*S)));break}}$<O&&(x*=-1,Xe=k,k=U,U=Xe,Xe=O,O=$,$=Xe,E in sd&&K.attr("cursor",pn[E=sd[E]])),j<M&&(S*=-1,Xe=P,P=F,F=Xe,Xe=M,M=j,j=Xe,E in ad&&K.attr("cursor",pn[E=ad[E]])),_.selection&&(L=_.selection),st&&(O=L[0][0],$=L[1][0]),Z&&(M=L[0][1],j=L[1][1]),(L[0][0]!==O||L[0][1]!==M||L[1][0]!==$||L[1][1]!==j)&&(_.selection=[[O,M],[$,j]],c.call(v),vt.brush(rt,y.name))}function V(rt){if(Eb(rt),rt.touches){if(rt.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else k1(rt.view,it),ut.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Y.attr("pointer-events","all"),K.attr("cursor",pn.overlay),_.selection&&(L=_.selection),Ob(L)&&(_.selection=null,c.call(v)),vt.end(rt,y.name)}function At(rt){switch(rt.keyCode){case 16:{mt=x&&S;break}case 18:{y===br&&(x&&(U=$-q*x,k=O+q*x),S&&(F=j-ot*S,P=M+ot*S),y=xr,z(rt));break}case 32:{(y===br||y===xr)&&(x<0?U=$-q:x>0&&(k=O-q),S<0?F=j-ot:S>0&&(P=M-ot),y=sl,K.attr("cursor",pn.selection),z(rt));break}default:return}il(rt)}function Wt(rt){switch(rt.keyCode){case 16:{mt&&(st=Z=mt=!1,z(rt));break}case 18:{y===xr&&(x<0?U=$:x>0&&(k=O),S<0?F=j:S>0&&(P=M),y=br,z(rt));break}case 32:{y===sl&&(rt.altKey?(x&&(U=$-q*x,k=O+q*x),S&&(F=j-ot*S,P=M+ot*S),y=xr):(x<0?U=$:x>0&&(k=O),S<0?F=j:S>0&&(P=M),y=br),K.attr("cursor",pn[E]),z(rt));break}default:return}il(rt)}}function f(m){u(this,arguments).moved(m)}function p(m){u(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=id(t.apply(this,arguments)),m.dim=e,m}return l.extent=function(m){return arguments.length?(t=typeof m=="function"?m:rl(id(m)),l):t},l.filter=function(m){return arguments.length?(n=typeof m=="function"?m:rl(!!m),l):n},l.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:rl(!!m),l):r},l.handleSize=function(m){return arguments.length?(a=+m,l):a},l.keyModifiers=function(m){return arguments.length?(i=!!m,l):i},l.on=function(){var m=s.on.apply(s,arguments);return m===s?l:m},l}const ll=Math.PI,cl=2*ll,Xn=1e-6,Mb=cl-Xn;function ld(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Ab(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ld;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 Cb=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ld:Ab(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,s,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+a}`}arcTo(t,n,r,i,s){if(t=+t,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=r-t,c=i-n,u=a-t,d=o-n,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>Xn)if(!(Math.abs(d*l-c*u)>Xn)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let f=r-a,p=i-o,g=l*l+c*c,m=f*f+p*p,v=Math.sqrt(g),E=Math.sqrt(h),y=s*Math.tan((ll-Math.acos((g+h-m)/(2*v*E)))/2),x=y/E,S=y/v;Math.abs(x-1)>Xn&&this._append`L${t+x*u},${n+x*d}`,this._append`A${s},${s},0,0,${+(d*f>u*p)},${this._x1=t+S*l},${this._y1=n+S*c}`}}arc(t,n,r,i,s,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),l=r*Math.sin(i),c=t+o,u=n+l,d=1^a,h=a?i-s:s-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Xn||Math.abs(this._y1-u)>Xn)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%cl+cl),h>Mb?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:h>Xn&&this._append`A${r},${r},0,${+(h>=ll)},${d},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Db(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Zs(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 _r(e){return e=Zs(Math.abs(e)),e?e[1]:NaN}function Lb(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 Rb(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Ib=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function bi(e){if(!(t=Ib.exec(e)))throw new Error("invalid format: "+e);var t;return new ul({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]})}bi.prototype=ul.prototype;function ul(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+""}ul.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 kb(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 cd;function Pb(e,t){var n=Zs(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(cd=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")+Zs(e,Math.max(0,t+s-1))[0]}function ud(e,t){var n=Zs(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 hd={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Db,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)=>ud(e*100,t),r:ud,s:Pb,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function dd(e){return e}var fd=Array.prototype.map,pd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Nb(e){var t=e.grouping===void 0||e.thousands===void 0?dd:Lb(fd.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?dd:Rb(fd.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=bi(d);var h=d.fill,f=d.align,p=d.sign,g=d.symbol,m=d.zero,v=d.width,E=d.comma,y=d.precision,x=d.trim,S=d.type;S==="n"?(E=!0,S="g"):hd[S]||(y===void 0&&(y=12),x=!0,S="g"),(m||h==="0"&&f==="=")&&(m=!0,h="0",f="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",A=g==="$"?r:/[%p]/.test(S)?a:"",L=hd[S],B=/[defgprs%]/.test(S);y=y===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function k(O){var H=_,P=A,M,w,U;if(S==="c")P=L(O)+P,O="";else{O=+O;var $=O<0||1/O<0;if(O=isNaN(O)?l:L(Math.abs(O),y),x&&(O=kb(O)),$&&+O==0&&p!=="+"&&($=!1),H=($?p==="("?p:o:p==="-"||p==="("?"":p)+H,P=(S==="s"?pd[8+cd/3]:"")+P+($&&p==="("?")":""),B){for(M=-1,w=O.length;++M<w;)if(U=O.charCodeAt(M),48>U||U>57){P=(U===46?i+O.slice(M+1):O.slice(M))+P,O=O.slice(0,M);break}}}E&&!m&&(O=t(O,1/0));var N=H.length+O.length+P.length,F=N<v?new Array(v-N+1).join(h):"";switch(E&&m&&(O=t(F+O,F.length?v-P.length:1/0),F=""),f){case"<":O=H+O+P+F;break;case"=":O=H+F+O+P;break;case"^":O=F.slice(0,N=F.length>>1)+H+O+P+F.slice(N);break;default:O=F+H+O+P;break}return s(O)}return k.toString=function(){return d+""},k}function u(d,h){var f=c((d=bi(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(_r(h)/3)))*3,g=Math.pow(10,-p),m=pd[8+p/3];return function(v){return f(g*v)+m}}return{format:c,formatPrefix:u}}var Ks,hl,gd;$b({thousands:",",grouping:[3],currency:["$",""]});function $b(e){return Ks=Nb(e),hl=Ks.format,gd=Ks.formatPrefix,Ks}function Fb(e){return Math.max(0,-_r(Math.abs(e)))}function Ub(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_r(t)/3)))*3-_r(Math.abs(e)))}function Bb(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_r(t)-_r(e))+1}var _t=1e-6,md=1e-12,ft=Math.PI,he=ft/2,vd=ft/4,Ee=ft*2,re=180/ft,Nt=ft/180,St=Math.abs,yd=Math.atan,jn=Math.atan2,Ot=Math.cos,Hb=Math.exp,Gb=Math.log,bt=Math.sin,kn=Math.sign||function(e){return e>0?1:e<0?-1:0},Ue=Math.sqrt,Vb=Math.tan;function zb(e){return e>1?0:e<-1?ft:Math.acos(e)}function gn(e){return e>1?he:e<-1?-he:Math.asin(e)}function Oe(){}function Qs(e,t){e&&bd.hasOwnProperty(e.type)&&bd[e.type](e,t)}var Ed={Feature:function(e,t){Qs(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Qs(n[r].geometry,t)}},bd={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){dl(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)dl(n[r],t,0)},Polygon:function(e,t){xd(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)xd(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Qs(n[r],t)}};function dl(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 xd(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)dl(e[n],t,1);t.polygonEnd()}function Sr(e,t){e&&Ed.hasOwnProperty(e.type)?Ed[e.type](e,t):Qs(e,t)}function fl(e){return[jn(e[1],e[0]),gn(e[2])]}function Tr(e){var t=e[0],n=e[1],r=Ot(n);return[r*Ot(t),r*bt(t),bt(n)]}function Js(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ta(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 pl(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function ea(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function gl(e){var t=Ue(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function ml(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 vl(e,t){return St(e)>ft&&(e-=Math.round(e/Ee)*Ee),[e,t]}vl.invert=vl;function _d(e,t,n){return(e%=Ee)?t||n?ml(Td(e),Od(t,n)):Td(e):t||n?Od(t,n):vl}function Sd(e){return function(t,n){return t+=e,St(t)>ft&&(t-=Math.round(t/Ee)*Ee),[t,n]}}function Td(e){var t=Sd(e);return t.invert=Sd(-e),t}function Od(e,t){var n=Ot(e),r=bt(e),i=Ot(t),s=bt(t);function a(o,l){var c=Ot(l),u=Ot(o)*c,d=bt(o)*c,h=bt(l),f=h*n+u*r;return[jn(d*i-f*s,u*n-h*r),gn(f*i+d*s)]}return a.invert=function(o,l){var c=Ot(l),u=Ot(o)*c,d=bt(o)*c,h=bt(l),f=h*i-d*s;return[jn(d*i+h*s,u*n+f*r),gn(f*n-u*r)]},a}function Wb(e){e=_d(e[0]*Nt,e[1]*Nt,e.length>2?e[2]*Nt:0);function t(n){return n=e(n[0]*Nt,n[1]*Nt),n[0]*=re,n[1]*=re,n}return t.invert=function(n){return n=e.invert(n[0]*Nt,n[1]*Nt),n[0]*=re,n[1]*=re,n},t}function Yb(e,t,n,r,i,s){if(n){var a=Ot(t),o=bt(t),l=r*n;i==null?(i=t+r*Ee,s=t-l/2):(i=wd(a,i),s=wd(a,s),(r>0?i<s:i>s)&&(i+=r*Ee));for(var c,u=i;r>0?u>s:u<s;u-=l)c=fl([a,-o*Ot(u),-o*bt(u)]),e.point(c[0],c[1])}}function wd(e,t){t=Tr(t),t[0]-=e,gl(t);var n=zb(-t[1]);return((-t[2]<0?-n:n)+Ee-_t)%Ee}function Md(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Oe,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function na(e,t){return St(e[0]-t[0])<_t&&St(e[1]-t[1])<_t}function ra(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 Ad(e,t,n,r,i){var s=[],a=[],o,l;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],v=p[g],E;if(na(m,v)){if(!m[2]&&!v[2]){for(i.lineStart(),o=0;o<g;++o)i.point((m=p[o])[0],m[1]);i.lineEnd();return}v[0]+=2*_t}s.push(E=new ra(m,p,null,!0)),a.push(E.o=new ra(m,null,E,!1)),s.push(E=new ra(v,p,null,!1)),a.push(E.o=new ra(v,null,E,!0))}}),!!s.length){for(a.sort(t),Cd(s),Cd(a),o=0,l=a.length;o<l;++o)a[o].e=n=!n;for(var c=s[0],u,d;;){for(var h=c,f=!0;h.v;)if((h=h.n)===c)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(o=0,l=u.length;o<l;++o)i.point((d=u[o])[0],d[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(f)for(u=h.p.z,o=u.length-1;o>=0;--o)i.point((d=u[o])[0],d[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,u=h.z,f=!f}while(!h.v);i.lineEnd()}}}function Cd(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 yl(e){return St(e[0])<=ft?e[0]:kn(e[0])*((St(e[0])+ft)%Ee-ft)}function qb(e,t){var n=yl(t),r=t[1],i=bt(r),s=[bt(n),-Ot(n),0],a=0,o=0,l=new Gn;i===1?r=he+_t:i===-1&&(r=-he-_t);for(var c=0,u=e.length;c<u;++c)if(h=(d=e[c]).length)for(var d,h,f=d[h-1],p=yl(f),g=f[1]/2+vd,m=bt(g),v=Ot(g),E=0;E<h;++E,p=x,m=_,v=A,f=y){var y=d[E],x=yl(y),S=y[1]/2+vd,_=bt(S),A=Ot(S),L=x-p,B=L>=0?1:-1,k=B*L,O=k>ft,H=m*_;if(l.add(jn(H*B*bt(k),v*A+H*Ot(k))),a+=O?L+B*Ee:L,O^p>=n^x>=n){var P=ta(Tr(f),Tr(y));gl(P);var M=ta(s,P);gl(M);var w=(O^L>=0?-1:1)*gn(M[2]);(r>w||r===w&&(P[0]||P[1]))&&(o+=O^L>=0?1:-1)}}return(a<-_t||a<_t&&l<-md)^o&1}function Dd(e,t,n,r){return function(i){var s=t(i),a=Md(),o=t(a),l=!1,c,u,d,h={point:f,lineStart:g,lineEnd:m,polygonStart:function(){h.point=v,h.lineStart=E,h.lineEnd=y,u=[],c=[]},polygonEnd:function(){h.point=f,h.lineStart=g,h.lineEnd=m,u=ch(u);var x=qb(c,r);u.length?(l||(i.polygonStart(),l=!0),Ad(u,jb,x,n,i)):x&&(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(x,S){e(x,S)&&i.point(x,S)}function p(x,S){s.point(x,S)}function g(){h.point=p,s.lineStart()}function m(){h.point=f,s.lineEnd()}function v(x,S){d.push([x,S]),o.point(x,S)}function E(){o.lineStart(),d=[]}function y(){v(d[0][0],d[0][1]),o.lineEnd();var x=o.clean(),S=a.result(),_,A=S.length,L,B,k;if(d.pop(),c.push(d),d=null,!!A){if(x&1){if(B=S[0],(L=B.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),_=0;_<L;++_)i.point((k=B[_])[0],k[1]);i.lineEnd()}return}A>1&&x&2&&S.push(S.pop().concat(S.shift())),u.push(S.filter(Xb))}}return h}}function Xb(e){return e.length>1}function jb(e,t){return((e=e.x)[0]<0?e[1]-he-_t:he-e[1])-((t=t.x)[0]<0?t[1]-he-_t:he-t[1])}const Ld=Dd(function(){return!0},Zb,Qb,[-ft,-he]);function Zb(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(s,a){var o=s>0?ft:-ft,l=St(s-t);St(l-ft)<_t?(e.point(t,n=(n+a)/2>0?he:-he),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(s,n),i=0):r!==o&&l>=ft&&(St(t-r)<_t&&(t-=r*_t),St(s-o)<_t&&(s-=o*_t),n=Kb(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 Kb(e,t,n,r){var i,s,a=bt(e-n);return St(a)>_t?yd((bt(t)*(s=Ot(r))*bt(n)-bt(r)*(i=Ot(t))*bt(e))/(i*s*a)):(t+r)/2}function Qb(e,t,n,r){var i;if(e==null)i=n*he,r.point(-ft,i),r.point(0,i),r.point(ft,i),r.point(ft,0),r.point(ft,-i),r.point(0,-i),r.point(-ft,-i),r.point(-ft,0),r.point(-ft,i);else if(St(e[0]-t[0])>_t){var s=e[0]<t[0]?ft:-ft;i=n*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function Jb(e){var t=Ot(e),n=2*Nt,r=t>0,i=St(t)>_t;function s(u,d,h,f){Yb(f,e,n,h,u,d)}function a(u,d){return Ot(u)*Ot(d)>t}function o(u){var d,h,f,p,g;return{lineStart:function(){p=f=!1,g=1},point:function(m,v){var E=[m,v],y,x=a(m,v),S=r?x?0:c(m,v):x?c(m+(m<0?ft:-ft),v):0;if(!d&&(p=f=x)&&u.lineStart(),x!==f&&(y=l(d,E),(!y||na(d,y)||na(E,y))&&(E[2]=1)),x!==f)g=0,x?(u.lineStart(),y=l(E,d),u.point(y[0],y[1])):(y=l(d,E),u.point(y[0],y[1],2),u.lineEnd()),d=y;else if(i&&d&&r^x){var _;!(S&h)&&(_=l(E,d,!0))&&(g=0,r?(u.lineStart(),u.point(_[0][0],_[0][1]),u.point(_[1][0],_[1][1]),u.lineEnd()):(u.point(_[1][0],_[1][1]),u.lineEnd(),u.lineStart(),u.point(_[0][0],_[0][1],3)))}x&&(!d||!na(d,E))&&u.point(E[0],E[1]),d=E,f=x,h=S},lineEnd:function(){f&&u.lineEnd(),d=null},clean:function(){return g|(p&&f)<<1}}}function l(u,d,h){var f=Tr(u),p=Tr(d),g=[1,0,0],m=ta(f,p),v=Js(m,m),E=m[0],y=v-E*E;if(!y)return!h&&u;var x=t*v/y,S=-t*E/y,_=ta(g,m),A=ea(g,x),L=ea(m,S);pl(A,L);var B=_,k=Js(A,B),O=Js(B,B),H=k*k-O*(Js(A,A)-1);if(!(H<0)){var P=Ue(H),M=ea(B,(-k-P)/O);if(pl(M,A),M=fl(M),!h)return M;var w=u[0],U=d[0],$=u[1],N=d[1],F;U<w&&(F=w,w=U,U=F);var j=U-w,q=St(j-ft)<_t,ot=q||j<_t;if(!q&&N<$&&(F=$,$=N,N=F),ot?q?$+N>0^M[1]<(St(M[0]-w)<_t?$:N):$<=M[1]&&M[1]<=N:j>ft^(w<=M[0]&&M[0]<=U)){var it=ea(B,(-k+P)/O);return pl(it,A),[M,fl(it)]}}}function c(u,d){var h=r?e:ft-e,f=0;return u<-h?f|=1:u>h&&(f|=2),d<-h?f|=4:d>h&&(f|=8),f}return Dd(a,o,s,r?[0,-e]:[-ft,e-ft])}function tx(e,t,n,r,i,s){var a=e[0],o=e[1],l=t[0],c=t[1],u=0,d=1,h=l-a,f=c-o,p;if(p=n-a,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<d&&(d=p)}else if(h>0){if(p>d)return;p>u&&(u=p)}if(p=i-a,!(!h&&p<0)){if(p/=h,h<0){if(p>d)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<d&&(d=p)}if(p=r-o,!(!f&&p>0)){if(p/=f,f<0){if(p<u)return;p<d&&(d=p)}else if(f>0){if(p>d)return;p>u&&(u=p)}if(p=s-o,!(!f&&p<0)){if(p/=f,f<0){if(p>d)return;p>u&&(u=p)}else if(f>0){if(p<u)return;p<d&&(d=p)}return u>0&&(e[0]=a+u*h,e[1]=o+u*f),d<1&&(t[0]=a+d*h,t[1]=o+d*f),!0}}}}}var xi=1e9,ia=-xi;function ex(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function s(c,u,d,h){var f=0,p=0;if(c==null||(f=a(c,d))!==(p=a(u,d))||l(c,u)<0^d>0)do h.point(f===0||f===3?e:n,f>1?r:t);while((f=(f+d+4)%4)!==p);else h.point(u[0],u[1])}function a(c,u){return St(c[0]-e)<_t?u>0?0:3:St(c[0]-n)<_t?u>0?2:1:St(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 d=a(c,1),h=a(u,1);return d!==h?d-h:d===0?u[1]-c[1]:d===1?c[0]-u[0]:d===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,d=Md(),h,f,p,g,m,v,E,y,x,S,_,A={point:L,lineStart:H,lineEnd:P,polygonStart:k,polygonEnd:O};function L(w,U){i(w,U)&&u.point(w,U)}function B(){for(var w=0,U=0,$=f.length;U<$;++U)for(var N=f[U],F=1,j=N.length,q=N[0],ot,it,mt=q[0],st=q[1];F<j;++F)ot=mt,it=st,q=N[F],mt=q[0],st=q[1],it<=r?st>r&&(mt-ot)*(r-it)>(st-it)*(e-ot)&&++w:st<=r&&(mt-ot)*(r-it)<(st-it)*(e-ot)&&--w;return w}function k(){u=d,h=[],f=[],_=!0}function O(){var w=B(),U=_&&w,$=(h=ch(h)).length;(U||$)&&(c.polygonStart(),U&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),$&&Ad(h,o,w,s,c),c.polygonEnd()),u=c,h=f=p=null}function H(){A.point=M,f&&f.push(p=[]),S=!0,x=!1,E=y=NaN}function P(){h&&(M(g,m),v&&x&&d.rejoin(),h.push(d.result())),A.point=L,x&&u.lineEnd()}function M(w,U){var $=i(w,U);if(f&&p.push([w,U]),S)g=w,m=U,v=$,S=!1,$&&(u.lineStart(),u.point(w,U));else if($&&x)u.point(w,U);else{var N=[E=Math.max(ia,Math.min(xi,E)),y=Math.max(ia,Math.min(xi,y))],F=[w=Math.max(ia,Math.min(xi,w)),U=Math.max(ia,Math.min(xi,U))];tx(N,F,e,t,n,r)?(x||(u.lineStart(),u.point(N[0],N[1])),u.point(F[0],F[1]),$||u.lineEnd(),_=!1):$&&(u.lineStart(),u.point(w,U),_=!1)}E=w,y=U,x=$}return A}}const El=e=>e;var bl=new Gn,xl=new Gn,Rd,Id,_l,Sl,mn={point:Oe,lineStart:Oe,lineEnd:Oe,polygonStart:function(){mn.lineStart=nx,mn.lineEnd=ix},polygonEnd:function(){mn.lineStart=mn.lineEnd=mn.point=Oe,bl.add(St(xl)),xl=new Gn},result:function(){var e=bl/2;return bl=new Gn,e}};function nx(){mn.point=rx}function rx(e,t){mn.point=kd,Rd=_l=e,Id=Sl=t}function kd(e,t){xl.add(Sl*e-_l*t),_l=e,Sl=t}function ix(){kd(Rd,Id)}var Or=1/0,sa=Or,_i=-Or,aa=_i,oa={point:sx,lineStart:Oe,lineEnd:Oe,polygonStart:Oe,polygonEnd:Oe,result:function(){var e=[[Or,sa],[_i,aa]];return _i=aa=-(sa=Or=1/0),e}};function sx(e,t){e<Or&&(Or=e),e>_i&&(_i=e),t<sa&&(sa=t),t>aa&&(aa=t)}var Tl=0,Ol=0,Si=0,la=0,ca=0,wr=0,wl=0,Ml=0,Ti=0,Pd,Nd,Ke,Qe,we={point:Zn,lineStart:$d,lineEnd:Fd,polygonStart:function(){we.lineStart=lx,we.lineEnd=cx},polygonEnd:function(){we.point=Zn,we.lineStart=$d,we.lineEnd=Fd},result:function(){var e=Ti?[wl/Ti,Ml/Ti]:wr?[la/wr,ca/wr]:Si?[Tl/Si,Ol/Si]:[NaN,NaN];return Tl=Ol=Si=la=ca=wr=wl=Ml=Ti=0,e}};function Zn(e,t){Tl+=e,Ol+=t,++Si}function $d(){we.point=ax}function ax(e,t){we.point=ox,Zn(Ke=e,Qe=t)}function ox(e,t){var n=e-Ke,r=t-Qe,i=Ue(n*n+r*r);la+=i*(Ke+e)/2,ca+=i*(Qe+t)/2,wr+=i,Zn(Ke=e,Qe=t)}function Fd(){we.point=Zn}function lx(){we.point=ux}function cx(){Ud(Pd,Nd)}function ux(e,t){we.point=Ud,Zn(Pd=Ke=e,Nd=Qe=t)}function Ud(e,t){var n=e-Ke,r=t-Qe,i=Ue(n*n+r*r);la+=i*(Ke+e)/2,ca+=i*(Qe+t)/2,wr+=i,i=Qe*e-Ke*t,wl+=i*(Ke+e),Ml+=i*(Qe+t),Ti+=i*3,Zn(Ke=e,Qe=t)}function Bd(e){this._context=e}Bd.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,Ee);break}}},result:Oe};var Al=new Gn,Cl,Hd,Gd,Oi,wi,Mi={point:Oe,lineStart:function(){Mi.point=hx},lineEnd:function(){Cl&&Vd(Hd,Gd),Mi.point=Oe},polygonStart:function(){Cl=!0},polygonEnd:function(){Cl=null},result:function(){var e=+Al;return Al=new Gn,e}};function hx(e,t){Mi.point=Vd,Hd=Oi=e,Gd=wi=t}function Vd(e,t){Oi-=e,wi-=t,Al.add(Ue(Oi*Oi+wi*wi)),Oi=e,wi=t}let zd,ua,Wd,Yd;class qd{constructor(t){this._append=t==null?Xd:dx(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!==Wd||this._append!==ua){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`,Wd=r,ua=this._append,Yd=this._,this._=i}this._+=Yd;break}}}result(){const t=this._;return this._="",t.length?t:null}}function Xd(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function dx(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return Xd;if(t!==zd){const n=10**t;zd=t,ua=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 ua}function fx(e,t){let n=3,r=4.5,i,s;function a(o){return o&&(typeof r=="function"&&s.pointRadius(+r.apply(this,arguments)),Sr(o,i(s))),s.result()}return a.area=function(o){return Sr(o,i(mn)),mn.result()},a.measure=function(o){return Sr(o,i(Mi)),Mi.result()},a.bounds=function(o){return Sr(o,i(oa)),oa.result()},a.centroid=function(o){return Sr(o,i(we)),we.result()},a.projection=function(o){return arguments.length?(i=o==null?(e=null,El):(e=o).stream,a):e},a.context=function(o){return arguments.length?(s=o==null?(t=null,new qd(n)):new Bd(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 qd(n)),a},a.projection(e).digits(n).context(t)}function Dl(e){return function(t){var n=new Ll;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Ll(){}Ll.prototype={constructor:Ll,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 Rl(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),Sr(n,e.stream(oa)),t(oa.result()),r!=null&&e.clipExtent(r),e}function jd(e,t,n){return Rl(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 px(e,t,n){return jd(e,[[0,0],t],n)}function gx(e,t,n){return Rl(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 mx(e,t,n){return Rl(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 Zd=16,vx=Ot(30*Nt);function Kd(e,t){return+t?Ex(e,t):yx(e)}function yx(e){return Dl({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Ex(e,t){function n(r,i,s,a,o,l,c,u,d,h,f,p,g,m){var v=c-r,E=u-i,y=v*v+E*E;if(y>4*t&&g--){var x=a+h,S=o+f,_=l+p,A=Ue(x*x+S*S+_*_),L=gn(_/=A),B=St(St(_)-1)<_t||St(s-d)<_t?(s+d)/2:jn(S,x),k=e(B,L),O=k[0],H=k[1],P=O-r,M=H-i,w=E*P-v*M;(w*w/y>t||St((v*P+E*M)/y-.5)>.3||a*h+o*f+l*p<vx)&&(n(r,i,s,a,o,l,O,H,B,x/=A,S/=A,_,g,m),m.point(O,H),n(O,H,B,x,S,_,c,u,d,h,f,p,g,m))}}return function(r){var i,s,a,o,l,c,u,d,h,f,p,g,m={point:v,lineStart:E,lineEnd:x,polygonStart:function(){r.polygonStart(),m.lineStart=S},polygonEnd:function(){r.polygonEnd(),m.lineStart=E}};function v(L,B){L=e(L,B),r.point(L[0],L[1])}function E(){d=NaN,m.point=y,r.lineStart()}function y(L,B){var k=Tr([L,B]),O=e(L,B);n(d,h,u,f,p,g,d=O[0],h=O[1],u=L,f=k[0],p=k[1],g=k[2],Zd,r),r.point(d,h)}function x(){m.point=v,r.lineEnd()}function S(){E(),m.point=_,m.lineEnd=A}function _(L,B){y(i=L,B),s=d,a=h,o=f,l=p,c=g,m.point=y}function A(){n(d,h,u,f,p,g,s,a,i,o,l,c,Zd,r),m.lineEnd=x,x()}return m}}var bx=Dl({point:function(e,t){this.stream.point(e*Nt,t*Nt)}});function xx(e){return Dl({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function _x(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 Qd(e,t,n,r,i,s){if(!s)return _x(e,t,n,r,i);var a=Ot(s),o=bt(s),l=a*e,c=o*e,u=a/e,d=o/e,h=(o*n-a*t)/e,f=(o*t+a*n)/e;function p(g,m){return g*=r,m*=i,[l*g-c*m+t,n-c*g-l*m]}return p.invert=function(g,m){return[r*(u*g-d*m+h),i*(f-d*g-u*m)]},p}function ha(e){return Jd(function(){return e})()}function Jd(e){var t,n=150,r=480,i=250,s=0,a=0,o=0,l=0,c=0,u,d=0,h=1,f=1,p=null,g=Ld,m=null,v,E,y,x=El,S=.5,_,A,L,B,k;function O(w){return L(w[0]*Nt,w[1]*Nt)}function H(w){return w=L.invert(w[0],w[1]),w&&[w[0]*re,w[1]*re]}O.stream=function(w){return B&&k===w?B:B=bx(xx(u)(g(_(x(k=w)))))},O.preclip=function(w){return arguments.length?(g=w,p=void 0,M()):g},O.postclip=function(w){return arguments.length?(x=w,m=v=E=y=null,M()):x},O.clipAngle=function(w){return arguments.length?(g=+w?Jb(p=w*Nt):(p=null,Ld),M()):p*re},O.clipExtent=function(w){return arguments.length?(x=w==null?(m=v=E=y=null,El):ex(m=+w[0][0],v=+w[0][1],E=+w[1][0],y=+w[1][1]),M()):m==null?null:[[m,v],[E,y]]},O.scale=function(w){return arguments.length?(n=+w,P()):n},O.translate=function(w){return arguments.length?(r=+w[0],i=+w[1],P()):[r,i]},O.center=function(w){return arguments.length?(s=w[0]%360*Nt,a=w[1]%360*Nt,P()):[s*re,a*re]},O.rotate=function(w){return arguments.length?(o=w[0]%360*Nt,l=w[1]%360*Nt,c=w.length>2?w[2]%360*Nt:0,P()):[o*re,l*re,c*re]},O.angle=function(w){return arguments.length?(d=w%360*Nt,P()):d*re},O.reflectX=function(w){return arguments.length?(h=w?-1:1,P()):h<0},O.reflectY=function(w){return arguments.length?(f=w?-1:1,P()):f<0},O.precision=function(w){return arguments.length?(_=Kd(A,S=w*w),M()):Ue(S)},O.fitExtent=function(w,U){return jd(O,w,U)},O.fitSize=function(w,U){return px(O,w,U)},O.fitWidth=function(w,U){return gx(O,w,U)},O.fitHeight=function(w,U){return mx(O,w,U)};function P(){var w=Qd(n,0,0,h,f,d).apply(null,t(s,a)),U=Qd(n,r-w[0],i-w[1],h,f,d);return u=_d(o,l,c),A=ml(t,U),L=ml(u,A),_=Kd(A,S),M()}function M(){return B=k=null,O}return function(){return t=e.apply(this,arguments),O.invert=t.invert&&H,P()}}function tf(e){var t=0,n=ft/3,r=Jd(e),i=r(t,n);return i.parallels=function(s){return arguments.length?r(t=s[0]*Nt,n=s[1]*Nt):[t*re,n*re]},i}function Sx(e){var t=Ot(e);function n(r,i){return[r*t,bt(i)/t]}return n.invert=function(r,i){return[r/t,gn(i*t)]},n}function Tx(e,t){var n=bt(e),r=(n+bt(t))/2;if(St(r)<_t)return Sx(e);var i=1+n*(2*r-n),s=Ue(i)/r;function a(o,l){var c=Ue(i-2*r*bt(l))/r;return[c*bt(o*=r),s-c*Ot(o)]}return a.invert=function(o,l){var c=s-l,u=jn(o,St(c))*kn(c);return c*r<0&&(u-=ft*kn(o)*kn(c)),[u/r,gn((i-(o*o+c*c)*r*r)/(2*r))]},a}function ef(){return tf(Tx).scale(155.424).center([0,33.6442])}function Ox(){return ef().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Il(e,t){return[e,Gb(Vb((he+t)/2))]}Il.invert=function(e,t){return[e,2*yd(Hb(t))-he]};function wx(){return Mx(Il).scale(961/Ee)}function Mx(e){var t=ha(e),n=t.center,r=t.scale,i=t.translate,s=t.clipExtent,a=null,o,l,c;t.scale=function(d){return arguments.length?(r(d),u()):r()},t.translate=function(d){return arguments.length?(i(d),u()):i()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(d==null?a=o=l=c=null:(a=+d[0][0],o=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):a==null?null:[[a,o],[l,c]]};function u(){var d=ft*r(),h=t(Wb(t.rotate()).invert([0,0]));return s(a==null?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:e===Il?[[Math.max(h[0]-d,a),o],[Math.min(h[0]+d,l),c]]:[[a,Math.max(h[1]-d,o)],[l,Math.min(h[1]+d,c)]])}return u()}function da(e,t){return[e,t]}da.invert=da;function Ax(){return ha(da).scale(152.63)}function Cx(e,t){var n=Ot(e),r=e===t?bt(e):(n-Ot(t))/(t-e),i=n/r+e;if(St(r)<_t)return da;function s(a,o){var l=i-o,c=r*a;return[l*bt(c),i-l*Ot(c)]}return s.invert=function(a,o){var l=i-o,c=jn(a,St(l))*kn(l);return l*r<0&&(c-=ft*kn(a)*kn(l)),[c/r,i-kn(r)*Ue(a*a+l*l)]},s}function Dx(){return tf(Cx).scale(131.154).center([0,13.9389])}var Ai=1.340264,Ci=-.081106,Di=893e-6,Li=.003796,fa=Ue(3)/2,Lx=12;function nf(e,t){var n=gn(fa*bt(t)),r=n*n,i=r*r*r;return[e*Ot(n)/(fa*(Ai+3*Ci*r+i*(7*Di+9*Li*r))),n*(Ai+Ci*r+i*(Di+Li*r))]}nf.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,s=0,a,o,l;s<Lx&&(o=n*(Ai+Ci*r+i*(Di+Li*r))-t,l=Ai+3*Ci*r+i*(7*Di+9*Li*r),n-=a=o/l,r=n*n,i=r*r*r,!(St(a)<md));++s);return[fa*e*(Ai+3*Ci*r+i*(7*Di+9*Li*r))/Ot(n),gn(bt(n)/fa)]};function Rx(){return ha(nf).scale(177.158)}function rf(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)))]}rf.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(St(i)>_t&&--r>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function Ix(){return ha(rf).scale(175.295)}function kx(e,t){return e.parent===t.parent?1:2}function Px(e){return e.reduce(Nx,0)/e.length}function Nx(e,t){return e+t.x}function $x(e){return 1+e.reduce(Fx,0)}function Fx(e,t){return Math.max(e,t.y)}function Ux(e){for(var t;t=e.children;)e=t[0];return e}function Bx(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Hx(){var e=kx,t=1,n=1,r=!1;function i(s){var a,o=0;s.eachAfter(function(h){var f=h.children;f?(h.x=Px(f),h.y=$x(f)):(h.x=a?o+=e(h,a):0,h.y=0,a=h)});var l=Ux(s),c=Bx(s),u=l.x-e(l,c)/2,d=c.x+e(c,l)/2;return s.eachAfter(r?function(h){h.x=(h.x-s.x)*t,h.y=(s.y-h.y)*n}:function(h){h.x=(h.x-u)/(d-u)*t,h.y=(1-(s.y?h.y/s.y:1))*n})}return i.separation=function(s){return arguments.length?(e=s,i):e},i.size=function(s){return arguments.length?(r=!1,t=+s[0],n=+s[1],i):r?null:[t,n]},i.nodeSize=function(s){return arguments.length?(r=!0,t=+s[0],n=+s[1],i):r?[t,n]:null},i}function Gx(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 Vx(){return this.eachAfter(Gx)}function zx(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function Wx(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 Yx(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 qx(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function Xx(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 jx(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Zx(e){for(var t=this,n=Kx(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 Kx(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 Qx(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Jx(){return Array.from(this)}function t_(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function e_(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*n_(){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 Ri(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=s_)):t===void 0&&(t=i_);for(var n=new Ii(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 Ii(a[o])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(o_)}function r_(){return Ri(this).eachBefore(a_)}function i_(e){return e.children}function s_(e){return Array.isArray(e)?e[1]:null}function a_(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function o_(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Ii(e){this.data=e,this.depth=this.height=0,this.parent=null}Ii.prototype=Ri.prototype={constructor:Ii,count:Vx,each:zx,eachAfter:Yx,eachBefore:Wx,find:qx,sum:Xx,sort:jx,path:Zx,ancestors:Qx,descendants:Jx,leaves:t_,links:e_,copy:r_,[Symbol.iterator]:n_};function l_(e){return e==null?null:sf(e)}function sf(e){if(typeof e!="function")throw new Error;return e}function Kn(){return 0}function Mr(e){return function(){return e}}const c_=1664525,u_=1013904223,af=4294967296;function h_(){let e=1;return()=>(e=(c_*e+u_)%af)/af}function d_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function f_(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 p_(e,t){for(var n=0,r=(e=f_(Array.from(e),t)).length,i=[],s,a;n<r;)s=e[n],a&&of(a,s)?++n:(a=m_(i=g_(i,s)),n=0);return a}function g_(e,t){var n,r;if(kl(t,e))return[t];for(n=0;n<e.length;++n)if(pa(t,e[n])&&kl(ki(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(pa(ki(e[n],e[r]),t)&&pa(ki(e[n],t),e[r])&&pa(ki(e[r],t),e[n])&&kl(lf(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function pa(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 of(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 kl(e,t){for(var n=0;n<t.length;++n)if(!of(e,t[n]))return!1;return!0}function m_(e){switch(e.length){case 1:return v_(e[0]);case 2:return ki(e[0],e[1]);case 3:return lf(e[0],e[1],e[2])}}function v_(e){return{x:e.x,y:e.y,r:e.r}}function ki(e,t){var n=e.x,r=e.y,i=e.r,s=t.x,a=t.y,o=t.r,l=s-n,c=a-r,u=o-i,d=Math.sqrt(l*l+c*c);return{x:(n+s+l/d*u)/2,y:(r+a+c/d*u)/2,r:(d+i+o)/2}}function lf(e,t,n){var r=e.x,i=e.y,s=e.r,a=t.x,o=t.y,l=t.r,c=n.x,u=n.y,d=n.r,h=r-a,f=r-c,p=i-o,g=i-u,m=l-s,v=d-s,E=r*r+i*i-s*s,y=E-a*a-o*o+l*l,x=E-c*c-u*u+d*d,S=f*p-h*g,_=(p*x-g*y)/(S*2)-r,A=(g*m-p*v)/S,L=(f*y-h*x)/(S*2)-i,B=(h*v-f*m)/S,k=A*A+B*B-1,O=2*(s+_*A+L*B),H=_*_+L*L-s*s,P=-(Math.abs(k)>1e-6?(O+Math.sqrt(O*O-4*k*H))/(2*k):H/O);return{x:r+_+A*P,y:i+L+B*P,r:P}}function cf(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 uf(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 hf(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 ga(e){this._=e,this.next=null,this.previous=null}function y_(e,t){if(!(s=(e=d_(e)).length))return 0;var n,r,i,s,a,o,l,c,u,d,h;if(n=e[0],n.x=0,n.y=0,!(s>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(s>2))return n.r+r.r;cf(r,n,i=e[2]),n=new ga(n),r=new ga(r),i=new ga(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<s;++l){cf(n._,r._,i=e[l]),i=new ga(i),c=r.next,u=n.previous,d=r._.r,h=n._.r;do if(d<=h){if(uf(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue t}d+=c._.r,c=c.next}else{if(uf(u._,i._)){n=u,n.next=r,r.previous=n,--l;continue t}h+=u._.r,u=u.previous}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=hf(n);(i=i.next)!==r;)(o=hf(i))<a&&(n=i,a=o);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=p_(n,t),l=0;l<s;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function E_(e){return Math.sqrt(e.value)}function b_(){var e=null,t=1,n=1,r=Kn;function i(s){const a=h_();return s.x=t/2,s.y=n/2,e?s.eachBefore(df(e)).eachAfter(Pl(r,.5,a)).eachBefore(ff(1)):s.eachBefore(df(E_)).eachAfter(Pl(Kn,1,a)).eachAfter(Pl(r,s.r/Math.min(t,n),a)).eachBefore(ff(Math.min(t,n)/(2*s.r))),s}return i.radius=function(s){return arguments.length?(e=l_(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:Mr(+s),i):r},i}function df(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Pl(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=y_(i,n),o)for(s=0;s<a;++s)i[s].r-=o;r.r=l+o}}}function ff(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 x_(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function __(e,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 S_(e,t){return e.parent===t.parent?1:2}function Nl(e){var t=e.children;return t?t[0]:e.t}function $l(e){var t=e.children;return t?t[t.length-1]:e.t}function T_(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 O_(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 w_(e,t,n){return e.a.parent===t.parent?e.a:n}function ma(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}ma.prototype=Object.create(Ii.prototype);function M_(e){for(var t=new ma(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 ma(s[a],a)),i.parent=n;return(t.parent=new ma(null,0)).children=[t],t}function A_(){var e=S_,t=1,n=1,r=null;function i(c){var u=M_(c);if(u.eachAfter(s),u.parent.m=-u.z,u.eachBefore(a),r)c.eachBefore(l);else{var d=c,h=c,f=c;c.eachBefore(function(E){E.x<d.x&&(d=E),E.x>h.x&&(h=E),E.depth>f.depth&&(f=E)});var p=d===h?1:e(d,h)/2,g=p-d.x,m=t/(h.x+p+g),v=n/(f.depth||1);c.eachBefore(function(E){E.x=(E.x+g)*m,E.y=E.depth*v})}return c}function s(c){var u=c.children,d=c.parent.children,h=c.i?d[c.i-1]:null;if(u){O_(c);var f=(u[0].z+u[u.length-1].z)/2;h?(c.z=h.z+e(c._,h._),c.m=c.z-f):c.z=f}else h&&(c.z=h.z+e(c._,h._));c.parent.A=o(c,h,c.parent.A||d[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function o(c,u,d){if(u){for(var h=c,f=c,p=u,g=h.parent.children[0],m=h.m,v=f.m,E=p.m,y=g.m,x;p=$l(p),h=Nl(h),p&&h;)g=Nl(g),f=$l(f),f.a=c,x=p.z+E-h.z-m+e(p._,h._),x>0&&(T_(w_(p,c,d),c,x),m+=x,v+=x),E+=p.m,m+=h.m,y+=g.m,v+=f.m;p&&!$l(f)&&(f.t=p,f.m+=E-v),h&&!Nl(g)&&(g.t=h,g.m+=m-y,d=c)}return d}function l(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function C_(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 D_=(1+Math.sqrt(5))/2;function L_(e,t,n,r,i,s){for(var a=[],o=t.children,l,c,u=0,d=0,h=o.length,f,p,g=t.value,m,v,E,y,x,S,_;u<h;){f=i-n,p=s-r;do m=o[d++].value;while(!m&&d<h);for(v=E=m,S=Math.max(p/f,f/p)/(g*e),_=m*m*S,x=Math.max(E/_,_/v);d<h;++d){if(m+=c=o[d].value,c<v&&(v=c),c>E&&(E=c),_=m*m*S,y=Math.max(E/_,_/v),y>x){m-=c;break}x=y}a.push(l={value:m,dice:f<p,children:o.slice(u,d)}),l.dice?__(l,n,r,i,g?r+=p*m/g:s):C_(l,n,r,g?n+=f*m/g:i,s),g-=m,u=d}return a}const R_=function e(t){function n(r,i,s,a,o){L_(t,r,i,s,a,o)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(D_);function I_(){var e=R_,t=!1,n=1,r=1,i=[0],s=Kn,a=Kn,o=Kn,l=Kn,c=Kn;function u(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],t&&h.eachBefore(x_),h}function d(h){var f=i[h.depth],p=h.x0+f,g=h.y0+f,m=h.x1-f,v=h.y1-f;m<p&&(p=m=(p+m)/2),v<g&&(g=v=(g+v)/2),h.x0=p,h.y0=g,h.x1=m,h.y1=v,h.children&&(f=i[h.depth+1]=s(h)/2,p+=c(h)-f,g+=a(h)-f,m-=o(h)-f,v-=l(h)-f,m<p&&(p=m=(p+m)/2),v<g&&(g=v=(g+v)/2),e(h,p,g,m,v))}return u.round=function(h){return arguments.length?(t=!!h,u):t},u.size=function(h){return arguments.length?(n=+h[0],r=+h[1],u):[n,r]},u.tile=function(h){return arguments.length?(e=sf(h),u):e},u.padding=function(h){return arguments.length?u.paddingInner(h).paddingOuter(h):u.paddingInner()},u.paddingInner=function(h){return arguments.length?(s=typeof h=="function"?h:Mr(+h),u):s},u.paddingOuter=function(h){return arguments.length?u.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):u.paddingTop()},u.paddingTop=function(h){return arguments.length?(a=typeof h=="function"?h:Mr(+h),u):a},u.paddingRight=function(h){return arguments.length?(o=typeof h=="function"?h:Mr(+h),u):o},u.paddingBottom=function(h){return arguments.length?(l=typeof h=="function"?h:Mr(+h),u):l},u.paddingLeft=function(h){return arguments.length?(c=typeof h=="function"?h:Mr(+h),u):c},u}function Ar(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const pf=Symbol("implicit");function va(){var e=new sh,t=[],n=[],r=pf;function i(s){let a=e.get(s);if(a===void 0){if(r!==pf)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 sh;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 va(t,n).unknown(r)},Ar.apply(i,arguments),i}function Pi(){var e=va().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,a,o=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,f=i<r,p=f?i:r,g=f?r:i;s=(g-p)/Math.max(1,h-l+c*2),o&&(s=Math.floor(s)),p+=(g-p-s*(h-l))*u,a=s*(1-l),o&&(p=Math.round(p),a=Math.round(a));var m=G0(h).map(function(v){return p+s*v});return n(f?m.reverse():m)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,o=!0,d()},e.bandwidth=function(){return a},e.step=function(){return s},e.round=function(h){return arguments.length?(o=!!h,d()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return Pi(t(),[r,i]).round(o).paddingInner(l).paddingOuter(c).align(u)},Ar.apply(d(),arguments)}function k_(e){return function(){return e}}function P_(e){return+e}var gf=[0,1];function Cr(e){return e}function Fl(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:k_(isNaN(t)?NaN:.5)}function N_(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function $_(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=Fl(i,r),s=n(a,s)):(r=Fl(r,i),s=n(s,a)),function(o){return s(r(o))}}function F_(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]=Fl(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 Ul(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function mf(){var e=gf,t=gf,n=gi,r,i,s,a=Cr,o,l,c;function u(){var h=Math.min(e.length,t.length);return a!==Cr&&(a=N_(e[0],e[h-1])),o=h>2?F_:$_,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=o(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(i((c||(c=o(t,e.map(r),ye)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,P_),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Uh,u()},d.clamp=function(h){return arguments.length?(a=h?!0:Cr,u()):a!==Cr},d.interpolate=function(h){return arguments.length?(n=h,u()):n},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,f){return r=h,i=f,u()}}function vf(){return mf()(Cr,Cr)}function U_(e,t,n,r){var i=Io(e,t,n),s;switch(r=bi(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=Ub(i,a))&&(r.precision=s),gd(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=Bb(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=Fb(i))&&(r.precision=s-(r.type==="%")*2);break}}return hl(r)}function yf(e){var t=e.domain;return e.ticks=function(n){var r=t();return As(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return U_(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=mr(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=vf();return e.copy=function(){return Ul(e,Be())},Ar.apply(e,arguments),yf(e)}function Ef(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 bf(e){return Math.log(e)}function xf(e){return Math.exp(e)}function B_(e){return-Math.log(-e)}function H_(e){return-Math.exp(-e)}function G_(e){return isFinite(e)?+("1e"+e):e<0?0:e}function V_(e){return e===10?G_:e===Math.E?Math.exp:t=>Math.pow(e,t)}function z_(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 _f(e){return(t,n)=>-e(-t,n)}function W_(e){const t=e(bf,xf),n=t.domain;let r=10,i,s;function a(){return i=z_(r),s=V_(r),n()[0]<0?(i=_f(i),s=_f(s),e(B_,H_)):e(bf,xf),t}return t.base=function(o){return arguments.length?(r=+o,a()):r},t.domain=function(o){return arguments.length?(n(o),a()):n()},t.ticks=o=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=i(c),f=i(u),p,g;const m=o==null?10:+o;let v=[];if(!(r%1)&&f-h<m){if(h=Math.floor(h),f=Math.ceil(f),c>0){for(;h<=f;++h)for(p=1;p<r;++p)if(g=h<0?p/s(-h):p*s(h),!(g<c)){if(g>u)break;v.push(g)}}else for(;h<=f;++h)for(p=r-1;p>=1;--p)if(g=h>0?p/s(-h):p*s(h),!(g<c)){if(g>u)break;v.push(g)}v.length*2<m&&(v=As(c,u,m))}else v=As(h,f,Math.min(f-h,m)).map(s);return d?v.reverse():v},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=bi(l)).precision==null&&(l.trim=!0),l=hl(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return u=>{let d=u/s(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(Ef(n(),{floor:o=>s(Math.floor(i(o))),ceil:o=>s(Math.ceil(i(o)))})),t}function Sf(){const e=W_(mf()).domain([1,10]);return e.copy=()=>Ul(e,Sf()).base(e.base()),Ar.apply(e,arguments),e}function Bl(){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 Bl().domain([e,t]).range(i).unknown(s)},Ar.apply(yf(a),arguments)}const Hl=new Date,Gl=new Date;function zt(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=>zt(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)=>(Hl.setTime(+s),Gl.setTime(+a),e(Hl),e(Gl),Math.floor(n(Hl,Gl))),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 ya=zt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ya.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?zt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):ya),ya.range;const vn=1e3,Me=vn*60,yn=Me*60,En=yn*24,Vl=En*7,Tf=En*30,zl=En*365,Dr=zt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*vn)},(e,t)=>(t-e)/vn,e=>e.getUTCSeconds());Dr.range;const Wl=zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*vn)},(e,t)=>{e.setTime(+e+t*Me)},(e,t)=>(t-e)/Me,e=>e.getMinutes());Wl.range,zt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Me)},(e,t)=>(t-e)/Me,e=>e.getUTCMinutes()).range;const Yl=zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*vn-e.getMinutes()*Me)},(e,t)=>{e.setTime(+e+t*yn)},(e,t)=>(t-e)/yn,e=>e.getHours());Yl.range,zt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*yn)},(e,t)=>(t-e)/yn,e=>e.getUTCHours()).range;const Ni=zt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Me)/En,e=>e.getDate()-1);Ni.range;const ql=zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/En,e=>e.getUTCDate()-1);ql.range,zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/En,e=>Math.floor(e/En)).range;function Qn(e){return zt(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())*Me)/Vl)}const Ea=Qn(0),ba=Qn(1),Y_=Qn(2),q_=Qn(3),Lr=Qn(4),X_=Qn(5),j_=Qn(6);Ea.range,ba.range,Y_.range,q_.range,Lr.range,X_.range,j_.range;function Jn(e){return zt(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)/Vl)}const Of=Jn(0),xa=Jn(1),Z_=Jn(2),K_=Jn(3),Rr=Jn(4),Q_=Jn(5),J_=Jn(6);Of.range,xa.range,Z_.range,K_.range,Rr.range,Q_.range,J_.range;const Xl=zt(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());Xl.range,zt(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 bn=zt(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());bn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zt(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)}),bn.range;const tr=zt(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());tr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zt(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)}),tr.range;function tS(e,t,n,r,i,s){const a=[[Dr,1,vn],[Dr,5,5*vn],[Dr,15,15*vn],[Dr,30,30*vn],[s,1,Me],[s,5,5*Me],[s,15,15*Me],[s,30,30*Me],[i,1,yn],[i,3,3*yn],[i,6,6*yn],[i,12,12*yn],[r,1,En],[r,2,2*En],[n,1,Vl],[t,1,Tf],[t,3,3*Tf],[e,1,zl]];function o(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const f=d&&typeof d.range=="function"?d:l(c,u,d),p=f?f.range(c,+u+1):[];return h?p.reverse():p}function l(c,u,d){const h=Math.abs(u-c)/d,f=Do(([,,m])=>m).right(a,h);if(f===a.length)return e.every(Io(c/zl,u/zl,d));if(f===0)return ya.every(Math.max(Io(c,u,d),1));const[p,g]=a[h/a[f-1][2]<a[f][2]/h?f-1:f];return p.every(g)}return[o,l]}const[eS,nS]=tS(bn,Xl,Ea,Ni,Yl,Wl);function jl(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 Zl(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 $i(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function rS(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=Fi(i),u=Ui(i),d=Fi(s),h=Ui(s),f=Fi(a),p=Ui(a),g=Fi(o),m=Ui(o),v=Fi(l),E=Ui(l),y={a:$,A:N,b:F,B:j,c:null,d:Lf,e:Lf,f:wS,g:NS,G:FS,H:SS,I:TS,j:OS,L:Rf,m:MS,M:AS,p:q,q:ot,Q:Ff,s:Uf,S:CS,u:DS,U:LS,V:RS,w:IS,W:kS,x:null,X:null,y:PS,Y:$S,Z:US,"%":$f},x={a:it,A:mt,b:st,B:Z,c:null,d:kf,e:kf,f:VS,g:JS,G:eT,H:BS,I:HS,j:GS,L:Pf,m:zS,M:WS,p:et,q:vt,Q:Ff,s:Uf,S:YS,u:qS,U:XS,V:jS,w:ZS,W:KS,x:null,X:null,y:QS,Y:tT,Z:nT,"%":$f},S={a:k,A:O,b:H,B:P,c:M,d:Cf,e:Cf,f:ES,g:Af,G:Mf,H:Df,I:Df,j:gS,L:yS,m:pS,M:mS,p:B,q:fS,Q:xS,s:_S,S:vS,u:lS,U:cS,V:uS,w:oS,W:hS,x:w,X:U,y:Af,Y:Mf,Z:dS,"%":bS};y.x=_(n,y),y.X=_(r,y),y.c=_(t,y),x.x=_(n,x),x.X=_(r,x),x.c=_(t,x);function _(Y,K){return function(ut){var C=[],z=-1,V=0,At=Y.length,Wt,rt,Ct;for(ut instanceof Date||(ut=new Date(+ut));++z<At;)Y.charCodeAt(z)===37&&(C.push(Y.slice(V,z)),(rt=wf[Wt=Y.charAt(++z)])!=null?Wt=Y.charAt(++z):rt=Wt==="e"?" ":"0",(Ct=K[Wt])&&(Wt=Ct(ut,rt)),C.push(Wt),V=z+1);return C.push(Y.slice(V,z)),C.join("")}}function A(Y,K){return function(ut){var C=$i(1900,void 0,1),z=L(C,Y,ut+="",0),V,At;if(z!=ut.length)return null;if("Q"in C)return new Date(C.Q);if("s"in C)return new Date(C.s*1e3+("L"in C?C.L:0));if(K&&!("Z"in C)&&(C.Z=0),"p"in C&&(C.H=C.H%12+C.p*12),C.m===void 0&&(C.m="q"in C?C.q:0),"V"in C){if(C.V<1||C.V>53)return null;"w"in C||(C.w=1),"Z"in C?(V=Zl($i(C.y,0,1)),At=V.getUTCDay(),V=At>4||At===0?xa.ceil(V):xa(V),V=ql.offset(V,(C.V-1)*7),C.y=V.getUTCFullYear(),C.m=V.getUTCMonth(),C.d=V.getUTCDate()+(C.w+6)%7):(V=jl($i(C.y,0,1)),At=V.getDay(),V=At>4||At===0?ba.ceil(V):ba(V),V=Ni.offset(V,(C.V-1)*7),C.y=V.getFullYear(),C.m=V.getMonth(),C.d=V.getDate()+(C.w+6)%7)}else("W"in C||"U"in C)&&("w"in C||(C.w="u"in C?C.u%7:"W"in C?1:0),At="Z"in C?Zl($i(C.y,0,1)).getUTCDay():jl($i(C.y,0,1)).getDay(),C.m=0,C.d="W"in C?(C.w+6)%7+C.W*7-(At+5)%7:C.w+C.U*7-(At+6)%7);return"Z"in C?(C.H+=C.Z/100|0,C.M+=C.Z%100,Zl(C)):jl(C)}}function L(Y,K,ut,C){for(var z=0,V=K.length,At=ut.length,Wt,rt;z<V;){if(C>=At)return-1;if(Wt=K.charCodeAt(z++),Wt===37){if(Wt=K.charAt(z++),rt=S[Wt in wf?K.charAt(z++):Wt],!rt||(C=rt(Y,ut,C))<0)return-1}else if(Wt!=ut.charCodeAt(C++))return-1}return C}function B(Y,K,ut){var C=c.exec(K.slice(ut));return C?(Y.p=u.get(C[0].toLowerCase()),ut+C[0].length):-1}function k(Y,K,ut){var C=f.exec(K.slice(ut));return C?(Y.w=p.get(C[0].toLowerCase()),ut+C[0].length):-1}function O(Y,K,ut){var C=d.exec(K.slice(ut));return C?(Y.w=h.get(C[0].toLowerCase()),ut+C[0].length):-1}function H(Y,K,ut){var C=v.exec(K.slice(ut));return C?(Y.m=E.get(C[0].toLowerCase()),ut+C[0].length):-1}function P(Y,K,ut){var C=g.exec(K.slice(ut));return C?(Y.m=m.get(C[0].toLowerCase()),ut+C[0].length):-1}function M(Y,K,ut){return L(Y,t,K,ut)}function w(Y,K,ut){return L(Y,n,K,ut)}function U(Y,K,ut){return L(Y,r,K,ut)}function $(Y){return a[Y.getDay()]}function N(Y){return s[Y.getDay()]}function F(Y){return l[Y.getMonth()]}function j(Y){return o[Y.getMonth()]}function q(Y){return i[+(Y.getHours()>=12)]}function ot(Y){return 1+~~(Y.getMonth()/3)}function it(Y){return a[Y.getUTCDay()]}function mt(Y){return s[Y.getUTCDay()]}function st(Y){return l[Y.getUTCMonth()]}function Z(Y){return o[Y.getUTCMonth()]}function et(Y){return i[+(Y.getUTCHours()>=12)]}function vt(Y){return 1+~~(Y.getUTCMonth()/3)}return{format:function(Y){var K=_(Y+="",y);return K.toString=function(){return Y},K},parse:function(Y){var K=A(Y+="",!1);return K.toString=function(){return Y},K},utcFormat:function(Y){var K=_(Y+="",x);return K.toString=function(){return Y},K},utcParse:function(Y){var K=A(Y+="",!0);return K.toString=function(){return Y},K}}}var wf={"-":"",_:" ",0:"0"},Yt=/^\s*\d+/,iS=/^%/,sS=/[\\^$*+?|[\]().{}]/g;function Et(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 aS(e){return e.replace(sS,"\\$&")}function Fi(e){return new RegExp("^(?:"+e.map(aS).join("|")+")","i")}function Ui(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function oS(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function lS(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function cS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function uS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function hS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Mf(e,t,n){var r=Yt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Af(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function dS(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 fS(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function pS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Cf(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function gS(e,t,n){var r=Yt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Df(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function mS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function vS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function yS(e,t,n){var r=Yt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ES(e,t,n){var r=Yt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function bS(e,t,n){var r=iS.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function xS(e,t,n){var r=Yt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function _S(e,t,n){var r=Yt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Lf(e,t){return Et(e.getDate(),t,2)}function SS(e,t){return Et(e.getHours(),t,2)}function TS(e,t){return Et(e.getHours()%12||12,t,2)}function OS(e,t){return Et(1+Ni.count(bn(e),e),t,3)}function Rf(e,t){return Et(e.getMilliseconds(),t,3)}function wS(e,t){return Rf(e,t)+"000"}function MS(e,t){return Et(e.getMonth()+1,t,2)}function AS(e,t){return Et(e.getMinutes(),t,2)}function CS(e,t){return Et(e.getSeconds(),t,2)}function DS(e){var t=e.getDay();return t===0?7:t}function LS(e,t){return Et(Ea.count(bn(e)-1,e),t,2)}function If(e){var t=e.getDay();return t>=4||t===0?Lr(e):Lr.ceil(e)}function RS(e,t){return e=If(e),Et(Lr.count(bn(e),e)+(bn(e).getDay()===4),t,2)}function IS(e){return e.getDay()}function kS(e,t){return Et(ba.count(bn(e)-1,e),t,2)}function PS(e,t){return Et(e.getFullYear()%100,t,2)}function NS(e,t){return e=If(e),Et(e.getFullYear()%100,t,2)}function $S(e,t){return Et(e.getFullYear()%1e4,t,4)}function FS(e,t){var n=e.getDay();return e=n>=4||n===0?Lr(e):Lr.ceil(e),Et(e.getFullYear()%1e4,t,4)}function US(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Et(t/60|0,"0",2)+Et(t%60,"0",2)}function kf(e,t){return Et(e.getUTCDate(),t,2)}function BS(e,t){return Et(e.getUTCHours(),t,2)}function HS(e,t){return Et(e.getUTCHours()%12||12,t,2)}function GS(e,t){return Et(1+ql.count(tr(e),e),t,3)}function Pf(e,t){return Et(e.getUTCMilliseconds(),t,3)}function VS(e,t){return Pf(e,t)+"000"}function zS(e,t){return Et(e.getUTCMonth()+1,t,2)}function WS(e,t){return Et(e.getUTCMinutes(),t,2)}function YS(e,t){return Et(e.getUTCSeconds(),t,2)}function qS(e){var t=e.getUTCDay();return t===0?7:t}function XS(e,t){return Et(Of.count(tr(e)-1,e),t,2)}function Nf(e){var t=e.getUTCDay();return t>=4||t===0?Rr(e):Rr.ceil(e)}function jS(e,t){return e=Nf(e),Et(Rr.count(tr(e),e)+(tr(e).getUTCDay()===4),t,2)}function ZS(e){return e.getUTCDay()}function KS(e,t){return Et(xa.count(tr(e)-1,e),t,2)}function QS(e,t){return Et(e.getUTCFullYear()%100,t,2)}function JS(e,t){return e=Nf(e),Et(e.getUTCFullYear()%100,t,2)}function tT(e,t){return Et(e.getUTCFullYear()%1e4,t,4)}function eT(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Rr(e):Rr.ceil(e),Et(e.getUTCFullYear()%1e4,t,4)}function nT(){return"+0000"}function $f(){return"%"}function Ff(e){return+e}function Uf(e){return Math.floor(+e/1e3)}var Ir,Bf;rT({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 rT(e){return Ir=rS(e),Bf=Ir.format,Ir.parse,Ir.utcFormat,Ir.utcParse,Ir}function iT(e){return new Date(e)}function sT(e){return e instanceof Date?+e:+new Date(+e)}function Hf(e,t,n,r,i,s,a,o,l,c){var u=vf(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),v=c("%a %d"),E=c("%b %d"),y=c("%B"),x=c("%Y");function S(_){return(l(_)<_?f:o(_)<_?p:a(_)<_?g:s(_)<_?m:r(_)<_?i(_)<_?v:E:n(_)<_?y:x)(_)}return u.invert=function(_){return new Date(d(_))},u.domain=function(_){return arguments.length?h(Array.from(_,sT)):h().map(iT)},u.ticks=function(_){var A=h();return e(A[0],A[A.length-1],_??10)},u.tickFormat=function(_,A){return A==null?S:c(A)},u.nice=function(_){var A=h();return(!_||typeof _.range!="function")&&(_=t(A[0],A[A.length-1],_??10)),_?h(Ef(A,_)):u},u.copy=function(){return Ul(u,Hf(e,t,n,r,i,s,a,o,l,c))},u}function Gf(){return Ar.apply(Hf(eS,nS,bn,Xl,Ea,Ni,Yl,Wl,Dr,Bf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function dt(e){return function(){return e}}const Vf=Math.abs,Jt=Math.atan2,er=Math.cos,aT=Math.max,Kl=Math.min,Je=Math.sin,kr=Math.sqrt,te=1e-12,Bi=Math.PI,_a=Bi/2,Sa=2*Bi;function oT(e){return e>1?0:e<-1?Bi:Math.acos(e)}function zf(e){return e>=1?_a:e<=-1?-_a:Math.asin(e)}function Ta(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 Cb(t)}function lT(e){return e.innerRadius}function cT(e){return e.outerRadius}function uT(e){return e.startAngle}function hT(e){return e.endAngle}function dT(e){return e&&e.padAngle}function fT(e,t,n,r,i,s,a,o){var l=n-e,c=r-t,u=a-i,d=o-s,h=d*l-u*c;if(!(h*h<te))return h=(u*(t-s)-d*(e-i))/h,[e+h*l,t+h*c]}function Oa(e,t,n,r,i,s,a){var o=e-n,l=t-r,c=(a?s:-s)/kr(o*o+l*l),u=c*l,d=-c*o,h=e+u,f=t+d,p=n+u,g=r+d,m=(h+p)/2,v=(f+g)/2,E=p-h,y=g-f,x=E*E+y*y,S=i-s,_=h*g-p*f,A=(y<0?-1:1)*kr(aT(0,S*S*x-_*_)),L=(_*y-E*A)/x,B=(-_*E-y*A)/x,k=(_*y+E*A)/x,O=(-_*E+y*A)/x,H=L-m,P=B-v,M=k-m,w=O-v;return H*H+P*P>M*M+w*w&&(L=k,B=O),{cx:L,cy:B,x01:-u,y01:-d,x11:L*(i/S-1),y11:B*(i/S-1)}}function Hi(){var e=lT,t=cT,n=dt(0),r=null,i=uT,s=hT,a=dT,o=null,l=Ta(c);function c(){var u,d,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-_a,g=s.apply(this,arguments)-_a,m=Vf(g-p),v=g>p;if(o||(o=u=l()),f<h&&(d=f,f=h,h=d),!(f>te))o.moveTo(0,0);else if(m>Sa-te)o.moveTo(f*er(p),f*Je(p)),o.arc(0,0,f,p,g,!v),h>te&&(o.moveTo(h*er(g),h*Je(g)),o.arc(0,0,h,g,p,v));else{var E=p,y=g,x=p,S=g,_=m,A=m,L=a.apply(this,arguments)/2,B=L>te&&(r?+r.apply(this,arguments):kr(h*h+f*f)),k=Kl(Vf(f-h)/2,+n.apply(this,arguments)),O=k,H=k,P,M;if(B>te){var w=zf(B/h*Je(L)),U=zf(B/f*Je(L));(_-=w*2)>te?(w*=v?1:-1,x+=w,S-=w):(_=0,x=S=(p+g)/2),(A-=U*2)>te?(U*=v?1:-1,E+=U,y-=U):(A=0,E=y=(p+g)/2)}var $=f*er(E),N=f*Je(E),F=h*er(S),j=h*Je(S);if(k>te){var q=f*er(y),ot=f*Je(y),it=h*er(x),mt=h*Je(x),st;if(m<Bi)if(st=fT($,N,it,mt,q,ot,F,j)){var Z=$-st[0],et=N-st[1],vt=q-st[0],Y=ot-st[1],K=1/Je(oT((Z*vt+et*Y)/(kr(Z*Z+et*et)*kr(vt*vt+Y*Y)))/2),ut=kr(st[0]*st[0]+st[1]*st[1]);O=Kl(k,(h-ut)/(K-1)),H=Kl(k,(f-ut)/(K+1))}else O=H=0}A>te?H>te?(P=Oa(it,mt,$,N,f,H,v),M=Oa(q,ot,F,j,f,H,v),o.moveTo(P.cx+P.x01,P.cy+P.y01),H<k?o.arc(P.cx,P.cy,H,Jt(P.y01,P.x01),Jt(M.y01,M.x01),!v):(o.arc(P.cx,P.cy,H,Jt(P.y01,P.x01),Jt(P.y11,P.x11),!v),o.arc(0,0,f,Jt(P.cy+P.y11,P.cx+P.x11),Jt(M.cy+M.y11,M.cx+M.x11),!v),o.arc(M.cx,M.cy,H,Jt(M.y11,M.x11),Jt(M.y01,M.x01),!v))):(o.moveTo($,N),o.arc(0,0,f,E,y,!v)):o.moveTo($,N),!(h>te)||!(_>te)?o.lineTo(F,j):O>te?(P=Oa(F,j,q,ot,h,-O,v),M=Oa($,N,it,mt,h,-O,v),o.lineTo(P.cx+P.x01,P.cy+P.y01),O<k?o.arc(P.cx,P.cy,O,Jt(P.y01,P.x01),Jt(M.y01,M.x01),!v):(o.arc(P.cx,P.cy,O,Jt(P.y01,P.x01),Jt(P.y11,P.x11),!v),o.arc(0,0,h,Jt(P.cy+P.y11,P.cx+P.x11),Jt(M.cy+M.y11,M.cx+M.x11),v),o.arc(M.cx,M.cy,O,Jt(M.y11,M.x11),Jt(M.y01,M.x01),!v))):o.arc(0,0,h,S,x,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,d=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-Bi/2;return[er(d)*u,Je(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:dt(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:dt(+u),c):t},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:dt(+u),c):n},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:dt(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:dt(+u),c):i},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:dt(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:dt(+u),c):a},c.context=function(u){return arguments.length?(o=u??null,c):o},c}var pT=Array.prototype.slice;function wa(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Wf(e){this._context=e}Wf.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 Ma(e){return new Wf(e)}function Ql(e){return e[0]}function Jl(e){return e[1]}function Gi(e,t){var n=dt(!0),r=null,i=Ma,s=null,a=Ta(o);e=typeof e=="function"?e:e===void 0?Ql:dt(e),t=typeof t=="function"?t:t===void 0?Jl:dt(t);function o(l){var c,u=(l=wa(l)).length,d,h=!1,f;for(r==null&&(s=i(f=a())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+e(d,c,l),+t(d,c,l));if(f)return s=null,f+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:dt(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:dt(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:dt(!!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 tc(e,t,n){var r=null,i=dt(!0),s=null,a=Ma,o=null,l=Ta(c);e=typeof e=="function"?e:e===void 0?Ql:dt(+e),t=typeof t=="function"?t:dt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Jl:dt(+n);function c(d){var h,f,p,g=(d=wa(d)).length,m,v=!1,E,y=new Array(g),x=new Array(g);for(s==null&&(o=a(E=l())),h=0;h<=g;++h){if(!(h<g&&i(m=d[h],h,d))===v)if(v=!v)f=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=h-1;p>=f;--p)o.point(y[p],x[p]);o.lineEnd(),o.areaEnd()}v&&(y[h]=+e(m,h,d),x[h]=+t(m,h,d),o.point(r?+r(m,h,d):y[h],n?+n(m,h,d):x[h]))}if(E)return o=null,E+""||null}function u(){return Gi().defined(i).curve(a).context(s)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:dt(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:dt(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:dt(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:dt(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:dt(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:dt(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:dt(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,s!=null&&(o=a(s)),c):a},c.context=function(d){return arguments.length?(d==null?s=o=null:o=a(s=d),c):s},c}function gT(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function mT(e){return e}function vT(){var e=mT,t=gT,n=null,r=dt(0),i=dt(Sa),s=dt(0);function a(o){var l,c=(o=wa(o)).length,u,d,h=0,f=new Array(c),p=new Array(c),g=+r.apply(this,arguments),m=Math.min(Sa,Math.max(-Sa,i.apply(this,arguments)-g)),v,E=Math.min(Math.abs(m)/c,s.apply(this,arguments)),y=E*(m<0?-1:1),x;for(l=0;l<c;++l)(x=p[f[l]=l]=+e(o[l],l,o))>0&&(h+=x);for(t!=null?f.sort(function(S,_){return t(p[S],p[_])}):n!=null&&f.sort(function(S,_){return n(o[S],o[_])}),l=0,d=h?(m-c*y)/h:0;l<c;++l,g=v)u=f[l],x=p[u],v=g+(x>0?x*d:0)+y,p[u]={data:o[u],index:l,value:x,startAngle:g,endAngle:v,padAngle:E};return p}return a.value=function(o){return arguments.length?(e=typeof o=="function"?o:dt(+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:dt(+o),a):r},a.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:dt(+o),a):i},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:dt(+o),a):s},a}var yT=qf(Ma);function Yf(e){this._curve=e}Yf.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 qf(e){function t(n){return new Yf(e(n))}return t._curve=e,t}function ET(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(qf(n)):t()._curve},e}function bT(){return ET(Gi().curve(yT))}class xT{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 _T(e){return new xT(e,!0)}function ST(e){return e.source}function TT(e){return e.target}function OT(e){let t=ST,n=TT,r=Ql,i=Jl,s=null,a=null,o=Ta(l);function l(){let c;const u=pT.call(arguments),d=t.apply(this,u),h=n.apply(this,u);if(s==null&&(a=e(c=o())),a.lineStart(),u[0]=d,a.point(+r.apply(this,u),+i.apply(this,u)),u[0]=h,a.point(+r.apply(this,u),+i.apply(this,u)),a.lineEnd(),c)return a=null,c+""||null}return l.source=function(c){return arguments.length?(t=c,l):t},l.target=function(c){return arguments.length?(n=c,l):n},l.x=function(c){return arguments.length?(r=typeof c=="function"?c:dt(+c),l):r},l.y=function(c){return arguments.length?(i=typeof c=="function"?c:dt(+c),l):i},l.context=function(c){return arguments.length?(c==null?s=a=null:a=e(s=c),l):s},l}function wT(){return OT(_T)}function Pn(){}function Aa(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 Ca(e){this._context=e}Ca.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:Aa(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:Aa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MT(e){return new Ca(e)}function Xf(e){this._context=e}Xf.prototype={areaStart:Pn,areaEnd:Pn,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:Aa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function AT(e){return new Xf(e)}function jf(e){this._context=e}jf.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:Aa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function CT(e){return new jf(e)}function Zf(e,t){this._basis=new Ca(e),this._beta=t}Zf.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 DT=function e(t){function n(r){return t===1?new Ca(r):new Zf(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Da(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 ec(e,t){this._context=e,this._k=(1-t)/6}ec.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:Da(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:Da(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 LT=function e(t){function n(r){return new ec(r,t)}return n.tension=function(r){return e(+r)},n}(0);function nc(e,t){this._context=e,this._k=(1-t)/6}nc.prototype={areaStart:Pn,areaEnd:Pn,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:Da(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 RT=function e(t){function n(r){return new nc(r,t)}return n.tension=function(r){return e(+r)},n}(0);function rc(e,t){this._context=e,this._k=(1-t)/6}rc.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:Da(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 IT=function e(t){function n(r){return new rc(r,t)}return n.tension=function(r){return e(+r)},n}(0);function ic(e,t,n){var r=e._x1,i=e._y1,s=e._x2,a=e._y2;if(e._l01_a>te){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>te){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 Kf(e,t){this._context=e,this._alpha=t}Kf.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:ic(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 kT=function e(t){function n(r){return t?new Kf(r,t):new ec(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Qf(e,t){this._context=e,this._alpha=t}Qf.prototype={areaStart:Pn,areaEnd:Pn,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:ic(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 PT=function e(t){function n(r){return t?new Qf(r,t):new nc(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Jf(e,t){this._context=e,this._alpha=t}Jf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ic(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 NT=function e(t){function n(r){return t?new Jf(r,t):new rc(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function tp(e){this._context=e}tp.prototype={areaStart:Pn,areaEnd:Pn,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 ep(e){return new tp(e)}function np(e){return e<0?-1:1}function rp(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(np(s)+np(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function ip(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function sc(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 La(e){this._context=e}La.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:sc(this,this._t0,ip(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,sc(this,ip(this,n=rp(this,e,t)),n);break;default:sc(this,this._t0,n=rp(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function sp(e){this._context=new ap(e)}(sp.prototype=Object.create(La.prototype)).point=function(e,t){La.prototype.point.call(this,t,e)};function ap(e){this._context=e}ap.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 $T(e){return new La(e)}function FT(e){return new sp(e)}function op(e){this._context=e}op.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=lp(e),i=lp(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 lp(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 UT(e){return new op(e)}function Ra(e,t){this._context=e,this._t=t}Ra.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 BT(e){return new Ra(e,.5)}function HT(e){return new Ra(e,0)}function GT(e){return new Ra(e,1)}function cp(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 up(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function VT(e,t){return e[t]}function zT(e){const t=[];return t.key=e,t}function ac(){var e=dt([]),t=up,n=cp,r=VT;function i(s){var a=Array.from(e.apply(this,arguments),zT),o,l=a.length,c=-1,u;for(const d of s)for(o=0,++c;o<l;++o)(a[o][c]=[0,+r(d,a[o].key,c,s)]).data=d;for(o=0,u=wa(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:dt(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:dt(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?up:typeof s=="function"?s:dt(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??cp,i):n},i}function WT(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 Vi(e,t,n){this.k=e,this.x=t,this.y=n}Vi.prototype={constructor:Vi,scale:function(e){return e===1?this:new Vi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Vi(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+")"}},Vi.prototype;var hp=typeof global=="object"&&global&&global.Object===Object&&global,YT=typeof self=="object"&&self&&self.Object===Object&&self,He=hp||YT||Function("return this")(),Ae=He.Symbol,dp=Object.prototype,qT=dp.hasOwnProperty,XT=dp.toString,zi=Ae?Ae.toStringTag:void 0;function jT(e){var t=qT.call(e,zi),n=e[zi];try{e[zi]=void 0;var r=!0}catch{}var i=XT.call(e);return r&&(t?e[zi]=n:delete e[zi]),i}var ZT=Object.prototype,KT=ZT.toString;function QT(e){return KT.call(e)}var JT="[object Null]",tO="[object Undefined]",fp=Ae?Ae.toStringTag:void 0;function nr(e){return e==null?e===void 0?tO:JT:fp&&fp in Object(e)?jT(e):QT(e)}function tn(e){return e!=null&&typeof e=="object"}var eO="[object Symbol]";function Ia(e){return typeof e=="symbol"||tn(e)&&nr(e)==eO}function oc(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 Xt=Array.isArray,nO=1/0,pp=Ae?Ae.prototype:void 0,gp=pp?pp.toString:void 0;function mp(e){if(typeof e=="string")return e;if(Xt(e))return oc(e,mp)+"";if(Ia(e))return gp?gp.call(e):"";var t=e+"";return t=="0"&&1/e==-nO?"-0":t}var rO=/\s/;function iO(e){for(var t=e.length;t--&&rO.test(e.charAt(t)););return t}var sO=/^\s+/;function aO(e){return e&&e.slice(0,iO(e)+1).replace(sO,"")}function Ce(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var vp=NaN,oO=/^[-+]0x[0-9a-f]+$/i,lO=/^0b[01]+$/i,cO=/^0o[0-7]+$/i,uO=parseInt;function Pr(e){if(typeof e=="number")return e;if(Ia(e))return vp;if(Ce(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ce(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=aO(e);var n=lO.test(e);return n||cO.test(e)?uO(e.slice(2),n?2:8):oO.test(e)?vp:+e}function lc(e){return e}var hO="[object AsyncFunction]",dO="[object Function]",fO="[object GeneratorFunction]",pO="[object Proxy]";function cc(e){if(!Ce(e))return!1;var t=nr(e);return t==dO||t==fO||t==hO||t==pO}var uc=He["__core-js_shared__"],yp=function(){var e=/[^.]+$/.exec(uc&&uc.keys&&uc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function gO(e){return!!yp&&yp in e}var mO=Function.prototype,vO=mO.toString;function rr(e){if(e!=null){try{return vO.call(e)}catch{}try{return e+""}catch{}}return""}var yO=/[\\^$.*+?()[\]{}|]/g,EO=/^\[object .+?Constructor\]$/,bO=Function.prototype,xO=Object.prototype,_O=bO.toString,SO=xO.hasOwnProperty,TO=RegExp("^"+_O.call(SO).replace(yO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function OO(e){if(!Ce(e)||gO(e))return!1;var t=cc(e)?TO:EO;return t.test(rr(e))}function wO(e,t){return e==null?void 0:e[t]}function ir(e,t){var n=wO(e,t);return OO(n)?n:void 0}var hc=ir(He,"WeakMap"),Ep=Object.create,MO=function(){function e(){}return function(t){if(!Ce(t))return{};if(Ep)return Ep(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function AO(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 CO(){}function bp(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var DO=800,LO=16,RO=Date.now;function IO(e){var t=0,n=0;return function(){var r=RO(),i=LO-(r-n);if(n=r,i>0){if(++t>=DO)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function kO(e){return function(){return e}}var ka=function(){try{var e=ir(Object,"defineProperty");return e({},"",{}),e}catch{}}(),PO=ka?function(e,t){return ka(e,"toString",{configurable:!0,enumerable:!1,value:kO(t),writable:!0})}:lc,xp=IO(PO);function NO(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function $O(e,t,n,r){for(var i=e.length,s=n+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function FO(e){return e!==e}function UO(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function BO(e,t,n){return t===t?UO(e,t,n):$O(e,FO,n)}function HO(e,t){var n=e==null?0:e.length;return!!n&&BO(e,t,0)>-1}var GO=9007199254740991,VO=/^(?:0|[1-9]\d*)$/;function dc(e,t){var n=typeof e;return t=t??GO,!!t&&(n=="number"||n!="symbol"&&VO.test(e))&&e>-1&&e%1==0&&e<t}function Pa(e,t,n){t=="__proto__"&&ka?ka(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Wi(e,t){return e===t||e!==e&&t!==t}var zO=Object.prototype,WO=zO.hasOwnProperty;function _p(e,t,n){var r=e[t];(!(WO.call(e,t)&&Wi(r,n))||n===void 0&&!(t in e))&&Pa(e,t,n)}function Nr(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],l=void 0;l===void 0&&(l=e[o]),i?Pa(n,o,l):_p(n,o,l)}return n}var Sp=Math.max;function Tp(e,t,n){return t=Sp(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=Sp(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),AO(e,this,o)}}function fc(e,t){return xp(Tp(e,t,lc),e+"")}var YO=9007199254740991;function pc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=YO}function sr(e){return e!=null&&pc(e.length)&&!cc(e)}function qO(e,t,n){if(!Ce(n))return!1;var r=typeof t;return(r=="number"?sr(n)&&dc(t,n.length):r=="string"&&t in n)?Wi(n[t],e):!1}function XO(e){return fc(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&&qO(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 jO=Object.prototype;function Na(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||jO;return e===n}function ZO(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var KO="[object Arguments]";function Op(e){return tn(e)&&nr(e)==KO}var wp=Object.prototype,QO=wp.hasOwnProperty,JO=wp.propertyIsEnumerable,$r=Op(function(){return arguments}())?Op:function(e){return tn(e)&&QO.call(e,"callee")&&!JO.call(e,"callee")};function tw(){return!1}var Mp=typeof W=="object"&&W&&!W.nodeType&&W,Ap=Mp&&typeof module=="object"&&module&&!module.nodeType&&module,ew=Ap&&Ap.exports===Mp,Cp=ew?He.Buffer:void 0,nw=Cp?Cp.isBuffer:void 0,Fr=nw||tw,rw="[object Arguments]",iw="[object Array]",sw="[object Boolean]",aw="[object Date]",ow="[object Error]",lw="[object Function]",cw="[object Map]",uw="[object Number]",hw="[object Object]",dw="[object RegExp]",fw="[object Set]",pw="[object String]",gw="[object WeakMap]",mw="[object ArrayBuffer]",vw="[object DataView]",yw="[object Float32Array]",Ew="[object Float64Array]",bw="[object Int8Array]",xw="[object Int16Array]",_w="[object Int32Array]",Sw="[object Uint8Array]",Tw="[object Uint8ClampedArray]",Ow="[object Uint16Array]",ww="[object Uint32Array]",Rt={};Rt[yw]=Rt[Ew]=Rt[bw]=Rt[xw]=Rt[_w]=Rt[Sw]=Rt[Tw]=Rt[Ow]=Rt[ww]=!0,Rt[rw]=Rt[iw]=Rt[mw]=Rt[sw]=Rt[vw]=Rt[aw]=Rt[ow]=Rt[lw]=Rt[cw]=Rt[uw]=Rt[hw]=Rt[dw]=Rt[fw]=Rt[pw]=Rt[gw]=!1;function Mw(e){return tn(e)&&pc(e.length)&&!!Rt[nr(e)]}function gc(e){return function(t){return e(t)}}var Dp=typeof W=="object"&&W&&!W.nodeType&&W,Yi=Dp&&typeof module=="object"&&module&&!module.nodeType&&module,Aw=Yi&&Yi.exports===Dp,mc=Aw&&hp.process,Ur=function(){try{var e=Yi&&Yi.require&&Yi.require("util").types;return e||mc&&mc.binding&&mc.binding("util")}catch{}}(),Lp=Ur&&Ur.isTypedArray,$a=Lp?gc(Lp):Mw,Cw=Object.prototype,Dw=Cw.hasOwnProperty;function Rp(e,t){var n=Xt(e),r=!n&&$r(e),i=!n&&!r&&Fr(e),s=!n&&!r&&!i&&$a(e),a=n||r||i||s,o=a?ZO(e.length,String):[],l=o.length;for(var c in e)(t||Dw.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||dc(c,l)))&&o.push(c);return o}function Ip(e,t){return function(n){return e(t(n))}}var Lw=Ip(Object.keys,Object),Rw=Object.prototype,Iw=Rw.hasOwnProperty;function kp(e){if(!Na(e))return Lw(e);var t=[];for(var n in Object(e))Iw.call(e,n)&&n!="constructor"&&t.push(n);return t}function qi(e){return sr(e)?Rp(e):kp(e)}function kw(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Pw=Object.prototype,Nw=Pw.hasOwnProperty;function $w(e){if(!Ce(e))return kw(e);var t=Na(e),n=[];for(var r in e)r=="constructor"&&(t||!Nw.call(e,r))||n.push(r);return n}function Xi(e){return sr(e)?Rp(e,!0):$w(e)}var Fw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Uw=/^\w*$/;function vc(e,t){if(Xt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ia(e)?!0:Uw.test(e)||!Fw.test(e)||t!=null&&e in Object(t)}var ji=ir(Object,"create");function Bw(){this.__data__=ji?ji(null):{},this.size=0}function Hw(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Gw="__lodash_hash_undefined__",Vw=Object.prototype,zw=Vw.hasOwnProperty;function Ww(e){var t=this.__data__;if(ji){var n=t[e];return n===Gw?void 0:n}return zw.call(t,e)?t[e]:void 0}var Yw=Object.prototype,qw=Yw.hasOwnProperty;function Xw(e){var t=this.__data__;return ji?t[e]!==void 0:qw.call(t,e)}var jw="__lodash_hash_undefined__";function Zw(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ji&&t===void 0?jw:t,this}function ar(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])}}ar.prototype.clear=Bw,ar.prototype.delete=Hw,ar.prototype.get=Ww,ar.prototype.has=Xw,ar.prototype.set=Zw;function Kw(){this.__data__=[],this.size=0}function Fa(e,t){for(var n=e.length;n--;)if(Wi(e[n][0],t))return n;return-1}var Qw=Array.prototype,Jw=Qw.splice;function tM(e){var t=this.__data__,n=Fa(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Jw.call(t,n,1),--this.size,!0}function eM(e){var t=this.__data__,n=Fa(t,e);return n<0?void 0:t[n][1]}function nM(e){return Fa(this.__data__,e)>-1}function rM(e,t){var n=this.__data__,r=Fa(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function xn(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])}}xn.prototype.clear=Kw,xn.prototype.delete=tM,xn.prototype.get=eM,xn.prototype.has=nM,xn.prototype.set=rM;var Zi=ir(He,"Map");function iM(){this.size=0,this.__data__={hash:new ar,map:new(Zi||xn),string:new ar}}function sM(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ua(e,t){var n=e.__data__;return sM(t)?n[typeof t=="string"?"string":"hash"]:n.map}function aM(e){var t=Ua(this,e).delete(e);return this.size-=t?1:0,t}function oM(e){return Ua(this,e).get(e)}function lM(e){return Ua(this,e).has(e)}function cM(e,t){var n=Ua(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function _n(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])}}_n.prototype.clear=iM,_n.prototype.delete=aM,_n.prototype.get=oM,_n.prototype.has=lM,_n.prototype.set=cM;var uM="Expected a function";function yc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(uM);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(yc.Cache||_n),n}yc.Cache=_n;var hM=500;function dM(e){var t=yc(e,function(r){return n.size===hM&&n.clear(),r}),n=t.cache;return t}var fM=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pM=/\\(\\)?/g,gM=dM(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(fM,function(n,r,i,s){t.push(i?s.replace(pM,"$1"):r||n)}),t});function Ki(e){return e==null?"":mp(e)}function Ba(e,t){return Xt(e)?e:vc(e,t)?[e]:gM(Ki(e))}var mM=1/0;function Qi(e){if(typeof e=="string"||Ia(e))return e;var t=e+"";return t=="0"&&1/e==-mM?"-0":t}function Ec(e,t){t=Ba(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Qi(t[n++])];return n&&n==r?e:void 0}function yt(e,t,n){var r=e==null?void 0:Ec(e,t);return r===void 0?n:r}function bc(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Pp=Ae?Ae.isConcatSpreadable:void 0;function vM(e){return Xt(e)||$r(e)||!!(Pp&&e&&e[Pp])}function Ha(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=vM),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?Ha(o,t-1,n,r,i):bc(i,o):r||(i[i.length]=o)}return i}function xc(e){var t=e==null?0:e.length;return t?Ha(e,1):[]}function yM(e){return xp(Tp(e,void 0,xc),e+"")}var _c=Ip(Object.getPrototypeOf,Object),EM="[object Object]",bM=Function.prototype,xM=Object.prototype,Np=bM.toString,_M=xM.hasOwnProperty,SM=Np.call(Object);function $p(e){if(!tn(e)||nr(e)!=EM)return!1;var t=_c(e);if(t===null)return!0;var n=_M.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Np.call(n)==SM}function Fp(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function TM(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:Fp(e,t,n)}var OM="\\ud800-\\udfff",wM="\\u0300-\\u036f",MM="\\ufe20-\\ufe2f",AM="\\u20d0-\\u20ff",CM=wM+MM+AM,DM="\\ufe0e\\ufe0f",LM="\\u200d",RM=RegExp("["+LM+OM+CM+DM+"]");function Up(e){return RM.test(e)}function IM(e){return e.split("")}var Bp="\\ud800-\\udfff",kM="\\u0300-\\u036f",PM="\\ufe20-\\ufe2f",NM="\\u20d0-\\u20ff",$M=kM+PM+NM,FM="\\ufe0e\\ufe0f",UM="["+Bp+"]",Sc="["+$M+"]",Tc="\\ud83c[\\udffb-\\udfff]",BM="(?:"+Sc+"|"+Tc+")",Hp="[^"+Bp+"]",Gp="(?:\\ud83c[\\udde6-\\uddff]){2}",Vp="[\\ud800-\\udbff][\\udc00-\\udfff]",HM="\\u200d",zp=BM+"?",Wp="["+FM+"]?",GM="(?:"+HM+"(?:"+[Hp,Gp,Vp].join("|")+")"+Wp+zp+")*",VM=Wp+zp+GM,zM="(?:"+[Hp+Sc+"?",Sc,Gp,Vp,UM].join("|")+")",WM=RegExp(Tc+"(?="+Tc+")|"+zM+VM,"g");function YM(e){return e.match(WM)||[]}function qM(e){return Up(e)?YM(e):IM(e)}function XM(e){return function(t){t=Ki(t);var n=Up(t)?qM(t):void 0,r=n?n[0]:t.charAt(0),i=n?TM(n,1).join(""):t.slice(1);return r[e]()+i}}var jM=XM("toUpperCase");function ZM(e){return jM(Ki(e).toLowerCase())}function KM(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;)n=t(n,e[i],i,e);return n}function QM(e){return function(t){return e==null?void 0:e[t]}}var JM={À:"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"},tA=QM(JM),eA=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,nA="\\u0300-\\u036f",rA="\\ufe20-\\ufe2f",iA="\\u20d0-\\u20ff",sA=nA+rA+iA,aA="["+sA+"]",oA=RegExp(aA,"g");function lA(e){return e=Ki(e),e&&e.replace(eA,tA).replace(oA,"")}var cA=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function uA(e){return e.match(cA)||[]}var hA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function dA(e){return hA.test(e)}var Yp="\\ud800-\\udfff",fA="\\u0300-\\u036f",pA="\\ufe20-\\ufe2f",gA="\\u20d0-\\u20ff",mA=fA+pA+gA,qp="\\u2700-\\u27bf",Xp="a-z\\xdf-\\xf6\\xf8-\\xff",vA="\\xac\\xb1\\xd7\\xf7",yA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",EA="\\u2000-\\u206f",bA=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",jp="A-Z\\xc0-\\xd6\\xd8-\\xde",xA="\\ufe0e\\ufe0f",Zp=vA+yA+EA+bA,Kp="['’]",Qp="["+Zp+"]",_A="["+mA+"]",Jp="\\d+",SA="["+qp+"]",tg="["+Xp+"]",eg="[^"+Yp+Zp+Jp+qp+Xp+jp+"]",TA="\\ud83c[\\udffb-\\udfff]",OA="(?:"+_A+"|"+TA+")",wA="[^"+Yp+"]",ng="(?:\\ud83c[\\udde6-\\uddff]){2}",rg="[\\ud800-\\udbff][\\udc00-\\udfff]",Br="["+jp+"]",MA="\\u200d",ig="(?:"+tg+"|"+eg+")",AA="(?:"+Br+"|"+eg+")",sg="(?:"+Kp+"(?:d|ll|m|re|s|t|ve))?",ag="(?:"+Kp+"(?:D|LL|M|RE|S|T|VE))?",og=OA+"?",lg="["+xA+"]?",CA="(?:"+MA+"(?:"+[wA,ng,rg].join("|")+")"+lg+og+")*",DA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",LA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",RA=lg+og+CA,IA="(?:"+[SA,ng,rg].join("|")+")"+RA,kA=RegExp([Br+"?"+tg+"+"+sg+"(?="+[Qp,Br,"$"].join("|")+")",AA+"+"+ag+"(?="+[Qp,Br+ig,"$"].join("|")+")",Br+"?"+ig+"+"+sg,Br+"+"+ag,LA,DA,Jp,IA].join("|"),"g");function PA(e){return e.match(kA)||[]}function NA(e,t,n){return e=Ki(e),t=t,t===void 0?dA(e)?PA(e):uA(e):e.match(t)||[]}var $A="['’]",FA=RegExp($A,"g");function cg(e){return function(t){return KM(NA(lA(t).replace(FA,"")),e,"")}}var UA=cg(function(e,t,n){return t=t.toLowerCase(),e+(n?ZM(t):t)});function BA(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function ug(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Pr(n),n=n===n?n:0),t!==void 0&&(t=Pr(t),t=t===t?t:0),BA(Pr(e),t,n)}function HA(){this.__data__=new xn,this.size=0}function GA(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function VA(e){return this.__data__.get(e)}function zA(e){return this.__data__.has(e)}var WA=200;function YA(e,t){var n=this.__data__;if(n instanceof xn){var r=n.__data__;if(!Zi||r.length<WA-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new _n(r)}return n.set(e,t),this.size=n.size,this}function Ge(e){var t=this.__data__=new xn(e);this.size=t.size}Ge.prototype.clear=HA,Ge.prototype.delete=GA,Ge.prototype.get=VA,Ge.prototype.has=zA,Ge.prototype.set=YA;function qA(e,t){return e&&Nr(t,qi(t),e)}function XA(e,t){return e&&Nr(t,Xi(t),e)}var hg=typeof W=="object"&&W&&!W.nodeType&&W,dg=hg&&typeof module=="object"&&module&&!module.nodeType&&module,jA=dg&&dg.exports===hg,fg=jA?He.Buffer:void 0,pg=fg?fg.allocUnsafe:void 0;function gg(e,t){if(t)return e.slice();var n=e.length,r=pg?pg(n):new e.constructor(n);return e.copy(r),r}function ZA(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 mg(){return[]}var KA=Object.prototype,QA=KA.propertyIsEnumerable,vg=Object.getOwnPropertySymbols,Oc=vg?function(e){return e==null?[]:(e=Object(e),ZA(vg(e),function(t){return QA.call(e,t)}))}:mg;function JA(e,t){return Nr(e,Oc(e),t)}var tC=Object.getOwnPropertySymbols,yg=tC?function(e){for(var t=[];e;)bc(t,Oc(e)),e=_c(e);return t}:mg;function eC(e,t){return Nr(e,yg(e),t)}function Eg(e,t,n){var r=t(e);return Xt(e)?r:bc(r,n(e))}function wc(e){return Eg(e,qi,Oc)}function bg(e){return Eg(e,Xi,yg)}var Mc=ir(He,"DataView"),Ac=ir(He,"Promise"),Hr=ir(He,"Set"),xg="[object Map]",nC="[object Object]",_g="[object Promise]",Sg="[object Set]",Tg="[object WeakMap]",Og="[object DataView]",rC=rr(Mc),iC=rr(Zi),sC=rr(Ac),aC=rr(Hr),oC=rr(hc),De=nr;(Mc&&De(new Mc(new ArrayBuffer(1)))!=Og||Zi&&De(new Zi)!=xg||Ac&&De(Ac.resolve())!=_g||Hr&&De(new Hr)!=Sg||hc&&De(new hc)!=Tg)&&(De=function(e){var t=nr(e),n=t==nC?e.constructor:void 0,r=n?rr(n):"";if(r)switch(r){case rC:return Og;case iC:return xg;case sC:return _g;case aC:return Sg;case oC:return Tg}return t});var lC=Object.prototype,cC=lC.hasOwnProperty;function uC(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&cC.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Ga=He.Uint8Array;function Cc(e){var t=new e.constructor(e.byteLength);return new Ga(t).set(new Ga(e)),t}function hC(e,t){var n=t?Cc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var dC=/\w*$/;function fC(e){var t=new e.constructor(e.source,dC.exec(e));return t.lastIndex=e.lastIndex,t}var wg=Ae?Ae.prototype:void 0,Mg=wg?wg.valueOf:void 0;function pC(e){return Mg?Object(Mg.call(e)):{}}function Ag(e,t){var n=t?Cc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var gC="[object Boolean]",mC="[object Date]",vC="[object Map]",yC="[object Number]",EC="[object RegExp]",bC="[object Set]",xC="[object String]",_C="[object Symbol]",SC="[object ArrayBuffer]",TC="[object DataView]",OC="[object Float32Array]",wC="[object Float64Array]",MC="[object Int8Array]",AC="[object Int16Array]",CC="[object Int32Array]",DC="[object Uint8Array]",LC="[object Uint8ClampedArray]",RC="[object Uint16Array]",IC="[object Uint32Array]";function kC(e,t,n){var r=e.constructor;switch(t){case SC:return Cc(e);case gC:case mC:return new r(+e);case TC:return hC(e,n);case OC:case wC:case MC:case AC:case CC:case DC:case LC:case RC:case IC:return Ag(e,n);case vC:return new r;case yC:case xC:return new r(e);case EC:return fC(e);case bC:return new r;case _C:return pC(e)}}function Cg(e){return typeof e.constructor=="function"&&!Na(e)?MO(_c(e)):{}}var PC="[object Map]";function NC(e){return tn(e)&&De(e)==PC}var Dg=Ur&&Ur.isMap,$C=Dg?gc(Dg):NC,FC="[object Set]";function UC(e){return tn(e)&&De(e)==FC}var Lg=Ur&&Ur.isSet,BC=Lg?gc(Lg):UC,HC=1,GC=2,VC=4,Rg="[object Arguments]",zC="[object Array]",WC="[object Boolean]",YC="[object Date]",qC="[object Error]",Ig="[object Function]",XC="[object GeneratorFunction]",jC="[object Map]",ZC="[object Number]",kg="[object Object]",KC="[object RegExp]",QC="[object Set]",JC="[object String]",tD="[object Symbol]",eD="[object WeakMap]",nD="[object ArrayBuffer]",rD="[object DataView]",iD="[object Float32Array]",sD="[object Float64Array]",aD="[object Int8Array]",oD="[object Int16Array]",lD="[object Int32Array]",cD="[object Uint8Array]",uD="[object Uint8ClampedArray]",hD="[object Uint16Array]",dD="[object Uint32Array]",Dt={};Dt[Rg]=Dt[zC]=Dt[nD]=Dt[rD]=Dt[WC]=Dt[YC]=Dt[iD]=Dt[sD]=Dt[aD]=Dt[oD]=Dt[lD]=Dt[jC]=Dt[ZC]=Dt[kg]=Dt[KC]=Dt[QC]=Dt[JC]=Dt[tD]=Dt[cD]=Dt[uD]=Dt[hD]=Dt[dD]=!0,Dt[qC]=Dt[Ig]=Dt[eD]=!1;function Ji(e,t,n,r,i,s){var a,o=t&HC,l=t&GC,c=t&VC;if(n&&(a=i?n(e,r,i,s):n(e)),a!==void 0)return a;if(!Ce(e))return e;var u=Xt(e);if(u){if(a=uC(e),!o)return bp(e,a)}else{var d=De(e),h=d==Ig||d==XC;if(Fr(e))return gg(e,o);if(d==kg||d==Rg||h&&!i){if(a=l||h?{}:Cg(e),!o)return l?eC(e,XA(a,e)):JA(e,qA(a,e))}else{if(!Dt[d])return i?e:{};a=kC(e,d,o)}}s||(s=new Ge);var f=s.get(e);if(f)return f;s.set(e,a),BC(e)?e.forEach(function(m){a.add(Ji(m,t,n,m,e,s))}):$C(e)&&e.forEach(function(m,v){a.set(v,Ji(m,t,n,v,e,s))});var p=c?l?bg:wc:l?Xi:qi,g=u?void 0:p(e);return NO(g||e,function(m,v){g&&(v=m,m=e[v]),_p(a,v,Ji(m,t,n,v,e,s))}),a}var fD=1,pD=4;function Sn(e){return Ji(e,fD|pD)}var gD="__lodash_hash_undefined__";function mD(e){return this.__data__.set(e,gD),this}function vD(e){return this.__data__.has(e)}function ts(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new _n;++t<n;)this.add(e[t])}ts.prototype.add=ts.prototype.push=mD,ts.prototype.has=vD;function Pg(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 Ng(e,t){return e.has(t)}var yD=1,ED=2;function $g(e,t,n,r,i,s){var a=n&yD,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&ED?new ts:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var p=e[d],g=t[d];if(r)var m=a?r(g,p,d,t,e,s):r(p,g,d,e,t,s);if(m!==void 0){if(m)continue;h=!1;break}if(f){if(!Pg(t,function(v,E){if(!Ng(f,E)&&(p===v||i(p,v,n,r,s)))return f.push(E)})){h=!1;break}}else if(!(p===g||i(p,g,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function bD(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Dc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var xD=1,_D=2,SD="[object Boolean]",TD="[object Date]",OD="[object Error]",wD="[object Map]",MD="[object Number]",AD="[object RegExp]",CD="[object Set]",DD="[object String]",LD="[object Symbol]",RD="[object ArrayBuffer]",ID="[object DataView]",Fg=Ae?Ae.prototype:void 0,Lc=Fg?Fg.valueOf:void 0;function kD(e,t,n,r,i,s,a){switch(n){case ID:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case RD:return!(e.byteLength!=t.byteLength||!s(new Ga(e),new Ga(t)));case SD:case TD:case MD:return Wi(+e,+t);case OD:return e.name==t.name&&e.message==t.message;case AD:case DD:return e==t+"";case wD:var o=bD;case CD:var l=r&xD;if(o||(o=Dc),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=_D,a.set(e,t);var u=$g(o(e),o(t),r,i,s,a);return a.delete(e),u;case LD:if(Lc)return Lc.call(e)==Lc.call(t)}return!1}var PD=1,ND=Object.prototype,$D=ND.hasOwnProperty;function FD(e,t,n,r,i,s){var a=n&PD,o=wc(e),l=o.length,c=wc(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=o[d];if(!(a?h in t:$D.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=a;++d<l;){h=o[d];var v=e[h],E=t[h];if(r)var y=a?r(E,v,h,t,e,s):r(v,E,h,e,t,s);if(!(y===void 0?v===E||i(v,E,n,r,s):y)){g=!1;break}m||(m=h=="constructor")}if(g&&!m){var x=e.constructor,S=t.constructor;x!=S&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof S=="function"&&S instanceof S)&&(g=!1)}return s.delete(e),s.delete(t),g}var UD=1,Ug="[object Arguments]",Bg="[object Array]",Va="[object Object]",BD=Object.prototype,Hg=BD.hasOwnProperty;function HD(e,t,n,r,i,s){var a=Xt(e),o=Xt(t),l=a?Bg:De(e),c=o?Bg:De(t);l=l==Ug?Va:l,c=c==Ug?Va:c;var u=l==Va,d=c==Va,h=l==c;if(h&&Fr(e)){if(!Fr(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Ge),a||$a(e)?$g(e,t,n,r,i,s):kD(e,t,l,n,r,i,s);if(!(n&UD)){var f=u&&Hg.call(e,"__wrapped__"),p=d&&Hg.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,m=p?t.value():t;return s||(s=new Ge),i(g,m,n,r,s)}}return h?(s||(s=new Ge),FD(e,t,n,r,i,s)):!1}function za(e,t,n,r,i){return e===t?!0:e==null||t==null||!tn(e)&&!tn(t)?e!==e&&t!==t:HD(e,t,n,r,za,i)}var GD=1,VD=2;function zD(e,t,n,r){var i=n.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){a=n[i];var o=a[0],l=e[o],c=a[1];if(a[2]){if(l===void 0&&!(o in e))return!1}else{var u=new Ge,d;if(!(d===void 0?za(c,l,GD|VD,r,u):d))return!1}}return!0}function Gg(e){return e===e&&!Ce(e)}function WD(e){for(var t=qi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Gg(i)]}return t}function Vg(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function YD(e){var t=WD(e);return t.length==1&&t[0][2]?Vg(t[0][0],t[0][1]):function(n){return n===e||zD(n,e,t)}}function qD(e,t){return e!=null&&t in Object(e)}function XD(e,t,n){t=Ba(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=Qi(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&&pc(i)&&dc(a,i)&&(Xt(e)||$r(e)))}function jD(e,t){return e!=null&&XD(e,t,qD)}var ZD=1,KD=2;function QD(e,t){return vc(e)&&Gg(t)?Vg(Qi(e),t):function(n){var r=yt(n,e);return r===void 0&&r===t?jD(n,e):za(t,r,ZD|KD)}}function JD(e){return function(t){return t==null?void 0:t[e]}}function tL(e){return function(t){return Ec(t,e)}}function eL(e){return vc(e)?JD(Qi(e)):tL(e)}function Wa(e){return typeof e=="function"?e:e==null?lc:typeof e=="object"?Xt(e)?QD(e[0],e[1]):YD(e):eL(e)}function nL(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;){var a=e[i];t(r,a,n(a),e)}return r}function rL(e){return function(t,n,r){for(var i=-1,s=Object(t),a=r(t),o=a.length;o--;){var l=a[++i];if(n(s[l],l,s)===!1)break}return t}}var zg=rL();function iL(e,t){return e&&zg(e,t,qi)}function sL(e,t){return function(n,r){if(n==null)return n;if(!sr(n))return e(n,r);for(var i=n.length,s=-1,a=Object(n);++s<i&&r(a[s],s,a)!==!1;);return n}}var Rc=sL(iL);function aL(e,t,n,r){return Rc(e,function(i,s,a){t(r,i,n(i),a)}),r}function oL(e,t){return function(n,r){var i=Xt(n)?nL:aL,s={};return i(n,e,Wa(r),s)}}var Ic=function(){return He.Date.now()},lL="Expected a function",cL=Math.max,uL=Math.min;function Ya(e,t,n){var r,i,s,a,o,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(lL);t=Pr(t)||0,Ce(n)&&(u=!!n.leading,d="maxWait"in n,s=d?cL(Pr(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(_){var A=r,L=i;return r=i=void 0,c=_,a=e.apply(L,A),a}function p(_){return c=_,o=setTimeout(v,t),u?f(_):a}function g(_){var A=_-l,L=_-c,B=t-A;return d?uL(B,s-L):B}function m(_){var A=_-l,L=_-c;return l===void 0||A>=t||A<0||d&&L>=s}function v(){var _=Ic();if(m(_))return E(_);o=setTimeout(v,g(_))}function E(_){return o=void 0,h&&r?f(_):(r=i=void 0,a)}function y(){o!==void 0&&clearTimeout(o),c=0,r=l=i=o=void 0}function x(){return o===void 0?a:E(Ic())}function S(){var _=Ic(),A=m(_);if(r=arguments,i=this,l=_,A){if(o===void 0)return p(l);if(d)return clearTimeout(o),o=setTimeout(v,t),f(l)}return o===void 0&&(o=setTimeout(v,t)),a}return S.cancel=y,S.flush=x,S}function kc(e,t,n){(n!==void 0&&!Wi(e[t],n)||n===void 0&&!(t in e))&&Pa(e,t,n)}function Pc(e){return tn(e)&&sr(e)}function Nc(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function hL(e){return Nr(e,Xi(e))}function dL(e,t,n,r,i,s,a){var o=Nc(e,n),l=Nc(t,n),c=a.get(l);if(c){kc(e,n,c);return}var u=s?s(o,l,n+"",e,t,a):void 0,d=u===void 0;if(d){var h=Xt(l),f=!h&&Fr(l),p=!h&&!f&&$a(l);u=l,h||f||p?Xt(o)?u=o:Pc(o)?u=bp(o):f?(d=!1,u=gg(l,!0)):p?(d=!1,u=Ag(l,!0)):u=[]:$p(l)||$r(l)?(u=o,$r(o)?u=hL(o):(!Ce(o)||cc(o))&&(u=Cg(l))):d=!1}d&&(a.set(l,u),i(u,l,r,s,a),a.delete(l)),kc(e,n,u)}function Wg(e,t,n,r,i){e!==t&&zg(t,function(s,a){if(i||(i=new Ge),Ce(s))dL(e,t,a,n,Wg,r,i);else{var o=r?r(Nc(e,a),s,a+"",e,t,i):void 0;o===void 0&&(o=s),kc(e,a,o)}},Xi)}var fL="Expected a function";function pL(e,t,n){if(typeof e!="function")throw new TypeError(fL);return setTimeout(function(){e.apply(void 0,n)},t)}var gL=fc(function(e,t,n){return pL(e,Pr(t)||0,n)});function Yg(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function mL(e,t){var n=-1,r=sr(e)?Array(e.length):[];return Rc(e,function(i,s,a){r[++n]=t(i,s,a)}),r}function vL(e,t){var n=Xt(e)?oc:mL;return n(e,Wa(t))}var yL=1/0;function EL(e,t){return Ha(vL(e,t),yL)}function bL(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 xL=Object.prototype,_L=xL.hasOwnProperty,SL=oL(function(e,t,n){_L.call(e,n)?e[n].push(t):Pa(e,n,[t])});function TL(e,t){return t.length<2?e:Ec(e,Fp(t,0,-1))}var OL="[object Map]",wL="[object Set]",ML=Object.prototype,AL=ML.hasOwnProperty;function Ve(e){if(e==null)return!0;if(sr(e)&&(Xt(e)||typeof e=="string"||typeof e.splice=="function"||Fr(e)||$a(e)||$r(e)))return!e.length;var t=De(e);if(t==OL||t==wL)return!e.size;if(Na(e))return!kp(e).length;for(var n in e)if(AL.call(e,n))return!1;return!0}function qg(e,t){return za(e,t)}var Gr=cg(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),lt=XO(function(e,t,n){Wg(e,t,n)});function CL(e,t){return t=Ba(t,e),e=TL(e,t),e==null||delete e[Qi(Yg(t))]}function DL(e){return $p(e)?void 0:e}var LL=1,RL=2,IL=4,kL=yM(function(e,t){var n={};if(e==null)return n;var r=!1;t=oc(t,function(s){return s=Ba(s,e),r||(r=s.length>1),s}),Nr(e,bg(e),n),r&&(n=Ji(n,LL|RL|IL,DL));for(var i=t.length;i--;)CL(n,t[i]);return n});function PL(e,t){var n;return Rc(e,function(r,i,s){return n=t(r,i,s),!n}),!!n}function NL(e,t,n){var r=Xt(e)?Pg:PL;return r(e,Wa(t))}var $L=1/0,FL=Hr&&1/Dc(new Hr([,-0]))[1]==$L?function(e){return new Hr(e)}:CO,UL=200;function Xg(e,t,n){var r=-1,i=HO,s=e.length,a=!0,o=[],l=o;if(s>=UL){var c=t?null:FL(e);if(c)return Dc(c);a=!1,i=Ng,l=new ts}else l=t?[]:o;t:for(;++r<s;){var u=e[r],d=t?t(u):u;if(u=u!==0?u:0,a&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue t;t&&l.push(d),o.push(u)}else i(l,d,n)||(l!==o&&l.push(d),o.push(u))}return o}var BL=fc(function(e){var t=Yg(e);return Pc(t)&&(t=void 0),Xg(Ha(e,1,Pc,!0),Wa(t))});function es(e){return e&&e.length?Xg(e):[]}var $c=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))($c||{}),Fc=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(Fc||{}),Uc=(e=>(e.UPDATE="model-update",e))(Uc||{}),jg=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e.SHOW_TOOLTIP="toolbar-show-tooltip",e.HIDE_TOOLTIP="toolbar-hide-tooltip",e))(jg||{}),Bc=(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))(Bc||{}),Hc=(e=>(e.CHANGE="zoom-domain-change",e))(Hc||{}),Gc=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(Gc||{}),Vc=(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))(Vc||{}),zc=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(zc||{}),Wc=(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))(Wc||{}),Yc=(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))(Yc||{}),qc=(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))(qc||{}),Xc=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Xc||{}),jc=(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))(jc||{}),Zc=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(Zc||{}),Kc=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Kc||{}),Qc=(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))(Qc||{}),Jc=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(Jc||{}),tu=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(tu||{}),Vr=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(Vr||{}),eu=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(eu||{}),Zg=(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))(Zg||{}),Kg=(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))(Kg||{}),Qg=(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))(Qg||{}),Jg=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(Jg||{}),tm=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(tm||{}),zr=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(zr||{});const T=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:Qg,Area:zc,Axis:Vc,Bar:Xc,Boxplot:jc,CanvasZoom:Gc,Chart:$c,Choropleth:zr,CirclePack:Kg,Gauge:qc,Heatmap:tm,Legend:Zg,Line:Kc,Meter:Jg,Modal:Fc,Model:Uc,Pie:Yc,Radar:Qc,Scatter:Zc,Threshold:eu,Toolbar:jg,Tooltip:Vr,Tree:Jc,Treemap:tu,WordCloud:Wc,ZoomBar:Bc,ZoomDomain:Hc},Symbol.toStringTag,{value:"Module"}));var tt=(e=>(e.HTML="html",e.SVG="svg",e))(tt||{}),nu=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(nu||{}),at=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(at||{}),G=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(G||{}),ze=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(ze||{}),Le=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(Le||{}),Bt=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(Bt||{}),Q=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(Q||{}),Wr=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Wr||{}),Ht=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Ht||{}),Yr=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(Yr||{}),qa=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(qa||{}),wt=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(wt||{}),ct=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(ct||{}),or=(e=>(e.CENTER="center",e))(or||{}),ns=(e=>(e.LEFT="left",e.RIGHT="right",e))(ns||{}),Gt=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Gt||{}),en=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(en||{}),nn=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(nn||{}),lr=(e=>(e.SEMI="semi",e.FULL="full",e))(lr||{}),Xa=(e=>(e.UP="up",e.DOWN="down",e))(Xa||{}),rs=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(rs||{}),is=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(is||{}),be=(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))(be||{}),xt=(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.EXIT_FULLSCREEN="Exit fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(xt||{}),ja=(e=>(e.LEFT="left",e.RIGHT="right",e))(ja||{}),Vt=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(Vt||{}),ss=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(ss||{}),qr=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(qr||{}),as=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(as||{}),rn=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(rn||{});const de="cds",Tn={opacity:{unselected:.05,selected:.4}},Nn={ticks:{number:7,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},Xr={duration:1e3,ease:td,zoomLevel:3},jr={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},depth:2},em={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},Re={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},HL={defaultBins:10},Pt={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},On={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},jt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},Lt={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}},cr={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},We={nodeWidth:4,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},nm={minCellDividerDimension:16},rm={default:{size:24}},im={defaultOffset:4,horizontalOffset:10},sm={default:{duration:300},pie_slice_mouseover:{duration:100},pie_slice_mouseout:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},xe={height:{[ze.GRAPH_VIEW]:32,[ze.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},GL=[{type:Vt.RADIUS,name:"Radius"},{type:Vt.AREA,name:"Poor area"},{type:Vt.AREA,name:"Satisfactory area"},{type:Vt.AREA,name:"Great area"},{type:Vt.QUARTILE,name:"Quartiles"}];function VL(e,t,n){let r=null;return function(...i){const s=this;s.mousePosition=zn(i[0],n),clearTimeout(r),r=setTimeout(function(){e.apply(s,i)},t)}}function It(e,t){var i;const n=Sn(e),r=Object.keys(t.axes||{});(i=t==null?void 0:t.toolbar)!=null&&i.controls&&delete n.toolbar.controls,r.length===0&&delete n.axes;for(const s in n.axes)if(r.includes(s)){const a=t.axes[s];(a.primary||a.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://charts.carbondesignsystem.com/");const o=a.mapsTo;if(o==null){const l=a.scaleType;l==null?a.mapsTo="value":l===Q.TIME?a.mapsTo="date":l===Q.LABELS&&(a.mapsTo="key")}}else delete n.axes[s];return iu(n,t),lt(n,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 os(e){const n=/\(([^)]+)\)/.exec(e);if(n&&n.length>1){const r=n[1].split(",");if(r.length>1)return{x:parseFloat(r[0]),y:parseFloat(r[1])}}return{x:0,y:0}}function ru(e,t,n="value",r=!1){const i=e/t.reduce((s,a)=>s+a[n],0)*100;return r?i:i%1!==0?parseFloat(i.toFixed(1)):i}function ls(e,t,n){if(n>e.length)return e;if(t===Le.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===Le.FRONT_LINE)return"..."+e.substr(-n);if(t===Le.END_LINE)return e.substr(0,n)+"..."}function iu(e,t){const n=b(e,"legend","additionalItems"),r=b(t,"legend","additionalItems");if(n&&r){const i=r.map(o=>o.type),s=n.map(o=>o.type),a=GL.filter(o=>s.includes(o.type)&&!i.includes(o.type));e.legend.additionalItems=a,t.legend.additionalItems=BL(a,r,"name")}}const b=(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},am=(e,t)=>t===Bt.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,ie=(e,t)=>{const{x0:n,x1:r,y0:i,y1:s}=am(e,t);return`M${n},${i}L${n},${s}L${r},${s}L${r},${i}L${n},${i}`};function Mn(e,t,n){return n===Bt.VERTICAL?[e,t]:[t,e]}function su(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function cs(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}function us(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?WL(o,d=>d.test(a)):zL(o,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function zL(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function WL(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function YL(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const o=t.slice(i.length);return{value:a,rest:o}}}const om=6048e5,qL=864e5,lm=6e4,cm=36e5,um=Symbol.for("constructDateFrom");function Ie(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&um in e?e[um](t):e instanceof Date?new e.constructor(t):new Date(t)}function ur(e,...t){const n=Ie.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}let XL={};function Za(){return XL}function $t(e,t){return Ie(t||e,e)}function hs(e,t){var o,l,c,u;const n=Za(),r=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,i=$t(e,t==null?void 0:t.in),s=i.getDay(),a=(s<r?7:0)+s-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}const jL={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"}},ZL=(e,t,n)=>{let r;const i=jL[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},KL={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},QL=(e,t,n,r)=>KL[e],JL={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},tR={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eR={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"]},nR={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"]},rR={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"}},iR={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"}},sR={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:cs({values:JL,defaultWidth:"wide"}),quarter:cs({values:tR,defaultWidth:"wide",argumentCallback:e=>e-1}),month:cs({values:eR,defaultWidth:"wide"}),day:cs({values:nR,defaultWidth:"wide"}),dayPeriod:cs({values:rR,defaultWidth:"wide",formattingValues:iR,defaultFormattingWidth:"wide"})},aR=/^(\d+)(th|st|nd|rd)?/i,oR=/\d+/i,lR={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},cR={any:[/^b/i,/^(a|c)/i]},uR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hR={any:[/1/i,/2/i,/3/i,/4/i]},dR={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},fR={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]},pR={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},gR={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]},mR={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},vR={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}},yR={ordinalNumber:YL({matchPattern:aR,parsePattern:oR,valueCallback:e=>parseInt(e,10)}),era:us({matchPatterns:lR,defaultMatchWidth:"wide",parsePatterns:cR,defaultParseWidth:"any"}),quarter:us({matchPatterns:uR,defaultMatchWidth:"wide",parsePatterns:hR,defaultParseWidth:"any",valueCallback:e=>e+1}),month:us({matchPatterns:dR,defaultMatchWidth:"wide",parsePatterns:fR,defaultParseWidth:"any"}),day:us({matchPatterns:pR,defaultMatchWidth:"wide",parsePatterns:gR,defaultParseWidth:"any"}),dayPeriod:us({matchPatterns:mR,defaultMatchWidth:"any",parsePatterns:vR,defaultParseWidth:"any"})},ER={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},bR={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xR={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_R={date:su({formats:ER,defaultWidth:"full"}),time:su({formats:bR,defaultWidth:"full"}),dateTime:su({formats:xR,defaultWidth:"full"})},hm={code:"en-US",formatDistance:ZL,formatLong:_R,formatRelative:QL,localize:sR,match:yR,options:{weekStartsOn:0,firstWeekContainsDate:1}},Zr={type:Le.END_LINE,threshold:16,numCharacter:14},SR={code:typeof navigator<"u"&&(navigator==null?void 0:navigator.language)||"en-US",number:(e,t=(navigator==null?void 0:navigator.language)||"en-US")=>e.toLocaleString(t),date:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleDateString(t,n),time:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleTimeString(t,n),optionsObject:{"15seconds":{primary:{"MMM d, pp":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"MMM d, h:mm:ss.SSS a":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},secondary:{pp:{hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"h:mm:ss.SSS a":{hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},type:"time"},minute:{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},"30minutes":{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},hourly:{primary:{"MMM d, hh a":{month:"short",day:"numeric",hour:"2-digit",hourCycle:"h12"}},secondary:{"hh a":{hour:"2-digit",hourCycle:"h12"}},type:"time"},daily:{primary:{"MMM d":{month:"short",day:"numeric"}},secondary:{d:{day:"numeric"}},type:"date"},weekly:{primary:{"eee, MMM d":{weekday:"short",month:"short",day:"numeric"}},secondary:{eee:{weekday:"short"}},type:"date"},monthly:{primary:{"MMM yyyy":{month:"short",year:"numeric"}},secondary:{MMM:{month:"short"}},type:"date"},quarterly:{primary:{},secondary:{},type:"date"},yearly:{primary:{yyyy:{year:"numeric"}},secondary:{yyyy:{year:"numeric"}},type:"date"}},translations:{group:"Group",total:"Total",meter:{title:""},tabularRep:{title:"Tabular representation",downloadAsCSV:"Download as CSV"},toolbar:{exportAsCSV:"Export to CSV",exportAsJPG:"Export to JPG",exportAsPNG:"Export to PNG",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoom:"Reset zoom",moreOptions:"More options",makeFullScreen:"Make fullscreen",exitFullScreen:"Exit fullscreen",showAsTable:"Show as table"}}},TR={enabled:!0,position:Wr.BOTTOM,clickable:!0,truncation:Zr,alignment:Ht.LEFT,order:null,additionalItems:[]},OR={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},wR={enabled:!0},dm={enabled:!0,showTotal:!0,truncation:Zr,groupLabel:"Group"},fm={top:{visible:!0,includeZero:!0,truncation:Zr},bottom:{visible:!0,includeZero:!0,truncation:Zr},left:{visible:!0,includeZero:!0,truncation:Zr},right:{visible:!0,includeZero:!0,truncation:Zr}},Ka={addSpaceOnEdges:1,showDayName:!1,localeObject:hm,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"}}};let pm=!1;try{pm=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(e){console.warn("Fullscreen capabilities check failed: ",e.message)}const ee={width:null,height:null,resizable:!0,theme:nu.WHITE,tooltip:dm,legend:TR,locale:SR,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:xt.SHOW_AS_DATATABLE},...pm?[{type:xt.MAKE_FULLSCREEN}]:[],{type:xt.EXPORT_CSV},{type:xt.EXPORT_PNG},{type:xt.EXPORT_JPG}]}},gm=lt({},ee,{thematic:{projection:rn.geoNaturalEarth1}}),ds=lt({},ee,{axes:fm,timeScale:Ka,grid:OR,ruler:wR,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:ze.GRAPH_VIEW}}}),hr=lt({},ds,{bars:{maxWidth:16,spacingFactor:.25},timeScale:lt(Ka,{addSpaceOnEdges:1})}),MR=lt({},hr,{}),AR=lt({},hr,{}),CR=lt({},hr,{bars:lt({},hr.bars,{dividerSize:1.5})}),DR=lt({},hr,{}),au=lt({},ds,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),LR=au,mm=lt({},au,{points:{radius:3,filled:!1,enabled:!0}}),vm=lt({},mm,{timeScale:lt(Ka,{addSpaceOnEdges:0})}),RR=vm,IR=lt({},ds,{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:Vt.RADIUS,name:"Radius"}]}}),kR=lt({},ds,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:Vt.AREA,name:"Poor area"},{type:Vt.AREA,name:"Satisfactory area"},{type:Vt.AREA,name:"Great area"},{type:Vt.QUARTILE,name:"Quartiles"}]}}),PR=lt({},hr,{bars:{dividerSize:1.5},timeScale:lt(Ka,{addSpaceOnEdges:0})}),NR=lt({},ee,{tooltip:lt({},dm,{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"}}),ym=lt({},ee,{pie:{labels:{formatter:null,enabled:!0},alignment:Ht.LEFT,sortFunction:null,valueMapsTo:"value"}}),$R=lt({},ee,{legend:{enabled:!1},gauge:{type:lr.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,alignment:Ht.LEFT}}),FR=lt({},ym,{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)},alignment:Ht.LEFT}}),Em=lt({},ee,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),UR=lt({},Em,{legend:{enabled:!0}}),BR=lt({},ee,{radar:{axes:{angle:"key",value:"value"},alignment:Ht.LEFT},tooltip:{gridline:{enabled:!0}}}),HR=lt({},hr,{comboChartTypes:[]}),GR=lt({tree:{type:qa.TREE}},ee,{}),VR=lt({},ee,{data:lt(ee.data,{groupMapsTo:"name"})}),zR=lt({},ee,jr,{data:lt(ee.data,{groupMapsTo:"name"})}),WR=lt({},ee,{alluvial:{data:lt(ee.data,{groupMapsTo:"source"}),nodeAlignment:Ht.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),YR=lt({},ee,{axes:fm,heatmap:{divider:{state:qr.AUTO},colorLegend:{type:"linear"}}}),qR=lt({},gm,{choropleth:{colorLegend:{type:"linear"}}}),Mt={alluvialChart:WR,areaChart:vm,axisChart:ds,boxplotChart:DR,bubbleChart:IR,bulletChart:kR,chart:ee,circlePackChart:zR,choroplethChart:qR,comboChart:HR,donutChart:FR,gaugeChart:$R,groupedBarChart:AR,heatmapChart:YR,histogramChart:PR,lineChart:mm,lollipopChart:LR,meterChart:Em,pieChart:ym,proportionalMeterChart:UR,radarChart:BR,scatterChart:au,simpleBarChart:MR,stackedAreaChart:RR,stackedBarChart:CR,thematicChart:gm,treeChart:GR,treemapChart:VR,wordCloudChart:NR};function bm(e){const t=$t(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function xm(e,t){const n=$t(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function _m(e,t,n){const[r,i]=ur(n==null?void 0:n.in,e,t),s=xm(r),a=xm(i),o=+s-bm(s),l=+a-bm(a);return Math.round((o-l)/qL)}function XR(e,t){const n=$t(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function jR(e,t){const n=$t(e,t==null?void 0:t.in);return _m(n,XR(n))+1}function Qa(e,t){return hs(e,{...t,weekStartsOn:1})}function Sm(e,t){const n=$t(e,t==null?void 0:t.in),r=n.getFullYear(),i=Ie(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=Qa(i),a=Ie(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const o=Qa(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=o.getTime()?r:r-1}function ZR(e,t){const n=Sm(e,t),r=Ie(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Qa(r)}function KR(e,t){const n=$t(e,t==null?void 0:t.in),r=+Qa(n)-+ZR(n);return Math.round(r/om)+1}function Tm(e,t){var u,d,h,f;const n=$t(e,t==null?void 0:t.in),r=n.getFullYear(),i=Za(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((f=(h=i.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=Ie((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const o=hs(a,t),l=Ie((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=hs(l,t);return+n>=+o?r+1:+n>=+c?r:r-1}function QR(e,t){var o,l,c,u;const n=Za(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,i=Tm(e,t),s=Ie((t==null?void 0:t.in)||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),hs(s,t)}function JR(e,t){const n=$t(e,t==null?void 0:t.in),r=+hs(n,t)-+QR(n,t);return Math.round(r/om)+1}function Tt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const $n={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Tt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Tt(n+1,2)},d(e,t){return Tt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Tt(e.getHours()%12||12,t.length)},H(e,t){return Tt(e.getHours(),t.length)},m(e,t){return Tt(e.getMinutes(),t.length)},s(e,t){return Tt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Tt(i,t.length)}},Kr={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Om={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return $n.y(e,t)},Y:function(e,t,n,r){const i=Tm(e,r),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return Tt(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Tt(s,t.length)},R:function(e,t){const n=Sm(e);return Tt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Tt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Tt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Tt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return $n.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Tt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=JR(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Tt(i,t.length)},I:function(e,t,n){const r=KR(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Tt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):$n.d(e,t)},D:function(e,t,n){const r=jR(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Tt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Tt(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Tt(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Tt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Kr.noon:r===0?i=Kr.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Kr.evening:r>=12?i=Kr.afternoon:r>=4?i=Kr.morning:i=Kr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return $n.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):$n.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Tt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Tt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):$n.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):$n.s(e,t)},S:function(e,t){return $n.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Mm(r);case"XXXX":case"XX":return dr(r);case"XXXXX":case"XXX":default:return dr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Mm(r);case"xxxx":case"xx":return dr(r);case"xxxxx":case"xxx":default:return dr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wm(r,":");case"OOOO":default:return"GMT"+dr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wm(r,":");case"zzzz":default:return"GMT"+dr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Tt(r,t.length)},T:function(e,t,n){return Tt(+e,t.length)}};function wm(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+Tt(s,2)}function Mm(e,t){return e%60===0?(e>0?"-":"+")+Tt(Math.abs(e)/60,2):dr(e,t)}function dr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Tt(Math.trunc(r/60),2),s=Tt(r%60,2);return n+i+t+s}const Am=(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"})}},Cm=(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"})}},tI={p:Cm,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Am(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Am(r,t)).replace("{{time}}",Cm(i,t))}},eI=/^D+$/,nI=/^Y+$/,rI=["D","DD","YY","YYYY"];function iI(e){return eI.test(e)}function sI(e){return nI.test(e)}function aI(e,t,n){const r=oI(e,t,n);if(console.warn(r),rI.includes(e))throw new RangeError(r)}function oI(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function lI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function cI(e){return!(!lI(e)&&typeof e!="number"||isNaN(+$t(e)))}const uI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,hI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dI=/^'([^]*?)'?$/,fI=/''/g,pI=/[a-zA-Z]/;function ou(e,t,n){var u,d,h,f,p,g,m,v;const r=Za(),i=(n==null?void 0:n.locale)??r.locale??hm,s=(n==null?void 0:n.firstWeekContainsDate)??((d=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((g=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((v=(m=r.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??0,o=$t(e,n==null?void 0:n.in);if(!cI(o))throw new RangeError("Invalid time value");let l=t.match(hI).map(E=>{const y=E[0];if(y==="p"||y==="P"){const x=tI[y];return x(E,i.formatLong)}return E}).join("").match(uI).map(E=>{if(E==="''")return{isToken:!1,value:"'"};const y=E[0];if(y==="'")return{isToken:!1,value:gI(E)};if(Om[y])return{isToken:!0,value:E};if(y.match(pI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:E}});i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const c={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return l.map(E=>{if(!E.isToken)return E.value;const y=E.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&sI(y)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&iI(y))&&aI(y,t,String(e));const x=Om[y[0]];return x(o,y,i.localize,c)}).join("")}function gI(e){const t=e.match(dI);return t?t[1].replace(fI,"'"):e}var Dm=(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))(Dm||{});const lu=[["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 Lm(e,t,n,r,i){const s=t===0,a=Number(ou(new Date(e),"c"))===2,o=Number(ou(new Date(e),"q"))===1,l=t!==0?n[t-1]:null;switch(r){case"15seconds":return s||to(e)||fs(e,l)||Fn(e);case"minute":return s||to(e)||fs(e,l)||Fn(e);case"30minutes":return s||to(e)||fs(e,l)||Fn(e);case"hourly":return s||to(e)||fs(e,l)||Fn(e);case"daily":return i?s||a||Fn(e):s||fs(e,l)||Fn(e);case"weekly":return s||a||Fn(e);case"monthly":return s||Fn(e);case"quarterly":return s||o;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function cu(e,t,n,r,i,s){const a=i.showDayName,o=r==="daily"&&a?"weekly":r,l=new Date(e),c=b(i,"timeIntervalFormats")[o],u=b(c,"primary"),d=b(c,"secondary"),h=Lm(e,t,n,r,a);let f=h?u:d;r==="15seconds"&&l.getMilliseconds()!==0&&(f=f.replace("pp","h:mm:ss.SSS a"));const p=i.localeObject,{code:g,optionsObject:m}=s,v=m[r].type,E=m[r][h?"primary":"secondary"][f];if(r==="quarterly"||!E){const x=ou(l,f,{locale:p}).split("").map(S=>{const _=Number(S);return S!==" "&&!Number.isNaN(_)?_.toLocaleString(g):S});return s[v](l,g,{},x.join(""))}else return s[v](l,g,E)}function Ja(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function mI(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function vI(e){const t=lu.reduce((n,[,r],i)=>{const s=lu[n][1],a=Math.abs(s-e),o=Math.abs(r-e);return a<o?n:i},0);return lu[t][0]}function uu(e,t){if(Dm[t])return t;if(e.length===1)return"15seconds";const n=mI(e),r=In(n);return vI(r)}function to(e){const{s:t,m:n,H:r}=Ja(e);return r===0&&n===0&&t===0}function fs(e,t){const n=Ja(e).M,r=Ja(t).M;return n!==r}function Fn(e){const{M:t,d:n,s:r,m:i,H:s}=Ja(e);return t===1&&n===1&&s===0&&i===0&&r===0}function Rm(e){return e===void 0?"":e.toISOString()}function yI(e){const t=e.trim();return["=","+","-","@"," ","\r"].includes(t.charAt(0))?` ${t}`:/[,\"\n]/.test(t)?`"${t}"`:t}class sn{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}formatTable({headers:t,cells:n}){const r=this.getOptions(),{code:i,date:s,number:a}=b(r,"locale"),o=b(r,"tabularRepModal","tableHeadingFormatter"),l=b(r,"tabularRepModal","tableCellFormatter"),{cartesianScales:c}=this.services,u=c==null?void 0:c.getDomainAxisScaleType();let d;return u===Q.TIME&&(d=f=>s(f,i,{month:"short",day:"numeric",year:"numeric"})),[typeof o=="function"?o(t):t,...typeof l=="function"?l(n):n.map(f=>{d&&(f[1]=d(f[1]));for(const p in f){const g=f[p];typeof g=="number"&&(f[p]=a(g,i))}return f})]}getAllDataFromDomain(t){if(!this.getData())return null;const n=this.getOptions();let r=this.getData();const i=this.getDataGroups(),{groupMapsTo:s}=b(n,"data"),a=b(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===Q.LINEAR||c===Q.LOG)&&(r=r.map(u=>({...u,[l]:u[l]===null?u[l]:Number(u[l])}))),l&&a[o].domain)if(c===Q.LABELS)r=r.filter(u=>a[o].domain.includes(u[l]));else{const[u,d]=a[o].domain;r=r.filter(h=>!(l in h)||h[l]>=u&&h[l]<=d)}}),r.filter(o=>i.find(l=>l.name===o[s]))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:n}=Pt.items.status,r=this.getDataGroups(t),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(t).filter(a=>r.find(o=>o.name===a[i]&&o.status===n))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const n=this.sanitize(Sn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),n}getDataGroups(t){return b(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(r=>t.includes(r.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=Pt.items.status;return this.getDataGroups(t).filter(r=>r.status===n)}getDataGroupNames(t){return this.getDataGroups(t).map(r=>r.name)}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map(r=>r.name)}aggregateBinDataByGroup(t){return SL(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=HL.defaultBins}=s,l=Array.isArray(o),c=B0().value(f=>f[i]).thresholds(o)(t);if(l)c[c.length-1].x1=o[o.length-1];else{const f=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+f}const u=l?[o[0],o[o.length-1]]:[c[0].x0,c[c.length-1].x1],d=Array.from(new Set(t.map(f=>f[a]))),h=[];return c.forEach(f=>{const p=`${f.x0}-${f.x1}`,g=this.aggregateBinDataByGroup(f);d.forEach(m=>{h.push({group:m,key:p,value:g[m]||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 ac().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=es(i.map(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return l[c]instanceof Date?Rm(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===Q.TIME?s.sort((l,c)=>{const u=new Date(l),d=new Date(c);return u-d}):(o===Q.LOG||o===Q.LINEAR)&&s.sort((l,c)=>l-c),s}getDataValuesGroupedByKeys({bins:t=null,groups:n=null}){const r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.getDisplayData(n),a=this.getDataGroupNames(),o=this.getStackKeys({bins:t,groups:n});return t?o.map(l=>{const[c,u]=l.split(":"),d={x0:c,x1:u},h=t.find(f=>f.x0.toString()===c.toString());return a.forEach(f=>{d[f]=h.filter(p=>p[i]===f).length}),d}):o.map(l=>{const c={sharedStackKey:l};return a.forEach(u=>{const d=s.find(f=>{const p=this.services.cartesianScales.getDomainIdentifier(f);return f[i]===u&&Object.prototype.hasOwnProperty.call(f,p)&&(f[p]instanceof Date?Rm(f[p])===l:f[p].toString()===l)}),h=this.services.cartesianScales.getRangeIdentifier(c);c[u]=d?d[h]:null}),c})}getStackedData({percentage:t=!1,groups:n=null,divergent:r=!1}){const i=this.getOptions(),{groupMapsTo:s}=i.data,a=this.getActiveDataGroupNames(n),o=this.getDataValuesGroupedByKeys({groups:n});if(t){const c=bL(o.map(u=>[u.sharedStackKey,0]));o.forEach(u=>{a.forEach(d=>{c[u.sharedStackKey]+=u[d]})}),o.forEach(u=>{a.forEach(d=>{const h=c[u.sharedStackKey];c[u.sharedStackKey]?u[d]=u[d]/h*100:u[d]=0})})}return(r?ac().offset(WT):ac()).keys(a)(o).map((c,u)=>Object.keys(c).filter(d=>!isNaN(d)).map(d=>{const h=c[d];return h[s]=a[u],h}))}getOptions(){return this.state.options}set(t,n){this.state=Object.assign({},this.state,t);const r=Object.assign({skipUpdate:!1,animate:!0},n);r.skipUpdate||this.update(r.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const n=this.getOptions();iu(n,t),this.set({options:lt(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(T.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:r}=Pt.items.status,i=this.getDataGroups(),s=i.some(u=>u.status===r),a=i.filter(u=>u.status===n);if(s)if(a.length===1&&a[0].name===t)i.forEach((u,d)=>{i[d].status=n});else{const u=i.findIndex(d=>d.name===t);i[u].status=i[u].status===r?n:r}else i.forEach((u,d)=>{i[d].status=u.name===t?n:r});const o=i.filter(u=>u.status===n),l=this.getOptions();i.some(u=>u.status===r)?l.data.selectedGroups=o.map(u=>u.name):l.data.selectedGroups=[],this.services.events.dispatchEvent(T.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})}getIsFilled(t,n,r,i){const s=this.getOptions();return s.getIsFilled?s.getIsFilled(t,n,r,i):i}getFillColor(t,n,r){const i=this.getOptions(),s=b(this.colorScale,t);return i.getFillColor?i.getFillColor(t,n,r,s):s}getStrokeColor(t,n,r){const i=this.getOptions(),s=b(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,n,r,s):s}isUserProvidedColorScaleValid(){const t=b(this.getOptions(),"color","scale"),n=this.getDataGroups();return t==null||Object.keys(t).length==0?!1:n.some(r=>Object.keys(t).includes(r.name))}getColorClassName(t){const n=this.colorClassNames(t.dataGroupName);let r=t.originalClassName;return t.classNameTypes.forEach(i=>r=t.originalClassName?`${r} ${i}-${n}`:`${i}-${n}`),r||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://charts.carbondesignsystem.com/");const n=[],{datasets:r,labels:i}=t;return r.forEach(s=>{s.data.forEach((a,o)=>{let l;const c=b(s,"label");if(c===null){const d=b(i,o);d?l=d:l="Ungrouped"}else l=c;const u={group:l,key:i[o]};isNaN(a)?(u.value=a.value,u.date=a.date):u.value=a,n.push(u)})}),n}getTabularDataArray(){return[]}exportToCSV(){const n=this.getTabularDataArray().map(a=>a.map(o=>`"${(o==="–"?"–":o).split(/[,;'"`]/).map(u=>yI(u)).join("")}"`)).map(a=>a.join(",")).join(`
|
|
1
|
+
(function(W,Pe){typeof exports=="object"&&typeof module<"u"?Pe(exports):typeof define=="function"&&define.amd?define(["exports"],Pe):(W=typeof globalThis<"u"?globalThis:W||self,Pe(W.Charts={}))})(this,function(W){"use strict";function Pe(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function S0(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Do(e){let t,n,r;e.length!==2?(t=Pe,n=(o,l)=>Pe(e(o),l),r=(o,l)=>e(o)-l):(t=e===Pe||e===S0?e:T0,n=e,r=e);function i(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<0?c=d+1:u=d}while(c<u)}return c}function s(o,l,c=0,u=o.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(o[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(o,l,c=0,u=o.length){const d=i(o,l,c,u-1);return d>c&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:i,center:a,right:s}}function T0(){return 0}function O0(e){return e===null?NaN:+e}function*w0(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Lo=Do(Pe).right;Do(O0).center;function M0(e,t){let n=0;for(let r of e)r!=null&&(r=+r)>=r&&++n;return n}function Ne(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 Gn{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 sh extends Map{constructor(t,n=D0){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(ah(this,t))}has(t){return super.has(ah(this,t))}set(t,n){return super.set(A0(this,t),n)}delete(t){return super.delete(C0(this,t))}}function ah({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function A0({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function C0({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function D0(e){return e!==null&&typeof e=="object"?e.valueOf():e}function L0(e){return e}function R0(e=Pe){if(e===Pe)return oh;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 oh(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var I0=Array.prototype,k0=I0.slice;function Ro(e){return()=>e}const P0=Math.sqrt(50),N0=Math.sqrt(10),$0=Math.sqrt(2);function Ms(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>=P0?10:s>=N0?5:s>=$0?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?Ms(e,t,n*2):[o,l,c]}function As(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?Ms(t,e,n):Ms(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 mr(e,t,n){return t=+t,e=+e,n=+n,Ms(e,t,n)[2]}function Io(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?mr(t,e,n):mr(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function F0(e,t,n){let r;for(;;){const i=mr(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 U0(e){return Math.max(1,Math.ceil(Math.log(M0(e))/Math.LN2)+1)}function B0(){var e=L0,t=Ne,n=U0;function r(i){Array.isArray(i)||(i=Array.from(i));var s,a=i.length,o,l,c=new Array(a);for(s=0;s<a;++s)c[s]=e(i[s],s,i);var u=t(c),d=u[0],h=u[1],f=n(c,d,h);if(!Array.isArray(f)){const y=h,x=+f;if(t===Ne&&([d,h]=F0(d,h,x)),f=As(d,h,x),f[0]<=d&&(l=mr(d,h,x)),f[f.length-1]>=h)if(y>=h&&t===Ne){const S=mr(d,h,x);isFinite(S)&&(S>0?h=(Math.floor(h/S)+1)*S:S<0&&(h=(Math.ceil(h*-S)+1)/-S))}else f.pop()}for(var p=f.length,g=0,m=p;f[g]<=d;)++g;for(;f[m-1]>h;)--m;(g||m<p)&&(f=f.slice(g,m),p=m-g);var v=new Array(p+1),E;for(s=0;s<=p;++s)E=v[s]=[],E.x0=s>0?f[s-1]:d,E.x1=s<p?f[s]:h;if(isFinite(l)){if(l>0)for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&v[Math.min(p,Math.floor((o-d)/l))].push(i[s]);else if(l<0){for(s=0;s<a;++s)if((o=c[s])!=null&&d<=o&&o<=h){const y=Math.floor((d-o)*l);v[Math.min(p,y+(f[y]<=o))].push(i[s])}}}else for(s=0;s<a;++s)(o=c[s])!=null&&d<=o&&o<=h&&v[Lo(f,o,0,p)].push(i[s]);return v}return r.value=function(i){return arguments.length?(e=typeof i=="function"?i:Ro(i),r):e},r.domain=function(i){return arguments.length?(t=typeof i=="function"?i:Ro([i[0],i[1]]),r):t},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Ro(Array.isArray(i)?k0.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 In(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function lh(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?oh:R0(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),f=Math.max(n,Math.floor(t-c*d/l+h)),p=Math.min(r,Math.floor(t+(l-c)*d/l+h));lh(e,t,f,p,i)}const s=e[t];let a=n,o=r;for(ci(e,n,t),i(e[r],s)>0&&ci(e,n,r);a<o;){for(ci(e,a,o),++a,--o;i(e[a],s)<0;)++a;for(;i(e[o],s)>0;)--o}i(e[n],s)===0?ci(e,n,o):(++o,ci(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function ci(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function ko(e,t,n){if(e=Float64Array.from(w0(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return In(e);if(t>=1)return Vn(e);var r,i=(r-1)*t,s=Math.floor(i),a=Vn(lh(e,s).subarray(0,s+1)),o=In(e.subarray(s+1));return a+(o-a)*(i-s)}}function*H0(e){for(const t of e)yield*t}function ch(e){return Array.from(H0(e))}function G0(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 V0(e){return e}var Cs=1,Ds=2,Po=3,ui=4,uh=1e-6;function z0(e){return"translate("+e+",0)"}function W0(e){return"translate(0,"+e+")"}function Y0(e){return t=>+e(t)}function q0(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function X0(){return!this.__axis}function Ls(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===ui?-1:1,u=e===ui||e===Ds?"x":"y",d=e===Cs||e===Po?z0:W0;function h(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),g=i??(t.tickFormat?t.tickFormat.apply(t,n):V0),m=Math.max(s,0)+o,v=t.range(),E=+v[0]+l,y=+v[v.length-1]+l,x=(t.bandwidth?q0:Y0)(t.copy(),l),S=f.selection?f.selection():f,_=S.selectAll(".domain").data([null]),A=S.selectAll(".tick").data(p,t).order(),L=A.exit(),B=A.enter().append("g").attr("class","tick"),k=A.select("line"),O=A.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(B),k=k.merge(B.append("line").attr("stroke","currentColor").attr(u+"2",c*s)),O=O.merge(B.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===Cs?"0em":e===Po?"0.71em":"0.32em")),f!==S&&(_=_.transition(f),A=A.transition(f),k=k.transition(f),O=O.transition(f),L=L.transition(f).attr("opacity",uh).attr("transform",function(H){return isFinite(H=x(H))?d(H+l):this.getAttribute("transform")}),B.attr("opacity",uh).attr("transform",function(H){var P=this.parentNode.__axis;return d((P&&isFinite(P=P(H))?P:x(H))+l)})),L.remove(),_.attr("d",e===ui||e===Ds?a?"M"+c*a+","+E+"H"+l+"V"+y+"H"+c*a:"M"+l+","+E+"V"+y:a?"M"+E+","+c*a+"V"+l+"H"+y+"V"+c*a:"M"+E+","+l+"H"+y),A.attr("opacity",1).attr("transform",function(H){return d(x(H)+l)}),k.attr(u+"2",c*s),O.attr(u,c*m).text(g),S.filter(X0).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===Ds?"start":e===ui?"end":"middle"),S.each(function(){this.__axis=x})}return h.scale=function(f){return arguments.length?(t=f,h):t},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(f){return arguments.length?(n=f==null?[]:Array.from(f),h):n.slice()},h.tickValues=function(f){return arguments.length?(r=f==null?null:Array.from(f),h):r&&r.slice()},h.tickFormat=function(f){return arguments.length?(i=f,h):i},h.tickSize=function(f){return arguments.length?(s=a=+f,h):s},h.tickSizeInner=function(f){return arguments.length?(s=+f,h):s},h.tickSizeOuter=function(f){return arguments.length?(a=+f,h):a},h.tickPadding=function(f){return arguments.length?(o=+f,h):o},h.offset=function(f){return arguments.length?(l=+f,h):l},h}function j0(e){return Ls(Cs,e)}function Z0(e){return Ls(Ds,e)}function No(e){return Ls(Po,e)}function hh(e){return Ls(ui,e)}var K0={value:()=>{}};function $o(){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 Rs(n)}function Rs(e){this._=e}function Q0(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}})}Rs.prototype=$o.prototype={constructor:Rs,on:function(e,t){var n=this._,r=Q0(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=J0(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<a;)if(i=(e=r[s]).type)n[i]=dh(n[i],e.name,t);else if(t==null)for(i in n)n[i]=dh(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 Rs(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function J0(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function dh(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=K0,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Fo="http://www.w3.org/1999/xhtml";const fh={svg:"http://www.w3.org/2000/svg",xhtml:Fo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Is(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),fh.hasOwnProperty(t)?{space:fh[t],local:e}:e}function ty(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Fo&&t.documentElement.namespaceURI===Fo?t.createElement(e):t.createElementNS(n,e)}}function ey(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ph(e){var t=Is(e);return(t.local?ey:ty)(t)}function ny(){}function Uo(e){return e==null?ny:function(){return this.querySelector(e)}}function ry(e){typeof e!="function"&&(e=Uo(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 ve(r,this._parents)}function iy(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function sy(){return[]}function gh(e){return e==null?sy:function(){return this.querySelectorAll(e)}}function ay(e){return function(){return iy(e.apply(this,arguments))}}function oy(e){typeof e=="function"?e=ay(e):e=gh(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 ve(r,i)}function mh(e){return function(){return this.matches(e)}}function vh(e){return function(t){return t.matches(e)}}var ly=Array.prototype.find;function cy(e){return function(){return ly.call(this.children,e)}}function uy(){return this.firstElementChild}function hy(e){return this.select(e==null?uy:cy(typeof e=="function"?e:vh(e)))}var dy=Array.prototype.filter;function fy(){return Array.from(this.children)}function py(e){return function(){return dy.call(this.children,e)}}function gy(e){return this.selectAll(e==null?fy:py(typeof e=="function"?e:vh(e)))}function my(e){typeof e!="function"&&(e=mh(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 ve(r,this._parents)}function yh(e){return new Array(e.length)}function vy(){return new ve(this._enter||this._groups.map(yh),this._parents)}function ks(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ks.prototype={constructor:ks,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 yy(e){return function(){return e}}function Ey(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 ks(e,s[a]);for(;a<l;++a)(o=t[a])&&(i[a]=o)}function by(e,t,n,r,i,s,a){var o,l,c=new Map,u=t.length,d=s.length,h=new Array(u),f;for(o=0;o<u;++o)(l=t[o])&&(h[o]=f=a.call(l,l.__data__,o,t)+"",c.has(f)?i[o]=l:c.set(f,l));for(o=0;o<d;++o)f=a.call(e,s[o],o,s)+"",(l=c.get(f))?(r[o]=l,l.__data__=s[o],c.delete(f)):n[o]=new ks(e,s[o]);for(o=0;o<u;++o)(l=t[o])&&c.get(h[o])===l&&(i[o]=l)}function xy(e){return e.__data__}function _y(e,t){if(!arguments.length)return Array.from(this,xy);var n=t?by:Ey,r=this._parents,i=this._groups;typeof e!="function"&&(e=yy(e));for(var s=i.length,a=new Array(s),o=new Array(s),l=new Array(s),c=0;c<s;++c){var u=r[c],d=i[c],h=d.length,f=Sy(e.call(u,u&&u.__data__,c,r)),p=f.length,g=o[c]=new Array(p),m=a[c]=new Array(p),v=l[c]=new Array(h);n(u,d,g,m,v,f,t);for(var E=0,y=0,x,S;E<p;++E)if(x=g[E]){for(E>=y&&(y=E+1);!(S=m[y])&&++y<p;);x._next=S||null}}return a=new ve(a,r),a._enter=o,a._exit=l,a}function Sy(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ty(){return new ve(this._exit||this._groups.map(yh),this._parents)}function Oy(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 wy(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,a=Math.min(i,s),o=new Array(i),l=0;l<a;++l)for(var c=n[l],u=r[l],d=c.length,h=o[l]=new Array(d),f,p=0;p<d;++p)(f=c[p]||u[p])&&(h[p]=f);for(;l<i;++l)o[l]=n[l];return new ve(o,this._parents)}function My(){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 Ay(e){e||(e=Cy);function t(d,h){return d&&h?e(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var a=n[s],o=a.length,l=i[s]=new Array(o),c,u=0;u<o;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new ve(i,this._parents).order()}function Cy(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Dy(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ly(){return Array.from(this)}function Ry(){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 Iy(){let e=0;for(const t of this)++e;return e}function ky(){return!this.node()}function Py(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 Ny(e){return function(){this.removeAttribute(e)}}function $y(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Fy(e,t){return function(){this.setAttribute(e,t)}}function Uy(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function By(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Hy(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 Gy(e,t){var n=Is(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?$y:Ny:typeof t=="function"?n.local?Hy:By:n.local?Uy:Fy)(n,t))}function Eh(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Vy(e){return function(){this.style.removeProperty(e)}}function zy(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Wy(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Yy(e,t,n){return arguments.length>1?this.each((t==null?Vy:typeof t=="function"?Wy:zy)(e,t,n??"")):vr(this.node(),e)}function vr(e,t){return e.style.getPropertyValue(t)||Eh(e).getComputedStyle(e,null).getPropertyValue(t)}function qy(e){return function(){delete this[e]}}function Xy(e,t){return function(){this[e]=t}}function jy(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Zy(e,t){return arguments.length>1?this.each((t==null?qy:typeof t=="function"?jy:Xy)(e,t)):this.node()[e]}function bh(e){return e.trim().split(/^|\s+/)}function Bo(e){return e.classList||new xh(e)}function xh(e){this._node=e,this._names=bh(e.getAttribute("class")||"")}xh.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 _h(e,t){for(var n=Bo(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Sh(e,t){for(var n=Bo(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ky(e){return function(){_h(this,e)}}function Qy(e){return function(){Sh(this,e)}}function Jy(e,t){return function(){(t.apply(this,arguments)?_h:Sh)(this,e)}}function t1(e,t){var n=bh(e+"");if(arguments.length<2){for(var r=Bo(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Jy:t?Ky:Qy)(n,t))}function e1(){this.textContent=""}function n1(e){return function(){this.textContent=e}}function r1(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function i1(e){return arguments.length?this.each(e==null?e1:(typeof e=="function"?r1:n1)(e)):this.node().textContent}function s1(){this.innerHTML=""}function a1(e){return function(){this.innerHTML=e}}function o1(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function l1(e){return arguments.length?this.each(e==null?s1:(typeof e=="function"?o1:a1)(e)):this.node().innerHTML}function c1(){this.nextSibling&&this.parentNode.appendChild(this)}function u1(){return this.each(c1)}function h1(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function d1(){return this.each(h1)}function f1(e){var t=typeof e=="function"?e:ph(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function p1(){return null}function g1(e,t){var n=typeof e=="function"?e:ph(e),r=t==null?p1:typeof t=="function"?t:Uo(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function m1(){var e=this.parentNode;e&&e.removeChild(this)}function v1(){return this.each(m1)}function y1(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function E1(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function b1(e){return this.select(e?E1:y1)}function x1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function _1(e){return function(t){e.call(this,t,this.__data__)}}function S1(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 T1(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 O1(e,t,n){return function(){var r=this.__on,i,s=_1(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 w1(e,t,n){var r=S1(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?O1:T1,i=0;i<s;++i)this.each(o(r[i],t,n));return this}function Th(e,t,n){var r=Eh(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 M1(e,t){return function(){return Th(this,e,t)}}function A1(e,t){return function(){return Th(this,e,t.apply(this,arguments))}}function C1(e,t){return this.each((typeof t=="function"?A1:M1)(e,t))}function*D1(){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 Oh=[null];function ve(e,t){this._groups=e,this._parents=t}function hi(){return new ve([[document.documentElement]],Oh)}function L1(){return this}ve.prototype=hi.prototype={constructor:ve,select:ry,selectAll:oy,selectChild:hy,selectChildren:gy,filter:my,data:_y,enter:vy,exit:Ty,join:Oy,merge:wy,selection:L1,order:My,sort:Ay,call:Dy,nodes:Ly,node:Ry,size:Iy,empty:ky,each:Py,attr:Gy,style:Yy,property:Zy,classed:t1,text:i1,html:l1,raise:u1,lower:d1,append:f1,insert:g1,remove:v1,clone:b1,datum:x1,on:w1,dispatch:C1,[Symbol.iterator]:D1};function R(e){return typeof e=="string"?new ve([[document.querySelector(e)]],[document.documentElement]):new ve([[e]],Oh)}function R1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function zn(e,t){if(e=R1(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 Ho={capture:!0,passive:!1};function Go(e){e.preventDefault(),e.stopImmediatePropagation()}function I1(e){var t=e.document.documentElement,n=R(e).on("dragstart.drag",Go,Ho);"onselectstart"in t?n.on("selectstart.drag",Go,Ho):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function k1(e,t){var n=e.document.documentElement,r=R(e).on("dragstart.drag",null);t&&(r.on("click.drag",Go,Ho),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 Vo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function wh(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function di(){}var fi=.7,Ps=1/fi,yr="\\s*([+-]?\\d+)\\s*",pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",P1=/^#([0-9a-f]{3,8})$/,N1=new RegExp(`^rgb\\(${yr},${yr},${yr}\\)$`),$1=new RegExp(`^rgb\\(${je},${je},${je}\\)$`),F1=new RegExp(`^rgba\\(${yr},${yr},${yr},${pi}\\)$`),U1=new RegExp(`^rgba\\(${je},${je},${je},${pi}\\)$`),B1=new RegExp(`^hsl\\(${pi},${je},${je}\\)$`),H1=new RegExp(`^hsla\\(${pi},${je},${je},${pi}\\)$`),Mh={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};Vo(di,hn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ah,formatHex:Ah,formatHex8:G1,formatHsl:V1,formatRgb:Ch,toString:Ch});function Ah(){return this.rgb().formatHex()}function G1(){return this.rgb().formatHex8()}function V1(){return kh(this).formatHsl()}function Ch(){return this.rgb().formatRgb()}function hn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=P1.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Dh(t):n===3?new ue(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ns(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ns(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=N1.exec(e))?new ue(t[1],t[2],t[3],1):(t=$1.exec(e))?new ue(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=F1.exec(e))?Ns(t[1],t[2],t[3],t[4]):(t=U1.exec(e))?Ns(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=B1.exec(e))?Ih(t[1],t[2]/100,t[3]/100,1):(t=H1.exec(e))?Ih(t[1],t[2]/100,t[3]/100,t[4]):Mh.hasOwnProperty(e)?Dh(Mh[e]):e==="transparent"?new ue(NaN,NaN,NaN,0):null}function Dh(e){return new ue(e>>16&255,e>>8&255,e&255,1)}function Ns(e,t,n,r){return r<=0&&(e=t=n=NaN),new ue(e,t,n,r)}function z1(e){return e instanceof di||(e=hn(e)),e?(e=e.rgb(),new ue(e.r,e.g,e.b,e.opacity)):new ue}function zo(e,t,n,r){return arguments.length===1?z1(e):new ue(e,t,n,r??1)}function ue(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Vo(ue,zo,wh(di,{brighter(e){return e=e==null?Ps:Math.pow(Ps,e),new ue(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?fi:Math.pow(fi,e),new ue(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ue(Wn(this.r),Wn(this.g),Wn(this.b),$s(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:Lh,formatHex:Lh,formatHex8:W1,formatRgb:Rh,toString:Rh}));function Lh(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}`}function W1(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}${Yn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Rh(){const e=$s(this.opacity);return`${e===1?"rgb(":"rgba("}${Wn(this.r)}, ${Wn(this.g)}, ${Wn(this.b)}${e===1?")":`, ${e})`}`}function $s(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Yn(e){return e=Wn(e),(e<16?"0":"")+e.toString(16)}function Ih(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new $e(e,t,n,r)}function kh(e){if(e instanceof $e)return new $e(e.h,e.s,e.l,e.opacity);if(e instanceof di||(e=hn(e)),!e)return new $e;if(e instanceof $e)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 $e(a,o,l,e.opacity)}function Ph(e,t,n,r){return arguments.length===1?kh(e):new $e(e,t,n,r??1)}function $e(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Vo($e,Ph,wh(di,{brighter(e){return e=e==null?Ps:Math.pow(Ps,e),new $e(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?fi:Math.pow(fi,e),new $e(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 ue(Wo(e>=240?e-240:e+120,i,r),Wo(e,i,r),Wo(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new $e(Nh(this.h),Fs(this.s),Fs(this.l),$s(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=$s(this.opacity);return`${e===1?"hsl(":"hsla("}${Nh(this.h)}, ${Fs(this.s)*100}%, ${Fs(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Nh(e){return e=(e||0)%360,e<0?e+360:e}function Fs(e){return Math.max(0,Math.min(1,e||0))}function Wo(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 Yo=e=>()=>e;function Y1(e,t){return function(n){return e+n*t}}function q1(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 X1(e){return(e=+e)==1?$h:function(t,n){return n-t?q1(t,n,e):Yo(isNaN(t)?n:t)}}function $h(e,t){var n=t-e;return n?Y1(e,n):Yo(isNaN(e)?t:e)}const Us=function e(t){var n=X1(t);function r(i,s){var a=n((i=zo(i)).r,(s=zo(s)).r),o=n(i.g,s.g),l=n(i.b,s.b),c=$h(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 j1(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 Z1(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function K1(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]=gi(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 Q1(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ye(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function J1(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=gi(e[i],t[i]):r[i]=t[i];return function(s){for(i in n)r[i]=n[i](s);return r}}var qo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xo=new RegExp(qo.source,"g");function tE(e){return function(){return e}}function eE(e){return function(t){return e(t)+""}}function Fh(e,t){var n=qo.lastIndex=Xo.lastIndex=0,r,i,s,a=-1,o=[],l=[];for(e=e+"",t=t+"";(r=qo.exec(e))&&(i=Xo.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:ye(r,i)})),n=Xo.lastIndex;return n<t.length&&(s=t.slice(n),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?eE(l[0].x):tE(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)o[(d=l[u]).i]=d.x(c);return o.join("")})}function gi(e,t){var n=typeof t,r;return t==null||n==="boolean"?Yo(t):(n==="number"?ye:n==="string"?(r=hn(t))?(t=r,Us):Fh:t instanceof hn?Us:t instanceof Date?Q1:Z1(t)?j1:Array.isArray(t)?K1:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?J1:ye)(e,t)}function Uh(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Bh=180/Math.PI,jo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Hh(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)*Bh,skewX:Math.atan(l)*Bh,scaleX:a,scaleY:o}}var Bs;function nE(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?jo:Hh(t.a,t.b,t.c,t.d,t.e,t.f)}function rE(e){return e==null||(Bs||(Bs=document.createElementNS("http://www.w3.org/2000/svg","g")),Bs.setAttribute("transform",e),!(e=Bs.transform.baseVal.consolidate()))?jo:(e=e.matrix,Hh(e.a,e.b,e.c,e.d,e.e,e.f))}function Gh(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function s(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push("translate(",null,t,null,n);p.push({i:g-4,x:ye(c,d)},{i:g-2,x:ye(u,h)})}else(d||h)&&f.push("translate("+d+t+h+n)}function a(c,u,d,h){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:ye(c,u)})):u&&d.push(i(d)+"rotate("+u+r)}function o(c,u,d,h){c!==u?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:ye(c,u)}):u&&d.push(i(d)+"skewX("+u+r)}function l(c,u,d,h,f,p){if(c!==d||u!==h){var g=f.push(i(f)+"scale(",null,",",null,")");p.push({i:g-4,x:ye(c,d)},{i:g-2,x:ye(u,h)})}else(d!==1||h!==1)&&f.push(i(f)+"scale("+d+","+h+")")}return function(c,u){var d=[],h=[];return c=e(c),u=e(u),s(c.translateX,c.translateY,u.translateX,u.translateY,d,h),a(c.rotate,u.rotate,d,h),o(c.skewX,u.skewX,d,h),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,h),c=u=null,function(f){for(var p=-1,g=h.length,m;++p<g;)d[(m=h[p]).i]=m.x(f);return d.join("")}}}var iE=Gh(nE,"px, ","px)","deg)"),sE=Gh(rE,", ",")",")");function aE(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}var Er=0,mi=0,vi=0,Vh=1e3,Hs,yi,Gs=0,qn=0,Vs=0,Ei=typeof performance=="object"&&performance.now?performance:Date,zh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Zo(){return qn||(zh(oE),qn=Ei.now()+Vs)}function oE(){qn=0}function zs(){this._call=this._time=this._next=null}zs.prototype=Wh.prototype={constructor:zs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Zo():+n)+(t==null?0:+t),!this._next&&yi!==this&&(yi?yi._next=this:Hs=this,yi=this),this._call=e,this._time=n,Ko()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ko())}};function Wh(e,t,n){var r=new zs;return r.restart(e,t,n),r}function lE(){Zo(),++Er;for(var e=Hs,t;e;)(t=qn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Er}function Yh(){qn=(Gs=Ei.now())+Vs,Er=mi=0;try{lE()}finally{Er=0,uE(),qn=0}}function cE(){var e=Ei.now(),t=e-Gs;t>Vh&&(Vs-=t,Gs=e)}function uE(){for(var e,t=Hs,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:Hs=n);yi=e,Ko(r)}function Ko(e){if(!Er){mi&&(mi=clearTimeout(mi));var t=e-qn;t>24?(e<1/0&&(mi=setTimeout(Yh,e-Ei.now()-Vs)),vi&&(vi=clearInterval(vi))):(vi||(Gs=Ei.now(),vi=setInterval(cE,Vh)),Er=1,zh(Yh))}}function qh(e,t,n){var r=new zs;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var hE=$o("start","end","cancel","interrupt"),dE=[],Xh=0,jh=1,Qo=2,Ws=3,Zh=4,Jo=5,Ys=6;function qs(e,t,n,r,i,s){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;fE(e,n,{name:t,index:r,group:i,on:hE,tween:dE,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Xh})}function tl(e,t){var n=Fe(e,t);if(n.state>Xh)throw new Error("too late; already scheduled");return n}function Ze(e,t){var n=Fe(e,t);if(n.state>Ws)throw new Error("too late; already running");return n}function Fe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function fE(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Wh(s,0,n.time);function s(c){n.state=jh,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var u,d,h,f;if(n.state!==jh)return l();for(u in r)if(f=r[u],f.name===n.name){if(f.state===Ws)return qh(a);f.state===Zh?(f.state=Ys,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[u]):+u<t&&(f.state=Ys,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[u])}if(qh(function(){n.state===Ws&&(n.state=Zh,n.timer.restart(o,n.delay,n.time),o(c))}),n.state=Qo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Qo){for(n.state=Ws,i=new Array(h=n.tween.length),u=0,d=-1;u<h;++u)(f=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=f);i.length=d+1}}function o(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Jo,1),d=-1,h=i.length;++d<h;)i[d].call(e,u);n.state===Jo&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Ys,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function el(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>Qo&&r.state<Jo,r.state=Ys,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}s&&delete e.__transition}}function pE(e){return this.each(function(){el(this,e)})}function gE(e,t){var n,r;return function(){var i=Ze(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 mE(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var s=Ze(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 vE(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Fe(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?gE:mE)(n,e,t))}function nl(e,t,n){var r=e._id;return e.each(function(){var i=Ze(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Fe(i,r).value[t]}}function Kh(e,t){var n;return(typeof t=="number"?ye:t instanceof hn?Us:(n=hn(t))?(t=n,Us):Fh)(e,t)}function yE(e){return function(){this.removeAttribute(e)}}function EE(e){return function(){this.removeAttributeNS(e.space,e.local)}}function bE(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 xE(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 _E(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 SE(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 TE(e,t){var n=Is(e),r=n==="transform"?sE:Kh;return this.attrTween(e,typeof t=="function"?(n.local?SE:_E)(n,r,nl(this,"attr."+e,t)):t==null?(n.local?EE:yE)(n):(n.local?xE:bE)(n,r,t))}function OE(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function wE(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ME(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&wE(e,s)),n}return i._value=t,i}function AE(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&OE(e,s)),n}return i._value=t,i}function CE(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=Is(e);return this.tween(n,(r.local?ME:AE)(r,t))}function DE(e,t){return function(){tl(this,e).delay=+t.apply(this,arguments)}}function LE(e,t){return t=+t,function(){tl(this,e).delay=t}}function RE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?DE:LE)(t,e)):Fe(this.node(),t).delay}function IE(e,t){return function(){Ze(this,e).duration=+t.apply(this,arguments)}}function kE(e,t){return t=+t,function(){Ze(this,e).duration=t}}function PE(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?IE:kE)(t,e)):Fe(this.node(),t).duration}function NE(e,t){if(typeof t!="function")throw new Error;return function(){Ze(this,e).ease=t}}function $E(e){var t=this._id;return arguments.length?this.each(NE(t,e)):Fe(this.node(),t).ease}function FE(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ze(this,e).ease=n}}function UE(e){if(typeof e!="function")throw new Error;return this.each(FE(this._id,e))}function BE(e){typeof e!="function"&&(e=mh(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 dn(r,this._parents,this._name,this._id)}function HE(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),a=new Array(r),o=0;o<s;++o)for(var l=t[o],c=n[o],u=l.length,d=a[o]=new Array(u),h,f=0;f<u;++f)(h=l[f]||c[f])&&(d[f]=h);for(;o<r;++o)a[o]=t[o];return new dn(a,this._parents,this._name,this._id)}function GE(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 VE(e,t,n){var r,i,s=GE(t)?tl:Ze;return function(){var a=s(this,e),o=a.on;o!==r&&(i=(r=o).copy()).on(t,n),a.on=i}}function zE(e,t){var n=this._id;return arguments.length<2?Fe(this.node(),n).on.on(e):this.each(VE(n,e,t))}function WE(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function YE(){return this.on("end.remove",WE(this._id))}function qE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Uo(e));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var o=r[a],l=o.length,c=s[a]=new Array(l),u,d,h=0;h<l;++h)(u=o[h])&&(d=e.call(u,u.__data__,h,o))&&("__data__"in u&&(d.__data__=u.__data__),c[h]=d,qs(c[h],t,n,h,c,Fe(u,n)));return new dn(s,this._parents,t,n)}function XE(e){var t=this._name,n=this._id;typeof e!="function"&&(e=gh(e));for(var r=this._groups,i=r.length,s=[],a=[],o=0;o<i;++o)for(var l=r[o],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var h=e.call(u,u.__data__,d,l),f,p=Fe(u,n),g=0,m=h.length;g<m;++g)(f=h[g])&&qs(f,t,n,g,h,p);s.push(h),a.push(u)}return new dn(s,a,t,n)}var jE=hi.prototype.constructor;function ZE(){return new jE(this._groups,this._parents)}function KE(e,t){var n,r,i;return function(){var s=vr(this,e),a=(this.style.removeProperty(e),vr(this,e));return s===a?null:s===n&&a===r?i:i=t(n=s,r=a)}}function Qh(e){return function(){this.style.removeProperty(e)}}function QE(e,t,n){var r,i=n+"",s;return function(){var a=vr(this,e);return a===i?null:a===r?s:s=t(r=a,n)}}function JE(e,t,n){var r,i,s;return function(){var a=vr(this,e),o=n(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),vr(this,e))),a===l?null:a===r&&l===i?s:(i=l,s=t(r=a,o))}}function tb(e,t){var n,r,i,s="style."+t,a="end."+s,o;return function(){var l=Ze(this,e),c=l.on,u=l.value[s]==null?o||(o=Qh(t)):void 0;(c!==n||i!==u)&&(r=(n=c).copy()).on(a,i=u),l.on=r}}function eb(e,t,n){var r=(e+="")=="transform"?iE:Kh;return t==null?this.styleTween(e,KE(e,r)).on("end.style."+e,Qh(e)):typeof t=="function"?this.styleTween(e,JE(e,r,nl(this,"style."+e,t))).each(tb(this._id,e)):this.styleTween(e,QE(e,r,t),n).on("end.style."+e,null)}function nb(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function rb(e,t,n){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&nb(e,a,n)),r}return s._value=t,s}function ib(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,rb(e,t,n??""))}function sb(e){return function(){this.textContent=e}}function ab(e){return function(){var t=e(this);this.textContent=t??""}}function ob(e){return this.tween("text",typeof e=="function"?ab(nl(this,"text",e)):sb(e==null?"":e+""))}function lb(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)&&lb(i)),t}return r._value=e,r}function ub(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 hb(){for(var e=this._name,t=this._id,n=Jh(),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=Fe(l,t);qs(l,e,n,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new dn(r,this._parents,e,n)}function db(){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=Ze(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 fb=0;function dn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Jh(){return++fb}var fn=hi.prototype;dn.prototype={constructor:dn,select:qE,selectAll:XE,selectChild:fn.selectChild,selectChildren:fn.selectChildren,filter:BE,merge:HE,selection:ZE,transition:hb,call:fn.call,nodes:fn.nodes,node:fn.node,size:fn.size,empty:fn.empty,each:fn.each,on:zE,attr:TE,attrTween:CE,style:eb,styleTween:ib,text:ob,textTween:ub,remove:YE,tween:vE,delay:RE,duration:PE,ease:$E,easeVarying:UE,end:db,[Symbol.iterator]:fn[Symbol.iterator]};const pb=e=>+e;function td(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var gb={time:null,delay:0,duration:250,ease:td};function mb(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 vb(e){var t,n;e instanceof dn?(t=e._id,e=e._name):(t=Jh(),(n=gb).time=Zo(),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])&&qs(l,e,t,c,a,n||mb(l,t));return new dn(r,this._parents,e,t)}hi.prototype.interrupt=pE,hi.prototype.transition=vb;const rl=e=>()=>e;function yb(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 Eb(e){e.stopImmediatePropagation()}function il(e){e.preventDefault(),e.stopImmediatePropagation()}var ed={name:"drag"},sl={name:"space"},br={name:"handle"},xr={name:"center"};const{abs:nd,max:Kt,min:Qt}=Math;function rd(e){return[+e[0],+e[1]]}function id(e){return[rd(e[0]),rd(e[1])]}var Xs={name:"x",handles:["w","e"].map(js),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]]}},al={name:"y",handles:["n","s"].map(js),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]]}},pn={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"},sd={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},ad={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},xb={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function js(e){return{type:e}}function _b(e){return!e.ctrlKey&&!e.button}function Sb(){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 Tb(){return navigator.maxTouchPoints||"ontouchstart"in this}function ol(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function Ob(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function od(){return wb(Xs)}function wb(e){var t=Sb,n=_b,r=Tb,i=!0,s=$o("start","brush","end"),a=6,o;function l(m){var v=m.property("__brush",g).selectAll(".overlay").data([js("overlay")]);v.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",pn.overlay).merge(v).each(function(){var y=ol(this).extent;R(this).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1])}),m.selectAll(".selection").data([js("selection")]).enter().append("rect").attr("class","selection").attr("cursor",pn.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var E=m.selectAll(".handle").data(e.handles,function(y){return y.type});E.exit().remove(),E.enter().append("rect").attr("class",function(y){return"handle handle--"+y.type}).attr("cursor",function(y){return pn[y.type]}),m.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(m,v,E){m.tween?m.on("start.brush",function(y){u(this,arguments).beforestart().start(y)}).on("interrupt.brush end.brush",function(y){u(this,arguments).end(y)}).tween("brush",function(){var y=this,x=y.__brush,S=u(y,arguments),_=x.selection,A=e.input(typeof v=="function"?v.apply(this,arguments):v,x.extent),L=gi(_,A);function B(k){x.selection=k===1&&A===null?null:L(k),c.call(y),S.brush()}return _!==null&&A!==null?B:B(1)}):m.each(function(){var y=this,x=arguments,S=y.__brush,_=e.input(typeof v=="function"?v.apply(y,x):v,S.extent),A=u(y,x).beforestart();el(y),S.selection=_===null?null:_,c.call(y),A.start(E).brush(E).end(E)})},l.clear=function(m,v){l.move(m,null,v)};function c(){var m=R(this),v=ol(this).selection;v?(m.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]),m.selectAll(".handle").style("display",null).attr("x",function(E){return E.type[E.type.length-1]==="e"?v[1][0]-a/2:v[0][0]-a/2}).attr("y",function(E){return E.type[0]==="s"?v[1][1]-a/2:v[0][1]-a/2}).attr("width",function(E){return E.type==="n"||E.type==="s"?v[1][0]-v[0][0]+a:a}).attr("height",function(E){return E.type==="e"||E.type==="w"?v[1][1]-v[0][1]+a:a})):m.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(m,v,E){var y=m.__brush.emitter;return y&&(!E||!y.clean)?y:new d(m,v,E)}function d(m,v,E){this.that=m,this.args=v,this.state=m.__brush,this.active=0,this.clean=E}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(m,v){return this.starting?(this.starting=!1,this.emit("start",m,v)):this.emit("brush",m),this},brush:function(m,v){return this.emit("brush",m,v),this},end:function(m,v){return--this.active===0&&(delete this.state.emitter,this.emit("end",m,v)),this},emit:function(m,v,E){var y=R(this.that).datum();s.call(m,this.that,new yb(m,{sourceEvent:v,target:l,selection:e.output(this.state.selection),mode:E,dispatch:s}),y)}};function h(m){if(o&&!m.touches||!n.apply(this,arguments))return;var v=this,E=m.target.__data__.type,y=(i&&m.metaKey?E="overlay":E)==="selection"?ed:i&&m.altKey?xr:br,x=e===al?null:bb[E],S=e===Xs?null:xb[E],_=ol(v),A=_.extent,L=_.selection,B=A[0][0],k,O,H=A[0][1],P,M,w=A[1][0],U,$,N=A[1][1],F,j,q=0,ot=0,it,mt=x&&S&&i&&m.shiftKey,st,Z,et=Array.from(m.touches||[m],rt=>{const Ct=rt.identifier;return rt=zn(rt,v),rt.point0=rt.slice(),rt.identifier=Ct,rt});el(v);var vt=u(v,arguments,!0).beforestart();if(E==="overlay"){L&&(it=!0);const rt=[et[0],et[1]||et[0]];_.selection=L=[[k=e===al?B:Qt(rt[0][0],rt[1][0]),P=e===Xs?H:Qt(rt[0][1],rt[1][1])],[U=e===al?w:Kt(rt[0][0],rt[1][0]),F=e===Xs?N:Kt(rt[0][1],rt[1][1])]],et.length>1&&z(m)}else k=L[0][0],P=L[0][1],U=L[1][0],F=L[1][1];O=k,M=P,$=U,j=F;var Y=R(v).attr("pointer-events","none"),K=Y.selectAll(".overlay").attr("cursor",pn[E]);if(m.touches)vt.moved=C,vt.ended=V;else{var ut=R(m.view).on("mousemove.brush",C,!0).on("mouseup.brush",V,!0);i&&ut.on("keydown.brush",At,!0).on("keyup.brush",Wt,!0),I1(m.view)}c.call(v),vt.start(m,y.name);function C(rt){for(const Ct of rt.changedTouches||[rt])for(const ln of et)ln.identifier===Ct.identifier&&(ln.cur=zn(Ct,v));if(mt&&!st&&!Z&&et.length===1){const Ct=et[0];nd(Ct.cur[0]-Ct[0])>nd(Ct.cur[1]-Ct[1])?Z=!0:st=!0}for(const Ct of et)Ct.cur&&(Ct[0]=Ct.cur[0],Ct[1]=Ct.cur[1]);it=!0,il(rt),z(rt)}function z(rt){const Ct=et[0],ln=Ct.point0;var Xe;switch(q=Ct[0]-ln[0],ot=Ct[1]-ln[1],y){case sl:case ed:{x&&(q=Kt(B-k,Qt(w-U,q)),O=k+q,$=U+q),S&&(ot=Kt(H-P,Qt(N-F,ot)),M=P+ot,j=F+ot);break}case br:{et[1]?(x&&(O=Kt(B,Qt(w,et[0][0])),$=Kt(B,Qt(w,et[1][0])),x=1),S&&(M=Kt(H,Qt(N,et[0][1])),j=Kt(H,Qt(N,et[1][1])),S=1)):(x<0?(q=Kt(B-k,Qt(w-k,q)),O=k+q,$=U):x>0&&(q=Kt(B-U,Qt(w-U,q)),O=k,$=U+q),S<0?(ot=Kt(H-P,Qt(N-P,ot)),M=P+ot,j=F):S>0&&(ot=Kt(H-F,Qt(N-F,ot)),M=P,j=F+ot));break}case xr:{x&&(O=Kt(B,Qt(w,k-q*x)),$=Kt(B,Qt(w,U+q*x))),S&&(M=Kt(H,Qt(N,P-ot*S)),j=Kt(H,Qt(N,F+ot*S)));break}}$<O&&(x*=-1,Xe=k,k=U,U=Xe,Xe=O,O=$,$=Xe,E in sd&&K.attr("cursor",pn[E=sd[E]])),j<M&&(S*=-1,Xe=P,P=F,F=Xe,Xe=M,M=j,j=Xe,E in ad&&K.attr("cursor",pn[E=ad[E]])),_.selection&&(L=_.selection),st&&(O=L[0][0],$=L[1][0]),Z&&(M=L[0][1],j=L[1][1]),(L[0][0]!==O||L[0][1]!==M||L[1][0]!==$||L[1][1]!==j)&&(_.selection=[[O,M],[$,j]],c.call(v),vt.brush(rt,y.name))}function V(rt){if(Eb(rt),rt.touches){if(rt.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else k1(rt.view,it),ut.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Y.attr("pointer-events","all"),K.attr("cursor",pn.overlay),_.selection&&(L=_.selection),Ob(L)&&(_.selection=null,c.call(v)),vt.end(rt,y.name)}function At(rt){switch(rt.keyCode){case 16:{mt=x&&S;break}case 18:{y===br&&(x&&(U=$-q*x,k=O+q*x),S&&(F=j-ot*S,P=M+ot*S),y=xr,z(rt));break}case 32:{(y===br||y===xr)&&(x<0?U=$-q:x>0&&(k=O-q),S<0?F=j-ot:S>0&&(P=M-ot),y=sl,K.attr("cursor",pn.selection),z(rt));break}default:return}il(rt)}function Wt(rt){switch(rt.keyCode){case 16:{mt&&(st=Z=mt=!1,z(rt));break}case 18:{y===xr&&(x<0?U=$:x>0&&(k=O),S<0?F=j:S>0&&(P=M),y=br,z(rt));break}case 32:{y===sl&&(rt.altKey?(x&&(U=$-q*x,k=O+q*x),S&&(F=j-ot*S,P=M+ot*S),y=xr):(x<0?U=$:x>0&&(k=O),S<0?F=j:S>0&&(P=M),y=br),K.attr("cursor",pn[E]),z(rt));break}default:return}il(rt)}}function f(m){u(this,arguments).moved(m)}function p(m){u(this,arguments).ended(m)}function g(){var m=this.__brush||{selection:null};return m.extent=id(t.apply(this,arguments)),m.dim=e,m}return l.extent=function(m){return arguments.length?(t=typeof m=="function"?m:rl(id(m)),l):t},l.filter=function(m){return arguments.length?(n=typeof m=="function"?m:rl(!!m),l):n},l.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:rl(!!m),l):r},l.handleSize=function(m){return arguments.length?(a=+m,l):a},l.keyModifiers=function(m){return arguments.length?(i=!!m,l):i},l.on=function(){var m=s.on.apply(s,arguments);return m===s?l:m},l}const ll=Math.PI,cl=2*ll,Xn=1e-6,Mb=cl-Xn;function ld(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Ab(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ld;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 Cb=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?ld:Ab(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,s,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+s},${this._y1=+a}`}arcTo(t,n,r,i,s){if(t=+t,n=+n,r=+r,i=+i,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=r-t,c=i-n,u=a-t,d=o-n,h=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>Xn)if(!(Math.abs(d*l-c*u)>Xn)||!s)this._append`L${this._x1=t},${this._y1=n}`;else{let f=r-a,p=i-o,g=l*l+c*c,m=f*f+p*p,v=Math.sqrt(g),E=Math.sqrt(h),y=s*Math.tan((ll-Math.acos((g+h-m)/(2*v*E)))/2),x=y/E,S=y/v;Math.abs(x-1)>Xn&&this._append`L${t+x*u},${n+x*d}`,this._append`A${s},${s},0,0,${+(d*f>u*p)},${this._x1=t+S*l},${this._y1=n+S*c}`}}arc(t,n,r,i,s,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),l=r*Math.sin(i),c=t+o,u=n+l,d=1^a,h=a?i-s:s-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Xn||Math.abs(this._y1-u)>Xn)&&this._append`L${c},${u}`,r&&(h<0&&(h=h%cl+cl),h>Mb?this._append`A${r},${r},0,1,${d},${t-o},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:h>Xn&&this._append`A${r},${r},0,${+(h>=ll)},${d},${this._x1=t+r*Math.cos(s)},${this._y1=n+r*Math.sin(s)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function Db(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Zs(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 _r(e){return e=Zs(Math.abs(e)),e?e[1]:NaN}function Lb(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 Rb(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Ib=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function bi(e){if(!(t=Ib.exec(e)))throw new Error("invalid format: "+e);var t;return new ul({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]})}bi.prototype=ul.prototype;function ul(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+""}ul.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 kb(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 cd;function Pb(e,t){var n=Zs(e,t);if(!n)return e+"";var r=n[0],i=n[1],s=i-(cd=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")+Zs(e,Math.max(0,t+s-1))[0]}function ud(e,t){var n=Zs(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 hd={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Db,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)=>ud(e*100,t),r:ud,s:Pb,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function dd(e){return e}var fd=Array.prototype.map,pd=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Nb(e){var t=e.grouping===void 0||e.thousands===void 0?dd:Lb(fd.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?dd:Rb(fd.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=bi(d);var h=d.fill,f=d.align,p=d.sign,g=d.symbol,m=d.zero,v=d.width,E=d.comma,y=d.precision,x=d.trim,S=d.type;S==="n"?(E=!0,S="g"):hd[S]||(y===void 0&&(y=12),x=!0,S="g"),(m||h==="0"&&f==="=")&&(m=!0,h="0",f="=");var _=g==="$"?n:g==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",A=g==="$"?r:/[%p]/.test(S)?a:"",L=hd[S],B=/[defgprs%]/.test(S);y=y===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function k(O){var H=_,P=A,M,w,U;if(S==="c")P=L(O)+P,O="";else{O=+O;var $=O<0||1/O<0;if(O=isNaN(O)?l:L(Math.abs(O),y),x&&(O=kb(O)),$&&+O==0&&p!=="+"&&($=!1),H=($?p==="("?p:o:p==="-"||p==="("?"":p)+H,P=(S==="s"?pd[8+cd/3]:"")+P+($&&p==="("?")":""),B){for(M=-1,w=O.length;++M<w;)if(U=O.charCodeAt(M),48>U||U>57){P=(U===46?i+O.slice(M+1):O.slice(M))+P,O=O.slice(0,M);break}}}E&&!m&&(O=t(O,1/0));var N=H.length+O.length+P.length,F=N<v?new Array(v-N+1).join(h):"";switch(E&&m&&(O=t(F+O,F.length?v-P.length:1/0),F=""),f){case"<":O=H+O+P+F;break;case"=":O=H+F+O+P;break;case"^":O=F.slice(0,N=F.length>>1)+H+O+P+F.slice(N);break;default:O=F+H+O+P;break}return s(O)}return k.toString=function(){return d+""},k}function u(d,h){var f=c((d=bi(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(_r(h)/3)))*3,g=Math.pow(10,-p),m=pd[8+p/3];return function(v){return f(g*v)+m}}return{format:c,formatPrefix:u}}var Ks,hl,gd;$b({thousands:",",grouping:[3],currency:["$",""]});function $b(e){return Ks=Nb(e),hl=Ks.format,gd=Ks.formatPrefix,Ks}function Fb(e){return Math.max(0,-_r(Math.abs(e)))}function Ub(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(_r(t)/3)))*3-_r(Math.abs(e)))}function Bb(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_r(t)-_r(e))+1}var _t=1e-6,md=1e-12,ft=Math.PI,he=ft/2,vd=ft/4,Ee=ft*2,re=180/ft,Nt=ft/180,St=Math.abs,yd=Math.atan,jn=Math.atan2,Ot=Math.cos,Hb=Math.exp,Gb=Math.log,bt=Math.sin,kn=Math.sign||function(e){return e>0?1:e<0?-1:0},Ue=Math.sqrt,Vb=Math.tan;function zb(e){return e>1?0:e<-1?ft:Math.acos(e)}function gn(e){return e>1?he:e<-1?-he:Math.asin(e)}function Oe(){}function Qs(e,t){e&&bd.hasOwnProperty(e.type)&&bd[e.type](e,t)}var Ed={Feature:function(e,t){Qs(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)Qs(n[r].geometry,t)}},bd={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){dl(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)dl(n[r],t,0)},Polygon:function(e,t){xd(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)xd(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)Qs(n[r],t)}};function dl(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 xd(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)dl(e[n],t,1);t.polygonEnd()}function Sr(e,t){e&&Ed.hasOwnProperty(e.type)?Ed[e.type](e,t):Qs(e,t)}function fl(e){return[jn(e[1],e[0]),gn(e[2])]}function Tr(e){var t=e[0],n=e[1],r=Ot(n);return[r*Ot(t),r*bt(t),bt(n)]}function Js(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function ta(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 pl(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function ea(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function gl(e){var t=Ue(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function ml(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 vl(e,t){return St(e)>ft&&(e-=Math.round(e/Ee)*Ee),[e,t]}vl.invert=vl;function _d(e,t,n){return(e%=Ee)?t||n?ml(Td(e),Od(t,n)):Td(e):t||n?Od(t,n):vl}function Sd(e){return function(t,n){return t+=e,St(t)>ft&&(t-=Math.round(t/Ee)*Ee),[t,n]}}function Td(e){var t=Sd(e);return t.invert=Sd(-e),t}function Od(e,t){var n=Ot(e),r=bt(e),i=Ot(t),s=bt(t);function a(o,l){var c=Ot(l),u=Ot(o)*c,d=bt(o)*c,h=bt(l),f=h*n+u*r;return[jn(d*i-f*s,u*n-h*r),gn(f*i+d*s)]}return a.invert=function(o,l){var c=Ot(l),u=Ot(o)*c,d=bt(o)*c,h=bt(l),f=h*i-d*s;return[jn(d*i+h*s,u*n+f*r),gn(f*n-u*r)]},a}function Wb(e){e=_d(e[0]*Nt,e[1]*Nt,e.length>2?e[2]*Nt:0);function t(n){return n=e(n[0]*Nt,n[1]*Nt),n[0]*=re,n[1]*=re,n}return t.invert=function(n){return n=e.invert(n[0]*Nt,n[1]*Nt),n[0]*=re,n[1]*=re,n},t}function Yb(e,t,n,r,i,s){if(n){var a=Ot(t),o=bt(t),l=r*n;i==null?(i=t+r*Ee,s=t-l/2):(i=wd(a,i),s=wd(a,s),(r>0?i<s:i>s)&&(i+=r*Ee));for(var c,u=i;r>0?u>s:u<s;u-=l)c=fl([a,-o*Ot(u),-o*bt(u)]),e.point(c[0],c[1])}}function wd(e,t){t=Tr(t),t[0]-=e,gl(t);var n=zb(-t[1]);return((-t[2]<0?-n:n)+Ee-_t)%Ee}function Md(){var e=[],t;return{point:function(n,r,i){t.push([n,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Oe,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function na(e,t){return St(e[0]-t[0])<_t&&St(e[1]-t[1])<_t}function ra(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 Ad(e,t,n,r,i){var s=[],a=[],o,l;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,m=p[0],v=p[g],E;if(na(m,v)){if(!m[2]&&!v[2]){for(i.lineStart(),o=0;o<g;++o)i.point((m=p[o])[0],m[1]);i.lineEnd();return}v[0]+=2*_t}s.push(E=new ra(m,p,null,!0)),a.push(E.o=new ra(m,null,E,!1)),s.push(E=new ra(v,p,null,!1)),a.push(E.o=new ra(v,null,E,!0))}}),!!s.length){for(a.sort(t),Cd(s),Cd(a),o=0,l=a.length;o<l;++o)a[o].e=n=!n;for(var c=s[0],u,d;;){for(var h=c,f=!0;h.v;)if((h=h.n)===c)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(f)for(o=0,l=u.length;o<l;++o)i.point((d=u[o])[0],d[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(f)for(u=h.p.z,o=u.length-1;o>=0;--o)i.point((d=u[o])[0],d[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,u=h.z,f=!f}while(!h.v);i.lineEnd()}}}function Cd(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 yl(e){return St(e[0])<=ft?e[0]:kn(e[0])*((St(e[0])+ft)%Ee-ft)}function qb(e,t){var n=yl(t),r=t[1],i=bt(r),s=[bt(n),-Ot(n),0],a=0,o=0,l=new Gn;i===1?r=he+_t:i===-1&&(r=-he-_t);for(var c=0,u=e.length;c<u;++c)if(h=(d=e[c]).length)for(var d,h,f=d[h-1],p=yl(f),g=f[1]/2+vd,m=bt(g),v=Ot(g),E=0;E<h;++E,p=x,m=_,v=A,f=y){var y=d[E],x=yl(y),S=y[1]/2+vd,_=bt(S),A=Ot(S),L=x-p,B=L>=0?1:-1,k=B*L,O=k>ft,H=m*_;if(l.add(jn(H*B*bt(k),v*A+H*Ot(k))),a+=O?L+B*Ee:L,O^p>=n^x>=n){var P=ta(Tr(f),Tr(y));gl(P);var M=ta(s,P);gl(M);var w=(O^L>=0?-1:1)*gn(M[2]);(r>w||r===w&&(P[0]||P[1]))&&(o+=O^L>=0?1:-1)}}return(a<-_t||a<_t&&l<-md)^o&1}function Dd(e,t,n,r){return function(i){var s=t(i),a=Md(),o=t(a),l=!1,c,u,d,h={point:f,lineStart:g,lineEnd:m,polygonStart:function(){h.point=v,h.lineStart=E,h.lineEnd=y,u=[],c=[]},polygonEnd:function(){h.point=f,h.lineStart=g,h.lineEnd=m,u=ch(u);var x=qb(c,r);u.length?(l||(i.polygonStart(),l=!0),Ad(u,jb,x,n,i)):x&&(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(x,S){e(x,S)&&i.point(x,S)}function p(x,S){s.point(x,S)}function g(){h.point=p,s.lineStart()}function m(){h.point=f,s.lineEnd()}function v(x,S){d.push([x,S]),o.point(x,S)}function E(){o.lineStart(),d=[]}function y(){v(d[0][0],d[0][1]),o.lineEnd();var x=o.clean(),S=a.result(),_,A=S.length,L,B,k;if(d.pop(),c.push(d),d=null,!!A){if(x&1){if(B=S[0],(L=B.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),_=0;_<L;++_)i.point((k=B[_])[0],k[1]);i.lineEnd()}return}A>1&&x&2&&S.push(S.pop().concat(S.shift())),u.push(S.filter(Xb))}}return h}}function Xb(e){return e.length>1}function jb(e,t){return((e=e.x)[0]<0?e[1]-he-_t:he-e[1])-((t=t.x)[0]<0?t[1]-he-_t:he-t[1])}const Ld=Dd(function(){return!0},Zb,Qb,[-ft,-he]);function Zb(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(s,a){var o=s>0?ft:-ft,l=St(s-t);St(l-ft)<_t?(e.point(t,n=(n+a)/2>0?he:-he),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(o,n),e.point(s,n),i=0):r!==o&&l>=ft&&(St(t-r)<_t&&(t-=r*_t),St(s-o)<_t&&(s-=o*_t),n=Kb(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 Kb(e,t,n,r){var i,s,a=bt(e-n);return St(a)>_t?yd((bt(t)*(s=Ot(r))*bt(n)-bt(r)*(i=Ot(t))*bt(e))/(i*s*a)):(t+r)/2}function Qb(e,t,n,r){var i;if(e==null)i=n*he,r.point(-ft,i),r.point(0,i),r.point(ft,i),r.point(ft,0),r.point(ft,-i),r.point(0,-i),r.point(-ft,-i),r.point(-ft,0),r.point(-ft,i);else if(St(e[0]-t[0])>_t){var s=e[0]<t[0]?ft:-ft;i=n*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function Jb(e){var t=Ot(e),n=2*Nt,r=t>0,i=St(t)>_t;function s(u,d,h,f){Yb(f,e,n,h,u,d)}function a(u,d){return Ot(u)*Ot(d)>t}function o(u){var d,h,f,p,g;return{lineStart:function(){p=f=!1,g=1},point:function(m,v){var E=[m,v],y,x=a(m,v),S=r?x?0:c(m,v):x?c(m+(m<0?ft:-ft),v):0;if(!d&&(p=f=x)&&u.lineStart(),x!==f&&(y=l(d,E),(!y||na(d,y)||na(E,y))&&(E[2]=1)),x!==f)g=0,x?(u.lineStart(),y=l(E,d),u.point(y[0],y[1])):(y=l(d,E),u.point(y[0],y[1],2),u.lineEnd()),d=y;else if(i&&d&&r^x){var _;!(S&h)&&(_=l(E,d,!0))&&(g=0,r?(u.lineStart(),u.point(_[0][0],_[0][1]),u.point(_[1][0],_[1][1]),u.lineEnd()):(u.point(_[1][0],_[1][1]),u.lineEnd(),u.lineStart(),u.point(_[0][0],_[0][1],3)))}x&&(!d||!na(d,E))&&u.point(E[0],E[1]),d=E,f=x,h=S},lineEnd:function(){f&&u.lineEnd(),d=null},clean:function(){return g|(p&&f)<<1}}}function l(u,d,h){var f=Tr(u),p=Tr(d),g=[1,0,0],m=ta(f,p),v=Js(m,m),E=m[0],y=v-E*E;if(!y)return!h&&u;var x=t*v/y,S=-t*E/y,_=ta(g,m),A=ea(g,x),L=ea(m,S);pl(A,L);var B=_,k=Js(A,B),O=Js(B,B),H=k*k-O*(Js(A,A)-1);if(!(H<0)){var P=Ue(H),M=ea(B,(-k-P)/O);if(pl(M,A),M=fl(M),!h)return M;var w=u[0],U=d[0],$=u[1],N=d[1],F;U<w&&(F=w,w=U,U=F);var j=U-w,q=St(j-ft)<_t,ot=q||j<_t;if(!q&&N<$&&(F=$,$=N,N=F),ot?q?$+N>0^M[1]<(St(M[0]-w)<_t?$:N):$<=M[1]&&M[1]<=N:j>ft^(w<=M[0]&&M[0]<=U)){var it=ea(B,(-k+P)/O);return pl(it,A),[M,fl(it)]}}}function c(u,d){var h=r?e:ft-e,f=0;return u<-h?f|=1:u>h&&(f|=2),d<-h?f|=4:d>h&&(f|=8),f}return Dd(a,o,s,r?[0,-e]:[-ft,e-ft])}function tx(e,t,n,r,i,s){var a=e[0],o=e[1],l=t[0],c=t[1],u=0,d=1,h=l-a,f=c-o,p;if(p=n-a,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<d&&(d=p)}else if(h>0){if(p>d)return;p>u&&(u=p)}if(p=i-a,!(!h&&p<0)){if(p/=h,h<0){if(p>d)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<d&&(d=p)}if(p=r-o,!(!f&&p>0)){if(p/=f,f<0){if(p<u)return;p<d&&(d=p)}else if(f>0){if(p>d)return;p>u&&(u=p)}if(p=s-o,!(!f&&p<0)){if(p/=f,f<0){if(p>d)return;p>u&&(u=p)}else if(f>0){if(p<u)return;p<d&&(d=p)}return u>0&&(e[0]=a+u*h,e[1]=o+u*f),d<1&&(t[0]=a+d*h,t[1]=o+d*f),!0}}}}}var xi=1e9,ia=-xi;function ex(e,t,n,r){function i(c,u){return e<=c&&c<=n&&t<=u&&u<=r}function s(c,u,d,h){var f=0,p=0;if(c==null||(f=a(c,d))!==(p=a(u,d))||l(c,u)<0^d>0)do h.point(f===0||f===3?e:n,f>1?r:t);while((f=(f+d+4)%4)!==p);else h.point(u[0],u[1])}function a(c,u){return St(c[0]-e)<_t?u>0?0:3:St(c[0]-n)<_t?u>0?2:1:St(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 d=a(c,1),h=a(u,1);return d!==h?d-h:d===0?u[1]-c[1]:d===1?c[0]-u[0]:d===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,d=Md(),h,f,p,g,m,v,E,y,x,S,_,A={point:L,lineStart:H,lineEnd:P,polygonStart:k,polygonEnd:O};function L(w,U){i(w,U)&&u.point(w,U)}function B(){for(var w=0,U=0,$=f.length;U<$;++U)for(var N=f[U],F=1,j=N.length,q=N[0],ot,it,mt=q[0],st=q[1];F<j;++F)ot=mt,it=st,q=N[F],mt=q[0],st=q[1],it<=r?st>r&&(mt-ot)*(r-it)>(st-it)*(e-ot)&&++w:st<=r&&(mt-ot)*(r-it)<(st-it)*(e-ot)&&--w;return w}function k(){u=d,h=[],f=[],_=!0}function O(){var w=B(),U=_&&w,$=(h=ch(h)).length;(U||$)&&(c.polygonStart(),U&&(c.lineStart(),s(null,null,1,c),c.lineEnd()),$&&Ad(h,o,w,s,c),c.polygonEnd()),u=c,h=f=p=null}function H(){A.point=M,f&&f.push(p=[]),S=!0,x=!1,E=y=NaN}function P(){h&&(M(g,m),v&&x&&d.rejoin(),h.push(d.result())),A.point=L,x&&u.lineEnd()}function M(w,U){var $=i(w,U);if(f&&p.push([w,U]),S)g=w,m=U,v=$,S=!1,$&&(u.lineStart(),u.point(w,U));else if($&&x)u.point(w,U);else{var N=[E=Math.max(ia,Math.min(xi,E)),y=Math.max(ia,Math.min(xi,y))],F=[w=Math.max(ia,Math.min(xi,w)),U=Math.max(ia,Math.min(xi,U))];tx(N,F,e,t,n,r)?(x||(u.lineStart(),u.point(N[0],N[1])),u.point(F[0],F[1]),$||u.lineEnd(),_=!1):$&&(u.lineStart(),u.point(w,U),_=!1)}E=w,y=U,x=$}return A}}const El=e=>e;var bl=new Gn,xl=new Gn,Rd,Id,_l,Sl,mn={point:Oe,lineStart:Oe,lineEnd:Oe,polygonStart:function(){mn.lineStart=nx,mn.lineEnd=ix},polygonEnd:function(){mn.lineStart=mn.lineEnd=mn.point=Oe,bl.add(St(xl)),xl=new Gn},result:function(){var e=bl/2;return bl=new Gn,e}};function nx(){mn.point=rx}function rx(e,t){mn.point=kd,Rd=_l=e,Id=Sl=t}function kd(e,t){xl.add(Sl*e-_l*t),_l=e,Sl=t}function ix(){kd(Rd,Id)}var Or=1/0,sa=Or,_i=-Or,aa=_i,oa={point:sx,lineStart:Oe,lineEnd:Oe,polygonStart:Oe,polygonEnd:Oe,result:function(){var e=[[Or,sa],[_i,aa]];return _i=aa=-(sa=Or=1/0),e}};function sx(e,t){e<Or&&(Or=e),e>_i&&(_i=e),t<sa&&(sa=t),t>aa&&(aa=t)}var Tl=0,Ol=0,Si=0,la=0,ca=0,wr=0,wl=0,Ml=0,Ti=0,Pd,Nd,Ke,Qe,we={point:Zn,lineStart:$d,lineEnd:Fd,polygonStart:function(){we.lineStart=lx,we.lineEnd=cx},polygonEnd:function(){we.point=Zn,we.lineStart=$d,we.lineEnd=Fd},result:function(){var e=Ti?[wl/Ti,Ml/Ti]:wr?[la/wr,ca/wr]:Si?[Tl/Si,Ol/Si]:[NaN,NaN];return Tl=Ol=Si=la=ca=wr=wl=Ml=Ti=0,e}};function Zn(e,t){Tl+=e,Ol+=t,++Si}function $d(){we.point=ax}function ax(e,t){we.point=ox,Zn(Ke=e,Qe=t)}function ox(e,t){var n=e-Ke,r=t-Qe,i=Ue(n*n+r*r);la+=i*(Ke+e)/2,ca+=i*(Qe+t)/2,wr+=i,Zn(Ke=e,Qe=t)}function Fd(){we.point=Zn}function lx(){we.point=ux}function cx(){Ud(Pd,Nd)}function ux(e,t){we.point=Ud,Zn(Pd=Ke=e,Nd=Qe=t)}function Ud(e,t){var n=e-Ke,r=t-Qe,i=Ue(n*n+r*r);la+=i*(Ke+e)/2,ca+=i*(Qe+t)/2,wr+=i,i=Qe*e-Ke*t,wl+=i*(Ke+e),Ml+=i*(Qe+t),Ti+=i*3,Zn(Ke=e,Qe=t)}function Bd(e){this._context=e}Bd.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,Ee);break}}},result:Oe};var Al=new Gn,Cl,Hd,Gd,Oi,wi,Mi={point:Oe,lineStart:function(){Mi.point=hx},lineEnd:function(){Cl&&Vd(Hd,Gd),Mi.point=Oe},polygonStart:function(){Cl=!0},polygonEnd:function(){Cl=null},result:function(){var e=+Al;return Al=new Gn,e}};function hx(e,t){Mi.point=Vd,Hd=Oi=e,Gd=wi=t}function Vd(e,t){Oi-=e,wi-=t,Al.add(Ue(Oi*Oi+wi*wi)),Oi=e,wi=t}let zd,ua,Wd,Yd;class qd{constructor(t){this._append=t==null?Xd:dx(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!==Wd||this._append!==ua){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`,Wd=r,ua=this._append,Yd=this._,this._=i}this._+=Yd;break}}}result(){const t=this._;return this._="",t.length?t:null}}function Xd(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function dx(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return Xd;if(t!==zd){const n=10**t;zd=t,ua=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 ua}function fx(e,t){let n=3,r=4.5,i,s;function a(o){return o&&(typeof r=="function"&&s.pointRadius(+r.apply(this,arguments)),Sr(o,i(s))),s.result()}return a.area=function(o){return Sr(o,i(mn)),mn.result()},a.measure=function(o){return Sr(o,i(Mi)),Mi.result()},a.bounds=function(o){return Sr(o,i(oa)),oa.result()},a.centroid=function(o){return Sr(o,i(we)),we.result()},a.projection=function(o){return arguments.length?(i=o==null?(e=null,El):(e=o).stream,a):e},a.context=function(o){return arguments.length?(s=o==null?(t=null,new qd(n)):new Bd(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 qd(n)),a},a.projection(e).digits(n).context(t)}function Dl(e){return function(t){var n=new Ll;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Ll(){}Ll.prototype={constructor:Ll,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 Rl(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),Sr(n,e.stream(oa)),t(oa.result()),r!=null&&e.clipExtent(r),e}function jd(e,t,n){return Rl(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 px(e,t,n){return jd(e,[[0,0],t],n)}function gx(e,t,n){return Rl(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 mx(e,t,n){return Rl(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 Zd=16,vx=Ot(30*Nt);function Kd(e,t){return+t?Ex(e,t):yx(e)}function yx(e){return Dl({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function Ex(e,t){function n(r,i,s,a,o,l,c,u,d,h,f,p,g,m){var v=c-r,E=u-i,y=v*v+E*E;if(y>4*t&&g--){var x=a+h,S=o+f,_=l+p,A=Ue(x*x+S*S+_*_),L=gn(_/=A),B=St(St(_)-1)<_t||St(s-d)<_t?(s+d)/2:jn(S,x),k=e(B,L),O=k[0],H=k[1],P=O-r,M=H-i,w=E*P-v*M;(w*w/y>t||St((v*P+E*M)/y-.5)>.3||a*h+o*f+l*p<vx)&&(n(r,i,s,a,o,l,O,H,B,x/=A,S/=A,_,g,m),m.point(O,H),n(O,H,B,x,S,_,c,u,d,h,f,p,g,m))}}return function(r){var i,s,a,o,l,c,u,d,h,f,p,g,m={point:v,lineStart:E,lineEnd:x,polygonStart:function(){r.polygonStart(),m.lineStart=S},polygonEnd:function(){r.polygonEnd(),m.lineStart=E}};function v(L,B){L=e(L,B),r.point(L[0],L[1])}function E(){d=NaN,m.point=y,r.lineStart()}function y(L,B){var k=Tr([L,B]),O=e(L,B);n(d,h,u,f,p,g,d=O[0],h=O[1],u=L,f=k[0],p=k[1],g=k[2],Zd,r),r.point(d,h)}function x(){m.point=v,r.lineEnd()}function S(){E(),m.point=_,m.lineEnd=A}function _(L,B){y(i=L,B),s=d,a=h,o=f,l=p,c=g,m.point=y}function A(){n(d,h,u,f,p,g,s,a,i,o,l,c,Zd,r),m.lineEnd=x,x()}return m}}var bx=Dl({point:function(e,t){this.stream.point(e*Nt,t*Nt)}});function xx(e){return Dl({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}})}function _x(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 Qd(e,t,n,r,i,s){if(!s)return _x(e,t,n,r,i);var a=Ot(s),o=bt(s),l=a*e,c=o*e,u=a/e,d=o/e,h=(o*n-a*t)/e,f=(o*t+a*n)/e;function p(g,m){return g*=r,m*=i,[l*g-c*m+t,n-c*g-l*m]}return p.invert=function(g,m){return[r*(u*g-d*m+h),i*(f-d*g-u*m)]},p}function ha(e){return Jd(function(){return e})()}function Jd(e){var t,n=150,r=480,i=250,s=0,a=0,o=0,l=0,c=0,u,d=0,h=1,f=1,p=null,g=Ld,m=null,v,E,y,x=El,S=.5,_,A,L,B,k;function O(w){return L(w[0]*Nt,w[1]*Nt)}function H(w){return w=L.invert(w[0],w[1]),w&&[w[0]*re,w[1]*re]}O.stream=function(w){return B&&k===w?B:B=bx(xx(u)(g(_(x(k=w)))))},O.preclip=function(w){return arguments.length?(g=w,p=void 0,M()):g},O.postclip=function(w){return arguments.length?(x=w,m=v=E=y=null,M()):x},O.clipAngle=function(w){return arguments.length?(g=+w?Jb(p=w*Nt):(p=null,Ld),M()):p*re},O.clipExtent=function(w){return arguments.length?(x=w==null?(m=v=E=y=null,El):ex(m=+w[0][0],v=+w[0][1],E=+w[1][0],y=+w[1][1]),M()):m==null?null:[[m,v],[E,y]]},O.scale=function(w){return arguments.length?(n=+w,P()):n},O.translate=function(w){return arguments.length?(r=+w[0],i=+w[1],P()):[r,i]},O.center=function(w){return arguments.length?(s=w[0]%360*Nt,a=w[1]%360*Nt,P()):[s*re,a*re]},O.rotate=function(w){return arguments.length?(o=w[0]%360*Nt,l=w[1]%360*Nt,c=w.length>2?w[2]%360*Nt:0,P()):[o*re,l*re,c*re]},O.angle=function(w){return arguments.length?(d=w%360*Nt,P()):d*re},O.reflectX=function(w){return arguments.length?(h=w?-1:1,P()):h<0},O.reflectY=function(w){return arguments.length?(f=w?-1:1,P()):f<0},O.precision=function(w){return arguments.length?(_=Kd(A,S=w*w),M()):Ue(S)},O.fitExtent=function(w,U){return jd(O,w,U)},O.fitSize=function(w,U){return px(O,w,U)},O.fitWidth=function(w,U){return gx(O,w,U)},O.fitHeight=function(w,U){return mx(O,w,U)};function P(){var w=Qd(n,0,0,h,f,d).apply(null,t(s,a)),U=Qd(n,r-w[0],i-w[1],h,f,d);return u=_d(o,l,c),A=ml(t,U),L=ml(u,A),_=Kd(A,S),M()}function M(){return B=k=null,O}return function(){return t=e.apply(this,arguments),O.invert=t.invert&&H,P()}}function tf(e){var t=0,n=ft/3,r=Jd(e),i=r(t,n);return i.parallels=function(s){return arguments.length?r(t=s[0]*Nt,n=s[1]*Nt):[t*re,n*re]},i}function Sx(e){var t=Ot(e);function n(r,i){return[r*t,bt(i)/t]}return n.invert=function(r,i){return[r/t,gn(i*t)]},n}function Tx(e,t){var n=bt(e),r=(n+bt(t))/2;if(St(r)<_t)return Sx(e);var i=1+n*(2*r-n),s=Ue(i)/r;function a(o,l){var c=Ue(i-2*r*bt(l))/r;return[c*bt(o*=r),s-c*Ot(o)]}return a.invert=function(o,l){var c=s-l,u=jn(o,St(c))*kn(c);return c*r<0&&(u-=ft*kn(o)*kn(c)),[u/r,gn((i-(o*o+c*c)*r*r)/(2*r))]},a}function ef(){return tf(Tx).scale(155.424).center([0,33.6442])}function Ox(){return ef().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Il(e,t){return[e,Gb(Vb((he+t)/2))]}Il.invert=function(e,t){return[e,2*yd(Hb(t))-he]};function wx(){return Mx(Il).scale(961/Ee)}function Mx(e){var t=ha(e),n=t.center,r=t.scale,i=t.translate,s=t.clipExtent,a=null,o,l,c;t.scale=function(d){return arguments.length?(r(d),u()):r()},t.translate=function(d){return arguments.length?(i(d),u()):i()},t.center=function(d){return arguments.length?(n(d),u()):n()},t.clipExtent=function(d){return arguments.length?(d==null?a=o=l=c=null:(a=+d[0][0],o=+d[0][1],l=+d[1][0],c=+d[1][1]),u()):a==null?null:[[a,o],[l,c]]};function u(){var d=ft*r(),h=t(Wb(t.rotate()).invert([0,0]));return s(a==null?[[h[0]-d,h[1]-d],[h[0]+d,h[1]+d]]:e===Il?[[Math.max(h[0]-d,a),o],[Math.min(h[0]+d,l),c]]:[[a,Math.max(h[1]-d,o)],[l,Math.min(h[1]+d,c)]])}return u()}function da(e,t){return[e,t]}da.invert=da;function Ax(){return ha(da).scale(152.63)}function Cx(e,t){var n=Ot(e),r=e===t?bt(e):(n-Ot(t))/(t-e),i=n/r+e;if(St(r)<_t)return da;function s(a,o){var l=i-o,c=r*a;return[l*bt(c),i-l*Ot(c)]}return s.invert=function(a,o){var l=i-o,c=jn(a,St(l))*kn(l);return l*r<0&&(c-=ft*kn(a)*kn(l)),[c/r,i-kn(r)*Ue(a*a+l*l)]},s}function Dx(){return tf(Cx).scale(131.154).center([0,13.9389])}var Ai=1.340264,Ci=-.081106,Di=893e-6,Li=.003796,fa=Ue(3)/2,Lx=12;function nf(e,t){var n=gn(fa*bt(t)),r=n*n,i=r*r*r;return[e*Ot(n)/(fa*(Ai+3*Ci*r+i*(7*Di+9*Li*r))),n*(Ai+Ci*r+i*(Di+Li*r))]}nf.invert=function(e,t){for(var n=t,r=n*n,i=r*r*r,s=0,a,o,l;s<Lx&&(o=n*(Ai+Ci*r+i*(Di+Li*r))-t,l=Ai+3*Ci*r+i*(7*Di+9*Li*r),n-=a=o/l,r=n*n,i=r*r*r,!(St(a)<md));++s);return[fa*e*(Ai+3*Ci*r+i*(7*Di+9*Li*r))/Ot(n),gn(bt(n)/fa)]};function Rx(){return ha(nf).scale(177.158)}function rf(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)))]}rf.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(St(i)>_t&&--r>0);return[e/(.8707+(s=n*n)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),n]};function Ix(){return ha(rf).scale(175.295)}function kx(e,t){return e.parent===t.parent?1:2}function Px(e){return e.reduce(Nx,0)/e.length}function Nx(e,t){return e+t.x}function $x(e){return 1+e.reduce(Fx,0)}function Fx(e,t){return Math.max(e,t.y)}function Ux(e){for(var t;t=e.children;)e=t[0];return e}function Bx(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Hx(){var e=kx,t=1,n=1,r=!1;function i(s){var a,o=0;s.eachAfter(function(h){var f=h.children;f?(h.x=Px(f),h.y=$x(f)):(h.x=a?o+=e(h,a):0,h.y=0,a=h)});var l=Ux(s),c=Bx(s),u=l.x-e(l,c)/2,d=c.x+e(c,l)/2;return s.eachAfter(r?function(h){h.x=(h.x-s.x)*t,h.y=(s.y-h.y)*n}:function(h){h.x=(h.x-u)/(d-u)*t,h.y=(1-(s.y?h.y/s.y:1))*n})}return i.separation=function(s){return arguments.length?(e=s,i):e},i.size=function(s){return arguments.length?(r=!1,t=+s[0],n=+s[1],i):r?null:[t,n]},i.nodeSize=function(s){return arguments.length?(r=!0,t=+s[0],n=+s[1],i):r?[t,n]:null},i}function Gx(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 Vx(){return this.eachAfter(Gx)}function zx(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function Wx(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 Yx(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 qx(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function Xx(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 jx(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Zx(e){for(var t=this,n=Kx(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 Kx(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 Qx(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function Jx(){return Array.from(this)}function t_(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function e_(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*n_(){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 Ri(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=s_)):t===void 0&&(t=i_);for(var n=new Ii(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 Ii(a[o])),s.parent=r,s.depth=r.depth+1;return n.eachBefore(o_)}function r_(){return Ri(this).eachBefore(a_)}function i_(e){return e.children}function s_(e){return Array.isArray(e)?e[1]:null}function a_(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function o_(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Ii(e){this.data=e,this.depth=this.height=0,this.parent=null}Ii.prototype=Ri.prototype={constructor:Ii,count:Vx,each:zx,eachAfter:Yx,eachBefore:Wx,find:qx,sum:Xx,sort:jx,path:Zx,ancestors:Qx,descendants:Jx,leaves:t_,links:e_,copy:r_,[Symbol.iterator]:n_};function l_(e){return e==null?null:sf(e)}function sf(e){if(typeof e!="function")throw new Error;return e}function Kn(){return 0}function Mr(e){return function(){return e}}const c_=1664525,u_=1013904223,af=4294967296;function h_(){let e=1;return()=>(e=(c_*e+u_)%af)/af}function d_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function f_(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 p_(e,t){for(var n=0,r=(e=f_(Array.from(e),t)).length,i=[],s,a;n<r;)s=e[n],a&&of(a,s)?++n:(a=m_(i=g_(i,s)),n=0);return a}function g_(e,t){var n,r;if(kl(t,e))return[t];for(n=0;n<e.length;++n)if(pa(t,e[n])&&kl(ki(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(pa(ki(e[n],e[r]),t)&&pa(ki(e[n],t),e[r])&&pa(ki(e[r],t),e[n])&&kl(lf(e[n],e[r],t),e))return[e[n],e[r],t];throw new Error}function pa(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 of(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 kl(e,t){for(var n=0;n<t.length;++n)if(!of(e,t[n]))return!1;return!0}function m_(e){switch(e.length){case 1:return v_(e[0]);case 2:return ki(e[0],e[1]);case 3:return lf(e[0],e[1],e[2])}}function v_(e){return{x:e.x,y:e.y,r:e.r}}function ki(e,t){var n=e.x,r=e.y,i=e.r,s=t.x,a=t.y,o=t.r,l=s-n,c=a-r,u=o-i,d=Math.sqrt(l*l+c*c);return{x:(n+s+l/d*u)/2,y:(r+a+c/d*u)/2,r:(d+i+o)/2}}function lf(e,t,n){var r=e.x,i=e.y,s=e.r,a=t.x,o=t.y,l=t.r,c=n.x,u=n.y,d=n.r,h=r-a,f=r-c,p=i-o,g=i-u,m=l-s,v=d-s,E=r*r+i*i-s*s,y=E-a*a-o*o+l*l,x=E-c*c-u*u+d*d,S=f*p-h*g,_=(p*x-g*y)/(S*2)-r,A=(g*m-p*v)/S,L=(f*y-h*x)/(S*2)-i,B=(h*v-f*m)/S,k=A*A+B*B-1,O=2*(s+_*A+L*B),H=_*_+L*L-s*s,P=-(Math.abs(k)>1e-6?(O+Math.sqrt(O*O-4*k*H))/(2*k):H/O);return{x:r+_+A*P,y:i+L+B*P,r:P}}function cf(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 uf(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 hf(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 ga(e){this._=e,this.next=null,this.previous=null}function y_(e,t){if(!(s=(e=d_(e)).length))return 0;var n,r,i,s,a,o,l,c,u,d,h;if(n=e[0],n.x=0,n.y=0,!(s>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(s>2))return n.r+r.r;cf(r,n,i=e[2]),n=new ga(n),r=new ga(r),i=new ga(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(l=3;l<s;++l){cf(n._,r._,i=e[l]),i=new ga(i),c=r.next,u=n.previous,d=r._.r,h=n._.r;do if(d<=h){if(uf(c._,i._)){r=c,n.next=r,r.previous=n,--l;continue t}d+=c._.r,c=c.next}else{if(uf(u._,i._)){n=u,n.next=r,r.previous=n,--l;continue t}h+=u._.r,u=u.previous}while(c!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=hf(n);(i=i.next)!==r;)(o=hf(i))<a&&(n=i,a=o);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=p_(n,t),l=0;l<s;++l)n=e[l],n.x-=i.x,n.y-=i.y;return i.r}function E_(e){return Math.sqrt(e.value)}function b_(){var e=null,t=1,n=1,r=Kn;function i(s){const a=h_();return s.x=t/2,s.y=n/2,e?s.eachBefore(df(e)).eachAfter(Pl(r,.5,a)).eachBefore(ff(1)):s.eachBefore(df(E_)).eachAfter(Pl(Kn,1,a)).eachAfter(Pl(r,s.r/Math.min(t,n),a)).eachBefore(ff(Math.min(t,n)/(2*s.r))),s}return i.radius=function(s){return arguments.length?(e=l_(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:Mr(+s),i):r},i}function df(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Pl(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=y_(i,n),o)for(s=0;s<a;++s)i[s].r-=o;r.r=l+o}}}function ff(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 x_(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function __(e,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 S_(e,t){return e.parent===t.parent?1:2}function Nl(e){var t=e.children;return t?t[0]:e.t}function $l(e){var t=e.children;return t?t[t.length-1]:e.t}function T_(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 O_(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 w_(e,t,n){return e.a.parent===t.parent?e.a:n}function ma(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}ma.prototype=Object.create(Ii.prototype);function M_(e){for(var t=new ma(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 ma(s[a],a)),i.parent=n;return(t.parent=new ma(null,0)).children=[t],t}function A_(){var e=S_,t=1,n=1,r=null;function i(c){var u=M_(c);if(u.eachAfter(s),u.parent.m=-u.z,u.eachBefore(a),r)c.eachBefore(l);else{var d=c,h=c,f=c;c.eachBefore(function(E){E.x<d.x&&(d=E),E.x>h.x&&(h=E),E.depth>f.depth&&(f=E)});var p=d===h?1:e(d,h)/2,g=p-d.x,m=t/(h.x+p+g),v=n/(f.depth||1);c.eachBefore(function(E){E.x=(E.x+g)*m,E.y=E.depth*v})}return c}function s(c){var u=c.children,d=c.parent.children,h=c.i?d[c.i-1]:null;if(u){O_(c);var f=(u[0].z+u[u.length-1].z)/2;h?(c.z=h.z+e(c._,h._),c.m=c.z-f):c.z=f}else h&&(c.z=h.z+e(c._,h._));c.parent.A=o(c,h,c.parent.A||d[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function o(c,u,d){if(u){for(var h=c,f=c,p=u,g=h.parent.children[0],m=h.m,v=f.m,E=p.m,y=g.m,x;p=$l(p),h=Nl(h),p&&h;)g=Nl(g),f=$l(f),f.a=c,x=p.z+E-h.z-m+e(p._,h._),x>0&&(T_(w_(p,c,d),c,x),m+=x,v+=x),E+=p.m,m+=h.m,y+=g.m,v+=f.m;p&&!$l(f)&&(f.t=p,f.m+=E-v),h&&!Nl(g)&&(g.t=h,g.m+=m-y,d=c)}return d}function l(c){c.x*=t,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(r=!1,t=+c[0],n=+c[1],i):r?null:[t,n]},i.nodeSize=function(c){return arguments.length?(r=!0,t=+c[0],n=+c[1],i):r?[t,n]:null},i}function C_(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 D_=(1+Math.sqrt(5))/2;function L_(e,t,n,r,i,s){for(var a=[],o=t.children,l,c,u=0,d=0,h=o.length,f,p,g=t.value,m,v,E,y,x,S,_;u<h;){f=i-n,p=s-r;do m=o[d++].value;while(!m&&d<h);for(v=E=m,S=Math.max(p/f,f/p)/(g*e),_=m*m*S,x=Math.max(E/_,_/v);d<h;++d){if(m+=c=o[d].value,c<v&&(v=c),c>E&&(E=c),_=m*m*S,y=Math.max(E/_,_/v),y>x){m-=c;break}x=y}a.push(l={value:m,dice:f<p,children:o.slice(u,d)}),l.dice?__(l,n,r,i,g?r+=p*m/g:s):C_(l,n,r,g?n+=f*m/g:i,s),g-=m,u=d}return a}const R_=function e(t){function n(r,i,s,a,o){L_(t,r,i,s,a,o)}return n.ratio=function(r){return e((r=+r)>1?r:1)},n}(D_);function I_(){var e=R_,t=!1,n=1,r=1,i=[0],s=Kn,a=Kn,o=Kn,l=Kn,c=Kn;function u(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],t&&h.eachBefore(x_),h}function d(h){var f=i[h.depth],p=h.x0+f,g=h.y0+f,m=h.x1-f,v=h.y1-f;m<p&&(p=m=(p+m)/2),v<g&&(g=v=(g+v)/2),h.x0=p,h.y0=g,h.x1=m,h.y1=v,h.children&&(f=i[h.depth+1]=s(h)/2,p+=c(h)-f,g+=a(h)-f,m-=o(h)-f,v-=l(h)-f,m<p&&(p=m=(p+m)/2),v<g&&(g=v=(g+v)/2),e(h,p,g,m,v))}return u.round=function(h){return arguments.length?(t=!!h,u):t},u.size=function(h){return arguments.length?(n=+h[0],r=+h[1],u):[n,r]},u.tile=function(h){return arguments.length?(e=sf(h),u):e},u.padding=function(h){return arguments.length?u.paddingInner(h).paddingOuter(h):u.paddingInner()},u.paddingInner=function(h){return arguments.length?(s=typeof h=="function"?h:Mr(+h),u):s},u.paddingOuter=function(h){return arguments.length?u.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):u.paddingTop()},u.paddingTop=function(h){return arguments.length?(a=typeof h=="function"?h:Mr(+h),u):a},u.paddingRight=function(h){return arguments.length?(o=typeof h=="function"?h:Mr(+h),u):o},u.paddingBottom=function(h){return arguments.length?(l=typeof h=="function"?h:Mr(+h),u):l},u.paddingLeft=function(h){return arguments.length?(c=typeof h=="function"?h:Mr(+h),u):c},u}function Ar(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const pf=Symbol("implicit");function va(){var e=new sh,t=[],n=[],r=pf;function i(s){let a=e.get(s);if(a===void 0){if(r!==pf)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 sh;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 va(t,n).unknown(r)},Ar.apply(i,arguments),i}function Pi(){var e=va().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,s,a,o=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var h=t().length,f=i<r,p=f?i:r,g=f?r:i;s=(g-p)/Math.max(1,h-l+c*2),o&&(s=Math.floor(s)),p+=(g-p-s*(h-l))*u,a=s*(1-l),o&&(p=Math.round(p),a=Math.round(a));var m=G0(h).map(function(v){return p+s*v});return n(f?m.reverse():m)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,o=!0,d()},e.bandwidth=function(){return a},e.step=function(){return s},e.round=function(h){return arguments.length?(o=!!h,d()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,c=+h),d()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),d()):l},e.paddingOuter=function(h){return arguments.length?(c=+h,d()):c},e.align=function(h){return arguments.length?(u=Math.max(0,Math.min(1,h)),d()):u},e.copy=function(){return Pi(t(),[r,i]).round(o).paddingInner(l).paddingOuter(c).align(u)},Ar.apply(d(),arguments)}function k_(e){return function(){return e}}function P_(e){return+e}var gf=[0,1];function Cr(e){return e}function Fl(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:k_(isNaN(t)?NaN:.5)}function N_(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function $_(e,t,n){var r=e[0],i=e[1],s=t[0],a=t[1];return i<r?(r=Fl(i,r),s=n(a,s)):(r=Fl(r,i),s=n(s,a)),function(o){return s(r(o))}}function F_(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]=Fl(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 Ul(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function mf(){var e=gf,t=gf,n=gi,r,i,s,a=Cr,o,l,c;function u(){var h=Math.min(e.length,t.length);return a!==Cr&&(a=N_(e[0],e[h-1])),o=h>2?F_:$_,l=c=null,d}function d(h){return h==null||isNaN(h=+h)?s:(l||(l=o(e.map(r),t,n)))(r(a(h)))}return d.invert=function(h){return a(i((c||(c=o(t,e.map(r),ye)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,P_),u()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),u()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=Uh,u()},d.clamp=function(h){return arguments.length?(a=h?!0:Cr,u()):a!==Cr},d.interpolate=function(h){return arguments.length?(n=h,u()):n},d.unknown=function(h){return arguments.length?(s=h,d):s},function(h,f){return r=h,i=f,u()}}function vf(){return mf()(Cr,Cr)}function U_(e,t,n,r){var i=Io(e,t,n),s;switch(r=bi(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(s=Ub(i,a))&&(r.precision=s),gd(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(s=Bb(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=s-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(s=Fb(i))&&(r.precision=s-(r.type==="%")*2);break}}return hl(r)}function yf(e){var t=e.domain;return e.ticks=function(n){var r=t();return As(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return U_(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=mr(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=vf();return e.copy=function(){return Ul(e,Be())},Ar.apply(e,arguments),yf(e)}function Ef(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 bf(e){return Math.log(e)}function xf(e){return Math.exp(e)}function B_(e){return-Math.log(-e)}function H_(e){return-Math.exp(-e)}function G_(e){return isFinite(e)?+("1e"+e):e<0?0:e}function V_(e){return e===10?G_:e===Math.E?Math.exp:t=>Math.pow(e,t)}function z_(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 _f(e){return(t,n)=>-e(-t,n)}function W_(e){const t=e(bf,xf),n=t.domain;let r=10,i,s;function a(){return i=z_(r),s=V_(r),n()[0]<0?(i=_f(i),s=_f(s),e(B_,H_)):e(bf,xf),t}return t.base=function(o){return arguments.length?(r=+o,a()):r},t.domain=function(o){return arguments.length?(n(o),a()):n()},t.ticks=o=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let h=i(c),f=i(u),p,g;const m=o==null?10:+o;let v=[];if(!(r%1)&&f-h<m){if(h=Math.floor(h),f=Math.ceil(f),c>0){for(;h<=f;++h)for(p=1;p<r;++p)if(g=h<0?p/s(-h):p*s(h),!(g<c)){if(g>u)break;v.push(g)}}else for(;h<=f;++h)for(p=r-1;p>=1;--p)if(g=h>0?p/s(-h):p*s(h),!(g<c)){if(g>u)break;v.push(g)}v.length*2<m&&(v=As(c,u,m))}else v=As(h,f,Math.min(f-h,m)).map(s);return d?v.reverse():v},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=bi(l)).precision==null&&(l.trim=!0),l=hl(l)),o===1/0)return l;const c=Math.max(1,r*o/t.ticks().length);return u=>{let d=u/s(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(Ef(n(),{floor:o=>s(Math.floor(i(o))),ceil:o=>s(Math.ceil(i(o)))})),t}function Sf(){const e=W_(mf()).domain([1,10]);return e.copy=()=>Ul(e,Sf()).base(e.base()),Ar.apply(e,arguments),e}function Bl(){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 Bl().domain([e,t]).range(i).unknown(s)},Ar.apply(yf(a),arguments)}const Hl=new Date,Gl=new Date;function zt(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=>zt(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)=>(Hl.setTime(+s),Gl.setTime(+a),e(Hl),e(Gl),Math.floor(n(Hl,Gl))),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 ya=zt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ya.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?zt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):ya),ya.range;const vn=1e3,Me=vn*60,yn=Me*60,En=yn*24,Vl=En*7,Tf=En*30,zl=En*365,Dr=zt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*vn)},(e,t)=>(t-e)/vn,e=>e.getUTCSeconds());Dr.range;const Wl=zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*vn)},(e,t)=>{e.setTime(+e+t*Me)},(e,t)=>(t-e)/Me,e=>e.getMinutes());Wl.range,zt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Me)},(e,t)=>(t-e)/Me,e=>e.getUTCMinutes()).range;const Yl=zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*vn-e.getMinutes()*Me)},(e,t)=>{e.setTime(+e+t*yn)},(e,t)=>(t-e)/yn,e=>e.getHours());Yl.range,zt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*yn)},(e,t)=>(t-e)/yn,e=>e.getUTCHours()).range;const Ni=zt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Me)/En,e=>e.getDate()-1);Ni.range;const ql=zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/En,e=>e.getUTCDate()-1);ql.range,zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/En,e=>Math.floor(e/En)).range;function Qn(e){return zt(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())*Me)/Vl)}const Ea=Qn(0),ba=Qn(1),Y_=Qn(2),q_=Qn(3),Lr=Qn(4),X_=Qn(5),j_=Qn(6);Ea.range,ba.range,Y_.range,q_.range,Lr.range,X_.range,j_.range;function Jn(e){return zt(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)/Vl)}const Of=Jn(0),xa=Jn(1),Z_=Jn(2),K_=Jn(3),Rr=Jn(4),Q_=Jn(5),J_=Jn(6);Of.range,xa.range,Z_.range,K_.range,Rr.range,Q_.range,J_.range;const Xl=zt(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());Xl.range,zt(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 bn=zt(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());bn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zt(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)}),bn.range;const tr=zt(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());tr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zt(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)}),tr.range;function tS(e,t,n,r,i,s){const a=[[Dr,1,vn],[Dr,5,5*vn],[Dr,15,15*vn],[Dr,30,30*vn],[s,1,Me],[s,5,5*Me],[s,15,15*Me],[s,30,30*Me],[i,1,yn],[i,3,3*yn],[i,6,6*yn],[i,12,12*yn],[r,1,En],[r,2,2*En],[n,1,Vl],[t,1,Tf],[t,3,3*Tf],[e,1,zl]];function o(c,u,d){const h=u<c;h&&([c,u]=[u,c]);const f=d&&typeof d.range=="function"?d:l(c,u,d),p=f?f.range(c,+u+1):[];return h?p.reverse():p}function l(c,u,d){const h=Math.abs(u-c)/d,f=Do(([,,m])=>m).right(a,h);if(f===a.length)return e.every(Io(c/zl,u/zl,d));if(f===0)return ya.every(Math.max(Io(c,u,d),1));const[p,g]=a[h/a[f-1][2]<a[f][2]/h?f-1:f];return p.every(g)}return[o,l]}const[eS,nS]=tS(bn,Xl,Ea,Ni,Yl,Wl);function jl(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 Zl(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 $i(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function rS(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=Fi(i),u=Ui(i),d=Fi(s),h=Ui(s),f=Fi(a),p=Ui(a),g=Fi(o),m=Ui(o),v=Fi(l),E=Ui(l),y={a:$,A:N,b:F,B:j,c:null,d:Lf,e:Lf,f:wS,g:NS,G:FS,H:SS,I:TS,j:OS,L:Rf,m:MS,M:AS,p:q,q:ot,Q:Ff,s:Uf,S:CS,u:DS,U:LS,V:RS,w:IS,W:kS,x:null,X:null,y:PS,Y:$S,Z:US,"%":$f},x={a:it,A:mt,b:st,B:Z,c:null,d:kf,e:kf,f:VS,g:JS,G:eT,H:BS,I:HS,j:GS,L:Pf,m:zS,M:WS,p:et,q:vt,Q:Ff,s:Uf,S:YS,u:qS,U:XS,V:jS,w:ZS,W:KS,x:null,X:null,y:QS,Y:tT,Z:nT,"%":$f},S={a:k,A:O,b:H,B:P,c:M,d:Cf,e:Cf,f:ES,g:Af,G:Mf,H:Df,I:Df,j:gS,L:yS,m:pS,M:mS,p:B,q:fS,Q:xS,s:_S,S:vS,u:lS,U:cS,V:uS,w:oS,W:hS,x:w,X:U,y:Af,Y:Mf,Z:dS,"%":bS};y.x=_(n,y),y.X=_(r,y),y.c=_(t,y),x.x=_(n,x),x.X=_(r,x),x.c=_(t,x);function _(Y,K){return function(ut){var C=[],z=-1,V=0,At=Y.length,Wt,rt,Ct;for(ut instanceof Date||(ut=new Date(+ut));++z<At;)Y.charCodeAt(z)===37&&(C.push(Y.slice(V,z)),(rt=wf[Wt=Y.charAt(++z)])!=null?Wt=Y.charAt(++z):rt=Wt==="e"?" ":"0",(Ct=K[Wt])&&(Wt=Ct(ut,rt)),C.push(Wt),V=z+1);return C.push(Y.slice(V,z)),C.join("")}}function A(Y,K){return function(ut){var C=$i(1900,void 0,1),z=L(C,Y,ut+="",0),V,At;if(z!=ut.length)return null;if("Q"in C)return new Date(C.Q);if("s"in C)return new Date(C.s*1e3+("L"in C?C.L:0));if(K&&!("Z"in C)&&(C.Z=0),"p"in C&&(C.H=C.H%12+C.p*12),C.m===void 0&&(C.m="q"in C?C.q:0),"V"in C){if(C.V<1||C.V>53)return null;"w"in C||(C.w=1),"Z"in C?(V=Zl($i(C.y,0,1)),At=V.getUTCDay(),V=At>4||At===0?xa.ceil(V):xa(V),V=ql.offset(V,(C.V-1)*7),C.y=V.getUTCFullYear(),C.m=V.getUTCMonth(),C.d=V.getUTCDate()+(C.w+6)%7):(V=jl($i(C.y,0,1)),At=V.getDay(),V=At>4||At===0?ba.ceil(V):ba(V),V=Ni.offset(V,(C.V-1)*7),C.y=V.getFullYear(),C.m=V.getMonth(),C.d=V.getDate()+(C.w+6)%7)}else("W"in C||"U"in C)&&("w"in C||(C.w="u"in C?C.u%7:"W"in C?1:0),At="Z"in C?Zl($i(C.y,0,1)).getUTCDay():jl($i(C.y,0,1)).getDay(),C.m=0,C.d="W"in C?(C.w+6)%7+C.W*7-(At+5)%7:C.w+C.U*7-(At+6)%7);return"Z"in C?(C.H+=C.Z/100|0,C.M+=C.Z%100,Zl(C)):jl(C)}}function L(Y,K,ut,C){for(var z=0,V=K.length,At=ut.length,Wt,rt;z<V;){if(C>=At)return-1;if(Wt=K.charCodeAt(z++),Wt===37){if(Wt=K.charAt(z++),rt=S[Wt in wf?K.charAt(z++):Wt],!rt||(C=rt(Y,ut,C))<0)return-1}else if(Wt!=ut.charCodeAt(C++))return-1}return C}function B(Y,K,ut){var C=c.exec(K.slice(ut));return C?(Y.p=u.get(C[0].toLowerCase()),ut+C[0].length):-1}function k(Y,K,ut){var C=f.exec(K.slice(ut));return C?(Y.w=p.get(C[0].toLowerCase()),ut+C[0].length):-1}function O(Y,K,ut){var C=d.exec(K.slice(ut));return C?(Y.w=h.get(C[0].toLowerCase()),ut+C[0].length):-1}function H(Y,K,ut){var C=v.exec(K.slice(ut));return C?(Y.m=E.get(C[0].toLowerCase()),ut+C[0].length):-1}function P(Y,K,ut){var C=g.exec(K.slice(ut));return C?(Y.m=m.get(C[0].toLowerCase()),ut+C[0].length):-1}function M(Y,K,ut){return L(Y,t,K,ut)}function w(Y,K,ut){return L(Y,n,K,ut)}function U(Y,K,ut){return L(Y,r,K,ut)}function $(Y){return a[Y.getDay()]}function N(Y){return s[Y.getDay()]}function F(Y){return l[Y.getMonth()]}function j(Y){return o[Y.getMonth()]}function q(Y){return i[+(Y.getHours()>=12)]}function ot(Y){return 1+~~(Y.getMonth()/3)}function it(Y){return a[Y.getUTCDay()]}function mt(Y){return s[Y.getUTCDay()]}function st(Y){return l[Y.getUTCMonth()]}function Z(Y){return o[Y.getUTCMonth()]}function et(Y){return i[+(Y.getUTCHours()>=12)]}function vt(Y){return 1+~~(Y.getUTCMonth()/3)}return{format:function(Y){var K=_(Y+="",y);return K.toString=function(){return Y},K},parse:function(Y){var K=A(Y+="",!1);return K.toString=function(){return Y},K},utcFormat:function(Y){var K=_(Y+="",x);return K.toString=function(){return Y},K},utcParse:function(Y){var K=A(Y+="",!0);return K.toString=function(){return Y},K}}}var wf={"-":"",_:" ",0:"0"},Yt=/^\s*\d+/,iS=/^%/,sS=/[\\^$*+?|[\]().{}]/g;function Et(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 aS(e){return e.replace(sS,"\\$&")}function Fi(e){return new RegExp("^(?:"+e.map(aS).join("|")+")","i")}function Ui(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function oS(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function lS(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function cS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function uS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function hS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Mf(e,t,n){var r=Yt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Af(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function dS(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 fS(e,t,n){var r=Yt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function pS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Cf(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function gS(e,t,n){var r=Yt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Df(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function mS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function vS(e,t,n){var r=Yt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function yS(e,t,n){var r=Yt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ES(e,t,n){var r=Yt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function bS(e,t,n){var r=iS.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function xS(e,t,n){var r=Yt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function _S(e,t,n){var r=Yt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Lf(e,t){return Et(e.getDate(),t,2)}function SS(e,t){return Et(e.getHours(),t,2)}function TS(e,t){return Et(e.getHours()%12||12,t,2)}function OS(e,t){return Et(1+Ni.count(bn(e),e),t,3)}function Rf(e,t){return Et(e.getMilliseconds(),t,3)}function wS(e,t){return Rf(e,t)+"000"}function MS(e,t){return Et(e.getMonth()+1,t,2)}function AS(e,t){return Et(e.getMinutes(),t,2)}function CS(e,t){return Et(e.getSeconds(),t,2)}function DS(e){var t=e.getDay();return t===0?7:t}function LS(e,t){return Et(Ea.count(bn(e)-1,e),t,2)}function If(e){var t=e.getDay();return t>=4||t===0?Lr(e):Lr.ceil(e)}function RS(e,t){return e=If(e),Et(Lr.count(bn(e),e)+(bn(e).getDay()===4),t,2)}function IS(e){return e.getDay()}function kS(e,t){return Et(ba.count(bn(e)-1,e),t,2)}function PS(e,t){return Et(e.getFullYear()%100,t,2)}function NS(e,t){return e=If(e),Et(e.getFullYear()%100,t,2)}function $S(e,t){return Et(e.getFullYear()%1e4,t,4)}function FS(e,t){var n=e.getDay();return e=n>=4||n===0?Lr(e):Lr.ceil(e),Et(e.getFullYear()%1e4,t,4)}function US(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Et(t/60|0,"0",2)+Et(t%60,"0",2)}function kf(e,t){return Et(e.getUTCDate(),t,2)}function BS(e,t){return Et(e.getUTCHours(),t,2)}function HS(e,t){return Et(e.getUTCHours()%12||12,t,2)}function GS(e,t){return Et(1+ql.count(tr(e),e),t,3)}function Pf(e,t){return Et(e.getUTCMilliseconds(),t,3)}function VS(e,t){return Pf(e,t)+"000"}function zS(e,t){return Et(e.getUTCMonth()+1,t,2)}function WS(e,t){return Et(e.getUTCMinutes(),t,2)}function YS(e,t){return Et(e.getUTCSeconds(),t,2)}function qS(e){var t=e.getUTCDay();return t===0?7:t}function XS(e,t){return Et(Of.count(tr(e)-1,e),t,2)}function Nf(e){var t=e.getUTCDay();return t>=4||t===0?Rr(e):Rr.ceil(e)}function jS(e,t){return e=Nf(e),Et(Rr.count(tr(e),e)+(tr(e).getUTCDay()===4),t,2)}function ZS(e){return e.getUTCDay()}function KS(e,t){return Et(xa.count(tr(e)-1,e),t,2)}function QS(e,t){return Et(e.getUTCFullYear()%100,t,2)}function JS(e,t){return e=Nf(e),Et(e.getUTCFullYear()%100,t,2)}function tT(e,t){return Et(e.getUTCFullYear()%1e4,t,4)}function eT(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Rr(e):Rr.ceil(e),Et(e.getUTCFullYear()%1e4,t,4)}function nT(){return"+0000"}function $f(){return"%"}function Ff(e){return+e}function Uf(e){return Math.floor(+e/1e3)}var Ir,Bf;rT({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 rT(e){return Ir=rS(e),Bf=Ir.format,Ir.parse,Ir.utcFormat,Ir.utcParse,Ir}function iT(e){return new Date(e)}function sT(e){return e instanceof Date?+e:+new Date(+e)}function Hf(e,t,n,r,i,s,a,o,l,c){var u=vf(),d=u.invert,h=u.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),v=c("%a %d"),E=c("%b %d"),y=c("%B"),x=c("%Y");function S(_){return(l(_)<_?f:o(_)<_?p:a(_)<_?g:s(_)<_?m:r(_)<_?i(_)<_?v:E:n(_)<_?y:x)(_)}return u.invert=function(_){return new Date(d(_))},u.domain=function(_){return arguments.length?h(Array.from(_,sT)):h().map(iT)},u.ticks=function(_){var A=h();return e(A[0],A[A.length-1],_??10)},u.tickFormat=function(_,A){return A==null?S:c(A)},u.nice=function(_){var A=h();return(!_||typeof _.range!="function")&&(_=t(A[0],A[A.length-1],_??10)),_?h(Ef(A,_)):u},u.copy=function(){return Ul(u,Hf(e,t,n,r,i,s,a,o,l,c))},u}function Gf(){return Ar.apply(Hf(eS,nS,bn,Xl,Ea,Ni,Yl,Wl,Dr,Bf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function dt(e){return function(){return e}}const Vf=Math.abs,Jt=Math.atan2,er=Math.cos,aT=Math.max,Kl=Math.min,Je=Math.sin,kr=Math.sqrt,te=1e-12,Bi=Math.PI,_a=Bi/2,Sa=2*Bi;function oT(e){return e>1?0:e<-1?Bi:Math.acos(e)}function zf(e){return e>=1?_a:e<=-1?-_a:Math.asin(e)}function Ta(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 Cb(t)}function lT(e){return e.innerRadius}function cT(e){return e.outerRadius}function uT(e){return e.startAngle}function hT(e){return e.endAngle}function dT(e){return e&&e.padAngle}function fT(e,t,n,r,i,s,a,o){var l=n-e,c=r-t,u=a-i,d=o-s,h=d*l-u*c;if(!(h*h<te))return h=(u*(t-s)-d*(e-i))/h,[e+h*l,t+h*c]}function Oa(e,t,n,r,i,s,a){var o=e-n,l=t-r,c=(a?s:-s)/kr(o*o+l*l),u=c*l,d=-c*o,h=e+u,f=t+d,p=n+u,g=r+d,m=(h+p)/2,v=(f+g)/2,E=p-h,y=g-f,x=E*E+y*y,S=i-s,_=h*g-p*f,A=(y<0?-1:1)*kr(aT(0,S*S*x-_*_)),L=(_*y-E*A)/x,B=(-_*E-y*A)/x,k=(_*y+E*A)/x,O=(-_*E+y*A)/x,H=L-m,P=B-v,M=k-m,w=O-v;return H*H+P*P>M*M+w*w&&(L=k,B=O),{cx:L,cy:B,x01:-u,y01:-d,x11:L*(i/S-1),y11:B*(i/S-1)}}function Hi(){var e=lT,t=cT,n=dt(0),r=null,i=uT,s=hT,a=dT,o=null,l=Ta(c);function c(){var u,d,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-_a,g=s.apply(this,arguments)-_a,m=Vf(g-p),v=g>p;if(o||(o=u=l()),f<h&&(d=f,f=h,h=d),!(f>te))o.moveTo(0,0);else if(m>Sa-te)o.moveTo(f*er(p),f*Je(p)),o.arc(0,0,f,p,g,!v),h>te&&(o.moveTo(h*er(g),h*Je(g)),o.arc(0,0,h,g,p,v));else{var E=p,y=g,x=p,S=g,_=m,A=m,L=a.apply(this,arguments)/2,B=L>te&&(r?+r.apply(this,arguments):kr(h*h+f*f)),k=Kl(Vf(f-h)/2,+n.apply(this,arguments)),O=k,H=k,P,M;if(B>te){var w=zf(B/h*Je(L)),U=zf(B/f*Je(L));(_-=w*2)>te?(w*=v?1:-1,x+=w,S-=w):(_=0,x=S=(p+g)/2),(A-=U*2)>te?(U*=v?1:-1,E+=U,y-=U):(A=0,E=y=(p+g)/2)}var $=f*er(E),N=f*Je(E),F=h*er(S),j=h*Je(S);if(k>te){var q=f*er(y),ot=f*Je(y),it=h*er(x),mt=h*Je(x),st;if(m<Bi)if(st=fT($,N,it,mt,q,ot,F,j)){var Z=$-st[0],et=N-st[1],vt=q-st[0],Y=ot-st[1],K=1/Je(oT((Z*vt+et*Y)/(kr(Z*Z+et*et)*kr(vt*vt+Y*Y)))/2),ut=kr(st[0]*st[0]+st[1]*st[1]);O=Kl(k,(h-ut)/(K-1)),H=Kl(k,(f-ut)/(K+1))}else O=H=0}A>te?H>te?(P=Oa(it,mt,$,N,f,H,v),M=Oa(q,ot,F,j,f,H,v),o.moveTo(P.cx+P.x01,P.cy+P.y01),H<k?o.arc(P.cx,P.cy,H,Jt(P.y01,P.x01),Jt(M.y01,M.x01),!v):(o.arc(P.cx,P.cy,H,Jt(P.y01,P.x01),Jt(P.y11,P.x11),!v),o.arc(0,0,f,Jt(P.cy+P.y11,P.cx+P.x11),Jt(M.cy+M.y11,M.cx+M.x11),!v),o.arc(M.cx,M.cy,H,Jt(M.y11,M.x11),Jt(M.y01,M.x01),!v))):(o.moveTo($,N),o.arc(0,0,f,E,y,!v)):o.moveTo($,N),!(h>te)||!(_>te)?o.lineTo(F,j):O>te?(P=Oa(F,j,q,ot,h,-O,v),M=Oa($,N,it,mt,h,-O,v),o.lineTo(P.cx+P.x01,P.cy+P.y01),O<k?o.arc(P.cx,P.cy,O,Jt(P.y01,P.x01),Jt(M.y01,M.x01),!v):(o.arc(P.cx,P.cy,O,Jt(P.y01,P.x01),Jt(P.y11,P.x11),!v),o.arc(0,0,h,Jt(P.cy+P.y11,P.cx+P.x11),Jt(M.cy+M.y11,M.cx+M.x11),v),o.arc(M.cx,M.cy,O,Jt(M.y11,M.x11),Jt(M.y01,M.x01),!v))):o.arc(0,0,h,S,x,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,d=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-Bi/2;return[er(d)*u,Je(d)*u]},c.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:dt(+u),c):e},c.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:dt(+u),c):t},c.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:dt(+u),c):n},c.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:dt(+u),c):r},c.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:dt(+u),c):i},c.endAngle=function(u){return arguments.length?(s=typeof u=="function"?u:dt(+u),c):s},c.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:dt(+u),c):a},c.context=function(u){return arguments.length?(o=u??null,c):o},c}var pT=Array.prototype.slice;function wa(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Wf(e){this._context=e}Wf.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 Ma(e){return new Wf(e)}function Ql(e){return e[0]}function Jl(e){return e[1]}function Gi(e,t){var n=dt(!0),r=null,i=Ma,s=null,a=Ta(o);e=typeof e=="function"?e:e===void 0?Ql:dt(e),t=typeof t=="function"?t:t===void 0?Jl:dt(t);function o(l){var c,u=(l=wa(l)).length,d,h=!1,f;for(r==null&&(s=i(f=a())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===h&&((h=!h)?s.lineStart():s.lineEnd()),h&&s.point(+e(d,c,l),+t(d,c,l));if(f)return s=null,f+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:dt(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:dt(+l),o):t},o.defined=function(l){return arguments.length?(n=typeof l=="function"?l:dt(!!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 tc(e,t,n){var r=null,i=dt(!0),s=null,a=Ma,o=null,l=Ta(c);e=typeof e=="function"?e:e===void 0?Ql:dt(+e),t=typeof t=="function"?t:dt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Jl:dt(+n);function c(d){var h,f,p,g=(d=wa(d)).length,m,v=!1,E,y=new Array(g),x=new Array(g);for(s==null&&(o=a(E=l())),h=0;h<=g;++h){if(!(h<g&&i(m=d[h],h,d))===v)if(v=!v)f=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=h-1;p>=f;--p)o.point(y[p],x[p]);o.lineEnd(),o.areaEnd()}v&&(y[h]=+e(m,h,d),x[h]=+t(m,h,d),o.point(r?+r(m,h,d):y[h],n?+n(m,h,d):x[h]))}if(E)return o=null,E+""||null}function u(){return Gi().defined(i).curve(a).context(s)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:dt(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:dt(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:dt(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:dt(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:dt(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:dt(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:dt(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,s!=null&&(o=a(s)),c):a},c.context=function(d){return arguments.length?(d==null?s=o=null:o=a(s=d),c):s},c}function gT(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function mT(e){return e}function vT(){var e=mT,t=gT,n=null,r=dt(0),i=dt(Sa),s=dt(0);function a(o){var l,c=(o=wa(o)).length,u,d,h=0,f=new Array(c),p=new Array(c),g=+r.apply(this,arguments),m=Math.min(Sa,Math.max(-Sa,i.apply(this,arguments)-g)),v,E=Math.min(Math.abs(m)/c,s.apply(this,arguments)),y=E*(m<0?-1:1),x;for(l=0;l<c;++l)(x=p[f[l]=l]=+e(o[l],l,o))>0&&(h+=x);for(t!=null?f.sort(function(S,_){return t(p[S],p[_])}):n!=null&&f.sort(function(S,_){return n(o[S],o[_])}),l=0,d=h?(m-c*y)/h:0;l<c;++l,g=v)u=f[l],x=p[u],v=g+(x>0?x*d:0)+y,p[u]={data:o[u],index:l,value:x,startAngle:g,endAngle:v,padAngle:E};return p}return a.value=function(o){return arguments.length?(e=typeof o=="function"?o:dt(+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:dt(+o),a):r},a.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:dt(+o),a):i},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:dt(+o),a):s},a}var yT=qf(Ma);function Yf(e){this._curve=e}Yf.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 qf(e){function t(n){return new Yf(e(n))}return t._curve=e,t}function ET(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(qf(n)):t()._curve},e}function bT(){return ET(Gi().curve(yT))}class xT{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 _T(e){return new xT(e,!0)}function ST(e){return e.source}function TT(e){return e.target}function OT(e){let t=ST,n=TT,r=Ql,i=Jl,s=null,a=null,o=Ta(l);function l(){let c;const u=pT.call(arguments),d=t.apply(this,u),h=n.apply(this,u);if(s==null&&(a=e(c=o())),a.lineStart(),u[0]=d,a.point(+r.apply(this,u),+i.apply(this,u)),u[0]=h,a.point(+r.apply(this,u),+i.apply(this,u)),a.lineEnd(),c)return a=null,c+""||null}return l.source=function(c){return arguments.length?(t=c,l):t},l.target=function(c){return arguments.length?(n=c,l):n},l.x=function(c){return arguments.length?(r=typeof c=="function"?c:dt(+c),l):r},l.y=function(c){return arguments.length?(i=typeof c=="function"?c:dt(+c),l):i},l.context=function(c){return arguments.length?(c==null?s=a=null:a=e(s=c),l):s},l}function wT(){return OT(_T)}function Pn(){}function Aa(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 Ca(e){this._context=e}Ca.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:Aa(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:Aa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MT(e){return new Ca(e)}function Xf(e){this._context=e}Xf.prototype={areaStart:Pn,areaEnd:Pn,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:Aa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function AT(e){return new Xf(e)}function jf(e){this._context=e}jf.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:Aa(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function CT(e){return new jf(e)}function Zf(e,t){this._basis=new Ca(e),this._beta=t}Zf.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 DT=function e(t){function n(r){return t===1?new Ca(r):new Zf(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Da(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 ec(e,t){this._context=e,this._k=(1-t)/6}ec.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:Da(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:Da(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 LT=function e(t){function n(r){return new ec(r,t)}return n.tension=function(r){return e(+r)},n}(0);function nc(e,t){this._context=e,this._k=(1-t)/6}nc.prototype={areaStart:Pn,areaEnd:Pn,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:Da(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 RT=function e(t){function n(r){return new nc(r,t)}return n.tension=function(r){return e(+r)},n}(0);function rc(e,t){this._context=e,this._k=(1-t)/6}rc.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:Da(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 IT=function e(t){function n(r){return new rc(r,t)}return n.tension=function(r){return e(+r)},n}(0);function ic(e,t,n){var r=e._x1,i=e._y1,s=e._x2,a=e._y2;if(e._l01_a>te){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>te){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 Kf(e,t){this._context=e,this._alpha=t}Kf.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:ic(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 kT=function e(t){function n(r){return t?new Kf(r,t):new ec(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Qf(e,t){this._context=e,this._alpha=t}Qf.prototype={areaStart:Pn,areaEnd:Pn,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:ic(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 PT=function e(t){function n(r){return t?new Qf(r,t):new nc(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Jf(e,t){this._context=e,this._alpha=t}Jf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ic(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 NT=function e(t){function n(r){return t?new Jf(r,t):new rc(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function tp(e){this._context=e}tp.prototype={areaStart:Pn,areaEnd:Pn,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 ep(e){return new tp(e)}function np(e){return e<0?-1:1}function rp(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(np(s)+np(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function ip(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function sc(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 La(e){this._context=e}La.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:sc(this,this._t0,ip(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,sc(this,ip(this,n=rp(this,e,t)),n);break;default:sc(this,this._t0,n=rp(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function sp(e){this._context=new ap(e)}(sp.prototype=Object.create(La.prototype)).point=function(e,t){La.prototype.point.call(this,t,e)};function ap(e){this._context=e}ap.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 $T(e){return new La(e)}function FT(e){return new sp(e)}function op(e){this._context=e}op.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=lp(e),i=lp(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 lp(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 UT(e){return new op(e)}function Ra(e,t){this._context=e,this._t=t}Ra.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 BT(e){return new Ra(e,.5)}function HT(e){return new Ra(e,0)}function GT(e){return new Ra(e,1)}function cp(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 up(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function VT(e,t){return e[t]}function zT(e){const t=[];return t.key=e,t}function ac(){var e=dt([]),t=up,n=cp,r=VT;function i(s){var a=Array.from(e.apply(this,arguments),zT),o,l=a.length,c=-1,u;for(const d of s)for(o=0,++c;o<l;++o)(a[o][c]=[0,+r(d,a[o].key,c,s)]).data=d;for(o=0,u=wa(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:dt(Array.from(s)),i):e},i.value=function(s){return arguments.length?(r=typeof s=="function"?s:dt(+s),i):r},i.order=function(s){return arguments.length?(t=s==null?up:typeof s=="function"?s:dt(Array.from(s)),i):t},i.offset=function(s){return arguments.length?(n=s??cp,i):n},i}function WT(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 Vi(e,t,n){this.k=e,this.x=t,this.y=n}Vi.prototype={constructor:Vi,scale:function(e){return e===1?this:new Vi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Vi(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+")"}},Vi.prototype;var hp=typeof global=="object"&&global&&global.Object===Object&&global,YT=typeof self=="object"&&self&&self.Object===Object&&self,He=hp||YT||Function("return this")(),Ae=He.Symbol,dp=Object.prototype,qT=dp.hasOwnProperty,XT=dp.toString,zi=Ae?Ae.toStringTag:void 0;function jT(e){var t=qT.call(e,zi),n=e[zi];try{e[zi]=void 0;var r=!0}catch{}var i=XT.call(e);return r&&(t?e[zi]=n:delete e[zi]),i}var ZT=Object.prototype,KT=ZT.toString;function QT(e){return KT.call(e)}var JT="[object Null]",tO="[object Undefined]",fp=Ae?Ae.toStringTag:void 0;function nr(e){return e==null?e===void 0?tO:JT:fp&&fp in Object(e)?jT(e):QT(e)}function tn(e){return e!=null&&typeof e=="object"}var eO="[object Symbol]";function Ia(e){return typeof e=="symbol"||tn(e)&&nr(e)==eO}function oc(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 Xt=Array.isArray,nO=1/0,pp=Ae?Ae.prototype:void 0,gp=pp?pp.toString:void 0;function mp(e){if(typeof e=="string")return e;if(Xt(e))return oc(e,mp)+"";if(Ia(e))return gp?gp.call(e):"";var t=e+"";return t=="0"&&1/e==-nO?"-0":t}var rO=/\s/;function iO(e){for(var t=e.length;t--&&rO.test(e.charAt(t)););return t}var sO=/^\s+/;function aO(e){return e&&e.slice(0,iO(e)+1).replace(sO,"")}function Ce(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var vp=NaN,oO=/^[-+]0x[0-9a-f]+$/i,lO=/^0b[01]+$/i,cO=/^0o[0-7]+$/i,uO=parseInt;function Pr(e){if(typeof e=="number")return e;if(Ia(e))return vp;if(Ce(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ce(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=aO(e);var n=lO.test(e);return n||cO.test(e)?uO(e.slice(2),n?2:8):oO.test(e)?vp:+e}function lc(e){return e}var hO="[object AsyncFunction]",dO="[object Function]",fO="[object GeneratorFunction]",pO="[object Proxy]";function cc(e){if(!Ce(e))return!1;var t=nr(e);return t==dO||t==fO||t==hO||t==pO}var uc=He["__core-js_shared__"],yp=function(){var e=/[^.]+$/.exec(uc&&uc.keys&&uc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function gO(e){return!!yp&&yp in e}var mO=Function.prototype,vO=mO.toString;function rr(e){if(e!=null){try{return vO.call(e)}catch{}try{return e+""}catch{}}return""}var yO=/[\\^$.*+?()[\]{}|]/g,EO=/^\[object .+?Constructor\]$/,bO=Function.prototype,xO=Object.prototype,_O=bO.toString,SO=xO.hasOwnProperty,TO=RegExp("^"+_O.call(SO).replace(yO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function OO(e){if(!Ce(e)||gO(e))return!1;var t=cc(e)?TO:EO;return t.test(rr(e))}function wO(e,t){return e==null?void 0:e[t]}function ir(e,t){var n=wO(e,t);return OO(n)?n:void 0}var hc=ir(He,"WeakMap"),Ep=Object.create,MO=function(){function e(){}return function(t){if(!Ce(t))return{};if(Ep)return Ep(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function AO(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 CO(){}function bp(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var DO=800,LO=16,RO=Date.now;function IO(e){var t=0,n=0;return function(){var r=RO(),i=LO-(r-n);if(n=r,i>0){if(++t>=DO)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function kO(e){return function(){return e}}var ka=function(){try{var e=ir(Object,"defineProperty");return e({},"",{}),e}catch{}}(),PO=ka?function(e,t){return ka(e,"toString",{configurable:!0,enumerable:!1,value:kO(t),writable:!0})}:lc,xp=IO(PO);function NO(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function $O(e,t,n,r){for(var i=e.length,s=n+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function FO(e){return e!==e}function UO(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function BO(e,t,n){return t===t?UO(e,t,n):$O(e,FO,n)}function HO(e,t){var n=e==null?0:e.length;return!!n&&BO(e,t,0)>-1}var GO=9007199254740991,VO=/^(?:0|[1-9]\d*)$/;function dc(e,t){var n=typeof e;return t=t??GO,!!t&&(n=="number"||n!="symbol"&&VO.test(e))&&e>-1&&e%1==0&&e<t}function Pa(e,t,n){t=="__proto__"&&ka?ka(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Wi(e,t){return e===t||e!==e&&t!==t}var zO=Object.prototype,WO=zO.hasOwnProperty;function _p(e,t,n){var r=e[t];(!(WO.call(e,t)&&Wi(r,n))||n===void 0&&!(t in e))&&Pa(e,t,n)}function Nr(e,t,n,r){var i=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var o=t[s],l=void 0;l===void 0&&(l=e[o]),i?Pa(n,o,l):_p(n,o,l)}return n}var Sp=Math.max;function Tp(e,t,n){return t=Sp(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=Sp(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),AO(e,this,o)}}function fc(e,t){return xp(Tp(e,t,lc),e+"")}var YO=9007199254740991;function pc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=YO}function sr(e){return e!=null&&pc(e.length)&&!cc(e)}function qO(e,t,n){if(!Ce(n))return!1;var r=typeof t;return(r=="number"?sr(n)&&dc(t,n.length):r=="string"&&t in n)?Wi(n[t],e):!1}function XO(e){return fc(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&&qO(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 jO=Object.prototype;function Na(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||jO;return e===n}function ZO(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var KO="[object Arguments]";function Op(e){return tn(e)&&nr(e)==KO}var wp=Object.prototype,QO=wp.hasOwnProperty,JO=wp.propertyIsEnumerable,$r=Op(function(){return arguments}())?Op:function(e){return tn(e)&&QO.call(e,"callee")&&!JO.call(e,"callee")};function tw(){return!1}var Mp=typeof W=="object"&&W&&!W.nodeType&&W,Ap=Mp&&typeof module=="object"&&module&&!module.nodeType&&module,ew=Ap&&Ap.exports===Mp,Cp=ew?He.Buffer:void 0,nw=Cp?Cp.isBuffer:void 0,Fr=nw||tw,rw="[object Arguments]",iw="[object Array]",sw="[object Boolean]",aw="[object Date]",ow="[object Error]",lw="[object Function]",cw="[object Map]",uw="[object Number]",hw="[object Object]",dw="[object RegExp]",fw="[object Set]",pw="[object String]",gw="[object WeakMap]",mw="[object ArrayBuffer]",vw="[object DataView]",yw="[object Float32Array]",Ew="[object Float64Array]",bw="[object Int8Array]",xw="[object Int16Array]",_w="[object Int32Array]",Sw="[object Uint8Array]",Tw="[object Uint8ClampedArray]",Ow="[object Uint16Array]",ww="[object Uint32Array]",Rt={};Rt[yw]=Rt[Ew]=Rt[bw]=Rt[xw]=Rt[_w]=Rt[Sw]=Rt[Tw]=Rt[Ow]=Rt[ww]=!0,Rt[rw]=Rt[iw]=Rt[mw]=Rt[sw]=Rt[vw]=Rt[aw]=Rt[ow]=Rt[lw]=Rt[cw]=Rt[uw]=Rt[hw]=Rt[dw]=Rt[fw]=Rt[pw]=Rt[gw]=!1;function Mw(e){return tn(e)&&pc(e.length)&&!!Rt[nr(e)]}function gc(e){return function(t){return e(t)}}var Dp=typeof W=="object"&&W&&!W.nodeType&&W,Yi=Dp&&typeof module=="object"&&module&&!module.nodeType&&module,Aw=Yi&&Yi.exports===Dp,mc=Aw&&hp.process,Ur=function(){try{var e=Yi&&Yi.require&&Yi.require("util").types;return e||mc&&mc.binding&&mc.binding("util")}catch{}}(),Lp=Ur&&Ur.isTypedArray,$a=Lp?gc(Lp):Mw,Cw=Object.prototype,Dw=Cw.hasOwnProperty;function Rp(e,t){var n=Xt(e),r=!n&&$r(e),i=!n&&!r&&Fr(e),s=!n&&!r&&!i&&$a(e),a=n||r||i||s,o=a?ZO(e.length,String):[],l=o.length;for(var c in e)(t||Dw.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||dc(c,l)))&&o.push(c);return o}function Ip(e,t){return function(n){return e(t(n))}}var Lw=Ip(Object.keys,Object),Rw=Object.prototype,Iw=Rw.hasOwnProperty;function kp(e){if(!Na(e))return Lw(e);var t=[];for(var n in Object(e))Iw.call(e,n)&&n!="constructor"&&t.push(n);return t}function qi(e){return sr(e)?Rp(e):kp(e)}function kw(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Pw=Object.prototype,Nw=Pw.hasOwnProperty;function $w(e){if(!Ce(e))return kw(e);var t=Na(e),n=[];for(var r in e)r=="constructor"&&(t||!Nw.call(e,r))||n.push(r);return n}function Xi(e){return sr(e)?Rp(e,!0):$w(e)}var Fw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Uw=/^\w*$/;function vc(e,t){if(Xt(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ia(e)?!0:Uw.test(e)||!Fw.test(e)||t!=null&&e in Object(t)}var ji=ir(Object,"create");function Bw(){this.__data__=ji?ji(null):{},this.size=0}function Hw(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Gw="__lodash_hash_undefined__",Vw=Object.prototype,zw=Vw.hasOwnProperty;function Ww(e){var t=this.__data__;if(ji){var n=t[e];return n===Gw?void 0:n}return zw.call(t,e)?t[e]:void 0}var Yw=Object.prototype,qw=Yw.hasOwnProperty;function Xw(e){var t=this.__data__;return ji?t[e]!==void 0:qw.call(t,e)}var jw="__lodash_hash_undefined__";function Zw(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ji&&t===void 0?jw:t,this}function ar(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])}}ar.prototype.clear=Bw,ar.prototype.delete=Hw,ar.prototype.get=Ww,ar.prototype.has=Xw,ar.prototype.set=Zw;function Kw(){this.__data__=[],this.size=0}function Fa(e,t){for(var n=e.length;n--;)if(Wi(e[n][0],t))return n;return-1}var Qw=Array.prototype,Jw=Qw.splice;function tM(e){var t=this.__data__,n=Fa(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Jw.call(t,n,1),--this.size,!0}function eM(e){var t=this.__data__,n=Fa(t,e);return n<0?void 0:t[n][1]}function nM(e){return Fa(this.__data__,e)>-1}function rM(e,t){var n=this.__data__,r=Fa(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function xn(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])}}xn.prototype.clear=Kw,xn.prototype.delete=tM,xn.prototype.get=eM,xn.prototype.has=nM,xn.prototype.set=rM;var Zi=ir(He,"Map");function iM(){this.size=0,this.__data__={hash:new ar,map:new(Zi||xn),string:new ar}}function sM(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ua(e,t){var n=e.__data__;return sM(t)?n[typeof t=="string"?"string":"hash"]:n.map}function aM(e){var t=Ua(this,e).delete(e);return this.size-=t?1:0,t}function oM(e){return Ua(this,e).get(e)}function lM(e){return Ua(this,e).has(e)}function cM(e,t){var n=Ua(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function _n(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])}}_n.prototype.clear=iM,_n.prototype.delete=aM,_n.prototype.get=oM,_n.prototype.has=lM,_n.prototype.set=cM;var uM="Expected a function";function yc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(uM);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(yc.Cache||_n),n}yc.Cache=_n;var hM=500;function dM(e){var t=yc(e,function(r){return n.size===hM&&n.clear(),r}),n=t.cache;return t}var fM=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pM=/\\(\\)?/g,gM=dM(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(fM,function(n,r,i,s){t.push(i?s.replace(pM,"$1"):r||n)}),t});function Ki(e){return e==null?"":mp(e)}function Ba(e,t){return Xt(e)?e:vc(e,t)?[e]:gM(Ki(e))}var mM=1/0;function Qi(e){if(typeof e=="string"||Ia(e))return e;var t=e+"";return t=="0"&&1/e==-mM?"-0":t}function Ec(e,t){t=Ba(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Qi(t[n++])];return n&&n==r?e:void 0}function yt(e,t,n){var r=e==null?void 0:Ec(e,t);return r===void 0?n:r}function bc(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Pp=Ae?Ae.isConcatSpreadable:void 0;function vM(e){return Xt(e)||$r(e)||!!(Pp&&e&&e[Pp])}function Ha(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=vM),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?Ha(o,t-1,n,r,i):bc(i,o):r||(i[i.length]=o)}return i}function xc(e){var t=e==null?0:e.length;return t?Ha(e,1):[]}function yM(e){return xp(Tp(e,void 0,xc),e+"")}var _c=Ip(Object.getPrototypeOf,Object),EM="[object Object]",bM=Function.prototype,xM=Object.prototype,Np=bM.toString,_M=xM.hasOwnProperty,SM=Np.call(Object);function $p(e){if(!tn(e)||nr(e)!=EM)return!1;var t=_c(e);if(t===null)return!0;var n=_M.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Np.call(n)==SM}function Fp(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r<i;)s[r]=e[r+t];return s}function TM(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:Fp(e,t,n)}var OM="\\ud800-\\udfff",wM="\\u0300-\\u036f",MM="\\ufe20-\\ufe2f",AM="\\u20d0-\\u20ff",CM=wM+MM+AM,DM="\\ufe0e\\ufe0f",LM="\\u200d",RM=RegExp("["+LM+OM+CM+DM+"]");function Up(e){return RM.test(e)}function IM(e){return e.split("")}var Bp="\\ud800-\\udfff",kM="\\u0300-\\u036f",PM="\\ufe20-\\ufe2f",NM="\\u20d0-\\u20ff",$M=kM+PM+NM,FM="\\ufe0e\\ufe0f",UM="["+Bp+"]",Sc="["+$M+"]",Tc="\\ud83c[\\udffb-\\udfff]",BM="(?:"+Sc+"|"+Tc+")",Hp="[^"+Bp+"]",Gp="(?:\\ud83c[\\udde6-\\uddff]){2}",Vp="[\\ud800-\\udbff][\\udc00-\\udfff]",HM="\\u200d",zp=BM+"?",Wp="["+FM+"]?",GM="(?:"+HM+"(?:"+[Hp,Gp,Vp].join("|")+")"+Wp+zp+")*",VM=Wp+zp+GM,zM="(?:"+[Hp+Sc+"?",Sc,Gp,Vp,UM].join("|")+")",WM=RegExp(Tc+"(?="+Tc+")|"+zM+VM,"g");function YM(e){return e.match(WM)||[]}function qM(e){return Up(e)?YM(e):IM(e)}function XM(e){return function(t){t=Ki(t);var n=Up(t)?qM(t):void 0,r=n?n[0]:t.charAt(0),i=n?TM(n,1).join(""):t.slice(1);return r[e]()+i}}var jM=XM("toUpperCase");function ZM(e){return jM(Ki(e).toLowerCase())}function KM(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;)n=t(n,e[i],i,e);return n}function QM(e){return function(t){return e==null?void 0:e[t]}}var JM={À:"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"},tA=QM(JM),eA=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,nA="\\u0300-\\u036f",rA="\\ufe20-\\ufe2f",iA="\\u20d0-\\u20ff",sA=nA+rA+iA,aA="["+sA+"]",oA=RegExp(aA,"g");function lA(e){return e=Ki(e),e&&e.replace(eA,tA).replace(oA,"")}var cA=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function uA(e){return e.match(cA)||[]}var hA=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function dA(e){return hA.test(e)}var Yp="\\ud800-\\udfff",fA="\\u0300-\\u036f",pA="\\ufe20-\\ufe2f",gA="\\u20d0-\\u20ff",mA=fA+pA+gA,qp="\\u2700-\\u27bf",Xp="a-z\\xdf-\\xf6\\xf8-\\xff",vA="\\xac\\xb1\\xd7\\xf7",yA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",EA="\\u2000-\\u206f",bA=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",jp="A-Z\\xc0-\\xd6\\xd8-\\xde",xA="\\ufe0e\\ufe0f",Zp=vA+yA+EA+bA,Kp="['’]",Qp="["+Zp+"]",_A="["+mA+"]",Jp="\\d+",SA="["+qp+"]",tg="["+Xp+"]",eg="[^"+Yp+Zp+Jp+qp+Xp+jp+"]",TA="\\ud83c[\\udffb-\\udfff]",OA="(?:"+_A+"|"+TA+")",wA="[^"+Yp+"]",ng="(?:\\ud83c[\\udde6-\\uddff]){2}",rg="[\\ud800-\\udbff][\\udc00-\\udfff]",Br="["+jp+"]",MA="\\u200d",ig="(?:"+tg+"|"+eg+")",AA="(?:"+Br+"|"+eg+")",sg="(?:"+Kp+"(?:d|ll|m|re|s|t|ve))?",ag="(?:"+Kp+"(?:D|LL|M|RE|S|T|VE))?",og=OA+"?",lg="["+xA+"]?",CA="(?:"+MA+"(?:"+[wA,ng,rg].join("|")+")"+lg+og+")*",DA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",LA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",RA=lg+og+CA,IA="(?:"+[SA,ng,rg].join("|")+")"+RA,kA=RegExp([Br+"?"+tg+"+"+sg+"(?="+[Qp,Br,"$"].join("|")+")",AA+"+"+ag+"(?="+[Qp,Br+ig,"$"].join("|")+")",Br+"?"+ig+"+"+sg,Br+"+"+ag,LA,DA,Jp,IA].join("|"),"g");function PA(e){return e.match(kA)||[]}function NA(e,t,n){return e=Ki(e),t=t,t===void 0?dA(e)?PA(e):uA(e):e.match(t)||[]}var $A="['’]",FA=RegExp($A,"g");function cg(e){return function(t){return KM(NA(lA(t).replace(FA,"")),e,"")}}var UA=cg(function(e,t,n){return t=t.toLowerCase(),e+(n?ZM(t):t)});function BA(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function ug(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Pr(n),n=n===n?n:0),t!==void 0&&(t=Pr(t),t=t===t?t:0),BA(Pr(e),t,n)}function HA(){this.__data__=new xn,this.size=0}function GA(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function VA(e){return this.__data__.get(e)}function zA(e){return this.__data__.has(e)}var WA=200;function YA(e,t){var n=this.__data__;if(n instanceof xn){var r=n.__data__;if(!Zi||r.length<WA-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new _n(r)}return n.set(e,t),this.size=n.size,this}function Ge(e){var t=this.__data__=new xn(e);this.size=t.size}Ge.prototype.clear=HA,Ge.prototype.delete=GA,Ge.prototype.get=VA,Ge.prototype.has=zA,Ge.prototype.set=YA;function qA(e,t){return e&&Nr(t,qi(t),e)}function XA(e,t){return e&&Nr(t,Xi(t),e)}var hg=typeof W=="object"&&W&&!W.nodeType&&W,dg=hg&&typeof module=="object"&&module&&!module.nodeType&&module,jA=dg&&dg.exports===hg,fg=jA?He.Buffer:void 0,pg=fg?fg.allocUnsafe:void 0;function gg(e,t){if(t)return e.slice();var n=e.length,r=pg?pg(n):new e.constructor(n);return e.copy(r),r}function ZA(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 mg(){return[]}var KA=Object.prototype,QA=KA.propertyIsEnumerable,vg=Object.getOwnPropertySymbols,Oc=vg?function(e){return e==null?[]:(e=Object(e),ZA(vg(e),function(t){return QA.call(e,t)}))}:mg;function JA(e,t){return Nr(e,Oc(e),t)}var tC=Object.getOwnPropertySymbols,yg=tC?function(e){for(var t=[];e;)bc(t,Oc(e)),e=_c(e);return t}:mg;function eC(e,t){return Nr(e,yg(e),t)}function Eg(e,t,n){var r=t(e);return Xt(e)?r:bc(r,n(e))}function wc(e){return Eg(e,qi,Oc)}function bg(e){return Eg(e,Xi,yg)}var Mc=ir(He,"DataView"),Ac=ir(He,"Promise"),Hr=ir(He,"Set"),xg="[object Map]",nC="[object Object]",_g="[object Promise]",Sg="[object Set]",Tg="[object WeakMap]",Og="[object DataView]",rC=rr(Mc),iC=rr(Zi),sC=rr(Ac),aC=rr(Hr),oC=rr(hc),De=nr;(Mc&&De(new Mc(new ArrayBuffer(1)))!=Og||Zi&&De(new Zi)!=xg||Ac&&De(Ac.resolve())!=_g||Hr&&De(new Hr)!=Sg||hc&&De(new hc)!=Tg)&&(De=function(e){var t=nr(e),n=t==nC?e.constructor:void 0,r=n?rr(n):"";if(r)switch(r){case rC:return Og;case iC:return xg;case sC:return _g;case aC:return Sg;case oC:return Tg}return t});var lC=Object.prototype,cC=lC.hasOwnProperty;function uC(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&cC.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Ga=He.Uint8Array;function Cc(e){var t=new e.constructor(e.byteLength);return new Ga(t).set(new Ga(e)),t}function hC(e,t){var n=t?Cc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var dC=/\w*$/;function fC(e){var t=new e.constructor(e.source,dC.exec(e));return t.lastIndex=e.lastIndex,t}var wg=Ae?Ae.prototype:void 0,Mg=wg?wg.valueOf:void 0;function pC(e){return Mg?Object(Mg.call(e)):{}}function Ag(e,t){var n=t?Cc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var gC="[object Boolean]",mC="[object Date]",vC="[object Map]",yC="[object Number]",EC="[object RegExp]",bC="[object Set]",xC="[object String]",_C="[object Symbol]",SC="[object ArrayBuffer]",TC="[object DataView]",OC="[object Float32Array]",wC="[object Float64Array]",MC="[object Int8Array]",AC="[object Int16Array]",CC="[object Int32Array]",DC="[object Uint8Array]",LC="[object Uint8ClampedArray]",RC="[object Uint16Array]",IC="[object Uint32Array]";function kC(e,t,n){var r=e.constructor;switch(t){case SC:return Cc(e);case gC:case mC:return new r(+e);case TC:return hC(e,n);case OC:case wC:case MC:case AC:case CC:case DC:case LC:case RC:case IC:return Ag(e,n);case vC:return new r;case yC:case xC:return new r(e);case EC:return fC(e);case bC:return new r;case _C:return pC(e)}}function Cg(e){return typeof e.constructor=="function"&&!Na(e)?MO(_c(e)):{}}var PC="[object Map]";function NC(e){return tn(e)&&De(e)==PC}var Dg=Ur&&Ur.isMap,$C=Dg?gc(Dg):NC,FC="[object Set]";function UC(e){return tn(e)&&De(e)==FC}var Lg=Ur&&Ur.isSet,BC=Lg?gc(Lg):UC,HC=1,GC=2,VC=4,Rg="[object Arguments]",zC="[object Array]",WC="[object Boolean]",YC="[object Date]",qC="[object Error]",Ig="[object Function]",XC="[object GeneratorFunction]",jC="[object Map]",ZC="[object Number]",kg="[object Object]",KC="[object RegExp]",QC="[object Set]",JC="[object String]",tD="[object Symbol]",eD="[object WeakMap]",nD="[object ArrayBuffer]",rD="[object DataView]",iD="[object Float32Array]",sD="[object Float64Array]",aD="[object Int8Array]",oD="[object Int16Array]",lD="[object Int32Array]",cD="[object Uint8Array]",uD="[object Uint8ClampedArray]",hD="[object Uint16Array]",dD="[object Uint32Array]",Dt={};Dt[Rg]=Dt[zC]=Dt[nD]=Dt[rD]=Dt[WC]=Dt[YC]=Dt[iD]=Dt[sD]=Dt[aD]=Dt[oD]=Dt[lD]=Dt[jC]=Dt[ZC]=Dt[kg]=Dt[KC]=Dt[QC]=Dt[JC]=Dt[tD]=Dt[cD]=Dt[uD]=Dt[hD]=Dt[dD]=!0,Dt[qC]=Dt[Ig]=Dt[eD]=!1;function Ji(e,t,n,r,i,s){var a,o=t&HC,l=t&GC,c=t&VC;if(n&&(a=i?n(e,r,i,s):n(e)),a!==void 0)return a;if(!Ce(e))return e;var u=Xt(e);if(u){if(a=uC(e),!o)return bp(e,a)}else{var d=De(e),h=d==Ig||d==XC;if(Fr(e))return gg(e,o);if(d==kg||d==Rg||h&&!i){if(a=l||h?{}:Cg(e),!o)return l?eC(e,XA(a,e)):JA(e,qA(a,e))}else{if(!Dt[d])return i?e:{};a=kC(e,d,o)}}s||(s=new Ge);var f=s.get(e);if(f)return f;s.set(e,a),BC(e)?e.forEach(function(m){a.add(Ji(m,t,n,m,e,s))}):$C(e)&&e.forEach(function(m,v){a.set(v,Ji(m,t,n,v,e,s))});var p=c?l?bg:wc:l?Xi:qi,g=u?void 0:p(e);return NO(g||e,function(m,v){g&&(v=m,m=e[v]),_p(a,v,Ji(m,t,n,v,e,s))}),a}var fD=1,pD=4;function Sn(e){return Ji(e,fD|pD)}var gD="__lodash_hash_undefined__";function mD(e){return this.__data__.set(e,gD),this}function vD(e){return this.__data__.has(e)}function ts(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new _n;++t<n;)this.add(e[t])}ts.prototype.add=ts.prototype.push=mD,ts.prototype.has=vD;function Pg(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 Ng(e,t){return e.has(t)}var yD=1,ED=2;function $g(e,t,n,r,i,s){var a=n&yD,o=e.length,l=t.length;if(o!=l&&!(a&&l>o))return!1;var c=s.get(e),u=s.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,f=n&ED?new ts:void 0;for(s.set(e,t),s.set(t,e);++d<o;){var p=e[d],g=t[d];if(r)var m=a?r(g,p,d,t,e,s):r(p,g,d,e,t,s);if(m!==void 0){if(m)continue;h=!1;break}if(f){if(!Pg(t,function(v,E){if(!Ng(f,E)&&(p===v||i(p,v,n,r,s)))return f.push(E)})){h=!1;break}}else if(!(p===g||i(p,g,n,r,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function bD(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Dc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var xD=1,_D=2,SD="[object Boolean]",TD="[object Date]",OD="[object Error]",wD="[object Map]",MD="[object Number]",AD="[object RegExp]",CD="[object Set]",DD="[object String]",LD="[object Symbol]",RD="[object ArrayBuffer]",ID="[object DataView]",Fg=Ae?Ae.prototype:void 0,Lc=Fg?Fg.valueOf:void 0;function kD(e,t,n,r,i,s,a){switch(n){case ID:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case RD:return!(e.byteLength!=t.byteLength||!s(new Ga(e),new Ga(t)));case SD:case TD:case MD:return Wi(+e,+t);case OD:return e.name==t.name&&e.message==t.message;case AD:case DD:return e==t+"";case wD:var o=bD;case CD:var l=r&xD;if(o||(o=Dc),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=_D,a.set(e,t);var u=$g(o(e),o(t),r,i,s,a);return a.delete(e),u;case LD:if(Lc)return Lc.call(e)==Lc.call(t)}return!1}var PD=1,ND=Object.prototype,$D=ND.hasOwnProperty;function FD(e,t,n,r,i,s){var a=n&PD,o=wc(e),l=o.length,c=wc(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var h=o[d];if(!(a?h in t:$D.call(t,h)))return!1}var f=s.get(e),p=s.get(t);if(f&&p)return f==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var m=a;++d<l;){h=o[d];var v=e[h],E=t[h];if(r)var y=a?r(E,v,h,t,e,s):r(v,E,h,e,t,s);if(!(y===void 0?v===E||i(v,E,n,r,s):y)){g=!1;break}m||(m=h=="constructor")}if(g&&!m){var x=e.constructor,S=t.constructor;x!=S&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof S=="function"&&S instanceof S)&&(g=!1)}return s.delete(e),s.delete(t),g}var UD=1,Ug="[object Arguments]",Bg="[object Array]",Va="[object Object]",BD=Object.prototype,Hg=BD.hasOwnProperty;function HD(e,t,n,r,i,s){var a=Xt(e),o=Xt(t),l=a?Bg:De(e),c=o?Bg:De(t);l=l==Ug?Va:l,c=c==Ug?Va:c;var u=l==Va,d=c==Va,h=l==c;if(h&&Fr(e)){if(!Fr(t))return!1;a=!0,u=!1}if(h&&!u)return s||(s=new Ge),a||$a(e)?$g(e,t,n,r,i,s):kD(e,t,l,n,r,i,s);if(!(n&UD)){var f=u&&Hg.call(e,"__wrapped__"),p=d&&Hg.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,m=p?t.value():t;return s||(s=new Ge),i(g,m,n,r,s)}}return h?(s||(s=new Ge),FD(e,t,n,r,i,s)):!1}function za(e,t,n,r,i){return e===t?!0:e==null||t==null||!tn(e)&&!tn(t)?e!==e&&t!==t:HD(e,t,n,r,za,i)}var GD=1,VD=2;function zD(e,t,n,r){var i=n.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){a=n[i];var o=a[0],l=e[o],c=a[1];if(a[2]){if(l===void 0&&!(o in e))return!1}else{var u=new Ge,d;if(!(d===void 0?za(c,l,GD|VD,r,u):d))return!1}}return!0}function Gg(e){return e===e&&!Ce(e)}function WD(e){for(var t=qi(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Gg(i)]}return t}function Vg(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function YD(e){var t=WD(e);return t.length==1&&t[0][2]?Vg(t[0][0],t[0][1]):function(n){return n===e||zD(n,e,t)}}function qD(e,t){return e!=null&&t in Object(e)}function XD(e,t,n){t=Ba(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=Qi(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&&pc(i)&&dc(a,i)&&(Xt(e)||$r(e)))}function jD(e,t){return e!=null&&XD(e,t,qD)}var ZD=1,KD=2;function QD(e,t){return vc(e)&&Gg(t)?Vg(Qi(e),t):function(n){var r=yt(n,e);return r===void 0&&r===t?jD(n,e):za(t,r,ZD|KD)}}function JD(e){return function(t){return t==null?void 0:t[e]}}function tL(e){return function(t){return Ec(t,e)}}function eL(e){return vc(e)?JD(Qi(e)):tL(e)}function Wa(e){return typeof e=="function"?e:e==null?lc:typeof e=="object"?Xt(e)?QD(e[0],e[1]):YD(e):eL(e)}function nL(e,t,n,r){for(var i=-1,s=e==null?0:e.length;++i<s;){var a=e[i];t(r,a,n(a),e)}return r}function rL(e){return function(t,n,r){for(var i=-1,s=Object(t),a=r(t),o=a.length;o--;){var l=a[++i];if(n(s[l],l,s)===!1)break}return t}}var zg=rL();function iL(e,t){return e&&zg(e,t,qi)}function sL(e,t){return function(n,r){if(n==null)return n;if(!sr(n))return e(n,r);for(var i=n.length,s=-1,a=Object(n);++s<i&&r(a[s],s,a)!==!1;);return n}}var Rc=sL(iL);function aL(e,t,n,r){return Rc(e,function(i,s,a){t(r,i,n(i),a)}),r}function oL(e,t){return function(n,r){var i=Xt(n)?nL:aL,s={};return i(n,e,Wa(r),s)}}var Ic=function(){return He.Date.now()},lL="Expected a function",cL=Math.max,uL=Math.min;function Ya(e,t,n){var r,i,s,a,o,l,c=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(lL);t=Pr(t)||0,Ce(n)&&(u=!!n.leading,d="maxWait"in n,s=d?cL(Pr(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h);function f(_){var A=r,L=i;return r=i=void 0,c=_,a=e.apply(L,A),a}function p(_){return c=_,o=setTimeout(v,t),u?f(_):a}function g(_){var A=_-l,L=_-c,B=t-A;return d?uL(B,s-L):B}function m(_){var A=_-l,L=_-c;return l===void 0||A>=t||A<0||d&&L>=s}function v(){var _=Ic();if(m(_))return E(_);o=setTimeout(v,g(_))}function E(_){return o=void 0,h&&r?f(_):(r=i=void 0,a)}function y(){o!==void 0&&clearTimeout(o),c=0,r=l=i=o=void 0}function x(){return o===void 0?a:E(Ic())}function S(){var _=Ic(),A=m(_);if(r=arguments,i=this,l=_,A){if(o===void 0)return p(l);if(d)return clearTimeout(o),o=setTimeout(v,t),f(l)}return o===void 0&&(o=setTimeout(v,t)),a}return S.cancel=y,S.flush=x,S}function kc(e,t,n){(n!==void 0&&!Wi(e[t],n)||n===void 0&&!(t in e))&&Pa(e,t,n)}function Pc(e){return tn(e)&&sr(e)}function Nc(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function hL(e){return Nr(e,Xi(e))}function dL(e,t,n,r,i,s,a){var o=Nc(e,n),l=Nc(t,n),c=a.get(l);if(c){kc(e,n,c);return}var u=s?s(o,l,n+"",e,t,a):void 0,d=u===void 0;if(d){var h=Xt(l),f=!h&&Fr(l),p=!h&&!f&&$a(l);u=l,h||f||p?Xt(o)?u=o:Pc(o)?u=bp(o):f?(d=!1,u=gg(l,!0)):p?(d=!1,u=Ag(l,!0)):u=[]:$p(l)||$r(l)?(u=o,$r(o)?u=hL(o):(!Ce(o)||cc(o))&&(u=Cg(l))):d=!1}d&&(a.set(l,u),i(u,l,r,s,a),a.delete(l)),kc(e,n,u)}function Wg(e,t,n,r,i){e!==t&&zg(t,function(s,a){if(i||(i=new Ge),Ce(s))dL(e,t,a,n,Wg,r,i);else{var o=r?r(Nc(e,a),s,a+"",e,t,i):void 0;o===void 0&&(o=s),kc(e,a,o)}},Xi)}var fL="Expected a function";function pL(e,t,n){if(typeof e!="function")throw new TypeError(fL);return setTimeout(function(){e.apply(void 0,n)},t)}var gL=fc(function(e,t,n){return pL(e,Pr(t)||0,n)});function Yg(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function mL(e,t){var n=-1,r=sr(e)?Array(e.length):[];return Rc(e,function(i,s,a){r[++n]=t(i,s,a)}),r}function vL(e,t){var n=Xt(e)?oc:mL;return n(e,Wa(t))}var yL=1/0;function EL(e,t){return Ha(vL(e,t),yL)}function bL(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 xL=Object.prototype,_L=xL.hasOwnProperty,SL=oL(function(e,t,n){_L.call(e,n)?e[n].push(t):Pa(e,n,[t])});function TL(e,t){return t.length<2?e:Ec(e,Fp(t,0,-1))}var OL="[object Map]",wL="[object Set]",ML=Object.prototype,AL=ML.hasOwnProperty;function Ve(e){if(e==null)return!0;if(sr(e)&&(Xt(e)||typeof e=="string"||typeof e.splice=="function"||Fr(e)||$a(e)||$r(e)))return!e.length;var t=De(e);if(t==OL||t==wL)return!e.size;if(Na(e))return!kp(e).length;for(var n in e)if(AL.call(e,n))return!1;return!0}function qg(e,t){return za(e,t)}var Gr=cg(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),lt=XO(function(e,t,n){Wg(e,t,n)});function CL(e,t){return t=Ba(t,e),e=TL(e,t),e==null||delete e[Qi(Yg(t))]}function DL(e){return $p(e)?void 0:e}var LL=1,RL=2,IL=4,kL=yM(function(e,t){var n={};if(e==null)return n;var r=!1;t=oc(t,function(s){return s=Ba(s,e),r||(r=s.length>1),s}),Nr(e,bg(e),n),r&&(n=Ji(n,LL|RL|IL,DL));for(var i=t.length;i--;)CL(n,t[i]);return n});function PL(e,t){var n;return Rc(e,function(r,i,s){return n=t(r,i,s),!n}),!!n}function NL(e,t,n){var r=Xt(e)?Pg:PL;return r(e,Wa(t))}var $L=1/0,FL=Hr&&1/Dc(new Hr([,-0]))[1]==$L?function(e){return new Hr(e)}:CO,UL=200;function Xg(e,t,n){var r=-1,i=HO,s=e.length,a=!0,o=[],l=o;if(s>=UL){var c=t?null:FL(e);if(c)return Dc(c);a=!1,i=Ng,l=new ts}else l=t?[]:o;t:for(;++r<s;){var u=e[r],d=t?t(u):u;if(u=u!==0?u:0,a&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue t;t&&l.push(d),o.push(u)}else i(l,d,n)||(l!==o&&l.push(d),o.push(u))}return o}var BL=fc(function(e){var t=Yg(e);return Pc(t)&&(t=void 0),Xg(Ha(e,1,Pc,!0),Wa(t))});function es(e){return e&&e.length?Xg(e):[]}var $c=(e=>(e.RENDER_FINISHED="render-finished",e.RESIZE="chart-resize",e.MOUSEOVER="chart-mouseover",e.MOUSEOUT="chart-mouseout",e))($c||{}),Fc=(e=>(e.SHOW="show-modal",e.HIDE="hide-modal",e))(Fc||{}),Uc=(e=>(e.UPDATE="model-update",e))(Uc||{}),jg=(e=>(e.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",e.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",e.BUTTON_CLICK="toolbar-button-click",e.SHOW_TOOLTIP="toolbar-show-tooltip",e.HIDE_TOOLTIP="toolbar-hide-tooltip",e))(jg||{}),Bc=(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))(Bc||{}),Hc=(e=>(e.CHANGE="zoom-domain-change",e))(Hc||{}),Gc=(e=>(e.CANVAS_ZOOM_IN="canvas-zoom-in",e.CANVAS_ZOOM_OUT="canvas-zoom-out",e))(Gc||{}),Vc=(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))(Vc||{}),zc=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(zc||{}),Wc=(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))(Wc||{}),Yc=(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))(Yc||{}),qc=(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))(qc||{}),Xc=(e=>(e.BAR_MOUSEOVER="bar-mouseover",e.BAR_MOUSEMOVE="bar-mousemove",e.BAR_CLICK="bar-click",e.BAR_MOUSEOUT="bar-mouseout",e))(Xc||{}),jc=(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))(jc||{}),Zc=(e=>(e.SCATTER_MOUSEOVER="scatter-mouseover",e.SCATTER_MOUSEMOVE="scatter-mousemove",e.SCATTER_CLICK="scatter-click",e.SCATTER_MOUSEOUT="scatter-mouseout",e))(Zc||{}),Kc=(e=>(e.POINT_MOUSEOVER="scatter-mouseover",e.POINT_MOUSEMOVE="scatter-mousemove",e.POINT_CLICK="scatter-click",e.POINT_MOUSEOUT="scatter-mouseout",e))(Kc||{}),Qc=(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))(Qc||{}),Jc=(e=>(e.NODE_MOUSEOVER="tree-node-mouseover",e.NODE_CLICK="tree-node-click",e.NODE_MOUSEOUT="tree-node-mouseout",e))(Jc||{}),tu=(e=>(e.LEAF_MOUSEOVER="leaf-mouseover",e.LEAF_MOUSEMOVE="leaf-mousemove",e.LEAF_CLICK="leaf-click",e.LEAF_MOUSEOUT="leaf-mouseout",e))(tu||{}),Vr=(e=>(e.SHOW="show-tooltip",e.MOVE="move-tooltip",e.HIDE="hide-tooltip",e))(Vr||{}),eu=(e=>(e.SHOW="show-threshold",e.HIDE="hide-threshold",e))(eu||{}),Zg=(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))(Zg||{}),Kg=(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))(Kg||{}),Qg=(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))(Qg||{}),Jg=(e=>(e.METER_MOUSEOVER="meter-mouseover",e.METER_CLICK="meter-click",e.METER_MOUSEOUT="meter-mouseout",e.METER_MOUSEMOVE="meter-mousemove",e))(Jg||{}),tm=(e=>(e.HEATMAP_MOUSEOVER="heatmap-mouseover",e.HEATMAP_CLICK="heatmap-click",e.HEATMAP_MOUSEOUT="heatmap-mouseout",e.HEATMAP_MOUSEMOVE="hetmap-mousemove",e))(tm||{}),zr=(e=>(e.CHOROPLETH_MOUSEOVER="choropleth-mouseover",e.CHOROPLETH_CLICK="choropleth-click",e.CHOROPLETH_MOUSEOUT="choropleth-mouseout",e.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",e))(zr||{});const T=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:Qg,Area:zc,Axis:Vc,Bar:Xc,Boxplot:jc,CanvasZoom:Gc,Chart:$c,Choropleth:zr,CirclePack:Kg,Gauge:qc,Heatmap:tm,Legend:Zg,Line:Kc,Meter:Jg,Modal:Fc,Model:Uc,Pie:Yc,Radar:Qc,Scatter:Zc,Threshold:eu,Toolbar:jg,Tooltip:Vr,Tree:Jc,Treemap:tu,WordCloud:Wc,ZoomBar:Bc,ZoomDomain:Hc},Symbol.toStringTag,{value:"Module"}));var tt=(e=>(e.HTML="html",e.SVG="svg",e))(tt||{}),nu=(e=>(e.WHITE="white",e.G100="g100",e.G90="g90",e.G10="g10",e))(nu||{}),at=(e=>(e.BACKGROUND="background",e.FILL="fill",e.STROKE="stroke",e.TOOLTIP="tooltip",e))(at||{}),G=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e))(G||{}),ze=(e=>(e.GRAPH_VIEW="graph_view",e.SLIDER_VIEW="slider_view",e))(ze||{}),Le=(e=>(e.END_LINE="end_line",e.MID_LINE="mid_line",e.FRONT_LINE="front_line",e.NONE="none",e))(Le||{}),Bt=(e=>(e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e))(Bt||{}),Q=(e=>(e.TIME="time",e.LINEAR="linear",e.LOG="log",e.LABELS="labels",e.LABELS_RATIO="labels-ratio",e))(Q||{}),Wr=(e=>(e.RIGHT="right",e.LEFT="left",e.TOP="top",e.BOTTOM="bottom",e))(Wr||{}),Ht=(e=>(e.LEFT="left",e.CENTER="center",e.RIGHT="right",e))(Ht||{}),Yr=(e=>(e.HORIZONTAL="horizontal",e.VERTICAL="vertical",e))(Yr||{}),qa=(e=>(e.TREE="tree",e.DENDROGRAM="dendrogram",e))(qa||{}),wt=(e=>(e.ROW="row",e.COLUMN="column",e.ROW_REVERSE="row-reverse",e.COLUMN_REVERSE="column-reverse",e))(wt||{}),ct=(e=>(e.FIXED="fixed",e.PREFERRED="preferred",e.STRETCH="stretch",e))(ct||{}),or=(e=>(e.CENTER="center",e))(or||{}),ns=(e=>(e.LEFT="left",e.RIGHT="right",e))(ns||{}),Gt=(e=>(e.GRID="grid",e.VERT_OR_HORIZ="vertOrHoriz",e.PIE="pie",e.DONUT="donut",e))(Gt||{}),en=(e=>(e.START="start",e.MIDDLE="middle",e.END="end",e))(en||{}),nn=(e=>(e.BASELINE="baseline",e.MIDDLE="middle",e.HANGING="hanging",e))(nn||{}),lr=(e=>(e.SEMI="semi",e.FULL="full",e))(lr||{}),Xa=(e=>(e.UP="up",e.DOWN="down",e))(Xa||{}),rs=(e=>(e.SUCCESS="success",e.WARNING="warning",e.DANGER="danger",e))(rs||{}),is=(e=>(e.ALWAYS="always",e.AUTO="auto",e.NEVER="never",e))(is||{}),be=(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))(be||{}),xt=(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.EXIT_FULLSCREEN="Exit fullscreen",e.SHOW_AS_DATATABLE="Show as data-table",e.CUSTOM="Custom",e))(xt||{}),ja=(e=>(e.LEFT="left",e.RIGHT="right",e))(ja||{}),Vt=(e=>(e.CHECKBOX="checkbox",e.RADIUS="radius",e.AREA="area",e.SIZE="size",e.LINE="line",e.QUARTILE="quartile",e.ZOOM="zoom",e))(Vt||{}),ss=(e=>(e.LINEAR="linear",e.QUANTIZE="quantize",e))(ss||{}),qr=(e=>(e.ON="on",e.AUTO="auto",e.OFF="off",e))(qr||{}),as=(e=>(e.DEFAULT="default",e.HOVERABLE="hoverable",e))(as||{}),rn=(e=>(e.geoEqualEarth="geoEqualEarth",e.geoAlbers="geoAlbers",e.geoConicEqualArea="geoConicEqualArea",e.geoConicEquidistant="geoConicEquidistant",e.geoEquirectangular="geoEquirectangular",e.geoMercator="geoMercator",e.geoNaturalEarth1="geoNaturalEarth1",e))(rn||{});const de="cds",Tn={opacity:{unselected:.05,selected:.4}},Nn={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1,hover:{rectanglePadding:4}},Xr={duration:1e3,ease:td,zoomLevel:3},jr={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},depth:2},em={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},Re={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},HL={defaultBins:10},Pt={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},On={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},jt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36,paddingRight:24},height:{default:8,proportional:16},dividerWidth:2},Lt={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}},cr={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},We={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},nm={minCellDividerDimension:16,chartPadding:.5},rm={default:{size:24}},im={defaultOffset:4,horizontalOffset:10},sm={default:{duration:300},pie_slice_mouseover:{duration:100},pie_slice_mouseout:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},xe={height:{[ze.GRAPH_VIEW]:32,[ze.SLIDER_VIEW]:10},spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},GL=[{type:Vt.RADIUS,name:"Radius"},{type:Vt.AREA,name:"Poor area"},{type:Vt.AREA,name:"Satisfactory area"},{type:Vt.AREA,name:"Great area"},{type:Vt.QUARTILE,name:"Quartiles"}];function VL(e,t,n){let r=null;return function(...i){const s=this;s.mousePosition=zn(i[0],n),clearTimeout(r),r=setTimeout(function(){e.apply(s,i)},t)}}function It(e,t){var i;const n=Sn(e),r=Object.keys(t.axes||{});(i=t==null?void 0:t.toolbar)!=null&&i.controls&&delete n.toolbar.controls,r.length===0&&delete n.axes;for(const s in n.axes)if(r.includes(s)){const a=t.axes[s];(a.primary||a.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://charts.carbondesignsystem.com/");const o=a.mapsTo;if(o==null){const l=a.scaleType;l==null?a.mapsTo="value":l===Q.TIME?a.mapsTo="date":l===Q.LABELS&&(a.mapsTo="key")}}else delete n.axes[s];return iu(n,t),lt(n,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 os(e){const n=/\(([^)]+)\)/.exec(e);if(n&&n.length>1){const r=n[1].split(",");if(r.length>1)return{x:parseFloat(r[0]),y:parseFloat(r[1])}}return{x:0,y:0}}function ru(e,t,n="value",r=!1){const i=e/t.reduce((s,a)=>s+a[n],0)*100;return r?i:i%1!==0?parseFloat(i.toFixed(1)):i}function ls(e,t,n){if(n>e.length)return e;if(t===Le.MID_LINE)return e.substr(0,n/2)+"..."+e.substr(-n/2);if(t===Le.FRONT_LINE)return"..."+e.substr(-n);if(t===Le.END_LINE)return e.substr(0,n)+"..."}function iu(e,t){const n=b(e,"legend","additionalItems"),r=b(t,"legend","additionalItems");if(n&&r){const i=r.map(o=>o.type),s=n.map(o=>o.type),a=GL.filter(o=>s.includes(o.type)&&!i.includes(o.type));e.legend.additionalItems=a,t.legend.additionalItems=BL(a,r,"name")}}const b=(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},am=(e,t)=>t===Bt.HORIZONTAL?{y0:e.x0,y1:e.x1,x0:e.y0,x1:e.y1}:e,ie=(e,t)=>{const{x0:n,x1:r,y0:i,y1:s}=am(e,t);return`M${n},${i}L${n},${s}L${r},${s}L${r},${i}L${n},${i}`};function Mn(e,t,n){return n===Bt.VERTICAL?[e,t]:[t,e]}function su(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}function cs(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{const a=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return i[s]}}function us(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;const a=s[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?WL(o,d=>d.test(a)):zL(o,d=>d.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(a.length);return{value:c,rest:u}}}function zL(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function WL(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function YL(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const o=t.slice(i.length);return{value:a,rest:o}}}const om=6048e5,qL=864e5,lm=6e4,cm=36e5,um=Symbol.for("constructDateFrom");function Ie(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&um in e?e[um](t):e instanceof Date?new e.constructor(t):new Date(t)}function ur(e,...t){const n=Ie.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}let XL={};function Za(){return XL}function $t(e,t){return Ie(t||e,e)}function hs(e,t){var o,l,c,u;const n=Za(),r=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,i=$t(e,t==null?void 0:t.in),s=i.getDay(),a=(s<r?7:0)+s-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}const jL={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"}},ZL=(e,t,n)=>{let r;const i=jL[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},KL={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},QL=(e,t,n,r)=>KL[e],JL={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},tR={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eR={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"]},nR={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"]},rR={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"}},iR={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"}},sR={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:cs({values:JL,defaultWidth:"wide"}),quarter:cs({values:tR,defaultWidth:"wide",argumentCallback:e=>e-1}),month:cs({values:eR,defaultWidth:"wide"}),day:cs({values:nR,defaultWidth:"wide"}),dayPeriod:cs({values:rR,defaultWidth:"wide",formattingValues:iR,defaultFormattingWidth:"wide"})},aR=/^(\d+)(th|st|nd|rd)?/i,oR=/\d+/i,lR={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},cR={any:[/^b/i,/^(a|c)/i]},uR={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hR={any:[/1/i,/2/i,/3/i,/4/i]},dR={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},fR={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]},pR={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},gR={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]},mR={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},vR={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}},yR={ordinalNumber:YL({matchPattern:aR,parsePattern:oR,valueCallback:e=>parseInt(e,10)}),era:us({matchPatterns:lR,defaultMatchWidth:"wide",parsePatterns:cR,defaultParseWidth:"any"}),quarter:us({matchPatterns:uR,defaultMatchWidth:"wide",parsePatterns:hR,defaultParseWidth:"any",valueCallback:e=>e+1}),month:us({matchPatterns:dR,defaultMatchWidth:"wide",parsePatterns:fR,defaultParseWidth:"any"}),day:us({matchPatterns:pR,defaultMatchWidth:"wide",parsePatterns:gR,defaultParseWidth:"any"}),dayPeriod:us({matchPatterns:mR,defaultMatchWidth:"any",parsePatterns:vR,defaultParseWidth:"any"})},ER={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},bR={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xR={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},_R={date:su({formats:ER,defaultWidth:"full"}),time:su({formats:bR,defaultWidth:"full"}),dateTime:su({formats:xR,defaultWidth:"full"})},hm={code:"en-US",formatDistance:ZL,formatLong:_R,formatRelative:QL,localize:sR,match:yR,options:{weekStartsOn:0,firstWeekContainsDate:1}},Zr={type:Le.END_LINE,threshold:16,numCharacter:14},SR={code:typeof navigator<"u"&&(navigator==null?void 0:navigator.language)||"en-US",number:(e,t=(navigator==null?void 0:navigator.language)||"en-US")=>e.toLocaleString(t),date:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleDateString(t,n),time:(e,t=(navigator==null?void 0:navigator.language)||"en-US",n={},r=null)=>r||e.toLocaleTimeString(t,n),optionsObject:{"15seconds":{primary:{"MMM d, pp":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"MMM d, h:mm:ss.SSS a":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},secondary:{pp:{hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"h:mm:ss.SSS a":{hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},type:"time"},minute:{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},"30minutes":{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},hourly:{primary:{"MMM d, hh a":{month:"short",day:"numeric",hour:"2-digit",hourCycle:"h12"}},secondary:{"hh a":{hour:"2-digit",hourCycle:"h12"}},type:"time"},daily:{primary:{"MMM d":{month:"short",day:"numeric"}},secondary:{d:{day:"numeric"}},type:"date"},weekly:{primary:{"eee, MMM d":{weekday:"short",month:"short",day:"numeric"}},secondary:{eee:{weekday:"short"}},type:"date"},monthly:{primary:{"MMM yyyy":{month:"short",year:"numeric"}},secondary:{MMM:{month:"short"}},type:"date"},quarterly:{primary:{},secondary:{},type:"date"},yearly:{primary:{yyyy:{year:"numeric"}},secondary:{yyyy:{year:"numeric"}},type:"date"}},translations:{group:"Group",total:"Total",meter:{title:""},tabularRep:{title:"Tabular representation",downloadAsCSV:"Download as CSV"},toolbar:{exportAsCSV:"Export to CSV",exportAsJPG:"Export to JPG",exportAsPNG:"Export to PNG",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoom:"Reset zoom",moreOptions:"More options",makeFullScreen:"Make fullscreen",exitFullScreen:"Exit fullscreen",showAsTable:"Show as table"}}},TR={enabled:!0,position:Wr.BOTTOM,clickable:!0,truncation:Zr,alignment:Ht.LEFT,order:null,additionalItems:[]},OR={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},wR={enabled:!0},dm={enabled:!0,showTotal:!0,truncation:Zr,groupLabel:"Group"},fm={top:{visible:!0,includeZero:!0,truncation:Zr},bottom:{visible:!0,includeZero:!0,truncation:Zr},left:{visible:!0,includeZero:!0,truncation:Zr},right:{visible:!0,includeZero:!0,truncation:Zr}},Ka={addSpaceOnEdges:1,showDayName:!1,localeObject:hm,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"}}};let pm=!1;try{pm=typeof document<"u"&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(e){console.warn("Fullscreen capabilities check failed: ",e.message)}const ee={width:null,height:null,resizable:!0,theme:nu.WHITE,tooltip:dm,legend:TR,locale:SR,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:xt.SHOW_AS_DATATABLE},...pm?[{type:xt.MAKE_FULLSCREEN}]:[],{type:xt.EXPORT_CSV},{type:xt.EXPORT_PNG},{type:xt.EXPORT_JPG}]}},gm=lt({},ee,{thematic:{projection:rn.geoNaturalEarth1}}),ds=lt({},ee,{axes:fm,timeScale:Ka,grid:OR,ruler:wR,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:ze.GRAPH_VIEW}}}),hr=lt({},ds,{bars:{maxWidth:16,spacingFactor:.25},timeScale:lt(Ka,{addSpaceOnEdges:1})}),MR=lt({},hr,{}),AR=lt({},hr,{}),CR=lt({},hr,{bars:lt({},hr.bars,{dividerSize:1.5})}),DR=lt({},hr,{}),au=lt({},ds,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),LR=au,mm=lt({},au,{points:{radius:3,filled:!1,enabled:!0}}),vm=lt({},mm,{timeScale:lt(Ka,{addSpaceOnEdges:0})}),RR=vm,IR=lt({},ds,{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:Vt.RADIUS,name:"Radius"}]}}),kR=lt({},ds,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:Vt.AREA,name:"Poor area"},{type:Vt.AREA,name:"Satisfactory area"},{type:Vt.AREA,name:"Great area"},{type:Vt.QUARTILE,name:"Quartiles"}]}}),PR=lt({},hr,{bars:{dividerSize:1.5},timeScale:lt(Ka,{addSpaceOnEdges:0})}),NR=lt({},ee,{tooltip:lt({},dm,{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"}}),ym=lt({},ee,{pie:{labels:{formatter:null,enabled:!0},alignment:Ht.LEFT,sortFunction:null,valueMapsTo:"value"}}),$R=lt({},ee,{legend:{enabled:!1},gauge:{type:lr.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,alignment:Ht.LEFT}}),FR=lt({},ym,{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)},alignment:Ht.LEFT}}),Em=lt({},ee,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),UR=lt({},Em,{legend:{enabled:!0}}),BR=lt({},ee,{radar:{axes:{angle:"key",value:"value"},alignment:Ht.LEFT},tooltip:{gridline:{enabled:!0}}}),HR=lt({},hr,{comboChartTypes:[]}),GR=lt({tree:{type:qa.TREE}},ee,{}),VR=lt({},ee,{data:lt(ee.data,{groupMapsTo:"name"})}),zR=lt({},ee,jr,{data:lt(ee.data,{groupMapsTo:"name"})}),WR=lt({},ee,{alluvial:{data:lt(ee.data,{groupMapsTo:"source"}),nodeAlignment:Ht.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),YR=lt({},ee,{axes:fm,heatmap:{divider:{state:qr.AUTO},colorLegend:{type:"linear"}}}),qR=lt({},gm,{choropleth:{colorLegend:{type:"linear"}}}),Mt={alluvialChart:WR,areaChart:vm,axisChart:ds,boxplotChart:DR,bubbleChart:IR,bulletChart:kR,chart:ee,circlePackChart:zR,choroplethChart:qR,comboChart:HR,donutChart:FR,gaugeChart:$R,groupedBarChart:AR,heatmapChart:YR,histogramChart:PR,lineChart:mm,lollipopChart:LR,meterChart:Em,pieChart:ym,proportionalMeterChart:UR,radarChart:BR,scatterChart:au,simpleBarChart:MR,stackedAreaChart:RR,stackedBarChart:CR,thematicChart:gm,treeChart:GR,treemapChart:VR,wordCloudChart:NR};function bm(e){const t=$t(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function xm(e,t){const n=$t(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function _m(e,t,n){const[r,i]=ur(n==null?void 0:n.in,e,t),s=xm(r),a=xm(i),o=+s-bm(s),l=+a-bm(a);return Math.round((o-l)/qL)}function XR(e,t){const n=$t(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function jR(e,t){const n=$t(e,t==null?void 0:t.in);return _m(n,XR(n))+1}function Qa(e,t){return hs(e,{...t,weekStartsOn:1})}function Sm(e,t){const n=$t(e,t==null?void 0:t.in),r=n.getFullYear(),i=Ie(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const s=Qa(i),a=Ie(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const o=Qa(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=o.getTime()?r:r-1}function ZR(e,t){const n=Sm(e,t),r=Ie(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Qa(r)}function KR(e,t){const n=$t(e,t==null?void 0:t.in),r=+Qa(n)-+ZR(n);return Math.round(r/om)+1}function Tm(e,t){var u,d,h,f;const n=$t(e,t==null?void 0:t.in),r=n.getFullYear(),i=Za(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((f=(h=i.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=Ie((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,s),a.setHours(0,0,0,0);const o=hs(a,t),l=Ie((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=hs(l,t);return+n>=+o?r+1:+n>=+c?r:r-1}function QR(e,t){var o,l,c,u;const n=Za(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(c=n.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,i=Tm(e,t),s=Ie((t==null?void 0:t.in)||e,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),hs(s,t)}function JR(e,t){const n=$t(e,t==null?void 0:t.in),r=+hs(n,t)-+QR(n,t);return Math.round(r/om)+1}function Tt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const $n={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Tt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Tt(n+1,2)},d(e,t){return Tt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Tt(e.getHours()%12||12,t.length)},H(e,t){return Tt(e.getHours(),t.length)},m(e,t){return Tt(e.getMinutes(),t.length)},s(e,t){return Tt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Tt(i,t.length)}},Kr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Om={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return $n.y(e,t)},Y:function(e,t,n,r){const i=Tm(e,r),s=i>0?i:1-i;if(t==="YY"){const a=s%100;return Tt(a,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):Tt(s,t.length)},R:function(e,t){const n=Sm(e);return Tt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Tt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Tt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Tt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return $n.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Tt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=JR(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Tt(i,t.length)},I:function(e,t,n){const r=KR(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Tt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):$n.d(e,t)},D:function(e,t,n){const r=jR(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Tt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return Tt(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return Tt(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Tt(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Kr.noon:r===0?i=Kr.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Kr.evening:r>=12?i=Kr.afternoon:r>=4?i=Kr.morning:i=Kr.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return $n.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):$n.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Tt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Tt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):$n.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):$n.s(e,t)},S:function(e,t){return $n.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Mm(r);case"XXXX":case"XX":return dr(r);case"XXXXX":case"XXX":default:return dr(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Mm(r);case"xxxx":case"xx":return dr(r);case"xxxxx":case"xxx":default:return dr(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wm(r,":");case"OOOO":default:return"GMT"+dr(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wm(r,":");case"zzzz":default:return"GMT"+dr(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Tt(r,t.length)},T:function(e,t,n){return Tt(+e,t.length)}};function wm(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),s=r%60;return s===0?n+String(i):n+String(i)+t+Tt(s,2)}function Mm(e,t){return e%60===0?(e>0?"-":"+")+Tt(Math.abs(e)/60,2):dr(e,t)}function dr(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Tt(Math.trunc(r/60),2),s=Tt(r%60,2);return n+i+t+s}const Am=(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"})}},Cm=(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"})}},tI={p:Cm,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Am(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",Am(r,t)).replace("{{time}}",Cm(i,t))}},eI=/^D+$/,nI=/^Y+$/,rI=["D","DD","YY","YYYY"];function iI(e){return eI.test(e)}function sI(e){return nI.test(e)}function aI(e,t,n){const r=oI(e,t,n);if(console.warn(r),rI.includes(e))throw new RangeError(r)}function oI(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function lI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function cI(e){return!(!lI(e)&&typeof e!="number"||isNaN(+$t(e)))}const uI=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,hI=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dI=/^'([^]*?)'?$/,fI=/''/g,pI=/[a-zA-Z]/;function ou(e,t,n){var u,d,h,f,p,g,m,v;const r=Za(),i=(n==null?void 0:n.locale)??r.locale??hm,s=(n==null?void 0:n.firstWeekContainsDate)??((d=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((g=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((v=(m=r.locale)==null?void 0:m.options)==null?void 0:v.weekStartsOn)??0,o=$t(e,n==null?void 0:n.in);if(!cI(o))throw new RangeError("Invalid time value");let l=t.match(hI).map(E=>{const y=E[0];if(y==="p"||y==="P"){const x=tI[y];return x(E,i.formatLong)}return E}).join("").match(uI).map(E=>{if(E==="''")return{isToken:!1,value:"'"};const y=E[0];if(y==="'")return{isToken:!1,value:gI(E)};if(Om[y])return{isToken:!0,value:E};if(y.match(pI))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:E}});i.localize.preprocessor&&(l=i.localize.preprocessor(o,l));const c={firstWeekContainsDate:s,weekStartsOn:a,locale:i};return l.map(E=>{if(!E.isToken)return E.value;const y=E.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&sI(y)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&iI(y))&&aI(y,t,String(e));const x=Om[y[0]];return x(o,y,i.localize,c)}).join("")}function gI(e){const t=e.match(dI);return t?t[1].replace(fI,"'"):e}var Dm=(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))(Dm||{});const lu=[["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 Lm(e,t,n,r,i){const s=t===0,a=Number(ou(new Date(e),"c"))===2,o=Number(ou(new Date(e),"q"))===1,l=t!==0?n[t-1]:null;switch(r){case"15seconds":return s||to(e)||fs(e,l)||Fn(e);case"minute":return s||to(e)||fs(e,l)||Fn(e);case"30minutes":return s||to(e)||fs(e,l)||Fn(e);case"hourly":return s||to(e)||fs(e,l)||Fn(e);case"daily":return i?s||a||Fn(e):s||fs(e,l)||Fn(e);case"weekly":return s||a||Fn(e);case"monthly":return s||Fn(e);case"quarterly":return s||o;case"yearly":return!1;default:throw new Error(`${r} is not a valid time interval.`)}}function cu(e,t,n,r,i,s){const a=i.showDayName,o=r==="daily"&&a?"weekly":r,l=new Date(e),c=b(i,"timeIntervalFormats")[o],u=b(c,"primary"),d=b(c,"secondary"),h=Lm(e,t,n,r,a);let f=h?u:d;r==="15seconds"&&l.getMilliseconds()!==0&&(f=f.replace("pp","h:mm:ss.SSS a"));const p=i.localeObject,{code:g,optionsObject:m}=s,v=m[r].type,E=m[r][h?"primary":"secondary"][f];if(r==="quarterly"||!E){const x=ou(l,f,{locale:p}).split("").map(S=>{const _=Number(S);return S!==" "&&!Number.isNaN(_)?_.toLocaleString(g):S});return s[v](l,g,{},x.join(""))}else return s[v](l,g,E)}function Ja(e){const t=new Date(e);return{M:t.getMonth()+1,d:t.getDate(),H:t.getHours(),m:t.getMinutes(),s:t.getSeconds()}}function mI(e){if(e)return e.slice(1).map((t,n)=>t-e[n])}function vI(e){const t=lu.reduce((n,[,r],i)=>{const s=lu[n][1],a=Math.abs(s-e),o=Math.abs(r-e);return a<o?n:i},0);return lu[t][0]}function uu(e,t){if(Dm[t])return t;if(e.length===1)return"15seconds";const n=mI(e),r=In(n);return vI(r)}function to(e){const{s:t,m:n,H:r}=Ja(e);return r===0&&n===0&&t===0}function fs(e,t){const n=Ja(e).M,r=Ja(t).M;return n!==r}function Fn(e){const{M:t,d:n,s:r,m:i,H:s}=Ja(e);return t===1&&n===1&&s===0&&i===0&&r===0}function Rm(e){return e===void 0?"":e.toISOString()}function yI(e){const t=e.trim();return["=","+","-","@"," ","\r"].includes(t.charAt(0))?` ${t}`:/[,\"\n]/.test(t)?`"${t}"`:t}class sn{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}formatTable({headers:t,cells:n}){const r=this.getOptions(),{code:i,date:s,number:a}=b(r,"locale"),o=b(r,"tabularRepModal","tableHeadingFormatter"),l=b(r,"tabularRepModal","tableCellFormatter"),{cartesianScales:c}=this.services,u=c==null?void 0:c.getDomainAxisScaleType();let d;return u===Q.TIME&&(d=f=>s(f,i,{month:"short",day:"numeric",year:"numeric"})),[typeof o=="function"?o(t):t,...typeof l=="function"?l(n):n.map(f=>{d&&(f[1]=d(f[1]));for(const p in f){const g=f[p];typeof g=="number"&&(f[p]=a(g,i))}return f})]}getAllDataFromDomain(t){if(!this.getData())return null;const n=this.getOptions();let r=this.getData();const i=this.getDataGroups(),{groupMapsTo:s}=b(n,"data"),a=b(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===Q.LINEAR||c===Q.LOG)&&(r=r.map(u=>({...u,[l]:u[l]===null?u[l]:Number(u[l])}))),l&&a[o].domain)if(c===Q.LABELS)r=r.filter(u=>a[o].domain.includes(u[l]));else{const[u,d]=a[o].domain;r=r.filter(h=>!(l in h)||h[l]>=u&&h[l]<=d)}}),r.filter(o=>i.find(l=>l.name===o[s]))}getDisplayData(t){if(!this.get("data"))return null;const{ACTIVE:n}=Pt.items.status,r=this.getDataGroups(t),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(t).filter(a=>r.find(o=>o.name===a[i]&&o.status===n))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){const n=this.sanitize(Sn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),n}getDataGroups(t){return b(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(r=>t.includes(r.name)):this.get("dataGroups")}getActiveDataGroups(t){const{ACTIVE:n}=Pt.items.status;return this.getDataGroups(t).filter(r=>r.status===n)}getDataGroupNames(t){return this.getDataGroups(t).map(r=>r.name)}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map(r=>r.name)}aggregateBinDataByGroup(t){return SL(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=HL.defaultBins}=s,l=Array.isArray(o),c=B0().value(f=>f[i]).thresholds(o)(t);if(l)c[c.length-1].x1=o[o.length-1];else{const f=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+f}const u=l?[o[0],o[o.length-1]]:[c[0].x0,c[c.length-1].x1],d=Array.from(new Set(t.map(f=>f[a]))),h=[];return c.forEach(f=>{const p=`${f.x0}-${f.x1}`,g=this.aggregateBinDataByGroup(f);d.forEach(m=>{h.push({group:m,key:p,value:g[m]||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 ac().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=es(i.map(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l);return l[c]instanceof Date?Rm(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===Q.TIME?s.sort((l,c)=>{const u=new Date(l),d=new Date(c);return u-d}):(o===Q.LOG||o===Q.LINEAR)&&s.sort((l,c)=>l-c),s}getDataValuesGroupedByKeys({bins:t=null,groups:n=null}){const r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.getDisplayData(n),a=this.getDataGroupNames(),o=this.getStackKeys({bins:t,groups:n});return t?o.map(l=>{const[c,u]=l.split(":"),d={x0:c,x1:u},h=t.find(f=>f.x0.toString()===c.toString());return a.forEach(f=>{d[f]=h.filter(p=>p[i]===f).length}),d}):o.map(l=>{const c={sharedStackKey:l};return a.forEach(u=>{const d=s.find(f=>{const p=this.services.cartesianScales.getDomainIdentifier(f);return f[i]===u&&Object.prototype.hasOwnProperty.call(f,p)&&(f[p]instanceof Date?Rm(f[p])===l:f[p].toString()===l)}),h=this.services.cartesianScales.getRangeIdentifier(c);c[u]=d?d[h]:null}),c})}getStackedData({percentage:t=!1,groups:n=null,divergent:r=!1}){const i=this.getOptions(),{groupMapsTo:s}=i.data,a=this.getActiveDataGroupNames(n),o=this.getDataValuesGroupedByKeys({groups:n});if(t){const c=bL(o.map(u=>[u.sharedStackKey,0]));o.forEach(u=>{a.forEach(d=>{c[u.sharedStackKey]+=u[d]})}),o.forEach(u=>{a.forEach(d=>{const h=c[u.sharedStackKey];c[u.sharedStackKey]?u[d]=u[d]/h*100:u[d]=0})})}return(r?ac().offset(WT):ac()).keys(a)(o).map((c,u)=>Object.keys(c).filter(d=>!isNaN(d)).map(d=>{const h=c[d];return h[s]=a[u],h}))}getOptions(){return this.state.options}set(t,n){this.state=Object.assign({},this.state,t);const r=Object.assign({skipUpdate:!1,animate:!0},n);r.skipUpdate||this.update(r.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){const n=this.getOptions();iu(n,t),this.set({options:lt(n,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(T.Model.UPDATE,{animate:t}))}toggleDataLabel(t){const{ACTIVE:n,DISABLED:r}=Pt.items.status,i=this.getDataGroups(),s=i.some(u=>u.status===r),a=i.filter(u=>u.status===n);if(s)if(a.length===1&&a[0].name===t)i.forEach((u,d)=>{i[d].status=n});else{const u=i.findIndex(d=>d.name===t);i[u].status=i[u].status===r?n:r}else i.forEach((u,d)=>{i[d].status=u.name===t?n:r});const o=i.filter(u=>u.status===n),l=this.getOptions();i.some(u=>u.status===r)?l.data.selectedGroups=o.map(u=>u.name):l.data.selectedGroups=[],this.services.events.dispatchEvent(T.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})}getIsFilled(t,n,r,i){const s=this.getOptions();return s.getIsFilled?s.getIsFilled(t,n,r,i):i}getFillColor(t,n,r){const i=this.getOptions(),s=b(this.colorScale,t);return i.getFillColor?i.getFillColor(t,n,r,s):s}getStrokeColor(t,n,r){const i=this.getOptions(),s=b(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,n,r,s):s}isUserProvidedColorScaleValid(){const t=b(this.getOptions(),"color","scale"),n=this.getDataGroups();return t==null||Object.keys(t).length==0?!1:n.some(r=>Object.keys(t).includes(r.name))}getColorClassName(t){const n=this.colorClassNames(t.dataGroupName);let r=t.originalClassName;return t.classNameTypes.forEach(i=>r=t.originalClassName?`${r} ${i}-${n}`:`${i}-${n}`),r||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://charts.carbondesignsystem.com/");const n=[],{datasets:r,labels:i}=t;return r.forEach(s=>{s.data.forEach((a,o)=>{let l;const c=b(s,"label");if(c===null){const d=b(i,o);d?l=d:l="Ungrouped"}else l=c;const u={group:l,key:i[o]};isNaN(a)?(u.value=a.value,u.date=a.date):u.value=a,n.push(u)})}),n}getTabularDataArray(){return[]}exportToCSV(){const n=this.getTabularDataArray().map(a=>a.map(o=>`"${(o==="–"?"–":o).split(/[,;'"`]/).map(u=>yI(u)).join("")}"`)).map(a=>a.join(",")).join(`
|
|
2
2
|
`),r=this.getOptions();let i="myChart";const s=b(r,"fileDownload","fileName");typeof s=="function"?i=s("csv"):typeof s=="string"&&(i=s),this.services.files.downloadCSV(n,`${i}.csv`)}getTabularData(t){return Array.isArray(t)?t:this.transformToTabularData(t)}sanitize(t){return t=this.getTabularData(t),t}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach(t=>{this.allDataGroups.indexOf(t)===-1&&this.allDataGroups.push(t)}):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(t){const{groupMapsTo:n}=this.getOptions().data,{ACTIVE:r,DISABLED:i}=Pt.items.status,s=this.getOptions(),a=es(t.map(l=>l[n]));s.data.selectedGroups.length&&(s.data.selectedGroups.every(c=>a.includes(c))||(s.data.selectedGroups=[]));const o=l=>!s.data.selectedGroups.length||s.data.selectedGroups.includes(l)?r:i;return a.map(l=>({name:l,status:o(l)}))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;const t=this.getOptions(),n=b(t,"color","scale");Object.keys(n).forEach(i=>{this.allDataGroups.includes(i)||console.warn(`"${i}" does not exist in data groups.`)}),this.allDataGroups.filter(i=>n[i]).forEach(i=>this.colorScale[i]=n[i])}setColorClassNames(){const t=b(this.getOptions(),"color","pairing");let n=b(t,"numberOfVariants");(!n||n<this.allDataGroups.length)&&(n=this.allDataGroups.length);let r=b(t,"option");const i=em.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=va().range(o).domain(this.allDataGroups)}}function EI(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 bI=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function An(e){const t=[];for(let n=0,r=e.length;n<r;n++)t.push(e[n]);return t}function eo(e,t){const r=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return r?parseFloat(r.replace("px","")):0}function xI(e){const t=eo(e,"border-left-width"),n=eo(e,"border-right-width");return e.clientWidth+t+n}function _I(e){const t=eo(e,"border-top-width"),n=eo(e,"border-bottom-width");return e.clientHeight+t+n}function Im(e,t={}){const n=t.width||xI(e),r=t.height||_I(e);return{width:n,height:r}}function SI(){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 _e=16384;function TI(e){(e.width>_e||e.height>_e)&&(e.width>_e&&e.height>_e?e.width>e.height?(e.height*=_e/e.width,e.width=_e):(e.width*=_e/e.height,e.height=_e):e.width>_e?(e.height*=_e/e.width,e.width=_e):(e.width*=_e/e.height,e.height=_e))}function no(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 OI(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function wI(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),OI(i)}const fe=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||fe(n,t)};function MI(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function AI(e){return An(e).map(t=>{const n=e.getPropertyValue(t),r=e.getPropertyPriority(t);return`${t}: ${n}${r?" !important":""};`}).join(" ")}function CI(e,t,n){const r=`.${e}:${t}`,i=n.cssText?MI(n):AI(n);return document.createTextNode(`${r}{${i}}`)}function km(e,t,n){const r=window.getComputedStyle(e,n),i=r.getPropertyValue("content");if(i===""||i==="none")return;const s=bI();try{t.className=`${t.className} ${s}`}catch{return}const a=document.createElement("style");a.appendChild(CI(s,n,r)),t.appendChild(a)}function DI(e,t){km(e,t,":before"),km(e,t,":after")}const Pm="application/font-woff",Nm="image/jpeg",LI={woff:Pm,woff2:Pm,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Nm,jpeg:Nm,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function RI(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function hu(e){const t=RI(e).toLowerCase();return LI[t]||""}function II(e){return e.split(/,/)[1]}function du(e){return e.search(/^(data:)/)!==-1}function kI(e,t){return`data:${t};base64,${e}`}async function $m(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 fu={};function PI(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 pu(e,t,n){const r=PI(e,t,n.includeQueryParams);if(fu[r]!=null)return fu[r];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const s=await $m(e,n.fetchRequestInit,({res:a,result:o})=>(t||(t=a.headers.get("Content-Type")||""),II(o)));i=kI(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 fu[r]=i,i}async function NI(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):no(t)}async function $I(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 no(o)}const n=e.poster,r=hu(n),i=await pu(n,r,t);return no(i)}async function FI(e){var t;try{if(!((t=e==null?void 0:e.contentDocument)===null||t===void 0)&&t.body)return await ro(e.contentDocument.body,{},!0)}catch{}return e.cloneNode(!1)}async function UI(e,t){return fe(e,HTMLCanvasElement)?NI(e):fe(e,HTMLVideoElement)?$I(e,t):fe(e,HTMLIFrameElement)?FI(e):e.cloneNode(!1)}const BI=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT";async function HI(e,t,n){var r,i;let s=[];return BI(e)&&e.assignedNodes?s=An(e.assignedNodes()):fe(e,HTMLIFrameElement)&&(!((r=e.contentDocument)===null||r===void 0)&&r.body)?s=An(e.contentDocument.body.childNodes):s=An(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),s.length===0||fe(e,HTMLVideoElement)||await s.reduce((a,o)=>a.then(()=>ro(o,n)).then(l=>{l&&t.appendChild(l)}),Promise.resolve()),t}function GI(e,t){const n=t.style;if(!n)return;const r=window.getComputedStyle(e);r.cssText?(n.cssText=r.cssText,n.transformOrigin=r.transformOrigin):An(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`),fe(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 VI(e,t){fe(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),fe(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function zI(e,t){if(fe(e,HTMLSelectElement)){const n=t,r=Array.from(n.children).find(i=>e.value===i.getAttribute("value"));r&&r.setAttribute("selected","")}}function WI(e,t){return fe(t,Element)&&(GI(e,t),DI(e,t),VI(e,t),zI(e,t)),t}async function YI(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const r={};for(let s=0;s<n.length;s++){const o=n[s].getAttribute("xlink:href");if(o){const l=e.querySelector(o),c=document.querySelector(o);!l&&c&&!r[o]&&(r[o]=await ro(c,t,!0))}}const i=Object.values(r);if(i.length){const s="http://www.w3.org/1999/xhtml",a=document.createElementNS(s,"svg");a.setAttribute("xmlns",s),a.style.position="absolute",a.style.width="0",a.style.height="0",a.style.overflow="hidden",a.style.display="none";const o=document.createElementNS(s,"defs");a.appendChild(o);for(let l=0;l<i.length;l++)o.appendChild(i[l]);e.appendChild(a)}return e}async function ro(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(r=>UI(r,t)).then(r=>HI(e,r,t)).then(r=>WI(e,r)).then(r=>YI(r,t))}const Fm=/url\((['"]?)([^'"]+?)\1\)/g,qI=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,XI=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function jI(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function ZI(e){const t=[];return e.replace(Fm,(n,r,i)=>(t.push(i),n)),t.filter(n=>!du(n))}async function KI(e,t,n,r,i){try{const s=n?EI(t,n):t,a=hu(t);let o;return i||(o=await pu(s,a,r)),e.replace(jI(t),`$1${o}$3`)}catch{}return e}function QI(e,{preferredFontFormat:t}){return t?e.replace(XI,n=>{for(;;){const[r,,i]=qI.exec(n)||[];if(!i)return"";if(i===t)return`src: ${r};`}}):e}function Um(e){return e.search(Fm)!==-1}async function Bm(e,t,n){if(!Um(e))return e;const r=QI(e,n);return ZI(r).reduce((s,a)=>s.then(o=>KI(o,a,t,n)),Promise.resolve(r))}async function io(e,t,n){var r;const i=(r=t.style)===null||r===void 0?void 0:r.getPropertyValue(e);if(i){const s=await Bm(i,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function JI(e,t){await io("background",e,t)||await io("background-image",e,t),await io("mask",e,t)||await io("mask-image",e,t)}async function tk(e,t){const n=fe(e,HTMLImageElement);if(!(n&&!du(e.src))&&!(fe(e,SVGImageElement)&&!du(e.href.baseVal)))return;const r=n?e.src:e.href.baseVal,i=await pu(r,hu(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 ek(e,t){const r=An(e.childNodes).map(i=>Hm(i,t));await Promise.all(r).then(()=>e)}async function Hm(e,t){fe(e,Element)&&(await JI(e,t),await tk(e,t),await ek(e,t))}function nk(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 Gm={};async function Vm(e){let t=Gm[e];if(t!=null)return t;const r=await(await fetch(e)).text();return t={url:e,cssText:r},Gm[e]=t,t}async function zm(e,t){let n=e.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async a=>{let o=a.replace(r,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),$m(o,t.fetchRequestInit,({result:l})=>(n=n.replace(a,`url(${l})`),[a,l]))});return Promise.all(s).then(()=>n)}function Wm(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 rk(e,t){const n=[],r=[];return e.forEach(i=>{if("cssRules"in i)try{An(i.cssRules||[]).forEach((s,a)=>{if(s.type===CSSRule.IMPORT_RULE){let o=a+1;const l=s.href,c=Vm(l).then(u=>zm(u,t)).then(u=>Wm(u).forEach(d=>{try{i.insertRule(d,d.startsWith("@import")?o+=1:i.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:d,error:h})}})).catch(u=>{console.error("Error loading remote css",u.toString())});r.push(c)}})}catch(s){const a=e.find(o=>o.href==null)||document.styleSheets[0];i.href!=null&&r.push(Vm(i.href).then(o=>zm(o,t)).then(o=>Wm(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{An(i.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${i.href}`,s)}}),n))}function ik(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>Um(t.style.getPropertyValue("src")))}async function sk(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=An(e.ownerDocument.styleSheets),r=await rk(n,t);return ik(r)}async function ak(e,t){const n=await sk(e,t);return(await Promise.all(n.map(i=>{const s=i.parentStyleSheet?i.parentStyleSheet.href:null;return Bm(i.cssText,s,t)}))).join(`
|
|
3
|
-
`)}async function ok(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await ak(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 lk(e,t={}){const{width:n,height:r}=Im(e,t),i=await ro(e,t,!0);return await ok(i,t),await Hm(i,t),nk(i,t),await wI(i,n,r)}async function Ym(e,t={}){const{width:n,height:r}=Im(e,t),i=await lk(e,t),s=await no(i),a=document.createElement("canvas"),o=a.getContext("2d"),l=t.pixelRatio||SI(),c=t.canvasWidth||n,u=t.canvasHeight||r;return a.width=c*l,a.height=u*l,t.skipAutoScale||TI(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 ck(e,t={}){return(await Ym(e,t)).toDataURL()}async function uk(e,t={}){return(await Ym(e,t)).toDataURL("image/jpeg",t.quality||1)}class Cn{constructor(t,n){this.model=t,this.services=n,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}}const hk="DONT_STYLE_ME_css_styles_verifier";class I extends Cn{constructor(t,n){super(t,n)}static getHTMLElementSize(t){return{width:t.clientWidth,height:t.clientHeight}}static getSVGElementSize(t,n={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){t.attr||(t=R(t));const r={width:0,height:0},i=h=>{h&&Object.keys(r).forEach(f=>{if(h[f]){const p=h[f],g=parseFloat(p);p&&g>r[f]&&(""+p).indexOf("%")===-1&&(r[f]=g)}})},s={width:t.attr("width"),height:t.attr("height")},a=t.node();let o,l,c,u;try{typeof a.getBBox=="function"&&(o=a.getBBox(),l={width:o.width,height:o.height})}catch(h){console.error(h)}try{typeof(a==null?void 0:a.getBoundingClientRect)=="function"&&(c=a.getBoundingClientRect(),u={width:c.width,height:c.height})}catch(h){console.error(h)}let d;if(a instanceof SVGSVGElement&&(d={width:a.clientWidth,height:a.clientHeight}),n){if(n.useAttrs&&(i(s),r.width>0&&r.height>0))return r;if(n.useClientDimensions&&(i(d),r.width>0&&r.height>0))return d;if(n.useBBox&&(i(l),r.width>0&&r.height>0))return l;if(n.useBoundingRect&&(i(u),r.width>0&&r.height>0))return u}try{const h={width:b(t.node(),"width","baseVal","value"),height:b(t.node(),"height","baseVal","value")};i(h)}catch{i(d),i(l),i(s)}return r}static appendOrSelect(t,n){const r=t.select(`${n}`);if(r.empty()){let i=n.split("#"),s,a;return i.length===2?(s=i[0],i=i[1].split("."),a=i[0]):(i=n.split("."),s=i[0]),t.append(s).attr("id",a).attr("class",i.slice(1).join(" "))}return r}init(){this.initializeID(),this.styleHolderElement(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}getElementOffset(t,n=!1){const r={left:0,top:0},i=t.getBoundingClientRect(),s=n?{left:0,top:0}:this.getHolder().getBoundingClientRect();try{r.left=i.left-s.left,r.top=i.top-s.top}catch(a){console.error(a)}return r}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=b(t,"style","prefix"),r=R(this.getHolder()).append("div").classed(`${de}--${n}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");r.append("g").attr("class",hk),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(`${de}--chart-holder`,!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=R(r);i.classed("filled",!0),uk(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var l;let a="myChart";const o=b(n,"fileDownload","fileName");typeof o=="function"?a=o("jpg"):typeof o=="string"&&(a=o),(l=t.services.files)==null||l.downloadImage(s,`${a}.jpg`),i.classed("filled",!1)})}exportToPNG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=R(r);i.classed("filled",!0),ck(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var l;let a="myChart";const o=b(n,"fileDownload","fileName");typeof o=="function"?a=o("png"):typeof o=="string"&&(a=o),(l=t.services.files)==null||l.downloadImage(s,`${a}.png`),i.classed("filled",!1)}).catch(function(s){console.error("oops, something went wrong!",s)})}isFullScreenMode(){return R(this.getHolder()).classed("fullscreen")}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}=I.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(I.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(T.Chart.MOUSEOVER)}).on("mouseout",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(T.Chart.MOUSEOUT)})}addResizeListener(){const t=this.getHolder();if(!t)return;let n=t.clientWidth,r=t.clientHeight;const i=Ya(()=>{var a;t&&(Math.abs(n-t.clientWidth)>1||Math.abs(r-t.clientHeight)>1)&&(n=t.clientWidth,r=t.clientHeight,(a=this.services.events)==null||a.dispatchEvent(T.Chart.RESIZE))},12.5);new ResizeObserver(i).observe(t)}}class pt{constructor(t,n,r){if(this.type="",this.renderType=tt.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=n,r&&(this.configs=r,this.configs.id)){const i=b(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 r;const n=this.parent;if(this.parent=t,!(n&&n.node()===t.node())&&this.type){const i=b(this.model.getOptions(),"style","prefix");(r=this.parent)==null||r.classed(`${de}--${i}--${this.type}`,!0),n&&n.classed(`${de}--${i}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={ariaLabel:null,isPresentational:!1,withinChartClip:!1}){if(this.type){const n=b(this.model.getOptions(),"style","prefix"),r=this.id?`#${this.id}`:"",i=I.appendOrSelect(this.parent,`${this.renderType===tt.SVG?"svg":"div"}${r}.${de}--${n}--${this.type}`);if(t.ariaLabel&&i.attr("aria-label",t.ariaLabel),t.isPresentational&&i.attr("role","presentation"),t.withinChartClip){const s=this.model.get("chartClipId");if(s){const o=R(`#${s}`).select("rect");o.size()!==0&&parseFloat(o.attr("height"))>0&&i.attr("clip-path",`url(#${s})`)}}return i.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?lt({},this.model.getOptions(),this.configs.options):this.model.getOptions()}}/*! @license DOMPurify 3.2.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.0/LICENSE */const{entries:qm,setPrototypeOf:Xm,isFrozen:dk,getPrototypeOf:fk,getOwnPropertyDescriptor:pk}=Object;let{freeze:se,seal:ke,create:jm}=Object,{apply:gu,construct:mu}=typeof Reflect<"u"&&Reflect;se||(se=function(t){return t}),ke||(ke=function(t){return t}),gu||(gu=function(t,n,r){return t.apply(n,r)}),mu||(mu=function(t,n){return new t(...n)});const so=Se(Array.prototype.forEach),Zm=Se(Array.prototype.pop),ps=Se(Array.prototype.push),ao=Se(String.prototype.toLowerCase),vu=Se(String.prototype.toString),Km=Se(String.prototype.match),gs=Se(String.prototype.replace),gk=Se(String.prototype.indexOf),mk=Se(String.prototype.trim),Ye=Se(Object.prototype.hasOwnProperty),ae=Se(RegExp.prototype.test),ms=vk(TypeError);function Se(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return gu(e,t,r)}}function vk(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return mu(e,n)}}function gt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ao;Xm&&Xm(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=n(i);s!==i&&(dk(t)||(t[r]=s),i=s)}e[i]=!0}return e}function yk(e){for(let t=0;t<e.length;t++)Ye(e,t)||(e[t]=null);return e}function fr(e){const t=jm(null);for(const[n,r]of qm(e))Ye(e,n)&&(Array.isArray(r)?t[n]=yk(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=fr(r):t[n]=r);return t}function vs(e,t){for(;e!==null;){const r=pk(e,t);if(r){if(r.get)return Se(r.get);if(typeof r.value=="function")return Se(r.value)}e=fk(e)}function n(){return null}return n}const Qm=se(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),yu=se(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Eu=se(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ek=se(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),bu=se(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bk=se(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Jm=se(["#text"]),tv=se(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),xu=se(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ev=se(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),oo=se(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),xk=ke(/\{\{[\w\W]*|[\w\W]*\}\}/gm),_k=ke(/<%[\w\W]*|[\w\W]*%>/gm),Sk=ke(/\${[\w\W]*}/gm),Tk=ke(/^data-[\-\w.\u00B7-\uFFFF]/),Ok=ke(/^aria-[\-\w]+$/),nv=ke(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wk=ke(/^(?:\w+script|data):/i),Mk=ke(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),rv=ke(/^html$/i),Ak=ke(/^[a-z][.\w]*(-[.\w]+)+$/i);var iv=Object.freeze({__proto__:null,ARIA_ATTR:Ok,ATTR_WHITESPACE:Mk,CUSTOM_ELEMENT:Ak,DATA_ATTR:Tk,DOCTYPE_NAME:rv,ERB_EXPR:_k,IS_ALLOWED_URI:nv,IS_SCRIPT_OR_DATA:wk,MUSTACHE_EXPR:xk,TMPLIT_EXPR:Sk});const ys={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ck=function(){return typeof window>"u"?null:window},Dk=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function sv(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ck();const t=nt=>sv(nt);if(t.version="3.2.0",t.removed=[],!e||!e.document||e.document.nodeType!==ys.document)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:o,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:f}=e,p=l.prototype,g=vs(p,"cloneNode"),m=vs(p,"remove"),v=vs(p,"nextSibling"),E=vs(p,"childNodes"),y=vs(p,"parentNode");if(typeof a=="function"){const nt=n.createElement("template");nt.content&&nt.content.ownerDocument&&(n=nt.content.ownerDocument)}let x,S="";const{implementation:_,createNodeIterator:A,createDocumentFragment:L,getElementsByTagName:B}=n,{importNode:k}=r;let O={};t.isSupported=typeof qm=="function"&&typeof y=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:H,ERB_EXPR:P,TMPLIT_EXPR:M,DATA_ATTR:w,ARIA_ATTR:U,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:F}=iv;let{IS_ALLOWED_URI:j}=iv,q=null;const ot=gt({},[...Qm,...yu,...Eu,...bu,...Jm]);let it=null;const mt=gt({},[...tv,...xu,...ev,...oo]);let st=Object.seal(jm(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Z=null,et=null,vt=!0,Y=!0,K=!1,ut=!0,C=!1,z=!0,V=!1,At=!1,Wt=!1,rt=!1,Ct=!1,ln=!1,Xe=!0,s0=!1;const qU="user-content-";let th=!0,Ts=!1,si={},ai=null;const a0=gt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let o0=null;const l0=gt({},["audio","video","img","source","image","track"]);let eh=null;const c0=gt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Oo="http://www.w3.org/1998/Math/MathML",wo="http://www.w3.org/2000/svg",Ln="http://www.w3.org/1999/xhtml";let oi=Ln,nh=!1,rh=null;const XU=gt({},[Oo,wo,Ln],vu);let Mo=gt({},["mi","mo","mn","ms","mtext"]),Ao=gt({},["annotation-xml"]);const jU=gt({},["title","style","font","a","script"]);let Os=null;const ZU=["application/xhtml+xml","text/html"],KU="text/html";let qt=null,li=null;const QU=n.createElement("form"),u0=function(D){return D instanceof RegExp||D instanceof Function},ih=function(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(li&&li===D)){if((!D||typeof D!="object")&&(D={}),D=fr(D),Os=ZU.indexOf(D.PARSER_MEDIA_TYPE)===-1?KU:D.PARSER_MEDIA_TYPE,qt=Os==="application/xhtml+xml"?vu:ao,q=Ye(D,"ALLOWED_TAGS")?gt({},D.ALLOWED_TAGS,qt):ot,it=Ye(D,"ALLOWED_ATTR")?gt({},D.ALLOWED_ATTR,qt):mt,rh=Ye(D,"ALLOWED_NAMESPACES")?gt({},D.ALLOWED_NAMESPACES,vu):XU,eh=Ye(D,"ADD_URI_SAFE_ATTR")?gt(fr(c0),D.ADD_URI_SAFE_ATTR,qt):c0,o0=Ye(D,"ADD_DATA_URI_TAGS")?gt(fr(l0),D.ADD_DATA_URI_TAGS,qt):l0,ai=Ye(D,"FORBID_CONTENTS")?gt({},D.FORBID_CONTENTS,qt):a0,Z=Ye(D,"FORBID_TAGS")?gt({},D.FORBID_TAGS,qt):{},et=Ye(D,"FORBID_ATTR")?gt({},D.FORBID_ATTR,qt):{},si=Ye(D,"USE_PROFILES")?D.USE_PROFILES:!1,vt=D.ALLOW_ARIA_ATTR!==!1,Y=D.ALLOW_DATA_ATTR!==!1,K=D.ALLOW_UNKNOWN_PROTOCOLS||!1,ut=D.ALLOW_SELF_CLOSE_IN_ATTR!==!1,C=D.SAFE_FOR_TEMPLATES||!1,z=D.SAFE_FOR_XML!==!1,V=D.WHOLE_DOCUMENT||!1,rt=D.RETURN_DOM||!1,Ct=D.RETURN_DOM_FRAGMENT||!1,ln=D.RETURN_TRUSTED_TYPE||!1,Wt=D.FORCE_BODY||!1,Xe=D.SANITIZE_DOM!==!1,s0=D.SANITIZE_NAMED_PROPS||!1,th=D.KEEP_CONTENT!==!1,Ts=D.IN_PLACE||!1,j=D.ALLOWED_URI_REGEXP||nv,oi=D.NAMESPACE||Ln,Mo=D.MATHML_TEXT_INTEGRATION_POINTS||Mo,Ao=D.HTML_INTEGRATION_POINTS||Ao,st=D.CUSTOM_ELEMENT_HANDLING||{},D.CUSTOM_ELEMENT_HANDLING&&u0(D.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(st.tagNameCheck=D.CUSTOM_ELEMENT_HANDLING.tagNameCheck),D.CUSTOM_ELEMENT_HANDLING&&u0(D.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(st.attributeNameCheck=D.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),D.CUSTOM_ELEMENT_HANDLING&&typeof D.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(st.allowCustomizedBuiltInElements=D.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),C&&(Y=!1),Ct&&(rt=!0),si&&(q=gt({},Jm),it=[],si.html===!0&&(gt(q,Qm),gt(it,tv)),si.svg===!0&&(gt(q,yu),gt(it,xu),gt(it,oo)),si.svgFilters===!0&&(gt(q,Eu),gt(it,xu),gt(it,oo)),si.mathMl===!0&&(gt(q,bu),gt(it,ev),gt(it,oo))),D.ADD_TAGS&&(q===ot&&(q=fr(q)),gt(q,D.ADD_TAGS,qt)),D.ADD_ATTR&&(it===mt&&(it=fr(it)),gt(it,D.ADD_ATTR,qt)),D.ADD_URI_SAFE_ATTR&>(eh,D.ADD_URI_SAFE_ATTR,qt),D.FORBID_CONTENTS&&(ai===a0&&(ai=fr(ai)),gt(ai,D.FORBID_CONTENTS,qt)),th&&(q["#text"]=!0),V&>(q,["html","head","body"]),q.table&&(gt(q,["tbody"]),delete Z.tbody),D.TRUSTED_TYPES_POLICY){if(typeof D.TRUSTED_TYPES_POLICY.createHTML!="function")throw ms('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof D.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ms('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=D.TRUSTED_TYPES_POLICY,S=x.createHTML("")}else x===void 0&&(x=Dk(f,i)),x!==null&&typeof S=="string"&&(S=x.createHTML(""));se&&se(D),li=D}},h0=gt({},[...yu,...Eu,...Ek]),d0=gt({},[...bu,...bk]),JU=function(D){let X=y(D);(!X||!X.tagName)&&(X={namespaceURI:oi,tagName:"template"});const J=ao(D.tagName),kt=ao(X.tagName);return rh[D.namespaceURI]?D.namespaceURI===wo?X.namespaceURI===Ln?J==="svg":X.namespaceURI===Oo?J==="svg"&&(kt==="annotation-xml"||Mo[kt]):!!h0[J]:D.namespaceURI===Oo?X.namespaceURI===Ln?J==="math":X.namespaceURI===wo?J==="math"&&Ao[kt]:!!d0[J]:D.namespaceURI===Ln?X.namespaceURI===wo&&!Ao[kt]||X.namespaceURI===Oo&&!Mo[kt]?!1:!d0[J]&&(jU[J]||!h0[J]):!!(Os==="application/xhtml+xml"&&rh[D.namespaceURI]):!1},cn=function(D){ps(t.removed,{element:D});try{y(D).removeChild(D)}catch{m(D)}},Co=function(D,X){try{ps(t.removed,{attribute:X.getAttributeNode(D),from:X})}catch{ps(t.removed,{attribute:null,from:X})}if(X.removeAttribute(D),D==="is"&&!it[D])if(rt||Ct)try{cn(X)}catch{}else try{X.setAttribute(D,"")}catch{}},f0=function(D){let X=null,J=null;if(Wt)D="<remove></remove>"+D;else{const Zt=Km(D,/^[\r\n\t ]+/);J=Zt&&Zt[0]}Os==="application/xhtml+xml"&&oi===Ln&&(D='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+D+"</body></html>");const kt=x?x.createHTML(D):D;if(oi===Ln)try{X=new h().parseFromString(kt,Os)}catch{}if(!X||!X.documentElement){X=_.createDocument(oi,"template",null);try{X.documentElement.innerHTML=nh?S:kt}catch{}}const ne=X.body||X.documentElement;return D&&J&&ne.insertBefore(n.createTextNode(J),ne.childNodes[0]||null),oi===Ln?B.call(X,V?"html":"body")[0]:V?X.documentElement:ne},p0=function(D){return A.call(D.ownerDocument||D,D,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},g0=function(D){return D instanceof d&&(typeof D.nodeName!="string"||typeof D.textContent!="string"||typeof D.removeChild!="function"||!(D.attributes instanceof u)||typeof D.removeAttribute!="function"||typeof D.setAttribute!="function"||typeof D.namespaceURI!="string"||typeof D.insertBefore!="function"||typeof D.hasChildNodes!="function")},m0=function(D){return typeof o=="function"&&D instanceof o};function Rn(nt,D,X){O[nt]&&so(O[nt],J=>{J.call(t,D,X,li)})}const v0=function(D){let X=null;if(Rn("beforeSanitizeElements",D,null),g0(D))return cn(D),!0;const J=qt(D.nodeName);if(Rn("uponSanitizeElement",D,{tagName:J,allowedTags:q}),D.hasChildNodes()&&!m0(D.firstElementChild)&&ae(/<[/\w]/g,D.innerHTML)&&ae(/<[/\w]/g,D.textContent)||D.nodeType===ys.progressingInstruction||z&&D.nodeType===ys.comment&&ae(/<[/\w]/g,D.data))return cn(D),!0;if(!q[J]||Z[J]){if(!Z[J]&&E0(J)&&(st.tagNameCheck instanceof RegExp&&ae(st.tagNameCheck,J)||st.tagNameCheck instanceof Function&&st.tagNameCheck(J)))return!1;if(th&&!ai[J]){const kt=y(D)||D.parentNode,ne=E(D)||D.childNodes;if(ne&&kt){const Zt=ne.length;for(let me=Zt-1;me>=0;--me){const un=g(ne[me],!0);un.__removalCount=(D.__removalCount||0)+1,kt.insertBefore(un,v(D))}}}return cn(D),!0}return D instanceof l&&!JU(D)||(J==="noscript"||J==="noembed"||J==="noframes")&&ae(/<\/no(script|embed|frames)/i,D.innerHTML)?(cn(D),!0):(C&&D.nodeType===ys.text&&(X=D.textContent,so([H,P,M],kt=>{X=gs(X,kt," ")}),D.textContent!==X&&(ps(t.removed,{element:D.cloneNode()}),D.textContent=X)),Rn("afterSanitizeElements",D,null),!1)},y0=function(D,X,J){if(Xe&&(X==="id"||X==="name")&&(J in n||J in QU))return!1;if(!(Y&&!et[X]&&ae(w,X))){if(!(vt&&ae(U,X))){if(!it[X]||et[X]){if(!(E0(D)&&(st.tagNameCheck instanceof RegExp&&ae(st.tagNameCheck,D)||st.tagNameCheck instanceof Function&&st.tagNameCheck(D))&&(st.attributeNameCheck instanceof RegExp&&ae(st.attributeNameCheck,X)||st.attributeNameCheck instanceof Function&&st.attributeNameCheck(X))||X==="is"&&st.allowCustomizedBuiltInElements&&(st.tagNameCheck instanceof RegExp&&ae(st.tagNameCheck,J)||st.tagNameCheck instanceof Function&&st.tagNameCheck(J))))return!1}else if(!eh[X]){if(!ae(j,gs(J,N,""))){if(!((X==="src"||X==="xlink:href"||X==="href")&&D!=="script"&&gk(J,"data:")===0&&o0[D])){if(!(K&&!ae($,gs(J,N,"")))){if(J)return!1}}}}}}return!0},E0=function(D){return D!=="annotation-xml"&&Km(D,F)},b0=function(D){Rn("beforeSanitizeAttributes",D,null);const{attributes:X}=D;if(!X)return;const J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:it,forceKeepAttr:void 0};let kt=X.length;for(;kt--;){const ne=X[kt],{name:Zt,namespaceURI:me,value:un}=ne,ws=qt(Zt);let ce=Zt==="value"?un:mk(un);if(J.attrName=ws,J.attrValue=ce,J.keepAttr=!0,J.forceKeepAttr=void 0,Rn("uponSanitizeAttribute",D,J),ce=J.attrValue,s0&&(ws==="id"||ws==="name")&&(Co(Zt,D),ce=qU+ce),z&&ae(/((--!?|])>)|<\/(style|title)/i,ce)){Co(Zt,D);continue}if(J.forceKeepAttr||(Co(Zt,D),!J.keepAttr))continue;if(!ut&&ae(/\/>/i,ce)){Co(Zt,D);continue}C&&so([H,P,M],_0=>{ce=gs(ce,_0," ")});const x0=qt(D.nodeName);if(y0(x0,ws,ce)){if(x&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!me)switch(f.getAttributeType(x0,ws)){case"TrustedHTML":{ce=x.createHTML(ce);break}case"TrustedScriptURL":{ce=x.createScriptURL(ce);break}}try{me?D.setAttributeNS(me,Zt,ce):D.setAttribute(Zt,ce),g0(D)?cn(D):Zm(t.removed)}catch{}}}Rn("afterSanitizeAttributes",D,null)},tB=function nt(D){let X=null;const J=p0(D);for(Rn("beforeSanitizeShadowDOM",D,null);X=J.nextNode();)Rn("uponSanitizeShadowNode",X,null),!v0(X)&&(X.content instanceof s&&nt(X.content),b0(X));Rn("afterSanitizeShadowDOM",D,null)};return t.sanitize=function(nt){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,J=null,kt=null,ne=null;if(nh=!nt,nh&&(nt="<!-->"),typeof nt!="string"&&!m0(nt))if(typeof nt.toString=="function"){if(nt=nt.toString(),typeof nt!="string")throw ms("dirty is not a string, aborting")}else throw ms("toString is not a function");if(!t.isSupported)return nt;if(At||ih(D),t.removed=[],typeof nt=="string"&&(Ts=!1),Ts){if(nt.nodeName){const un=qt(nt.nodeName);if(!q[un]||Z[un])throw ms("root node is forbidden and cannot be sanitized in-place")}}else if(nt instanceof o)X=f0("<!---->"),J=X.ownerDocument.importNode(nt,!0),J.nodeType===ys.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?X=J:X.appendChild(J);else{if(!rt&&!C&&!V&&nt.indexOf("<")===-1)return x&&ln?x.createHTML(nt):nt;if(X=f0(nt),!X)return rt?null:ln?S:""}X&&Wt&&cn(X.firstChild);const Zt=p0(Ts?nt:X);for(;kt=Zt.nextNode();)v0(kt)||(kt.content instanceof s&&tB(kt.content),b0(kt));if(Ts)return nt;if(rt){if(Ct)for(ne=L.call(X.ownerDocument);X.firstChild;)ne.appendChild(X.firstChild);else ne=X;return(it.shadowroot||it.shadowrootmode)&&(ne=k.call(r,ne,!0)),ne}let me=V?X.outerHTML:X.innerHTML;return V&&q["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&ae(rv,X.ownerDocument.doctype.name)&&(me="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
|
|
3
|
+
`)}async function ok(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await ak(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 lk(e,t={}){const{width:n,height:r}=Im(e,t),i=await ro(e,t,!0);return await ok(i,t),await Hm(i,t),nk(i,t),await wI(i,n,r)}async function Ym(e,t={}){const{width:n,height:r}=Im(e,t),i=await lk(e,t),s=await no(i),a=document.createElement("canvas"),o=a.getContext("2d"),l=t.pixelRatio||SI(),c=t.canvasWidth||n,u=t.canvasHeight||r;return a.width=c*l,a.height=u*l,t.skipAutoScale||TI(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 ck(e,t={}){return(await Ym(e,t)).toDataURL()}async function uk(e,t={}){return(await Ym(e,t)).toDataURL("image/jpeg",t.quality||1)}class Cn{constructor(t,n){this.model=t,this.services=n,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}}const hk="DONT_STYLE_ME_css_styles_verifier";class I extends Cn{constructor(t,n){super(t,n)}static getHTMLElementSize(t){return{width:t.clientWidth,height:t.clientHeight}}static getSVGElementSize(t,n={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){t.attr||(t=R(t));const r={width:0,height:0},i=h=>{h&&Object.keys(r).forEach(f=>{if(h[f]){const p=h[f],g=parseFloat(p);p&&g>r[f]&&(""+p).indexOf("%")===-1&&(r[f]=g)}})},s={width:t.attr("width"),height:t.attr("height")},a=t.node();let o,l,c,u;try{typeof a.getBBox=="function"&&(o=a.getBBox(),l={width:o.width,height:o.height})}catch(h){console.error(h)}try{typeof(a==null?void 0:a.getBoundingClientRect)=="function"&&(c=a.getBoundingClientRect(),u={width:c.width,height:c.height})}catch(h){console.error(h)}let d;if(a instanceof SVGSVGElement&&(d={width:a.clientWidth,height:a.clientHeight}),n){if(n.useAttrs&&(i(s),r.width>0&&r.height>0))return r;if(n.useClientDimensions&&(i(d),r.width>0&&r.height>0))return d;if(n.useBBox&&(i(l),r.width>0&&r.height>0))return l;if(n.useBoundingRect&&(i(u),r.width>0&&r.height>0))return u}try{const h={width:b(t.node(),"width","baseVal","value"),height:b(t.node(),"height","baseVal","value")};i(h)}catch{i(d),i(l),i(s)}return r}static appendOrSelect(t,n){const r=t.select(`${n}`);if(r.empty()){let i=n.split("#"),s,a;return i.length===2?(s=i[0],i=i[1].split("."),a=i[0]):(i=n.split("."),s=i[0]),t.append(s).attr("id",a).attr("class",i.slice(1).join(" "))}return r}init(){this.initializeID(),this.styleHolderElement(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}getElementOffset(t,n=!1){const r={left:0,top:0},i=t.getBoundingClientRect(),s=n?{left:0,top:0}:this.getHolder().getBoundingClientRect();try{r.left=i.left-s.left,r.top=i.top-s.top}catch(a){console.error(a)}return r}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=b(t,"style","prefix"),r=R(this.getHolder()).append("div").classed(`${de}--${n}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");r.append("g").attr("class",hk),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(`${de}--chart-holder`,!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=R(r);i.classed("filled",!0),uk(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var l;let a="myChart";const o=b(n,"fileDownload","fileName");typeof o=="function"?a=o("jpg"):typeof o=="string"&&(a=o),(l=t.services.files)==null||l.downloadImage(s,`${a}.jpg`),i.classed("filled",!1)})}exportToPNG(){const t=this,n=this.model.getOptions(),r=this.getHolder(),i=R(r);i.classed("filled",!0),ck(this.getMainContainer(),{quality:1,filter:s=>!(s.classList&&s.classList.contains("cds--cc--toolbar"))}).then(function(s){var l;let a="myChart";const o=b(n,"fileDownload","fileName");typeof o=="function"?a=o("png"):typeof o=="string"&&(a=o),(l=t.services.files)==null||l.downloadImage(s,`${a}.png`),i.classed("filled",!1)}).catch(function(s){console.error("oops, something went wrong!",s)})}isFullScreenMode(){return R(this.getHolder()).classed("fullscreen")}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}=I.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(I.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(T.Chart.MOUSEOVER)}).on("mouseout",()=>{var n;(n=this.services.events)==null||n.dispatchEvent(T.Chart.MOUSEOUT)})}addResizeListener(){const t=this.getHolder();if(!t)return;let n=t.clientWidth,r=t.clientHeight;const i=Ya(()=>{var a;t&&(Math.abs(n-t.clientWidth)>1||Math.abs(r-t.clientHeight)>1)&&(n=t.clientWidth,r=t.clientHeight,(a=this.services.events)==null||a.dispatchEvent(T.Chart.RESIZE))},12.5);new ResizeObserver(i).observe(t)}}class pt{constructor(t,n,r){if(this.type="",this.renderType=tt.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=n,r&&(this.configs=r,this.configs.id)){const i=b(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 r;const n=this.parent;if(this.parent=t,!(n&&n.node()===t.node())&&this.type){const i=b(this.model.getOptions(),"style","prefix");(r=this.parent)==null||r.classed(`${de}--${i}--${this.type}`,!0),n&&n.classed(`${de}--${i}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={ariaLabel:null,isPresentational:!1,withinChartClip:!1}){if(this.type){const n=b(this.model.getOptions(),"style","prefix"),r=this.id?`#${this.id}`:"",i=I.appendOrSelect(this.parent,`${this.renderType===tt.SVG?"svg":"div"}${r}.${de}--${n}--${this.type}`);if(t.ariaLabel&&i.attr("aria-label",t.ariaLabel),t.isPresentational&&i.attr("role","presentation"),t.withinChartClip){const s=this.model.get("chartClipId");if(s){const o=R(`#${s}`).select("rect");o.size()!==0&&parseFloat(o.attr("height"))>0&&i.attr("clip-path",`url(#${s})`)}}return i.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?lt({},this.model.getOptions(),this.configs.options):this.model.getOptions()}}/*! @license DOMPurify 3.2.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.1/LICENSE */const{entries:qm,setPrototypeOf:Xm,isFrozen:dk,getPrototypeOf:fk,getOwnPropertyDescriptor:pk}=Object;let{freeze:se,seal:ke,create:jm}=Object,{apply:gu,construct:mu}=typeof Reflect<"u"&&Reflect;se||(se=function(t){return t}),ke||(ke=function(t){return t}),gu||(gu=function(t,n,r){return t.apply(n,r)}),mu||(mu=function(t,n){return new t(...n)});const so=Se(Array.prototype.forEach),Zm=Se(Array.prototype.pop),ps=Se(Array.prototype.push),ao=Se(String.prototype.toLowerCase),vu=Se(String.prototype.toString),Km=Se(String.prototype.match),gs=Se(String.prototype.replace),gk=Se(String.prototype.indexOf),mk=Se(String.prototype.trim),Ye=Se(Object.prototype.hasOwnProperty),ae=Se(RegExp.prototype.test),ms=vk(TypeError);function Se(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return gu(e,t,r)}}function vk(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return mu(e,n)}}function gt(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ao;Xm&&Xm(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i=="string"){const s=n(i);s!==i&&(dk(t)||(t[r]=s),i=s)}e[i]=!0}return e}function yk(e){for(let t=0;t<e.length;t++)Ye(e,t)||(e[t]=null);return e}function fr(e){const t=jm(null);for(const[n,r]of qm(e))Ye(e,n)&&(Array.isArray(r)?t[n]=yk(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=fr(r):t[n]=r);return t}function vs(e,t){for(;e!==null;){const r=pk(e,t);if(r){if(r.get)return Se(r.get);if(typeof r.value=="function")return Se(r.value)}e=fk(e)}function n(){return null}return n}const Qm=se(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),yu=se(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Eu=se(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ek=se(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),bu=se(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),bk=se(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Jm=se(["#text"]),tv=se(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),xu=se(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ev=se(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),oo=se(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),xk=ke(/\{\{[\w\W]*|[\w\W]*\}\}/gm),_k=ke(/<%[\w\W]*|[\w\W]*%>/gm),Sk=ke(/\${[\w\W]*}/gm),Tk=ke(/^data-[\-\w.\u00B7-\uFFFF]/),Ok=ke(/^aria-[\-\w]+$/),nv=ke(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),wk=ke(/^(?:\w+script|data):/i),Mk=ke(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),rv=ke(/^html$/i),Ak=ke(/^[a-z][.\w]*(-[.\w]+)+$/i);var iv=Object.freeze({__proto__:null,ARIA_ATTR:Ok,ATTR_WHITESPACE:Mk,CUSTOM_ELEMENT:Ak,DATA_ATTR:Tk,DOCTYPE_NAME:rv,ERB_EXPR:_k,IS_ALLOWED_URI:nv,IS_SCRIPT_OR_DATA:wk,MUSTACHE_EXPR:xk,TMPLIT_EXPR:Sk});const ys={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ck=function(){return typeof window>"u"?null:window},Dk=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(r=n.getAttribute(i));const s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function sv(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ck();const t=nt=>sv(nt);if(t.version="3.2.1",t.removed=[],!e||!e.document||e.document.nodeType!==ys.document)return t.isSupported=!1,t;let{document:n}=e;const r=n,i=r.currentScript,{DocumentFragment:s,HTMLTemplateElement:a,Node:o,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:h,trustedTypes:f}=e,p=l.prototype,g=vs(p,"cloneNode"),m=vs(p,"remove"),v=vs(p,"nextSibling"),E=vs(p,"childNodes"),y=vs(p,"parentNode");if(typeof a=="function"){const nt=n.createElement("template");nt.content&&nt.content.ownerDocument&&(n=nt.content.ownerDocument)}let x,S="";const{implementation:_,createNodeIterator:A,createDocumentFragment:L,getElementsByTagName:B}=n,{importNode:k}=r;let O={};t.isSupported=typeof qm=="function"&&typeof y=="function"&&_&&_.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:H,ERB_EXPR:P,TMPLIT_EXPR:M,DATA_ATTR:w,ARIA_ATTR:U,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:F}=iv;let{IS_ALLOWED_URI:j}=iv,q=null;const ot=gt({},[...Qm,...yu,...Eu,...bu,...Jm]);let it=null;const mt=gt({},[...tv,...xu,...ev,...oo]);let st=Object.seal(jm(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Z=null,et=null,vt=!0,Y=!0,K=!1,ut=!0,C=!1,z=!0,V=!1,At=!1,Wt=!1,rt=!1,Ct=!1,ln=!1,Xe=!0,s0=!1;const qU="user-content-";let th=!0,Ts=!1,si={},ai=null;const a0=gt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let o0=null;const l0=gt({},["audio","video","img","source","image","track"]);let eh=null;const c0=gt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Oo="http://www.w3.org/1998/Math/MathML",wo="http://www.w3.org/2000/svg",Ln="http://www.w3.org/1999/xhtml";let oi=Ln,nh=!1,rh=null;const XU=gt({},[Oo,wo,Ln],vu);let Mo=gt({},["mi","mo","mn","ms","mtext"]),Ao=gt({},["annotation-xml"]);const jU=gt({},["title","style","font","a","script"]);let Os=null;const ZU=["application/xhtml+xml","text/html"],KU="text/html";let qt=null,li=null;const QU=n.createElement("form"),u0=function(D){return D instanceof RegExp||D instanceof Function},ih=function(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(li&&li===D)){if((!D||typeof D!="object")&&(D={}),D=fr(D),Os=ZU.indexOf(D.PARSER_MEDIA_TYPE)===-1?KU:D.PARSER_MEDIA_TYPE,qt=Os==="application/xhtml+xml"?vu:ao,q=Ye(D,"ALLOWED_TAGS")?gt({},D.ALLOWED_TAGS,qt):ot,it=Ye(D,"ALLOWED_ATTR")?gt({},D.ALLOWED_ATTR,qt):mt,rh=Ye(D,"ALLOWED_NAMESPACES")?gt({},D.ALLOWED_NAMESPACES,vu):XU,eh=Ye(D,"ADD_URI_SAFE_ATTR")?gt(fr(c0),D.ADD_URI_SAFE_ATTR,qt):c0,o0=Ye(D,"ADD_DATA_URI_TAGS")?gt(fr(l0),D.ADD_DATA_URI_TAGS,qt):l0,ai=Ye(D,"FORBID_CONTENTS")?gt({},D.FORBID_CONTENTS,qt):a0,Z=Ye(D,"FORBID_TAGS")?gt({},D.FORBID_TAGS,qt):{},et=Ye(D,"FORBID_ATTR")?gt({},D.FORBID_ATTR,qt):{},si=Ye(D,"USE_PROFILES")?D.USE_PROFILES:!1,vt=D.ALLOW_ARIA_ATTR!==!1,Y=D.ALLOW_DATA_ATTR!==!1,K=D.ALLOW_UNKNOWN_PROTOCOLS||!1,ut=D.ALLOW_SELF_CLOSE_IN_ATTR!==!1,C=D.SAFE_FOR_TEMPLATES||!1,z=D.SAFE_FOR_XML!==!1,V=D.WHOLE_DOCUMENT||!1,rt=D.RETURN_DOM||!1,Ct=D.RETURN_DOM_FRAGMENT||!1,ln=D.RETURN_TRUSTED_TYPE||!1,Wt=D.FORCE_BODY||!1,Xe=D.SANITIZE_DOM!==!1,s0=D.SANITIZE_NAMED_PROPS||!1,th=D.KEEP_CONTENT!==!1,Ts=D.IN_PLACE||!1,j=D.ALLOWED_URI_REGEXP||nv,oi=D.NAMESPACE||Ln,Mo=D.MATHML_TEXT_INTEGRATION_POINTS||Mo,Ao=D.HTML_INTEGRATION_POINTS||Ao,st=D.CUSTOM_ELEMENT_HANDLING||{},D.CUSTOM_ELEMENT_HANDLING&&u0(D.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(st.tagNameCheck=D.CUSTOM_ELEMENT_HANDLING.tagNameCheck),D.CUSTOM_ELEMENT_HANDLING&&u0(D.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(st.attributeNameCheck=D.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),D.CUSTOM_ELEMENT_HANDLING&&typeof D.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(st.allowCustomizedBuiltInElements=D.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),C&&(Y=!1),Ct&&(rt=!0),si&&(q=gt({},Jm),it=[],si.html===!0&&(gt(q,Qm),gt(it,tv)),si.svg===!0&&(gt(q,yu),gt(it,xu),gt(it,oo)),si.svgFilters===!0&&(gt(q,Eu),gt(it,xu),gt(it,oo)),si.mathMl===!0&&(gt(q,bu),gt(it,ev),gt(it,oo))),D.ADD_TAGS&&(q===ot&&(q=fr(q)),gt(q,D.ADD_TAGS,qt)),D.ADD_ATTR&&(it===mt&&(it=fr(it)),gt(it,D.ADD_ATTR,qt)),D.ADD_URI_SAFE_ATTR&>(eh,D.ADD_URI_SAFE_ATTR,qt),D.FORBID_CONTENTS&&(ai===a0&&(ai=fr(ai)),gt(ai,D.FORBID_CONTENTS,qt)),th&&(q["#text"]=!0),V&>(q,["html","head","body"]),q.table&&(gt(q,["tbody"]),delete Z.tbody),D.TRUSTED_TYPES_POLICY){if(typeof D.TRUSTED_TYPES_POLICY.createHTML!="function")throw ms('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof D.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ms('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=D.TRUSTED_TYPES_POLICY,S=x.createHTML("")}else x===void 0&&(x=Dk(f,i)),x!==null&&typeof S=="string"&&(S=x.createHTML(""));se&&se(D),li=D}},h0=gt({},[...yu,...Eu,...Ek]),d0=gt({},[...bu,...bk]),JU=function(D){let X=y(D);(!X||!X.tagName)&&(X={namespaceURI:oi,tagName:"template"});const J=ao(D.tagName),kt=ao(X.tagName);return rh[D.namespaceURI]?D.namespaceURI===wo?X.namespaceURI===Ln?J==="svg":X.namespaceURI===Oo?J==="svg"&&(kt==="annotation-xml"||Mo[kt]):!!h0[J]:D.namespaceURI===Oo?X.namespaceURI===Ln?J==="math":X.namespaceURI===wo?J==="math"&&Ao[kt]:!!d0[J]:D.namespaceURI===Ln?X.namespaceURI===wo&&!Ao[kt]||X.namespaceURI===Oo&&!Mo[kt]?!1:!d0[J]&&(jU[J]||!h0[J]):!!(Os==="application/xhtml+xml"&&rh[D.namespaceURI]):!1},cn=function(D){ps(t.removed,{element:D});try{y(D).removeChild(D)}catch{m(D)}},Co=function(D,X){try{ps(t.removed,{attribute:X.getAttributeNode(D),from:X})}catch{ps(t.removed,{attribute:null,from:X})}if(X.removeAttribute(D),D==="is"&&!it[D])if(rt||Ct)try{cn(X)}catch{}else try{X.setAttribute(D,"")}catch{}},f0=function(D){let X=null,J=null;if(Wt)D="<remove></remove>"+D;else{const Zt=Km(D,/^[\r\n\t ]+/);J=Zt&&Zt[0]}Os==="application/xhtml+xml"&&oi===Ln&&(D='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+D+"</body></html>");const kt=x?x.createHTML(D):D;if(oi===Ln)try{X=new h().parseFromString(kt,Os)}catch{}if(!X||!X.documentElement){X=_.createDocument(oi,"template",null);try{X.documentElement.innerHTML=nh?S:kt}catch{}}const ne=X.body||X.documentElement;return D&&J&&ne.insertBefore(n.createTextNode(J),ne.childNodes[0]||null),oi===Ln?B.call(X,V?"html":"body")[0]:V?X.documentElement:ne},p0=function(D){return A.call(D.ownerDocument||D,D,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},g0=function(D){return D instanceof d&&(typeof D.nodeName!="string"||typeof D.textContent!="string"||typeof D.removeChild!="function"||!(D.attributes instanceof u)||typeof D.removeAttribute!="function"||typeof D.setAttribute!="function"||typeof D.namespaceURI!="string"||typeof D.insertBefore!="function"||typeof D.hasChildNodes!="function")},m0=function(D){return typeof o=="function"&&D instanceof o};function Rn(nt,D,X){O[nt]&&so(O[nt],J=>{J.call(t,D,X,li)})}const v0=function(D){let X=null;if(Rn("beforeSanitizeElements",D,null),g0(D))return cn(D),!0;const J=qt(D.nodeName);if(Rn("uponSanitizeElement",D,{tagName:J,allowedTags:q}),D.hasChildNodes()&&!m0(D.firstElementChild)&&ae(/<[/\w]/g,D.innerHTML)&&ae(/<[/\w]/g,D.textContent)||D.nodeType===ys.progressingInstruction||z&&D.nodeType===ys.comment&&ae(/<[/\w]/g,D.data))return cn(D),!0;if(!q[J]||Z[J]){if(!Z[J]&&E0(J)&&(st.tagNameCheck instanceof RegExp&&ae(st.tagNameCheck,J)||st.tagNameCheck instanceof Function&&st.tagNameCheck(J)))return!1;if(th&&!ai[J]){const kt=y(D)||D.parentNode,ne=E(D)||D.childNodes;if(ne&&kt){const Zt=ne.length;for(let me=Zt-1;me>=0;--me){const un=g(ne[me],!0);un.__removalCount=(D.__removalCount||0)+1,kt.insertBefore(un,v(D))}}}return cn(D),!0}return D instanceof l&&!JU(D)||(J==="noscript"||J==="noembed"||J==="noframes")&&ae(/<\/no(script|embed|frames)/i,D.innerHTML)?(cn(D),!0):(C&&D.nodeType===ys.text&&(X=D.textContent,so([H,P,M],kt=>{X=gs(X,kt," ")}),D.textContent!==X&&(ps(t.removed,{element:D.cloneNode()}),D.textContent=X)),Rn("afterSanitizeElements",D,null),!1)},y0=function(D,X,J){if(Xe&&(X==="id"||X==="name")&&(J in n||J in QU))return!1;if(!(Y&&!et[X]&&ae(w,X))){if(!(vt&&ae(U,X))){if(!it[X]||et[X]){if(!(E0(D)&&(st.tagNameCheck instanceof RegExp&&ae(st.tagNameCheck,D)||st.tagNameCheck instanceof Function&&st.tagNameCheck(D))&&(st.attributeNameCheck instanceof RegExp&&ae(st.attributeNameCheck,X)||st.attributeNameCheck instanceof Function&&st.attributeNameCheck(X))||X==="is"&&st.allowCustomizedBuiltInElements&&(st.tagNameCheck instanceof RegExp&&ae(st.tagNameCheck,J)||st.tagNameCheck instanceof Function&&st.tagNameCheck(J))))return!1}else if(!eh[X]){if(!ae(j,gs(J,N,""))){if(!((X==="src"||X==="xlink:href"||X==="href")&&D!=="script"&&gk(J,"data:")===0&&o0[D])){if(!(K&&!ae($,gs(J,N,"")))){if(J)return!1}}}}}}return!0},E0=function(D){return D!=="annotation-xml"&&Km(D,F)},b0=function(D){Rn("beforeSanitizeAttributes",D,null);const{attributes:X}=D;if(!X)return;const J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:it,forceKeepAttr:void 0};let kt=X.length;for(;kt--;){const ne=X[kt],{name:Zt,namespaceURI:me,value:un}=ne,ws=qt(Zt);let ce=Zt==="value"?un:mk(un);if(J.attrName=ws,J.attrValue=ce,J.keepAttr=!0,J.forceKeepAttr=void 0,Rn("uponSanitizeAttribute",D,J),ce=J.attrValue,s0&&(ws==="id"||ws==="name")&&(Co(Zt,D),ce=qU+ce),z&&ae(/((--!?|])>)|<\/(style|title)/i,ce)){Co(Zt,D);continue}if(J.forceKeepAttr||(Co(Zt,D),!J.keepAttr))continue;if(!ut&&ae(/\/>/i,ce)){Co(Zt,D);continue}C&&so([H,P,M],_0=>{ce=gs(ce,_0," ")});const x0=qt(D.nodeName);if(y0(x0,ws,ce)){if(x&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!me)switch(f.getAttributeType(x0,ws)){case"TrustedHTML":{ce=x.createHTML(ce);break}case"TrustedScriptURL":{ce=x.createScriptURL(ce);break}}try{me?D.setAttributeNS(me,Zt,ce):D.setAttribute(Zt,ce),g0(D)?cn(D):Zm(t.removed)}catch{}}}Rn("afterSanitizeAttributes",D,null)},tB=function nt(D){let X=null;const J=p0(D);for(Rn("beforeSanitizeShadowDOM",D,null);X=J.nextNode();)Rn("uponSanitizeShadowNode",X,null),!v0(X)&&(X.content instanceof s&&nt(X.content),b0(X));Rn("afterSanitizeShadowDOM",D,null)};return t.sanitize=function(nt){let D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,J=null,kt=null,ne=null;if(nh=!nt,nh&&(nt="<!-->"),typeof nt!="string"&&!m0(nt))if(typeof nt.toString=="function"){if(nt=nt.toString(),typeof nt!="string")throw ms("dirty is not a string, aborting")}else throw ms("toString is not a function");if(!t.isSupported)return nt;if(At||ih(D),t.removed=[],typeof nt=="string"&&(Ts=!1),Ts){if(nt.nodeName){const un=qt(nt.nodeName);if(!q[un]||Z[un])throw ms("root node is forbidden and cannot be sanitized in-place")}}else if(nt instanceof o)X=f0("<!---->"),J=X.ownerDocument.importNode(nt,!0),J.nodeType===ys.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?X=J:X.appendChild(J);else{if(!rt&&!C&&!V&&nt.indexOf("<")===-1)return x&&ln?x.createHTML(nt):nt;if(X=f0(nt),!X)return rt?null:ln?S:""}X&&Wt&&cn(X.firstChild);const Zt=p0(Ts?nt:X);for(;kt=Zt.nextNode();)v0(kt)||(kt.content instanceof s&&tB(kt.content),b0(kt));if(Ts)return nt;if(rt){if(Ct)for(ne=L.call(X.ownerDocument);X.firstChild;)ne.appendChild(X.firstChild);else ne=X;return(it.shadowroot||it.shadowrootmode)&&(ne=k.call(r,ne,!0)),ne}let me=V?X.outerHTML:X.innerHTML;return V&&q["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&ae(rv,X.ownerDocument.doctype.name)&&(me="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
|
|
4
4
|
`+me),C&&so([H,P,M],un=>{me=gs(me,un," ")}),x&&ln?x.createHTML(me):me},t.setConfig=function(){let nt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ih(nt),At=!0},t.clearConfig=function(){li=null,At=!1},t.isValidAttribute=function(nt,D,X){li||ih({});const J=qt(nt),kt=qt(D);return y0(J,kt,X)},t.addHook=function(nt,D){typeof D=="function"&&(O[nt]=O[nt]||[],ps(O[nt],D))},t.removeHook=function(nt){if(O[nt])return Zm(O[nt])},t.removeHooks=function(nt){O[nt]&&(O[nt]=[])},t.removeAllHooks=function(){O={}},t}var _u=sv();const lo=e=>_u.sanitize(e,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),Lk=e=>_u.sanitize(e,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),an=e=>_u.sanitize(e,{ALLOWED_TAGS:[]}),So=class So extends pt{constructor(){super(...arguments),this.type="toolbar",this.renderType=tt.HTML}init(){const t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(T.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)}),this.services.events.addEventListener(T.Toolbar.HIDE_OVERFLOW_MENU,()=>{document.body.removeEventListener("click",t)})}render(t=!0){const n=this.getComponentContainer({ariaLabel:"toolbar"}).attr("role","group");if(b(this.getOptions(),"data","loading"))n.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=n.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));const{buttonList:i,overflowMenuItemList:s}=this.getControlConfigs();s&&i.push(this.getOverflowButtonConfig());const a=n.selectAll("div.toolbar-control").data(i,c=>c.id);a.exit().remove();const o=a.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu"),l=this;o.merge(a).classed("disabled",c=>c.shouldBeDisabled()).attr("role","button").attr("aria-disabled",c=>c.shouldBeDisabled()).attr("aria-label",c=>c.title).html(c=>`
|
|
5
5
|
<button
|
|
6
6
|
class="cds--overflow-menu__trigger cds--overflow-menu__trigger"
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),
|
|
18
18
|
textarea:not([disabled]):not([tabindex='-1']),
|
|
19
19
|
iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]
|
|
20
|
+
`,selectorFocusable:`
|
|
21
|
+
a[href], area[href], input:not([disabled]),
|
|
22
|
+
button:not([disabled]),select:not([disabled]),
|
|
23
|
+
textarea:not([disabled]),
|
|
24
|
+
iframe, object, embed, *[tabindex], *[contenteditable=true]
|
|
20
25
|
`},Su=Rk;function Ik(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function kk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pk(e){return Uk(e)||Fk(e)||$k(e)||Nk()}function Nk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
21
26
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $k(e,t){if(e){if(typeof e=="string")return Tu(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tu(e,t)}}function Fk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Uk(e){if(Array.isArray(e))return Tu(e)}function Tu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function av(e){return e.reduce(function(t,n){return Array.isArray(n)?t.push.apply(t,Pk(av(n))):t.push(n),t},[])}function Bk(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return av(t).reduce(function(r,i){return i(r)},function(){function r(){kk(this,r)}return Ik(r)}())}function Ou(e){"@babel/helpers - typeof";return Ou=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},Ou(e)}function Hk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ov(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gk(e,t,n){return t&&ov(e.prototype,t),n&&ov(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wu(e,t)}function wu(e,t){return wu=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},wu(e,t)}function zk(e){var t=Yk();return function(){var r=co(e),i;if(t){var s=co(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return Wk(this,i)}}function Wk(e,t){if(t&&(Ou(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lv(e)}function lv(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function co(e){return co=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},co(e)}function qk(e){var t=function(n){Vk(i,n);var r=zk(i);function i(s){var a,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Hk(this,i),a=r.call(this,s,o),a.children=[],!s||s.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return a.element=s,a.options=Object.assign(Object.create(a.constructor.options),o),a.constructor.components.set(a.element,lv(a)),a}return Gk(i,[{key:"release",value:function(){for(var a=this.children.pop();a;a=this.children.pop())a.release();return this.constructor.components.delete(this.element),null}}],[{key:"create",value:function(a,o){return this.components.get(a)||new this(a,o)}}]),i}(e);return t}function Mu(e){"@babel/helpers - typeof";return Mu=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},Mu(e)}function Xk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zk(e,t,n){return t&&jk(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uo(){return typeof Reflect<"u"&&Reflect.get?uo=Reflect.get:uo=function(t,n,r){var i=Kk(t,n);if(i){var s=Object.getOwnPropertyDescriptor(i,n);return s.get?s.get.call(arguments.length<3?t:r):s.value}},uo.apply(this,arguments)}function Kk(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Jr(e),e!==null););return e}function Qk(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Au(e,t)}function Au(e,t){return Au=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Au(e,t)}function Jk(e){var t=n2();return function(){var r=Jr(e),i;if(t){var s=Jr(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return t2(this,i)}}function t2(e,t){if(t&&(Mu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return e2(e)}function e2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Jr(e){return Jr=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Jr(e)}function r2(e){var t=function(n){Qk(i,n);var r=Jk(i);function i(){var s;Xk(this,i);for(var a=arguments.length,o=new Array(a),l=0;l<a;l++)o[l]=arguments[l];return s=r.call.apply(r,[this].concat(o)),s.handles=new Set,s}return Zk(i,[{key:"manage",value:function(a){return this.handles.add(a),a}},{key:"unmanage",value:function(a){return this.handles.delete(a),a}},{key:"release",value:function(){var a=this;return this.handles.forEach(function(o){o.release(),a.handles.delete(o)}),uo(Jr(i.prototype),"release",this).call(this)}}]),i}(e);return t}function Es(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.addEventListener.apply(e,n),{release:function(){return e.removeEventListener.apply(e,n),null}}}function Cu(e){"@babel/helpers - typeof";return Cu=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},Cu(e)}function i2(e){return l2(e)||o2(e)||a2(e)||s2()}function s2(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
22
27
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a2(e,t){if(e){if(typeof e=="string")return Du(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Du(e,t)}}function o2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function l2(e){if(Array.isArray(e))return Du(e)}function Du(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h2(e,t,n){return t&&u2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function d2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lu(e,t)}function Lu(e,t){return Lu=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Lu(e,t)}function f2(e){var t=m2();return function(){var r=ho(e),i;if(t){var s=ho(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return p2(this,i)}}function p2(e,t){if(t&&(Cu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return g2(e)}function g2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ho(e){return ho=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ho(e)}function v2(e){var t=function(n){d2(i,n);var r=f2(i);function i(){return c2(this,i),r.apply(this,arguments)}return h2(i,[{key:"_changeState",value:function(){throw new Error("_changeState() should be overridden to perform actual change in state.")}},{key:"changeState",value:function(){for(var a=this,o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];var u=typeof l[0]=="string"?l.shift():void 0,d=Object(l[0])===l[0]&&typeof l[0]!="function"?l.shift():void 0,h=typeof l[0]=="function"?l.shift():void 0;if(typeof this.shouldStateBeChanged=="function"&&!this.shouldStateBeChanged(u,d)){h&&h(null,!0);return}var f={group:d&&d.group,state:u},p=[f.group,u].filter(Boolean).join("-").split("-").map(function(x){return x[0].toUpperCase()+x.substr(1)}).join(""),g=new CustomEvent(this.options["eventBefore".concat(p)],{bubbles:!0,cancelable:!0,detail:d}),m=d&&d.delegatorNode||this.element,v=!m.dispatchEvent(g);if(v){if(h){var E=new Error("Changing state (".concat(JSON.stringify(f),") has been canceled."));E.canceled=!0,h(E)}}else{var y=[u,d].filter(Boolean);this._changeState.apply(this,i2(y).concat([function(){m.dispatchEvent(new CustomEvent(a.options["eventAfter".concat(p)],{bubbles:!0,cancelable:!0,detail:d})),h&&h()}]))}}}]),i}(e);return t}function Ru(e,t){var n=e.target,r=e.currentTarget;if(typeof n.matches=="function"){if(n.matches(t))return n;if(n.matches("".concat(t," *"))){var i=n.closest(t);if((r.nodeType===Node.DOCUMENT_NODE?r.documentElement:r).contains(i))return i}}}function cv(e){if(!e||typeof e=="function")return{launchingElement:null,launchingEvent:null};var t=e.delegateTarget||e.currentTarget||e,n=e.currentTarget&&e;if(t&&!t.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:t,launchingEvent:n}}function Iu(e){"@babel/helpers - typeof";return Iu=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},Iu(e)}function y2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b2(e,t,n){return t&&E2(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function x2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ku(e,t)}function ku(e,t){return ku=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ku(e,t)}function _2(e){var t=O2();return function(){var r=fo(e),i;if(t){var s=fo(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return S2(this,i)}}function S2(e,t){if(t&&(Iu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T2(e)}function T2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fo(e){return fo=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},fo(e)}function w2(e){var t=function(n){x2(i,n);var r=_2(i);function i(){return y2(this,i),r.apply(this,arguments)}return b2(i,[{key:"show",value:function(a,o){(!a||typeof a=="function")&&(o=a),this.changeState("shown",cv(a),o)}},{key:"hide",value:function(a,o){(!a||typeof a=="function")&&(o=a),this.changeState("hidden",cv(a),o)}}]),i}(e);return t}var M2=[v2,w2];function A2(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function C2(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):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}function Pu(e){"@babel/helpers - typeof";return Pu=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},Pu(e)}function D2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R2(e,t,n){return n&&L2(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function I2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nu(e,t)}function Nu(e,t){return Nu=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Nu(e,t)}function k2(e){var t=$2();return function(){var r=po(e),i;if(t){var s=po(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return P2(this,i)}}function P2(e,t){if(t&&(Pu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N2(e)}function N2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function po(e){return po=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},po(e)}function F2(e){var t=function(n){I2(i,n);var r=k2(i);function i(){return D2(this,i),r.apply(this,arguments)}return R2(i,null,[{key:"init",value:function(){var a=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:document,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=Object.assign(Object.create(this.options),l);if(!o||o.nodeType!==Node.ELEMENT_NODE&&o.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(o.nodeType===Node.ELEMENT_NODE&&o.matches(c.selectorInit))this.create(o,l);else{var u=c.initEventNames.map(function(d){return Es(o,d,function(h){var f=Ru(h,"[".concat(c.attribInitTarget,"]"));if(f){h.delegateTarget=f;var p=f.ownerDocument.querySelectorAll(f.getAttribute(c.attribInitTarget));if(p.length>1)throw new Error("Target widget must be unique.");if(p.length===1){f.tagName==="A"&&h.preventDefault();var g=a.create(p[0],l);typeof g.createdByLauncher=="function"&&g.createdByLauncher(h)}}})});return{release:function(){for(var h=u.pop();h;h=u.pop())h.release()}}}return""}}]),i.forLazyInit=!0,i}(e);return t}function $u(e){"@babel/helpers - typeof";return $u=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},$u(e)}function U2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function B2(e,t,n){return t&&uv(e.prototype,t),n&&uv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function H2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fu(e,t)}function Fu(e,t){return Fu=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Fu(e,t)}function G2(e){var t=W2();return function(){var r=go(e),i;if(t){var s=go(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return V2(this,i)}}function V2(e,t){if(t&&($u(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return z2(e)}function z2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function go(e){return go=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},go(e)}var Y2=function(e){H2(n,e);var t=G2(n);function n(r,i){var s;return U2(this,n),s=t.call(this,r,i),s._handleFocusinListener=void 0,s._handleKeydownListener=void 0,s._handleFocusin=function(a){var o=s.element.querySelector(s.options.selectorModalContainer)||s.element;s.element.classList.contains(s.options.classVisible)&&!o.contains(a.target)&&s.options.selectorsFloatingMenus.every(function(l){return!Ru(a,l)})&&s.element.querySelector(Su.selectorTabbable).focus()},s._hookCloseActions(),s}return B2(n,[{key:"createdByLauncher",value:function(i){this.show(i)}},{key:"shouldStateBeChanged",value:function(i){return i==="shown"?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(i,s,a){var o=this,l,c=function(){if(l&&(l=o.unmanage(l).release()),i==="shown"&&o.element.offsetWidth>0&&o.element.offsetHeight>0){o.previouslyFocusedNode=o.element.ownerDocument.activeElement;var f=o.element.querySelector(o.options.selectorPrimaryFocus)||o.element.querySelector(Su.selectorTabbable);f.focus()}a()};if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),i==="shown"){var u="onfocusin"in this.element.ownerDocument.defaultView,d=u?"focusin":"focus";this._handleFocusinListener=this.manage(Es(this.element.ownerDocument,d,this._handleFocusin,!u))}i==="hidden"?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):i==="shown"&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),l=this.manage(Es(this.element,"transitionend",c))}},{key:"_hookCloseActions",value:function(){var i=this;this.manage(Es(this.element,"click",function(s){var a=Ru(s,i.options.selectorModalClose);a&&(s.delegateTarget=a),(a||s.target===i.element)&&i.hide(s)})),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(Es(this.element.ownerDocument.body,"keydown",function(s){s.which===27&&i.shouldStateBeChanged("hidden")&&(s.stopPropagation(),i.hide(s))}))}}],[{key:"options",get:function(){var i=Su.prefix;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(i,"--overflow-menu-options"),".".concat(i,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(i,"--modal-container"),classVisible:"is-visible",classBody:"".concat(i,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}]),n.components=new WeakMap,n}(Bk(qk,F2,M2,r2));class mo extends pt{constructor(t,n,r){super(t,n,r),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{const i=this.services.domUtils.getChartID();this.modal.attr("data-modal",!0).attr("class","cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby",`${i}__modal-title`).attr("aria-describedby",`${i}__modal-description`).attr("tabindex",-1),this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",()=>this.model.exportToCSV()),Y2.create(this.modal.node()).show(),document.addEventListener("modal-hidden",this.handleHideModal)},this.handleHideModal=()=>{this.modal.attr("role",null).attr("aria-modal",null).attr("aria-labelledby",null).attr("aria-describedby",null).attr("tabindex",null),document.removeEventListener("modal-hidden",this.handleHideModal)},this.init()}addEventListeners(){this.services.events.addEventListener(T.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(T.Modal.SHOW,this.handleShowModal)}getModalHTML(){const t=this.services.domUtils.getChartID(),n=this.model.getOptions(),{title:r,downloadAsCSV:i}=b(n,"locale","translations","tabularRep"),s=b(n,"style","prefix"),a=this.model.getTabularDataArray();return`
|
|
@@ -56,7 +61,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
56
61
|
<div class="${de}--${s}-modal-footer-spacer"></div>
|
|
57
62
|
<button class="cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${i}</button>
|
|
58
63
|
</div>
|
|
59
|
-
</div>`}render(t=!1){const n=this.model.getOptions();if(!this.isEventListenerAdded){const r=R(this.services.domUtils.getHolder()),i=b(n,"style","prefix");this.modal=I.appendOrSelect(r,`div.${de}--${i}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class bs extends pt{constructor(){super(...arguments),this.type="title",this.renderType=tt.HTML}render(t=!1){const n=this.getComponentContainer(),r=b(this.getOptions(),"title"),i=n.selectAll("p.title").data([r]);if(i.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(i).html(s=>an(s)),i.node()&&i.node().offsetWidth<i.node().scrollWidth){const s=this;i.on("mouseover",function(a){s.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:i,content:i.text()})}).on("mousemove",function(a){s.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("mouseout",function(){s.services.events.dispatchEvent(T.Tooltip.HIDE)})}i.exit().remove()}truncateTitle(t,n){if(n<=0)return;const r=t.text();if(t.node().getComputedTextLength()>n){t.append("tspan").text("...");const i=I.appendOrSelect(t,"tspan").node().getComputedTextLength(),s=t.text(),a=this.getSubstringIndex(t.node(),0,s.length-1,n-i);t.html(s.substring(0,a-1)).append("tspan").text("...");const o=this;t.on("mouseover",function(l){o.services.events.dispatchEvent(T.Tooltip.SHOW,{event:l,hoveredElement:t,content:r})}).on("mousemove",function(l){o.services.events.dispatchEvent(T.Tooltip.MOVE,{event:l})}).on("mouseout",function(){o.services.events.dispatchEvent(T.Tooltip.HIDE)})}}getMaxTitleWidth(){return I.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,n,r,i){const s=Math.floor((r+n)/2);return t.getSubStringLength(0,s)>i?this.getSubstringIndex(t,n,s,i):t.getSubStringLength(0,s)<i?t.getSubStringLength(0,s+1)>i?s:this.getSubstringIndex(t,s,r,i):s}}var ht=(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))(ht||{});class Uu extends pt{constructor(){super(...arguments),this.type="legend",this.renderType=tt.HTML}render(t=!1){const n=this.getOptions(),r=b(n,"legend"),i=b(r,"alignment"),s=b(n,"legend","orientation");let a=this.model.getDataGroups();const{DISABLED:o}=Pt.items.status,l=a.some(E=>E.status===o),c=b(r,"order"),u=this.getComponentContainer().classed("center-aligned",i===Ht.CENTER).classed("right-aligned",i===Ht.RIGHT).classed(s,!0).classed("has-deactivated-items",l).attr("role",ht.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");c&&(a=this.sortDataGroups(a,c));const d=u.selectAll("div.legend-item").data(a,E=>E.name),h=d.enter().append("div").attr("class","legend-item");h.merge(u.selectAll("div.legend-item")).classed("active",function(E){return E.status===Pt.items.status.ACTIVE});const f=b(this.getOptions(),"legend","clickable");u.classed("clickable",f&&a.length>1);const p=Pt.checkbox.radius,g=h.append("div").classed("checkbox",!0),m=g.merge(d.select("div.checkbox")).attr("role",ht.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-labelledby",(E,y)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${y}-title`)).attr("aria-checked",({status:E})=>E===Pt.items.status.ACTIVE).attr("width",p*2).attr("height",p*2).attr("class",E=>this.model.getColorClassName({classNameTypes:[at.BACKGROUND],dataGroupName:E.name,originalClassName:"checkbox"})).style("background",E=>E.status===Pt.items.status.ACTIVE?this.model.getFillColor(E.name)||this.model.getStrokeColor(E.name):null).classed("active",function(E){return E.status===Pt.items.status.ACTIVE});g.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),h.append("p").merge(d.select("p"));const v=b(n,"legend","additionalItems");if(v&&a.length){const E=this,y=u.selectAll("div.additional-item").data(v);y.exit().remove();const x=y.enter().append("div").merge(y).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",(A,L)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+L}-title`));x.selectAll("*").remove();let S,_=1;x.append("svg").classed("icon",!0).each(function(A){const L=R(this);!S||S!=A.type?(S=A.type,_=1):_++,E.addAdditionalItem(L,A,_)}),x.append("p").merge(x.select("p")),this.truncateLegendText()}d.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),f&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,n){if(t.sort((r,i)=>n.indexOf(r.name)-n.indexOf(i.name)),n.length<t.length){const r=t.length-n.length;return t.slice(r).concat(t.slice(0,r))}return t}addAdditionalItem(t,n,r){const{width:i,height:s}=Pt.area;if(n.type===Vt.RADIUS?t.style("width",`${s}px`).style("height",`${s}px`):t.style("width",`${i}px`).style("height",`${s}px`),n.type===Vt.RADIUS){const{iconData:a,fill:o,stroke:l}=Pt.radius;t.attr("fill","none").selectAll("circle").data(a).enter().append("circle").classed("radius",!0).attr("role",ht.IMG).attr("aria-label","radius").attr("cx",u=>u.cx).attr("cy",u=>u.cy).attr("r",u=>u.r).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l)}else if(n.type===Vt.LINE){const a=Pt.line;t.select("line.line").empty()&&t.append("line").classed(`line-${r}`,!0).attr("role",ht.IMG).attr("aria-label","line").attr("x1",0).attr("y1",a.yPosition).attr("x2",i).attr("y2",a.yPosition).style("stroke",n.stroke?n.stroke:a.stroke).style("stroke-width",a.strokeWidth)}else if(n.type===Vt.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${r}`,!0).attr("role",ht.IMG).attr("aria-label","area").attr("width",i).attr("height",s).style("fill",r>3&&!n.fill?Pt.area.fill:n.fill).style("stroke",n.stroke);else if(n.type===Vt.SIZE){const{iconData:a,fill:o,stroke:l}=Pt.size;t.attr("fill","none").attr("role",ht.IMG).attr("aria-label","size").selectAll("rect").data(a).enter().append("rect").classed("size",!0).attr("width",u=>u.width).attr("height",u=>u.height).attr("y",()=>0).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l).style("stroke-width",1)}else if(n.type===Vt.QUARTILE){const{iconData:a}=Pt.quartile;t.selectAll("rect").attr("role",ht.IMG).attr("aria-label","quartile").data(a).enter().append("rect").attr("class",(l,c)=>`quartile-${c===0?"wrapper":"line"}`).attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height)}else if(n.type===Vt.ZOOM){const{iconData:a,color:o}=b(Pt,"zoom"),l=t.attr("role",ht.IMG).attr("aria-label","zoom").selectAll("g.icon").data(a).enter();l.append("g").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",()=>n.color?n.color:o),l.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",()=>n.color?n.color:o)}}truncateLegendText(){const t=this.getComponentContainer(),n=b(this.getOptions(),"legend","truncation"),r=b(n,"type"),i=b(n,"threshold"),s=b(n,"numCharacter"),a=t.selectAll("div.legend-item p");a.attr("id",function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")}),r!==Le.NONE?a.html(function(o){const l=an(o.name);return l.length>i&&l.length!==s?ls(l,r,s):l}):a.html(o=>an(o.name))}addEventListeners(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=b(r,"legend"),s=b(i,"truncation");n.selectAll("div.legend-item").on("mouseover",function(a){t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:R(this)});const o=R(this);o.select("div.checkbox").classed("hovered",!0);const l=o.datum();l.name.length>s.threshold&&s.numCharacter<l.name.length&&s.type!==Le.NONE&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})}).on("mousemove",function(a){R(this).datum().name.length>s.threshold&&s.type!==Le.NONE&&t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("click",function(){t.services.events.dispatchEvent(T.Legend.ITEM_CLICK,{clickedElement:R(this)});const o=R(this).datum();t.model.toggleDataLabel(o.name)}).on("mouseout",function(){const a=R(this);a.select("div.checkbox").classed("hovered",!1),a.datum().name.length>s.threshold&&s.type!==Le.NONE&&t.services.events.dispatchEvent(T.Tooltip.HIDE),t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:a})}),n.selectAll("div.legend-item div.checkbox").on("keyup",function(a){a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:R(this)})}),n.selectAll("div.legend-item div.checkbox").on("keydown",function(a,o){a.key&&a.key===" "?(a.preventDefault(),t.model.toggleDataLabel(o.name)):a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:R(this)})}),n.selectAll("g.additional-item").on("mouseover",function(a){const o=R(this),l=o.datum();l.name.length>s.threshold&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})})}}class hv extends pt{constructor(t,n,r){super(t,n,r),this.type="chart-clip",this.renderType=tt.SVG,this.chartClipId="chart-clip-id-"+Math.floor(Math.random()*99999999999),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){const t=this.parent,{cartesianScales:n}=this.services;if(!n)throw new Error("Service cartesianScales was undefined");const r=n.getMainXScale(),i=n.getMainYScale(),[s,a]=r.range(),[o,l]=i.range();if(!t)throw new Error("svg is undefined");this.chartClipPath=I.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const c=I.appendOrSelect(this.chartClipPath,`rect.${this.type}`);a-s>0&&c.attr("x",s).attr("y",l).attr("width",a-s).attr("height",o-l),this.chartClipPath.merge(c).lower()}}class q2 extends hv{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(Math.random()*99999999999)}createClipPath(){const t=this.parent,{width:n,height:r}=I.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=I.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const i=I.appendOrSelect(this.chartClipPath,`rect.${this.type}`);i.attr("x",0).attr("y",0).attr("width",n).attr("height",r),this.chartClipPath.merge(i).lower()}}var ti,Ut;(function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"})(Ut||(Ut={}));var dv=(ti={},ti[Ut.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},ti[Ut.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},ti[Ut.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ti[Ut.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ti),fv=typeof window<"u"?window:{innerHeight:0,innerWidth:0},vo=function(){function e(t){t===void 0&&(t={}),this.positions=dv,this.positions=Object.assign({},dv,t)}return e.prototype.getRelativeOffset=function(t){for(var n={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&getComputedStyle(t.offsetParent).position==="static";)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;return n},e.prototype.getAbsoluteOffset=function(t){for(var n=t,r={top:0,left:0};n.offsetParent;){var i=getComputedStyle(n.offsetParent);i.position==="static"&&i.marginLeft&&i.marginTop&&(parseInt(i.marginTop,10)&&(r.top+=parseInt(i.marginTop,10)),parseInt(i.marginLeft,10)&&(r.left+=parseInt(i.marginLeft,10))),n=n.offsetParent}var s=t.getBoundingClientRect(),a=document.body.getBoundingClientRect();return{top:s.top-a.top+r.top,left:s.left-a.left+r.left}},e.prototype.findRelative=function(t,n,r){var i=this.getRelativeOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findAbsolute=function(t,n,r){var i=this.getAbsoluteOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findPosition=function(t,n,r,i){i===void 0&&(i=this.getAbsoluteOffset.bind(this));var s=i(t),a=t.getBoundingClientRect();return this.calculatePosition(s,a,n,r)},e.prototype.findPositionAt=function(t,n,r){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},n,r)},e.prototype.getPlacementBox=function(t,n){var r=t.offsetHeight+n.top,i=t.offsetWidth+n.left;return{top:n.top,bottom:r,left:n.left,right:i}},e.prototype.addOffset=function(t,n,r){return n===void 0&&(n=0),r===void 0&&(r=0),Object.assign({},t,{top:t.top+n,left:t.left+r})},e.prototype.setElement=function(t,n){t.style.top=n.top+"px",t.style.left=n.left+"px"},e.prototype.findBestPlacement=function(t,n,r,i,s){var a=this;i===void 0&&(i=this.defaultContainerFunction.bind(this)),s===void 0&&(s=this.findPosition.bind(this));var o=r.map(function(l){var c=s(t,n,l),u=a.getPlacementBox(n,c),d=0,h=0,f=i();u.top<f.top?d=f.top-u.top:u.bottom>f.height&&(d=u.bottom-f.height),u.left<f.left?h=f.left-u.left:u.right>f.width&&(h=u.right-f.width),d&&!h?h=1:h&&!d&&(d=1);var p=n.offsetHeight*n.offsetWidth,g=d*h,m=p-g,v=m/p;return{placement:l,weight:v}});return o.sort(function(l,c){return c.weight-l.weight}),o[0].placement},e.prototype.findBestPlacementAt=function(t,n,r,i){var s=this;i===void 0&&(i=this.defaultContainerFunction.bind(this));var a=function(o,l,c){return s.findPositionAt(t,l,c)};return this.findBestPlacement(null,n,r,i,a)},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:fv.innerHeight,width:fv.innerWidth}},e.prototype.calculatePosition=function(t,n,r,i){return this.positions[i]?this.positions[i](t,r,n):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new vo;class Bu extends pt{constructor(t,n,r){super(t,n,r),this.type="tooltip",this.renderType=tt.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new vo,this.handleShowTooltip=i=>{const s=i.detail.data||i.detail.items,a=R(i.detail.event.target).datum();let o;const l=this.formatItems(this.getItems(i));i.detail.content?o=`<div class="title-tooltip"><p>${lo(i.detail.content)}</p></div>`:o=lo(this.getTooltipHTML(l));const c=I.appendOrSelect(this.tooltip,"div.content-box");if(b(this.getOptions(),"tooltip","customHTML"))if(i.detail.content){const u=`<div class="title-tooltip"><p>${lo(i.detail.content)}</p></div>`;c.html(u)}else c.html(`<div class="title-tooltip"><p>${lo(this.model.getOptions().tooltip.customHTML(s,o,a))}</p></div>`);else c.html(o);c.selectAll(".datapoint-tooltip").each(function(u,d){const h=l[d];l[d]&&l[d].color&&R(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",h.color)}),this.positionTooltip(i),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1),this.lastTriggeredEventType=i.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(T.Tooltip.MOVE,t=>{this.lastTriggeredEventType!==T.Toolbar.SHOW_TOOLTIP&&this.tooltip.classed("hidden")===!1&&this.positionTooltip(t)}),this.services.events.addEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(T.Tooltip.MOVE,null),this.services.events.removeEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){const n=this.getOptions(),r=b(n,"tooltip","truncation","type"),i=b(n,"tooltip","truncation","threshold"),s=b(n,"tooltip","truncation","numCharacter");return r!==Le.NONE?t.map(a=>{const o=a.labelIcon?12:0;return a.value=a.value?this.valueFormatter(a.value,a.label):a.value,a.label&&a.label.length+o>i&&(a.label=ls(a.label,r,s)),a.value&&a.value.length>i&&(a.value=ls(a.value,r,s)),a}):t.map(a=>(a.value=a.value?this.valueFormatter(a.value,a.label):a.value,a))}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map(n=>`<li>
|
|
64
|
+
</div>`}render(t=!1){const n=this.model.getOptions();if(!this.isEventListenerAdded){const r=R(this.services.domUtils.getHolder()),i=b(n,"style","prefix");this.modal=I.appendOrSelect(r,`div.${de}--${i}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class bs extends pt{constructor(){super(...arguments),this.type="title",this.renderType=tt.HTML}render(t=!1){const n=this.getComponentContainer(),r=b(this.getOptions(),"title"),i=n.selectAll("p.title").data([r]);if(i.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(i).html(s=>an(s)),i.node()&&i.node().offsetWidth<i.node().scrollWidth){const s=this;i.on("mouseover",function(a){s.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:i,content:i.text()})}).on("mousemove",function(a){s.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("mouseout",function(){s.services.events.dispatchEvent(T.Tooltip.HIDE)})}i.exit().remove()}truncateTitle(t,n){if(n<=0)return;const r=t.text();if(t.node().getComputedTextLength()>n){t.append("tspan").text("...");const i=I.appendOrSelect(t,"tspan").node().getComputedTextLength(),s=t.text(),a=this.getSubstringIndex(t.node(),0,s.length-1,n-i);t.html(s.substring(0,a-1)).append("tspan").text("...");const o=this;t.on("mouseover",function(l){o.services.events.dispatchEvent(T.Tooltip.SHOW,{event:l,hoveredElement:t,content:r})}).on("mousemove",function(l){o.services.events.dispatchEvent(T.Tooltip.MOVE,{event:l})}).on("mouseout",function(){o.services.events.dispatchEvent(T.Tooltip.HIDE)})}}getMaxTitleWidth(){return I.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,n,r,i){const s=Math.floor((r+n)/2);return t.getSubStringLength(0,s)>i?this.getSubstringIndex(t,n,s,i):t.getSubStringLength(0,s)<i?t.getSubStringLength(0,s+1)>i?s:this.getSubstringIndex(t,s,r,i):s}}var ht=(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))(ht||{});class Uu extends pt{constructor(){super(...arguments),this.type="legend",this.renderType=tt.HTML}render(t=!1){const n=this.getOptions(),r=b(n,"legend"),i=b(r,"alignment"),s=b(n,"legend","orientation");let a=this.model.getDataGroups();const{DISABLED:o}=Pt.items.status,l=a.some(E=>E.status===o),c=b(r,"order"),u=this.getComponentContainer().classed("center-aligned",i===Ht.CENTER).classed("right-aligned",i===Ht.RIGHT).classed(s,!0).classed("has-deactivated-items",l).attr("role",ht.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");c&&(a=this.sortDataGroups(a,c));const d=u.selectAll("div.legend-item").data(a,E=>E.name),h=d.enter().append("div").attr("class","legend-item");h.merge(u.selectAll("div.legend-item")).classed("active",function(E){return E.status===Pt.items.status.ACTIVE});const f=b(this.getOptions(),"legend","clickable");u.classed("clickable",f&&a.length>1);const p=Pt.checkbox.radius,g=h.append("div").classed("checkbox",!0),m=g.merge(d.select("div.checkbox")).attr("role",ht.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-labelledby",(E,y)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${y}-title`)).attr("aria-checked",({status:E})=>E===Pt.items.status.ACTIVE).attr("width",p*2).attr("height",p*2).attr("class",E=>this.model.getColorClassName({classNameTypes:[at.BACKGROUND],dataGroupName:E.name,originalClassName:"checkbox"})).style("background",E=>E.status===Pt.items.status.ACTIVE?this.model.getFillColor(E.name)||this.model.getStrokeColor(E.name):null).classed("active",function(E){return E.status===Pt.items.status.ACTIVE});g.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),h.append("p").merge(d.select("p"));const v=b(n,"legend","additionalItems");if(v&&a.length){const E=this,y=u.selectAll("div.additional-item").data(v);y.exit().remove();const x=y.enter().append("div").merge(y).classed("legend-item",!0).classed("additional",!0).attr("aria-labelledby",(A,L)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${m.size()+L}-title`));x.selectAll("*").remove();let S,_=1;x.append("svg").classed("icon",!0).each(function(A){const L=R(this);!S||S!=A.type?(S=A.type,_=1):_++,E.addAdditionalItem(L,A,_)}),x.append("p").merge(x.select("p")),this.truncateLegendText()}d.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),f&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,n){if(t.sort((r,i)=>n.indexOf(r.name)-n.indexOf(i.name)),n.length<t.length){const r=t.length-n.length;return t.slice(r).concat(t.slice(0,r))}return t}addAdditionalItem(t,n,r){const{width:i,height:s}=Pt.area;if(n.type===Vt.RADIUS?t.style("width",`${s}px`).style("height",`${s}px`):t.style("width",`${i}px`).style("height",`${s}px`),n.type===Vt.RADIUS){const{iconData:a,fill:o,stroke:l}=Pt.radius;t.attr("fill","none").selectAll("circle").data(a).enter().append("circle").classed("radius",!0).attr("role",ht.IMG).attr("aria-label","radius").attr("cx",u=>u.cx).attr("cy",u=>u.cy).attr("r",u=>u.r).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l)}else if(n.type===Vt.LINE){const a=Pt.line;t.select("line.line").empty()&&t.append("line").classed(`line-${r}`,!0).attr("role",ht.IMG).attr("aria-label","line").attr("x1",0).attr("y1",a.yPosition).attr("x2",i).attr("y2",a.yPosition).style("stroke",n.stroke?n.stroke:a.stroke).style("stroke-width",a.strokeWidth)}else if(n.type===Vt.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${r}`,!0).attr("role",ht.IMG).attr("aria-label","area").attr("width",i).attr("height",s).style("fill",r>3&&!n.fill?Pt.area.fill:n.fill).style("stroke",n.stroke);else if(n.type===Vt.SIZE){const{iconData:a,fill:o,stroke:l}=Pt.size;t.attr("fill","none").attr("role",ht.IMG).attr("aria-label","size").selectAll("rect").data(a).enter().append("rect").classed("size",!0).attr("width",u=>u.width).attr("height",u=>u.height).attr("y",()=>0).style("fill",n.fill?n.fill:o).style("stroke",n.stroke?n.stroke:l).style("stroke-width",1)}else if(n.type===Vt.QUARTILE){const{iconData:a}=Pt.quartile;t.selectAll("rect").attr("role",ht.IMG).attr("aria-label","quartile").data(a).enter().append("rect").attr("class",(l,c)=>`quartile-${c===0?"wrapper":"line"}`).attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height)}else if(n.type===Vt.ZOOM){const{iconData:a,color:o}=b(Pt,"zoom"),l=t.attr("role",ht.IMG).attr("aria-label","zoom").selectAll("g.icon").data(a).enter();l.append("g").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",()=>n.color?n.color:o),l.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",()=>n.color?n.color:o)}}truncateLegendText(){const t=this.getComponentContainer(),n=b(this.getOptions(),"legend","truncation"),r=b(n,"type"),i=b(n,"threshold"),s=b(n,"numCharacter"),a=t.selectAll("div.legend-item p");a.attr("id",function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")}),r!==Le.NONE?a.html(function(o){const l=an(o.name);return l.length>i&&l.length!==s?ls(l,r,s):l}):a.html(o=>an(o.name))}addEventListeners(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=b(r,"legend"),s=b(i,"truncation");n.selectAll("div.legend-item").on("mouseover",function(a){t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:R(this)});const o=R(this);o.select("div.checkbox").classed("hovered",!0);const l=o.datum();l.name.length>s.threshold&&s.numCharacter<l.name.length&&s.type!==Le.NONE&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})}).on("mousemove",function(a){R(this).datum().name.length>s.threshold&&s.type!==Le.NONE&&t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("click",function(){t.services.events.dispatchEvent(T.Legend.ITEM_CLICK,{clickedElement:R(this)});const o=R(this).datum();t.model.toggleDataLabel(o.name)}).on("mouseout",function(){const a=R(this);a.select("div.checkbox").classed("hovered",!1),a.datum().name.length>s.threshold&&s.type!==Le.NONE&&t.services.events.dispatchEvent(T.Tooltip.HIDE),t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:a})}),n.selectAll("div.legend-item div.checkbox").on("keyup",function(a){a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_HOVER,{hoveredElement:R(this)})}),n.selectAll("div.legend-item div.checkbox").on("keydown",function(a,o){a.key&&a.key===" "?(a.preventDefault(),t.model.toggleDataLabel(o.name)):a.key&&a.key==="Tab"&&t.services.events.dispatchEvent(T.Legend.ITEM_MOUSEOUT,{hoveredElement:R(this)})}),n.selectAll("g.additional-item").on("mouseover",function(a){const o=R(this),l=o.datum();l.name.length>s.threshold&&t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:o,content:l.name})})}}class hv extends pt{constructor(t,n,r){super(t,n,r),this.type="chart-clip",this.renderType=tt.SVG,this.chartClipId="chart-clip-id-"+Math.floor(Math.random()*99999999999),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){const t=this.parent,{cartesianScales:n}=this.services;if(!n)throw new Error("Service cartesianScales was undefined");const r=n.getMainXScale(),i=n.getMainYScale(),[s,a]=r.range(),[o,l]=i.range();if(!t)throw new Error("svg is undefined");this.chartClipPath=I.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const c=I.appendOrSelect(this.chartClipPath,`rect.${this.type}`);a-s>0&&c.attr("x",s).attr("y",l).attr("width",a-s).attr("height",o-l),this.chartClipPath.merge(c).lower()}}class q2 extends hv{constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(Math.random()*99999999999)}createClipPath(){const t=this.parent,{width:n,height:r}=I.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=I.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);const i=I.appendOrSelect(this.chartClipPath,`rect.${this.type}`);i.attr("x",0).attr("y",0).attr("width",n).attr("height",r),this.chartClipPath.merge(i).lower()}}var ti,Ut;(function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"})(Ut||(Ut={}));var dv=(ti={},ti[Ut.LEFT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left-t.offsetWidth)}},ti[Ut.RIGHT]=function(e,t,n){return{top:e.top-Math.round(t.offsetHeight/2)+Math.round(n.height/2),left:Math.round(e.left+n.width)}},ti[Ut.TOP]=function(e,t,n){return{top:Math.round(e.top-t.offsetHeight),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ti[Ut.BOTTOM]=function(e,t,n){return{top:Math.round(e.top+n.height),left:e.left-Math.round(t.offsetWidth/2)+Math.round(n.width/2)}},ti),fv=typeof window<"u"?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},vo=function(){function e(t){t===void 0&&(t={}),this.positions=dv,this.positions=Object.assign({},dv,t)}return e.prototype.getRelativeOffset=function(t){for(var n={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&getComputedStyle(t.offsetParent).position==="static";)n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent;return n},e.prototype.getAbsoluteOffset=function(t){for(var n=t,r={top:0,left:0};n.offsetParent;){var i=getComputedStyle(n.offsetParent);i.position==="static"&&i.marginLeft&&i.marginTop&&(parseInt(i.marginTop,10)&&(r.top+=parseInt(i.marginTop,10)),parseInt(i.marginLeft,10)&&(r.left+=parseInt(i.marginLeft,10))),n=n.offsetParent}var s=t.getBoundingClientRect(),a=document.body.getBoundingClientRect();return{top:s.top-a.top+r.top,left:s.left-a.left+r.left}},e.prototype.findRelative=function(t,n,r){var i=this.getRelativeOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findAbsolute=function(t,n,r){var i=this.getAbsoluteOffset(t),s=t.getBoundingClientRect();return this.calculatePosition(i,s,n,r)},e.prototype.findPosition=function(t,n,r,i){i===void 0&&(i=this.getAbsoluteOffset.bind(this));var s=i(t),a=t.getBoundingClientRect();return this.calculatePosition(s,a,n,r)},e.prototype.findPositionAt=function(t,n,r){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},n,r)},e.prototype.getPlacementBox=function(t,n){var r=t.offsetHeight+n.top,i=t.offsetWidth+n.left;return{top:n.top,bottom:r,left:n.left,right:i}},e.prototype.addOffset=function(t,n,r){return n===void 0&&(n=0),r===void 0&&(r=0),Object.assign({},t,{top:t.top+n,left:t.left+r})},e.prototype.setElement=function(t,n){t.style.top=n.top+"px",t.style.left=n.left+"px"},e.prototype.findBestPlacement=function(t,n,r,i,s){var a=this;i===void 0&&(i=this.defaultContainerFunction.bind(this)),s===void 0&&(s=this.findPosition.bind(this));var o=r.map(function(l){var c=s(t,n,l),u=a.getPlacementBox(n,c),d=0,h=0,f=i();u.top<f.top?d=f.top-u.top:u.bottom>f.height&&(d=u.bottom-f.height),u.left<f.left?h=f.left-u.left:u.right>f.width&&(h=u.right-f.width),d&&!h?h=1:h&&!d&&(d=1);var p=n.offsetHeight*n.offsetWidth,g=d*h,m=p-g,v=m/p;return{placement:l,weight:v}});return o.sort(function(l,c){return c.weight-l.weight}),o[0].placement},e.prototype.findBestPlacementAt=function(t,n,r,i){var s=this;i===void 0&&(i=this.defaultContainerFunction.bind(this));var a=function(o,l,c){return s.findPositionAt(t,l,c)};return this.findBestPlacement(null,n,r,i,a)},e.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:fv.innerHeight,width:fv.innerWidth}},e.prototype.calculatePosition=function(t,n,r,i){return this.positions[i]?this.positions[i](t,r,n):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},e}();new vo;class Bu extends pt{constructor(t,n,r){super(t,n,r),this.type="tooltip",this.renderType=tt.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new vo,this.handleShowTooltip=i=>{const s=i.detail.data||i.detail.items,a=R(i.detail.event.target).datum();let o;const l=this.formatItems(this.getItems(i));i.detail.content?o=`<div class="title-tooltip"><p>${lo(i.detail.content)}</p></div>`:o=lo(this.getTooltipHTML(l));const c=I.appendOrSelect(this.tooltip,"div.content-box");if(b(this.getOptions(),"tooltip","customHTML"))if(i.detail.content){const u=`<div class="title-tooltip"><p>${lo(i.detail.content)}</p></div>`;c.html(u)}else c.html(`<div class="title-tooltip"><p>${lo(this.model.getOptions().tooltip.customHTML(s,o,a))}</p></div>`);else c.html(o);c.selectAll(".datapoint-tooltip").each(function(u,d){const h=l[d];l[d]&&l[d].color&&R(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",h.color)}),this.positionTooltip(i),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1),this.lastTriggeredEventType=i.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(T.Tooltip.MOVE,t=>{this.lastTriggeredEventType!==T.Toolbar.SHOW_TOOLTIP&&this.tooltip.classed("hidden")===!1&&this.positionTooltip(t)}),this.services.events.addEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(T.Tooltip.MOVE,null),this.services.events.removeEventListener(T.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(T.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(T.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(T.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(T.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){const n=this.getOptions(),r=b(n,"tooltip","truncation","type"),i=b(n,"tooltip","truncation","threshold"),s=b(n,"tooltip","truncation","numCharacter");return r!==Le.NONE?t.map(a=>{const o=a.labelIcon?12:0;return a.value=a.value?this.valueFormatter(a.value,a.label):a.value,a.label&&a.label.length+o>i&&(a.label=ls(a.label,r,s)),a.value&&a.value.length>i&&(a.value=ls(a.value,r,s)),a}):t.map(a=>(a.value=a.value?this.valueFormatter(a.value,a.label):a.value,a))}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map(n=>`<li>
|
|
60
65
|
<div class="datapoint-tooltip${n.bold?" bold":""}">
|
|
61
66
|
${n.class||n.color?`<div class="tooltip-color ${n.class}"></div>`:""}
|
|
62
67
|
<div class="label">
|
|
@@ -77,5 +82,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
77
82
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10">
|
|
78
83
|
<polygon points="5.93 3.71 4.45 3.71 4.45 2.23 3.71 2.23 3.71 3.71 2.23 3.71 2.23 4.45 3.71 4.45 3.71 5.93 4.45 5.93 4.45 4.45 5.93 4.45 5.93 3.71"/>
|
|
79
84
|
<path d="M7.2,6.67a4,4,0,0,0,1-2.59A4.08,4.08,0,1,0,4.07,8.15h0a4,4,0,0,0,2.59-1L9.48,10,10,9.48Zm-3.12.77A3.34,3.34,0,1,1,7.41,4.08,3.34,3.34,0,0,1,4.08,7.44Z"/>
|
|
80
|
-
</svg>`}addEventListeners(){const t=this;this.parent.selectAll("circle.node").on("mouseover",function(n,r){const i=R(this);i.classed("hovered",!0);const s=t.model.getHierarchyLevel(),a=s>2&&!i.classed("focal"),o=b(t.model.getOptions(),"canvasZoom","enabled");let l=!1;if(!a){let c=[],u=[],d=null;if(r.children){r.depth>1&&o&&(l=!0,i.classed("clickable",!0)),c=r.children.map(p=>{if(p!==null)return typeof p.data.value=="number"?{label:p.data.name,value:p.data.value}:{label:p.data.name,labelIcon:o&&s<=2?t.getZoomIcon():null,value:p.value}});const f=t.model.getOptions();u=[{label:yt(f,"locale.translations.total")||yt(f,"tooltip.totalLabel")||"Total",value:r.value,bold:!0}],t.highlightChildren(r.children)}else d=r.value;const h=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{color:h,label:r.data.name,labelIcon:l&&o&&s<=2?t.getZoomIcon():null,value:d},...c,...u]})}t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEOVER,{event:n,element:i,datum:r})}).on("mousemove",function(n,r){const i=R(this);t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("mouseout",function(n,r){const i=R(this);i.classed("hovered",!1),r.children&&t.unhighlightChildren(r.children),t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})}).on("click",function(n,r){const i=R(this),s=i.classed("non-focal"),a=b(t.model.getOptions(),"canvasZoom","enabled");if(a&&t.model.getHierarchyLevel()>2){const o=t.parent.selectAll("circle.node");R(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(o,Xr)}else if(r.depth===2&&r.children&&!s&&a){const o=t.parent.selectAll("circle.node");R(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=r,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(r,o,Xr),n.stopPropagation()}t.services.events.dispatchEvent(T.CirclePack.CIRCLE_CLICK,{event:n,element:i,datum:r})})}destroy(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()}}function uN(e,t){const n=gi(this._current,e);return r=>(this._current=n(r),t(this._current))}class Bv extends pt{constructor(){super(...arguments),this.type="pie",this.renderType=tt.SVG,this.isRendering=!1,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.slice").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i.data[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.slice").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getInnerRadius(){return Lt.innerRadius}render(t=!0){const n=this,r=this.getComponentContainer({ariaLabel:"pie graph"}),i=this.getOptions(),{groupMapsTo:s}=i.data,{valueMapsTo:a}=i.pie;this.isRendering=!0;const o=this.model.getDisplayData().filter(M=>M[a]>0),l=this.computeRadius();this.arc=Hi().innerRadius(this.getInnerRadius()).outerRadius(l),this.hoverArc=Hi().innerRadius(this.getInnerRadius()).outerRadius(l+Lt.hoverArc.outerRadiusOffset);const u=vT().value(M=>M[a]).sort(b(i,"pie","sortFunction")).padAngle(Lt.padAngle)(o),h=I.appendOrSelect(r,"g.slices").attr("role",ht.GROUP).attr("data-name","slices").selectAll("path.slice").data(u,M=>M.data[s]);h.exit().attr("opacity",0).remove(),h.enter().append("path").classed("slice",!0).attr("opacity",0).merge(h).attr("class",M=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:M.data[s],originalClassName:"slice"})).style("fill",M=>n.model.getFillColor(M.data[s],null,M.data)).attr("d",this.arc).transition().call(M=>this.services.transitions.setupTransition({transition:M,name:"pie_slice_enter_update",animate:t})).attr("opacity",1).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",M=>`${M[a]}, ${ru(M.data[a],o,a)+"%"}`).attrTween("d",function(M){return uN.bind(this)(M,n.arc)}).on("end",()=>{n.isRendering=!1});const{code:g,number:m}=b(i,"locale"),v=i.pie.labels.enabled,E=v?u.filter(M=>M.data[a]>0):[],x=I.appendOrSelect(r,"g.labels").attr("role",ht.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(E,M=>M.data[s]);x.exit().attr("opacity",0).remove();const S=x.enter().append("text").classed("pie-label",!0),_=[];S.merge(x).style("text-anchor","middle").text(M=>i.pie.labels.formatter?i.pie.labels.formatter({...M,percentageValue:ru(M.data[a],o,a,!0)}):m(ru(M.data[a],o,a),g)+"%").datum(function(M){const w=l+7,U=(M.endAngle-M.startAngle)/2+M.startAngle,$=U/Math.PI*180,N=this.getComputedTextLength();return M.textOffsetX=N/2,M.textOffsetY=$>90&&$<270?10:0,M.xPosition=(M.textOffsetX+w)*Math.sin(U),M.yPosition=(M.textOffsetY+w)*-Math.cos(U),M}).attr("transform",function(M,w){const U=E.length,$=(M.endAngle-M.startAngle)*(180/Math.PI);if(w>=U-2&&$<Lt.callout.minSliceDegree){let N,F;return M.index===U-1?(N=M.xPosition+Lt.callout.offsetX+Lt.callout.textMargin+M.textOffsetX,F=M.yPosition-Lt.callout.offsetY,M.direction=ns.RIGHT,_.push(M)):(N=M.xPosition-Lt.callout.offsetX-M.textOffsetX-Lt.callout.textMargin,F=M.yPosition-Lt.callout.offsetY,M.direction=ns.LEFT,_.push(M)),`translate(${N}, ${F})`}return`translate(${M.xPosition}, ${M.yPosition})`}),this.renderCallouts(_);const A=b(i,"donut")?"donut":"pie",L=b(i,A,"alignment"),{width:B}=I.getSVGElementSize(this.getParent(),{useAttrs:!0}),k=v?Lt.xOffset:0,O=v?Lt.yOffset:0;let H=l+k;L===Ht.CENTER?H=B/2:L===Ht.RIGHT&&(H=B-l-Lt.xOffset);let P=l+O;_.length>0&&(P+=Lt.yOffsetCallout),r.attr("x",H+7).attr("y",P),this.addEventListeners()}renderCallouts(t){const n=I.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",ht.GROUP).attr("data-name","callouts"),r=n.selectAll("g.callout").data(t);r.exit().remove();const i=r.enter().append("g").classed("callout",!0).attr("role",ht.GROUP).attr("aria-roledescription","label callout");i.merge(r).datum(function(o){const{xPosition:l,yPosition:c,direction:u}=o;return u===ns.RIGHT?(o.startPos={x:l,y:c+o.textOffsetY},o.endPos={x:l+Lt.callout.offsetX,y:c-Lt.callout.offsetY+o.textOffsetY},o.intersectPointX=o.endPos.x-Lt.callout.horizontalLineLength):(o.startPos={x:l,y:c+o.textOffsetY},o.endPos={x:l-Lt.callout.offsetX,y:c-Lt.callout.offsetY+o.textOffsetY},o.intersectPointX=o.endPos.x+Lt.callout.horizontalLineLength),o}),i.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum(function(){return R(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",o=>o.startPos.x).attr("y1",o=>o.startPos.y).attr("x2",o=>o.intersectPointX).attr("y2",o=>o.endPos.y),i.append("line").classed("horizontal-line",!0).merge(n.selectAll("line.horizontal-line")).datum(function(){return R(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",o=>o.intersectPointX).attr("y1",o=>o.endPos.y).attr("x2",o=>o.endPos.x).attr("y2",o=>o.endPos.y)}addEventListeners(){const t=this;this.parent.selectAll("path.slice").on("mouseover",function(n,r){const i=R(this);t.isRendering||i.classed("hovered",!0).transition("pie_slice_mouseover").call(o=>t.services.transitions.setupTransition({transition:o,name:"pie_slice_mouseover"})).attr("d",t.hoverArc),t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEOVER,{event:n,element:R(this),datum:r});const{groupMapsTo:s}=t.getOptions().data,{valueMapsTo:a}=t.getOptions().pie;t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{label:r.data[s],value:r.data[a]}]})}).on("mousemove",function(n,r){const i=R(this);t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Pie.SLICE_CLICK,{event:n,element:R(this),datum:r})}).on("mouseout",function(n,r){const i=R(this);gL(()=>{t.isRendering||i.classed("hovered",!1).transition("pie_slice_mouseout").call(s=>t.services.transitions.setupTransition({transition:s,name:"pie_slice_mouseout"})).attr("d",t.arc)},100),t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}computeRadius(){const{width:t,height:n}=I.getSVGElementSize(this.parent,{useAttrs:!0}),r=this.getOptions(),i=Math.min(t,n)/2;return r.pie.labels.enabled?i+Lt.radiusOffset:i}}class hN extends Bv{constructor(){super(...arguments),this.type="donut",this.renderType=tt.SVG}render(t=!0){super.render(t);const n=this;if(this.model.isDataEmpty()){this.getComponentContainer({ariaLabel:"donut graph"}).select("g.center").remove();return}const r=I.appendOrSelect(this.getComponentContainer({ariaLabel:"donut graph"}),"g.center"),i=this.getOptions(),s=this.computeRadius(),a=b(i,"donut","center","label");I.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",()=>a===null||a===""?"central":"initial").style("font-size",()=>i.donut.center.numberFontSize(s)).transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"donut-figure-enter-update",animate:t})).tween("text",function(){return n.centerNumberTween(R(this))}),a!==null&&a!==""&&I.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",()=>i.donut.center.titleFontSize(s)).attr("y",i.donut.center.titleYPosition(s)).text(a)}getInnerRadius(){return this.computeRadius()*(3/4)}centerNumberTween(t){const n=this.getOptions();let r=b(n,"donut","center","number");r===null&&(r=this.model.getDisplayData().reduce((o,l)=>o+l[n.pie.valueMapsTo],0));const i=parseInt(t.text().replace(/[, ]+/g,""),10)||0;let s;i%1===0&&r%1===0?s=Uh:s=ye;const a=s(i,r);return o=>{const{numberFormatter:l}=n.donut.center;if(l)t.text(l(a(o)));else{const{code:c,number:u}=b(n,"locale");t.text(u(Math.floor(a(o)),c))}}}}const Hv="4,10 8,6 12,10",Gv="12,6 8,10 4,6";class dN extends pt{constructor(){super(...arguments),this.type="gauge",this.renderType=tt.SVG}getValue(){var r;return((r=this.model.getData().find(i=>i.group==="value"))==null?void 0:r.value)??null}getValueRatio(){return ug(this.getValue(),0,100)/100}getDelta(){var r;return((r=this.model.getData().find(i=>i.group==="delta"))==null?void 0:r.value)??null}getArcRatio(){const t=this.getOptions();return b(t,"gauge","type")===lr.FULL?1:.5}getArcSize(){return this.getArcRatio()*Math.PI*2}getStartAngle(){const t=this.getArcSize();return t===2*Math.PI?0:-t/2}getArrow(t){const n=this.getOptions();switch(b(n,"gauge","deltaArrow","direction")){case Xa.UP:return Hv;case Xa.DOWN:return Gv;default:return t>0?Hv:Gv}}render(t=!0){const n=this.getComponentContainer({ariaLabel:"gauge graph"}).attr("width","100%").attr("height","100%"),r=this.getOptions(),i=this.getValue(),s=this.getValueRatio(),a=this.getArcSize(),o=this.getStartAngle(),l=s*a,c=o+l,u=o+a,d=this.computeRadius(),h=this.getInnerRadius();this.backgroundArc=Hi().innerRadius(h).outerRadius(d).startAngle(c).endAngle(u),this.arc=Hi().innerRadius(h).outerRadius(d).startAngle(o).endAngle(c),I.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc);const f=n.selectAll("path.arc-foreground").data([i]);f.enter().append("path").merge(f).attr("class",this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",()=>b(this.getOptions(),"color","scale","value")).attr("d",this.arc).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",E=>E),this.drawValueNumber(),this.drawDelta(),f.exit().remove();const g=b(r,"gauge","alignment"),{width:m}=I.getSVGElementSize(this.getParent(),{useAttrs:!0});let v=d;g===Ht.CENTER?v=m/2:g===Ht.RIGHT&&(v=m-d),n.attr("x",v).attr("y",d),this.addEventListeners()}drawValueNumber(){const t=this.getComponentContainer(),n=this.getOptions(),r=b(n,"gauge","type"),i=this.getValue(),s=this.getDelta(),a=this.computeRadius(),o=b(n,"gauge","valueFontSize"),l=b(n,"gauge","deltaFontSize"),c=b(n,"gauge","numberSpacing"),u=b(n,"gauge","showPercentageSymbol");let d=0;r===lr.FULL&&!s?d=l(a):r===lr.SEMI&&s&&(d=-(l(a)+c));const h=I.appendOrSelect(t,"g.gauge-numbers").attr("transform",`translate(0, ${d})`),f=o(a),p=I.appendOrSelect(h,"g.gauge-value-number"),{code:g,number:m}=b(n,"locale"),v=b(n,"gauge","numberFormatter"),E=p.selectAll("text.gauge-value-number").data([i]);E.enter().append("text").attr("class","gauge-value-number").merge(E).style("font-size",`${f}px`).attr("text-anchor","middle").text(B=>{let k;return B!=null?k=Number(B.toFixed(2))%1!==0?B.toFixed(2):B.toFixed():k=0,v?v(k):m(Number(k),g)});const{width:y}=I.getSVGElementSize(I.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}),x=f/2,S=u?"%":"",_=I.appendOrSelect(p,"text.gauge-value-symbol").style("font-size",`${x}px`).attr("x",y/2).text(S),{width:A,height:L}=I.getSVGElementSize(_,{useBBox:!0});_.attr("y",`-${L/2}px`),p.attr("transform",`translate(-${A/2}, 0)`)}drawDelta(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=this.getDelta(),{code:s,number:a}=b(r,"locale");if(i){const o=this.computeRadius(),l=i?b(r,"gauge","deltaFontSize"):()=>0,c=i?b(r,"gauge","numberFormatter"):()=>null,u=b(r,"gauge","deltaArrow","size"),d=b(r,"gauge","numberSpacing"),h=b(r,"gauge","showPercentageSymbol"),f=I.appendOrSelect(n,"g.gauge-numbers"),p=I.appendOrSelect(f,"g.gauge-delta").attr("transform",`translate(0, ${l(o)+d})`),g=I.appendOrSelect(p,"text.gauge-delta-number"),m=h?"%":"";g.data(i===null?[]:[i]),g.enter().append("text").classed("gauge-delta-number",!0).merge(g).attr("text-anchor","middle").style("font-size",`${l(o)}px`).text(x=>{let S;return x!=null?S=Number(x.toFixed(2))%1!==0?x.toFixed(2):x.toFixed():S=0,c?`${c(S)}${m}`:`${a(Number(S),s)}${m}`});const{width:v}=I.getSVGElementSize(I.appendOrSelect(n,".gauge-delta-number"),{useBBox:!0}),E=b(r,"gauge","deltaArrow","enabled"),y=p.selectAll("svg.gauge-delta-arrow").data(i!==null&&E?[i]:[]);y.enter().append("svg").merge(y).attr("class","gauge-delta-arrow").attr("x",-u(o)-v/2).attr("y",-u(o)/2-l(o)*.35).attr("width",u(o)).attr("height",u(o)).attr("viewBox","0 0 16 16").each(function(){const x=R(this);I.appendOrSelect(x,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");const S=b(r,"gauge","status");I.appendOrSelect(x,"polygon.gauge-delta-arrow").attr("class",S!==null?`gauge-delta-arrow status--${S}`:"").attr("points",t.getArrow(i))}),y.exit().remove(),g.exit().remove()}else{const o=n.select("g.gauge-delta");o.empty()||o.remove()}}getInnerRadius(){const t=this.computeRadius(),n=b(this.getOptions(),"gauge","arcWidth");return t-n}addEventListeners(){const t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",function(n,r){t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEOVER,{event:n,element:R(this),datum:r})}).on("mousemove",function(n,r){const i=R(this);t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEMOVE,{event:n,element:i,datum:r})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Gauge.ARC_CLICK,{event:n,element:R(this),datum:r})}).on("mouseout",function(n,r){const i=R(this);t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEOUT,{event:n,element:i,datum:r})})}computeRadius(){const t=this.getOptions(),n=b(t,"gauge","type"),{width:r,height:i}=I.getSVGElementSize(this.parent,{useAttrs:!0});return n===lr.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)}}class Vv extends Qu{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=tt.SVG,this.padding=5,this.defaultStepFactor=70,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.model.getDisplayData(this.configs.groups),r=this.getOptions(),{groupMapsTo:i}=r.data;this.setGroupScale();const s=this.getComponentContainer({ariaLabel:"grouped bar graphs",withinChartClip:!0}),a=es(n.map(h=>{const f=this.services.cartesianScales.getDomainIdentifier(h);return h[f]&&typeof h[f].toString=="function"?h[f].toString():h[f]})),o=s.selectAll("g.bars").data(a,h=>h);o.exit().attr("opacity",0).remove();const c=o.enter().append("g").classed("bars",!0).attr("role",ht.GROUP).attr("data-name","bars").merge(o);c.transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"bar-group-update-enter",animate:t})).attr("transform",h=>{const p=this.services.cartesianScales.getDomainValue(h)-this.getGroupWidth()/2;return this.services.cartesianScales.getOrientation()===Bt.VERTICAL?`translate(${p}, 0)`:`translate(0, ${p})`});const u=c.selectAll("path.bar").data(h=>this.getDataCorrespondingToLabel(h),h=>h[i]);u.exit().attr("opacity",0).remove(),u.enter().append("path").attr("opacity",0).merge(u).classed("bar",!0).transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"bar-update-enter",animate:t})).attr("class",h=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:h[i],originalClassName:"bar"})).style("fill",h=>{const f=this.services.cartesianScales.getDomainIdentifier(h);return this.model.getFillColor(h[i],h[f],h)}).attr("d",h=>{const f=this.groupScale(h[i]),p=this.getBarWidth(),g=f,m=f+p,v=this.services.cartesianScales.getRangeAxisPosition({datum:h}),E=this.services.cartesianScales.getDomainLowerBound(v),y=this.services.cartesianScales.getValueThroughAxisPosition(v,E),x=this.services.cartesianScales.getRangeValue(h),S=this.services.cartesianScales.getDomainValue(h)-p/2,_=S+p;if(!this.isOutsideZoomedDomain(S,_))return ie({x0:g,x1:m,y0:y,y1:x},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",h=>h.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,r){const i=R(this);i.classed("hovered",!0),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r]})}).on("mousemove",function(n,r){const i=R(this);t.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:n,element:R(this),datum:r})}).on("mouseout",function(n,r){const i=R(this);i.classed("hovered",!1),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getDataCorrespondingToLabel(t){return this.model.getDisplayData(this.configs.groups).filter(r=>{const i=this.services.cartesianScales.getDomainIdentifier(r);return r[i].toString()===t})}getGroupWidth(){const t=this.model.getGroupedData(this.configs.groups),n=this.getTotalGroupPadding();return this.getBarWidth()*t.length+n}getDomainScaleStep(){const t=this.services.cartesianScales.getDomainScale(),n=this.model.getGroupedData(this.configs.groups);let r=this.defaultStepFactor;if(typeof t.step=="function")r=t.step();else if(n.length>0){const i=n.find(s=>{var a;return((a=s.data)==null?void 0:a.length)>1});if(i){const s=this.services.cartesianScales.getDomainIdentifier(i.data[0]);r=Math.abs(t(i.data[1][s])-t(i.data[0][s]))}}return r}getTotalGroupPadding(){const t=this.model.getGroupedData(this.configs.groups);return t.length===1?0:Math.min(5,5*(this.getDomainScaleStep()/this.defaultStepFactor))*(t.length-1)}getBarWidth(){const t=this.getOptions(),n=b(t,"bars","width"),r=b(t,"bars","maxWidth");if(n!==null&&(r===null||n<=r))return n;const s=this.model.getGroupedData(this.configs.groups).length,a=this.getTotalGroupPadding();return Math.min(r,(this.getDomainScaleStep()-a)/s)}setGroupScale(){const t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=Pi().domain(t).rangeRound([0,this.getGroupWidth()])}}class fN extends pt{constructor(){super(...arguments),this.type="heatmap",this.renderType=tt.SVG,this.matrix={},this.xBandwidth=0,this.yBandwidth=0,this.translationUnits={x:0,y:0},this.handleAxisOnHover=t=>{const{detail:n}=t,{datum:r}=n,i=this.model.getUniqueRanges(),s=this.model.getUniqueDomain(),a=this.services.cartesianScales.getDomainLabel(),o=this.services.cartesianScales.getRangeLabel(),l=this.services.cartesianScales.getMainXScale(),c=this.services.cartesianScales.getMainYScale();let u="",d=null,h=null,f=null;this.matrix[r]!==void 0?(u=a,i.forEach(p=>{if(typeof this.matrix[r][p].value=="number"){const g=this.matrix[r][p].value;if(d===null){d=g,h=g,f=g;return}d+=g,h=g<h?g:h,f=g>f?g:f}})):(u=o,s.forEach(p=>{if(typeof this.matrix[p][r].value=="number"){const g=this.matrix[p][r].value;if(d===null){d=g,h=g,f=g;return}d+=g,h=g<h?g:h,f=g>f?g:f}})),l(r)!==void 0?this.parent.select("g.multi-cell.column-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${l(r)}, ${In(c.range())})`):c(r)!==void 0&&this.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${In(l.range())},${c(r)})`),this.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n.event,hoveredElement:R(t.detail.element),items:[{label:u,value:r,bold:!0},{label:"Min",value:h!==null?h:"-"},{label:"Max",value:f!==null?f:"-"},{label:"Average",value:d!==null?d/s.length:"-"}]})},this.handleAxisMouseOut=t=>{this.parent.selectAll("g.multi-cell").classed("highlighter-hidden",!0),this.services.events.dispatchEvent(T.Tooltip.HIDE,{event:t})}}init(){const t=this.services.events;t.addEventListener(T.Axis.LABEL_MOUSEOVER,this.handleAxisOnHover),t.addEventListener(T.Axis.LABEL_MOUSEOUT,this.handleAxisMouseOut),t.addEventListener(T.Axis.LABEL_FOCUS,this.handleAxisOnHover),t.addEventListener(T.Axis.LABEL_BLUR,this.handleAxisMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"heatmap",withinChartClip:!0});n.lower();const{cartesianScales:r}=this.services;if(this.matrix=this.model.getMatrix(),n.html(""),b(this.getOptions(),"data","loading"))return;const i=r.getMainXScale(),s=r.getMainYScale(),a=r.getDomainIdentifier(),o=r.getRangeIdentifier(),l=this.model.getUniqueDomain(),c=this.model.getUniqueRanges(),u=this.model.getMatrixAsArray(),d=i.range(),h=s.range();this.xBandwidth=Math.abs((d[1]-d[0])/l.length),this.yBandwidth=Math.abs((h[1]-h[0])/c.length);const f=this.services.domUtils.generateElementIDString("heatmap-pattern-stripes");n.append("defs").append("pattern").attr("id",f).attr("width",3).attr("height",3).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("rect").classed("pattern-fill",!0).attr("width",.5).attr("height",8);const p=n.selectAll().data(u).enter().append("g").attr("class",g=>`heat-${g.index}`).classed("cell",!0).attr("transform",g=>`translate(${i(g[a])}, ${s(g[o])})`).append("rect").attr("class",g=>this.model.getColorClassName({value:g.value,originalClassName:`heat-${g.index}`})).classed("heat",!0).classed("null-state",g=>g.index===-1||g.value===null).attr("width",this.xBandwidth).attr("height",this.yBandwidth).style("fill",g=>{const m=this.services.cartesianScales.getDomainIdentifier(g);return g.index===-1||g.value===null?`url(#${f})`:this.model.getFillColor(Number(g.value),g[m],g)}).attr("aria-label",g=>g.value);this.createOuterBox("g.cell-highlight",this.xBandwidth,this.yBandwidth),this.createOuterBox("g.multi-cell.column-highlight",this.xBandwidth,Math.abs(h[1]-h[0])),this.createOuterBox("g.multi-cell.row-highlight",Math.abs(d[1]-d[0]),this.yBandwidth),this.determineDividerStatus()&&(p.style("stroke-width","1px"),this.parent.select("g.cell-highlight").classed("cell-2",!0)),this.addEventListener()}createOuterBox(t,n,r){const i=I.appendOrSelect(this.parent,t).classed("shadows",!0).classed("highlighter-hidden",!0);I.appendOrSelect(i,"line.top").attr("x1",-1).attr("x2",n+1),I.appendOrSelect(i,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",r+1),I.appendOrSelect(i,"line.down").attr("x1",-1).attr("x2",n+1).attr("y1",r).attr("y2",r),I.appendOrSelect(i,"line.right").attr("x1",n).attr("x2",n).attr("y1",-1).attr("y2",r+1)}determineDividerStatus(){const t=b(this.getOptions(),"heatmap","divider","state");return t!==qr.OFF&&(t===qr.AUTO&&nm.minCellDividerDimension<=this.xBandwidth&&nm.minCellDividerDimension<=this.yBandwidth||t===qr.ON)}addEventListener(){const t=this,{cartesianScales:n}=this.services,r=this.getOptions(),i=yt(r,"locale.translations.total")||yt(r,"tooltip.totalLabel")||"Total",s=n.getDomainIdentifier(),a=n.getRangeIdentifier(),o=n.getDomainLabel(),l=n.getRangeLabel();this.parent.selectAll("g.cell").on("mouseover",function(c,u){const d=R(this),h=d.select("rect.heat");if(!h.classed("null-state")){const p=os(d.attr("transform"));t.parent.select("g.cell-highlight").attr("transform",`translate(${p.x+t.translationUnits.x}, ${p.y+t.translationUnits.y})`).classed("highlighter-hidden",!1),t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEOVER,{event:c,element:h,datum:u}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:c,items:[{label:o,value:u[s]},{label:l,value:u[a]},{label:i,value:u.value,color:h.style("fill")}]})}}).on("mousemove",function(c,u){t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEMOVE,{event:c,element:R(this),datum:u}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:c})}).on("click",function(c,u){t.services.events.dispatchEvent(T.Heatmap.HEATMAP_CLICK,{event:c,element:R(this),datum:u})}).on("mouseout",function(c,u){const h=R(this).select("rect.heat"),f=h.classed("null-state");t.parent.select("g.cell-highlight").classed("highlighter-hidden",!0),f||(t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEOUT,{event:c,element:h,datum:u}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{event:c,hoveredElement:h}))})}destroy(){this.parent.selectAll("rect.heat").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleAxisOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleAxisMouseOut)}}class pN extends pt{constructor(){super(...arguments),this.type="histogram",this.renderType=tt.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-bar"})).attr("opacity",s=>s[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({ariaLabel:"histogram bars"}),r=this.model.getOptions(),{groupIdentifier:i}=r,{groupMapsTo:s}=r.data,a=this.model.getBinnedStackedData(),o=this.services.cartesianScales.getMainXScale(),l=n.selectAll("g.bars").data(a,u=>yt(u,`0.${s}`));l.exit().attr("opacity",0).remove(),l.enter().append("g").classed("bars",!0).attr("role",ht.GROUP);const c=n.selectAll("g.bars").selectAll("path.bar").data(u=>u);c.exit().remove(),c.enter().append("path").merge(c).classed("bar",!0).attr(i,(u,d)=>d).transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"histogram-bar-update-enter",animate:t})).attr("class",u=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:u[s],originalClassName:"bar"})).style("fill",u=>this.model.getFillColor(u[s],null,u)).attr("d",u=>{const d=yt(u,"data");if(!d)return;const h=o(d.x1)-o(d.x0)-1,f=this.services.cartesianScales.getDomainValue(d.x0),p=f+h,g=this.services.cartesianScales.getRangeValue(u[0]);let m=this.services.cartesianScales.getRangeValue(u[1]);return Math.abs(m-g)>0&&Math.abs(m-g)>r.bars.dividerSize&&(this.services.cartesianScales.getOrientation()===Bt.VERTICAL?m+=1:m-=1),ie({x0:f,x1:p,y0:g,y1:m},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>b(u,"data",u[s])),this.addEventListeners()}addEventListeners(){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,{code:r,number:i}=b(t,"locale"),s=this;this.parent.selectAll("path.bar").on("mouseover",function(a,o){const l=R(this);l.classed("hovered",!0);const c=i(parseFloat(yt(o,"data.x0")),r),u=i(parseFloat(yt(o,"data.x1")),r),d=s.services.cartesianScales.getRangeAxisPosition(),h=s.services.cartesianScales.getScaleLabel(d);s.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:l,items:[{label:yt(t,"bins.rangeLabel")||"Range",value:`${c} – ${u}`},{label:t.tooltip.groupLabel||"Group",value:o[n],class:s.model.getColorClassName({classNameTypes:[at.TOOLTIP],dataGroupName:o[n]})},{label:h,value:yt(o,`data.${o[n]}`)}]})}).on("mousemove",function(a){s.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("mouseout",function(){R(this).classed("hovered",!1),s.services.events.dispatchEvent(T.Tooltip.HIDE)})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class gN extends on{constructor(){super(...arguments),this.type="lollipop",this.renderType=tt.SVG,this.handleScatterOnHover=t=>{const n=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("line.line").attr("stroke-width",s=>s[i]!==n.datum[i]?On.weight.unselected:On.weight.selected)},this.handleScatterOnMouseOut=()=>{this.parent.selectAll("line.line").attr("stroke-width",On.weight.unselected)},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("line.line").transition("legend-hover-line").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-line"})).attr("opacity",s=>s[i]!==n.datum().name?On.opacity.unselected:On.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("line.line").transition("legend-mouseout-line").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})).attr("opacity",On.opacity.selected)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({ariaLabel:"lines",withinChartClip:!0}),r=this.model.getOptions(),{groupMapsTo:i}=r.data,{cartesianScales:s}=this.services,a=s.getMainXScale(),o=s.getMainYScale(),l=s.getDomainIdentifier(),c=v=>s.getDomainValue(v),u=v=>s.getRangeValue(v),d=s.getOrientation(),[h,f]=Mn(c,u,d),p=n.selectAll("line.line").data(this.getScatterData(),v=>`${v[i]}-${v[l]}`);p.exit().attr("opacity",0).remove();const m=p.enter().append("line").attr("opacity",0).merge(p).classed("line",!0).attr("class",v=>this.model.getColorClassName({classNameTypes:[at.STROKE],dataGroupName:v[i],originalClassName:"line"})).transition().call(v=>this.services.transitions.setupTransition({transition:v,name:"lollipop-line-update-enter",animate:t})).style("stroke",v=>this.model.getFillColor(v[i],v[l],v)).attr("opacity",1);d===Bt.HORIZONTAL?m.attr("y1",f).attr("y2",f).attr("x1",a.range()[0]).attr("x2",v=>h(v)-r.points.radius):m.attr("x1",h).attr("x2",h).attr("y1",o.range()[0]).attr("y2",v=>f(v)+r.points.radius),this.addScatterPointEventListeners()}addScatterPointEventListeners(){this.services.events.addEventListener(T.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(T.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}destroy(){const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(T.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(T.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}}class mN extends pt{constructor(){super(...arguments),this.type="meter",this.renderType=tt.SVG}getStackedBounds(t,n){let r=0;return t.map((s,a)=>a!==0?(r+=n(s.value),{...s,width:Math.abs(n(s.value)-jt.dividerWidth),x:r-n(s.value)}):(r=n(s.value),{...s,width:Math.abs(n(s.value)-jt.dividerWidth),x:0}))}render(t=!0){const n=this,r=this.getComponentContainer({ariaLabel:"meter lines"}),i=this.getOptions(),s=b(i,"meter","proportional"),a=this.model.getDisplayData(),o=this.model.getStatus(),{width:l}=I.getSVGElementSize(r,{useAttrs:!0}),{groupMapsTo:c}=i.data;let u;if(b(i,"meter","proportional")===null)u=100;else{const y=b(i,"meter","proportional","total");u=y||this.model.getMaximumDomain(this.model.getDisplayData())}const d=Be().domain([0,u]).range([0,l]),h=this.getStackedBounds(a,d),f=b(i,"meter","height");I.appendOrSelect(r,"rect.container").attr("x",0).attr("y",0).attr("width",l).attr("height",f||(s?jt.height.proportional:jt.height.default)),I.appendOrSelect(r,"line.rangeIndicator").attr("x1",l).attr("x2",l).attr("y1",0).attr("y2",f||(s?jt.height.proportional:jt.height.default));const p=r.selectAll("rect.value").data(h),g=o!=null&&!n.model.isUserProvidedColorScaleValid()&&!s?`value status--${o}`:"value";p.enter().append("rect").classed("value",!0).merge(p).attr("x",y=>y.x).attr("y",0).attr("height",()=>f||(s?jt.height.proportional:jt.height.default)).attr("class",y=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:y[c],originalClassName:g})).transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"meter-bar-update",animate:t})).attr("width",y=>y.value>u?d(u):Math.max(y.width,2)).style("fill",y=>n.model.getFillColor(y[c],null,y)).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",y=>y.value),p.exit().remove();const m=b(i,"meter","peak");let v=m;m!==null&&(m>u?v=u:m<a[0].value&&(v=a[0].value>u?u:a[0].value));const E=r.selectAll("line.peak").data(v==null?[]:[v]);E.enter().append("line").classed("peak",!0).merge(E).attr("y1",0).attr("y2",()=>f||(s?jt.height.proportional:jt.height.default)).transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"peak-line-update",animate:t})).attr("x1",y=>d(y)).attr("x2",y=>d(y)).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",y=>y),E.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=b(t,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",function(s,a){const o=R(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEOVER,{event:s,element:o,datum:a}),i&&(o.classed("hovered",!0),r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:a[n],value:a.value}]}))}).on("mousemove",function(s,a){const o=R(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEMOVE,{event:s,element:o,datum:a}),i&&r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:s})}).on("click",function(s,a){r.services.events.dispatchEvent(T.Meter.METER_CLICK,{event:s,element:R(this),datum:a})}).on("mouseout",function(s,a){const o=R(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEOUT,{event:s,element:o,datum:a}),i&&(o.classed("hovered",!1),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:o}))})}destroy(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)}}function zv(e){const t=vN(Wv(e),360);return Bn(t,[0,10])||Bn(t,[350,0])?{textAnchor:en.START,dominantBaseline:nn.MIDDLE}:Bn(t,[10,80])?{textAnchor:en.START,dominantBaseline:nn.HANGING}:Bn(t,[80,100])?{textAnchor:en.MIDDLE,dominantBaseline:nn.HANGING}:Bn(t,[100,170])?{textAnchor:en.END,dominantBaseline:nn.HANGING}:Bn(t,[170,190])?{textAnchor:en.END,dominantBaseline:nn.MIDDLE}:Bn(t,[190,260])?{textAnchor:en.END,dominantBaseline:nn.BASELINE}:Bn(t,[260,280])?{textAnchor:en.MIDDLE,dominantBaseline:nn.BASELINE}:{textAnchor:en.START,dominantBaseline:nn.BASELINE}}function vN(e,t){return(e%t+t)%t}function Bn(e,[t,n]){return e>=t&&e<=n}function Wv(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 yN(e,t){return t*Math.sin(e-Math.PI/2)}class EN extends pt{constructor(){super(...arguments),this.type="radar",this.renderType=tt.SVG,this.getLabelDimensions=t=>{const n=I.appendOrSelect(this.getComponentContainer(),"g.tmp-tick"),r=I.appendOrSelect(n,"text").text(t),{width:i,height:s}=I.getSVGElementSize(r.node(),{useBBox:!0});return n.remove(),{width:i,height:s}},this.normalizeFlatData=t=>{const n=this.getOptions(),{angle:r,value:i}=b(n,"radar","axes"),s=b(n,"data","groupMapsTo"),a=EL(this.uniqueKeys.map(o=>this.uniqueGroups.map(l=>({[r]:o,[s]:l,[i]:null}))));return lt(a,t)},this.normalizeGroupedData=t=>{const n=this.getOptions(),{angle:r,value:i}=b(n,"radar","axes"),s=b(n,"data","groupMapsTo");return t.map(({name:a,data:o})=>{const l=this.uniqueKeys.map(c=>({[s]:a,[r]:c,[i]:null}));return{name:a,data:lt(l,o)}})},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g.blobs path").transition("legend-hover-blob").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-blob"})).style("fill-opacity",r=>r.name!==n.datum().name?cr.opacity.unselected:cr.opacity.selected).style("stroke-opacity",r=>r.name!==n.datum().name?cr.opacity.unselected:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g.blobs path").transition("legend-mouseout-blob").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-blob"})).style("fill-opacity",cr.opacity.selected).style("stroke-opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"radar graph"}),{width:r,height:i}=I.getSVGElementSize(n,{useAttrs:!0}),s=this.model.getData(),a=this.model.getGroupedData(),o=this.getOptions(),l=b(o,"data","groupMapsTo"),c=b(o,"radar","axes","value"),{angle:u,value:d}=b(o,"radar","axes"),{xLabelPadding:h,yLabelPadding:f,yTicksNumber:p,minRange:g,xAxisRectHeight:m}=cr;this.uniqueKeys=Array.from(new Set(s.map(C=>C[u]))),this.uniqueGroups=Array.from(new Set(s.map(C=>C[l]))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(a);const E=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+f),S=(Math.min(r,i)-E)/2;if(S<=0)return;const _=Pi().domain(this.fullDataNormalized.map(C=>C[u])).range([0,2*Math.PI].map(C=>C-Math.PI/2)),A=In(this.fullDataNormalized.map(C=>C[d])),L=Be().domain([A>=0?0:A,Vn(this.fullDataNormalized.map(C=>C[d]))]).range([g,S]).nice(p),B=L.ticks(p),k=(C,z,V)=>this.model.getFillColor(C,z,V),O=bT().angle(C=>_(C[u])+Math.PI/2).radius(C=>L(C[d])).curve(ep),H=this.uniqueKeys.map(C=>{const z=this.getLabelDimensions(C).width,V=yN(_(C),S);return z+V}),M={x:Vn(H)+h,y:i/2},U=I.appendOrSelect(n,"g.y-axes").attr("role",ht.GROUP).selectAll("path").data(B,C=>C),$=C=>this.uniqueKeys.map(z=>({[u]:z,[d]:C}));U.join(C=>C.append("path").attr("opacity",0).attr("transform",`translate(${M.x}, ${M.y})`).attr("fill","none").call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_axes_enter",animate:t})).attr("opacity",1).attr("d",V=>O($(V)))),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_axes_update",animate:t})).attr("opacity",1).attr("transform",`translate(${M.x}, ${M.y})`).attr("d",V=>O($(V)))),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_axes_exit",animate:t})).attr("d",V=>O($(V))).attr("opacity",0).remove())),I.appendOrSelect(n,"g.x-axes").attr("role",ht.GROUP).selectAll("line").data(this.uniqueKeys,C=>C).join(C=>C.append("line").attr("opacity",0).attr("class",z=>`x-axis-${Gr(z)}`).attr("stroke-dasharray","0").attr("x1",z=>Ft(_(z),0,M).x).attr("y1",z=>Ft(_(z),0,M).y).attr("x2",z=>Ft(_(z),0,M).x).attr("y2",z=>Ft(_(z),0,M).y).call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_axes_enter",animate:t})).attr("opacity",1).attr("x1",V=>Ft(_(V),L.range()[0],M).x).attr("y1",V=>Ft(_(V),L.range()[0],M).y).attr("x2",V=>Ft(_(V),L.range()[1],M).x).attr("y2",V=>Ft(_(V),L.range()[1],M).y)),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_axes_update",animate:t})).attr("opacity",1).attr("x1",V=>Ft(_(V),L.range()[0],M).x).attr("y1",V=>Ft(_(V),L.range()[0],M).y).attr("x2",V=>Ft(_(V),L.range()[1],M).x).attr("y2",V=>Ft(_(V),L.range()[1],M).y)),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_axes_exit",animate:t})).attr("opacity",0).remove())),I.appendOrSelect(n,"g.x-labels").attr("role",ht.GROUP).selectAll("text").data(this.uniqueKeys).join(C=>C.append("text").text(z=>z).attr("opacity",0).attr("x",z=>Ft(_(z),L.range()[1]+h,M).x).attr("y",z=>Ft(_(z),L.range()[1]+h,M).y).style("text-anchor",z=>zv(_(z)).textAnchor).style("dominant-baseline",z=>zv(_(z)).dominantBaseline).call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_labels_enter",animate:t})).attr("opacity",1)),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_labels_update",animate:t})).attr("opacity",1).attr("x",V=>Ft(_(V),L.range()[1]+h,M).x).attr("y",V=>Ft(_(V),L.range()[1]+h,M).y).end().finally(()=>{const V=b(o,"radar","alignment"),At=this.getAlignmentXOffset(V,n,this.getParent());n.attr("x",At)})),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_labels_exit",animate:t})).attr("opacity",0).remove())),I.appendOrSelect(n,"g.blobs").attr("role",ht.GROUP).selectAll("path").data(this.groupedDataNormalized,C=>C.name).join(C=>C.append("path").attr("class",z=>this.model.getColorClassName({classNameTypes:[at.FILL,at.STROKE],dataGroupName:z.name,originalClassName:"blob"})).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-label",z=>z.name).attr("opacity",0).attr("transform",t?()=>`translate(${M.x}, ${M.y}) scale(${1+Math.random()*.35})`:`translate(${M.x}, ${M.y})`).style("fill",z=>k(z.name,null,z.data)).style("fill-opacity",cr.opacity.selected).style("stroke",z=>k(z.name,null,z.data)).call(z=>{const V=z.transition().call(At=>this.services.transitions.setupTransition({transition:At,name:"radar_blobs_enter",animate:t}));t&&V.delay(()=>Math.random()*30).attr("transform",`translate(${M.x}, ${M.y})`),V.attr("opacity",1).attr("d",At=>O(At.data))}),C=>(C.attr("class",z=>this.model.getColorClassName({classNameTypes:[at.FILL,at.STROKE],dataGroupName:z.name,originalClassName:"blob"})).style("fill",z=>k(z.name,null,z.data)).style("stroke",z=>k(z.name,null,z.data)),C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_blobs_update",animate:t})).attr("opacity",1).attr("transform",`translate(${M.x}, ${M.y})`).attr("d",V=>O(V.data))),C),C=>C.call(z=>{const V=z.transition().call(At=>this.services.transitions.setupTransition({transition:At,name:"radar_blobs_exit",animate:t}));t&&V.delay(()=>Math.random()*30).attr("transform",()=>`translate(${M.x}, ${M.y}) scale(${1+Math.random()*.35})`),V.attr("opacity",0).remove()})),I.appendOrSelect(n,"g.dots").attr("role",ht.GROUP).selectAll("circle").data(this.fullDataNormalized.filter(C=>b(C,d)!==null)).join(C=>C.append("circle").attr("role",ht.GRAPHICS_SYMBOL).attr("aria-label",z=>z[c]),C=>C,C=>C.remove()).attr("class",C=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:C[l],originalClassName:Gr(C[u])})).attr("cx",C=>Ft(_(C[u]),L(C[d]),M).x).attr("cy",C=>Ft(_(C[u]),L(C[d]),M).y).attr("r",0).attr("opacity",0).style("fill",C=>k(C[l])),I.appendOrSelect(n,"g.x-axes-rect").attr("role",ht.GROUP).selectAll("rect").data(this.uniqueKeys).join(C=>C.append("rect"),C=>C,C=>C.remove()).attr("x",M.x).attr("y",M.y-m/2).attr("width",L.range()[1]).attr("height",m).style("fill","red").style("fill-opacity",0).attr("transform",C=>`rotate(${Wv(_(C))}, ${M.x}, ${M.y})`);const{code:vt,number:Y}=b(o,"locale");I.appendOrSelect(n,"g.y-labels").attr("role",ht.GROUP).selectAll("text").data(Ne(B)).join(C=>C.append("text").attr("opacity",0).text(z=>Y(z,vt)).attr("x",z=>Ft(-Math.PI/2,L(z),M).x+f).attr("y",z=>Ft(-Math.PI/2,L(z),M).y).style("text-anchor","start").style("dominant-baseline","middle").call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_labels_enter",animate:t})).attr("opacity",1)),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_labels_update",animate:t})).text(V=>V).attr("opacity",1).attr("x",V=>Ft(-Math.PI/2,L(V),M).x+f).attr("y",V=>Ft(-Math.PI/2,L(V),M).y)),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_labels_exit",animate:t})).attr("opacity",0).remove())),this.addEventListeners()}getAlignmentXOffset(t,n,r){const i=I.getSVGElementSize(n,{useBBox:!0}),{width:s}=I.getSVGElementSize(r,{useAttrs:!0});let a=0;return t===Ht.CENTER?a=Math.floor((s-i.width)/2):t===Ht.RIGHT&&(a=s-i.width),a}destroy(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}addEventListeners(){const t=this,{axes:{angle:n}}=b(this.getOptions(),"radar");this.parent.selectAll(".x-axes-rect > rect").on("mouseover",function(r,i){const s=R(this);t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEOVER,{event:r,element:s,datum:i});const a=t.parent.select(`.x-axes .x-axis-${Gr(i)}`),o=t.parent.selectAll(`.dots circle.${Gr(i)}`),l=t.model.getActiveDataGroupNames(),c=t.getOptions(),{groupMapsTo:u}=c.data,d=b(c,"radar","axes","value");a.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",f=>l.indexOf(f[u])!==-1?1:0).attr("r",cr.dotsRadius);const h=t.fullDataNormalized.filter(f=>f[n]===i&&l.indexOf(f[u])!==-1);t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:r,hoveredElement:s,items:h.filter(f=>typeof f[d]=="number").map(f=>({label:f[u],value:f[d],color:t.model.getFillColor(f[u],null,f),class:t.model.getColorClassName({classNameTypes:[at.TOOLTIP],dataGroupName:f[u]})}))})}).on("mousemove",function(r,i){const s=R(this);t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEMOVE,{event:r,element:s,datum:i}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(T.Radar.X_AXIS_CLICK,{event:r,element:R(this),datum:i})}).on("mouseout",function(r,i){const s=R(this),a=t.parent.select(`.x-axes .x-axis-${Gr(i)}`),o=t.parent.selectAll(`.dots circle.${Gr(i)}`);a.classed("hovered",!1).attr("stroke-dasharray","0"),o.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEOUT,{event:r,element:s,datum:i}),t.services.events.dispatchEvent(T.Tooltip.HIDE)})}}class Yv extends Qu{constructor(){super(...arguments),this.type="simple-bar",this.renderType=tt.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-simple-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getComponentContainer({ariaLabel:"bar graphs",withinChartClip:!0}),s=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),o=i.selectAll("path.bar").data(s,c=>c[r]);o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call(c=>this.services.transitions.setupTransition({transition:c,name:"bar-update-enter",animate:t})).attr("class",c=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:c[r],originalClassName:"bar"})).style("fill",c=>{const u=this.services.cartesianScales.getDomainIdentifier(c);return this.model.getFillColor(c[r],c[u],c)}).attr("d",c=>{const u=this.services.cartesianScales.getRangeIdentifier(),d=this.getBarWidth(),h=c[u],f=this.services.cartesianScales.getDomainValue(c)-d/2,p=f+d;let g,m;if(Array.isArray(h)&&h.length===2)g=this.services.cartesianScales.getRangeValue(h[0]),m=this.services.cartesianScales.getRangeValue(h[1]);else{const y=this.services.cartesianScales.getRangeScale().domain()[0];g=this.services.cartesianScales.getRangeValue(Math.max(0,y)),m=this.services.cartesianScales.getRangeValue(c)}const v=Math.abs(m-g);if(v!==0&&v<2&&(h>0&&a===Bt.VERTICAL||h<0&&a===Bt.HORIZONTAL?m=g-2:m=g+2),!this.isOutsideZoomedDomain(f,p))return ie({x0:f,x1:p,y0:g,y1:m},a)}).attr("opacity",1).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",c=>c.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,r){const i=R(this);i.classed("hovered",!0),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r]})}).on("mousemove",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:n,element:R(this),datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:n,element:R(this),datum:r})}).on("mouseout",function(n,r){const i=R(this);i.classed("hovered",!1),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class bN extends le{constructor(){super(...arguments),this.type="skeleton-lines"}render(t=!0){const n=b(this.getOptions(),"data","loading"),r=!b(this.getOptions(),"grid","x","enabled")&&!b(this.getOptions(),"grid","y","enabled")&&!b(this.getOptions(),"axes","bottom","visible")&&!b(this.getOptions(),"axes","left","visible");n&&!r?super.renderGridSkeleton(n):n&&r?this.renderSparklineSkeleton(n):this.removeSkeleton()}renderSparklineSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")}drawSparkline(t){const n=this.backdrop.attr("width"),r=[100],i=I.appendOrSelect(this.backdrop,"g.y.skeleton"),s=i.selectAll("line").data(r);s.enter().append("line").merge(s).attr("x1",0).attr("x2",n).attr("y1",a=>a).attr("y2",a=>a),i.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const t=this.parent;this.backdrop=I.appendOrSelect(t,"svg.chart-skeleton.DAII"),I.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}class qv extends pt{constructor(){super(...arguments),this.type="area-stacked",this.renderType=tt.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("path.area").transition("legend-hover-area").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-area"})).attr("opacity",s=>b(s,0,i)!==n.datum().name?Tn.opacity.unselected:Tn.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})).attr("opacity",Tn.opacity.selected)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"stacked area graphs",withinChartClip:!0}),r=this,i=this.getOptions(),{groupMapsTo:s}=i.data,a=Object.keys(i.axes).some(p=>i.axes[p].percentage),o=this.model.getStackedData({percentage:a,groups:this.configs.groups}),l=b(o,0,0),c=this.services.cartesianScales.getDomainAxisPosition({datum:l}),u=this.services.cartesianScales.getRangeAxisPosition({datum:l}),d=this.services.cartesianScales.getScaleByPosition(u),h=n.selectAll("path.area").data(o,p=>b(p,0,s));this.areaGenerator=tc().x(p=>this.services.cartesianScales.getValueThroughAxisPosition(c,p.data.sharedStackKey)).y0(p=>d(p[0])).y1(p=>d(p[1])).curve(this.services.curves.getD3Curve()),h.exit().attr("opacity",0).remove(),h.enter().append("path").attr("opacity",0).merge(h).data(o,p=>b(p,0,s)).attr("class","area").attr("class",p=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:b(p,0,s),originalClassName:"area"})).style("fill",p=>r.model.getFillColor(b(p,0,s),null,p)).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",p=>b(p,0,s)).transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"area-update-enter",animate:t})).attr("opacity",Tn.opacity.selected).attr("d",this.areaGenerator)}}class Xv extends Qu{constructor(){super(...arguments),this.type="stacked-bar",this.renderType=tt.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.model.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({ariaLabel:"stacked bar graphs",withinChartClip:!0}),r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),a=this.model.getActiveDataGroupNames(),o=n.selectAll("g.bars").data(s,c=>b(c,0,i));o.exit().attr("opacity",0).remove(),o.enter().append("g").classed("bars",!0).attr("role",ht.GROUP).attr("data-name","bars");const l=n.selectAll("g.bars").selectAll("path.bar").data(c=>c,c=>c.data.sharedStackKey);l.exit().remove(),l.enter().append("path").merge(l).classed("bar",!0).transition().call(c=>this.services.transitions.setupTransition({transition:c,name:"bar-update-enter",animate:t})).attr("class",c=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:c[i],originalClassName:"bar"})).style("fill",c=>this.model.getFillColor(c[i],c.data.sharedStackKey,c.data)).attr("d",c=>{const u=c.data.sharedStackKey,d=this.getBarWidth(),h=this.services.cartesianScales.getDomainValue(u)-d/2,f=h+d,p=this.services.cartesianScales.getRangeValue(c[0]);let g=this.services.cartesianScales.getRangeValue(c[1]);if(!this.isOutsideZoomedDomain(h,f)){if(Math.abs(g-p)>0&&Math.abs(g-p)>r.bars.dividerSize){const m=c[0]<0&&c[1]<=0;m&&a.length>1?this.services.cartesianScales.getOrientation()===Bt.VERTICAL?g+=c[1]===0?2:1:g-=1:m||(this.services.cartesianScales.getOrientation()===Bt.VERTICAL?g+=1:g-=1)}return ie({x0:h,x1:f,y0:p,y1:g},this.services.cartesianScales.getOrientation())}}).attr("opacity",1).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",c=>c[1]-c[0]),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this;this.parent.selectAll("path.bar").on("mouseover",function(i,s){const a=R(this);a.classed("hovered",!0),r.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:i,element:a,datum:s});let l=r.model.getDisplayData(r.configs.groups).find(c=>{const u=r.services.cartesianScales.getDomainIdentifier(c),d=r.services.cartesianScales.getRangeIdentifier(c);return c[d]===s.data[s[n]]&&c[u].toString()===s.data.sharedStackKey&&c[n]===s[n]});if(l===void 0){const c=r.services.cartesianScales.getDomainIdentifier(),u=r.services.cartesianScales.getRangeIdentifier();l={[c]:s.data.sharedStackKey,[u]:s.data[s[n]],[n]:s[n]}}r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:i,hoveredElement:a,data:[l]})}).on("mousemove",function(i,s){const a=R(this);r.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:i,element:a,datum:s}),r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:i})}).on("click",function(i,s){r.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:i,element:R(this),datum:s})}).on("mouseout",function(i,s){const a=R(this);a.classed("hovered",!1),r.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:i,element:a,datum:s}),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:a})})}getBarWidth(){const t=this.getOptions();if(b(t,"bars","width"))return t.bars.width;const n=this.services.cartesianScales.getMainXScale(),r=I.getSVGElementSize(this.parent,{useAttrs:!0}).width,i=this.model.getStackKeys().length,s=b(t,"bars","spacingFactor");return n.step?Math.min(t.bars.maxWidth,n.step()/2):Math.min(t.bars.maxWidth,r*s/i)}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class jv extends on{constructor(){super(...arguments),this.type="scatter-stacked",this.renderType=tt.SVG}render(t){if(!b(this.getOptions(),"points","enabled"))return;const r=this.getComponentContainer({ariaLabel:"scatter points",withinChartClip:!0}),i=this.getOptions(),{groupMapsTo:s}=i.data,a=Object.keys(i.axes).some(f=>i.axes[f].percentage),o=this.model.getStackedData({groups:this.configs.groups,percentage:a}),l=r.selectAll("g.dots").data(o,f=>b(f,0,s));l.exit().attr("opacity",0).remove();const u=l.enter().append("g").classed("dots",!0).attr("role",ht.GROUP).merge(l).selectAll("circle.dot").data(f=>f);u.exit().attr("opacity",0).remove();const h=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u).datum(f=>{const p=f[s],g=this.services.cartesianScales.getDomainIdentifier(f),m=this.services.cartesianScales.getRangeIdentifier(f);return{[s]:p,[g]:f.data.sharedStackKey,[m]:f[1]}});this.styleCircles(h,t),this.addEventListeners()}getTooltipData(t,n){const r=this.getOptions(),{groupMapsTo:i}=r.data,s=Object.keys(r.axes).some(l=>r.axes[l].percentage),a=this.model.getStackedData({groups:this.configs.groups,percentage:s}),o=[];return a.forEach((l,c)=>{l.forEach((u,d)=>{const h=u[i],f=u.data.sharedStackKey;let p=u.data[h];const g=u[1],m=this.services.cartesianScales.getDomainIdentifier(u),v=this.services.cartesianScales.getRangeIdentifier(u);p!=null&&t===this.services.cartesianScales.getDomainValue(f)&&n===this.services.cartesianScales.getRangeValue(g)&&(s&&(p=this.model.getStackedData({groups:this.configs.groups})[c][d].data[h]),p!==null&&o.push({[i]:h,[m]:f,[v]:p}))})}),this.model.getDisplayData(this.configs.groups).filter(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l),u=this.services.cartesianScales.getRangeIdentifier(l);return o.find(d=>d[i]==l[i]&&d[c]==l[c]&&d[u]==l[u])!==void 0})}}const ri=6;class xN extends pt{constructor(){super(...arguments),this.type="tree",this.renderType=tt.SVG}getLongestLabel(t){let n="";return t.forEach(r=>{const i=r.children?this.getLongestLabel(r.children):"";(i.length>n.length||r.name.length>n.length)&&(n=i.length>r.name.length?i:r.name)}),n}getMockLabelWidth(t,n){const r=t.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(n),{width:i}=I.getSVGElementSize(r.node(),{useBBox:!0});return r.remove(),i}render(t=!0){const n=this.getComponentContainer({ariaLabel:"tree diagram"});n.html("");const{width:r,height:i}=I.getSVGElementSize(this.parent,{useAttrs:!0});if(r<1||i<1)return;const s=this.model.getOptions(),a=this.model.getDisplayData(),o=b(s,"tree","rootTitle")||"Tree",l=this.getMockLabelWidth(n,o),c=this.getLongestLabel(a),u=this.getMockLabelWidth(n,c),d={top:0,left:l>0?l+ri:30-ri},h=Ri({name:o,children:a}),f=10,p=r/6,g=_=>{const A=h.descendants().reverse(),L=h.links();let B=h,k=h;h.eachBefore(N=>{N.x<B.x&&(B=N),N.x>k.x&&(k=N)});const O=k.x-B.x,H=n.transition().call(N=>this.services.transitions.setupTransition({transition:N,name:"tree-update-viewbox",animate:!0})).attr("viewBox",[-d.left,B.x,r,O].join(" ")),P=S.selectAll("g").data(A,N=>N.id),M=this,w=P.enter().append("g").attr("transform",()=>`translate(${_.y0},${_.x0})`).attr("class",N=>N.depth!==0&&N.children&&N.children.length>0?"clickable":null).on("mouseover",function(N,F){M.services.events.dispatchEvent(T.Tree.NODE_MOUSEOVER,{event:N,element:R(this),datum:F})}).on("click",function(N,F){F.depth!==0&&(F.children=F.children?null:F._children,g(F)),M.services.events.dispatchEvent(T.Tree.NODE_CLICK,{event:N,element:R(this),datum:F})}).on("mouseout",function(N,F){M.services.events.dispatchEvent(T.Tree.NODE_MOUSEOUT,{event:N,element:R(this),datum:F})});w.append("circle").attr("r",2.5).attr("class",N=>N._children?"parent":"child").attr("stroke-width",10),w.append("text").attr("dy","0.31em").attr("x",N=>N._children?-ri:ri).attr("text-anchor",N=>N._children?"end":"start").text(N=>N.data.name).clone(!0).attr("class","text-stroke").lower(),P.merge(w).transition(H).attr("transform",N=>`translate(${N.y},${N.x})`).attr("fill-opacity",1).attr("stroke-opacity",1),P.exit().transition(H).remove().attr("transform",()=>`translate(${_.y},${_.x})`).attr("fill-opacity",0).attr("stroke-opacity",0);const U=x.selectAll("path").data(L,N=>N.target.id),$=U.enter().append("path").attr("d",()=>{const N={x:_.x0,y:_.y0};return y({source:N,target:N})});U.merge($).transition(H).attr("d",y),U.exit().transition(H).remove().attr("d",()=>{const N={x:_.x,y:_.y};return y({source:N,target:N})}),h.eachBefore(N=>{N.x0=N.x,N.y0=N.y})},m=h.descendants(),v=m[m.length-1].depth,E=b(s,"tree","type")===qa.DENDROGRAM?Hx().size([i,r-u-v*ri-l]):A_().nodeSize([f,p]).size([i,r-u-v*ri-l]),y=wT().x(_=>_.y).y(_=>_.x);h.x0=p/2,h.y0=0,h.descendants().forEach((_,A)=>{_.id=A,_._children=_.children}),E(h),n.attr("viewBox",[-d.left,-d.top,r,f]).style("user-select","none");const x=n.append("g").attr("class","links"),S=n.append("g").attr("class","nodes");g(h)}}var _N="#000000",SN="#ffffff",TN="#fcf4d6",ON="#fddc69",wN="#f1c21b",MN="#d2a106",AN="#b28600",CN="#8e6a00",DN="#684e00",LN="#483700",RN="#302400",IN="#1c1500",kN={10:TN,20:ON,30:wN,40:MN,50:AN,60:CN,70:DN,80:LN,90:RN,100:IN},PN="#fff2e8",NN="#ffd9be",$N="#ffb784",FN="#ff832b",UN="#eb6200",BN="#ba4e00",HN="#8a3800",GN="#5e2900",VN="#3e1a00",zN="#231000",WN={10:PN,20:NN,30:$N,40:FN,50:UN,60:BN,70:HN,80:GN,90:VN,100:zN},YN="#fff1f1",qN="#ffd7d9",XN="#ffb3b8",jN="#ff8389",ZN="#fa4d56",KN="#da1e28",QN="#a2191f",JN="#750e13",t$="#520408",e$="#2d0709",n$={10:YN,20:qN,30:XN,40:jN,50:ZN,60:KN,70:QN,80:JN,90:t$,100:e$},r$="#fff0f7",i$="#ffd6e8",s$="#ffafd2",a$="#ff7eb6",o$="#ee5396",l$="#d02670",c$="#9f1853",u$="#740937",h$="#510224",d$="#2a0a18",f$={10:r$,20:i$,30:s$,40:a$,50:o$,60:l$,70:c$,80:u$,90:h$,100:d$},p$="#f6f2ff",g$="#e8daff",m$="#d4bbff",v$="#be95ff",y$="#a56eff",E$="#8a3ffc",b$="#6929c4",x$="#491d8b",_$="#31135e",S$="#1c0f30",T$={10:p$,20:g$,30:m$,40:v$,50:y$,60:E$,70:b$,80:x$,90:_$,100:S$},O$="#edf5ff",w$="#d0e2ff",M$="#a6c8ff",A$="#78a9ff",C$="#4589ff",D$="#0f62fe",L$="#0043ce",R$="#002d9c",I$="#001d6c",k$="#001141",P$={10:O$,20:w$,30:M$,40:A$,50:C$,60:D$,70:L$,80:R$,90:I$,100:k$},N$="#e5f6ff",$$="#bae6ff",F$="#82cfff",U$="#33b1ff",B$="#1192e8",H$="#0072c3",G$="#00539a",V$="#003a6d",z$="#012749",W$="#061727",Y$={10:N$,20:$$,30:F$,40:U$,50:B$,60:H$,70:G$,80:V$,90:z$,100:W$},q$="#d9fbfb",X$="#9ef0f0",j$="#3ddbd9",Z$="#08bdba",K$="#009d9a",Q$="#007d79",J$="#005d5d",tF="#004144",eF="#022b30",nF="#081a1c",rF={10:q$,20:X$,30:j$,40:Z$,50:K$,60:Q$,70:J$,80:tF,90:eF,100:nF},iF="#defbe6",sF="#a7f0ba",aF="#6fdc8c",oF="#42be65",lF="#24a148",cF="#198038",uF="#0e6027",hF="#044317",dF="#022d0d",fF="#071908",pF={10:iF,20:sF,30:aF,40:oF,50:lF,60:cF,70:uF,80:hF,90:dF,100:fF},gF="#f2f4f8",mF="#dde1e6",vF="#c1c7cd",yF="#a2a9b0",EF="#878d96",bF="#697077",xF="#4d5358",_F="#343a3f",SF="#21272a",TF="#121619",OF={10:gF,20:mF,30:vF,40:yF,50:EF,60:bF,70:xF,80:_F,90:SF,100:TF},wF="#f4f4f4",MF="#e0e0e0",AF="#c6c6c6",CF="#a8a8a8",DF="#8d8d8d",LF="#6f6f6f",RF="#525252",IF="#393939",kF="#262626",PF="#161616",NF={10:wF,20:MF,30:AF,40:CF,50:DF,60:LF,70:RF,80:IF,90:kF,100:PF},$F="#f7f3f2",FF="#e5e0df",UF="#cac5c4",BF="#ada8a8",HF="#8f8b8b",GF="#726e6e",VF="#565151",zF="#3c3838",WF="#272525",YF="#171414",qF={10:$F,20:FF,30:UF,40:BF,50:HF,60:GF,70:VF,80:zF,90:WF,100:YF},Zv={black:{100:_N},blue:P$,coolGray:OF,cyan:Y$,gray:NF,green:pF,magenta:f$,orange:WN,purple:T$,red:n$,teal:rF,warmGray:qF,white:{0:SN},yellow:kN};const XF=e=>{if(!e)return null;for(const t of Object.keys(Zv)){const n=Zv[t];for(const r of Object.keys(n))if(n[+r]===e)return r}return null},Kv=function(e){const t=R(this.parentNode).select("rect.leaf"),n=e.backgroundColor??getComputedStyle(t.node(),null).getPropertyValue("fill"),r=hn(n);let i;if(r&&(i=XF(r?r.hex():null)),i==null){const s=Ph(r).l;i=Math.abs(s*100-100)}return i>50?"white":"black"};let jF=0;class ZF extends pt{constructor(){super(...arguments),this.type="treemap",this.renderType=tt.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g[data-name='leaf']").transition("legend-hover-treemap").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-treemap"})).attr("opacity",r=>r.parent.data.name===n.datum().name?1:.3)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g[data-name='leaf']").transition("legend-mouseout-treemap").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-treemap"})).attr("opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"treemap"});this.model.getData();const r=this.model.getDisplayData(),i=this.model.getOptions(),s=b(window,"location"),{width:a,height:o}=I.getSVGElementSize(n,{useAttrs:!0}),l=Ri({name:i.title||"Treemap",children:r}).sum(g=>g.value).sort((g,m)=>m.value-g.value),c=I_().size([a,o]).paddingInner(1).paddingOuter(0).round(!0)(l),u=n.selectAll("g[data-name='leaf']").data(c.leaves(),g=>g.data.name);u.exit().attr("opacity",0).remove();const h=u.enter().append("g").attr("data-name","leaf").attr("data-uid",()=>jF++).merge(u);h.attr("data-name","leaf").transition().call(g=>this.services.transitions.setupTransition({transition:g,name:"treemap-group-update",animate:t})).attr("transform",g=>`translate(${g.x0},${g.y0})`);const f=h.selectAll("rect.leaf").data(g=>[g]);f.exit().attr("width",0).attr("height",0).remove(),f.enter().append("rect").classed("leaf",!0).merge(f).attr("width",0).attr("height",0).attr("id",function(){const g=R(this.parentNode).attr("data-uid");return`${i.style.prefix}-leaf-${g}`}).attr("class",g=>{for(;g.depth>1;)g=g.parent;return this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:g.data.name,originalClassName:"leaf"})}).transition().call(g=>this.services.transitions.setupTransition({transition:g,name:"treemap-leaf-update-enter",animate:t})).attr("width",g=>g.x1-g.x0).attr("height",g=>g.y1-g.y0).style("fill",g=>{for(;g.depth>1;)g=g.parent;return this.model.getFillColor(g.data.name,null,g.data)}),h.selectAll("clipPath").data(g=>g.data.showLabel!==!0?[]:[1],g=>g).join(g=>g.append("clipPath").attr("id",function(){const m=R(this.parentNode).attr("data-uid");return`${i.style.prefix}-clip-${m}`}).append("use").attr("xlink:href",function(){const m=R(this.parentNode.parentNode).attr("data-uid"),v=`${i.style.prefix}-leaf-${m}`;return new URL(`#${v}`,s)+""}),g=>null,g=>g.remove()),h.selectAll("text").data(g=>{if(g.data.showLabel!==!0)return[];let m=g;for(;m.depth>1;)m=m.parent;return[{text:g.data.name,backgroundColor:this.model.getFillColor(m.data.name)}]},g=>g).join(g=>{const m=g.append("text").text(v=>v.text).style("fill",Kv).attr("x",7).attr("y",18);return s&&m.attr("clip-path",function(){const v=R(this.parentNode).attr("data-uid"),E=`${i.style.prefix}-clip-${v}`;return`url(${new URL(`#${E}`,s)+""})`}),m},g=>g.text(m=>m.text).style("fill",Kv),g=>g.remove()),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("rect.leaf").on("mouseover",function(n,r){const i=R(this);let s=getComputedStyle(this,null).getPropertyValue("fill"),a=r;for(;a.depth>1;)a=a.parent;i.transition("graph_element_mouseover_fill_update").call(o=>t.services.transitions.setupTransition({transition:o,name:"graph_element_mouseover_fill_update"})).style("fill",o=>{const l=t.model.getFillColor(o.parent.data.name,null,o.data);return l&&(s=l),hn(s).darker(.7).toString()}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{color:s,label:a.data.name,bold:!0},{label:r.data.name,value:r.data.value}]}),t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEOVER,{event:n,element:i,datum:r})}).on("mousemove",function(n,r){const i=R(this);t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Treemap.LEAF_CLICK,{event:n,element:R(this),datum:r})}).on("mouseout",function(n,r){const i=R(this);i.classed("hovered",!1);let s=r;for(;s.depth>1;)s=s.parent;i.transition().call(a=>t.services.transitions.setupTransition({transition:a,name:"graph_element_mouseout_fill_update"})).style("fill",a=>t.model.getFillColor(a.parent.data.name,null,a.data)),t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}}var KF={value:function(){}};function Qv(){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 xo(n)}function xo(e){this._=e}function QF(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}})}xo.prototype=Qv.prototype={constructor:xo,on:function(e,t){var n=this._,r=QF(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=JF(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]=Jv(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Jv(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 xo(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 JF(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Jv(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=KF,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}const tU=C2(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Qv},Symbol.toStringTag,{value:"Module"}))).dispatch,Ju=Math.PI/180,eU={archimedean:e0,rectangular:dU},Ss=64,_o=2048;var nU=function(){var e=[256,256],t=rU,n=iU,r=sU,i=t0,s=t0,a=aU,o=oU,l=e0,c=[],u=1/0,d=tU("word","end"),h=null,f=Math.random,p={},g=pU;p.canvas=function(E){return arguments.length?(g=Hn(E),p):g},p.start=function(){var E=m(g()),y=fU((e[0]>>5)*e[1]),x=null,S=c.length,_=-1,A=[],L=c.map(function(k,O){return k.text=t.call(this,k,O),k.font=n.call(this,k,O),k.style=i.call(this,k,O),k.weight=s.call(this,k,O),k.rotate=a.call(this,k,O),k.size=~~r.call(this,k,O),k.padding=o.call(this,k,O),k}).sort(function(k,O){return O.size-k.size});return h&&clearInterval(h),h=setInterval(B,0),B(),p;function B(){for(var k=Date.now();Date.now()-k<u&&++_<S&&h;){var O=L[_];O.x=e[0]*(f()+.5)>>1,O.y=e[1]*(f()+.5)>>1,lU(E,O,L,_),O.hasText&&v(y,O,x)&&(A.push(O),d.call("word",p,O),x?uU(x,O):x=[{x:O.x+O.x0,y:O.y+O.y0},{x:O.x+O.x1,y:O.y+O.y1}],O.x-=e[0]>>1,O.y-=e[1]>>1)}_>=S&&(p.stop(),d.call("end",p,A,x))}},p.stop=function(){h&&(clearInterval(h),h=null);for(const E of c)delete E.sprite;return p};function m(E){const y=E.getContext("2d",{willReadFrequently:!0});E.width=E.height=1;const x=Math.sqrt(y.getImageData(0,0,1,1).data.length>>2);return E.width=(Ss<<5)/x,E.height=_o/x,y.fillStyle=y.strokeStyle="red",{context:y,ratio:x}}function v(E,y,x){e[0],e[1];for(var S=y.x,_=y.y,A=Math.sqrt(e[0]*e[0]+e[1]*e[1]),L=l(e),B=f()<.5?1:-1,k=-B,O,H,P;(O=L(k+=B))&&(H=~~O[0],P=~~O[1],!(Math.min(Math.abs(H),Math.abs(P))>=A));)if(y.x=S+H,y.y=_+P,!(y.x+y.x0<0||y.y+y.y0<0||y.x+y.x1>e[0]||y.y+y.y1>e[1])&&(!x||hU(y,x))&&!cU(y,E,e[0])){for(var M=y.sprite,w=y.width>>5,U=e[0]>>5,$=y.x-(w<<4),N=$&127,F=32-N,j=y.y1-y.y0,q=(y.y+y.y0)*U+($>>5),ot,it=0;it<j;it++){ot=0;for(var mt=0;mt<=w;mt++)E[q+mt]|=ot<<F|(mt<w?(ot=M[it*w+mt])>>>N:0);q+=U}return!0}return!1}return p.timeInterval=function(E){return arguments.length?(u=E??1/0,p):u},p.words=function(E){return arguments.length?(c=E,p):c},p.size=function(E){return arguments.length?(e=[+E[0],+E[1]],p):e},p.font=function(E){return arguments.length?(n=Hn(E),p):n},p.fontStyle=function(E){return arguments.length?(i=Hn(E),p):i},p.fontWeight=function(E){return arguments.length?(s=Hn(E),p):s},p.rotate=function(E){return arguments.length?(a=Hn(E),p):a},p.text=function(E){return arguments.length?(t=Hn(E),p):t},p.spiral=function(E){return arguments.length?(l=eU[E]||E,p):l},p.fontSize=function(E){return arguments.length?(r=Hn(E),p):r},p.padding=function(E){return arguments.length?(o=Hn(E),p):o},p.random=function(E){return arguments.length?(f=E,p):f},p.on=function(){var E=d.on.apply(d,arguments);return E===d?p:E},p};function rU(e){return e.text}function iU(){return"serif"}function t0(){return"normal"}function sU(e){return Math.sqrt(e.value)}function aU(){return(~~(random()*6)-3)*30}function oU(){return 1}function lU(e,t,n,r){if(!t.sprite){var i=e.context,s=e.ratio;i.clearRect(0,0,(Ss<<5)/s,_o/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;const O=i.measureText(t.text),H=-Math.floor(O.width/2);let P=(O.width+1)*s,M=t.size<<1;if(t.rotate){var u=Math.sin(t.rotate*Ju),d=Math.cos(t.rotate*Ju),h=P*d,f=P*u,p=M*d,g=M*u;P=Math.max(Math.abs(h+g),Math.abs(h-g))+31>>5<<5,M=~~Math.max(Math.abs(f+p),Math.abs(f-p))}else P=P+31>>5<<5;if(M>l&&(l=M),a+P>=Ss<<5&&(a=0,o+=l,l=0),o+M>=_o)break;i.translate((a+(P>>1))/s,(o+(M>>1))/s),t.rotate&&i.rotate(t.rotate*Ju),i.fillText(t.text,H,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,H,0)),i.restore(),t.width=P,t.height=M,t.xoff=a,t.yoff=o,t.x1=P>>1,t.y1=M>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,a+=P}for(var m=i.getImageData(0,0,(Ss<<5)/s,_o/s).data,v=[];--r>=0;)if(t=n[r],!!t.hasText){for(var E=t.width,y=E>>5,x=t.y1-t.y0,S=0;S<x*y;S++)v[S]=0;if(a=t.xoff,a==null)return;o=t.yoff;for(var _=0,A=-1,L=0;L<x;L++){for(var S=0;S<E;S++){var B=y*L+(S>>5),k=m[(o+L)*(Ss<<5)+(a+S)<<2]?1<<31-S%32:0;v[B]|=k,_|=k}_?A=L:(t.y0++,x--,L--,o++)}t.y1=t.y0+A,t.sprite=v.slice(0,(t.y1-t.y0)*y)}}}function cU(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,d=0;d<l;d++){u=0;for(var h=0;h<=i;h++)if((u<<o|(h<i?(u=r[d*i+h])>>>a:0))&t[c+h])return!0;c+=n}return!1}function uU(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 hU(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 e0(e){var t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function dU(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 fU(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}function pU(){return document.createElement("canvas")}function Hn(e){return typeof e=="function"?e:function(){return e}}const gU=A2(nU);class mU extends pt{constructor(){super(...arguments),this.type="wordcloud",this.renderType=tt.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("text.word").transition("legend-hover-wordcloud").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-wordcloud"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("text.word").transition("legend-mouseout-wordcloud").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-wordcloud"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this,r=this.getComponentContainer({ariaLabel:"word cloud"}).attr("width","100%").attr("height","100%"),i=this.model.getDisplayData(),s=this.getFontSizeScale(i),a=this.getOptions(),{fontSizeMapsTo:o,wordMapsTo:l}=a.wordCloud,{groupMapsTo:c}=a.data,{width:u,height:d}=I.getSVGElementSize(r,{useAttrs:!0});if(u===0||d===0)return;const h=gU().size([u,d]).words(i.map(function(p){const g=p[o];if(typeof p[o]!="number")throw Error("Badly formatted WordCloud data. `value` should only be an integer or float");return{[c]:p[c],text:p[l],size:g,value:g}})).padding(5).rotate(0).fontSize(p=>s(p.size)).on("end",f);h.start();function f(p){const g=I.appendOrSelect(r,"g.words");g.attr("transform",`translate(${h.size()[0]/2}, ${h.size()[1]/2})`);const m=g.selectAll("text").data(p,E=>`${E[c]}-${E.text}`);m.exit().attr("opacity",0).remove(),m.enter().append("text").attr("opacity",0).merge(m).style("font-size",E=>`${E.size}px`).text(function(E){return E.text}).attr("class",E=>n.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:E[c],originalClassName:`word ${E.size>32?"light":""}`})).style("fill",E=>n.model.getFillColor(E[c],E.text,E)).attr("text-anchor","middle").transition().call(E=>n.services.transitions.setupTransition({transition:E,name:"wordcloud-text-update-enter",animate:t})).attr("transform",E=>`translate(${E.x}, ${E.y})`).attr("opacity",1)}this.addEventListeners()}getFontSizeScale(t){const n=this.getOptions(),{fontSizeMapsTo:r}=n.wordCloud,i=t.map(l=>l[r]).filter(l=>l),s=I.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,o=a?Ne(i):[1,1];return Be().domain(o).range(a?n.wordCloud.fontSizeRange(s,t):[4,4])}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=Ya(s=>{const a=r.parent.selectAll("text.word").transition("wordcloud-word-mouse-highlight").call(o=>r.services.transitions.setupTransition({transition:o,name:"wordcloud-word-mouse-highlight"}));s===null?a.attr("opacity",1):a.attr("opacity",function(){return s===this?1:.3})},6);this.parent.selectAll("text.word").on("mouseover",function(s,a){const o=this;i(o),r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEOVER,{event:s,element:R(this),datum:a}),r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:t.tooltip.wordLabel,value:a.text},{label:t.tooltip.valueLabel,value:a.value},{label:yt(t,"locale.translations.group")||yt(t,"tooltip.groupLabel")||"Group",value:a[n],class:r.model.getColorClassName({classNameTypes:[at.TOOLTIP],dataGroupName:a[n]})}]})}).on("mousemove",function(s,a){const o=R(this);r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEMOVE,{element:o,datum:a}),r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:s})}).on("click",function(s,a){r.services.events.dispatchEvent(T.WordCloud.WORD_CLICK,{event:s,element:R(this),datum:a})}).on("mouseout",function(s,a){const o=R(this);i(null),r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEOUT,{event:s,element:o,datum:a}),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:o})})}}class vU extends pt{constructor(){super(...arguments),this.type="geo",this.renderType=tt.SVG}render(){const t=this.getComponentContainer({withinChartClip:!0}),{width:n,height:r}=I.getSVGElementSize(t,{useAttrs:!0});if(n<1||r<1)return;const i=this.getProjection(),s=b(this.getOptions(),"geoData"),a=this.model.getCombinedData(),o={},l={};Object.keys(a).forEach(v=>{typeof a[v].value=="number"?o[v]=a[v]:l[v]=a[v]});const c=sN(s,Object.values(l)),u=nN(s,{type:"GeometryCollection",geometries:Object.values(o)}),d=i.fitSize([n,r],u),h=fx().projection(d);I.appendOrSelect(t,"g.geo").selectAll("path").data(u.features).join("path").attr("d",h);const p=this.services.domUtils.generateElementIDString("geo-pattern-stripes"),g=I.appendOrSelect(t,"defs");I.appendOrSelect(g,"pattern").attr("id",p).attr("width",5).attr("height",10).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("path").classed("pattern-fill",!0).attr("d",Gi()([[0,0],[0,10]]));const m=I.appendOrSelect(t,"g.missing-data");I.appendOrSelect(m,"path").datum(c).attr("d",h).style("fill",`url(#${p})`)}getProjection(){let t=null;switch(b(this.getOptions(),"thematic","projection")){case rn.geoEqualEarth:t=Rx();break;case rn.geoAlbers:t=Ox();break;case rn.geoConicEqualArea:t=ef();break;case rn.geoConicEquidistant:t=Dx();break;case rn.geoEquirectangular:t=Ax();break;case rn.geoMercator:t=wx();break;case rn.geoNaturalEarth1:t=Ix();break;default:throw new Error("Projection is not supported.")}return t}}class yU extends vU{constructor(){super(...arguments),this.type="choropleth"}render(t=!0){super.render();const n=this.model.getCombinedData();this.getComponentContainer({ariaLabel:"map",withinChartClip:!0}).select("g.geo").selectAll("path").classed("border",!0).attr("class",s=>this.model.getColorClassName({value:n[s.properties.NAME].value,originalClassName:"border"})),this.addCountryAreaEventListener()}addCountryAreaEventListener(){const t=this,n=this.model.getCombinedData();this.parent.selectAll("path.border").on("mouseover",function(r,i){const s=R(this);t.services.events.dispatchEvent(zr.CHOROPLETH_MOUSEOVER,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Vr.SHOW,{event:r,hoveredElement:s,items:[{label:i.properties.NAME,value:n[i.properties.NAME].value}]})}).on("mousemove",function(r,i){t.services.events.dispatchEvent(zr.CHOROPLETH_MOUSEMOVE,{event:r,element:R(this),datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Vr.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(zr.CHOROPLETH_CLICK,{event:r,element:R(this),datum:n[i.properties.NAME]})}).on("mouseout",function(r,i){const s=R(this);t.services.events.dispatchEvent(zr.CHOROPLETH_MOUSEOUT,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Vr.HIDE,{event:r,hoveredElement:s})})}}class n0 extends qe{constructor(t,n){super(t,n),this.model=new QP(this.services),this.model.setOptions(It(Mt.choroplethChart,n.options)),this.init(t,n)}getChartComponents(t,n){const r=this.model.getOptions(),i=b(r,"toolbar","enabled"),s=!!this.model.getOptions().title,a={id:"title",components:[new bs(this.model,this.services)],growth:ct.STRETCH},o={id:"toolbar",components:[new Qr(this.model,this.services)],growth:ct.PREFERRED},l={id:"header",components:[new oe(this.model,this.services,[a,...i?[o]:[]],{direction:wt.ROW,alignItems:or.CENTER})],growth:ct.PREFERRED},c={id:"legend",components:[new Uv(this.model,this.services,{chartType:"choropleth"})],growth:ct.PREFERRED,renderType:tt.SVG},u={id:"graph-frame",components:t,growth:ct.STRETCH,renderType:tt.SVG},d=b(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=wt.COLUMN_REVERSE,f={id:"spacer",components:[new Dn(this.model,this.services,{size:15})],growth:ct.PREFERRED},p={id:"full-frame",components:[new oe(this.model,this.services,[...d?[c]:[],...d?[f]:[],u],{direction:h})],growth:ct.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new Dn(this.model,this.services,i?{size:15}:void 0)],growth:ct.PREFERRED};g.push(m)}return g.push(p),[new Bu(this.model,this.services),new mo(this.model,this.services),new oe(this.model,this.services,g,{direction:wt.COLUMN})]}getComponents(){const t=[new yU(this.model,this.services)];return this.getChartComponents(t)}}class EU extends sn{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=lt({},t,this.getZoomOptions(t));iu(n,r);const i=this.getHierarchyLevel(),s=b(n,"circlePack","depth");this.set({options:lt(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&&b(n,0,"children")?b(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}),b(r,"canvasZoom","enabled")===!0&&s>2?{legend:{additionalItems:[{type:Vt.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(),{number:n,code:r}=b(this.getOptions(),"locale"),i=["Child","Parent","Value"],s=[];return t.forEach(a=>{let o=a.value?a.value:0;a.children&&(o+=this.getChildrenDatums(a.children,a.name,s,0)),s.push(["–",a.name,n(o,r)])}),super.formatTable({headers:i,cells:s})}getChildrenDatums(t,n,r=[],i=0){const s=n,{number:a,code:o}=b(this.getOptions(),"locale");return t.forEach(l=>{const c=l.name;let u=0;if(l.children)l.children.length>0&&(typeof l.value=="number"&&(i+=l.value),u+=this.getChildrenDatums(l.children,c,r,u),r.push([c,s,a(u,o)]),i+=u);else{let d=0;typeof l.value=="number"&&(d=l.value,i+=l.value),r.push([l.name,s,a(d,o)])}}),i}}class bU extends qe{constructor(t,n){super(t,n),this.model=new EU(this.services),this.model.setOptions(It(Mt.circlePackChart,n.options)),this.init(t,n)}getComponents(){const t=[new cN(this.model,this.services)];return this.getChartComponents(t)}}const r0={[be.LINE]:[ei,on],[be.SCATTER]:[on],[be.AREA]:[Iv,ei,on],[be.STACKED_AREA]:[qv,ei,jv,bo],[be.SIMPLE_BAR]:[Yv],[be.GROUPED_BAR]:[Vv,ni],[be.STACKED_BAR]:[Xv,bo]};class xU extends pe{constructor(t,n){super(t,n);const r=It(Mt.comboChart,n.options);n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),r.comboChartTypes=[{type:be.LINE,correspondingDatasets:[]}]),this.model.setOptions(r),this.init(t,n)}getGraphComponents(){const{comboChartTypes:t}=this.model.getOptions();let n=0;const r=t.map(i=>{const s=i.type;let a;if(typeof i.type=="string"){if(!Object.keys(r0).includes(i.type))return console.error(`Invalid chart type "${i.type}" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.`),null;let o=!1;const l=`${UA(i.type)}Chart`;return a=lt({},Mt[l],this.model.getOptions(),i.options),i.type===be.STACKED_AREA&&(o=!0),r0[i.type].map(c=>new c(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a,stacked:o}))}else return a=lt({},this.model.getOptions(),i.options),new s(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a})}).filter(i=>i!==null);return xc(r)}getComponents(){const{comboChartTypes:t}=this.model.getOptions(),n=t.some(s=>s.type===be.STACKED_BAR||s.type===be.STACKED_AREA),r=[new ge(this.model,this.services),new Te(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.GRID}),...n?[]:[new Un(this.model,this.services)],...this.getGraphComponents()];return this.getAxisChartComponents(r)}}class _U extends sn{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,{valueMapsTo:i}=n.pie,{number:s,code:a}=b(n,"locale"),o=["Group","Value"],l=[...t.map(c=>[c[r],c[i]===null?"–":s(c[i],a)])];return super.formatTable({headers:o,cells:l})}sanitize(t){return this.getTabularData(t).sort((r,i)=>i.value-r.value)}}class i0 extends qe{constructor(t,n,r=!1){super(t,n),this.model=new _U(this.services),!r&&(this.model.setOptions(It(Mt.pieChart,n.options)),this.init(t,n))}getComponents(){const t=[new Bv(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.PIE})];return this.getChartComponents(t)}}class SU extends i0{constructor(t,n){super(t,n,!0),this.model.setOptions(It(Mt.donutChart,n.options)),this.init(t,n)}getComponents(){const t=[new hN(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.DONUT})];return this.getChartComponents(t)}}class TU extends sn{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,{number:i,code:s}=b(this.getOptions(),"locale"),a=["Group","Value"],o=[...t.map(l=>[l[r],l.value===null?"–":i(l.value,s)])];return super.formatTable({headers:a,cells:o})}}class OU extends qe{constructor(t,n){super(t,n),this.model=new TU(this.services),this.model.setOptions(It(Mt.gaugeChart,n.options)),this.init(t,n)}getComponents(){const t=[new dN(this.model,this.services)];return this.getChartComponents(t)}}class wU extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.groupedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new Vv(this.model,this.services),new ni(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class MU extends pr{constructor(t){super(t),this.axisFlavor=as.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const n=b(this.getOptions(),"axes");if(b(n,"left","scaleType")&&b(n,"left","scaleType")!==Q.LABELS||b(n,"right","scaleType")&&b(n,"right","scaleType")!==Q.LABELS||b(n,"top","scaleType")&&b(n,"top","scaleType")!==Q.LABELS||b(n,"bottom","scaleType")&&b(n,"bottom","scaleType")!==Q.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const t=Ne(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(Ve(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(Ve(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(Ve(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]=Sn(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(Sn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),this._domains=[],this._ranges=[],this._matrix={},n}getMatrixAsArray(){Ve(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(),{number:i,code:s}=b(this.getOptions(),"locale"),a=[n.label,r.label,"Value"],o=[...t.map(l=>[l[n.identifier]===null?"–":l[n.identifier],l[r.identifier]===null?"–":l[r.identifier],l.value===null?"–":i(l.value,s)])];return super.formatTable({headers:a,cells:o})}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=this.getOptions(),n=b(t,"color","gradient","colors"),r=!Ve(n);let i=b(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=Bl().domain(s).range(o);const l=b(this.getOptions(),"color");this._colorScale=$v(this.getDisplayData(),l)}}class AU extends pe{constructor(t,n){super(t,n),this.model=new MU(this.services),this.model.setOptions(It(Mt.heatmapChart,n.options)),this.init(t,n)}getAxisChartComponents(t,n){const r=this.model.getOptions(),i=b(r,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const s=!!this.model.getOptions().title,a={id:"title",components:[new bs(this.model,this.services)],growth:ct.STRETCH},o={id:"toolbar",components:[new Qr(this.model,this.services)],growth:ct.PREFERRED},l={id:"header",components:[new oe(this.model,this.services,[a,...i?[o]:[]],{direction:wt.ROW,alignItems:or.CENTER})],growth:ct.PREFERRED},c={id:"legend",components:[new Uv(this.model,this.services,{chartType:"heatmap"})],growth:ct.PREFERRED,renderType:tt.SVG},u={id:"graph-frame",components:t,growth:ct.STRETCH,renderType:tt.SVG},d=b(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=wt.COLUMN_REVERSE,f={id:"spacer",components:[new Dn(this.model,this.services,{size:15})],growth:ct.PREFERRED},p={id:"full-frame",components:[new oe(this.model,this.services,[...d?[c]:[],...d?[f]:[],u],{direction:h})],growth:ct.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new Dn(this.model,this.services,i?{size:15}:void 0)],growth:ct.PREFERRED};g.push(m)}return g.push(p),[new _v(this.model,this.services),new mo(this.model,this.services),new oe(this.model,this.services,g,{direction:wt.COLUMN})]}getComponents(){const t=[new ge(this.model,this.services),new fN(this.model,this.services)];return this.getAxisChartComponents(t)}}class CU extends pr{getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,{number:r,code:i}=b(this.getOptions(),"locale"),s=this.getBinnedStackedData(),a=[yt(t,"bins.rangeLabel")||"Range",...s.map(l=>yt(l,`0.${n}`))],o=[...yt(s,0).map((l,c)=>[`${r(Number(yt(l,"data.x0")),i)} – ${r(Number(yt(l,"data.x1")),i)}`,...s.map(u=>r(yt(u[c],`data.${yt(u[c],n)}`),i))])];return super.formatTable({headers:a,cells:o})}}class DU extends pe{constructor(t,n){super(t,n),this.model=new CU(this.services),this.model.setOptions(It(Mt.histogramChart,n.options)),this.init(t,n),this.update()}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new oN(this.model,this.services),new pN(this.model,this.services)];return this.getAxisChartComponents(t)}}class LU extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.lineChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new Un(this.model,this.services),new ei(this.model,this.services),new on(this.model,this.services,{handleThresholds:!0}),new bN(this.model,this.services),new ni(this.model,this.services)];return this.getAxisChartComponents(t)}}class RU extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.lollipopChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new Un(this.model,this.services),new gN(this.model,this.services),new on(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class IU extends sn{constructor(t){super(t)}getMaximumDomain(t){return t.reduce((r,i)=>r+i.value,0)}getFillColor(t){const n=this.getOptions(),r=b(n,"color","scale"),i=this.getStatus();return r||!i?super.getFillColor(t):null}getStatus(){const t=this.getOptions(),n=b(this.getDisplayData()),r=(n==null?void 0:n.reduce((a,o)=>a+o.value,0))??0,i=b(t,"meter","proportional")?r:r>100?100:r,s=b(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=b(n,"meter","proportional"),{number:a,code:o}=b(this.getOptions(),"locale");let l=[],c=[],u;if(s===null){u=100;const d=t[0];l=["Group","Value",...i?["Status"]:[]],c=[[d[r],d.value===null?"–":a(d.value,o),...i?[i]:[]]]}else{const d=b(s,"total");u=d||this.getMaximumDomain(t),l=["Group","Value","Percentage of total"],c=[...t.map(h=>{let f;h.value!==null&&h.value!==void 0?f=Number(h.value):f=0;const p=Number((h.value/u*100).toFixed(2));return[h[r],h.value===null?"–":a(f,o),a(p,o)+" %"]})]}return super.formatTable({headers:l,cells:c})}}class kU extends qe{constructor(t,n){var i;super(t,n),this.model=new IU(this.services);const r=(i=n.options.meter)!=null&&i.proportional?lt(Sn(Mt.proportionalMeterChart),n.options):lt(Sn(Mt.meterChart),n.options);this.model.setOptions(r),this.init(t,n)}getComponents(){const n=[...b(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new lN(this.model,this.services)],growth:ct.STRETCH,renderType:tt.SVG},{id:"spacer",components:[new Dn(this.model,this.services,{size:8})],growth:ct.STRETCH}]:[],{id:"meter-graph",components:[new mN(this.model,this.services)],growth:ct.STRETCH,renderType:tt.SVG}],r=[new oe(this.model,this.services,n,{direction:wt.COLUMN})];return this.getChartComponents(r,{graphFrameRenderType:tt.HTML})}}class PU extends pr{constructor(t){super(t)}getTabularDataArray(){const t=this.getOptions(),n=this.getGroupedData(),{angle:r,value:i}=b(t,"radar","axes"),{number:s,code:a}=b(t,"locale"),o=b(n,"0","data").map(u=>u[r]),l=["Group",...o],c=[...n.map(u=>[u.name,...o.map((d,h)=>b(u,"data",h,i)!==null?s(b(u,"data",h,i),a):"–")])];return super.formatTable({headers:l,cells:c})}}class NU extends qe{constructor(t,n){super(t,n),this.model=new PU(this.services),this.model.setOptions(It(Mt.radarChart,n.options)),this.init(t,n)}getComponents(){const t=[new EN(this.model,this.services)];return this.getChartComponents(t)}}class $U extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.scatterChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new Un(this.model,this.services),new on(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class FU extends sn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=["Child","Parent"],r=[];return t.forEach(i=>{this.getChildrenDatums(i,r),r.push([i.name,"–"])}),super.formatTable({headers:n,cells:r})}getChildrenDatums(t,n=[]){t.children&&t.children.length>0&&t.children.forEach(r=>{this.getChildrenDatums(r,n),n.push([r.name,t.name])})}}class UU extends qe{constructor(t,n){super(t,n),this.model=new FU(this.services),this.model.setOptions(It(Mt.treeChart,n.options)),this.init(t,n)}getComponents(){const t=[new xN(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class BU extends sn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=b(this.getOptions(),"locale"),i=["Child","Group","Value"],s=[];return t.forEach(a=>{Array.isArray(a.children)?a.children.forEach(o=>{s.push([o.name,a.name,o.value===null?"–":n(o.value,r)])}):b(a.name)!==null&&b(a.value)&&s.push(["–",a.name,n(a.value,r)])}),super.formatTable({headers:i,cells:s})}}class HU extends qe{constructor(t,n){super(t,n),this.model=new BU(this.services),this.model.setOptions(It(Mt.treemapChart,n.options)),this.init(t,n)}getComponents(){const t=[new ZF(this.model,this.services)];return this.getChartComponents(t)}}class GU extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.simpleBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new Yv(this.model,this.services),new ni(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class VU extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.stackedAreaChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new bo(this.model,this.services),new qv(this.model,this.services),new ei(this.model,this.services,{stacked:!0}),new jv(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new le(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class zU extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.stackedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new bo(this.model,this.services),new Xv(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ}),new ni(this.model,this.services)];return this.getAxisChartComponents(t)}}class WU extends sn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{fontSizeMapsTo:r,wordMapsTo:i}=n.wordCloud,{groupMapsTo:s}=n.data,{code:a,number:o}=b(n,"locale"),l=[n.tooltip.wordLabel,"Group",n.tooltip.valueLabel],c=[...t.map(u=>[u[i],u[s],o(u[r],a)])];return super.formatTable({headers:l,cells:c})}}class YU extends qe{constructor(t,n){super(t,n),this.model=new WU(this.services),this.model.setOptions(It(Mt.wordCloudChart,n.options)),this.init(t,n)}getComponents(){const t=[new mU(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.PIE})];return this.getChartComponents(t)}}W.Alignments=Ht,W.AlluvialChart=EP,W.AreaChart=VP,W.AreaEvent=zc,W.ArrowDirections=Xa,W.AxisEvent=Vc,W.AxisFlavor=as,W.AxisPositions=G,W.AxisTitleOrientations=ja,W.BarEvent=Xc,W.BoxplotChart=YP,W.BoxplotEvent=jc,W.BubbleChart=XP,W.BulletChart=KP,W.CalloutDirections=ns,W.CanvasZoomEvent=Gc,W.CartesianOrientations=Bt,W.ChartEvent=$c,W.ChartTheme=nu,W.ChartTypes=be,W.ChoroplethChart=n0,W.CirclePackChart=bU,W.ColorClassNameTypes=at,W.ColorLegendType=ss,W.ComboChart=xU,W.DividerStatus=qr,W.DominantBaseline=nn,W.DonutChart=SU,W.ExperimentalChoroplethChart=n0,W.GaugeChart=OU,W.GaugeEvent=qc,W.GaugeTypes=lr,W.GroupedBarChart=wU,W.HeatmapChart=AU,W.HistogramChart=DU,W.LayoutAlignItems=or,W.LayoutDirection=wt,W.LayoutGrowth=ct,W.LegendItemType=Vt,W.LegendOrientations=Yr,W.LegendPositions=Wr,W.LineChart=LU,W.LineEvent=Kc,W.LollipopChart=RU,W.MeterChart=kU,W.ModalEvent=Fc,W.ModelEvent=Uc,W.PieChart=i0,W.PieEvent=Yc,W.Projection=rn,W.RadarChart=NU,W.RadarEvent=Qc,W.RenderTypes=tt,W.ScaleTypes=Q,W.ScatterChart=$U,W.ScatterEvent=Zc,W.SimpleBarChart=GU,W.Skeletons=Gt,W.StackedAreaChart=VU,W.StackedBarChart=zU,W.Statuses=rs,W.TextAnchor=en,W.ThresholdEvent=eu,W.TickRotations=is,W.ToolbarControlTypes=xt,W.TooltipEvent=Vr,W.TreeChart=UU,W.TreeEvent=Jc,W.TreeTypes=qa,W.TreemapChart=HU,W.TreemapEvent=tu,W.TruncationTypes=Le,W.WordCloudChart=YU,W.WordCloudEvent=Wc,W.ZoomBarTypes=ze,W.ZoomDomainEvent=Hc,W.ZoombarEvent=Bc,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})});
|
|
85
|
+
</svg>`}addEventListeners(){const t=this;this.parent.selectAll("circle.node").on("mouseover",function(n,r){const i=R(this);i.classed("hovered",!0);const s=t.model.getHierarchyLevel(),a=s>2&&!i.classed("focal"),o=b(t.model.getOptions(),"canvasZoom","enabled");let l=!1;if(!a){let c=[],u=[],d=null;if(r.children){r.depth>1&&o&&(l=!0,i.classed("clickable",!0)),c=r.children.map(p=>{if(p!==null)return typeof p.data.value=="number"?{label:p.data.name,value:p.data.value}:{label:p.data.name,labelIcon:o&&s<=2?t.getZoomIcon():null,value:p.value}});const f=t.model.getOptions();u=[{label:yt(f,"locale.translations.total")||yt(f,"tooltip.totalLabel")||"Total",value:r.value,bold:!0}],t.highlightChildren(r.children)}else d=r.value;const h=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{color:h,label:r.data.name,labelIcon:l&&o&&s<=2?t.getZoomIcon():null,value:d},...c,...u]})}t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEOVER,{event:n,element:i,datum:r})}).on("mousemove",function(n,r){const i=R(this);t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("mouseout",function(n,r){const i=R(this);i.classed("hovered",!1),r.children&&t.unhighlightChildren(r.children),t.services.events.dispatchEvent(T.CirclePack.CIRCLE_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})}).on("click",function(n,r){const i=R(this),s=i.classed("non-focal"),a=b(t.model.getOptions(),"canvasZoom","enabled");if(a&&t.model.getHierarchyLevel()>2){const o=t.parent.selectAll("circle.node");R(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(o,Xr)}else if(r.depth===2&&r.children&&!s&&a){const o=t.parent.selectAll("circle.node");R(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=r,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(r,o,Xr),n.stopPropagation()}t.services.events.dispatchEvent(T.CirclePack.CIRCLE_CLICK,{event:n,element:i,datum:r})})}destroy(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()}}function uN(e,t){const n=gi(this._current,e);return r=>(this._current=n(r),t(this._current))}class Bv extends pt{constructor(){super(...arguments),this.type="pie",this.renderType=tt.SVG,this.isRendering=!1,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.slice").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i.data[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.slice").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getInnerRadius(){return Lt.innerRadius}render(t=!0){const n=this,r=this.getComponentContainer({ariaLabel:"pie graph"}),i=this.getOptions(),{groupMapsTo:s}=i.data,{valueMapsTo:a}=i.pie;this.isRendering=!0;const o=this.model.getDisplayData().filter(M=>M[a]>0),l=this.computeRadius();this.arc=Hi().innerRadius(this.getInnerRadius()).outerRadius(l),this.hoverArc=Hi().innerRadius(this.getInnerRadius()).outerRadius(l+Lt.hoverArc.outerRadiusOffset);const u=vT().value(M=>M[a]).sort(b(i,"pie","sortFunction")).padAngle(Lt.padAngle)(o),h=I.appendOrSelect(r,"g.slices").attr("role",ht.GROUP).attr("data-name","slices").selectAll("path.slice").data(u,M=>M.data[s]);h.exit().attr("opacity",0).remove(),h.enter().append("path").classed("slice",!0).attr("opacity",0).merge(h).attr("class",M=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:M.data[s],originalClassName:"slice"})).style("fill",M=>n.model.getFillColor(M.data[s],null,M.data)).attr("d",this.arc).transition().call(M=>this.services.transitions.setupTransition({transition:M,name:"pie_slice_enter_update",animate:t})).attr("opacity",1).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",M=>`${M[a]}, ${ru(M.data[a],o,a)+"%"}`).attrTween("d",function(M){return uN.bind(this)(M,n.arc)}).on("end",()=>{n.isRendering=!1});const{code:g,number:m}=b(i,"locale"),v=i.pie.labels.enabled,E=v?u.filter(M=>M.data[a]>0):[],x=I.appendOrSelect(r,"g.labels").attr("role",ht.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(E,M=>M.data[s]);x.exit().attr("opacity",0).remove();const S=x.enter().append("text").classed("pie-label",!0),_=[];S.merge(x).style("text-anchor","middle").text(M=>i.pie.labels.formatter?i.pie.labels.formatter({...M,percentageValue:ru(M.data[a],o,a,!0)}):m(ru(M.data[a],o,a),g)+"%").datum(function(M){const w=l+7,U=(M.endAngle-M.startAngle)/2+M.startAngle,$=U/Math.PI*180,N=this.getComputedTextLength();return M.textOffsetX=N/2,M.textOffsetY=$>90&&$<270?10:0,M.xPosition=(M.textOffsetX+w)*Math.sin(U),M.yPosition=(M.textOffsetY+w)*-Math.cos(U),M}).attr("transform",function(M,w){const U=E.length,$=(M.endAngle-M.startAngle)*(180/Math.PI);if(w>=U-2&&$<Lt.callout.minSliceDegree){let N,F;return M.index===U-1?(N=M.xPosition+Lt.callout.offsetX+Lt.callout.textMargin+M.textOffsetX,F=M.yPosition-Lt.callout.offsetY,M.direction=ns.RIGHT,_.push(M)):(N=M.xPosition-Lt.callout.offsetX-M.textOffsetX-Lt.callout.textMargin,F=M.yPosition-Lt.callout.offsetY,M.direction=ns.LEFT,_.push(M)),`translate(${N}, ${F})`}return`translate(${M.xPosition}, ${M.yPosition})`}),this.renderCallouts(_);const A=b(i,"donut")?"donut":"pie",L=b(i,A,"alignment"),{width:B}=I.getSVGElementSize(this.getParent(),{useAttrs:!0}),k=v?Lt.xOffset:0,O=v?Lt.yOffset:0;let H=l+k;L===Ht.CENTER?H=B/2:L===Ht.RIGHT&&(H=B-l-Lt.xOffset);let P=l+O;_.length>0&&(P+=Lt.yOffsetCallout),r.attr("x",H+7).attr("y",P),this.addEventListeners()}renderCallouts(t){const n=I.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",ht.GROUP).attr("data-name","callouts"),r=n.selectAll("g.callout").data(t);r.exit().remove();const i=r.enter().append("g").classed("callout",!0).attr("role",ht.GROUP).attr("aria-roledescription","label callout");i.merge(r).datum(function(o){const{xPosition:l,yPosition:c,direction:u}=o;return u===ns.RIGHT?(o.startPos={x:l,y:c+o.textOffsetY},o.endPos={x:l+Lt.callout.offsetX,y:c-Lt.callout.offsetY+o.textOffsetY},o.intersectPointX=o.endPos.x-Lt.callout.horizontalLineLength):(o.startPos={x:l,y:c+o.textOffsetY},o.endPos={x:l-Lt.callout.offsetX,y:c-Lt.callout.offsetY+o.textOffsetY},o.intersectPointX=o.endPos.x+Lt.callout.horizontalLineLength),o}),i.append("line").classed("vertical-line",!0).merge(n.selectAll("line.vertical-line")).datum(function(){return R(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",o=>o.startPos.x).attr("y1",o=>o.startPos.y).attr("x2",o=>o.intersectPointX).attr("y2",o=>o.endPos.y),i.append("line").classed("horizontal-line",!0).merge(n.selectAll("line.horizontal-line")).datum(function(){return R(this.parentNode).datum()}).style("stroke-width","1px").attr("x1",o=>o.intersectPointX).attr("y1",o=>o.endPos.y).attr("x2",o=>o.endPos.x).attr("y2",o=>o.endPos.y)}addEventListeners(){const t=this;this.parent.selectAll("path.slice").on("mouseover",function(n,r){const i=R(this);t.isRendering||i.classed("hovered",!0).transition("pie_slice_mouseover").call(o=>t.services.transitions.setupTransition({transition:o,name:"pie_slice_mouseover"})).attr("d",t.hoverArc),t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEOVER,{event:n,element:R(this),datum:r});const{groupMapsTo:s}=t.getOptions().data,{valueMapsTo:a}=t.getOptions().pie;t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{label:r.data[s],value:r.data[a]}]})}).on("mousemove",function(n,r){const i=R(this);t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Pie.SLICE_CLICK,{event:n,element:R(this),datum:r})}).on("mouseout",function(n,r){const i=R(this);gL(()=>{t.isRendering||i.classed("hovered",!1).transition("pie_slice_mouseout").call(s=>t.services.transitions.setupTransition({transition:s,name:"pie_slice_mouseout"})).attr("d",t.arc)},100),t.services.events.dispatchEvent(T.Pie.SLICE_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}computeRadius(){const{width:t,height:n}=I.getSVGElementSize(this.parent,{useAttrs:!0}),r=this.getOptions(),i=Math.min(t,n)/2;return r.pie.labels.enabled?i+Lt.radiusOffset:i}}class hN extends Bv{constructor(){super(...arguments),this.type="donut",this.renderType=tt.SVG}render(t=!0){super.render(t);const n=this;if(this.model.isDataEmpty()){this.getComponentContainer({ariaLabel:"donut graph"}).select("g.center").remove();return}const r=I.appendOrSelect(this.getComponentContainer({ariaLabel:"donut graph"}),"g.center"),i=this.getOptions(),s=this.computeRadius(),a=b(i,"donut","center","label");I.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",()=>a===null||a===""?"central":"initial").style("font-size",()=>i.donut.center.numberFontSize(s)).transition().call(o=>this.services.transitions.setupTransition({transition:o,name:"donut-figure-enter-update",animate:t})).tween("text",function(){return n.centerNumberTween(R(this))}),a!==null&&a!==""&&I.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",()=>i.donut.center.titleFontSize(s)).attr("y",i.donut.center.titleYPosition(s)).text(a)}getInnerRadius(){return this.computeRadius()*(3/4)}centerNumberTween(t){const n=this.getOptions();let r=b(n,"donut","center","number");r===null&&(r=this.model.getDisplayData().reduce((o,l)=>o+l[n.pie.valueMapsTo],0));const i=parseInt(t.text().replace(/[, ]+/g,""),10)||0;let s;i%1===0&&r%1===0?s=Uh:s=ye;const a=s(i,r);return o=>{const{numberFormatter:l}=n.donut.center;if(l)t.text(l(a(o)));else{const{code:c,number:u}=b(n,"locale");t.text(u(Math.floor(a(o)),c))}}}}const Hv="4,10 8,6 12,10",Gv="12,6 8,10 4,6";class dN extends pt{constructor(){super(...arguments),this.type="gauge",this.renderType=tt.SVG}getValue(){var r;return((r=this.model.getData().find(i=>i.group==="value"))==null?void 0:r.value)??null}getValueRatio(){return ug(this.getValue(),0,100)/100}getDelta(){var r;return((r=this.model.getData().find(i=>i.group==="delta"))==null?void 0:r.value)??null}getArcRatio(){const t=this.getOptions();return b(t,"gauge","type")===lr.FULL?1:.5}getArcSize(){return this.getArcRatio()*Math.PI*2}getStartAngle(){const t=this.getArcSize();return t===2*Math.PI?0:-t/2}getArrow(t){const n=this.getOptions();switch(b(n,"gauge","deltaArrow","direction")){case Xa.UP:return Hv;case Xa.DOWN:return Gv;default:return t>0?Hv:Gv}}render(t=!0){const n=this.getComponentContainer({ariaLabel:"gauge graph"}).attr("width","100%").attr("height","100%"),r=this.getOptions(),i=this.getValue(),s=this.getValueRatio(),a=this.getArcSize(),o=this.getStartAngle(),l=s*a,c=o+l,u=o+a,d=this.computeRadius(),h=this.getInnerRadius();this.backgroundArc=Hi().innerRadius(h).outerRadius(d).startAngle(c).endAngle(u),this.arc=Hi().innerRadius(h).outerRadius(d).startAngle(o).endAngle(c),I.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc);const f=n.selectAll("path.arc-foreground").data([i]);f.enter().append("path").merge(f).attr("class",this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",()=>b(this.getOptions(),"color","scale","value")).attr("d",this.arc).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",E=>E),this.drawValueNumber(),this.drawDelta(),f.exit().remove();const g=b(r,"gauge","alignment"),{width:m}=I.getSVGElementSize(this.getParent(),{useAttrs:!0});let v=d;g===Ht.CENTER?v=m/2:g===Ht.RIGHT&&(v=m-d),n.attr("x",v).attr("y",d),this.addEventListeners()}drawValueNumber(){const t=this.getComponentContainer(),n=this.getOptions(),r=b(n,"gauge","type"),i=this.getValue(),s=this.getDelta(),a=this.computeRadius(),o=b(n,"gauge","valueFontSize"),l=b(n,"gauge","deltaFontSize"),c=b(n,"gauge","numberSpacing"),u=b(n,"gauge","showPercentageSymbol");let d=0;r===lr.FULL&&!s?d=l(a):r===lr.SEMI&&s&&(d=-(l(a)+c));const h=I.appendOrSelect(t,"g.gauge-numbers").attr("transform",`translate(0, ${d})`),f=o(a),p=I.appendOrSelect(h,"g.gauge-value-number"),{code:g,number:m}=b(n,"locale"),v=b(n,"gauge","numberFormatter"),E=p.selectAll("text.gauge-value-number").data([i]);E.enter().append("text").attr("class","gauge-value-number").merge(E).style("font-size",`${f}px`).attr("text-anchor","middle").text(B=>{let k;return B!=null?k=Number(B.toFixed(2))%1!==0?B.toFixed(2):B.toFixed():k=0,v?v(k):m(Number(k),g)});const{width:y}=I.getSVGElementSize(I.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}),x=f/2,S=u?"%":"",_=I.appendOrSelect(p,"text.gauge-value-symbol").style("font-size",`${x}px`).attr("x",y/2).text(S),{width:A,height:L}=I.getSVGElementSize(_,{useBBox:!0});_.attr("y",`-${L/2}px`),p.attr("transform",`translate(-${A/2}, 0)`)}drawDelta(){const t=this,n=this.getComponentContainer(),r=this.getOptions(),i=this.getDelta(),{code:s,number:a}=b(r,"locale");if(i){const o=this.computeRadius(),l=i?b(r,"gauge","deltaFontSize"):()=>0,c=i?b(r,"gauge","numberFormatter"):()=>null,u=b(r,"gauge","deltaArrow","size"),d=b(r,"gauge","numberSpacing"),h=b(r,"gauge","showPercentageSymbol"),f=I.appendOrSelect(n,"g.gauge-numbers"),p=I.appendOrSelect(f,"g.gauge-delta").attr("transform",`translate(0, ${l(o)+d})`),g=I.appendOrSelect(p,"text.gauge-delta-number"),m=h?"%":"";g.data(i===null?[]:[i]),g.enter().append("text").classed("gauge-delta-number",!0).merge(g).attr("text-anchor","middle").style("font-size",`${l(o)}px`).text(x=>{let S;return x!=null?S=Number(x.toFixed(2))%1!==0?x.toFixed(2):x.toFixed():S=0,c?`${c(S)}${m}`:`${a(Number(S),s)}${m}`});const{width:v}=I.getSVGElementSize(I.appendOrSelect(n,".gauge-delta-number"),{useBBox:!0}),E=b(r,"gauge","deltaArrow","enabled"),y=p.selectAll("svg.gauge-delta-arrow").data(i!==null&&E?[i]:[]);y.enter().append("svg").merge(y).attr("class","gauge-delta-arrow").attr("x",-u(o)-v/2).attr("y",-u(o)/2-l(o)*.35).attr("width",u(o)).attr("height",u(o)).attr("viewBox","0 0 16 16").each(function(){const x=R(this);I.appendOrSelect(x,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");const S=b(r,"gauge","status");I.appendOrSelect(x,"polygon.gauge-delta-arrow").attr("class",S!==null?`gauge-delta-arrow status--${S}`:"").attr("points",t.getArrow(i))}),y.exit().remove(),g.exit().remove()}else{const o=n.select("g.gauge-delta");o.empty()||o.remove()}}getInnerRadius(){const t=this.computeRadius(),n=b(this.getOptions(),"gauge","arcWidth");return t-n}addEventListeners(){const t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",function(n,r){t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEOVER,{event:n,element:R(this),datum:r})}).on("mousemove",function(n,r){const i=R(this);t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEMOVE,{event:n,element:i,datum:r})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Gauge.ARC_CLICK,{event:n,element:R(this),datum:r})}).on("mouseout",function(n,r){const i=R(this);t.services.events.dispatchEvent(T.Gauge.ARC_MOUSEOUT,{event:n,element:i,datum:r})})}computeRadius(){const t=this.getOptions(),n=b(t,"gauge","type"),{width:r,height:i}=I.getSVGElementSize(this.parent,{useAttrs:!0});return n===lr.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)}}class Vv extends Qu{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=tt.SVG,this.padding=5,this.defaultStepFactor=70,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.model.getDisplayData(this.configs.groups),r=this.getOptions(),{groupMapsTo:i}=r.data;this.setGroupScale();const s=this.getComponentContainer({ariaLabel:"grouped bar graphs",withinChartClip:!0}),a=es(n.map(h=>{const f=this.services.cartesianScales.getDomainIdentifier(h);return h[f]&&typeof h[f].toString=="function"?h[f].toString():h[f]})),o=s.selectAll("g.bars").data(a,h=>h);o.exit().attr("opacity",0).remove();const c=o.enter().append("g").classed("bars",!0).attr("role",ht.GROUP).attr("data-name","bars").merge(o);c.transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"bar-group-update-enter",animate:t})).attr("transform",h=>{const p=this.services.cartesianScales.getDomainValue(h)-this.getGroupWidth()/2;return this.services.cartesianScales.getOrientation()===Bt.VERTICAL?`translate(${p}, 0)`:`translate(0, ${p})`});const u=c.selectAll("path.bar").data(h=>this.getDataCorrespondingToLabel(h),h=>h[i]);u.exit().attr("opacity",0).remove(),u.enter().append("path").attr("opacity",0).merge(u).classed("bar",!0).transition().call(h=>this.services.transitions.setupTransition({transition:h,name:"bar-update-enter",animate:t})).attr("class",h=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:h[i],originalClassName:"bar"})).style("fill",h=>{const f=this.services.cartesianScales.getDomainIdentifier(h);return this.model.getFillColor(h[i],h[f],h)}).attr("d",h=>{const f=this.groupScale(h[i]),p=this.getBarWidth(),g=f,m=f+p,v=this.services.cartesianScales.getRangeAxisPosition({datum:h}),E=this.services.cartesianScales.getDomainLowerBound(v),y=this.services.cartesianScales.getValueThroughAxisPosition(v,E),x=this.services.cartesianScales.getRangeValue(h),S=this.services.cartesianScales.getDomainValue(h)-p/2,_=S+p;if(!this.isOutsideZoomedDomain(S,_))return ie({x0:g,x1:m,y0:y,y1:x},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",h=>h.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,r){const i=R(this);i.classed("hovered",!0),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r]})}).on("mousemove",function(n,r){const i=R(this);t.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:n,element:R(this),datum:r})}).on("mouseout",function(n,r){const i=R(this);i.classed("hovered",!1),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getDataCorrespondingToLabel(t){return this.model.getDisplayData(this.configs.groups).filter(r=>{const i=this.services.cartesianScales.getDomainIdentifier(r);return r[i].toString()===t})}getGroupWidth(){const t=this.model.getGroupedData(this.configs.groups),n=this.getTotalGroupPadding();return this.getBarWidth()*t.length+n}getDomainScaleStep(){const t=this.services.cartesianScales.getDomainScale(),n=this.model.getGroupedData(this.configs.groups);let r=this.defaultStepFactor;if(typeof t.step=="function")r=t.step();else if(n.length>0){const i=n.find(s=>{var a;return((a=s.data)==null?void 0:a.length)>1});if(i){const s=this.services.cartesianScales.getDomainIdentifier(i.data[0]);r=Math.abs(t(i.data[1][s])-t(i.data[0][s]))}}return r}getTotalGroupPadding(){const t=this.model.getGroupedData(this.configs.groups);return t.length===1?0:Math.min(5,5*(this.getDomainScaleStep()/this.defaultStepFactor))*(t.length-1)}getBarWidth(){const t=this.getOptions(),n=b(t,"bars","width"),r=b(t,"bars","maxWidth");if(n!==null&&(r===null||n<=r))return n;const s=this.model.getGroupedData(this.configs.groups).length,a=this.getTotalGroupPadding();return Math.min(r,(this.getDomainScaleStep()-a)/s)}setGroupScale(){const t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=Pi().domain(t).rangeRound([0,this.getGroupWidth()])}}class fN extends pt{constructor(){super(...arguments),this.type="heatmap",this.renderType=tt.SVG,this.matrix={},this.xBandwidth=0,this.yBandwidth=0,this.translationUnits={x:0,y:0},this.handleAxisOnHover=t=>{const{detail:n}=t,{datum:r}=n,i=this.model.getUniqueRanges(),s=this.model.getUniqueDomain(),a=this.services.cartesianScales.getDomainLabel(),o=this.services.cartesianScales.getRangeLabel(),l=this.services.cartesianScales.getMainXScale(),c=this.services.cartesianScales.getMainYScale();let u="",d=null,h=null,f=null;this.matrix[r]!==void 0?(u=a,i.forEach(p=>{if(typeof this.matrix[r][p].value=="number"){const g=this.matrix[r][p].value;if(d===null){d=g,h=g,f=g;return}d+=g,h=g<h?g:h,f=g>f?g:f}})):(u=o,s.forEach(p=>{if(typeof this.matrix[p][r].value=="number"){const g=this.matrix[p][r].value;if(d===null){d=g,h=g,f=g;return}d+=g,h=g<h?g:h,f=g>f?g:f}})),l(r)!==void 0?this.parent.select("g.multi-cell.column-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${l(r)}, ${In(c.range())})`):c(r)!==void 0&&this.parent.select("g.multi-cell.row-highlight").classed("highlighter-hidden",!1).attr("transform",`translate(${In(l.range())},${c(r)})`),this.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n.event,hoveredElement:R(t.detail.element),items:[{label:u,value:r,bold:!0},{label:"Min",value:h!==null?h:"-"},{label:"Max",value:f!==null?f:"-"},{label:"Average",value:d!==null?d/s.length:"-"}]})},this.handleAxisMouseOut=t=>{this.parent.selectAll("g.multi-cell").classed("highlighter-hidden",!0),this.services.events.dispatchEvent(T.Tooltip.HIDE,{event:t})}}init(){const t=this.services.events;t.addEventListener(T.Axis.LABEL_MOUSEOVER,this.handleAxisOnHover),t.addEventListener(T.Axis.LABEL_MOUSEOUT,this.handleAxisMouseOut),t.addEventListener(T.Axis.LABEL_FOCUS,this.handleAxisOnHover),t.addEventListener(T.Axis.LABEL_BLUR,this.handleAxisMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"heatmap",withinChartClip:!0});n.lower();const{cartesianScales:r}=this.services;if(this.matrix=this.model.getMatrix(),n.html(""),b(this.getOptions(),"data","loading"))return;const i=r.getMainXScale(),s=r.getMainYScale(),a=r.getDomainIdentifier(),o=r.getRangeIdentifier(),l=this.model.getUniqueDomain(),c=this.model.getUniqueRanges(),u=this.model.getMatrixAsArray(),d=i.range(),h=s.range();this.xBandwidth=Math.abs((d[1]-d[0])/l.length),this.yBandwidth=Math.abs((h[1]-h[0])/c.length);const f=this.services.domUtils.generateElementIDString("heatmap-pattern-stripes");n.append("defs").append("pattern").attr("id",f).attr("width",3).attr("height",3).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("rect").classed("pattern-fill",!0).attr("width",.5).attr("height",8);const p=n.selectAll().data(u).enter().append("g").attr("class",g=>`heat-${g.index}`).classed("cell",!0).attr("transform",g=>`translate(${i(g[a])}, ${s(g[o])})`).append("rect").attr("class",g=>this.model.getColorClassName({value:g.value,originalClassName:`heat-${g.index}`})).classed("heat",!0).classed("null-state",g=>g.index===-1||g.value===null).attr("width",this.xBandwidth).attr("height",this.yBandwidth).style("fill",g=>{const m=this.services.cartesianScales.getDomainIdentifier(g);return g.index===-1||g.value===null?`url(#${f})`:this.model.getFillColor(Number(g.value),g[m],g)}).attr("aria-label",g=>g.value);this.createOuterBox("g.cell-highlight",this.xBandwidth,this.yBandwidth),this.createOuterBox("g.multi-cell.column-highlight",this.xBandwidth,Math.abs(h[1]-h[0])),this.createOuterBox("g.multi-cell.row-highlight",Math.abs(d[1]-d[0]),this.yBandwidth),this.determineDividerStatus()&&(p.style("stroke-width","1px"),this.parent.select("g.cell-highlight").classed("cell-2",!0)),this.addEventListener()}createOuterBox(t,n,r){const i=I.appendOrSelect(this.parent,t).classed("shadows",!0).classed("highlighter-hidden",!0);I.appendOrSelect(i,"line.top").attr("x1",-1).attr("x2",n+1),I.appendOrSelect(i,"line.left").attr("x1",0).attr("y1",-1).attr("x2",0).attr("y2",r+1),I.appendOrSelect(i,"line.down").attr("x1",-1).attr("x2",n+1).attr("y1",r).attr("y2",r),I.appendOrSelect(i,"line.right").attr("x1",n).attr("x2",n).attr("y1",-1).attr("y2",r+1)}determineDividerStatus(){const t=b(this.getOptions(),"heatmap","divider","state");return t!==qr.OFF&&(t===qr.AUTO&&nm.minCellDividerDimension<=this.xBandwidth&&nm.minCellDividerDimension<=this.yBandwidth||t===qr.ON)}addEventListener(){const t=this,{cartesianScales:n}=this.services,r=this.getOptions(),i=yt(r,"locale.translations.total")||yt(r,"tooltip.totalLabel")||"Total",s=n.getDomainIdentifier(),a=n.getRangeIdentifier(),o=n.getDomainLabel(),l=n.getRangeLabel();this.parent.selectAll("g.cell").on("mouseover",function(c,u){const d=R(this),h=d.select("rect.heat");if(!h.classed("null-state")){const p=os(d.attr("transform"));t.parent.select("g.cell-highlight").attr("transform",`translate(${p.x+t.translationUnits.x}, ${p.y+t.translationUnits.y})`).classed("highlighter-hidden",!1),t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEOVER,{event:c,element:h,datum:u}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:c,items:[{label:o,value:u[s]},{label:l,value:u[a]},{label:i,value:u.value,color:h.style("fill")}]})}}).on("mousemove",function(c,u){t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEMOVE,{event:c,element:R(this),datum:u}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:c})}).on("click",function(c,u){t.services.events.dispatchEvent(T.Heatmap.HEATMAP_CLICK,{event:c,element:R(this),datum:u})}).on("mouseout",function(c,u){const h=R(this).select("rect.heat"),f=h.classed("null-state");t.parent.select("g.cell-highlight").classed("highlighter-hidden",!0),f||(t.services.events.dispatchEvent(T.Heatmap.HEATMAP_MOUSEOUT,{event:c,element:h,datum:u}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{event:c,hoveredElement:h}))})}destroy(){this.parent.selectAll("rect.heat").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleAxisOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleAxisMouseOut)}}class pN extends pt{constructor(){super(...arguments),this.type="histogram",this.renderType=tt.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-bar"})).attr("opacity",s=>s[i]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({ariaLabel:"histogram bars"}),r=this.model.getOptions(),{groupIdentifier:i}=r,{groupMapsTo:s}=r.data,a=this.model.getBinnedStackedData(),o=this.services.cartesianScales.getMainXScale(),l=n.selectAll("g.bars").data(a,u=>yt(u,`0.${s}`));l.exit().attr("opacity",0).remove(),l.enter().append("g").classed("bars",!0).attr("role",ht.GROUP);const c=n.selectAll("g.bars").selectAll("path.bar").data(u=>u);c.exit().remove(),c.enter().append("path").merge(c).classed("bar",!0).attr(i,(u,d)=>d).transition().call(u=>this.services.transitions.setupTransition({transition:u,name:"histogram-bar-update-enter",animate:t})).attr("class",u=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:u[s],originalClassName:"bar"})).style("fill",u=>this.model.getFillColor(u[s],null,u)).attr("d",u=>{const d=yt(u,"data");if(!d)return;const h=o(d.x1)-o(d.x0)-1,f=this.services.cartesianScales.getDomainValue(d.x0),p=f+h,g=this.services.cartesianScales.getRangeValue(u[0]);let m=this.services.cartesianScales.getRangeValue(u[1]);return Math.abs(m-g)>0&&Math.abs(m-g)>r.bars.dividerSize&&(this.services.cartesianScales.getOrientation()===Bt.VERTICAL?m+=1:m-=1),ie({x0:f,x1:p,y0:g,y1:m},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",u=>b(u,"data",u[s])),this.addEventListeners()}addEventListeners(){const t=this.model.getOptions(),{groupMapsTo:n}=t.data,{code:r,number:i}=b(t,"locale"),s=this;this.parent.selectAll("path.bar").on("mouseover",function(a,o){const l=R(this);l.classed("hovered",!0);const c=i(parseFloat(yt(o,"data.x0")),r),u=i(parseFloat(yt(o,"data.x1")),r),d=s.services.cartesianScales.getRangeAxisPosition(),h=s.services.cartesianScales.getScaleLabel(d);s.services.events.dispatchEvent(T.Tooltip.SHOW,{event:a,hoveredElement:l,items:[{label:yt(t,"bins.rangeLabel")||"Range",value:`${c} – ${u}`},{label:t.tooltip.groupLabel||"Group",value:o[n],class:s.model.getColorClassName({classNameTypes:[at.TOOLTIP],dataGroupName:o[n]})},{label:h,value:yt(o,`data.${o[n]}`)}]})}).on("mousemove",function(a){s.services.events.dispatchEvent(T.Tooltip.MOVE,{event:a})}).on("mouseout",function(){R(this).classed("hovered",!1),s.services.events.dispatchEvent(T.Tooltip.HIDE)})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class gN extends on{constructor(){super(...arguments),this.type="lollipop",this.renderType=tt.SVG,this.handleScatterOnHover=t=>{const n=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("line.line").attr("stroke-width",s=>s[i]!==n.datum[i]?On.weight.unselected:On.weight.selected)},this.handleScatterOnMouseOut=()=>{this.parent.selectAll("line.line").attr("stroke-width",On.weight.unselected)},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("line.line").transition("legend-hover-line").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-line"})).attr("opacity",s=>s[i]!==n.datum().name?On.opacity.unselected:On.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("line.line").transition("legend-mouseout-line").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-line"})).attr("opacity",On.opacity.selected)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({ariaLabel:"lines",withinChartClip:!0}),r=this.model.getOptions(),{groupMapsTo:i}=r.data,{cartesianScales:s}=this.services,a=s.getMainXScale(),o=s.getMainYScale(),l=s.getDomainIdentifier(),c=v=>s.getDomainValue(v),u=v=>s.getRangeValue(v),d=s.getOrientation(),[h,f]=Mn(c,u,d),p=n.selectAll("line.line").data(this.getScatterData(),v=>`${v[i]}-${v[l]}`);p.exit().attr("opacity",0).remove();const m=p.enter().append("line").attr("opacity",0).merge(p).classed("line",!0).attr("class",v=>this.model.getColorClassName({classNameTypes:[at.STROKE],dataGroupName:v[i],originalClassName:"line"})).transition().call(v=>this.services.transitions.setupTransition({transition:v,name:"lollipop-line-update-enter",animate:t})).style("stroke",v=>this.model.getFillColor(v[i],v[l],v)).attr("opacity",1);d===Bt.HORIZONTAL?m.attr("y1",f).attr("y2",f).attr("x1",a.range()[0]).attr("x2",v=>h(v)-r.points.radius):m.attr("x1",h).attr("x2",h).attr("y1",o.range()[0]).attr("y2",v=>f(v)+r.points.radius),this.addScatterPointEventListeners()}addScatterPointEventListeners(){this.services.events.addEventListener(T.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(T.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}destroy(){const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(T.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(T.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)}}class mN extends pt{constructor(){super(...arguments),this.type="meter",this.renderType=tt.SVG}getStackedBounds(t,n){let r=0;return t.map((s,a)=>a!==0?(r+=n(s.value),{...s,width:Math.abs(n(s.value)-jt.dividerWidth),x:r-n(s.value)}):(r=n(s.value),{...s,width:Math.abs(n(s.value)-jt.dividerWidth),x:0}))}render(t=!0){const n=this,r=this.getComponentContainer({ariaLabel:"meter lines"}),i=this.getOptions(),s=b(i,"meter","proportional"),a=this.model.getDisplayData(),o=this.model.getStatus(),{width:l}=I.getSVGElementSize(r,{useAttrs:!0}),{groupMapsTo:c}=i.data;let u;if(b(i,"meter","proportional")===null)u=100;else{const y=b(i,"meter","proportional","total");u=y||this.model.getMaximumDomain(this.model.getDisplayData())}const d=Be().domain([0,u]).range([0,l]),h=this.getStackedBounds(a,d),f=b(i,"meter","height");I.appendOrSelect(r,"rect.container").attr("x",0).attr("y",0).attr("width",l).attr("height",f||(s?jt.height.proportional:jt.height.default)),I.appendOrSelect(r,"line.rangeIndicator").attr("x1",l).attr("x2",l).attr("y1",0).attr("y2",f||(s?jt.height.proportional:jt.height.default));const p=r.selectAll("rect.value").data(h),g=o!=null&&!n.model.isUserProvidedColorScaleValid()&&!s?`value status--${o}`:"value";p.enter().append("rect").classed("value",!0).merge(p).attr("x",y=>y.x).attr("y",0).attr("height",()=>f||(s?jt.height.proportional:jt.height.default)).attr("class",y=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:y[c],originalClassName:g})).transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"meter-bar-update",animate:t})).attr("width",y=>y.value>u?d(u):Math.max(y.width,2)).style("fill",y=>n.model.getFillColor(y[c],null,y)).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",y=>y.value),p.exit().remove();const m=b(i,"meter","peak");let v=m;m!==null&&(m>u?v=u:m<a[0].value&&(v=a[0].value>u?u:a[0].value));const E=r.selectAll("line.peak").data(v==null?[]:[v]);E.enter().append("line").classed("peak",!0).merge(E).attr("y1",0).attr("y2",()=>f||(s?jt.height.proportional:jt.height.default)).transition().call(y=>this.services.transitions.setupTransition({transition:y,name:"peak-line-update",animate:t})).attr("x1",y=>d(y)).attr("x2",y=>d(y)).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",y=>y),E.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=b(t,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",function(s,a){const o=R(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEOVER,{event:s,element:o,datum:a}),i&&(o.classed("hovered",!0),r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:a[n],value:a.value}]}))}).on("mousemove",function(s,a){const o=R(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEMOVE,{event:s,element:o,datum:a}),i&&r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:s})}).on("click",function(s,a){r.services.events.dispatchEvent(T.Meter.METER_CLICK,{event:s,element:R(this),datum:a})}).on("mouseout",function(s,a){const o=R(this);r.services.events.dispatchEvent(T.Meter.METER_MOUSEOUT,{event:s,element:o,datum:a}),i&&(o.classed("hovered",!1),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:o}))})}destroy(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)}}function zv(e){const t=vN(Wv(e),360);return Bn(t,[0,10])||Bn(t,[350,0])?{textAnchor:en.START,dominantBaseline:nn.MIDDLE}:Bn(t,[10,80])?{textAnchor:en.START,dominantBaseline:nn.HANGING}:Bn(t,[80,100])?{textAnchor:en.MIDDLE,dominantBaseline:nn.HANGING}:Bn(t,[100,170])?{textAnchor:en.END,dominantBaseline:nn.HANGING}:Bn(t,[170,190])?{textAnchor:en.END,dominantBaseline:nn.MIDDLE}:Bn(t,[190,260])?{textAnchor:en.END,dominantBaseline:nn.BASELINE}:Bn(t,[260,280])?{textAnchor:en.MIDDLE,dominantBaseline:nn.BASELINE}:{textAnchor:en.START,dominantBaseline:nn.BASELINE}}function vN(e,t){return(e%t+t)%t}function Bn(e,[t,n]){return e>=t&&e<=n}function Wv(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 yN(e,t){return t*Math.sin(e-Math.PI/2)}class EN extends pt{constructor(){super(...arguments),this.type="radar",this.renderType=tt.SVG,this.getLabelDimensions=t=>{const n=I.appendOrSelect(this.getComponentContainer(),"g.tmp-tick"),r=I.appendOrSelect(n,"text").text(t),{width:i,height:s}=I.getSVGElementSize(r.node(),{useBBox:!0});return n.remove(),{width:i,height:s}},this.normalizeFlatData=t=>{const n=this.getOptions(),{angle:r,value:i}=b(n,"radar","axes"),s=b(n,"data","groupMapsTo"),a=EL(this.uniqueKeys.map(o=>this.uniqueGroups.map(l=>({[r]:o,[s]:l,[i]:null}))));return lt(a,t)},this.normalizeGroupedData=t=>{const n=this.getOptions(),{angle:r,value:i}=b(n,"radar","axes"),s=b(n,"data","groupMapsTo");return t.map(({name:a,data:o})=>{const l=this.uniqueKeys.map(c=>({[s]:a,[r]:c,[i]:null}));return{name:a,data:lt(l,o)}})},this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g.blobs path").transition("legend-hover-blob").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-blob"})).style("fill-opacity",r=>r.name!==n.datum().name?cr.opacity.unselected:cr.opacity.selected).style("stroke-opacity",r=>r.name!==n.datum().name?cr.opacity.unselected:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g.blobs path").transition("legend-mouseout-blob").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-blob"})).style("fill-opacity",cr.opacity.selected).style("stroke-opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"radar graph"}),{width:r,height:i}=I.getSVGElementSize(n,{useAttrs:!0}),s=this.model.getData(),a=this.model.getGroupedData(),o=this.getOptions(),l=b(o,"data","groupMapsTo"),c=b(o,"radar","axes","value"),{angle:u,value:d}=b(o,"radar","axes"),{xLabelPadding:h,yLabelPadding:f,yTicksNumber:p,minRange:g,xAxisRectHeight:m}=cr;this.uniqueKeys=Array.from(new Set(s.map(C=>C[u]))),this.uniqueGroups=Array.from(new Set(s.map(C=>C[l]))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(a);const E=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+f),S=(Math.min(r,i)-E)/2;if(S<=0)return;const _=Pi().domain(this.fullDataNormalized.map(C=>C[u])).range([0,2*Math.PI].map(C=>C-Math.PI/2)),A=In(this.fullDataNormalized.map(C=>C[d])),L=Be().domain([A>=0?0:A,Vn(this.fullDataNormalized.map(C=>C[d]))]).range([g,S]).nice(p),B=L.ticks(p),k=(C,z,V)=>this.model.getFillColor(C,z,V),O=bT().angle(C=>_(C[u])+Math.PI/2).radius(C=>L(C[d])).curve(ep),H=this.uniqueKeys.map(C=>{const z=this.getLabelDimensions(C).width,V=yN(_(C),S);return z+V}),M={x:Vn(H)+h,y:i/2},U=I.appendOrSelect(n,"g.y-axes").attr("role",ht.GROUP).selectAll("path").data(B,C=>C),$=C=>this.uniqueKeys.map(z=>({[u]:z,[d]:C}));U.join(C=>C.append("path").attr("opacity",0).attr("transform",`translate(${M.x}, ${M.y})`).attr("fill","none").call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_axes_enter",animate:t})).attr("opacity",1).attr("d",V=>O($(V)))),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_axes_update",animate:t})).attr("opacity",1).attr("transform",`translate(${M.x}, ${M.y})`).attr("d",V=>O($(V)))),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_axes_exit",animate:t})).attr("d",V=>O($(V))).attr("opacity",0).remove())),I.appendOrSelect(n,"g.x-axes").attr("role",ht.GROUP).selectAll("line").data(this.uniqueKeys,C=>C).join(C=>C.append("line").attr("opacity",0).attr("class",z=>`x-axis-${Gr(z)}`).attr("stroke-dasharray","0").attr("x1",z=>Ft(_(z),0,M).x).attr("y1",z=>Ft(_(z),0,M).y).attr("x2",z=>Ft(_(z),0,M).x).attr("y2",z=>Ft(_(z),0,M).y).call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_axes_enter",animate:t})).attr("opacity",1).attr("x1",V=>Ft(_(V),L.range()[0],M).x).attr("y1",V=>Ft(_(V),L.range()[0],M).y).attr("x2",V=>Ft(_(V),L.range()[1],M).x).attr("y2",V=>Ft(_(V),L.range()[1],M).y)),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_axes_update",animate:t})).attr("opacity",1).attr("x1",V=>Ft(_(V),L.range()[0],M).x).attr("y1",V=>Ft(_(V),L.range()[0],M).y).attr("x2",V=>Ft(_(V),L.range()[1],M).x).attr("y2",V=>Ft(_(V),L.range()[1],M).y)),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_axes_exit",animate:t})).attr("opacity",0).remove())),I.appendOrSelect(n,"g.x-labels").attr("role",ht.GROUP).selectAll("text").data(this.uniqueKeys).join(C=>C.append("text").text(z=>z).attr("opacity",0).attr("x",z=>Ft(_(z),L.range()[1]+h,M).x).attr("y",z=>Ft(_(z),L.range()[1]+h,M).y).style("text-anchor",z=>zv(_(z)).textAnchor).style("dominant-baseline",z=>zv(_(z)).dominantBaseline).call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_labels_enter",animate:t})).attr("opacity",1)),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_labels_update",animate:t})).attr("opacity",1).attr("x",V=>Ft(_(V),L.range()[1]+h,M).x).attr("y",V=>Ft(_(V),L.range()[1]+h,M).y).end().finally(()=>{const V=b(o,"radar","alignment"),At=this.getAlignmentXOffset(V,n,this.getParent());n.attr("x",At)})),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_x_labels_exit",animate:t})).attr("opacity",0).remove())),I.appendOrSelect(n,"g.blobs").attr("role",ht.GROUP).selectAll("path").data(this.groupedDataNormalized,C=>C.name).join(C=>C.append("path").attr("class",z=>this.model.getColorClassName({classNameTypes:[at.FILL,at.STROKE],dataGroupName:z.name,originalClassName:"blob"})).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-label",z=>z.name).attr("opacity",0).attr("transform",t?()=>`translate(${M.x}, ${M.y}) scale(${1+Math.random()*.35})`:`translate(${M.x}, ${M.y})`).style("fill",z=>k(z.name,null,z.data)).style("fill-opacity",cr.opacity.selected).style("stroke",z=>k(z.name,null,z.data)).call(z=>{const V=z.transition().call(At=>this.services.transitions.setupTransition({transition:At,name:"radar_blobs_enter",animate:t}));t&&V.delay(()=>Math.random()*30).attr("transform",`translate(${M.x}, ${M.y})`),V.attr("opacity",1).attr("d",At=>O(At.data))}),C=>(C.attr("class",z=>this.model.getColorClassName({classNameTypes:[at.FILL,at.STROKE],dataGroupName:z.name,originalClassName:"blob"})).style("fill",z=>k(z.name,null,z.data)).style("stroke",z=>k(z.name,null,z.data)),C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_blobs_update",animate:t})).attr("opacity",1).attr("transform",`translate(${M.x}, ${M.y})`).attr("d",V=>O(V.data))),C),C=>C.call(z=>{const V=z.transition().call(At=>this.services.transitions.setupTransition({transition:At,name:"radar_blobs_exit",animate:t}));t&&V.delay(()=>Math.random()*30).attr("transform",()=>`translate(${M.x}, ${M.y}) scale(${1+Math.random()*.35})`),V.attr("opacity",0).remove()})),I.appendOrSelect(n,"g.dots").attr("role",ht.GROUP).selectAll("circle").data(this.fullDataNormalized.filter(C=>b(C,d)!==null)).join(C=>C.append("circle").attr("role",ht.GRAPHICS_SYMBOL).attr("aria-label",z=>z[c]),C=>C,C=>C.remove()).attr("class",C=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:C[l],originalClassName:Gr(C[u])})).attr("cx",C=>Ft(_(C[u]),L(C[d]),M).x).attr("cy",C=>Ft(_(C[u]),L(C[d]),M).y).attr("r",0).attr("opacity",0).style("fill",C=>k(C[l])),I.appendOrSelect(n,"g.x-axes-rect").attr("role",ht.GROUP).selectAll("rect").data(this.uniqueKeys).join(C=>C.append("rect"),C=>C,C=>C.remove()).attr("x",M.x).attr("y",M.y-m/2).attr("width",L.range()[1]).attr("height",m).style("fill","red").style("fill-opacity",0).attr("transform",C=>`rotate(${Wv(_(C))}, ${M.x}, ${M.y})`);const{code:vt,number:Y}=b(o,"locale");I.appendOrSelect(n,"g.y-labels").attr("role",ht.GROUP).selectAll("text").data(Ne(B)).join(C=>C.append("text").attr("opacity",0).text(z=>Y(z,vt)).attr("x",z=>Ft(-Math.PI/2,L(z),M).x+f).attr("y",z=>Ft(-Math.PI/2,L(z),M).y).style("text-anchor","start").style("dominant-baseline","middle").call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_labels_enter",animate:t})).attr("opacity",1)),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_labels_update",animate:t})).text(V=>V).attr("opacity",1).attr("x",V=>Ft(-Math.PI/2,L(V),M).x+f).attr("y",V=>Ft(-Math.PI/2,L(V),M).y)),C=>C.call(z=>z.transition().call(V=>this.services.transitions.setupTransition({transition:V,name:"radar_y_labels_exit",animate:t})).attr("opacity",0).remove())),this.addEventListeners()}getAlignmentXOffset(t,n,r){const i=I.getSVGElementSize(n,{useBBox:!0}),{width:s}=I.getSVGElementSize(r,{useAttrs:!0});let a=0;return t===Ht.CENTER?a=Math.floor((s-i.width)/2):t===Ht.RIGHT&&(a=s-i.width),a}destroy(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}addEventListeners(){const t=this,{axes:{angle:n}}=b(this.getOptions(),"radar");this.parent.selectAll(".x-axes-rect > rect").on("mouseover",function(r,i){const s=R(this);t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEOVER,{event:r,element:s,datum:i});const a=t.parent.select(`.x-axes .x-axis-${Gr(i)}`),o=t.parent.selectAll(`.dots circle.${Gr(i)}`),l=t.model.getActiveDataGroupNames(),c=t.getOptions(),{groupMapsTo:u}=c.data,d=b(c,"radar","axes","value");a.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",f=>l.indexOf(f[u])!==-1?1:0).attr("r",cr.dotsRadius);const h=t.fullDataNormalized.filter(f=>f[n]===i&&l.indexOf(f[u])!==-1);t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:r,hoveredElement:s,items:h.filter(f=>typeof f[d]=="number").map(f=>({label:f[u],value:f[d],color:t.model.getFillColor(f[u],null,f),class:t.model.getColorClassName({classNameTypes:[at.TOOLTIP],dataGroupName:f[u]})}))})}).on("mousemove",function(r,i){const s=R(this);t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEMOVE,{event:r,element:s,datum:i}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(T.Radar.X_AXIS_CLICK,{event:r,element:R(this),datum:i})}).on("mouseout",function(r,i){const s=R(this),a=t.parent.select(`.x-axes .x-axis-${Gr(i)}`),o=t.parent.selectAll(`.dots circle.${Gr(i)}`);a.classed("hovered",!1).attr("stroke-dasharray","0"),o.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(T.Radar.X_AXIS_MOUSEOUT,{event:r,element:s,datum:i}),t.services.events.dispatchEvent(T.Tooltip.HIDE)})}}class Yv extends Qu{constructor(){super(...arguments),this.type="simple-bar",this.renderType=tt.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-simple-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-simple-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-simple-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-simple-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getOptions(),{groupMapsTo:r}=n.data,i=this.getComponentContainer({ariaLabel:"bar graphs",withinChartClip:!0}),s=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),o=i.selectAll("path.bar").data(s,c=>c[r]);o.exit().attr("opacity",0).remove(),o.enter().append("path").attr("opacity",0).merge(o).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call(c=>this.services.transitions.setupTransition({transition:c,name:"bar-update-enter",animate:t})).attr("class",c=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:c[r],originalClassName:"bar"})).style("fill",c=>{const u=this.services.cartesianScales.getDomainIdentifier(c);return this.model.getFillColor(c[r],c[u],c)}).attr("d",c=>{const u=this.services.cartesianScales.getRangeIdentifier(),d=this.getBarWidth(),h=c[u],f=this.services.cartesianScales.getDomainValue(c)-d/2,p=f+d;let g,m;if(Array.isArray(h)&&h.length===2)g=this.services.cartesianScales.getRangeValue(h[0]),m=this.services.cartesianScales.getRangeValue(h[1]);else{const y=this.services.cartesianScales.getRangeScale().domain()[0];g=this.services.cartesianScales.getRangeValue(Math.max(0,y)),m=this.services.cartesianScales.getRangeValue(c)}const v=Math.abs(m-g);if(v!==0&&v<2&&(h>0&&a===Bt.VERTICAL||h<0&&a===Bt.HORIZONTAL?m=g-2:m=g+2),!this.isOutsideZoomedDomain(f,p))return ie({x0:f,x1:p,y0:g,y1:m},a)}).attr("opacity",1).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",c=>c.value),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("path.bar").on("mouseover",function(n,r){const i=R(this);i.classed("hovered",!0),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r]})}).on("mousemove",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:n,element:R(this),datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:n,element:R(this),datum:r})}).on("mouseout",function(n,r){const i=R(this);i.classed("hovered",!1),t.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class bN extends le{constructor(){super(...arguments),this.type="skeleton-lines"}render(t=!0){const n=b(this.getOptions(),"data","loading"),r=!b(this.getOptions(),"grid","x","enabled")&&!b(this.getOptions(),"grid","y","enabled")&&!b(this.getOptions(),"axes","bottom","visible")&&!b(this.getOptions(),"axes","left","visible");n&&!r?super.renderGridSkeleton(n):n&&r?this.renderSparklineSkeleton(n):this.removeSkeleton()}renderSparklineSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")}drawSparkline(t){const n=this.backdrop.attr("width"),r=[100],i=I.appendOrSelect(this.backdrop,"g.y.skeleton"),s=i.selectAll("line").data(r);s.enter().append("line").merge(s).attr("x1",0).attr("x2",n).attr("y1",a=>a).attr("y2",a=>a),i.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}updateBackdropStyle(){const t=this.parent;this.backdrop=I.appendOrSelect(t,"svg.chart-skeleton.DAII"),I.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop").classed("shimmer-effect-lines",!1).classed("shimmer-effect-sparkline",!0).style("stroke",null)}}class qv extends pt{constructor(){super(...arguments),this.type="area-stacked",this.renderType=tt.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,r=this.getOptions(),{groupMapsTo:i}=r.data;this.parent.selectAll("path.area").transition("legend-hover-area").call(s=>this.services.transitions.setupTransition({transition:s,name:"legend-hover-area"})).attr("opacity",s=>b(s,0,i)!==n.datum().name?Tn.opacity.unselected:Tn.opacity.selected)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.area").transition("legend-mouseout-area").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-area"})).attr("opacity",Tn.opacity.selected)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"stacked area graphs",withinChartClip:!0}),r=this,i=this.getOptions(),{groupMapsTo:s}=i.data,a=Object.keys(i.axes).some(p=>i.axes[p].percentage),o=this.model.getStackedData({percentage:a,groups:this.configs.groups}),l=b(o,0,0),c=this.services.cartesianScales.getDomainAxisPosition({datum:l}),u=this.services.cartesianScales.getRangeAxisPosition({datum:l}),d=this.services.cartesianScales.getScaleByPosition(u),h=n.selectAll("path.area").data(o,p=>b(p,0,s));this.areaGenerator=tc().x(p=>this.services.cartesianScales.getValueThroughAxisPosition(c,p.data.sharedStackKey)).y0(p=>d(p[0])).y1(p=>d(p[1])).curve(this.services.curves.getD3Curve()),h.exit().attr("opacity",0).remove(),h.enter().append("path").attr("opacity",0).merge(h).data(o,p=>b(p,0,s)).attr("class","area").attr("class",p=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:b(p,0,s),originalClassName:"area"})).style("fill",p=>r.model.getFillColor(b(p,0,s),null,p)).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","area").attr("aria-label",p=>b(p,0,s)).transition().call(p=>this.services.transitions.setupTransition({transition:p,name:"area-update-enter",animate:t})).attr("opacity",Tn.opacity.selected).attr("d",this.areaGenerator)}}class Xv extends Qu{constructor(){super(...arguments),this.type="stacked-bar",this.renderType=tt.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.model.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-bar"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){const n=this.getComponentContainer({ariaLabel:"stacked bar graphs",withinChartClip:!0}),r=this.getOptions(),{groupMapsTo:i}=r.data,s=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),a=this.model.getActiveDataGroupNames(),o=n.selectAll("g.bars").data(s,c=>b(c,0,i));o.exit().attr("opacity",0).remove(),o.enter().append("g").classed("bars",!0).attr("role",ht.GROUP).attr("data-name","bars");const l=n.selectAll("g.bars").selectAll("path.bar").data(c=>c,c=>c.data.sharedStackKey);l.exit().remove(),l.enter().append("path").merge(l).classed("bar",!0).transition().call(c=>this.services.transitions.setupTransition({transition:c,name:"bar-update-enter",animate:t})).attr("class",c=>this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:c[i],originalClassName:"bar"})).style("fill",c=>this.model.getFillColor(c[i],c.data.sharedStackKey,c.data)).attr("d",c=>{const u=c.data.sharedStackKey,d=this.getBarWidth(),h=this.services.cartesianScales.getDomainValue(u)-d/2,f=h+d,p=this.services.cartesianScales.getRangeValue(c[0]);let g=this.services.cartesianScales.getRangeValue(c[1]);if(!this.isOutsideZoomedDomain(h,f)){if(Math.abs(g-p)>0&&Math.abs(g-p)>r.bars.dividerSize){const m=c[0]<0&&c[1]<=0;m&&a.length>1?this.services.cartesianScales.getOrientation()===Bt.VERTICAL?g+=c[1]===0?2:1:g-=1:m||(this.services.cartesianScales.getOrientation()===Bt.VERTICAL?g+=1:g-=1)}return ie({x0:h,x1:f,y0:p,y1:g},this.services.cartesianScales.getOrientation())}}).attr("opacity",1).attr("role",ht.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",c=>c[1]-c[0]),this.addEventListeners()}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this;this.parent.selectAll("path.bar").on("mouseover",function(i,s){const a=R(this);a.classed("hovered",!0),r.services.events.dispatchEvent(T.Bar.BAR_MOUSEOVER,{event:i,element:a,datum:s});let l=r.model.getDisplayData(r.configs.groups).find(c=>{const u=r.services.cartesianScales.getDomainIdentifier(c),d=r.services.cartesianScales.getRangeIdentifier(c);return c[d]===s.data[s[n]]&&c[u].toString()===s.data.sharedStackKey&&c[n]===s[n]});if(l===void 0){const c=r.services.cartesianScales.getDomainIdentifier(),u=r.services.cartesianScales.getRangeIdentifier();l={[c]:s.data.sharedStackKey,[u]:s.data[s[n]],[n]:s[n]}}r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:i,hoveredElement:a,data:[l]})}).on("mousemove",function(i,s){const a=R(this);r.services.events.dispatchEvent(T.Bar.BAR_MOUSEMOVE,{event:i,element:a,datum:s}),r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:i})}).on("click",function(i,s){r.services.events.dispatchEvent(T.Bar.BAR_CLICK,{event:i,element:R(this),datum:s})}).on("mouseout",function(i,s){const a=R(this);a.classed("hovered",!1),r.services.events.dispatchEvent(T.Bar.BAR_MOUSEOUT,{event:i,element:a,datum:s}),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:a})})}getBarWidth(){const t=this.getOptions();if(b(t,"bars","width"))return t.bars.width;const n=this.services.cartesianScales.getMainXScale(),r=I.getSVGElementSize(this.parent,{useAttrs:!0}).width,i=this.model.getStackKeys().length,s=b(t,"bars","spacingFactor");return n.step?Math.min(t.bars.maxWidth,n.step()/2):Math.min(t.bars.maxWidth,r*s/i)}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);const t=this.services.events;t.removeEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}}class jv extends on{constructor(){super(...arguments),this.type="scatter-stacked",this.renderType=tt.SVG}render(t){if(!b(this.getOptions(),"points","enabled"))return;const r=this.getComponentContainer({ariaLabel:"scatter points",withinChartClip:!0}),i=this.getOptions(),{groupMapsTo:s}=i.data,a=Object.keys(i.axes).some(f=>i.axes[f].percentage),o=this.model.getStackedData({groups:this.configs.groups,percentage:a}),l=r.selectAll("g.dots").data(o,f=>b(f,0,s));l.exit().attr("opacity",0).remove();const u=l.enter().append("g").classed("dots",!0).attr("role",ht.GROUP).merge(l).selectAll("circle.dot").data(f=>f);u.exit().attr("opacity",0).remove();const h=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u).datum(f=>{const p=f[s],g=this.services.cartesianScales.getDomainIdentifier(f),m=this.services.cartesianScales.getRangeIdentifier(f);return{[s]:p,[g]:f.data.sharedStackKey,[m]:f[1]}});this.styleCircles(h,t),this.addEventListeners()}getTooltipData(t,n){const r=this.getOptions(),{groupMapsTo:i}=r.data,s=Object.keys(r.axes).some(l=>r.axes[l].percentage),a=this.model.getStackedData({groups:this.configs.groups,percentage:s}),o=[];return a.forEach((l,c)=>{l.forEach((u,d)=>{const h=u[i],f=u.data.sharedStackKey;let p=u.data[h];const g=u[1],m=this.services.cartesianScales.getDomainIdentifier(u),v=this.services.cartesianScales.getRangeIdentifier(u);p!=null&&t===this.services.cartesianScales.getDomainValue(f)&&n===this.services.cartesianScales.getRangeValue(g)&&(s&&(p=this.model.getStackedData({groups:this.configs.groups})[c][d].data[h]),p!==null&&o.push({[i]:h,[m]:f,[v]:p}))})}),this.model.getDisplayData(this.configs.groups).filter(l=>{const c=this.services.cartesianScales.getDomainIdentifier(l),u=this.services.cartesianScales.getRangeIdentifier(l);return o.find(d=>d[i]==l[i]&&d[c]==l[c]&&d[u]==l[u])!==void 0})}}const ri=6;class xN extends pt{constructor(){super(...arguments),this.type="tree",this.renderType=tt.SVG}getLongestLabel(t){let n="";return t.forEach(r=>{const i=r.children?this.getLongestLabel(r.children):"";(i.length>n.length||r.name.length>n.length)&&(n=i.length>r.name.length?i:r.name)}),n}getMockLabelWidth(t,n){const r=t.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(n),{width:i}=I.getSVGElementSize(r.node(),{useBBox:!0});return r.remove(),i}render(t=!0){const n=this.getComponentContainer({ariaLabel:"tree diagram"});n.html("");const{width:r,height:i}=I.getSVGElementSize(this.parent,{useAttrs:!0});if(r<1||i<1)return;const s=this.model.getOptions(),a=this.model.getDisplayData(),o=b(s,"tree","rootTitle")||"Tree",l=this.getMockLabelWidth(n,o),c=this.getLongestLabel(a),u=this.getMockLabelWidth(n,c),d={top:0,right:0,bottom:0,left:l>0?l+ri:30-ri},h=Ri({name:o,children:a}),f=10,p=r/6,g=_=>{const A=h.descendants().reverse(),L=h.links();let B=h,k=h;h.eachBefore(N=>{N.x<B.x&&(B=N),N.x>k.x&&(k=N)});const O=k.x-B.x,H=n.transition().call(N=>this.services.transitions.setupTransition({transition:N,name:"tree-update-viewbox",animate:!0})).attr("viewBox",[-d.left,B.x,r,O].join(" ")),P=S.selectAll("g").data(A,N=>N.id),M=this,w=P.enter().append("g").attr("transform",()=>`translate(${_.y0},${_.x0})`).attr("class",N=>N.depth!==0&&N.children&&N.children.length>0?"clickable":null).on("mouseover",function(N,F){M.services.events.dispatchEvent(T.Tree.NODE_MOUSEOVER,{event:N,element:R(this),datum:F})}).on("click",function(N,F){F.depth!==0&&(F.children=F.children?null:F._children,g(F)),M.services.events.dispatchEvent(T.Tree.NODE_CLICK,{event:N,element:R(this),datum:F})}).on("mouseout",function(N,F){M.services.events.dispatchEvent(T.Tree.NODE_MOUSEOUT,{event:N,element:R(this),datum:F})});w.append("circle").attr("r",2.5).attr("class",N=>N._children?"parent":"child").attr("stroke-width",10),w.append("text").attr("dy","0.31em").attr("x",N=>N._children?-ri:ri).attr("text-anchor",N=>N._children?"end":"start").text(N=>N.data.name).clone(!0).attr("class","text-stroke").lower(),P.merge(w).transition(H).attr("transform",N=>`translate(${N.y},${N.x})`).attr("fill-opacity",1).attr("stroke-opacity",1),P.exit().transition(H).remove().attr("transform",()=>`translate(${_.y},${_.x})`).attr("fill-opacity",0).attr("stroke-opacity",0);const U=x.selectAll("path").data(L,N=>N.target.id),$=U.enter().append("path").attr("d",()=>{const N={x:_.x0,y:_.y0};return y({source:N,target:N})});U.merge($).transition(H).attr("d",y),U.exit().transition(H).remove().attr("d",()=>{const N={x:_.x,y:_.y};return y({source:N,target:N})}),h.eachBefore(N=>{N.x0=N.x,N.y0=N.y})},m=h.descendants(),v=m[m.length-1].depth,E=b(s,"tree","type")===qa.DENDROGRAM?Hx().size([i,r-u-v*ri-l]):A_().nodeSize([f,p]).size([i,r-u-v*ri-l]),y=wT().x(_=>_.y).y(_=>_.x);h.x0=p/2,h.y0=0,h.descendants().forEach((_,A)=>{_.id=A,_._children=_.children}),E(h),n.attr("viewBox",[-d.left,-d.top,r,f]).style("user-select","none");const x=n.append("g").attr("class","links"),S=n.append("g").attr("class","nodes");g(h)}}var _N="#000000",SN="#ffffff",TN="#fcf4d6",ON="#fddc69",wN="#f1c21b",MN="#d2a106",AN="#b28600",CN="#8e6a00",DN="#684e00",LN="#483700",RN="#302400",IN="#1c1500",kN={10:TN,20:ON,30:wN,40:MN,50:AN,60:CN,70:DN,80:LN,90:RN,100:IN},PN="#fff2e8",NN="#ffd9be",$N="#ffb784",FN="#ff832b",UN="#eb6200",BN="#ba4e00",HN="#8a3800",GN="#5e2900",VN="#3e1a00",zN="#231000",WN={10:PN,20:NN,30:$N,40:FN,50:UN,60:BN,70:HN,80:GN,90:VN,100:zN},YN="#fff1f1",qN="#ffd7d9",XN="#ffb3b8",jN="#ff8389",ZN="#fa4d56",KN="#da1e28",QN="#a2191f",JN="#750e13",t$="#520408",e$="#2d0709",n$={10:YN,20:qN,30:XN,40:jN,50:ZN,60:KN,70:QN,80:JN,90:t$,100:e$},r$="#fff0f7",i$="#ffd6e8",s$="#ffafd2",a$="#ff7eb6",o$="#ee5396",l$="#d02670",c$="#9f1853",u$="#740937",h$="#510224",d$="#2a0a18",f$={10:r$,20:i$,30:s$,40:a$,50:o$,60:l$,70:c$,80:u$,90:h$,100:d$},p$="#f6f2ff",g$="#e8daff",m$="#d4bbff",v$="#be95ff",y$="#a56eff",E$="#8a3ffc",b$="#6929c4",x$="#491d8b",_$="#31135e",S$="#1c0f30",T$={10:p$,20:g$,30:m$,40:v$,50:y$,60:E$,70:b$,80:x$,90:_$,100:S$},O$="#edf5ff",w$="#d0e2ff",M$="#a6c8ff",A$="#78a9ff",C$="#4589ff",D$="#0f62fe",L$="#0043ce",R$="#002d9c",I$="#001d6c",k$="#001141",P$={10:O$,20:w$,30:M$,40:A$,50:C$,60:D$,70:L$,80:R$,90:I$,100:k$},N$="#e5f6ff",$$="#bae6ff",F$="#82cfff",U$="#33b1ff",B$="#1192e8",H$="#0072c3",G$="#00539a",V$="#003a6d",z$="#012749",W$="#061727",Y$={10:N$,20:$$,30:F$,40:U$,50:B$,60:H$,70:G$,80:V$,90:z$,100:W$},q$="#d9fbfb",X$="#9ef0f0",j$="#3ddbd9",Z$="#08bdba",K$="#009d9a",Q$="#007d79",J$="#005d5d",tF="#004144",eF="#022b30",nF="#081a1c",rF={10:q$,20:X$,30:j$,40:Z$,50:K$,60:Q$,70:J$,80:tF,90:eF,100:nF},iF="#defbe6",sF="#a7f0ba",aF="#6fdc8c",oF="#42be65",lF="#24a148",cF="#198038",uF="#0e6027",hF="#044317",dF="#022d0d",fF="#071908",pF={10:iF,20:sF,30:aF,40:oF,50:lF,60:cF,70:uF,80:hF,90:dF,100:fF},gF="#f2f4f8",mF="#dde1e6",vF="#c1c7cd",yF="#a2a9b0",EF="#878d96",bF="#697077",xF="#4d5358",_F="#343a3f",SF="#21272a",TF="#121619",OF={10:gF,20:mF,30:vF,40:yF,50:EF,60:bF,70:xF,80:_F,90:SF,100:TF},wF="#f4f4f4",MF="#e0e0e0",AF="#c6c6c6",CF="#a8a8a8",DF="#8d8d8d",LF="#6f6f6f",RF="#525252",IF="#393939",kF="#262626",PF="#161616",NF={10:wF,20:MF,30:AF,40:CF,50:DF,60:LF,70:RF,80:IF,90:kF,100:PF},$F="#f7f3f2",FF="#e5e0df",UF="#cac5c4",BF="#ada8a8",HF="#8f8b8b",GF="#726e6e",VF="#565151",zF="#3c3838",WF="#272525",YF="#171414",qF={10:$F,20:FF,30:UF,40:BF,50:HF,60:GF,70:VF,80:zF,90:WF,100:YF},Zv={black:{100:_N},blue:P$,coolGray:OF,cyan:Y$,gray:NF,green:pF,magenta:f$,orange:WN,purple:T$,red:n$,teal:rF,warmGray:qF,white:{0:SN},yellow:kN};const XF=e=>{if(!e)return null;for(const t of Object.keys(Zv)){const n=Zv[t];for(const r of Object.keys(n))if(n[+r]===e)return r}return null},Kv=function(e){const t=R(this.parentNode).select("rect.leaf"),n=e.backgroundColor??getComputedStyle(t.node(),null).getPropertyValue("fill"),r=hn(n);let i;if(r&&(i=XF(r?r.hex():null)),i==null){const s=Ph(r).l;i=Math.abs(s*100-100)}return i>50?"white":"black"};let jF=0;class ZF extends pt{constructor(){super(...arguments),this.type="treemap",this.renderType=tt.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail;this.parent.selectAll("g[data-name='leaf']").transition("legend-hover-treemap").call(r=>this.services.transitions.setupTransition({transition:r,name:"legend-hover-treemap"})).attr("opacity",r=>r.parent.data.name===n.datum().name?1:.3)},this.handleLegendMouseOut=()=>{this.parent.selectAll("g[data-name='leaf']").transition("legend-mouseout-treemap").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-treemap"})).attr("opacity",1)}}init(){const{events:t}=this.services;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this.getComponentContainer({ariaLabel:"treemap"});this.model.getData();const r=this.model.getDisplayData(),i=this.model.getOptions(),s=b(window,"location"),{width:a,height:o}=I.getSVGElementSize(n,{useAttrs:!0}),l=Ri({name:i.title||"Treemap",children:r}).sum(g=>g.value).sort((g,m)=>m.value-g.value),c=I_().size([a,o]).paddingInner(1).paddingOuter(0).round(!0)(l),u=n.selectAll("g[data-name='leaf']").data(c.leaves(),g=>g.data.name);u.exit().attr("opacity",0).remove();const h=u.enter().append("g").attr("data-name","leaf").attr("data-uid",()=>jF++).merge(u);h.attr("data-name","leaf").transition().call(g=>this.services.transitions.setupTransition({transition:g,name:"treemap-group-update",animate:t})).attr("transform",g=>`translate(${g.x0},${g.y0})`);const f=h.selectAll("rect.leaf").data(g=>[g]);f.exit().attr("width",0).attr("height",0).remove(),f.enter().append("rect").classed("leaf",!0).merge(f).attr("width",0).attr("height",0).attr("id",function(){const g=R(this.parentNode).attr("data-uid");return`${i.style.prefix}-leaf-${g}`}).attr("class",g=>{for(;g.depth>1;)g=g.parent;return this.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:g.data.name,originalClassName:"leaf"})}).transition().call(g=>this.services.transitions.setupTransition({transition:g,name:"treemap-leaf-update-enter",animate:t})).attr("width",g=>g.x1-g.x0).attr("height",g=>g.y1-g.y0).style("fill",g=>{for(;g.depth>1;)g=g.parent;return this.model.getFillColor(g.data.name,null,g.data)}),h.selectAll("clipPath").data(g=>g.data.showLabel!==!0?[]:[1],g=>g).join(g=>g.append("clipPath").attr("id",function(){const m=R(this.parentNode).attr("data-uid");return`${i.style.prefix}-clip-${m}`}).append("use").attr("xlink:href",function(){const m=R(this.parentNode.parentNode).attr("data-uid"),v=`${i.style.prefix}-leaf-${m}`;return new URL(`#${v}`,s)+""}),g=>null,g=>g.remove()),h.selectAll("text").data(g=>{if(g.data.showLabel!==!0)return[];let m=g;for(;m.depth>1;)m=m.parent;return[{text:g.data.name,backgroundColor:this.model.getFillColor(m.data.name)}]},g=>g).join(g=>{const m=g.append("text").text(v=>v.text).style("fill",Kv).attr("x",7).attr("y",18);return s&&m.attr("clip-path",function(){const v=R(this.parentNode).attr("data-uid"),E=`${i.style.prefix}-clip-${v}`;return`url(${new URL(`#${E}`,s)+""})`}),m},g=>g.text(m=>m.text).style("fill",Kv),g=>g.remove()),this.addEventListeners()}addEventListeners(){const t=this;this.parent.selectAll("rect.leaf").on("mouseover",function(n,r){const i=R(this);let s=getComputedStyle(this,null).getPropertyValue("fill"),a=r;for(;a.depth>1;)a=a.parent;i.transition("graph_element_mouseover_fill_update").call(o=>t.services.transitions.setupTransition({transition:o,name:"graph_element_mouseover_fill_update"})).style("fill",o=>{const l=t.model.getFillColor(o.parent.data.name,null,o.data);return l&&(s=l),hn(s).darker(.7).toString()}),t.services.events.dispatchEvent(T.Tooltip.SHOW,{event:n,hoveredElement:i,items:[{color:s,label:a.data.name,bold:!0},{label:r.data.name,value:r.data.value}]}),t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEOVER,{event:n,element:i,datum:r})}).on("mousemove",function(n,r){const i=R(this);t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEMOVE,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.MOVE,{event:n})}).on("click",function(n,r){t.services.events.dispatchEvent(T.Treemap.LEAF_CLICK,{event:n,element:R(this),datum:r})}).on("mouseout",function(n,r){const i=R(this);i.classed("hovered",!1);let s=r;for(;s.depth>1;)s=s.parent;i.transition().call(a=>t.services.transitions.setupTransition({transition:a,name:"graph_element_mouseout_fill_update"})).style("fill",a=>t.model.getFillColor(a.parent.data.name,null,a.data)),t.services.events.dispatchEvent(T.Treemap.LEAF_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:i})})}}var KF={value:function(){}};function Qv(){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 xo(n)}function xo(e){this._=e}function QF(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}})}xo.prototype=Qv.prototype={constructor:xo,on:function(e,t){var n=this._,r=QF(e+"",n),i,s=-1,a=r.length;if(arguments.length<2){for(;++s<a;)if((i=(e=r[s]).type)&&(i=JF(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]=Jv(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Jv(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 xo(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 JF(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Jv(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=KF,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}const tU=C2(Object.freeze(Object.defineProperty({__proto__:null,dispatch:Qv},Symbol.toStringTag,{value:"Module"}))).dispatch,Ju=Math.PI/180,eU={archimedean:e0,rectangular:dU},Ss=64,_o=2048;var nU=function(){var e=[256,256],t=rU,n=iU,r=sU,i=t0,s=t0,a=aU,o=oU,l=e0,c=[],u=1/0,d=tU("word","end"),h=null,f=Math.random,p={},g=pU;p.canvas=function(E){return arguments.length?(g=Hn(E),p):g},p.start=function(){var E=m(g()),y=fU((e[0]>>5)*e[1]),x=null,S=c.length,_=-1,A=[],L=c.map(function(k,O){return k.text=t.call(this,k,O),k.font=n.call(this,k,O),k.style=i.call(this,k,O),k.weight=s.call(this,k,O),k.rotate=a.call(this,k,O),k.size=~~r.call(this,k,O),k.padding=o.call(this,k,O),k}).sort(function(k,O){return O.size-k.size});return h&&clearInterval(h),h=setInterval(B,0),B(),p;function B(){for(var k=Date.now();Date.now()-k<u&&++_<S&&h;){var O=L[_];O.x=e[0]*(f()+.5)>>1,O.y=e[1]*(f()+.5)>>1,lU(E,O,L,_),O.hasText&&v(y,O,x)&&(A.push(O),d.call("word",p,O),x?uU(x,O):x=[{x:O.x+O.x0,y:O.y+O.y0},{x:O.x+O.x1,y:O.y+O.y1}],O.x-=e[0]>>1,O.y-=e[1]>>1)}_>=S&&(p.stop(),d.call("end",p,A,x))}},p.stop=function(){h&&(clearInterval(h),h=null);for(const E of c)delete E.sprite;return p};function m(E){const y=E.getContext("2d",{willReadFrequently:!0});E.width=E.height=1;const x=Math.sqrt(y.getImageData(0,0,1,1).data.length>>2);return E.width=(Ss<<5)/x,E.height=_o/x,y.fillStyle=y.strokeStyle="red",{context:y,ratio:x}}function v(E,y,x){e[0],e[1];for(var S=y.x,_=y.y,A=Math.sqrt(e[0]*e[0]+e[1]*e[1]),L=l(e),B=f()<.5?1:-1,k=-B,O,H,P;(O=L(k+=B))&&(H=~~O[0],P=~~O[1],!(Math.min(Math.abs(H),Math.abs(P))>=A));)if(y.x=S+H,y.y=_+P,!(y.x+y.x0<0||y.y+y.y0<0||y.x+y.x1>e[0]||y.y+y.y1>e[1])&&(!x||hU(y,x))&&!cU(y,E,e[0])){for(var M=y.sprite,w=y.width>>5,U=e[0]>>5,$=y.x-(w<<4),N=$&127,F=32-N,j=y.y1-y.y0,q=(y.y+y.y0)*U+($>>5),ot,it=0;it<j;it++){ot=0;for(var mt=0;mt<=w;mt++)E[q+mt]|=ot<<F|(mt<w?(ot=M[it*w+mt])>>>N:0);q+=U}return!0}return!1}return p.timeInterval=function(E){return arguments.length?(u=E??1/0,p):u},p.words=function(E){return arguments.length?(c=E,p):c},p.size=function(E){return arguments.length?(e=[+E[0],+E[1]],p):e},p.font=function(E){return arguments.length?(n=Hn(E),p):n},p.fontStyle=function(E){return arguments.length?(i=Hn(E),p):i},p.fontWeight=function(E){return arguments.length?(s=Hn(E),p):s},p.rotate=function(E){return arguments.length?(a=Hn(E),p):a},p.text=function(E){return arguments.length?(t=Hn(E),p):t},p.spiral=function(E){return arguments.length?(l=eU[E]||E,p):l},p.fontSize=function(E){return arguments.length?(r=Hn(E),p):r},p.padding=function(E){return arguments.length?(o=Hn(E),p):o},p.random=function(E){return arguments.length?(f=E,p):f},p.on=function(){var E=d.on.apply(d,arguments);return E===d?p:E},p};function rU(e){return e.text}function iU(){return"serif"}function t0(){return"normal"}function sU(e){return Math.sqrt(e.value)}function aU(){return(~~(random()*6)-3)*30}function oU(){return 1}function lU(e,t,n,r){if(!t.sprite){var i=e.context,s=e.ratio;i.clearRect(0,0,(Ss<<5)/s,_o/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;const O=i.measureText(t.text),H=-Math.floor(O.width/2);let P=(O.width+1)*s,M=t.size<<1;if(t.rotate){var u=Math.sin(t.rotate*Ju),d=Math.cos(t.rotate*Ju),h=P*d,f=P*u,p=M*d,g=M*u;P=Math.max(Math.abs(h+g),Math.abs(h-g))+31>>5<<5,M=~~Math.max(Math.abs(f+p),Math.abs(f-p))}else P=P+31>>5<<5;if(M>l&&(l=M),a+P>=Ss<<5&&(a=0,o+=l,l=0),o+M>=_o)break;i.translate((a+(P>>1))/s,(o+(M>>1))/s),t.rotate&&i.rotate(t.rotate*Ju),i.fillText(t.text,H,0),t.padding&&(i.lineWidth=2*t.padding,i.strokeText(t.text,H,0)),i.restore(),t.width=P,t.height=M,t.xoff=a,t.yoff=o,t.x1=P>>1,t.y1=M>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,a+=P}for(var m=i.getImageData(0,0,(Ss<<5)/s,_o/s).data,v=[];--r>=0;)if(t=n[r],!!t.hasText){for(var E=t.width,y=E>>5,x=t.y1-t.y0,S=0;S<x*y;S++)v[S]=0;if(a=t.xoff,a==null)return;o=t.yoff;for(var _=0,A=-1,L=0;L<x;L++){for(var S=0;S<E;S++){var B=y*L+(S>>5),k=m[(o+L)*(Ss<<5)+(a+S)<<2]?1<<31-S%32:0;v[B]|=k,_|=k}_?A=L:(t.y0++,x--,L--,o++)}t.y1=t.y0+A,t.sprite=v.slice(0,(t.y1-t.y0)*y)}}}function cU(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,d=0;d<l;d++){u=0;for(var h=0;h<=i;h++)if((u<<o|(h<i?(u=r[d*i+h])>>>a:0))&t[c+h])return!0;c+=n}return!1}function uU(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 hU(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 e0(e){var t=e[0]/e[1];return function(n){return[t*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function dU(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 fU(e){for(var t=[],n=-1;++n<e;)t[n]=0;return t}function pU(){return document.createElement("canvas")}function Hn(e){return typeof e=="function"?e:function(){return e}}const gU=A2(nU);class mU extends pt{constructor(){super(...arguments),this.type="wordcloud",this.renderType=tt.SVG,this.handleLegendOnHover=t=>{const{hoveredElement:n}=t.detail,{groupMapsTo:r}=this.getOptions().data;this.parent.selectAll("text.word").transition("legend-hover-wordcloud").call(i=>this.services.transitions.setupTransition({transition:i,name:"legend-hover-wordcloud"})).attr("opacity",i=>i[r]!==n.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("text.word").transition("legend-mouseout-wordcloud").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-wordcloud"})).attr("opacity",1)}}init(){const t=this.services.events;t.addEventListener(T.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(T.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t=!0){const n=this,r=this.getComponentContainer({ariaLabel:"word cloud"}).attr("width","100%").attr("height","100%"),i=this.model.getDisplayData(),s=this.getFontSizeScale(i),a=this.getOptions(),{fontSizeMapsTo:o,wordMapsTo:l}=a.wordCloud,{groupMapsTo:c}=a.data,{width:u,height:d}=I.getSVGElementSize(r,{useAttrs:!0});if(u===0||d===0)return;const h=gU().size([u,d]).words(i.map(function(p){const g=p[o];if(typeof p[o]!="number")throw Error("Badly formatted WordCloud data. `value` should only be an integer or float");return{[c]:p[c],text:p[l],size:g,value:g}})).padding(5).rotate(0).fontSize(p=>s(p.size)).on("end",f);h.start();function f(p){const g=I.appendOrSelect(r,"g.words");g.attr("transform",`translate(${h.size()[0]/2}, ${h.size()[1]/2})`);const m=g.selectAll("text").data(p,E=>`${E[c]}-${E.text}`);m.exit().attr("opacity",0).remove(),m.enter().append("text").attr("opacity",0).merge(m).style("font-size",E=>`${E.size}px`).text(function(E){return E.text}).attr("class",E=>n.model.getColorClassName({classNameTypes:[at.FILL],dataGroupName:E[c],originalClassName:`word ${E.size>32?"light":""}`})).style("fill",E=>n.model.getFillColor(E[c],E.text,E)).attr("text-anchor","middle").transition().call(E=>n.services.transitions.setupTransition({transition:E,name:"wordcloud-text-update-enter",animate:t})).attr("transform",E=>`translate(${E.x}, ${E.y})`).attr("opacity",1)}this.addEventListeners()}getFontSizeScale(t){const n=this.getOptions(),{fontSizeMapsTo:r}=n.wordCloud,i=t.map(l=>l[r]).filter(l=>l),s=I.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,o=a?Ne(i):[1,1];return Be().domain(o).range(a?n.wordCloud.fontSizeRange(s,t):[4,4])}addEventListeners(){const t=this.getOptions(),{groupMapsTo:n}=t.data,r=this,i=Ya(s=>{const a=r.parent.selectAll("text.word").transition("wordcloud-word-mouse-highlight").call(o=>r.services.transitions.setupTransition({transition:o,name:"wordcloud-word-mouse-highlight"}));s===null?a.attr("opacity",1):a.attr("opacity",function(){return s===this?1:.3})},6);this.parent.selectAll("text.word").on("mouseover",function(s,a){const o=this;i(o),r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEOVER,{event:s,element:R(this),datum:a}),r.services.events.dispatchEvent(T.Tooltip.SHOW,{event:s,hoveredElement:o,items:[{label:t.tooltip.wordLabel,value:a.text},{label:t.tooltip.valueLabel,value:a.value},{label:yt(t,"locale.translations.group")||yt(t,"tooltip.groupLabel")||"Group",value:a[n],class:r.model.getColorClassName({classNameTypes:[at.TOOLTIP],dataGroupName:a[n]})}]})}).on("mousemove",function(s,a){const o=R(this);r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEMOVE,{element:o,datum:a}),r.services.events.dispatchEvent(T.Tooltip.MOVE,{event:s})}).on("click",function(s,a){r.services.events.dispatchEvent(T.WordCloud.WORD_CLICK,{event:s,element:R(this),datum:a})}).on("mouseout",function(s,a){const o=R(this);i(null),r.services.events.dispatchEvent(T.WordCloud.WORD_MOUSEOUT,{event:s,element:o,datum:a}),r.services.events.dispatchEvent(T.Tooltip.HIDE,{hoveredElement:o})})}}class vU extends pt{constructor(){super(...arguments),this.type="geo",this.renderType=tt.SVG}render(){const t=this.getComponentContainer({withinChartClip:!0}),{width:n,height:r}=I.getSVGElementSize(t,{useAttrs:!0});if(n<1||r<1)return;const i=this.getProjection(),s=b(this.getOptions(),"geoData"),a=this.model.getCombinedData(),o={},l={};Object.keys(a).forEach(v=>{typeof a[v].value=="number"?o[v]=a[v]:l[v]=a[v]});const c=sN(s,Object.values(l)),u=nN(s,{type:"GeometryCollection",geometries:Object.values(o)}),d=i.fitSize([n,r],u),h=fx().projection(d);I.appendOrSelect(t,"g.geo").selectAll("path").data(u.features).join("path").attr("d",h);const p=this.services.domUtils.generateElementIDString("geo-pattern-stripes"),g=I.appendOrSelect(t,"defs");I.appendOrSelect(g,"pattern").attr("id",p).attr("width",5).attr("height",10).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").append("path").classed("pattern-fill",!0).attr("d",Gi()([[0,0],[0,10]]));const m=I.appendOrSelect(t,"g.missing-data");I.appendOrSelect(m,"path").datum(c).attr("d",h).style("fill",`url(#${p})`)}getProjection(){let t=null;switch(b(this.getOptions(),"thematic","projection")){case rn.geoEqualEarth:t=Rx();break;case rn.geoAlbers:t=Ox();break;case rn.geoConicEqualArea:t=ef();break;case rn.geoConicEquidistant:t=Dx();break;case rn.geoEquirectangular:t=Ax();break;case rn.geoMercator:t=wx();break;case rn.geoNaturalEarth1:t=Ix();break;default:throw new Error("Projection is not supported.")}return t}}class yU extends vU{constructor(){super(...arguments),this.type="choropleth"}render(t=!0){super.render();const n=this.model.getCombinedData();this.getComponentContainer({ariaLabel:"map",withinChartClip:!0}).select("g.geo").selectAll("path").classed("border",!0).attr("class",s=>this.model.getColorClassName({value:n[s.properties.NAME].value,originalClassName:"border"})),this.addCountryAreaEventListener()}addCountryAreaEventListener(){const t=this,n=this.model.getCombinedData();this.parent.selectAll("path.border").on("mouseover",function(r,i){const s=R(this);t.services.events.dispatchEvent(zr.CHOROPLETH_MOUSEOVER,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Vr.SHOW,{event:r,hoveredElement:s,items:[{label:i.properties.NAME,value:n[i.properties.NAME].value}]})}).on("mousemove",function(r,i){t.services.events.dispatchEvent(zr.CHOROPLETH_MOUSEMOVE,{event:r,element:R(this),datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Vr.MOVE,{event:r})}).on("click",function(r,i){t.services.events.dispatchEvent(zr.CHOROPLETH_CLICK,{event:r,element:R(this),datum:n[i.properties.NAME]})}).on("mouseout",function(r,i){const s=R(this);t.services.events.dispatchEvent(zr.CHOROPLETH_MOUSEOUT,{event:r,element:s,datum:n[i.properties.NAME]}),t.services.events.dispatchEvent(Vr.HIDE,{event:r,hoveredElement:s})})}}class n0 extends qe{constructor(t,n){super(t,n),this.model=new QP(this.services),this.model.setOptions(It(Mt.choroplethChart,n.options)),this.init(t,n)}getChartComponents(t,n){const r=this.model.getOptions(),i=b(r,"toolbar","enabled"),s=!!this.model.getOptions().title,a={id:"title",components:[new bs(this.model,this.services)],growth:ct.STRETCH},o={id:"toolbar",components:[new Qr(this.model,this.services)],growth:ct.PREFERRED},l={id:"header",components:[new oe(this.model,this.services,[a,...i?[o]:[]],{direction:wt.ROW,alignItems:or.CENTER})],growth:ct.PREFERRED},c={id:"legend",components:[new Uv(this.model,this.services,{chartType:"choropleth"})],growth:ct.PREFERRED,renderType:tt.SVG},u={id:"graph-frame",components:t,growth:ct.STRETCH,renderType:tt.SVG},d=b(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=wt.COLUMN_REVERSE,f={id:"spacer",components:[new Dn(this.model,this.services,{size:15})],growth:ct.PREFERRED},p={id:"full-frame",components:[new oe(this.model,this.services,[...d?[c]:[],...d?[f]:[],u],{direction:h})],growth:ct.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new Dn(this.model,this.services,i?{size:15}:void 0)],growth:ct.PREFERRED};g.push(m)}return g.push(p),[new Bu(this.model,this.services),new mo(this.model,this.services),new oe(this.model,this.services,g,{direction:wt.COLUMN})]}getComponents(){const t=[new yU(this.model,this.services)];return this.getChartComponents(t)}}class EU extends sn{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=lt({},t,this.getZoomOptions(t));iu(n,r);const i=this.getHierarchyLevel(),s=b(n,"circlePack","depth");this.set({options:lt(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&&b(n,0,"children")?b(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}),b(r,"canvasZoom","enabled")===!0&&s>2?{legend:{additionalItems:[{type:Vt.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(),{number:n,code:r}=b(this.getOptions(),"locale"),i=["Child","Parent","Value"],s=[];return t.forEach(a=>{let o=a.value?a.value:0;a.children&&(o+=this.getChildrenDatums(a.children,a.name,s,0)),s.push(["–",a.name,n(o,r)])}),super.formatTable({headers:i,cells:s})}getChildrenDatums(t,n,r=[],i=0){const s=n,{number:a,code:o}=b(this.getOptions(),"locale");return t.forEach(l=>{const c=l.name;let u=0;if(l.children)l.children.length>0&&(typeof l.value=="number"&&(i+=l.value),u+=this.getChildrenDatums(l.children,c,r,u),r.push([c,s,a(u,o)]),i+=u);else{let d=0;typeof l.value=="number"&&(d=l.value,i+=l.value),r.push([l.name,s,a(d,o)])}}),i}}class bU extends qe{constructor(t,n){super(t,n),this.model=new EU(this.services),this.model.setOptions(It(Mt.circlePackChart,n.options)),this.init(t,n)}getComponents(){const t=[new cN(this.model,this.services)];return this.getChartComponents(t)}}const r0={[be.LINE]:[ei,on],[be.SCATTER]:[on],[be.AREA]:[Iv,ei,on],[be.STACKED_AREA]:[qv,ei,jv,bo],[be.SIMPLE_BAR]:[Yv],[be.GROUPED_BAR]:[Vv,ni],[be.STACKED_BAR]:[Xv,bo]};class xU extends pe{constructor(t,n){super(t,n);const r=It(Mt.comboChart,n.options);n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),r.comboChartTypes=[{type:be.LINE,correspondingDatasets:[]}]),this.model.setOptions(r),this.init(t,n)}getGraphComponents(){const{comboChartTypes:t}=this.model.getOptions();let n=0;const r=t.map(i=>{const s=i.type;let a;if(typeof i.type=="string"){if(!Object.keys(r0).includes(i.type))return console.error(`Invalid chart type "${i.type}" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.`),null;let o=!1;const l=`${UA(i.type)}Chart`;return a=lt({},Mt[l],this.model.getOptions(),i.options),i.type===be.STACKED_AREA&&(o=!0),r0[i.type].map(c=>new c(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a,stacked:o}))}else return a=lt({},this.model.getOptions(),i.options),new s(this.model,this.services,{groups:i.correspondingDatasets,id:n++,options:a})}).filter(i=>i!==null);return xc(r)}getComponents(){const{comboChartTypes:t}=this.model.getOptions(),n=t.some(s=>s.type===be.STACKED_BAR||s.type===be.STACKED_AREA),r=[new ge(this.model,this.services),new Te(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.GRID}),...n?[]:[new Un(this.model,this.services)],...this.getGraphComponents()];return this.getAxisChartComponents(r)}}class _U extends sn{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,{valueMapsTo:i}=n.pie,{number:s,code:a}=b(n,"locale"),o=["Group","Value"],l=[...t.map(c=>[c[r],c[i]===null?"–":s(c[i],a)])];return super.formatTable({headers:o,cells:l})}sanitize(t){return this.getTabularData(t).sort((r,i)=>i.value-r.value)}}class i0 extends qe{constructor(t,n,r=!1){super(t,n),this.model=new _U(this.services),!r&&(this.model.setOptions(It(Mt.pieChart,n.options)),this.init(t,n))}getComponents(){const t=[new Bv(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.PIE})];return this.getChartComponents(t)}}class SU extends i0{constructor(t,n){super(t,n,!0),this.model.setOptions(It(Mt.donutChart,n.options)),this.init(t,n)}getComponents(){const t=[new hN(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.DONUT})];return this.getChartComponents(t)}}class TU extends sn{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,{number:i,code:s}=b(this.getOptions(),"locale"),a=["Group","Value"],o=[...t.map(l=>[l[r],l.value===null?"–":i(l.value,s)])];return super.formatTable({headers:a,cells:o})}}class OU extends qe{constructor(t,n){super(t,n),this.model=new TU(this.services),this.model.setOptions(It(Mt.gaugeChart,n.options)),this.init(t,n)}getComponents(){const t=[new dN(this.model,this.services)];return this.getChartComponents(t)}}class wU extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.groupedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new Vv(this.model,this.services),new ni(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class MU extends pr{constructor(t){super(t),this.axisFlavor=as.HOVERABLE,this._colorScale=void 0,this._domains=[],this._ranges=[],this._matrix={};const n=b(this.getOptions(),"axes");if(b(n,"left","scaleType")&&b(n,"left","scaleType")!==Q.LABELS||b(n,"right","scaleType")&&b(n,"right","scaleType")!==Q.LABELS||b(n,"top","scaleType")&&b(n,"top","scaleType")!==Q.LABELS||b(n,"bottom","scaleType")&&b(n,"bottom","scaleType")!==Q.LABELS)throw Error("Heatmap only supports label scaletypes.")}getValueDomain(){const t=Ne(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(Ve(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(Ve(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(Ve(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]=Sn(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(Sn(t)),r=this.generateDataGroups(n);return this.set({data:n,dataGroups:r}),this._domains=[],this._ranges=[],this._matrix={},n}getMatrixAsArray(){Ve(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(),{number:i,code:s}=b(this.getOptions(),"locale"),a=[n.label,r.label,"Value"],o=[...t.map(l=>[l[n.identifier]===null?"–":l[n.identifier],l[r.identifier]===null?"–":l[r.identifier],l.value===null?"–":i(l.value,s)])];return super.formatTable({headers:a,cells:o})}getColorClassName(t){return`${t.originalClassName} ${this._colorScale(t.value)}`}setColorClassNames(){const t=this.getOptions(),n=b(t,"color","gradient","colors"),r=!Ve(n);let i=b(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=Bl().domain(s).range(o);const l=b(this.getOptions(),"color");this._colorScale=$v(this.getDisplayData(),l)}}class AU extends pe{constructor(t,n){super(t,n),this.model=new MU(this.services),this.model.setOptions(It(Mt.heatmapChart,n.options)),this.init(t,n)}getAxisChartComponents(t,n){const r=this.model.getOptions(),i=b(r,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();const s=!!this.model.getOptions().title,a={id:"title",components:[new bs(this.model,this.services)],growth:ct.STRETCH},o={id:"toolbar",components:[new Qr(this.model,this.services)],growth:ct.PREFERRED},l={id:"header",components:[new oe(this.model,this.services,[a,...i?[o]:[]],{direction:wt.ROW,alignItems:or.CENTER})],growth:ct.PREFERRED},c={id:"legend",components:[new Uv(this.model,this.services,{chartType:"heatmap"})],growth:ct.PREFERRED,renderType:tt.SVG},u={id:"graph-frame",components:t,growth:ct.STRETCH,renderType:tt.SVG},d=b(n,"legend","enabled")!==!1&&this.model.getOptions().legend.enabled!==!1&&this.model.getData().length>0,h=wt.COLUMN_REVERSE,f={id:"spacer",components:[new Dn(this.model,this.services,{size:15})],growth:ct.PREFERRED},p={id:"full-frame",components:[new oe(this.model,this.services,[...d?[c]:[],...d?[f]:[],u],{direction:h})],growth:ct.STRETCH},g=[];if(s||i){g.push(l);const m={id:"spacer",components:[new Dn(this.model,this.services,i?{size:15}:void 0)],growth:ct.PREFERRED};g.push(m)}return g.push(p),[new _v(this.model,this.services),new mo(this.model,this.services),new oe(this.model,this.services,g,{direction:wt.COLUMN})]}getComponents(){const t=[new ge(this.model,this.services),new fN(this.model,this.services)];return this.getAxisChartComponents(t)}}class CU extends pr{getTabularDataArray(){const t=this.getOptions(),{groupMapsTo:n}=t.data,{number:r,code:i}=b(this.getOptions(),"locale"),s=this.getBinnedStackedData(),a=[yt(t,"bins.rangeLabel")||"Range",...s.map(l=>yt(l,`0.${n}`))],o=[...yt(s,0).map((l,c)=>[`${r(Number(yt(l,"data.x0")),i)} – ${r(Number(yt(l,"data.x1")),i)}`,...s.map(u=>r(yt(u[c],`data.${yt(u[c],n)}`),i))])];return super.formatTable({headers:a,cells:o})}}class DU extends pe{constructor(t,n){super(t,n),this.model=new CU(this.services),this.model.setOptions(It(Mt.histogramChart,n.options)),this.init(t,n),this.update()}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new oN(this.model,this.services),new pN(this.model,this.services)];return this.getAxisChartComponents(t)}}class LU extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.lineChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new Un(this.model,this.services),new ei(this.model,this.services),new on(this.model,this.services,{handleThresholds:!0}),new bN(this.model,this.services),new ni(this.model,this.services)];return this.getAxisChartComponents(t)}}class RU extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.lollipopChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new Un(this.model,this.services),new gN(this.model,this.services),new on(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class IU extends sn{constructor(t){super(t)}getMaximumDomain(t){return t.reduce((r,i)=>r+i.value,0)}getFillColor(t){const n=this.getOptions(),r=b(n,"color","scale"),i=this.getStatus();return r||!i?super.getFillColor(t):null}getStatus(){const t=this.getOptions(),n=b(this.getDisplayData()),r=(n==null?void 0:n.reduce((a,o)=>a+o.value,0))??0,i=b(t,"meter","proportional")?r:r>100?100:r,s=b(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=b(n,"meter","proportional"),{number:a,code:o}=b(this.getOptions(),"locale");let l=[],c=[],u;if(s===null){u=100;const d=t[0];l=["Group","Value",...i?["Status"]:[]],c=[[d[r],d.value===null?"–":a(d.value,o),...i?[i]:[]]]}else{const d=b(s,"total");u=d||this.getMaximumDomain(t),l=["Group","Value","Percentage of total"],c=[...t.map(h=>{let f;h.value!==null&&h.value!==void 0?f=Number(h.value):f=0;const p=Number((h.value/u*100).toFixed(2));return[h[r],h.value===null?"–":a(f,o),a(p,o)+" %"]})]}return super.formatTable({headers:l,cells:c})}}class kU extends qe{constructor(t,n){var i;super(t,n),this.model=new IU(this.services);const r=(i=n.options.meter)!=null&&i.proportional?lt(Sn(Mt.proportionalMeterChart),n.options):lt(Sn(Mt.meterChart),n.options);this.model.setOptions(r),this.init(t,n)}getComponents(){const n=[...b(this.model.getOptions(),"meter","showLabels")?[{id:"meter-title",components:[new lN(this.model,this.services)],growth:ct.STRETCH,renderType:tt.SVG},{id:"spacer",components:[new Dn(this.model,this.services,{size:8})],growth:ct.STRETCH}]:[],{id:"meter-graph",components:[new mN(this.model,this.services)],growth:ct.STRETCH,renderType:tt.SVG}],r=[new oe(this.model,this.services,n,{direction:wt.COLUMN})];return this.getChartComponents(r,{graphFrameRenderType:tt.HTML})}}class PU extends pr{constructor(t){super(t)}getTabularDataArray(){const t=this.getOptions(),n=this.getGroupedData(),{angle:r,value:i}=b(t,"radar","axes"),{number:s,code:a}=b(t,"locale"),o=b(n,"0","data").map(u=>u[r]),l=["Group",...o],c=[...n.map(u=>[u.name,...o.map((d,h)=>b(u,"data",h,i)!==null?s(b(u,"data",h,i),a):"–")])];return super.formatTable({headers:l,cells:c})}}class NU extends qe{constructor(t,n){super(t,n),this.model=new PU(this.services),this.model.setOptions(It(Mt.radarChart,n.options)),this.init(t,n)}getComponents(){const t=[new EN(this.model,this.services)];return this.getChartComponents(t)}}class $U extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.scatterChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new Un(this.model,this.services),new on(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class FU extends sn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=["Child","Parent"],r=[];return t.forEach(i=>{this.getChildrenDatums(i,r),r.push([i.name,"–"])}),super.formatTable({headers:n,cells:r})}getChildrenDatums(t,n=[]){t.children&&t.children.length>0&&t.children.forEach(r=>{this.getChildrenDatums(r,n),n.push([r.name,t.name])})}}class UU extends qe{constructor(t,n){super(t,n),this.model=new FU(this.services),this.model.setOptions(It(Mt.treeChart,n.options)),this.init(t,n)}getComponents(){const t=[new xN(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})}}class BU extends sn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),{number:n,code:r}=b(this.getOptions(),"locale"),i=["Child","Group","Value"],s=[];return t.forEach(a=>{Array.isArray(a.children)?a.children.forEach(o=>{s.push([o.name,a.name,o.value===null?"–":n(o.value,r)])}):b(a.name)!==null&&b(a.value)&&s.push(["–",a.name,n(a.value,r)])}),super.formatTable({headers:i,cells:s})}}class HU extends qe{constructor(t,n){super(t,n),this.model=new BU(this.services),this.model.setOptions(It(Mt.treemapChart,n.options)),this.init(t,n)}getComponents(){const t=[new ZF(this.model,this.services)];return this.getChartComponents(t)}}class GU extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.simpleBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new Yv(this.model,this.services),new ni(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class VU extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.stackedAreaChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new bo(this.model,this.services),new qv(this.model,this.services),new ei(this.model,this.services,{stacked:!0}),new jv(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new le(this.model,this.services,{skeleton:Gt.GRID})];return this.getAxisChartComponents(t)}}class zU extends pe{constructor(t,n){super(t,n),this.model.setOptions(It(Mt.stackedBarChart,n.options)),this.init(t,n)}getComponents(){const t=[new ge(this.model,this.services),new Te(this.model,this.services),new bo(this.model,this.services),new Xv(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.VERT_OR_HORIZ}),new ni(this.model,this.services)];return this.getAxisChartComponents(t)}}class WU extends sn{constructor(t){super(t)}getTabularDataArray(){const t=this.getDisplayData(),n=this.getOptions(),{fontSizeMapsTo:r,wordMapsTo:i}=n.wordCloud,{groupMapsTo:s}=n.data,{code:a,number:o}=b(n,"locale"),l=[n.tooltip.wordLabel,"Group",n.tooltip.valueLabel],c=[...t.map(u=>[u[i],u[s],o(u[r],a)])];return super.formatTable({headers:l,cells:c})}}class YU extends qe{constructor(t,n){super(t,n),this.model=new WU(this.services),this.model.setOptions(It(Mt.wordCloudChart,n.options)),this.init(t,n)}getComponents(){const t=[new mU(this.model,this.services),new le(this.model,this.services,{skeleton:Gt.PIE})];return this.getChartComponents(t)}}W.Alignments=Ht,W.AlluvialChart=EP,W.AreaChart=VP,W.AreaEvent=zc,W.ArrowDirections=Xa,W.AxisEvent=Vc,W.AxisFlavor=as,W.AxisPositions=G,W.AxisTitleOrientations=ja,W.BarEvent=Xc,W.BoxplotChart=YP,W.BoxplotEvent=jc,W.BubbleChart=XP,W.BulletChart=KP,W.CalloutDirections=ns,W.CanvasZoomEvent=Gc,W.CartesianOrientations=Bt,W.ChartEvent=$c,W.ChartTheme=nu,W.ChartTypes=be,W.ChoroplethChart=n0,W.CirclePackChart=bU,W.ColorClassNameTypes=at,W.ColorLegendType=ss,W.ComboChart=xU,W.DividerStatus=qr,W.DominantBaseline=nn,W.DonutChart=SU,W.ExperimentalChoroplethChart=n0,W.GaugeChart=OU,W.GaugeEvent=qc,W.GaugeTypes=lr,W.GroupedBarChart=wU,W.HeatmapChart=AU,W.HistogramChart=DU,W.LayoutAlignItems=or,W.LayoutDirection=wt,W.LayoutGrowth=ct,W.LegendItemType=Vt,W.LegendOrientations=Yr,W.LegendPositions=Wr,W.LineChart=LU,W.LineEvent=Kc,W.LollipopChart=RU,W.MeterChart=kU,W.ModalEvent=Fc,W.ModelEvent=Uc,W.PieChart=i0,W.PieEvent=Yc,W.Projection=rn,W.RadarChart=NU,W.RadarEvent=Qc,W.RenderTypes=tt,W.ScaleTypes=Q,W.ScatterChart=$U,W.ScatterEvent=Zc,W.SimpleBarChart=GU,W.Skeletons=Gt,W.StackedAreaChart=VU,W.StackedBarChart=zU,W.Statuses=rs,W.TextAnchor=en,W.ThresholdEvent=eu,W.TickRotations=is,W.ToolbarControlTypes=xt,W.TooltipEvent=Vr,W.TreeChart=UU,W.TreeEvent=Jc,W.TreeTypes=qa,W.TreemapChart=HU,W.TreemapEvent=tu,W.TruncationTypes=Le,W.WordCloudChart=YU,W.WordCloudEvent=Wc,W.ZoomBarTypes=ze,W.ZoomDomainEvent=Hc,W.ZoombarEvent=Bc,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})});
|
|
81
86
|
//# sourceMappingURL=bundle.umd.cjs.map
|