vue-chrts 0.0.85 → 0.0.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaStacked/AreaStackedChart.vue.d.ts +13 -0
- package/dist/AreaStacked/index.d.ts +1 -0
- package/dist/Bar/BarChart.vue.d.ts +25 -0
- package/dist/Bar/index.d.ts +1 -0
- package/dist/Donut/DonutChart.vue.d.ts +11 -0
- package/dist/Donut/index.d.ts +1 -0
- package/dist/Line/LineChart.vue.d.ts +23 -0
- package/dist/Line/index.d.ts +2 -0
- package/dist/Line/types.d.ts +4 -0
- package/dist/Progress/Progress.vue.d.ts +2 -0
- package/dist/Status/Status.vue.d.ts +2 -0
- package/dist/index.cjs +168 -73
- package/dist/index.d.ts +7 -1
- package/dist/index.js +3702 -2686
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("vue");var Oi="http://www.w3.org/1999/xhtml";const Kr={svg:"http://www.w3.org/2000/svg",xhtml:Oi,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Gn(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Kr.hasOwnProperty(e)?{space:Kr[e],local:t}:t}function jl(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Oi&&e.documentElement.namespaceURI===Oi?e.createElement(t):e.createElementNS(n,t)}}function Zl(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ns(t){var e=Gn(t);return(e.local?Zl:jl)(e)}function Ql(){}function fr(t){return t==null?Ql:function(){return this.querySelector(t)}}function Jl(t){typeof t!="function"&&(t=fr(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=new Array(s),l,c,h=0;h<s;++h)(l=o[h])&&(c=t.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new st(i,this._parents)}function Kl(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function tc(){return[]}function Os(t){return t==null?tc:function(){return this.querySelectorAll(t)}}function ec(t){return function(){return Kl(t.apply(this,arguments))}}function nc(t){typeof t=="function"?t=ec(t):t=Os(t);for(var e=this._groups,n=e.length,i=[],r=[],o=0;o<n;++o)for(var s=e[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(i.push(t.call(l,l.__data__,c,s)),r.push(l));return new st(i,r)}function Ds(t){return function(){return this.matches(t)}}function Rs(t){return function(e){return e.matches(t)}}var ic=Array.prototype.find;function rc(t){return function(){return ic.call(this.children,t)}}function oc(){return this.firstElementChild}function sc(t){return this.select(t==null?oc:rc(typeof t=="function"?t:Rs(t)))}var ac=Array.prototype.filter;function lc(){return Array.from(this.children)}function cc(t){return function(){return ac.call(this.children,t)}}function uc(t){return this.selectAll(t==null?lc:cc(typeof t=="function"?t:Rs(t)))}function hc(t){typeof t!="function"&&(t=Ds(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new st(i,this._parents)}function Fs(t){return new Array(t.length)}function fc(){return new st(this._enter||this._groups.map(Fs),this._parents)}function wn(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}wn.prototype={constructor:wn,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function dc(t){return function(){return t}}function pc(t,e,n,i,r,o){for(var s=0,a,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],i[s]=a):n[s]=new wn(t,o[s]);for(;s<l;++s)(a=e[s])&&(r[s]=a)}function gc(t,e,n,i,r,o,s){var a,l,c=new Map,h=e.length,u=o.length,f=new Array(h),d;for(a=0;a<h;++a)(l=e[a])&&(f[a]=d=s.call(l,l.__data__,a,e)+"",c.has(d)?r[a]=l:c.set(d,l));for(a=0;a<u;++a)d=s.call(t,o[a],a,o)+"",(l=c.get(d))?(i[a]=l,l.__data__=o[a],c.delete(d)):n[a]=new wn(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&c.get(f[a])===l&&(r[a]=l)}function mc(t){return t.__data__}function vc(t,e){if(!arguments.length)return Array.from(this,mc);var n=e?gc:pc,i=this._parents,r=this._groups;typeof t!="function"&&(t=dc(t));for(var o=r.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],u=r[c],f=u.length,d=_c(t.call(h,h&&h.__data__,c,i)),g=d.length,p=a[c]=new Array(g),v=s[c]=new Array(g),_=l[c]=new Array(f);n(h,u,p,v,_,d,e);for(var x=0,y=0,T,k;x<g;++x)if(T=p[x]){for(x>=y&&(y=x+1);!(k=v[y])&&++y<g;);T._next=k||null}}return s=new st(s,i),s._enter=a,s._exit=l,s}function _c(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function yc(){return new st(this._exit||this._groups.map(Fs),this._parents)}function xc(t,e,n){var i=this.enter(),r=this,o=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?o.remove():n(o),i&&r?i.merge(r).order():r}function bc(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,o=i.length,s=Math.min(r,o),a=new Array(r),l=0;l<s;++l)for(var c=n[l],h=i[l],u=c.length,f=a[l]=new Array(u),d,g=0;g<u;++g)(d=c[g]||h[g])&&(f[g]=d);for(;l<r;++l)a[l]=n[l];return new st(a,this._parents)}function wc(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,o=i[r],s;--r>=0;)(s=i[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function kc(t){t||(t=Tc);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var n=this._groups,i=n.length,r=new Array(i),o=0;o<i;++o){for(var s=n[o],a=s.length,l=r[o]=new Array(a),c,h=0;h<a;++h)(c=s[h])&&(l[h]=c);l.sort(e)}return new st(r,this._parents).order()}function Tc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Sc(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Cc(){return Array.from(this)}function Mc(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length;r<o;++r){var s=i[r];if(s)return s}return null}function Ac(){let t=0;for(const e of this)++t;return t}function $c(){return!this.node()}function Ec(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],o=0,s=r.length,a;o<s;++o)(a=r[o])&&t.call(a,a.__data__,o,r);return this}function Nc(t){return function(){this.removeAttribute(t)}}function Oc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Dc(t,e){return function(){this.setAttribute(t,e)}}function Rc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Fc(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Pc(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Bc(t,e){var n=Gn(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?Oc:Nc:typeof e=="function"?n.local?Pc:Fc:n.local?Rc:Dc)(n,e))}function Ps(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Lc(t){return function(){this.style.removeProperty(t)}}function zc(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ic(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Uc(t,e,n){return arguments.length>1?this.each((e==null?Lc:typeof e=="function"?Ic:zc)(t,e,n??"")):fe(this.node(),t)}function fe(t,e){return t.style.getPropertyValue(e)||Ps(t).getComputedStyle(t,null).getPropertyValue(e)}function Hc(t){return function(){delete this[t]}}function Wc(t,e){return function(){this[t]=e}}function Yc(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Vc(t,e){return arguments.length>1?this.each((e==null?Hc:typeof e=="function"?Yc:Wc)(t,e)):this.node()[t]}function Bs(t){return t.trim().split(/^|\s+/)}function dr(t){return t.classList||new Ls(t)}function Ls(t){this._node=t,this._names=Bs(t.getAttribute("class")||"")}Ls.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function zs(t,e){for(var n=dr(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function Is(t,e){for(var n=dr(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Xc(t){return function(){zs(this,t)}}function qc(t){return function(){Is(this,t)}}function Gc(t,e){return function(){(e.apply(this,arguments)?zs:Is)(this,t)}}function jc(t,e){var n=Bs(t+"");if(arguments.length<2){for(var i=dr(this.node()),r=-1,o=n.length;++r<o;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?Gc:e?Xc:qc)(n,e))}function Zc(){this.textContent=""}function Qc(t){return function(){this.textContent=t}}function Jc(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Kc(t){return arguments.length?this.each(t==null?Zc:(typeof t=="function"?Jc:Qc)(t)):this.node().textContent}function tu(){this.innerHTML=""}function eu(t){return function(){this.innerHTML=t}}function nu(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function iu(t){return arguments.length?this.each(t==null?tu:(typeof t=="function"?nu:eu)(t)):this.node().innerHTML}function ru(){this.nextSibling&&this.parentNode.appendChild(this)}function ou(){return this.each(ru)}function su(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function au(){return this.each(su)}function lu(t){var e=typeof t=="function"?t:Ns(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function cu(){return null}function uu(t,e){var n=typeof t=="function"?t:Ns(t),i=e==null?cu:typeof e=="function"?e:fr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function hu(){var t=this.parentNode;t&&t.removeChild(this)}function fu(){return this.each(hu)}function du(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function pu(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function gu(t){return this.select(t?pu:du)}function mu(t){return arguments.length?this.property("__data__",t):this.node().__data__}function vu(t){return function(e){t.call(this,e,this.__data__)}}function _u(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function yu(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,o;n<r;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++i]=o;++i?e.length=i:delete this.__on}}}function xu(t,e,n){return function(){var i=this.__on,r,o=vu(e);if(i){for(var s=0,a=i.length;s<a;++s)if((r=i[s]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),r.value=e;return}}this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function bu(t,e,n){var i=_u(t+""),r,o=i.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(r=0,h=a[l];r<o;++r)if((s=i[r]).type===h.type&&s.name===h.name)return h.value}return}for(a=e?xu:yu,r=0;r<o;++r)this.each(a(i[r],e,n));return this}function Us(t,e,n){var i=Ps(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function wu(t,e){return function(){return Us(this,t,e)}}function ku(t,e){return function(){return Us(this,t,e.apply(this,arguments))}}function Tu(t,e){return this.each((typeof e=="function"?ku:wu)(t,e))}function*Su(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length,s;r<o;++r)(s=i[r])&&(yield s)}var Hs=[null];function st(t,e){this._groups=t,this._parents=e}function qe(){return new st([[document.documentElement]],Hs)}function Cu(){return this}st.prototype=qe.prototype={constructor:st,select:Jl,selectAll:nc,selectChild:sc,selectChildren:uc,filter:hc,data:vc,enter:fc,exit:yc,join:xc,merge:bc,selection:Cu,order:wc,sort:kc,call:Sc,nodes:Cc,node:Mc,size:Ac,empty:$c,each:Ec,attr:Bc,style:Uc,property:Vc,classed:jc,text:Kc,html:iu,raise:ou,lower:au,append:lu,insert:uu,remove:fu,clone:gu,datum:mu,on:bu,dispatch:Tu,[Symbol.iterator]:Su};function Z(t){return typeof t=="string"?new st([[document.querySelector(t)]],[document.documentElement]):new st([[t]],Hs)}function Mu(t){let e;for(;e=t.sourceEvent;)t=e;return t}function kn(t,e){if(t=Mu(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}var De;(function(t){t[t.SVG=0]="SVG",t[t.HTML=1]="HTML"})(De||(De={}));var de;(function(t){t.Fit="fit",t.Extend="extend",t.FitWidth="fit_width"})(de||(de={}));function Re(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Au(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function jn(t){let e,n,i;t.length!==2?(e=Re,n=(a,l)=>Re(t(a),l),i=(a,l)=>t(a)-l):(e=t===Re||t===Au?t:$u,n=t,i=t);function r(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<0?c=u+1:h=u}while(c<h)}return c}function o(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<=0?c=u+1:h=u}while(c<h)}return c}function s(a,l,c=0,h=a.length){const u=r(a,l,c,h-1);return u>c&&i(a[u-1],l)>-i(a[u],l)?u-1:u}return{left:r,center:s,right:o}}function $u(){return 0}function Ws(t){return t===null?NaN:+t}const Eu=jn(Re),Zn=Eu.right;jn(Ws).center;function Nu(t,e){let n,i;for(const r of t)r!=null&&(n===void 0?r>=r&&(n=i=r):(n>r&&(n=r),i<r&&(i=r)));return[n,i]}class to extends Map{constructor(e,n=Ru){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[i,r]of e)this.set(i,r)}get(e){return super.get(eo(this,e))}has(e){return super.has(eo(this,e))}set(e,n){return super.set(Ou(this,e),n)}delete(e){return super.delete(Du(this,e))}}function eo({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function Ou({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function Du({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function Ru(t){return t!==null&&typeof t=="object"?t.valueOf():t}const Fu=Math.sqrt(50),Pu=Math.sqrt(10),Bu=Math.sqrt(2);function Tn(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=Fu?10:o>=Pu?5:o>=Bu?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?Tn(t,e,n*2):[a,l,c]}function Di(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,o,s]=i?Tn(e,t,n):Tn(t,e,n);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(r+c)/-s;else for(let c=0;c<a;++c)l[c]=(r+c)*s;return l}function Ri(t,e,n){return e=+e,t=+t,n=+n,Tn(t,e,n)[2]}function Fi(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?Ri(e,t,n):Ri(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function no(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function io(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function Lu(t,e,n=Ws){if(!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,o=Math.floor(r),s=+n(t[o],o,t),a=+n(t[o+1],o+1,t);return s+(a-s)*(r-o)}}function zu(t,e){let n=0,i=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&(++n,i+=o)}if(n)return i/n}function*Iu(t){for(const e of t)yield*e}function Uu(t){return Array.from(Iu(t))}function Hu(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(r);++i<r;)o[i]=t+i*n;return o}function Wu(t,e){let n=0;if(e===void 0)for(let i of t)(i=+i)&&(n+=i);else{let i=-1;for(let r of t)(r=+e(r,++i,t))&&(n+=r)}return n}function Yu(t,e,n){var i={},r=i.noTrailing,o=r===void 0?!1:r,s=i.noLeading,a=s===void 0?!1:s,l=i.debounceMode,c=l===void 0?void 0:l,h,u=!1,f=0;function d(){h&&clearTimeout(h)}function g(v){var _=v||{},x=_.upcomingOnly,y=x===void 0?!1:x;d(),u=!y}function p(){for(var v=arguments.length,_=new Array(v),x=0;x<v;x++)_[x]=arguments[x];var y=this,T=Date.now()-f;if(u)return;function k(){f=Date.now(),e.apply(y,_)}function w(){h=void 0}!a&&c&&!h&&k(),d(),c===void 0&&T>t?a?(f=Date.now(),o||(h=setTimeout(c?w:k,t))):k():o!==!0&&(h=setTimeout(c?w:k,c===void 0?t-T:t))}return p.cancel=g,p}const wt=t=>typeof t=="number",pr=t=>typeof t=="function",jt=t=>Array.isArray(t),Vu=t=>t instanceof Object,Sn=t=>t.constructor.name!=="Function"&&t.constructor.name!=="Object",ro=t=>Vu(t)&&!jt(t)&&!pr(t)&&!Sn(t),Be=(t,e,n=[],i=new Set)=>{if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;if(i.has(t))return!0;i.add(t);for(let r=0;r<t.length;r++)if(!Be(t[r],e[r],n,i))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object")return!1;if(t===e)return!0;const r=Object.keys(t).filter(s=>!n.includes(s)),o=Object.keys(e).filter(s=>!n.includes(s));if(r.length!==o.length)return!1;if(i.has(t))return!0;i.add(t);for(const s of r)if(!Be(t[s],e[s],n,i))return!1;return!0}return t===e},Pi=t=>t.flat(),Cn=(t,e=new Map)=>{if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){const n=[];e.set(t,n);for(const i of t)n.push(e.has(i)?e.get(i):Cn(i,e));return n}if(Sn(t))return t;if(t instanceof Object){const n={};e.set(t,n);const i=t;return Object.keys(t).reduce((r,o)=>(r[o]=e.has(i[o])?e.get(i[o]):Cn(i[o],e),r),n),n}return t},Zt=(t,e,n=new Map)=>{if(!t||!e||t===e)return t;const i=Sn(t)?t:Cn(t);return n.has(e)?n.get(e):(n.set(e,i),Object.keys(e).forEach(r=>{r==="__proto__"||r==="constructor"||(ro(t[r])&&ro(e[r])?i[r]=Zt(t[r],e[r],n):Sn(e)?i[r]=e:i[r]=Cn(e[r]))}),i)},Mn=(t,e,n)=>Yu(e,t);function gr(t,e,n){return pr(e)?e(t,n):e}function Qn(t,e,n){return gr(t,e,n)}function V(t,e,n){return gr(t,e,n)}function we(t){return t.filter(e=>e&&!wt(e))}function Pt(t,e,n){return Math.min(Math.max(t,e),n)}function Xu(t,...e){if(!t)return[void 0,void 0];if(jt(e)){let n=0,i=0;return t.forEach((r,o)=>{let s=0,a=0;for(const l of e){const c=V(r,l,o)||0;c>=0?s+=c:a+=c}s>i&&(i=s),a<n&&(n=a)}),[n,i]}}function qu(t,e,...n){const i=[];let r=0,o=0;for(const s of n){const a=V(t,s,e)||0;a>=0?i.push(r+=a):i.push(o+=a)}return i}function Gu(t,e,n,i){const r=t.map((a,l)=>V(a,e,l)||0),o=n.map((a,l)=>{const c=zu(t,(h,u)=>V(h,a,u)||0);return c===0&&Array.isArray(i)?i[l]:c<0}),s=n.map(()=>[]);return t.forEach((a,l)=>{let c=r[l],h=r[l];n.forEach((u,f)=>{const d=V(a,u,l)||0;d>=0?s[f].push([c,c+=d]):s[f].push([h,h+=d])})}),s.forEach((a,l)=>{a.isMostlyNegative=o[l]}),s}function ju(t,...e){return t?io(t,(i,r)=>io(e,o=>V(i,o,r))):void 0}function Zu(t,...e){return t?no(t,(i,r)=>no(e,o=>V(i,o,r))):void 0}function gi(t,...e){return[ju(t,...e),Zu(t,...e)]}function Qu(t,e,n){if(t.length<=1)return t[0];const i=t.map((s,a)=>V(s,n,a));i.sort((s,a)=>s-a);const r=jn(s=>s).left,o=r(i,e,1,t.length-1);return e-i[o-1]>i[o]-e?t[o]:t[o-1]}function Ys(t,e,n){return t.filter((r,o)=>{const s=V(r,n,o);return s>=e[0]&&s<=e[1]})}var Wt=[],Ju=function(){return Wt.some(function(t){return t.activeTargets.length>0})},Ku=function(){return Wt.some(function(t){return t.skippedTargets.length>0})},oo="ResizeObserver loop completed with undelivered notifications.",th=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:oo}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=oo),window.dispatchEvent(t)},Le;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Le||(Le={}));var Yt=function(t){return Object.freeze(t)},eh=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Yt(this)}return t}(),Vs=function(){function t(e,n,i,r){return this.x=e,this.y=n,this.width=i,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Yt(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,i=e.y,r=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:i,top:r,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),mr=function(t){return t instanceof SVGElement&&"getBBox"in t},Xs=function(t){if(mr(t)){var e=t.getBBox(),n=e.width,i=e.height;return!n&&!i}var r=t,o=r.offsetWidth,s=r.offsetHeight;return!(o||s||t.getClientRects().length)},so=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},nh=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Fe=typeof window<"u"?window:{},tn=new WeakMap,ao=/auto|scroll/,ih=/^tb|vertical/,rh=/msie|trident/i.test(Fe.navigator&&Fe.navigator.userAgent),_t=function(t){return parseFloat(t||"0")},le=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new eh((n?e:t)||0,(n?t:e)||0)},lo=Yt({devicePixelContentBoxSize:le(),borderBoxSize:le(),contentBoxSize:le(),contentRect:new Vs(0,0,0,0)}),qs=function(t,e){if(e===void 0&&(e=!1),tn.has(t)&&!e)return tn.get(t);if(Xs(t))return tn.set(t,lo),lo;var n=getComputedStyle(t),i=mr(t)&&t.ownerSVGElement&&t.getBBox(),r=!rh&&n.boxSizing==="border-box",o=ih.test(n.writingMode||""),s=!i&&ao.test(n.overflowY||""),a=!i&&ao.test(n.overflowX||""),l=i?0:_t(n.paddingTop),c=i?0:_t(n.paddingRight),h=i?0:_t(n.paddingBottom),u=i?0:_t(n.paddingLeft),f=i?0:_t(n.borderTopWidth),d=i?0:_t(n.borderRightWidth),g=i?0:_t(n.borderBottomWidth),p=i?0:_t(n.borderLeftWidth),v=u+c,_=l+h,x=p+d,y=f+g,T=a?t.offsetHeight-y-t.clientHeight:0,k=s?t.offsetWidth-x-t.clientWidth:0,w=r?v+x:0,S=r?_+y:0,L=i?i.width:_t(n.width)-w-k,F=i?i.height:_t(n.height)-S-T,et=L+v+k+x,A=F+_+T+y,U=Yt({devicePixelContentBoxSize:le(Math.round(L*devicePixelRatio),Math.round(F*devicePixelRatio),o),borderBoxSize:le(et,A,o),contentBoxSize:le(L,F,o),contentRect:new Vs(u,l,L,F)});return tn.set(t,U),U},Gs=function(t,e,n){var i=qs(t,n),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case Le.DEVICE_PIXEL_CONTENT_BOX:return s;case Le.BORDER_BOX:return r;default:return o}},oh=function(){function t(e){var n=qs(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Yt([n.borderBoxSize]),this.contentBoxSize=Yt([n.contentBoxSize]),this.devicePixelContentBoxSize=Yt([n.devicePixelContentBoxSize])}return t}(),js=function(t){if(Xs(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},sh=function(){var t=1/0,e=[];Wt.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var h=new oh(c.target),u=js(c.target);a.push(h),c.lastReportedSize=Gs(c.target,c.observedBox),u<t&&(t=u)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,i=e;n<i.length;n++){var r=i[n];r()}return t},co=function(t){Wt.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(js(r.target)>t?n.activeTargets.push(r):n.skippedTargets.push(r))})})},ah=function(){var t=0;for(co(t);Ju();)t=sh(),co(t);return Ku()&&th(),t>0},mi,Zs=[],lh=function(){return Zs.splice(0).forEach(function(t){return t()})},ch=function(t){if(!mi){var e=0,n=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return lh()}).observe(n,i),mi=function(){n.textContent="".concat(e?e--:e++)}}Zs.push(t),mi()},uh=function(t){ch(function(){requestAnimationFrame(t)})},cn=0,hh=function(){return!!cn},fh=250,dh={attributes:!0,characterData:!0,childList:!0,subtree:!0},uo=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],ho=function(t){return t===void 0&&(t=0),Date.now()+t},vi=!1,ph=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=fh),!vi){vi=!0;var i=ho(e);uh(function(){var r=!1;try{r=ah()}finally{if(vi=!1,e=i-ho(),!hh())return;r?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,dh)};document.body?n():Fe.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),uo.forEach(function(n){return Fe.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),uo.forEach(function(n){return Fe.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),Bi=new ph,fo=function(t){!cn&&t>0&&Bi.start(),cn+=t,!cn&&Bi.stop()},gh=function(t){return!mr(t)&&!nh(t)&&getComputedStyle(t).display==="inline"},mh=function(){function t(e,n){this.target=e,this.observedBox=n||Le.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Gs(this.target,this.observedBox,!0);return gh(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),vh=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),en=new WeakMap,po=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},nn=function(){function t(){}return t.connect=function(e,n){var i=new vh(e,n);en.set(e,i)},t.observe=function(e,n,i){var r=en.get(e),o=r.observationTargets.length===0;po(r.observationTargets,n)<0&&(o&&Wt.push(r),r.observationTargets.push(new mh(n,i&&i.box)),fo(1),Bi.schedule())},t.unobserve=function(e,n){var i=en.get(e),r=po(i.observationTargets,n),o=i.observationTargets.length===1;r>=0&&(o&&Wt.splice(Wt.indexOf(i),1),i.observationTargets.splice(r,1),fo(-1))},t.disconnect=function(e){var n=this,i=en.get(e);i.observationTargets.slice().forEach(function(r){return n.unobserve(e,r.target)}),i.activeTargets.splice(0,i.activeTargets.length)},t}(),_h=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");nn.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!so(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");nn.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!so(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");nn.unobserve(this,e)},t.prototype.disconnect=function(){nn.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const yh=globalThis.ResizeObserver||_h,Qs={duration:void 0,margin:{top:0,bottom:0,left:0,right:0},padding:{top:0,bottom:0,left:0,right:0},sizing:de.Fit,width:void 0,height:void 0,svgDefs:void 0,ariaLabel:void 0};class ze{constructor(e){this._defaultConfig=Qs,this._isFirstRender=!0,this._renderAnimationFrameId=null,this._container=e;const n=Z(this._container);n.attr("role","figure"),this.svg=n.append("svg").style("display","block").attr("xmlns","http://www.w3.org/2000/svg").attr("height",ze.DEFAULT_CONTAINER_HEIGHT).attr("aria-hidden",!0),this._svgDefs=this.svg.append("defs"),this._svgDefsExternal=this.svg.append("defs"),this.element=this.svg.node()}updateContainer(e){var n;this.prevConfig=this.config,this.config=Zt(this._defaultConfig,e),(e==null?void 0:e.svgDefs)!==((n=this.prevConfig)===null||n===void 0?void 0:n.svgDefs)&&(this._svgDefsExternal.selectAll("*").remove(),this._svgDefsExternal.html(e.svgDefs))}_preRender(){}_render(e){const{config:n}=this;Z(this._container).attr("aria-label",n.ariaLabel),this._isFirstRender=!1}render(e=this.config.duration){const n=this.config.width||this.containerWidth,i=this.config.height||this.containerHeight;this.svg.attr("width",n).attr("height",i),this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}get containerWidth(){return this.config.width?this.element.clientWidth:this._container.clientWidth||this._container.getBoundingClientRect().width}get containerHeight(){return this.config.height?this.element.clientHeight:this._container.clientHeight||this._container.getBoundingClientRect().height||ze.DEFAULT_CONTAINER_HEIGHT}get width(){return Pt(this.containerWidth-this.config.margin.left-this.config.margin.right,0,Number.POSITIVE_INFINITY)}get height(){return Pt(this.containerHeight-this.config.margin.top-this.config.margin.bottom,0,Number.POSITIVE_INFINITY)}_removeAllChildren(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}_onResize(){const{config:e}=this;(e.sizing===de.Fit||e.sizing===de.FitWidth)&&this.render(0)}_setUpResizeObserver(){if(this._resizeObserver)return;const e=this._container.getBoundingClientRect();this._containerSize={width:e.width,height:e.height},this._resizeObserver=new yh((n,i)=>{cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserverAnimationFrameId=requestAnimationFrame(()=>{const r=this._container.getBoundingClientRect(),o={width:r.width,height:r.height};!Be(this._containerSize,o)&&o.width&&o.height&&(this._containerSize=o,this._onResize())})}),this._resizeObserver.observe(this._container)}destroy(){var e;cancelAnimationFrame(this._renderAnimationFrameId),cancelAnimationFrame(this._resizeObserverAnimationFrameId),(e=this._resizeObserver)===null||e===void 0||e.disconnect(),this.svg.remove()}}ze.DEFAULT_CONTAINER_HEIGHT=300;function xh(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function bh(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var wh=function(){function t(n){var i=this;this._insertTag=function(r){var o;i.tags.length===0?i.insertionPoint?o=i.insertionPoint.nextSibling:i.prepend?o=i.container.firstChild:o=i.before:o=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,o),i.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(bh(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=xh(r);try{o.insertRule(i,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},t}(),j="-ms-",An="-moz-",D="-webkit-",Js="comm",vr="rule",_r="decl",kh="@import",Ks="@keyframes",Th="@layer",Sh=Math.abs,Jn=String.fromCharCode,Ch=Object.assign;function Mh(t,e){return G(t,0)^45?(((e<<2^G(t,0))<<2^G(t,1))<<2^G(t,2))<<2^G(t,3):0}function ta(t){return t.trim()}function Ah(t,e){return(t=e.exec(t))?t[0]:t}function R(t,e,n){return t.replace(e,n)}function Li(t,e){return t.indexOf(e)}function G(t,e){return t.charCodeAt(e)|0}function Ie(t,e,n){return t.slice(e,n)}function xt(t){return t.length}function yr(t){return t.length}function rn(t,e){return e.push(t),t}function $h(t,e){return t.map(e).join("")}var Kn=1,pe=1,ea=0,tt=0,W=0,ye="";function ti(t,e,n,i,r,o,s){return{value:t,root:e,parent:n,type:i,props:r,children:o,line:Kn,column:pe,length:s,return:""}}function ke(t,e){return Ch(ti("",null,null,"",null,null,0),t,{length:-t.length},e)}function Eh(){return W}function Nh(){return W=tt>0?G(ye,--tt):0,pe--,W===10&&(pe=1,Kn--),W}function ot(){return W=tt<ea?G(ye,tt++):0,pe++,W===10&&(pe=1,Kn++),W}function kt(){return G(ye,tt)}function un(){return tt}function Ge(t,e){return Ie(ye,t,e)}function Ue(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function na(t){return Kn=pe=1,ea=xt(ye=t),tt=0,[]}function ia(t){return ye="",t}function hn(t){return ta(Ge(tt-1,zi(t===91?t+2:t===40?t+1:t)))}function Oh(t){for(;(W=kt())&&W<33;)ot();return Ue(t)>2||Ue(W)>3?"":" "}function Dh(t,e){for(;--e&&ot()&&!(W<48||W>102||W>57&&W<65||W>70&&W<97););return Ge(t,un()+(e<6&&kt()==32&&ot()==32))}function zi(t){for(;ot();)switch(W){case t:return tt;case 34:case 39:t!==34&&t!==39&&zi(W);break;case 40:t===41&&zi(t);break;case 92:ot();break}return tt}function Rh(t,e){for(;ot()&&t+W!==57;)if(t+W===84&&kt()===47)break;return"/*"+Ge(e,tt-1)+"*"+Jn(t===47?t:ot())}function Fh(t){for(;!Ue(kt());)ot();return Ge(t,tt)}function Ph(t){return ia(fn("",null,null,null,[""],t=na(t),0,[0],t))}function fn(t,e,n,i,r,o,s,a,l){for(var c=0,h=0,u=s,f=0,d=0,g=0,p=1,v=1,_=1,x=0,y="",T=r,k=o,w=i,S=y;v;)switch(g=x,x=ot()){case 40:if(g!=108&&G(S,u-1)==58){Li(S+=R(hn(x),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:S+=hn(x);break;case 9:case 10:case 13:case 32:S+=Oh(g);break;case 92:S+=Dh(un()-1,7);continue;case 47:switch(kt()){case 42:case 47:rn(Bh(Rh(ot(),un()),e,n),l);break;default:S+="/"}break;case 123*p:a[c++]=xt(S)*_;case 125*p:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+h:_==-1&&(S=R(S,/\f/g,"")),d>0&&xt(S)-u&&rn(d>32?mo(S+";",i,n,u-1):mo(R(S," ","")+";",i,n,u-2),l);break;case 59:S+=";";default:if(rn(w=go(S,e,n,c,h,r,a,y,T=[],k=[],u),o),x===123)if(h===0)fn(S,e,w,w,T,o,u,a,k);else switch(f===99&&G(S,3)===110?100:f){case 100:case 108:case 109:case 115:fn(t,w,w,i&&rn(go(t,w,w,0,0,r,a,y,r,T=[],u),k),r,k,u,a,i?T:k);break;default:fn(S,w,w,w,[""],k,0,a,k)}}c=h=d=0,p=_=1,y=S="",u=s;break;case 58:u=1+xt(S),d=g;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&Nh()==125)continue}switch(S+=Jn(x),x*p){case 38:_=h>0?1:(S+="\f",-1);break;case 44:a[c++]=(xt(S)-1)*_,_=1;break;case 64:kt()===45&&(S+=hn(ot())),f=kt(),h=u=xt(y=S+=Fh(un())),x++;break;case 45:g===45&&xt(S)==2&&(p=0)}}return o}function go(t,e,n,i,r,o,s,a,l,c,h){for(var u=r-1,f=r===0?o:[""],d=yr(f),g=0,p=0,v=0;g<i;++g)for(var _=0,x=Ie(t,u+1,u=Sh(p=s[g])),y=t;_<d;++_)(y=ta(p>0?f[_]+" "+x:R(x,/&\f/g,f[_])))&&(l[v++]=y);return ti(t,e,n,r===0?vr:a,l,c,h)}function Bh(t,e,n){return ti(t,e,n,Js,Jn(Eh()),Ie(t,2,-2),0)}function mo(t,e,n,i){return ti(t,e,n,_r,Ie(t,0,i),Ie(t,i+1,-1),i)}function ce(t,e){for(var n="",i=yr(t),r=0;r<i;r++)n+=e(t[r],r,t,e)||"";return n}function Lh(t,e,n,i){switch(t.type){case Th:if(t.children.length)break;case kh:case _r:return t.return=t.return||t.value;case Js:return"";case Ks:return t.return=t.value+"{"+ce(t.children,i)+"}";case vr:t.value=t.props.join(",")}return xt(n=ce(t.children,i))?t.return=t.value+"{"+n+"}":""}function zh(t){var e=yr(t);return function(n,i,r,o){for(var s="",a=0;a<e;a++)s+=t[a](n,i,r,o)||"";return s}}function Ih(t){return function(e){e.root||(e=e.return)&&t(e)}}function Uh(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Hh=function(e,n,i){for(var r=0,o=0;r=o,o=kt(),r===38&&o===12&&(n[i]=1),!Ue(o);)ot();return Ge(e,tt)},Wh=function(e,n){var i=-1,r=44;do switch(Ue(r)){case 0:r===38&&kt()===12&&(n[i]=1),e[i]+=Hh(tt-1,n,i);break;case 2:e[i]+=hn(r);break;case 4:if(r===44){e[++i]=kt()===58?"&\f":"",n[i]=e[i].length;break}default:e[i]+=Jn(r)}while(r=ot());return e},Yh=function(e,n){return ia(Wh(na(e),n))},vo=new WeakMap,Vh=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,i=e.parent,r=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!vo.get(i))&&!r){vo.set(e,!0);for(var o=[],s=Yh(n,o),a=i.props,l=0,c=0;l<s.length;l++)for(var h=0;h<a.length;h++,c++)e.props[c]=o[l]?s[l].replace(/&\f/g,a[h]):a[h]+" "+s[l]}}},Xh=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function ra(t,e){switch(Mh(t,e)){case 5103:return D+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return D+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return D+t+An+t+j+t+t;case 6828:case 4268:return D+t+j+t+t;case 6165:return D+t+j+"flex-"+t+t;case 5187:return D+t+R(t,/(\w+).+(:[^]+)/,D+"box-$1$2"+j+"flex-$1$2")+t;case 5443:return D+t+j+"flex-item-"+R(t,/flex-|-self/,"")+t;case 4675:return D+t+j+"flex-line-pack"+R(t,/align-content|flex-|-self/,"")+t;case 5548:return D+t+j+R(t,"shrink","negative")+t;case 5292:return D+t+j+R(t,"basis","preferred-size")+t;case 6060:return D+"box-"+R(t,"-grow","")+D+t+j+R(t,"grow","positive")+t;case 4554:return D+R(t,/([^-])(transform)/g,"$1"+D+"$2")+t;case 6187:return R(R(R(t,/(zoom-|grab)/,D+"$1"),/(image-set)/,D+"$1"),t,"")+t;case 5495:case 3959:return R(t,/(image-set\([^]*)/,D+"$1$`$1");case 4968:return R(R(t,/(.+:)(flex-)?(.*)/,D+"box-pack:$3"+j+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+D+t+t;case 4095:case 3583:case 4068:case 2532:return R(t,/(.+)-inline(.+)/,D+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(xt(t)-1-e>6)switch(G(t,e+1)){case 109:if(G(t,e+4)!==45)break;case 102:return R(t,/(.+:)(.+)-([^]+)/,"$1"+D+"$2-$3$1"+An+(G(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Li(t,"stretch")?ra(R(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(G(t,e+1)!==115)break;case 6444:switch(G(t,xt(t)-3-(~Li(t,"!important")&&10))){case 107:return R(t,":",":"+D)+t;case 101:return R(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+D+(G(t,14)===45?"inline-":"")+"box$3$1"+D+"$2$3$1"+j+"$2box$3")+t}break;case 5936:switch(G(t,e+11)){case 114:return D+t+j+R(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return D+t+j+R(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return D+t+j+R(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return D+t+j+t+t}return t}var qh=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case _r:e.return=ra(e.value,e.length);break;case Ks:return ce([ke(e,{value:R(e.value,"@","@"+D)})],r);case vr:if(e.length)return $h(e.props,function(o){switch(Ah(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ce([ke(e,{props:[R(o,/:(read-\w+)/,":"+An+"$1")]})],r);case"::placeholder":return ce([ke(e,{props:[R(o,/:(plac\w+)/,":"+D+"input-$1")]}),ke(e,{props:[R(o,/:(plac\w+)/,":"+An+"$1")]}),ke(e,{props:[R(o,/:(plac\w+)/,j+"input-$1")]})],r)}return""})}},Gh=[qh],jh=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(p){var v=p.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var r=e.stylisPlugins||Gh,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var v=p.getAttribute("data-emotion").split(" "),_=1;_<v.length;_++)o[v[_]]=!0;a.push(p)});var l,c=[Vh,Xh];{var h,u=[Lh,Ih(function(p){h.insert(p)})],f=zh(c.concat(r,u)),d=function(v){return ce(Ph(v),f)};l=function(v,_,x,y){h=x,d(v?v+"{"+_.styles+"}":_.styles),y&&(g.inserted[_.name]=!0)}}var g={key:n,sheet:new wh({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return g.sheet.hydrate(a),g};function Zh(t){for(var e=0,n,i=0,r=t.length;r>=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Qh={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Jh=/[A-Z]|^ms/g,Kh=/_EMO_([^_]+?)_([^]*?)_EMO_/g,oa=function(e){return e.charCodeAt(1)===45},_o=function(e){return e!=null&&typeof e!="boolean"},_i=Uh(function(t){return oa(t)?t:t.replace(Jh,"-$&").toLowerCase()}),yo=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Kh,function(i,r,o){return Bt={name:r,styles:o,next:Bt},r})}return Qh[e]!==1&&!oa(e)&&typeof n=="number"&&n!==0?n+"px":n};function $n(t,e,n){if(n==null)return"";var i=n;if(i.__emotion_styles!==void 0)return i;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return Bt={name:r.name,styles:r.styles,next:Bt},r.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)Bt={name:s.name,styles:s.styles,next:Bt},s=s.next;var a=o.styles+";";return a}return tf(t,e,n)}}var l=n;if(e==null)return l;var c=e[l];return c!==void 0?c:l}function tf(t,e,n){var i="";if(Array.isArray(n))for(var r=0;r<n.length;r++)i+=$n(t,e,n[r])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;e!=null&&e[a]!==void 0?i+=o+"{"+e[a]+"}":_o(a)&&(i+=_i(o)+":"+yo(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var l=0;l<s.length;l++)_o(s[l])&&(i+=_i(o)+":"+yo(o,s[l])+";");else{var c=$n(t,e,s);switch(o){case"animation":case"animationName":{i+=_i(o)+":"+c+";";break}default:i+=o+"{"+c+"}"}}}return i}var xo=/label:\s*([^\s;{]+)\s*(;|$)/g,Bt;function yi(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,r="";Bt=void 0;var o=t[0];if(o==null||o.raw===void 0)i=!1,r+=$n(n,e,o);else{var s=o;r+=s[0]}for(var a=1;a<t.length;a++)if(r+=$n(n,e,t[a]),i){var l=o;r+=l[a]}xo.lastIndex=0;for(var c="",h;(h=xo.exec(r))!==null;)c+="-"+h[1];var u=Zh(r)+c;return{name:u,styles:r,next:Bt}}function sa(t,e,n){var i="";return n.split(" ").forEach(function(r){t[r]!==void 0?e.push(t[r]+";"):r&&(i+=r+" ")}),i}var ef=function(e,n,i){var r=e.key+"-"+n.name;e.registered[r]===void 0&&(e.registered[r]=n.styles)},nf=function(e,n,i){ef(e,n);var r=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+r:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function bo(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function wo(t,e,n){var i=[],r=sa(t,i,n);return i.length<2?n:r+e(i)}var rf=function(e){var n=jh(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var i=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=yi(c,n.registered,void 0);return nf(n,u),n.key+"-"+u.name},r=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=yi(c,n.registered),f="animation-"+u.name;return bo(n,{name:u.name,styles:"@keyframes "+f+"{"+u.styles+"}"}),f},o=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=yi(c,n.registered);bo(n,u)},s=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];return wo(n.registered,i,of(c))};return{css:i,cx:s,injectGlobal:o,keyframes:r,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:sa.bind(null,n.registered),merge:wo.bind(null,n.registered,i)}},of=function t(e){for(var n="",i=0;i<e.length;i++){var r=e[i];if(r!=null){var o=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))o=t(r);else{o="";for(var s in r)r[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=r}o&&(n&&(n+=" "),n+=o)}}return n},aa=rf({key:"css"}),Kt=aa.injectGlobal,O=aa.css;function sf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xi,ko;function af(){return ko||(ko=1,xi=function(e,n){n||(n=[0,""]),e=String(e);var i=parseFloat(e,10);return n[0]=i,n[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}),xi}var bi,To;function lf(){if(To)return bi;To=1;var t=af();bi=r;var e=i("in",document.body);function n(o,s){var a=t(getComputedStyle(o).getPropertyValue(s));return a[0]*r(a[1],o)}function i(o,s){var a=document.createElement("div");a.style.height="128"+o,s.appendChild(a);var l=n(a,"height")/128;return s.removeChild(a),l}function r(o,s){if(!o)return null;switch(s=s||document.body,o=(o+""||"px").trim().toLowerCase(),(s===window||s===document)&&(s=document.body),o){case"%":return s.clientHeight/100;case"ch":case"ex":return i(o,s);case"em":return n(s,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return e;case"cm":return e/2.54;case"mm":return e/25.4;case"pt":return e/72;case"pc":return e/6;case"px":return 1}var a=t(o);if(!isNaN(a[0])&&a[1]){var l=r(a[1],s);return typeof l=="number"?a[0]*l:null}return null}return bi}lf();function la(){const t=()=>Math.floor((1+crypto.getRandomValues(new Uint32Array(1))[0])*65536).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}function cf(t,e){const n=t.substr(4,t.length-5);return getComputedStyle(e).getPropertyValue(n)}function uf(t,e,n=0){const[i,r,o,s]=[t.x+n,t.y+t.height-2*n,t.x+t.width-2*n,t.y+n],[a,l,c,h]=[e.x+n,e.y+e.height-2*n,e.x+e.width-2*n,e.y+n];return!(r<h||l<s||o<a||c<i)}function xr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ca(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function je(){}var He=.7,En=1/He,ue="\\s*([+-]?\\d+)\\s*",We="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Tt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hf=/^#([0-9a-f]{3,8})$/,ff=new RegExp(`^rgb\\(${ue},${ue},${ue}\\)$`),df=new RegExp(`^rgb\\(${Tt},${Tt},${Tt}\\)$`),pf=new RegExp(`^rgba\\(${ue},${ue},${ue},${We}\\)$`),gf=new RegExp(`^rgba\\(${Tt},${Tt},${Tt},${We}\\)$`),mf=new RegExp(`^hsl\\(${We},${Tt},${Tt}\\)$`),vf=new RegExp(`^hsla\\(${We},${Tt},${Tt},${We}\\)$`),So={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};xr(je,Qt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Co,formatHex:Co,formatHex8:_f,formatHsl:yf,formatRgb:Mo,toString:Mo});function Co(){return this.rgb().formatHex()}function _f(){return this.rgb().formatHex8()}function yf(){return ua(this).formatHsl()}function Mo(){return this.rgb().formatRgb()}function Qt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=hf.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Ao(e):n===3?new J(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?on(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?on(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=ff.exec(t))?new J(e[1],e[2],e[3],1):(e=df.exec(t))?new J(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=pf.exec(t))?on(e[1],e[2],e[3],e[4]):(e=gf.exec(t))?on(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=mf.exec(t))?No(e[1],e[2]/100,e[3]/100,1):(e=vf.exec(t))?No(e[1],e[2]/100,e[3]/100,e[4]):So.hasOwnProperty(t)?Ao(So[t]):t==="transparent"?new J(NaN,NaN,NaN,0):null}function Ao(t){return new J(t>>16&255,t>>8&255,t&255,1)}function on(t,e,n,i){return i<=0&&(t=e=n=NaN),new J(t,e,n,i)}function xf(t){return t instanceof je||(t=Qt(t)),t?(t=t.rgb(),new J(t.r,t.g,t.b,t.opacity)):new J}function Ii(t,e,n,i){return arguments.length===1?xf(t):new J(t,e,n,i??1)}function J(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}xr(J,Ii,ca(je,{brighter(t){return t=t==null?En:Math.pow(En,t),new J(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?He:Math.pow(He,t),new J(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new J(Vt(this.r),Vt(this.g),Vt(this.b),Nn(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:$o,formatHex:$o,formatHex8:bf,formatRgb:Eo,toString:Eo}));function $o(){return`#${Ut(this.r)}${Ut(this.g)}${Ut(this.b)}`}function bf(){return`#${Ut(this.r)}${Ut(this.g)}${Ut(this.b)}${Ut((isNaN(this.opacity)?1:this.opacity)*255)}`}function Eo(){const t=Nn(this.opacity);return`${t===1?"rgb(":"rgba("}${Vt(this.r)}, ${Vt(this.g)}, ${Vt(this.b)}${t===1?")":`, ${t})`}`}function Nn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Vt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ut(t){return t=Vt(t),(t<16?"0":"")+t.toString(16)}function No(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new pt(t,e,n,i)}function ua(t){if(t instanceof pt)return new pt(t.h,t.s,t.l,t.opacity);if(t instanceof je||(t=Qt(t)),!t)return new pt;if(t instanceof pt)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(e===o?s=(n-i)/a+(n<i)*6:n===o?s=(i-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new pt(s,a,l,t.opacity)}function br(t,e,n,i){return arguments.length===1?ua(t):new pt(t,e,n,i??1)}function pt(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}xr(pt,br,ca(je,{brighter(t){return t=t==null?En:Math.pow(En,t),new pt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?He:Math.pow(He,t),new pt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new J(wi(t>=240?t-240:t+120,r,i),wi(t,r,i),wi(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new pt(Oo(this.h),sn(this.s),sn(this.l),Nn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Nn(this.opacity);return`${t===1?"hsl(":"hsla("}${Oo(this.h)}, ${sn(this.s)*100}%, ${sn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Oo(t){return t=(t||0)%360,t<0?t+360:t}function sn(t){return Math.max(0,Math.min(1,t||0))}function wi(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ae=(globalThis==null?void 0:globalThis.UNOVIS_COLORS)||["#4D8CFD","#FF6B7E","#F4B83E","#A6CC74","#00C19A","#6859BE"],wf=(globalThis==null?void 0:globalThis.UNOVIS_COLORS_DARK)||["#4D8CFD","#FF6B7E","#FFC16D","#A6CC74","#00C19A","#7887E0"],Rt=t=>`--vis-${wt(t)?`color${t%Ae.length}`:t}`;function kf(t,e=.4){const n=br(t);return n.l=n.l*(1+e),n.formatHex()}function Tf(t,e=.4,n=.6){const i=br(t);return i.s=i.s*(1-n),i.l=i.l*(1-e),i.formatHex()}const Ye=10,Ui=[{id:"stripes-diagonal",svg:'<path d="M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2" stroke="#000"/>'},{id:"dots",svg:'<path d="m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3" fill"#000"/>'},{id:"stripes-vertical",svg:'<path d="M 5,-1 L5,11" stroke="#000"/>'},{id:"crosshatch",svg:'<path d="M0 0L10 10ZM10 0L0 10Z" stroke="#000"/>'},{id:"waves",svg:'<path d="M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z" fill="#000"/>'},{id:"circles",svg:'<circle cx="5" cy="5" r="3" stroke="#000" fill="#fff"/>'}],Hi=[{id:"circle",marker:'<circle cx="5" cy="5" r="5"/>',dashArray:[]},{id:"triangle",marker:'<path d="M5,0 L10,9 L0,9Z">',dashArray:[9,1]},{id:"diamond",marker:'<path d="M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z">',dashArray:[2]},{id:"arrow",marker:'<path d="M4 0 0 0 6 5 0 10 4 10 10 5Z">',dashArray:[2,3,8,3]},{id:"square",marker:'<rect x="1" y="1" width="8" height="8"/>',dashArray:[6]},{id:"star",marker:'<path d="m2 9 3-9 3 9L0 3h10Z"/>',dashArray:[1,6]}];function Ft(t){return`vis-${`pattern-${t.svg?"fill":"marker"}`}-${t.id}`}const Sf=t=>`<mask id="${Ft(t)}">
|
|
2
|
-
<pattern id="${t.id}" viewBox="0 0 10 10" width="${
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("vue");var or="http://www.w3.org/1999/xhtml";const Do={svg:"http://www.w3.org/2000/svg",xhtml:or,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _i(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Do.hasOwnProperty(e)?{space:Do[e],local:t}:t}function Ac(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===or&&e.documentElement.namespaceURI===or?e.createElement(t):e.createElementNS(n,t)}}function Mc(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function sa(t){var e=_i(t);return(e.local?Mc:Ac)(e)}function $c(){}function Hr(t){return t==null?$c:function(){return this.querySelector(t)}}function Ec(t){typeof t!="function"&&(t=Hr(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=new Array(s),l,c,h=0;h<s;++h)(l=o[h])&&(c=t.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new wt(i,this._parents)}function Nc(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Dc(){return[]}function aa(t){return t==null?Dc:function(){return this.querySelectorAll(t)}}function Oc(t){return function(){return Nc(t.apply(this,arguments))}}function Rc(t){typeof t=="function"?t=Oc(t):t=aa(t);for(var e=this._groups,n=e.length,i=[],r=[],o=0;o<n;++o)for(var s=e[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(i.push(t.call(l,l.__data__,c,s)),r.push(l));return new wt(i,r)}function la(t){return function(){return this.matches(t)}}function ca(t){return function(e){return e.matches(t)}}var Lc=Array.prototype.find;function Bc(t){return function(){return Lc.call(this.children,t)}}function Fc(){return this.firstElementChild}function Pc(t){return this.select(t==null?Fc:Bc(typeof t=="function"?t:ca(t)))}var zc=Array.prototype.filter;function Ic(){return Array.from(this.children)}function Vc(t){return function(){return zc.call(this.children,t)}}function Hc(t){return this.selectAll(t==null?Ic:Vc(typeof t=="function"?t:ca(t)))}function Uc(t){typeof t!="function"&&(t=la(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new wt(i,this._parents)}function ua(t){return new Array(t.length)}function Wc(){return new wt(this._enter||this._groups.map(ua),this._parents)}function Xn(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Xn.prototype={constructor:Xn,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Yc(t){return function(){return t}}function Xc(t,e,n,i,r,o){for(var s=0,a,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],i[s]=a):n[s]=new Xn(t,o[s]);for(;s<l;++s)(a=e[s])&&(r[s]=a)}function Gc(t,e,n,i,r,o,s){var a,l,c=new Map,h=e.length,u=o.length,f=new Array(h),g;for(a=0;a<h;++a)(l=e[a])&&(f[a]=g=s.call(l,l.__data__,a,e)+"",c.has(g)?r[a]=l:c.set(g,l));for(a=0;a<u;++a)g=s.call(t,o[a],a,o)+"",(l=c.get(g))?(i[a]=l,l.__data__=o[a],c.delete(g)):n[a]=new Xn(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&c.get(f[a])===l&&(r[a]=l)}function qc(t){return t.__data__}function jc(t,e){if(!arguments.length)return Array.from(this,qc);var n=e?Gc:Xc,i=this._parents,r=this._groups;typeof t!="function"&&(t=Yc(t));for(var o=r.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],u=r[c],f=u.length,g=Zc(t.call(h,h&&h.__data__,c,i)),m=g.length,p=a[c]=new Array(m),v=s[c]=new Array(m),y=l[c]=new Array(f);n(h,u,p,v,y,g,e);for(var x=0,_=0,w,k;x<m;++x)if(w=p[x]){for(x>=_&&(_=x+1);!(k=v[_])&&++_<m;);w._next=k||null}}return s=new wt(s,i),s._enter=a,s._exit=l,s}function Zc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Qc(){return new wt(this._exit||this._groups.map(ua),this._parents)}function Jc(t,e,n){var i=this.enter(),r=this,o=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?o.remove():n(o),i&&r?i.merge(r).order():r}function Kc(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,o=i.length,s=Math.min(r,o),a=new Array(r),l=0;l<s;++l)for(var c=n[l],h=i[l],u=c.length,f=a[l]=new Array(u),g,m=0;m<u;++m)(g=c[m]||h[m])&&(f[m]=g);for(;l<r;++l)a[l]=n[l];return new wt(a,this._parents)}function tu(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,o=i[r],s;--r>=0;)(s=i[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function eu(t){t||(t=nu);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var n=this._groups,i=n.length,r=new Array(i),o=0;o<i;++o){for(var s=n[o],a=s.length,l=r[o]=new Array(a),c,h=0;h<a;++h)(c=s[h])&&(l[h]=c);l.sort(e)}return new wt(r,this._parents).order()}function nu(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function iu(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function ru(){return Array.from(this)}function ou(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length;r<o;++r){var s=i[r];if(s)return s}return null}function su(){let t=0;for(const e of this)++t;return t}function au(){return!this.node()}function lu(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],o=0,s=r.length,a;o<s;++o)(a=r[o])&&t.call(a,a.__data__,o,r);return this}function cu(t){return function(){this.removeAttribute(t)}}function uu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hu(t,e){return function(){this.setAttribute(t,e)}}function fu(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function du(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function gu(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function pu(t,e){var n=_i(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?uu:cu:typeof e=="function"?n.local?gu:du:n.local?fu:hu)(n,e))}function ha(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function mu(t){return function(){this.style.removeProperty(t)}}function vu(t,e,n){return function(){this.style.setProperty(t,e,n)}}function _u(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function yu(t,e,n){return arguments.length>1?this.each((e==null?mu:typeof e=="function"?_u:vu)(t,e,n??"")):De(this.node(),t)}function De(t,e){return t.style.getPropertyValue(e)||ha(t).getComputedStyle(t,null).getPropertyValue(e)}function xu(t){return function(){delete this[t]}}function bu(t,e){return function(){this[t]=e}}function wu(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function ku(t,e){return arguments.length>1?this.each((e==null?xu:typeof e=="function"?wu:bu)(t,e)):this.node()[t]}function fa(t){return t.trim().split(/^|\s+/)}function Ur(t){return t.classList||new da(t)}function da(t){this._node=t,this._names=fa(t.getAttribute("class")||"")}da.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ga(t,e){for(var n=Ur(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function pa(t,e){for(var n=Ur(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Su(t){return function(){ga(this,t)}}function Tu(t){return function(){pa(this,t)}}function Cu(t,e){return function(){(e.apply(this,arguments)?ga:pa)(this,t)}}function Au(t,e){var n=fa(t+"");if(arguments.length<2){for(var i=Ur(this.node()),r=-1,o=n.length;++r<o;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?Cu:e?Su:Tu)(n,e))}function Mu(){this.textContent=""}function $u(t){return function(){this.textContent=t}}function Eu(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Nu(t){return arguments.length?this.each(t==null?Mu:(typeof t=="function"?Eu:$u)(t)):this.node().textContent}function Du(){this.innerHTML=""}function Ou(t){return function(){this.innerHTML=t}}function Ru(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Lu(t){return arguments.length?this.each(t==null?Du:(typeof t=="function"?Ru:Ou)(t)):this.node().innerHTML}function Bu(){this.nextSibling&&this.parentNode.appendChild(this)}function Fu(){return this.each(Bu)}function Pu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function zu(){return this.each(Pu)}function Iu(t){var e=typeof t=="function"?t:sa(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Vu(){return null}function Hu(t,e){var n=typeof t=="function"?t:sa(t),i=e==null?Vu:typeof e=="function"?e:Hr(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function Uu(){var t=this.parentNode;t&&t.removeChild(this)}function Wu(){return this.each(Uu)}function Yu(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xu(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Gu(t){return this.select(t?Xu:Yu)}function qu(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ju(t){return function(e){t.call(this,e,this.__data__)}}function Zu(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function Qu(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,o;n<r;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++i]=o;++i?e.length=i:delete this.__on}}}function Ju(t,e,n){return function(){var i=this.__on,r,o=ju(e);if(i){for(var s=0,a=i.length;s<a;++s)if((r=i[s]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),r.value=e;return}}this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function Ku(t,e,n){var i=Zu(t+""),r,o=i.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(r=0,h=a[l];r<o;++r)if((s=i[r]).type===h.type&&s.name===h.name)return h.value}return}for(a=e?Ju:Qu,r=0;r<o;++r)this.each(a(i[r],e,n));return this}function ma(t,e,n){var i=ha(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function th(t,e){return function(){return ma(this,t,e)}}function eh(t,e){return function(){return ma(this,t,e.apply(this,arguments))}}function nh(t,e){return this.each((typeof e=="function"?eh:th)(t,e))}function*ih(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length,s;r<o;++r)(s=i[r])&&(yield s)}var va=[null];function wt(t,e){this._groups=t,this._parents=e}function pn(){return new wt([[document.documentElement]],va)}function rh(){return this}wt.prototype=pn.prototype={constructor:wt,select:Ec,selectAll:Rc,selectChild:Pc,selectChildren:Hc,filter:Uc,data:jc,enter:Wc,exit:Qc,join:Jc,merge:Kc,selection:rh,order:tu,sort:eu,call:iu,nodes:ru,node:ou,size:su,empty:au,each:lu,attr:pu,style:yu,property:ku,classed:Au,text:Nu,html:Lu,raise:Fu,lower:zu,append:Iu,insert:Hu,remove:Wu,clone:Gu,datum:qu,on:Ku,dispatch:nh,[Symbol.iterator]:ih};function at(t){return typeof t=="string"?new wt([[document.querySelector(t)]],[document.documentElement]):new wt([[t]],va)}function oh(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Gn(t,e){if(t=oh(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}var tn;(function(t){t[t.SVG=0]="SVG",t[t.HTML=1]="HTML"})(tn||(tn={}));var Xt;(function(t){t.Fit="fit",t.Extend="extend",t.FitWidth="fit_width"})(Xt||(Xt={}));function en(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function sh(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function yi(t){let e,n,i;t.length!==2?(e=en,n=(a,l)=>en(t(a),l),i=(a,l)=>t(a)-l):(e=t===en||t===sh?t:ah,n=t,i=t);function r(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<0?c=u+1:h=u}while(c<h)}return c}function o(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<=0?c=u+1:h=u}while(c<h)}return c}function s(a,l,c=0,h=a.length){const u=r(a,l,c,h-1);return u>c&&i(a[u-1],l)>-i(a[u],l)?u-1:u}return{left:r,center:s,right:o}}function ah(){return 0}function _a(t){return t===null?NaN:+t}const lh=yi(en),xi=lh.right;yi(_a).center;function ch(t,e){let n,i;for(const r of t)r!=null&&(n===void 0?r>=r&&(n=i=r):(n>r&&(n=r),i<r&&(i=r)));return[n,i]}class Oo extends Map{constructor(e,n=fh){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[i,r]of e)this.set(i,r)}get(e){return super.get(Ro(this,e))}has(e){return super.has(Ro(this,e))}set(e,n){return super.set(uh(this,e),n)}delete(e){return super.delete(hh(this,e))}}function Ro({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function uh({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function hh({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function fh(t){return t!==null&&typeof t=="object"?t.valueOf():t}const dh=Math.sqrt(50),gh=Math.sqrt(10),ph=Math.sqrt(2);function qn(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=dh?10:o>=gh?5:o>=ph?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?qn(t,e,n*2):[a,l,c]}function sr(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,o,s]=i?qn(e,t,n):qn(t,e,n);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(r+c)/-s;else for(let c=0;c<a;++c)l[c]=(r+c)*s;return l}function ar(t,e,n){return e=+e,t=+t,n=+n,qn(t,e,n)[2]}function lr(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?ar(e,t,n):ar(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function cr(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function nn(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function mh(t,e,n=_a){if(!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,o=Math.floor(r),s=+n(t[o],o,t),a=+n(t[o+1],o+1,t);return s+(a-s)*(r-o)}}function vh(t,e){let n=0,i=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&(++n,i+=o)}if(n)return i/n}function*_h(t){for(const e of t)yield*e}function yh(t){return Array.from(_h(t))}function ya(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(r);++i<r;)o[i]=t+i*n;return o}function xh(t,e){let n=0;if(e===void 0)for(let i of t)(i=+i)&&(n+=i);else{let i=-1;for(let r of t)(r=+e(r,++i,t))&&(n+=r)}return n}function bh(t,e,n){var i={},r=i.noTrailing,o=r===void 0?!1:r,s=i.noLeading,a=s===void 0?!1:s,l=i.debounceMode,c=l===void 0?void 0:l,h,u=!1,f=0;function g(){h&&clearTimeout(h)}function m(v){var y=v||{},x=y.upcomingOnly,_=x===void 0?!1:x;g(),u=!_}function p(){for(var v=arguments.length,y=new Array(v),x=0;x<v;x++)y[x]=arguments[x];var _=this,w=Date.now()-f;if(u)return;function k(){f=Date.now(),e.apply(_,y)}function b(){h=void 0}!a&&c&&!h&&k(),g(),c===void 0&&w>t?a?(f=Date.now(),o||(h=setTimeout(c?b:k,t))):k():o!==!0&&(h=setTimeout(c?b:k,c===void 0?t-w:t))}return p.cancel=m,p}const xt=t=>typeof t=="number",Wr=t=>typeof t=="function",Gt=t=>Array.isArray(t),wh=t=>t instanceof Object,jn=t=>t.constructor.name!=="Function"&&t.constructor.name!=="Object",Lo=t=>wh(t)&&!Gt(t)&&!Wr(t)&&!jn(t),kh=t=>[Object,Array].includes((t||{}).constructor)&&!Object.entries(t||{}).length,sn=(t,e,n=[],i=new Set)=>{if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;if(i.has(t))return!0;i.add(t);for(let r=0;r<t.length;r++)if(!sn(t[r],e[r],n,i))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object")return!1;if(t===e)return!0;const r=Object.keys(t).filter(s=>!n.includes(s)),o=Object.keys(e).filter(s=>!n.includes(s));if(r.length!==o.length)return!1;if(i.has(t))return!0;i.add(t);for(const s of r)if(!sn(t[s],e[s],n,i))return!1;return!0}return t===e},ur=t=>t.flat(),Zn=(t,e=new Map)=>{if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){const n=[];e.set(t,n);for(const i of t)n.push(e.has(i)?e.get(i):Zn(i,e));return n}if(jn(t))return t;if(t instanceof Object){const n={};e.set(t,n);const i=t;return Object.keys(t).reduce((r,o)=>(r[o]=e.has(i[o])?e.get(i[o]):Zn(i[o],e),r),n),n}return t},xe=(t,e,n=new Map)=>{if(!t||!e||t===e)return t;const i=jn(t)?t:Zn(t);return n.has(e)?n.get(e):(n.set(e,i),Object.keys(e).forEach(r=>{r==="__proto__"||r==="constructor"||(Lo(t[r])&&Lo(e[r])?i[r]=xe(t[r],e[r],n):jn(e)?i[r]=e:i[r]=Zn(e[r]))}),i)},Qn=(t,e,n)=>bh(e,t);function Yr(t,e,n){return Wr(e)?e(t,n):e}function Oe(t,e,n){return Yr(t,e,n)}function X(t,e,n){return Yr(t,e,n)}function Ue(t){return t.filter(e=>e&&!xt(e))}function Bt(t,e,n){return Math.min(Math.max(t,e),n)}function Sh(t,...e){if(!t)return[void 0,void 0];if(Gt(e)){let n=0,i=0;return t.forEach((r,o)=>{let s=0,a=0;for(const l of e){const c=X(r,l,o)||0;c>=0?s+=c:a+=c}s>i&&(i=s),a<n&&(n=a)}),[n,i]}}function Th(t,e,...n){const i=[];let r=0,o=0;for(const s of n){const a=X(t,s,e)||0;a>=0?i.push(r+=a):i.push(o+=a)}return i}function Ch(t,e,n,i){const r=t.map((a,l)=>X(a,e,l)||0),o=n.map((a,l)=>{const c=vh(t,(h,u)=>X(h,a,u)||0);return c===0&&Array.isArray(i)?i[l]:c<0}),s=n.map(()=>[]);return t.forEach((a,l)=>{let c=r[l],h=r[l];n.forEach((u,f)=>{const g=X(a,u,l)||0;g>=0?s[f].push([c,c+=g]):s[f].push([h,h+=g])})}),s.forEach((a,l)=>{a.isMostlyNegative=o[l]}),s}function xa(t,...e){return t?nn(t,(i,r)=>nn(e,o=>X(i,o,r))):void 0}function ba(t,...e){return t?cr(t,(i,r)=>cr(e,o=>X(i,o,r))):void 0}function Nn(t,...e){return[xa(t,...e),ba(t,...e)]}function Ah(t,e,n){if(t.length<=1)return t[0];const i=t.map((s,a)=>X(s,n,a));i.sort((s,a)=>s-a);const r=yi(s=>s).left,o=r(i,e,1,t.length-1);return e-i[o-1]>i[o]-e?t[o]:t[o-1]}function wa(t,e,n){return t.filter((r,o)=>{const s=X(r,n,o);return s>=e[0]&&s<=e[1]})}var pe=[],Mh=function(){return pe.some(function(t){return t.activeTargets.length>0})},$h=function(){return pe.some(function(t){return t.skippedTargets.length>0})},Bo="ResizeObserver loop completed with undelivered notifications.",Eh=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Bo}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Bo),window.dispatchEvent(t)},an;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(an||(an={}));var me=function(t){return Object.freeze(t)},Nh=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,me(this)}return t}(),ka=function(){function t(e,n,i,r){return this.x=e,this.y=n,this.width=i,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,me(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,i=e.y,r=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:i,top:r,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Xr=function(t){return t instanceof SVGElement&&"getBBox"in t},Sa=function(t){if(Xr(t)){var e=t.getBBox(),n=e.width,i=e.height;return!n&&!i}var r=t,o=r.offsetWidth,s=r.offsetHeight;return!(o||s||t.getClientRects().length)},Fo=function(t){var e;if(t instanceof Element)return!0;var n=(e=t==null?void 0:t.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},Dh=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},rn=typeof window<"u"?window:{},wn=new WeakMap,Po=/auto|scroll/,Oh=/^tb|vertical/,Rh=/msie|trident/i.test(rn.navigator&&rn.navigator.userAgent),Ot=function(t){return parseFloat(t||"0")},Me=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new Nh((n?e:t)||0,(n?t:e)||0)},zo=me({devicePixelContentBoxSize:Me(),borderBoxSize:Me(),contentBoxSize:Me(),contentRect:new ka(0,0,0,0)}),Ta=function(t,e){if(e===void 0&&(e=!1),wn.has(t)&&!e)return wn.get(t);if(Sa(t))return wn.set(t,zo),zo;var n=getComputedStyle(t),i=Xr(t)&&t.ownerSVGElement&&t.getBBox(),r=!Rh&&n.boxSizing==="border-box",o=Oh.test(n.writingMode||""),s=!i&&Po.test(n.overflowY||""),a=!i&&Po.test(n.overflowX||""),l=i?0:Ot(n.paddingTop),c=i?0:Ot(n.paddingRight),h=i?0:Ot(n.paddingBottom),u=i?0:Ot(n.paddingLeft),f=i?0:Ot(n.borderTopWidth),g=i?0:Ot(n.borderRightWidth),m=i?0:Ot(n.borderBottomWidth),p=i?0:Ot(n.borderLeftWidth),v=u+c,y=l+h,x=p+g,_=f+m,w=a?t.offsetHeight-_-t.clientHeight:0,k=s?t.offsetWidth-x-t.clientWidth:0,b=r?v+x:0,T=r?y+_:0,R=i?i.width:Ot(n.width)-b-k,E=i?i.height:Ot(n.height)-T-w,U=R+v+k+x,$=E+y+w+_,F=me({devicePixelContentBoxSize:Me(Math.round(R*devicePixelRatio),Math.round(E*devicePixelRatio),o),borderBoxSize:Me(U,$,o),contentBoxSize:Me(R,E,o),contentRect:new ka(u,l,R,E)});return wn.set(t,F),F},Ca=function(t,e,n){var i=Ta(t,n),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case an.DEVICE_PIXEL_CONTENT_BOX:return s;case an.BORDER_BOX:return r;default:return o}},Lh=function(){function t(e){var n=Ta(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=me([n.borderBoxSize]),this.contentBoxSize=me([n.contentBoxSize]),this.devicePixelContentBoxSize=me([n.devicePixelContentBoxSize])}return t}(),Aa=function(t){if(Sa(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Bh=function(){var t=1/0,e=[];pe.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var h=new Lh(c.target),u=Aa(c.target);a.push(h),c.lastReportedSize=Ca(c.target,c.observedBox),u<t&&(t=u)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,i=e;n<i.length;n++){var r=i[n];r()}return t},Io=function(t){pe.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(Aa(r.target)>t?n.activeTargets.push(r):n.skippedTargets.push(r))})})},Fh=function(){var t=0;for(Io(t);Mh();)t=Bh(),Io(t);return $h()&&Eh(),t>0},Hi,Ma=[],Ph=function(){return Ma.splice(0).forEach(function(t){return t()})},zh=function(t){if(!Hi){var e=0,n=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return Ph()}).observe(n,i),Hi=function(){n.textContent="".concat(e?e--:e++)}}Ma.push(t),Hi()},Ih=function(t){zh(function(){requestAnimationFrame(t)})},Dn=0,Vh=function(){return!!Dn},Hh=250,Uh={attributes:!0,characterData:!0,childList:!0,subtree:!0},Vo=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Ho=function(t){return t===void 0&&(t=0),Date.now()+t},Ui=!1,Wh=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=Hh),!Ui){Ui=!0;var i=Ho(e);Ih(function(){var r=!1;try{r=Fh()}finally{if(Ui=!1,e=i-Ho(),!Vh())return;r?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,Uh)};document.body?n():rn.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Vo.forEach(function(n){return rn.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Vo.forEach(function(n){return rn.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),hr=new Wh,Uo=function(t){!Dn&&t>0&&hr.start(),Dn+=t,!Dn&&hr.stop()},Yh=function(t){return!Xr(t)&&!Dh(t)&&getComputedStyle(t).display==="inline"},Xh=function(){function t(e,n){this.target=e,this.observedBox=n||an.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Ca(this.target,this.observedBox,!0);return Yh(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Gh=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}(),kn=new WeakMap,Wo=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Sn=function(){function t(){}return t.connect=function(e,n){var i=new Gh(e,n);kn.set(e,i)},t.observe=function(e,n,i){var r=kn.get(e),o=r.observationTargets.length===0;Wo(r.observationTargets,n)<0&&(o&&pe.push(r),r.observationTargets.push(new Xh(n,i&&i.box)),Uo(1),hr.schedule())},t.unobserve=function(e,n){var i=kn.get(e),r=Wo(i.observationTargets,n),o=i.observationTargets.length===1;r>=0&&(o&&pe.splice(pe.indexOf(i),1),i.observationTargets.splice(r,1),Uo(-1))},t.disconnect=function(e){var n=this,i=kn.get(e);i.observationTargets.slice().forEach(function(r){return n.unobserve(e,r.target)}),i.activeTargets.splice(0,i.activeTargets.length)},t}(),qh=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Sn.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Fo(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Sn.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!Fo(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Sn.unobserve(this,e)},t.prototype.disconnect=function(){Sn.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const jh=globalThis.ResizeObserver||qh,Gr={duration:void 0,margin:{top:0,bottom:0,left:0,right:0},padding:{top:0,bottom:0,left:0,right:0},sizing:Xt.Fit,width:void 0,height:void 0,svgDefs:void 0,ariaLabel:void 0};class Re{constructor(e){this._defaultConfig=Gr,this._isFirstRender=!0,this._renderAnimationFrameId=null,this._container=e;const n=at(this._container);n.attr("role","figure"),this.svg=n.append("svg").style("display","block").attr("xmlns","http://www.w3.org/2000/svg").attr("height",Re.DEFAULT_CONTAINER_HEIGHT).attr("aria-hidden",!0),this._svgDefs=this.svg.append("defs"),this._svgDefsExternal=this.svg.append("defs"),this.element=this.svg.node()}updateContainer(e){var n;this.prevConfig=this.config,this.config=xe(this._defaultConfig,e),(e==null?void 0:e.svgDefs)!==((n=this.prevConfig)===null||n===void 0?void 0:n.svgDefs)&&(this._svgDefsExternal.selectAll("*").remove(),this._svgDefsExternal.html(e.svgDefs))}_preRender(){}_render(e){const{config:n}=this;at(this._container).attr("aria-label",n.ariaLabel),this._isFirstRender=!1}render(e=this.config.duration){const n=this.config.width||this.containerWidth,i=this.config.height||this.containerHeight;this.svg.attr("width",n).attr("height",i),this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}get containerWidth(){return this.config.width?this.element.clientWidth:this._container.clientWidth||this._container.getBoundingClientRect().width}get containerHeight(){return this.config.height?this.element.clientHeight:this._container.clientHeight||this._container.getBoundingClientRect().height||Re.DEFAULT_CONTAINER_HEIGHT}get width(){return Bt(this.containerWidth-this.config.margin.left-this.config.margin.right,0,Number.POSITIVE_INFINITY)}get height(){return Bt(this.containerHeight-this.config.margin.top-this.config.margin.bottom,0,Number.POSITIVE_INFINITY)}_removeAllChildren(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}_onResize(){const{config:e}=this;(e.sizing===Xt.Fit||e.sizing===Xt.FitWidth)&&this.render(0)}_setUpResizeObserver(){if(this._resizeObserver)return;const e=this._container.getBoundingClientRect();this._containerSize={width:e.width,height:e.height},this._resizeObserver=new jh((n,i)=>{cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserverAnimationFrameId=requestAnimationFrame(()=>{const r=this._container.getBoundingClientRect(),o={width:r.width,height:r.height};!sn(this._containerSize,o)&&o.width&&o.height&&(this._containerSize=o,this._onResize())})}),this._resizeObserver.observe(this._container)}destroy(){var e;cancelAnimationFrame(this._renderAnimationFrameId),cancelAnimationFrame(this._resizeObserverAnimationFrameId),(e=this._resizeObserver)===null||e===void 0||e.disconnect(),this.svg.remove()}}Re.DEFAULT_CONTAINER_HEIGHT=300;function Zh(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function Qh(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var Jh=function(){function t(n){var i=this;this._insertTag=function(r){var o;i.tags.length===0?i.insertionPoint?o=i.insertionPoint.nextSibling:i.prepend?o=i.container.firstChild:o=i.before:o=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,o),i.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Qh(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Zh(r);try{o.insertRule(i,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},t}(),rt="-ms-",Jn="-moz-",I="-webkit-",$a="comm",qr="rule",jr="decl",Kh="@import",Ea="@keyframes",tf="@layer",ef=Math.abs,bi=String.fromCharCode,nf=Object.assign;function rf(t,e){return K(t,0)^45?(((e<<2^K(t,0))<<2^K(t,1))<<2^K(t,2))<<2^K(t,3):0}function Na(t){return t.trim()}function of(t,e){return(t=e.exec(t))?t[0]:t}function V(t,e,n){return t.replace(e,n)}function fr(t,e){return t.indexOf(e)}function K(t,e){return t.charCodeAt(e)|0}function ln(t,e,n){return t.slice(e,n)}function Lt(t){return t.length}function Zr(t){return t.length}function Tn(t,e){return e.push(t),t}function sf(t,e){return t.map(e).join("")}var wi=1,Le=1,Da=0,mt=0,j=0,Ie="";function ki(t,e,n,i,r,o,s){return{value:t,root:e,parent:n,type:i,props:r,children:o,line:wi,column:Le,length:s,return:""}}function We(t,e){return nf(ki("",null,null,"",null,null,0),t,{length:-t.length},e)}function af(){return j}function lf(){return j=mt>0?K(Ie,--mt):0,Le--,j===10&&(Le=1,wi--),j}function bt(){return j=mt<Da?K(Ie,mt++):0,Le++,j===10&&(Le=1,wi++),j}function Ft(){return K(Ie,mt)}function On(){return mt}function mn(t,e){return ln(Ie,t,e)}function cn(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Oa(t){return wi=Le=1,Da=Lt(Ie=t),mt=0,[]}function Ra(t){return Ie="",t}function Rn(t){return Na(mn(mt-1,dr(t===91?t+2:t===40?t+1:t)))}function cf(t){for(;(j=Ft())&&j<33;)bt();return cn(t)>2||cn(j)>3?"":" "}function uf(t,e){for(;--e&&bt()&&!(j<48||j>102||j>57&&j<65||j>70&&j<97););return mn(t,On()+(e<6&&Ft()==32&&bt()==32))}function dr(t){for(;bt();)switch(j){case t:return mt;case 34:case 39:t!==34&&t!==39&&dr(j);break;case 40:t===41&&dr(t);break;case 92:bt();break}return mt}function hf(t,e){for(;bt()&&t+j!==57;)if(t+j===84&&Ft()===47)break;return"/*"+mn(e,mt-1)+"*"+bi(t===47?t:bt())}function ff(t){for(;!cn(Ft());)bt();return mn(t,mt)}function df(t){return Ra(Ln("",null,null,null,[""],t=Oa(t),0,[0],t))}function Ln(t,e,n,i,r,o,s,a,l){for(var c=0,h=0,u=s,f=0,g=0,m=0,p=1,v=1,y=1,x=0,_="",w=r,k=o,b=i,T=_;v;)switch(m=x,x=bt()){case 40:if(m!=108&&K(T,u-1)==58){fr(T+=V(Rn(x),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:T+=Rn(x);break;case 9:case 10:case 13:case 32:T+=cf(m);break;case 92:T+=uf(On()-1,7);continue;case 47:switch(Ft()){case 42:case 47:Tn(gf(hf(bt(),On()),e,n),l);break;default:T+="/"}break;case 123*p:a[c++]=Lt(T)*y;case 125*p:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+h:y==-1&&(T=V(T,/\f/g,"")),g>0&&Lt(T)-u&&Tn(g>32?Xo(T+";",i,n,u-1):Xo(V(T," ","")+";",i,n,u-2),l);break;case 59:T+=";";default:if(Tn(b=Yo(T,e,n,c,h,r,a,_,w=[],k=[],u),o),x===123)if(h===0)Ln(T,e,b,b,w,o,u,a,k);else switch(f===99&&K(T,3)===110?100:f){case 100:case 108:case 109:case 115:Ln(t,b,b,i&&Tn(Yo(t,b,b,0,0,r,a,_,r,w=[],u),k),r,k,u,a,i?w:k);break;default:Ln(T,b,b,b,[""],k,0,a,k)}}c=h=g=0,p=y=1,_=T="",u=s;break;case 58:u=1+Lt(T),g=m;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&lf()==125)continue}switch(T+=bi(x),x*p){case 38:y=h>0?1:(T+="\f",-1);break;case 44:a[c++]=(Lt(T)-1)*y,y=1;break;case 64:Ft()===45&&(T+=Rn(bt())),f=Ft(),h=u=Lt(_=T+=ff(On())),x++;break;case 45:m===45&&Lt(T)==2&&(p=0)}}return o}function Yo(t,e,n,i,r,o,s,a,l,c,h){for(var u=r-1,f=r===0?o:[""],g=Zr(f),m=0,p=0,v=0;m<i;++m)for(var y=0,x=ln(t,u+1,u=ef(p=s[m])),_=t;y<g;++y)(_=Na(p>0?f[y]+" "+x:V(x,/&\f/g,f[y])))&&(l[v++]=_);return ki(t,e,n,r===0?qr:a,l,c,h)}function gf(t,e,n){return ki(t,e,n,$a,bi(af()),ln(t,2,-2),0)}function Xo(t,e,n,i){return ki(t,e,n,jr,ln(t,0,i),ln(t,i+1,-1),i)}function $e(t,e){for(var n="",i=Zr(t),r=0;r<i;r++)n+=e(t[r],r,t,e)||"";return n}function pf(t,e,n,i){switch(t.type){case tf:if(t.children.length)break;case Kh:case jr:return t.return=t.return||t.value;case $a:return"";case Ea:return t.return=t.value+"{"+$e(t.children,i)+"}";case qr:t.value=t.props.join(",")}return Lt(n=$e(t.children,i))?t.return=t.value+"{"+n+"}":""}function mf(t){var e=Zr(t);return function(n,i,r,o){for(var s="",a=0;a<e;a++)s+=t[a](n,i,r,o)||"";return s}}function vf(t){return function(e){e.root||(e=e.return)&&t(e)}}function _f(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var yf=function(e,n,i){for(var r=0,o=0;r=o,o=Ft(),r===38&&o===12&&(n[i]=1),!cn(o);)bt();return mn(e,mt)},xf=function(e,n){var i=-1,r=44;do switch(cn(r)){case 0:r===38&&Ft()===12&&(n[i]=1),e[i]+=yf(mt-1,n,i);break;case 2:e[i]+=Rn(r);break;case 4:if(r===44){e[++i]=Ft()===58?"&\f":"",n[i]=e[i].length;break}default:e[i]+=bi(r)}while(r=bt());return e},bf=function(e,n){return Ra(xf(Oa(e),n))},Go=new WeakMap,wf=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,i=e.parent,r=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!Go.get(i))&&!r){Go.set(e,!0);for(var o=[],s=bf(n,o),a=i.props,l=0,c=0;l<s.length;l++)for(var h=0;h<a.length;h++,c++)e.props[c]=o[l]?s[l].replace(/&\f/g,a[h]):a[h]+" "+s[l]}}},kf=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function La(t,e){switch(rf(t,e)){case 5103:return I+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return I+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return I+t+Jn+t+rt+t+t;case 6828:case 4268:return I+t+rt+t+t;case 6165:return I+t+rt+"flex-"+t+t;case 5187:return I+t+V(t,/(\w+).+(:[^]+)/,I+"box-$1$2"+rt+"flex-$1$2")+t;case 5443:return I+t+rt+"flex-item-"+V(t,/flex-|-self/,"")+t;case 4675:return I+t+rt+"flex-line-pack"+V(t,/align-content|flex-|-self/,"")+t;case 5548:return I+t+rt+V(t,"shrink","negative")+t;case 5292:return I+t+rt+V(t,"basis","preferred-size")+t;case 6060:return I+"box-"+V(t,"-grow","")+I+t+rt+V(t,"grow","positive")+t;case 4554:return I+V(t,/([^-])(transform)/g,"$1"+I+"$2")+t;case 6187:return V(V(V(t,/(zoom-|grab)/,I+"$1"),/(image-set)/,I+"$1"),t,"")+t;case 5495:case 3959:return V(t,/(image-set\([^]*)/,I+"$1$`$1");case 4968:return V(V(t,/(.+:)(flex-)?(.*)/,I+"box-pack:$3"+rt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+I+t+t;case 4095:case 3583:case 4068:case 2532:return V(t,/(.+)-inline(.+)/,I+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Lt(t)-1-e>6)switch(K(t,e+1)){case 109:if(K(t,e+4)!==45)break;case 102:return V(t,/(.+:)(.+)-([^]+)/,"$1"+I+"$2-$3$1"+Jn+(K(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~fr(t,"stretch")?La(V(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(K(t,e+1)!==115)break;case 6444:switch(K(t,Lt(t)-3-(~fr(t,"!important")&&10))){case 107:return V(t,":",":"+I)+t;case 101:return V(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+I+(K(t,14)===45?"inline-":"")+"box$3$1"+I+"$2$3$1"+rt+"$2box$3")+t}break;case 5936:switch(K(t,e+11)){case 114:return I+t+rt+V(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return I+t+rt+V(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return I+t+rt+V(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return I+t+rt+t+t}return t}var Sf=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case jr:e.return=La(e.value,e.length);break;case Ea:return $e([We(e,{value:V(e.value,"@","@"+I)})],r);case qr:if(e.length)return sf(e.props,function(o){switch(of(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return $e([We(e,{props:[V(o,/:(read-\w+)/,":"+Jn+"$1")]})],r);case"::placeholder":return $e([We(e,{props:[V(o,/:(plac\w+)/,":"+I+"input-$1")]}),We(e,{props:[V(o,/:(plac\w+)/,":"+Jn+"$1")]}),We(e,{props:[V(o,/:(plac\w+)/,rt+"input-$1")]})],r)}return""})}},Tf=[Sf],Cf=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(p){var v=p.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var r=e.stylisPlugins||Tf,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(p){for(var v=p.getAttribute("data-emotion").split(" "),y=1;y<v.length;y++)o[v[y]]=!0;a.push(p)});var l,c=[wf,kf];{var h,u=[pf,vf(function(p){h.insert(p)})],f=mf(c.concat(r,u)),g=function(v){return $e(df(v),f)};l=function(v,y,x,_){h=x,g(v?v+"{"+y.styles+"}":y.styles),_&&(m.inserted[y.name]=!0)}}var m={key:n,sheet:new Jh({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(a),m};function Af(t){for(var e=0,n,i=0,r=t.length;r>=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Mf={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},$f=/[A-Z]|^ms/g,Ef=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ba=function(e){return e.charCodeAt(1)===45},qo=function(e){return e!=null&&typeof e!="boolean"},Wi=_f(function(t){return Ba(t)?t:t.replace($f,"-$&").toLowerCase()}),jo=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Ef,function(i,r,o){return re={name:r,styles:o,next:re},r})}return Mf[e]!==1&&!Ba(e)&&typeof n=="number"&&n!==0?n+"px":n};function Kn(t,e,n){if(n==null)return"";var i=n;if(i.__emotion_styles!==void 0)return i;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return re={name:r.name,styles:r.styles,next:re},r.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)re={name:s.name,styles:s.styles,next:re},s=s.next;var a=o.styles+";";return a}return Nf(t,e,n)}}var l=n;if(e==null)return l;var c=e[l];return c!==void 0?c:l}function Nf(t,e,n){var i="";if(Array.isArray(n))for(var r=0;r<n.length;r++)i+=Kn(t,e,n[r])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;e!=null&&e[a]!==void 0?i+=o+"{"+e[a]+"}":qo(a)&&(i+=Wi(o)+":"+jo(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var l=0;l<s.length;l++)qo(s[l])&&(i+=Wi(o)+":"+jo(o,s[l])+";");else{var c=Kn(t,e,s);switch(o){case"animation":case"animationName":{i+=Wi(o)+":"+c+";";break}default:i+=o+"{"+c+"}"}}}return i}var Zo=/label:\s*([^\s;{]+)\s*(;|$)/g,re;function Yi(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,r="";re=void 0;var o=t[0];if(o==null||o.raw===void 0)i=!1,r+=Kn(n,e,o);else{var s=o;r+=s[0]}for(var a=1;a<t.length;a++)if(r+=Kn(n,e,t[a]),i){var l=o;r+=l[a]}Zo.lastIndex=0;for(var c="",h;(h=Zo.exec(r))!==null;)c+="-"+h[1];var u=Af(r)+c;return{name:u,styles:r,next:re}}function Fa(t,e,n){var i="";return n.split(" ").forEach(function(r){t[r]!==void 0?e.push(t[r]+";"):r&&(i+=r+" ")}),i}var Df=function(e,n,i){var r=e.key+"-"+n.name;e.registered[r]===void 0&&(e.registered[r]=n.styles)},Of=function(e,n,i){Df(e,n);var r=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+r:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function Qo(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function Jo(t,e,n){var i=[],r=Fa(t,i,n);return i.length<2?n:r+e(i)}var Rf=function(e){var n=Cf(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var i=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=Yi(c,n.registered,void 0);return Of(n,u),n.key+"-"+u.name},r=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=Yi(c,n.registered),f="animation-"+u.name;return Qo(n,{name:u.name,styles:"@keyframes "+f+"{"+u.styles+"}"}),f},o=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=Yi(c,n.registered);Qo(n,u)},s=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];return Jo(n.registered,i,Lf(c))};return{css:i,cx:s,injectGlobal:o,keyframes:r,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:Fa.bind(null,n.registered),merge:Jo.bind(null,n.registered,i)}},Lf=function t(e){for(var n="",i=0;i<e.length;i++){var r=e[i];if(r!=null){var o=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))o=t(r);else{o="";for(var s in r)r[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=r}o&&(n&&(n+=" "),n+=o)}}return n},Pa=Rf({key:"css"}),Jt=Pa.injectGlobal,O=Pa.css;function Bf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Xi,Ko;function Ff(){return Ko||(Ko=1,Xi=function(e,n){n||(n=[0,""]),e=String(e);var i=parseFloat(e,10);return n[0]=i,n[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}),Xi}var Gi,ts;function Pf(){if(ts)return Gi;ts=1;var t=Ff();Gi=r;var e=i("in",document.body);function n(o,s){var a=t(getComputedStyle(o).getPropertyValue(s));return a[0]*r(a[1],o)}function i(o,s){var a=document.createElement("div");a.style.height="128"+o,s.appendChild(a);var l=n(a,"height")/128;return s.removeChild(a),l}function r(o,s){if(!o)return null;switch(s=s||document.body,o=(o+""||"px").trim().toLowerCase(),(s===window||s===document)&&(s=document.body),o){case"%":return s.clientHeight/100;case"ch":case"ex":return i(o,s);case"em":return n(s,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return e;case"cm":return e/2.54;case"mm":return e/25.4;case"pt":return e/72;case"pc":return e/6;case"px":return 1}var a=t(o);if(!isNaN(a[0])&&a[1]){var l=r(a[1],s);return typeof l=="number"?a[0]*l:null}return null}return Gi}Pf();function za(){const t=()=>Math.floor((1+crypto.getRandomValues(new Uint32Array(1))[0])*65536).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}function zf(t,e){const n=t.substr(4,t.length-5);return getComputedStyle(e).getPropertyValue(n)}function If(t,e,n=0){const[i,r,o,s]=[t.x+n,t.y+t.height-2*n,t.x+t.width-2*n,t.y+n],[a,l,c,h]=[e.x+n,e.y+e.height-2*n,e.x+e.width-2*n,e.y+n];return!(r<h||l<s||o<a||c<i)}function Qr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ia(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function vn(){}var un=.7,ti=1/un,Ee="\\s*([+-]?\\d+)\\s*",hn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vf=/^#([0-9a-f]{3,8})$/,Hf=new RegExp(`^rgb\\(${Ee},${Ee},${Ee}\\)$`),Uf=new RegExp(`^rgb\\(${Pt},${Pt},${Pt}\\)$`),Wf=new RegExp(`^rgba\\(${Ee},${Ee},${Ee},${hn}\\)$`),Yf=new RegExp(`^rgba\\(${Pt},${Pt},${Pt},${hn}\\)$`),Xf=new RegExp(`^hsl\\(${hn},${Pt},${Pt}\\)$`),Gf=new RegExp(`^hsla\\(${hn},${Pt},${Pt},${hn}\\)$`),es={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};Qr(vn,be,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ns,formatHex:ns,formatHex8:qf,formatHsl:jf,formatRgb:is,toString:is});function ns(){return this.rgb().formatHex()}function qf(){return this.rgb().formatHex8()}function jf(){return Va(this).formatHsl()}function is(){return this.rgb().formatRgb()}function be(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Vf.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?rs(e):n===3?new dt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Cn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Cn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Hf.exec(t))?new dt(e[1],e[2],e[3],1):(e=Uf.exec(t))?new dt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Wf.exec(t))?Cn(e[1],e[2],e[3],e[4]):(e=Yf.exec(t))?Cn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Xf.exec(t))?as(e[1],e[2]/100,e[3]/100,1):(e=Gf.exec(t))?as(e[1],e[2]/100,e[3]/100,e[4]):es.hasOwnProperty(t)?rs(es[t]):t==="transparent"?new dt(NaN,NaN,NaN,0):null}function rs(t){return new dt(t>>16&255,t>>8&255,t&255,1)}function Cn(t,e,n,i){return i<=0&&(t=e=n=NaN),new dt(t,e,n,i)}function Zf(t){return t instanceof vn||(t=be(t)),t?(t=t.rgb(),new dt(t.r,t.g,t.b,t.opacity)):new dt}function gr(t,e,n,i){return arguments.length===1?Zf(t):new dt(t,e,n,i??1)}function dt(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}Qr(dt,gr,Ia(vn,{brighter(t){return t=t==null?ti:Math.pow(ti,t),new dt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?un:Math.pow(un,t),new dt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new dt(ve(this.r),ve(this.g),ve(this.b),ei(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:os,formatHex:os,formatHex8:Qf,formatRgb:ss,toString:ss}));function os(){return`#${de(this.r)}${de(this.g)}${de(this.b)}`}function Qf(){return`#${de(this.r)}${de(this.g)}${de(this.b)}${de((isNaN(this.opacity)?1:this.opacity)*255)}`}function ss(){const t=ei(this.opacity);return`${t===1?"rgb(":"rgba("}${ve(this.r)}, ${ve(this.g)}, ${ve(this.b)}${t===1?")":`, ${t})`}`}function ei(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ve(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function de(t){return t=ve(t),(t<16?"0":"")+t.toString(16)}function as(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Mt(t,e,n,i)}function Va(t){if(t instanceof Mt)return new Mt(t.h,t.s,t.l,t.opacity);if(t instanceof vn||(t=be(t)),!t)return new Mt;if(t instanceof Mt)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(e===o?s=(n-i)/a+(n<i)*6:n===o?s=(i-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new Mt(s,a,l,t.opacity)}function Jr(t,e,n,i){return arguments.length===1?Va(t):new Mt(t,e,n,i??1)}function Mt(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}Qr(Mt,Jr,Ia(vn,{brighter(t){return t=t==null?ti:Math.pow(ti,t),new Mt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?un:Math.pow(un,t),new Mt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new dt(qi(t>=240?t-240:t+120,r,i),qi(t,r,i),qi(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new Mt(ls(this.h),An(this.s),An(this.l),ei(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ei(this.opacity);return`${t===1?"hsl(":"hsla("}${ls(this.h)}, ${An(this.s)*100}%, ${An(this.l)*100}%${t===1?")":`, ${t})`}`}}));function ls(t){return t=(t||0)%360,t<0?t+360:t}function An(t){return Math.max(0,Math.min(1,t||0))}function qi(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const je=(globalThis==null?void 0:globalThis.UNOVIS_COLORS)||["#4D8CFD","#FF6B7E","#F4B83E","#A6CC74","#00C19A","#6859BE"],Jf=(globalThis==null?void 0:globalThis.UNOVIS_COLORS_DARK)||["#4D8CFD","#FF6B7E","#FFC16D","#A6CC74","#00C19A","#7887E0"],ne=t=>`--vis-${xt(t)?`color${t%je.length}`:t}`;function Kf(t,e=.4){const n=Jr(t);return n.l=n.l*(1+e),n.formatHex()}function td(t,e=.4,n=.6){const i=Jr(t);return i.s=i.s*(1-n),i.l=i.l*(1-e),i.formatHex()}const fn=10,pr=[{id:"stripes-diagonal",svg:'<path d="M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2" stroke="#000"/>'},{id:"dots",svg:'<path d="m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3" fill"#000"/>'},{id:"stripes-vertical",svg:'<path d="M 5,-1 L5,11" stroke="#000"/>'},{id:"crosshatch",svg:'<path d="M0 0L10 10ZM10 0L0 10Z" stroke="#000"/>'},{id:"waves",svg:'<path d="M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z" fill="#000"/>'},{id:"circles",svg:'<circle cx="5" cy="5" r="3" stroke="#000" fill="#fff"/>'}],mr=[{id:"circle",marker:'<circle cx="5" cy="5" r="5"/>',dashArray:[]},{id:"triangle",marker:'<path d="M5,0 L10,9 L0,9Z">',dashArray:[9,1]},{id:"diamond",marker:'<path d="M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z">',dashArray:[2]},{id:"arrow",marker:'<path d="M4 0 0 0 6 5 0 10 4 10 10 5Z">',dashArray:[2,3,8,3]},{id:"square",marker:'<rect x="1" y="1" width="8" height="8"/>',dashArray:[6]},{id:"star",marker:'<path d="m2 9 3-9 3 9L0 3h10Z"/>',dashArray:[1,6]}];function ie(t){return`vis-${`pattern-${t.svg?"fill":"marker"}`}-${t.id}`}const ed=t=>`<mask id="${ie(t)}">
|
|
2
|
+
<pattern id="${t.id}" viewBox="0 0 10 10" width="${fn}" height="${fn}" patternUnits="userSpaceOnUse">
|
|
3
3
|
<rect width="100%" height="100%" fill="#fff"/>
|
|
4
4
|
${t.svg}
|
|
5
5
|
</pattern>
|
|
6
6
|
<rect x="-50%" y="-50%" width="200%" height="200%" fill="url(#${t.id})"/>
|
|
7
|
-
</mask>`,
|
|
8
|
-
fill="var(${
|
|
7
|
+
</mask>`,nd=(t,e)=>`<marker id="${ie(t)}"
|
|
8
|
+
fill="var(${ne(e)})"
|
|
9
9
|
markerUnits="userSpaceOnUse"
|
|
10
10
|
refX="5"
|
|
11
11
|
refY="5"
|
|
12
|
-
markerWidth="${
|
|
13
|
-
markerHeight="${
|
|
12
|
+
markerWidth="${fn}"
|
|
13
|
+
markerHeight="${fn}">
|
|
14
14
|
${t.marker}
|
|
15
|
-
</marker>`;function
|
|
15
|
+
</marker>`;function id(){const t=pr.map(ed).concat(mr.map(nd)).join(""),e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("height","100%"),e.setAttribute("width","100%"),e.style.position="fixed",e.style.zIndex="-99999999",e.innerHTML=`<defs>${t}</defs>`,document.body.appendChild(e)}typeof window<"u"&&id();const Ha=(globalThis==null?void 0:globalThis.UNOVIS_FONT_W2H_RATIO_DEFAULT)||.5,Ua=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_SEPARATOR_DEFAULT)||[" ","-",".",","],Wa=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_HYPHEN_CHARACTER_DEFAULT)||"-",cs=(globalThis==null?void 0:globalThis.UNOVIS_TEXT_DEFAULT)||{text:"",fontSize:12,fontFamily:"var(--vis-font-family)",lineHeight:1.25,marginTop:0,marginBottom:0};Jt`
|
|
16
16
|
:root {
|
|
17
17
|
label: vis-root-styles;
|
|
18
18
|
--vis-font-family: Inter, Arial, "Helvetica Neue", Helvetica, sans-serif;
|
|
19
|
-
--vis-font-wh-ratio: ${
|
|
20
|
-
--vis-color-main: var(${
|
|
21
|
-
--vis-color-main-light: ${
|
|
22
|
-
--vis-color-main-dark: ${
|
|
19
|
+
--vis-font-wh-ratio: ${Ha};
|
|
20
|
+
--vis-color-main: var(${ne(0)});
|
|
21
|
+
--vis-color-main-light: ${Kf(je[0])};
|
|
22
|
+
--vis-color-main-dark: ${td(je[0])};
|
|
23
23
|
--vis-color-grey: #2a2a2a;
|
|
24
|
-
${
|
|
25
|
-
${
|
|
26
|
-
${
|
|
27
|
-
--${
|
|
28
|
-
--vis-pattern-fill${e}: var(--${
|
|
24
|
+
${je.map((t,e)=>`${ne(e)}: ${t};`)}
|
|
25
|
+
${Jf.map((t,e)=>`--vis-dark-color${e}: ${t};`)}
|
|
26
|
+
${pr.map((t,e)=>`
|
|
27
|
+
--${ie(t)}: url(#${ie(t)});
|
|
28
|
+
--vis-pattern-fill${e}: var(--${ie(t)});
|
|
29
29
|
`)}
|
|
30
|
-
${
|
|
31
|
-
--${
|
|
32
|
-
--vis-pattern-marker${e}: var(--${
|
|
30
|
+
${mr.map((t,e)=>{var n;return`
|
|
31
|
+
--${ie(t)}: url(#${ie(t)});
|
|
32
|
+
--vis-pattern-marker${e}: var(--${ie(t)});
|
|
33
33
|
--vis-pattern-dasharray${e}: ${(n=t.dashArray)===null||n===void 0?void 0:n.join(" ")};
|
|
34
34
|
`})}
|
|
35
35
|
|
|
36
36
|
body.theme-dark {
|
|
37
|
-
${
|
|
37
|
+
${je.map((t,e)=>`${ne(e)}: var(--vis-dark-color${e});`)}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
body.theme-patterns {
|
|
41
|
-
${
|
|
41
|
+
${pr.map((t,e)=>`path[style*="fill: var(${ne(e)})"] {
|
|
42
42
|
mask: var(--vis-pattern-fill${e});
|
|
43
43
|
}`)}
|
|
44
|
-
${
|
|
45
|
-
path[stroke="var(${
|
|
46
|
-
path[style*="stroke: var(${
|
|
44
|
+
${mr.map((t,e)=>`
|
|
45
|
+
path[stroke="var(${ne(e)})"]:not([style*="fill"]),
|
|
46
|
+
path[style*="stroke: var(${ne(e)})"]:not([style*="fill"]) {
|
|
47
47
|
marker: var(--vis-pattern-marker${e});
|
|
48
48
|
stroke-dasharray: var(--vis-pattern-dasharray${e});
|
|
49
49
|
}
|
|
50
50
|
`)}
|
|
51
51
|
}
|
|
52
|
-
`;function Af(t=window==null?void 0:window.document.body){return t?+cf("var(--vis-font-wh-ratio)",t):ha}var $f={value:()=>{}};function pa(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new dn(n)}function dn(t){this._=t}function Ef(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}dn.prototype=pa.prototype={constructor:dn,on:function(t,e){var n=this._,i=Ef(t+"",n),r,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((r=(t=i[o]).type)&&(r=Nf(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(r=(t=i[o]).type)n[r]=Ro(n[r],t.name,e);else if(e==null)for(r in n)n[r]=Ro(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new dn(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,o;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,r=o.length;i<r;++i)o[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};function Nf(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function Ro(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=$f,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var ge=0,$e=0,Te=0,ga=1e3,On,Ee,Dn=0,Jt=0,ei=0,Ve=typeof performance=="object"&&performance.now?performance:Date,ma=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function wr(){return Jt||(ma(Of),Jt=Ve.now()+ei)}function Of(){Jt=0}function Rn(){this._call=this._time=this._next=null}Rn.prototype=va.prototype={constructor:Rn,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?wr():+n)+(e==null?0:+e),!this._next&&Ee!==this&&(Ee?Ee._next=this:On=this,Ee=this),this._call=t,this._time=n,Wi()},stop:function(){this._call&&(this._call=null,this._time=1/0,Wi())}};function va(t,e,n){var i=new Rn;return i.restart(t,e,n),i}function Df(){wr(),++ge;for(var t=On,e;t;)(e=Jt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--ge}function Fo(){Jt=(Dn=Ve.now())+ei,ge=$e=0;try{Df()}finally{ge=0,Ff(),Jt=0}}function Rf(){var t=Ve.now(),e=t-Dn;e>ga&&(ei-=e,Dn=t)}function Ff(){for(var t,e=On,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:On=n);Ee=t,Wi(i)}function Wi(t){if(!ge){$e&&($e=clearTimeout($e));var e=t-Jt;e>24?(t<1/0&&($e=setTimeout(Fo,t-Ve.now()-ei)),Te&&(Te=clearInterval(Te))):(Te||(Dn=Ve.now(),Te=setInterval(Rf,ga)),ge=1,ma(Fo))}}function Po(t,e,n){var i=new Rn;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var Pf=pa("start","end","cancel","interrupt"),Bf=[],_a=0,Bo=1,Yi=2,pn=3,Lo=4,Vi=5,gn=6;function ni(t,e,n,i,r,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;Lf(t,n,{name:e,index:i,group:r,on:Pf,tween:Bf,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:_a})}function kr(t,e){var n=gt(t,e);if(n.state>_a)throw new Error("too late; already scheduled");return n}function St(t,e){var n=gt(t,e);if(n.state>pn)throw new Error("too late; already running");return n}function gt(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Lf(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=va(o,0,n.time);function o(c){n.state=Bo,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var h,u,f,d;if(n.state!==Bo)return l();for(h in i)if(d=i[h],d.name===n.name){if(d.state===pn)return Po(s);d.state===Lo?(d.state=gn,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[h]):+h<e&&(d.state=gn,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[h])}if(Po(function(){n.state===pn&&(n.state=Lo,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Yi,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Yi){for(n.state=pn,r=new Array(f=n.tween.length),h=0,u=-1;h<f;++h)(d=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function a(c){for(var h=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Vi,1),u=-1,f=r.length;++u<f;)r[u].call(t,h);n.state===Vi&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=gn,n.timer.stop(),delete i[e];for(var c in i)return;delete t.__transition}}function Tr(t,e){var n=t.__transition,i,r,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((i=n[s]).name!==e){o=!1;continue}r=i.state>Yi&&i.state<Vi,i.state=gn,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[s]}o&&delete t.__transition}}function zf(t){return this.each(function(){Tr(this,t)})}const Sr=t=>()=>t;function If(t,e){return function(n){return t+n*e}}function Uf(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function Hf(t){return(t=+t)==1?ya:function(e,n){return n-e?Uf(e,n,t):Sr(isNaN(e)?n:e)}}function ya(t,e){var n=e-t;return n?If(t,n):Sr(isNaN(t)?e:t)}const Fn=function t(e){var n=Hf(e);function i(r,o){var s=n((r=Ii(r)).r,(o=Ii(o)).r),a=n(r.g,o.g),l=n(r.b,o.b),c=ya(r.opacity,o.opacity);return function(h){return r.r=s(h),r.g=a(h),r.b=l(h),r.opacity=c(h),r+""}}return i.gamma=t,i}(1);function Wf(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(o){for(r=0;r<n;++r)i[r]=t[r]*(1-o)+e[r]*o;return i}}function Yf(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Vf(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),o=new Array(n),s;for(s=0;s<i;++s)r[s]=xe(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(a){for(s=0;s<i;++s)o[s]=r[s](a);return o}}function Xf(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function ft(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function qf(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=xe(t[r],e[r]):i[r]=e[r];return function(o){for(r in n)i[r]=n[r](o);return i}}var Xi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ki=new RegExp(Xi.source,"g");function Gf(t){return function(){return t}}function jf(t){return function(e){return t(e)+""}}function xa(t,e){var n=Xi.lastIndex=ki.lastIndex=0,i,r,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(i=Xi.exec(t))&&(r=ki.exec(e));)(o=r.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:ft(i,r)})),n=ki.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?jf(l[0].x):Gf(e):(e=l.length,function(c){for(var h=0,u;h<e;++h)a[(u=l[h]).i]=u.x(c);return a.join("")})}function xe(t,e){var n=typeof e,i;return e==null||n==="boolean"?Sr(e):(n==="number"?ft:n==="string"?(i=Qt(e))?(e=i,Fn):xa:e instanceof Qt?Fn:e instanceof Date?Xf:Yf(e)?Wf:Array.isArray(e)?Vf:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?qf:ft)(t,e)}function Cr(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var zo=180/Math.PI,qi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ba(t,e,n,i,r,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:r,translateY:o,rotate:Math.atan2(e,t)*zo,skewX:Math.atan(l)*zo,scaleX:s,scaleY:a}}var an;function Zf(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?qi:ba(e.a,e.b,e.c,e.d,e.e,e.f)}function Qf(t){return t==null||(an||(an=document.createElementNS("http://www.w3.org/2000/svg","g")),an.setAttribute("transform",t),!(t=an.transform.baseVal.consolidate()))?qi:(t=t.matrix,ba(t.a,t.b,t.c,t.d,t.e,t.f))}function wa(t,e,n,i){function r(c){return c.length?c.pop()+" ":""}function o(c,h,u,f,d,g){if(c!==u||h!==f){var p=d.push("translate(",null,e,null,n);g.push({i:p-4,x:ft(c,u)},{i:p-2,x:ft(h,f)})}else(u||f)&&d.push("translate("+u+e+f+n)}function s(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(r(u)+"rotate(",null,i)-2,x:ft(c,h)})):h&&u.push(r(u)+"rotate("+h+i)}function a(c,h,u,f){c!==h?f.push({i:u.push(r(u)+"skewX(",null,i)-2,x:ft(c,h)}):h&&u.push(r(u)+"skewX("+h+i)}function l(c,h,u,f,d,g){if(c!==u||h!==f){var p=d.push(r(d)+"scale(",null,",",null,")");g.push({i:p-4,x:ft(c,u)},{i:p-2,x:ft(h,f)})}else(u!==1||f!==1)&&d.push(r(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=t(c),h=t(h),o(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),a(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var g=-1,p=f.length,v;++g<p;)u[(v=f[g]).i]=v.x(d);return u.join("")}}}var Jf=wa(Zf,"px, ","px)","deg)"),Kf=wa(Qf,", ",")",")");function td(t,e){e===void 0&&(e=t,t=xe);for(var n=0,i=e.length-1,r=e[0],o=new Array(i<0?0:i);n<i;)o[n]=t(r,r=e[++n]);return function(s){var a=Math.max(0,Math.min(i-1,Math.floor(s*=i)));return o[a](s-a)}}function ed(t,e){var n,i;return function(){var r=St(this,t),o=r.tween;if(o!==n){i=n=o;for(var s=0,a=i.length;s<a;++s)if(i[s].name===e){i=i.slice(),i.splice(s,1);break}}r.tween=i}}function nd(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var o=St(this,t),s=o.tween;if(s!==i){r=(i=s).slice();for(var a={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=a;break}l===c&&r.push(a)}o.tween=r}}function id(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=gt(this.node(),n).tween,r=0,o=i.length,s;r<o;++r)if((s=i[r]).name===t)return s.value;return null}return this.each((e==null?ed:nd)(n,t,e))}function Mr(t,e,n){var i=t._id;return t.each(function(){var r=St(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return gt(r,i).value[e]}}function ka(t,e){var n;return(typeof e=="number"?ft:e instanceof Qt?Fn:(n=Qt(e))?(e=n,Fn):xa)(t,e)}function rd(t){return function(){this.removeAttribute(t)}}function od(t){return function(){this.removeAttributeNS(t.space,t.local)}}function sd(t,e,n){var i,r=n+"",o;return function(){var s=this.getAttribute(t);return s===r?null:s===i?o:o=e(i=s,n)}}function ad(t,e,n){var i,r=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===r?null:s===i?o:o=e(i=s,n)}}function ld(t,e,n){var i,r,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a)))}}function cd(t,e,n){var i,r,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a)))}}function ud(t,e){var n=Gn(t),i=n==="transform"?Kf:ka;return this.attrTween(t,typeof e=="function"?(n.local?cd:ld)(n,i,Mr(this,"attr."+t,e)):e==null?(n.local?od:rd)(n):(n.local?ad:sd)(n,i,e))}function hd(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function fd(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function dd(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&fd(t,o)),n}return r._value=e,r}function pd(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&hd(t,o)),n}return r._value=e,r}function gd(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=Gn(t);return this.tween(n,(i.local?dd:pd)(i,e))}function md(t,e){return function(){kr(this,t).delay=+e.apply(this,arguments)}}function vd(t,e){return e=+e,function(){kr(this,t).delay=e}}function _d(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?md:vd)(e,t)):gt(this.node(),e).delay}function yd(t,e){return function(){St(this,t).duration=+e.apply(this,arguments)}}function xd(t,e){return e=+e,function(){St(this,t).duration=e}}function bd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?yd:xd)(e,t)):gt(this.node(),e).duration}function wd(t,e){if(typeof e!="function")throw new Error;return function(){St(this,t).ease=e}}function kd(t){var e=this._id;return arguments.length?this.each(wd(e,t)):gt(this.node(),e).ease}function Td(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;St(this,t).ease=n}}function Sd(t){if(typeof t!="function")throw new Error;return this.each(Td(this._id,t))}function Cd(t){typeof t!="function"&&(t=Ds(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new $t(i,this._parents,this._name,this._id)}function Md(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,o=Math.min(i,r),s=new Array(i),a=0;a<o;++a)for(var l=e[a],c=n[a],h=l.length,u=s[a]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;a<i;++a)s[a]=e[a];return new $t(s,this._parents,this._name,this._id)}function Ad(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function $d(t,e,n){var i,r,o=Ad(e)?kr:St;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(e,n),s.on=r}}function Ed(t,e){var n=this._id;return arguments.length<2?gt(this.node(),n).on.on(t):this.each($d(n,t,e))}function Nd(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Od(){return this.on("end.remove",Nd(this._id))}function Dd(t){var e=this._name,n=this._id;typeof t!="function"&&(t=fr(t));for(var i=this._groups,r=i.length,o=new Array(r),s=0;s<r;++s)for(var a=i[s],l=a.length,c=o[s]=new Array(l),h,u,f=0;f<l;++f)(h=a[f])&&(u=t.call(h,h.__data__,f,a))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,ni(c[f],e,n,f,c,gt(h,n)));return new $t(o,this._parents,e,n)}function Rd(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Os(t));for(var i=this._groups,r=i.length,o=[],s=[],a=0;a<r;++a)for(var l=i[a],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=t.call(h,h.__data__,u,l),d,g=gt(h,n),p=0,v=f.length;p<v;++p)(d=f[p])&&ni(d,e,n,p,f,g);o.push(f),s.push(h)}return new $t(o,s,e,n)}var Fd=qe.prototype.constructor;function Pd(){return new Fd(this._groups,this._parents)}function Bd(t,e){var n,i,r;return function(){var o=fe(this,t),s=(this.style.removeProperty(t),fe(this,t));return o===s?null:o===n&&s===i?r:r=e(n=o,i=s)}}function Ta(t){return function(){this.style.removeProperty(t)}}function Ld(t,e,n){var i,r=n+"",o;return function(){var s=fe(this,t);return s===r?null:s===i?o:o=e(i=s,n)}}function zd(t,e,n){var i,r,o;return function(){var s=fe(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),fe(this,t))),s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a))}}function Id(t,e){var n,i,r,o="style."+e,s="end."+o,a;return function(){var l=St(this,t),c=l.on,h=l.value[o]==null?a||(a=Ta(e)):void 0;(c!==n||r!==h)&&(i=(n=c).copy()).on(s,r=h),l.on=i}}function Ud(t,e,n){var i=(t+="")=="transform"?Jf:ka;return e==null?this.styleTween(t,Bd(t,i)).on("end.style."+t,Ta(t)):typeof e=="function"?this.styleTween(t,zd(t,i,Mr(this,"style."+t,e))).each(Id(this._id,t)):this.styleTween(t,Ld(t,i,e),n).on("end.style."+t,null)}function Hd(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function Wd(t,e,n){var i,r;function o(){var s=e.apply(this,arguments);return s!==r&&(i=(r=s)&&Hd(t,s,n)),i}return o._value=e,o}function Yd(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,Wd(t,e,n??""))}function Vd(t){return function(){this.textContent=t}}function Xd(t){return function(){var e=t(this);this.textContent=e??""}}function qd(t){return this.tween("text",typeof t=="function"?Xd(Mr(this,"text",t)):Vd(t==null?"":t+""))}function Gd(t){return function(e){this.textContent=t.call(this,e)}}function jd(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Gd(r)),e}return i._value=t,i}function Zd(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,jd(t))}function Qd(){for(var t=this._name,e=this._id,n=Sa(),i=this._groups,r=i.length,o=0;o<r;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var h=gt(l,e);ni(l,t,n,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new $t(i,this._parents,t,n)}function Jd(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--r===0&&o()}};n.each(function(){var c=St(this,i),h=c.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),r===0&&o()})}var Kd=0;function $t(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function Sa(){return++Kd}var Ct=qe.prototype;$t.prototype={constructor:$t,select:Dd,selectAll:Rd,selectChild:Ct.selectChild,selectChildren:Ct.selectChildren,filter:Cd,merge:Md,selection:Pd,transition:Qd,call:Ct.call,nodes:Ct.nodes,node:Ct.node,size:Ct.size,empty:Ct.empty,each:Ct.each,on:Ed,attr:ud,attrTween:gd,style:Ud,styleTween:Yd,text:qd,textTween:Zd,remove:Od,tween:id,delay:_d,duration:bd,ease:kd,easeVarying:Sd,end:Jd,[Symbol.iterator]:Ct[Symbol.iterator]};const Io=t=>+t;function tp(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ep={time:null,delay:0,duration:250,ease:tp};function np(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function ip(t){var e,n;t instanceof $t?(e=t._id,t=t._name):(e=Sa(),(n=ep).time=wr(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&ni(l,t,e,c,s,n||np(l,e));return new $t(i,this._parents,t,e)}qe.prototype.interrupt=zf;qe.prototype.transition=ip;function ct(t,e,n){if(t.nodes().forEach(i=>Tr(i)),e){const i=t.transition().duration(e);return n&&i.ease(n),i}else return t}class Ar{constructor(e){this.data=e}get data(){return this._data}set data(e){this._data=e}}var P;(function(t){t.X="x",t.Y="y"})(P||(P={}));function mt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Ca(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Uo=Symbol("implicit");function $r(){var t=new to,e=[],n=[],i=Uo;function r(o){let s=t.get(o);if(s===void 0){if(i!==Uo)return i;t.set(o,s=e.push(o)-1)}return n[s%n.length]}return r.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new to;for(const s of o)t.has(s)||t.set(s,e.push(s)-1);return r},r.range=function(o){return arguments.length?(n=Array.from(o),r):n.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return $r(e,n).unknown(i)},mt.apply(r,arguments),r}function Er(){var t=$r().unknown(void 0),e=t.domain,n=t.range,i=0,r=1,o,s,a=!1,l=0,c=0,h=.5;delete t.unknown;function u(){var f=e().length,d=r<i,g=d?r:i,p=d?i:r;o=(p-g)/Math.max(1,f-l+c*2),a&&(o=Math.floor(o)),g+=(p-g-o*(f-l))*h,s=o*(1-l),a&&(g=Math.round(g),s=Math.round(s));var v=Hu(f).map(function(_){return g+o*_});return n(d?v.reverse():v)}return t.domain=function(f){return arguments.length?(e(f),u()):e()},t.range=function(f){return arguments.length?([i,r]=f,i=+i,r=+r,u()):[i,r]},t.rangeRound=function(f){return[i,r]=f,i=+i,r=+r,a=!0,u()},t.bandwidth=function(){return s},t.step=function(){return o},t.round=function(f){return arguments.length?(a=!!f,u()):a},t.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),u()):l},t.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),u()):l},t.paddingOuter=function(f){return arguments.length?(c=+f,u()):c},t.align=function(f){return arguments.length?(h=Math.max(0,Math.min(1,f)),u()):h},t.copy=function(){return Er(e(),[i,r]).round(a).paddingInner(l).paddingOuter(c).align(h)},mt.apply(u(),arguments)}function Ma(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ma(e())},t}function rp(){return Ma(Er.apply(null,arguments).paddingInner(1))}function op(t){return function(){return t}}function Gi(t){return+t}var Ho=[0,1];function K(t){return t}function ji(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:op(isNaN(e)?NaN:.5)}function sp(t,e){var n;return t>e&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}function ap(t,e,n){var i=t[0],r=t[1],o=e[0],s=e[1];return r<i?(i=ji(r,i),o=n(s,o)):(i=ji(i,r),o=n(o,s)),function(a){return o(i(a))}}function lp(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),o=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)r[s]=ji(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=Zn(t,a,1,i)-1;return o[l](r[l](a))}}function Ze(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ii(){var t=Ho,e=Ho,n=xe,i,r,o,s=K,a,l,c;function h(){var f=Math.min(t.length,e.length);return s!==K&&(s=sp(t[0],t[f-1])),a=f>2?lp:ap,l=c=null,u}function u(f){return f==null||isNaN(f=+f)?o:(l||(l=a(t.map(i),e,n)))(i(s(f)))}return u.invert=function(f){return s(r((c||(c=a(e,t.map(i),ft)))(f)))},u.domain=function(f){return arguments.length?(t=Array.from(f,Gi),h()):t.slice()},u.range=function(f){return arguments.length?(e=Array.from(f),h()):e.slice()},u.rangeRound=function(f){return e=Array.from(f),n=Cr,h()},u.clamp=function(f){return arguments.length?(s=f?!0:K,h()):s!==K},u.interpolate=function(f){return arguments.length?(n=f,h()):n},u.unknown=function(f){return arguments.length?(o=f,u):o},function(f,d){return i=f,r=d,h()}}function Aa(){return ii()(K,K)}function cp(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Pn(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function me(t){return t=Pn(Math.abs(t)),t?t[1]:NaN}function up(t,e){return function(n,i){for(var r=n.length,o=[],s=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function hp(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var fp=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Xe(t){if(!(e=fp.exec(t)))throw new Error("invalid format: "+t);var e;return new Nr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Xe.prototype=Nr.prototype;function Nr(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Nr.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 dp(t){t:for(var e=t.length,n=1,i=-1,r;n<e;++n)switch(t[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+t[n])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(r+1):t}var $a;function pp(t,e){var n=Pn(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-($a=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Pn(t,Math.max(0,e+o-1))[0]}function Wo(t,e){var n=Pn(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const Yo={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:cp,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Wo(t*100,e),r:Wo,s:pp,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Vo(t){return t}var Xo=Array.prototype.map,qo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function gp(t){var e=t.grouping===void 0||t.thousands===void 0?Vo:up(Xo.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Vo:hp(Xo.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(u){u=Xe(u);var f=u.fill,d=u.align,g=u.sign,p=u.symbol,v=u.zero,_=u.width,x=u.comma,y=u.precision,T=u.trim,k=u.type;k==="n"?(x=!0,k="g"):Yo[k]||(y===void 0&&(y=12),T=!0,k="g"),(v||f==="0"&&d==="=")&&(v=!0,f="0",d="=");var w=p==="$"?n:p==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",S=p==="$"?i:/[%p]/.test(k)?s:"",L=Yo[k],F=/[defgprs%]/.test(k);y=y===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function et(A){var U=w,Y=S,Dt,Ke,re;if(k==="c")Y=L(A)+Y,A="";else{A=+A;var oe=A<0||1/A<0;if(A=isNaN(A)?l:L(Math.abs(A),y),T&&(A=dp(A)),oe&&+A==0&&g!=="+"&&(oe=!1),U=(oe?g==="("?g:a:g==="-"||g==="("?"":g)+U,Y=(k==="s"?qo[8+$a/3]:"")+Y+(oe&&g==="("?")":""),F){for(Dt=-1,Ke=A.length;++Dt<Ke;)if(re=A.charCodeAt(Dt),48>re||re>57){Y=(re===46?r+A.slice(Dt+1):A.slice(Dt))+Y,A=A.slice(0,Dt);break}}}x&&!v&&(A=e(A,1/0));var se=U.length+A.length+Y.length,ht=se<_?new Array(_-se+1).join(f):"";switch(x&&v&&(A=e(ht+A,ht.length?_-Y.length:1/0),ht=""),d){case"<":A=U+A+Y+ht;break;case"=":A=U+ht+A+Y;break;case"^":A=ht.slice(0,se=ht.length>>1)+U+A+Y+ht.slice(se);break;default:A=ht+U+A+Y;break}return o(A)}return et.toString=function(){return u+""},et}function h(u,f){var d=c((u=Xe(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(me(f)/3)))*3,p=Math.pow(10,-g),v=qo[8+g/3];return function(_){return d(p*_)+v}}return{format:c,formatPrefix:h}}var ln,Or,Ea;mp({thousands:",",grouping:[3],currency:["$",""]});function mp(t){return ln=gp(t),Or=ln.format,Ea=ln.formatPrefix,ln}function vp(t){return Math.max(0,-me(Math.abs(t)))}function _p(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(me(e)/3)))*3-me(Math.abs(t)))}function yp(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,me(e)-me(t))+1}function xp(t,e,n,i){var r=Fi(t,e,n),o;switch(i=Xe(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(o=_p(r,s))&&(i.precision=o),Ea(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=yp(r,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=vp(r))&&(i.precision=o-(i.type==="%")*2);break}}return Or(i)}function te(t){var e=t.domain;return t.ticks=function(n){var i=e();return Di(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var r=e();return xp(r[0],r[r.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),r=0,o=i.length-1,s=i[r],a=i[o],l,c,h=10;for(a<s&&(c=s,s=a,a=c,c=r,r=o,o=c);h-- >0;){if(c=Ri(s,a,n),c===l)return i[r]=s,i[o]=a,e(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function Na(){var t=Aa();return t.copy=function(){return Ze(t,Na())},mt.apply(t,arguments),te(t)}function Oa(t){var e;function n(i){return i==null||isNaN(i=+i)?e:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(t=Array.from(i,Gi),n):t.slice()},n.unknown=function(i){return arguments.length?(e=i,n):e},n.copy=function(){return Oa(t).unknown(e)},t=arguments.length?Array.from(t,Gi):[0,1],te(n)}function Da(t,e){t=t.slice();var n=0,i=t.length-1,r=t[n],o=t[i],s;return o<r&&(s=n,n=i,i=s,s=r,r=o,o=s),t[n]=e.floor(r),t[i]=e.ceil(o),t}function Go(t){return Math.log(t)}function jo(t){return Math.exp(t)}function bp(t){return-Math.log(-t)}function wp(t){return-Math.exp(-t)}function kp(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Tp(t){return t===10?kp:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Sp(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Zo(t){return(e,n)=>-t(-e,n)}function Cp(t){const e=t(Go,jo),n=e.domain;let i=10,r,o;function s(){return r=Sp(i),o=Tp(i),n()[0]<0?(r=Zo(r),o=Zo(o),t(bp,wp)):t(Go,jo),e}return e.base=function(a){return arguments.length?(i=+a,s()):i},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const l=n();let c=l[0],h=l[l.length-1];const u=h<c;u&&([c,h]=[h,c]);let f=r(c),d=r(h),g,p;const v=a==null?10:+a;let _=[];if(!(i%1)&&d-f<v){if(f=Math.floor(f),d=Math.ceil(d),c>0){for(;f<=d;++f)for(g=1;g<i;++g)if(p=f<0?g/o(-f):g*o(f),!(p<c)){if(p>h)break;_.push(p)}}else for(;f<=d;++f)for(g=i-1;g>=1;--g)if(p=f>0?g/o(-f):g*o(f),!(p<c)){if(p>h)break;_.push(p)}_.length*2<v&&(_=Di(c,h,v))}else _=Di(f,d,Math.min(d-f,v)).map(o);return u?_.reverse():_},e.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=i===10?"s":","),typeof l!="function"&&(!(i%1)&&(l=Xe(l)).precision==null&&(l.trim=!0),l=Or(l)),a===1/0)return l;const c=Math.max(1,i*a/e.ticks().length);return h=>{let u=h/o(Math.round(r(h)));return u*i<i-.5&&(u*=i),u<=c?l(h):""}},e.nice=()=>n(Da(n(),{floor:a=>o(Math.floor(r(a))),ceil:a=>o(Math.ceil(r(a)))})),e}function Ra(){const t=Cp(ii()).domain([1,10]);return t.copy=()=>Ze(t,Ra()).base(t.base()),mt.apply(t,arguments),t}function Qo(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Jo(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Mp(t){var e=1,n=t(Qo(e),Jo(e));return n.constant=function(i){return arguments.length?t(Qo(e=+i),Jo(e)):e},te(n)}function Fa(){var t=Mp(ii());return t.copy=function(){return Ze(t,Fa()).constant(t.constant())},mt.apply(t,arguments)}function Ko(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Ap(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function $p(t){return t<0?-t*t:t*t}function Ep(t){var e=t(K,K),n=1;function i(){return n===1?t(K,K):n===.5?t(Ap,$p):t(Ko(n),Ko(1/n))}return e.exponent=function(r){return arguments.length?(n=+r,i()):n},te(e)}function Dr(){var t=Ep(ii());return t.copy=function(){return Ze(t,Dr()).exponent(t.exponent())},mt.apply(t,arguments),t}function Np(){return Dr.apply(null,arguments).exponent(.5)}function Pa(){var t=[],e=[],n=[],i;function r(){var s=0,a=Math.max(1,e.length);for(n=new Array(a-1);++s<a;)n[s-1]=Lu(t,s/a);return o}function o(s){return s==null||isNaN(s=+s)?i:e[Zn(n,s)]}return o.invertExtent=function(s){var a=e.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},o.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let a of s)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(Re),r()},o.range=function(s){return arguments.length?(e=Array.from(s),r()):e.slice()},o.unknown=function(s){return arguments.length?(i=s,o):i},o.quantiles=function(){return n.slice()},o.copy=function(){return Pa().domain(t).range(e).unknown(i)},mt.apply(o,arguments)}function Ba(){var t=0,e=1,n=1,i=[.5],r=[0,1],o;function s(l){return l!=null&&l<=l?r[Zn(i,l,0,n)]:o}function a(){var l=-1;for(i=new Array(n);++l<n;)i[l]=((l+1)*e-(l-n)*t)/(n+1);return s}return s.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,a()):[t,e]},s.range=function(l){return arguments.length?(n=(r=Array.from(l)).length-1,a()):r.slice()},s.invertExtent=function(l){var c=r.indexOf(l);return c<0?[NaN,NaN]:c<1?[t,i[0]]:c>=n?[i[n-1],e]:[i[c-1],i[c]]},s.unknown=function(l){return arguments.length&&(o=l),s},s.thresholds=function(){return i.slice()},s.copy=function(){return Ba().domain([t,e]).range(r).unknown(o)},mt.apply(te(s),arguments)}function La(){var t=[.5],e=[0,1],n,i=1;function r(o){return o!=null&&o<=o?e[Zn(t,o,0,i)]:n}return r.domain=function(o){return arguments.length?(t=Array.from(o),i=Math.min(t.length,e.length-1),r):t.slice()},r.range=function(o){return arguments.length?(e=Array.from(o),i=Math.min(t.length,e.length-1),r):e.slice()},r.invertExtent=function(o){var s=e.indexOf(o);return[t[s-1],t[s]]},r.unknown=function(o){return arguments.length?(n=o,r):n},r.copy=function(){return La().domain(t).range(e).unknown(n)},mt.apply(r,arguments)}const Ti=new Date,Si=new Date;function X(t,e,n,i){function r(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return r.floor=o=>(t(o=new Date(+o)),o),r.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),r.round=o=>{const s=r(o),a=r.ceil(o);return o-s<a-o?s:a},r.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),r.range=(o,s,a)=>{const l=[];if(o=r.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return l;let c;do l.push(c=new Date(+o)),e(o,a),t(o);while(c<o&&o<s);return l},r.filter=o=>X(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),n&&(r.count=(o,s)=>(Ti.setTime(+o),Si.setTime(+s),t(Ti),t(Si),Math.floor(n(Ti,Si))),r.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?r.filter(i?s=>i(s)%o===0:s=>r.count(0,s)%o===0):r)),r}const Bn=X(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Bn.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?X(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Bn);Bn.range;const Mt=1e3,ut=Mt*60,At=ut*60,Et=At*24,Rr=Et*7,ts=Et*30,Ci=Et*365,Ht=X(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Mt)},(t,e)=>(e-t)/Mt,t=>t.getUTCSeconds());Ht.range;const Fr=X(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Mt)},(t,e)=>{t.setTime(+t+e*ut)},(t,e)=>(e-t)/ut,t=>t.getMinutes());Fr.range;const Pr=X(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ut)},(t,e)=>(e-t)/ut,t=>t.getUTCMinutes());Pr.range;const Br=X(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Mt-t.getMinutes()*ut)},(t,e)=>{t.setTime(+t+e*At)},(t,e)=>(e-t)/At,t=>t.getHours());Br.range;const Lr=X(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*At)},(t,e)=>(e-t)/At,t=>t.getUTCHours());Lr.range;const Qe=X(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ut)/Et,t=>t.getDate()-1);Qe.range;const ri=X(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Et,t=>t.getUTCDate()-1);ri.range;const za=X(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Et,t=>Math.floor(t/Et));za.range;function ee(t){return X(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ut)/Rr)}const oi=ee(0),Ln=ee(1),Op=ee(2),Dp=ee(3),ve=ee(4),Rp=ee(5),Fp=ee(6);oi.range;Ln.range;Op.range;Dp.range;ve.range;Rp.range;Fp.range;function ne(t){return X(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Rr)}const si=ne(0),zn=ne(1),Pp=ne(2),Bp=ne(3),_e=ne(4),Lp=ne(5),zp=ne(6);si.range;zn.range;Pp.range;Bp.range;_e.range;Lp.range;zp.range;const zr=X(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());zr.range;const Ir=X(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Ir.range;const Nt=X(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Nt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:X(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});Nt.range;const Ot=X(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Ot.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:X(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});Ot.range;function Ia(t,e,n,i,r,o){const s=[[Ht,1,Mt],[Ht,5,5*Mt],[Ht,15,15*Mt],[Ht,30,30*Mt],[o,1,ut],[o,5,5*ut],[o,15,15*ut],[o,30,30*ut],[r,1,At],[r,3,3*At],[r,6,6*At],[r,12,12*At],[i,1,Et],[i,2,2*Et],[n,1,Rr],[e,1,ts],[e,3,3*ts],[t,1,Ci]];function a(c,h,u){const f=h<c;f&&([c,h]=[h,c]);const d=u&&typeof u.range=="function"?u:l(c,h,u),g=d?d.range(c,+h+1):[];return f?g.reverse():g}function l(c,h,u){const f=Math.abs(h-c)/u,d=jn(([,,v])=>v).right(s,f);if(d===s.length)return t.every(Fi(c/Ci,h/Ci,u));if(d===0)return Bn.every(Math.max(Fi(c,h,u),1));const[g,p]=s[f/s[d-1][2]<s[d][2]/f?d-1:d];return g.every(p)}return[a,l]}const[Ip,Up]=Ia(Ot,Ir,si,za,Lr,Pr),[Hp,Wp]=Ia(Nt,zr,oi,Qe,Br,Fr);function Mi(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Ai(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Se(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Yp(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Ce(r),h=Me(r),u=Ce(o),f=Me(o),d=Ce(s),g=Me(s),p=Ce(a),v=Me(a),_=Ce(l),x=Me(l),y={a:oe,A:se,b:ht,B:Il,c:null,d:ss,e:ss,f:dg,g:kg,G:Sg,H:ug,I:hg,j:fg,L:Ua,m:pg,M:gg,p:Ul,q:Hl,Q:cs,s:us,S:mg,u:vg,U:_g,V:yg,w:xg,W:bg,x:null,X:null,y:wg,Y:Tg,Z:Cg,"%":ls},T={a:Wl,A:Yl,b:Vl,B:Xl,c:null,d:as,e:as,f:Eg,g:Ig,G:Hg,H:Mg,I:Ag,j:$g,L:Wa,m:Ng,M:Og,p:ql,q:Gl,Q:cs,s:us,S:Dg,u:Rg,U:Fg,V:Pg,w:Bg,W:Lg,x:null,X:null,y:zg,Y:Ug,Z:Wg,"%":ls},k={a:et,A,b:U,B:Y,c:Dt,d:rs,e:rs,f:sg,g:is,G:ns,H:os,I:os,j:ng,L:og,m:eg,M:ig,p:F,q:tg,Q:lg,s:cg,S:rg,u:jp,U:Zp,V:Qp,w:Gp,W:Jp,x:Ke,X:re,y:is,Y:ns,Z:Kp,"%":ag};y.x=w(n,y),y.X=w(i,y),y.c=w(e,y),T.x=w(n,T),T.X=w(i,T),T.c=w(e,T);function w(M,$){return function(E){var b=[],Q=-1,B=0,nt=M.length,it,zt,Jr;for(E instanceof Date||(E=new Date(+E));++Q<nt;)M.charCodeAt(Q)===37&&(b.push(M.slice(B,Q)),(zt=es[it=M.charAt(++Q)])!=null?it=M.charAt(++Q):zt=it==="e"?" ":"0",(Jr=$[it])&&(it=Jr(E,zt)),b.push(it),B=Q+1);return b.push(M.slice(B,Q)),b.join("")}}function S(M,$){return function(E){var b=Se(1900,void 0,1),Q=L(b,M,E+="",0),B,nt;if(Q!=E.length)return null;if("Q"in b)return new Date(b.Q);if("s"in b)return new Date(b.s*1e3+("L"in b?b.L:0));if($&&!("Z"in b)&&(b.Z=0),"p"in b&&(b.H=b.H%12+b.p*12),b.m===void 0&&(b.m="q"in b?b.q:0),"V"in b){if(b.V<1||b.V>53)return null;"w"in b||(b.w=1),"Z"in b?(B=Ai(Se(b.y,0,1)),nt=B.getUTCDay(),B=nt>4||nt===0?zn.ceil(B):zn(B),B=ri.offset(B,(b.V-1)*7),b.y=B.getUTCFullYear(),b.m=B.getUTCMonth(),b.d=B.getUTCDate()+(b.w+6)%7):(B=Mi(Se(b.y,0,1)),nt=B.getDay(),B=nt>4||nt===0?Ln.ceil(B):Ln(B),B=Qe.offset(B,(b.V-1)*7),b.y=B.getFullYear(),b.m=B.getMonth(),b.d=B.getDate()+(b.w+6)%7)}else("W"in b||"U"in b)&&("w"in b||(b.w="u"in b?b.u%7:"W"in b?1:0),nt="Z"in b?Ai(Se(b.y,0,1)).getUTCDay():Mi(Se(b.y,0,1)).getDay(),b.m=0,b.d="W"in b?(b.w+6)%7+b.W*7-(nt+5)%7:b.w+b.U*7-(nt+6)%7);return"Z"in b?(b.H+=b.Z/100|0,b.M+=b.Z%100,Ai(b)):Mi(b)}}function L(M,$,E,b){for(var Q=0,B=$.length,nt=E.length,it,zt;Q<B;){if(b>=nt)return-1;if(it=$.charCodeAt(Q++),it===37){if(it=$.charAt(Q++),zt=k[it in es?$.charAt(Q++):it],!zt||(b=zt(M,E,b))<0)return-1}else if(it!=E.charCodeAt(b++))return-1}return b}function F(M,$,E){var b=c.exec($.slice(E));return b?(M.p=h.get(b[0].toLowerCase()),E+b[0].length):-1}function et(M,$,E){var b=d.exec($.slice(E));return b?(M.w=g.get(b[0].toLowerCase()),E+b[0].length):-1}function A(M,$,E){var b=u.exec($.slice(E));return b?(M.w=f.get(b[0].toLowerCase()),E+b[0].length):-1}function U(M,$,E){var b=_.exec($.slice(E));return b?(M.m=x.get(b[0].toLowerCase()),E+b[0].length):-1}function Y(M,$,E){var b=p.exec($.slice(E));return b?(M.m=v.get(b[0].toLowerCase()),E+b[0].length):-1}function Dt(M,$,E){return L(M,e,$,E)}function Ke(M,$,E){return L(M,n,$,E)}function re(M,$,E){return L(M,i,$,E)}function oe(M){return s[M.getDay()]}function se(M){return o[M.getDay()]}function ht(M){return l[M.getMonth()]}function Il(M){return a[M.getMonth()]}function Ul(M){return r[+(M.getHours()>=12)]}function Hl(M){return 1+~~(M.getMonth()/3)}function Wl(M){return s[M.getUTCDay()]}function Yl(M){return o[M.getUTCDay()]}function Vl(M){return l[M.getUTCMonth()]}function Xl(M){return a[M.getUTCMonth()]}function ql(M){return r[+(M.getUTCHours()>=12)]}function Gl(M){return 1+~~(M.getUTCMonth()/3)}return{format:function(M){var $=w(M+="",y);return $.toString=function(){return M},$},parse:function(M){var $=S(M+="",!1);return $.toString=function(){return M},$},utcFormat:function(M){var $=w(M+="",T);return $.toString=function(){return M},$},utcParse:function(M){var $=S(M+="",!0);return $.toString=function(){return M},$}}}var es={"-":"",_:" ",0:"0"},q=/^\s*\d+/,Vp=/^%/,Xp=/[\\^$*+?|[\]().{}]/g;function N(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(e)+r:r)}function qp(t){return t.replace(Xp,"\\$&")}function Ce(t){return new RegExp("^(?:"+t.map(qp).join("|")+")","i")}function Me(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Gp(t,e,n){var i=q.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function jp(t,e,n){var i=q.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function Zp(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function Qp(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function Jp(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function ns(t,e,n){var i=q.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function is(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Kp(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function tg(t,e,n){var i=q.exec(e.slice(n,n+1));return i?(t.q=i[0]*3-3,n+i[0].length):-1}function eg(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function rs(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function ng(t,e,n){var i=q.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function os(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function ig(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function rg(t,e,n){var i=q.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function og(t,e,n){var i=q.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function sg(t,e,n){var i=q.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function ag(t,e,n){var i=Vp.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function lg(t,e,n){var i=q.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function cg(t,e,n){var i=q.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function ss(t,e){return N(t.getDate(),e,2)}function ug(t,e){return N(t.getHours(),e,2)}function hg(t,e){return N(t.getHours()%12||12,e,2)}function fg(t,e){return N(1+Qe.count(Nt(t),t),e,3)}function Ua(t,e){return N(t.getMilliseconds(),e,3)}function dg(t,e){return Ua(t,e)+"000"}function pg(t,e){return N(t.getMonth()+1,e,2)}function gg(t,e){return N(t.getMinutes(),e,2)}function mg(t,e){return N(t.getSeconds(),e,2)}function vg(t){var e=t.getDay();return e===0?7:e}function _g(t,e){return N(oi.count(Nt(t)-1,t),e,2)}function Ha(t){var e=t.getDay();return e>=4||e===0?ve(t):ve.ceil(t)}function yg(t,e){return t=Ha(t),N(ve.count(Nt(t),t)+(Nt(t).getDay()===4),e,2)}function xg(t){return t.getDay()}function bg(t,e){return N(Ln.count(Nt(t)-1,t),e,2)}function wg(t,e){return N(t.getFullYear()%100,e,2)}function kg(t,e){return t=Ha(t),N(t.getFullYear()%100,e,2)}function Tg(t,e){return N(t.getFullYear()%1e4,e,4)}function Sg(t,e){var n=t.getDay();return t=n>=4||n===0?ve(t):ve.ceil(t),N(t.getFullYear()%1e4,e,4)}function Cg(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+N(e/60|0,"0",2)+N(e%60,"0",2)}function as(t,e){return N(t.getUTCDate(),e,2)}function Mg(t,e){return N(t.getUTCHours(),e,2)}function Ag(t,e){return N(t.getUTCHours()%12||12,e,2)}function $g(t,e){return N(1+ri.count(Ot(t),t),e,3)}function Wa(t,e){return N(t.getUTCMilliseconds(),e,3)}function Eg(t,e){return Wa(t,e)+"000"}function Ng(t,e){return N(t.getUTCMonth()+1,e,2)}function Og(t,e){return N(t.getUTCMinutes(),e,2)}function Dg(t,e){return N(t.getUTCSeconds(),e,2)}function Rg(t){var e=t.getUTCDay();return e===0?7:e}function Fg(t,e){return N(si.count(Ot(t)-1,t),e,2)}function Ya(t){var e=t.getUTCDay();return e>=4||e===0?_e(t):_e.ceil(t)}function Pg(t,e){return t=Ya(t),N(_e.count(Ot(t),t)+(Ot(t).getUTCDay()===4),e,2)}function Bg(t){return t.getUTCDay()}function Lg(t,e){return N(zn.count(Ot(t)-1,t),e,2)}function zg(t,e){return N(t.getUTCFullYear()%100,e,2)}function Ig(t,e){return t=Ya(t),N(t.getUTCFullYear()%100,e,2)}function Ug(t,e){return N(t.getUTCFullYear()%1e4,e,4)}function Hg(t,e){var n=t.getUTCDay();return t=n>=4||n===0?_e(t):_e.ceil(t),N(t.getUTCFullYear()%1e4,e,4)}function Wg(){return"+0000"}function ls(){return"%"}function cs(t){return+t}function us(t){return Math.floor(+t/1e3)}var ae,Va,Xa;Yg({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 Yg(t){return ae=Yp(t),Va=ae.format,ae.parse,Xa=ae.utcFormat,ae.utcParse,ae}function Vg(t){return new Date(t)}function Xg(t){return t instanceof Date?+t:+new Date(+t)}function Ur(t,e,n,i,r,o,s,a,l,c){var h=Aa(),u=h.invert,f=h.domain,d=c(".%L"),g=c(":%S"),p=c("%I:%M"),v=c("%I %p"),_=c("%a %d"),x=c("%b %d"),y=c("%B"),T=c("%Y");function k(w){return(l(w)<w?d:a(w)<w?g:s(w)<w?p:o(w)<w?v:i(w)<w?r(w)<w?_:x:n(w)<w?y:T)(w)}return h.invert=function(w){return new Date(u(w))},h.domain=function(w){return arguments.length?f(Array.from(w,Xg)):f().map(Vg)},h.ticks=function(w){var S=f();return t(S[0],S[S.length-1],w??10)},h.tickFormat=function(w,S){return S==null?k:c(S)},h.nice=function(w){var S=f();return(!w||typeof w.range!="function")&&(w=e(S[0],S[S.length-1],w??10)),w?f(Da(S,w)):h},h.copy=function(){return Ze(h,Ur(t,e,n,i,r,o,s,a,l,c))},h}function qg(){return mt.apply(Ur(Hp,Wp,Nt,zr,oi,Qe,Br,Fr,Ht,Va).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Gg(){return mt.apply(Ur(Ip,Up,Ot,Ir,si,ri,Lr,Pr,Ht,Xa).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function jg(){var t=0,e=1,n,i,r,o,s=K,a=!1,l;function c(u){return u==null||isNaN(u=+u)?l:s(r===0?.5:(u=(o(u)-n)*r,a?Math.max(0,Math.min(1,u)):u))}c.domain=function(u){return arguments.length?([t,e]=u,n=o(t=+t),i=o(e=+e),r=n===i?0:1/(i-n),c):[t,e]},c.clamp=function(u){return arguments.length?(a=!!u,c):a},c.interpolator=function(u){return arguments.length?(s=u,c):s};function h(u){return function(f){var d,g;return arguments.length?([d,g]=f,s=u(d,g),c):[s(0),s(1)]}}return c.range=h(xe),c.rangeRound=h(Cr),c.unknown=function(u){return arguments.length?(l=u,c):l},function(u){return o=u,n=u(t),i=u(e),r=n===i?0:1/(i-n),c}}function qa(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Ga(){var t=te(jg()(K));return t.copy=function(){return qa(t,Ga())},Ca.apply(t,arguments)}function Zg(){var t=0,e=.5,n=1,i=1,r,o,s,a,l,c=K,h,u=!1,f;function d(p){return isNaN(p=+p)?f:(p=.5+((p=+h(p))-o)*(i*p<i*o?a:l),c(u?Math.max(0,Math.min(1,p)):p))}d.domain=function(p){return arguments.length?([t,e,n]=p,r=h(t=+t),o=h(e=+e),s=h(n=+n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,d):[t,e,n]},d.clamp=function(p){return arguments.length?(u=!!p,d):u},d.interpolator=function(p){return arguments.length?(c=p,d):c};function g(p){return function(v){var _,x,y;return arguments.length?([_,x,y]=v,c=td(p,[_,x,y]),d):[c(0),c(.5),c(1)]}}return d.range=g(xe),d.rangeRound=g(Cr),d.unknown=function(p){return arguments.length?(f=p,d):f},function(p){return h=p,r=p(t),o=p(e),s=p(n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,d}}function ja(){var t=te(Zg()(K));return t.copy=function(){return qa(t,ja())},Ca.apply(t,arguments)}const hs={scaleLinear:Na,scalePow:Dr,scaleSqrt:Np,scaleLog:Ra,scaleSymlog:Fa,scaleIdentity:Oa,scaleTime:qg,scaleUtc:Gg,scaleSequential:Ga,scaleDiverging:ja,scaleQuantize:Ba,scaleQuantile:Pa,scaleThreshold:La,scaleOrdinal:$r,scaleBand:Er,scalePoint:rp};var H;(function(t){t.X="x",t.Y="y"})(H||(H={}));var Xt;(function(t){t.West="west",t.East="east",t.North="north",t.South="south"})(Xt||(Xt={}));const Qg=Object.assign(Object.assign({},Qs),{components:[],tooltip:void 0,crosshair:void 0,annotations:void 0,xAxis:void 0,yAxis:void 0,autoMargin:!0,xScale:void 0,xDomain:void 0,xDomainMinConstraint:void 0,xDomainMaxConstraint:void 0,xRange:void 0,yScale:void 0,yDomain:void 0,yDomainMinConstraint:void 0,yDomainMaxConstraint:void 0,yRange:void 0,yDirection:Xt.North,preventEmptyDomain:null,scaleByDomain:!1});class Jg extends ze{constructor(e,n,i){var r,o;super(e),this._defaultConfig=Qg,this.datamodel=new Ar,this.config=this._defaultConfig,this._clipPathId=la(),this._axisMargin={top:0,bottom:0,left:0,right:0},this._firstRender=!0,this._clipPath=this.svg.append("clipPath").attr("id",this._clipPathId),this._clipPath.append("rect");const s="saturate",a=window.location.href.replace(window.location.hash,"");this.svg.attr("class",O`
|
|
52
|
+
`;function rd(t=window==null?void 0:window.document.body){return t?+zf("var(--vis-font-wh-ratio)",t):Ha}var od={value:()=>{}};function Ya(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Bn(n)}function Bn(t){this._=t}function sd(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Bn.prototype=Ya.prototype={constructor:Bn,on:function(t,e){var n=this._,i=sd(t+"",n),r,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((r=(t=i[o]).type)&&(r=ad(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(r=(t=i[o]).type)n[r]=us(n[r],t.name,e);else if(e==null)for(r in n)n[r]=us(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Bn(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,o;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,r=o.length;i<r;++i)o[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};function ad(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function us(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=od,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var Be=0,Ze=0,Ye=0,Xa=1e3,ni,Qe,ii=0,we=0,Si=0,dn=typeof performance=="object"&&performance.now?performance:Date,Ga=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Kr(){return we||(Ga(ld),we=dn.now()+Si)}function ld(){we=0}function ri(){this._call=this._time=this._next=null}ri.prototype=qa.prototype={constructor:ri,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Kr():+n)+(e==null?0:+e),!this._next&&Qe!==this&&(Qe?Qe._next=this:ni=this,Qe=this),this._call=t,this._time=n,vr()},stop:function(){this._call&&(this._call=null,this._time=1/0,vr())}};function qa(t,e,n){var i=new ri;return i.restart(t,e,n),i}function cd(){Kr(),++Be;for(var t=ni,e;t;)(e=we-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Be}function hs(){we=(ii=dn.now())+Si,Be=Ze=0;try{cd()}finally{Be=0,hd(),we=0}}function ud(){var t=dn.now(),e=t-ii;e>Xa&&(Si-=e,ii=t)}function hd(){for(var t,e=ni,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:ni=n);Qe=t,vr(i)}function vr(t){if(!Be){Ze&&(Ze=clearTimeout(Ze));var e=t-we;e>24?(t<1/0&&(Ze=setTimeout(hs,t-dn.now()-Si)),Ye&&(Ye=clearInterval(Ye))):(Ye||(ii=dn.now(),Ye=setInterval(ud,Xa)),Be=1,Ga(hs))}}function fs(t,e,n){var i=new ri;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var fd=Ya("start","end","cancel","interrupt"),dd=[],ja=0,ds=1,_r=2,Fn=3,gs=4,yr=5,Pn=6;function Ti(t,e,n,i,r,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;gd(t,n,{name:e,index:i,group:r,on:fd,tween:dd,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ja})}function to(t,e){var n=Et(t,e);if(n.state>ja)throw new Error("too late; already scheduled");return n}function zt(t,e){var n=Et(t,e);if(n.state>Fn)throw new Error("too late; already running");return n}function Et(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function gd(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=qa(o,0,n.time);function o(c){n.state=ds,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var h,u,f,g;if(n.state!==ds)return l();for(h in i)if(g=i[h],g.name===n.name){if(g.state===Fn)return fs(s);g.state===gs?(g.state=Pn,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete i[h]):+h<e&&(g.state=Pn,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete i[h])}if(fs(function(){n.state===Fn&&(n.state=gs,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=_r,n.on.call("start",t,t.__data__,n.index,n.group),n.state===_r){for(n.state=Fn,r=new Array(f=n.tween.length),h=0,u=-1;h<f;++h)(g=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=g);r.length=u+1}}function a(c){for(var h=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=yr,1),u=-1,f=r.length;++u<f;)r[u].call(t,h);n.state===yr&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=Pn,n.timer.stop(),delete i[e];for(var c in i)return;delete t.__transition}}function eo(t,e){var n=t.__transition,i,r,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((i=n[s]).name!==e){o=!1;continue}r=i.state>_r&&i.state<yr,i.state=Pn,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[s]}o&&delete t.__transition}}function pd(t){return this.each(function(){eo(this,t)})}const no=t=>()=>t;function md(t,e){return function(n){return t+n*e}}function vd(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function _d(t){return(t=+t)==1?Za:function(e,n){return n-e?vd(e,n,t):no(isNaN(e)?n:e)}}function Za(t,e){var n=e-t;return n?md(t,n):no(isNaN(t)?e:t)}const oi=function t(e){var n=_d(e);function i(r,o){var s=n((r=gr(r)).r,(o=gr(o)).r),a=n(r.g,o.g),l=n(r.b,o.b),c=Za(r.opacity,o.opacity);return function(h){return r.r=s(h),r.g=a(h),r.b=l(h),r.opacity=c(h),r+""}}return i.gamma=t,i}(1);function yd(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(o){for(r=0;r<n;++r)i[r]=t[r]*(1-o)+e[r]*o;return i}}function xd(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function bd(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),o=new Array(n),s;for(s=0;s<i;++s)r[s]=ke(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(a){for(s=0;s<i;++s)o[s]=r[s](a);return o}}function wd(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Ct(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function kd(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=ke(t[r],e[r]):i[r]=e[r];return function(o){for(r in n)i[r]=n[r](o);return i}}var xr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ji=new RegExp(xr.source,"g");function Sd(t){return function(){return t}}function Td(t){return function(e){return t(e)+""}}function Qa(t,e){var n=xr.lastIndex=ji.lastIndex=0,i,r,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(i=xr.exec(t))&&(r=ji.exec(e));)(o=r.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Ct(i,r)})),n=ji.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?Td(l[0].x):Sd(e):(e=l.length,function(c){for(var h=0,u;h<e;++h)a[(u=l[h]).i]=u.x(c);return a.join("")})}function ke(t,e){var n=typeof e,i;return e==null||n==="boolean"?no(e):(n==="number"?Ct:n==="string"?(i=be(e))?(e=i,oi):Qa:e instanceof be?oi:e instanceof Date?wd:xd(e)?yd:Array.isArray(e)?bd:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?kd:Ct)(t,e)}function io(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var ps=180/Math.PI,br={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ja(t,e,n,i,r,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:r,translateY:o,rotate:Math.atan2(e,t)*ps,skewX:Math.atan(l)*ps,scaleX:s,scaleY:a}}var Mn;function Cd(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?br:Ja(e.a,e.b,e.c,e.d,e.e,e.f)}function Ad(t){return t==null||(Mn||(Mn=document.createElementNS("http://www.w3.org/2000/svg","g")),Mn.setAttribute("transform",t),!(t=Mn.transform.baseVal.consolidate()))?br:(t=t.matrix,Ja(t.a,t.b,t.c,t.d,t.e,t.f))}function Ka(t,e,n,i){function r(c){return c.length?c.pop()+" ":""}function o(c,h,u,f,g,m){if(c!==u||h!==f){var p=g.push("translate(",null,e,null,n);m.push({i:p-4,x:Ct(c,u)},{i:p-2,x:Ct(h,f)})}else(u||f)&&g.push("translate("+u+e+f+n)}function s(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(r(u)+"rotate(",null,i)-2,x:Ct(c,h)})):h&&u.push(r(u)+"rotate("+h+i)}function a(c,h,u,f){c!==h?f.push({i:u.push(r(u)+"skewX(",null,i)-2,x:Ct(c,h)}):h&&u.push(r(u)+"skewX("+h+i)}function l(c,h,u,f,g,m){if(c!==u||h!==f){var p=g.push(r(g)+"scale(",null,",",null,")");m.push({i:p-4,x:Ct(c,u)},{i:p-2,x:Ct(h,f)})}else(u!==1||f!==1)&&g.push(r(g)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=t(c),h=t(h),o(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),a(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(g){for(var m=-1,p=f.length,v;++m<p;)u[(v=f[m]).i]=v.x(g);return u.join("")}}}var Md=Ka(Cd,"px, ","px)","deg)"),$d=Ka(Ad,", ",")",")");function Ed(t,e){e===void 0&&(e=t,t=ke);for(var n=0,i=e.length-1,r=e[0],o=new Array(i<0?0:i);n<i;)o[n]=t(r,r=e[++n]);return function(s){var a=Math.max(0,Math.min(i-1,Math.floor(s*=i)));return o[a](s-a)}}function Nd(t,e){var n,i;return function(){var r=zt(this,t),o=r.tween;if(o!==n){i=n=o;for(var s=0,a=i.length;s<a;++s)if(i[s].name===e){i=i.slice(),i.splice(s,1);break}}r.tween=i}}function Dd(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var o=zt(this,t),s=o.tween;if(s!==i){r=(i=s).slice();for(var a={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=a;break}l===c&&r.push(a)}o.tween=r}}function Od(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=Et(this.node(),n).tween,r=0,o=i.length,s;r<o;++r)if((s=i[r]).name===t)return s.value;return null}return this.each((e==null?Nd:Dd)(n,t,e))}function ro(t,e,n){var i=t._id;return t.each(function(){var r=zt(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return Et(r,i).value[e]}}function tl(t,e){var n;return(typeof e=="number"?Ct:e instanceof be?oi:(n=be(e))?(e=n,oi):Qa)(t,e)}function Rd(t){return function(){this.removeAttribute(t)}}function Ld(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Bd(t,e,n){var i,r=n+"",o;return function(){var s=this.getAttribute(t);return s===r?null:s===i?o:o=e(i=s,n)}}function Fd(t,e,n){var i,r=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===r?null:s===i?o:o=e(i=s,n)}}function Pd(t,e,n){var i,r,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a)))}}function zd(t,e,n){var i,r,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a)))}}function Id(t,e){var n=_i(t),i=n==="transform"?$d:tl;return this.attrTween(t,typeof e=="function"?(n.local?zd:Pd)(n,i,ro(this,"attr."+t,e)):e==null?(n.local?Ld:Rd)(n):(n.local?Fd:Bd)(n,i,e))}function Vd(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Hd(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ud(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&Hd(t,o)),n}return r._value=e,r}function Wd(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&Vd(t,o)),n}return r._value=e,r}function Yd(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=_i(t);return this.tween(n,(i.local?Ud:Wd)(i,e))}function Xd(t,e){return function(){to(this,t).delay=+e.apply(this,arguments)}}function Gd(t,e){return e=+e,function(){to(this,t).delay=e}}function qd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Xd:Gd)(e,t)):Et(this.node(),e).delay}function jd(t,e){return function(){zt(this,t).duration=+e.apply(this,arguments)}}function Zd(t,e){return e=+e,function(){zt(this,t).duration=e}}function Qd(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?jd:Zd)(e,t)):Et(this.node(),e).duration}function Jd(t,e){if(typeof e!="function")throw new Error;return function(){zt(this,t).ease=e}}function Kd(t){var e=this._id;return arguments.length?this.each(Jd(e,t)):Et(this.node(),e).ease}function tg(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;zt(this,t).ease=n}}function eg(t){if(typeof t!="function")throw new Error;return this.each(tg(this._id,t))}function ng(t){typeof t!="function"&&(t=la(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new qt(i,this._parents,this._name,this._id)}function ig(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,o=Math.min(i,r),s=new Array(i),a=0;a<o;++a)for(var l=e[a],c=n[a],h=l.length,u=s[a]=new Array(h),f,g=0;g<h;++g)(f=l[g]||c[g])&&(u[g]=f);for(;a<i;++a)s[a]=e[a];return new qt(s,this._parents,this._name,this._id)}function rg(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function og(t,e,n){var i,r,o=rg(e)?to:zt;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(e,n),s.on=r}}function sg(t,e){var n=this._id;return arguments.length<2?Et(this.node(),n).on.on(t):this.each(og(n,t,e))}function ag(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function lg(){return this.on("end.remove",ag(this._id))}function cg(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Hr(t));for(var i=this._groups,r=i.length,o=new Array(r),s=0;s<r;++s)for(var a=i[s],l=a.length,c=o[s]=new Array(l),h,u,f=0;f<l;++f)(h=a[f])&&(u=t.call(h,h.__data__,f,a))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,Ti(c[f],e,n,f,c,Et(h,n)));return new qt(o,this._parents,e,n)}function ug(t){var e=this._name,n=this._id;typeof t!="function"&&(t=aa(t));for(var i=this._groups,r=i.length,o=[],s=[],a=0;a<r;++a)for(var l=i[a],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=t.call(h,h.__data__,u,l),g,m=Et(h,n),p=0,v=f.length;p<v;++p)(g=f[p])&&Ti(g,e,n,p,f,m);o.push(f),s.push(h)}return new qt(o,s,e,n)}var hg=pn.prototype.constructor;function fg(){return new hg(this._groups,this._parents)}function dg(t,e){var n,i,r;return function(){var o=De(this,t),s=(this.style.removeProperty(t),De(this,t));return o===s?null:o===n&&s===i?r:r=e(n=o,i=s)}}function el(t){return function(){this.style.removeProperty(t)}}function gg(t,e,n){var i,r=n+"",o;return function(){var s=De(this,t);return s===r?null:s===i?o:o=e(i=s,n)}}function pg(t,e,n){var i,r,o;return function(){var s=De(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),De(this,t))),s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a))}}function mg(t,e){var n,i,r,o="style."+e,s="end."+o,a;return function(){var l=zt(this,t),c=l.on,h=l.value[o]==null?a||(a=el(e)):void 0;(c!==n||r!==h)&&(i=(n=c).copy()).on(s,r=h),l.on=i}}function vg(t,e,n){var i=(t+="")=="transform"?Md:tl;return e==null?this.styleTween(t,dg(t,i)).on("end.style."+t,el(t)):typeof e=="function"?this.styleTween(t,pg(t,i,ro(this,"style."+t,e))).each(mg(this._id,t)):this.styleTween(t,gg(t,i,e),n).on("end.style."+t,null)}function _g(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function yg(t,e,n){var i,r;function o(){var s=e.apply(this,arguments);return s!==r&&(i=(r=s)&&_g(t,s,n)),i}return o._value=e,o}function xg(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,yg(t,e,n??""))}function bg(t){return function(){this.textContent=t}}function wg(t){return function(){var e=t(this);this.textContent=e??""}}function kg(t){return this.tween("text",typeof t=="function"?wg(ro(this,"text",t)):bg(t==null?"":t+""))}function Sg(t){return function(e){this.textContent=t.call(this,e)}}function Tg(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Sg(r)),e}return i._value=t,i}function Cg(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Tg(t))}function Ag(){for(var t=this._name,e=this._id,n=nl(),i=this._groups,r=i.length,o=0;o<r;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var h=Et(l,e);Ti(l,t,n,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new qt(i,this._parents,t,n)}function Mg(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--r===0&&o()}};n.each(function(){var c=zt(this,i),h=c.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),r===0&&o()})}var $g=0;function qt(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function nl(){return++$g}var Ht=pn.prototype;qt.prototype={constructor:qt,select:cg,selectAll:ug,selectChild:Ht.selectChild,selectChildren:Ht.selectChildren,filter:ng,merge:ig,selection:fg,transition:Ag,call:Ht.call,nodes:Ht.nodes,node:Ht.node,size:Ht.size,empty:Ht.empty,each:Ht.each,on:sg,attr:Id,attrTween:Yd,style:vg,styleTween:xg,text:kg,textTween:Cg,remove:lg,tween:Od,delay:qd,duration:Qd,ease:Kd,easeVarying:eg,end:Mg,[Symbol.iterator]:Ht[Symbol.iterator]};const ms=t=>+t;function Eg(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Ng={time:null,delay:0,duration:250,ease:Eg};function Dg(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Og(t){var e,n;t instanceof qt?(e=t._id,t=t._name):(e=nl(),(n=Ng).time=Kr(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&Ti(l,t,e,c,s,n||Dg(l,e));return new qt(i,this._parents,t,e)}pn.prototype.interrupt=pd;pn.prototype.transition=Og;function q(t,e,n){if(t.nodes().forEach(i=>eo(i)),e){const i=t.transition().duration(e);return n&&i.ease(n),i}else return t}const Rg=Object.assign(Object.assign({},Gr),{tooltip:void 0,annotations:void 0});class Lg extends Re{constructor(e,n,i){var r;super(e),this._defaultConfig=Rg,this.config=this._defaultConfig,n&&(this.updateContainer(n,!0),this.component=n.component),i&&this.setData(i,!0),!((r=this.component)===null||r===void 0)&&r.datamodel.data&&this.render()}setData(e,n){var i;const{config:r}=this;this.component&&this.component.setData(e),n||this.render(),(i=r.tooltip)===null||i===void 0||i.hide()}updateContainer(e,n){super.updateContainer(e),this._removeAllChildren(),this.component=e.component,e.sizing&&(this.component.sizing=e.sizing),this.element.appendChild(this.component.element);const i=e.tooltip;i&&(i.hasContainer()||i.setContainer(this._container),i.setComponents([this.component]));const r=e.annotations;r&&this.element.appendChild(r.element),this.element.appendChild(this._svgDefs.node()),this.element.appendChild(this._svgDefsExternal.node()),n||this.render()}updateComponent(e,n){this.component.setConfig(e),n||this.render()}update(e,n,i){e&&this.updateContainer(e,!0),n&&this.updateComponent(n,!0),i&&this.setData(i,!0),this.render()}getFitWidthScale(){const{config:e,component:n}=this,i=n;if(!i.getWidth)return 1;const r=i.getWidth()+e.margin.left+e.margin.right;return this.width/r}_preRender(){var e;super._preRender(),this.component.setSize(this.width,this.height,this.containerWidth,this.containerHeight),(e=this.config.annotations)===null||e===void 0||e.setSize(this.width,this.height,this.containerWidth,this.containerHeight)}_render(e){var n;const{config:i,component:r}=this;super._render(e),r.g.attr("transform",`translate(${i.margin.left},${i.margin.top})`),r.render(e),(n=i.annotations)===null||n===void 0||n.render(e),i.tooltip&&i.tooltip.update()}render(e=this.config.duration){const{config:n,component:i}=this;if(n.sizing===Xt.Extend||n.sizing===Xt.FitWidth){const r=n.sizing===Xt.FitWidth,o=i,s=o.getWidth()+n.margin.left+n.margin.right,a=o.getHeight()+n.margin.top+n.margin.bottom,l=r?this.getFitWidthScale():1,c=this.svg.attr("width"),h=this.svg.attr("height"),u=s*l,f=a*l,g=c||h;q(this.svg,g?e:0).attr("width",u).attr("height",f).attr("viewBox",`0 0 ${s} ${r?f:a}`).attr("preserveAspectRatio","xMinYMin")}else this.svg.attr("width",this.config.width||this.containerWidth).attr("height",this.config.height||this.containerHeight);this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}_onResize(){var e;const{config:n}=this;super._onResize(),(e=n.tooltip)===null||e===void 0||e.hide()}destroy(){var e,n;const{component:i,config:r}=this;super.destroy(),i==null||i.destroy(),(e=r.tooltip)===null||e===void 0||e.destroy(),(n=r.annotations)===null||n===void 0||n.destroy()}}class oo{constructor(e){this.data=e}get data(){return this._data}set data(e){this._data=e}}var H;(function(t){t.X="x",t.Y="y"})(H||(H={}));function Nt(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function il(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const vs=Symbol("implicit");function so(){var t=new Oo,e=[],n=[],i=vs;function r(o){let s=t.get(o);if(s===void 0){if(i!==vs)return i;t.set(o,s=e.push(o)-1)}return n[s%n.length]}return r.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Oo;for(const s of o)t.has(s)||t.set(s,e.push(s)-1);return r},r.range=function(o){return arguments.length?(n=Array.from(o),r):n.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return so(e,n).unknown(i)},Nt.apply(r,arguments),r}function Ci(){var t=so().unknown(void 0),e=t.domain,n=t.range,i=0,r=1,o,s,a=!1,l=0,c=0,h=.5;delete t.unknown;function u(){var f=e().length,g=r<i,m=g?r:i,p=g?i:r;o=(p-m)/Math.max(1,f-l+c*2),a&&(o=Math.floor(o)),m+=(p-m-o*(f-l))*h,s=o*(1-l),a&&(m=Math.round(m),s=Math.round(s));var v=ya(f).map(function(y){return m+o*y});return n(g?v.reverse():v)}return t.domain=function(f){return arguments.length?(e(f),u()):e()},t.range=function(f){return arguments.length?([i,r]=f,i=+i,r=+r,u()):[i,r]},t.rangeRound=function(f){return[i,r]=f,i=+i,r=+r,a=!0,u()},t.bandwidth=function(){return s},t.step=function(){return o},t.round=function(f){return arguments.length?(a=!!f,u()):a},t.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),u()):l},t.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),u()):l},t.paddingOuter=function(f){return arguments.length?(c=+f,u()):c},t.align=function(f){return arguments.length?(h=Math.max(0,Math.min(1,f)),u()):h},t.copy=function(){return Ci(e(),[i,r]).round(a).paddingInner(l).paddingOuter(c).align(h)},Nt.apply(u(),arguments)}function rl(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return rl(e())},t}function Bg(){return rl(Ci.apply(null,arguments).paddingInner(1))}function Fg(t){return function(){return t}}function wr(t){return+t}var _s=[0,1];function gt(t){return t}function kr(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Fg(isNaN(e)?NaN:.5)}function Pg(t,e){var n;return t>e&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}function zg(t,e,n){var i=t[0],r=t[1],o=e[0],s=e[1];return r<i?(i=kr(r,i),o=n(s,o)):(i=kr(i,r),o=n(o,s)),function(a){return o(i(a))}}function Ig(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),o=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)r[s]=kr(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=xi(t,a,1,i)-1;return o[l](r[l](a))}}function _n(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Ai(){var t=_s,e=_s,n=ke,i,r,o,s=gt,a,l,c;function h(){var f=Math.min(t.length,e.length);return s!==gt&&(s=Pg(t[0],t[f-1])),a=f>2?Ig:zg,l=c=null,u}function u(f){return f==null||isNaN(f=+f)?o:(l||(l=a(t.map(i),e,n)))(i(s(f)))}return u.invert=function(f){return s(r((c||(c=a(e,t.map(i),Ct)))(f)))},u.domain=function(f){return arguments.length?(t=Array.from(f,wr),h()):t.slice()},u.range=function(f){return arguments.length?(e=Array.from(f),h()):e.slice()},u.rangeRound=function(f){return e=Array.from(f),n=io,h()},u.clamp=function(f){return arguments.length?(s=f?!0:gt,h()):s!==gt},u.interpolate=function(f){return arguments.length?(n=f,h()):n},u.unknown=function(f){return arguments.length?(o=f,u):o},function(f,g){return i=f,r=g,h()}}function ol(){return Ai()(gt,gt)}function Vg(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function si(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function Fe(t){return t=si(Math.abs(t)),t?t[1]:NaN}function Hg(t,e){return function(n,i){for(var r=n.length,o=[],s=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function Ug(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Wg=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function gn(t){if(!(e=Wg.exec(t)))throw new Error("invalid format: "+t);var e;return new ao({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}gn.prototype=ao.prototype;function ao(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}ao.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 Yg(t){t:for(var e=t.length,n=1,i=-1,r;n<e;++n)switch(t[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+t[n])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(r+1):t}var sl;function Xg(t,e){var n=si(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-(sl=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+si(t,Math.max(0,e+o-1))[0]}function ys(t,e){var n=si(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const xs={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Vg,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ys(t*100,e),r:ys,s:Xg,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function bs(t){return t}var ws=Array.prototype.map,ks=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Gg(t){var e=t.grouping===void 0||t.thousands===void 0?bs:Hg(ws.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?bs:Ug(ws.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(u){u=gn(u);var f=u.fill,g=u.align,m=u.sign,p=u.symbol,v=u.zero,y=u.width,x=u.comma,_=u.precision,w=u.trim,k=u.type;k==="n"?(x=!0,k="g"):xs[k]||(_===void 0&&(_=12),w=!0,k="g"),(v||f==="0"&&g==="=")&&(v=!0,f="0",g="=");var b=p==="$"?n:p==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",T=p==="$"?i:/[%p]/.test(k)?s:"",R=xs[k],E=/[defgprs%]/.test(k);_=_===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function U($){var F=b,C=T,D,et,lt;if(k==="c")C=R($)+C,$="";else{$=+$;var nt=$<0||1/$<0;if($=isNaN($)?l:R(Math.abs($),_),w&&($=Yg($)),nt&&+$==0&&m!=="+"&&(nt=!1),F=(nt?m==="("?m:a:m==="-"||m==="("?"":m)+F,C=(k==="s"?ks[8+sl/3]:"")+C+(nt&&m==="("?")":""),E){for(D=-1,et=$.length;++D<et;)if(lt=$.charCodeAt(D),48>lt||lt>57){C=(lt===46?r+$.slice(D+1):$.slice(D))+C,$=$.slice(0,D);break}}}x&&!v&&($=e($,1/0));var ct=F.length+$.length+C.length,Q=ct<y?new Array(y-ct+1).join(f):"";switch(x&&v&&($=e(Q+$,Q.length?y-C.length:1/0),Q=""),g){case"<":$=F+$+C+Q;break;case"=":$=F+Q+$+C;break;case"^":$=Q.slice(0,ct=Q.length>>1)+F+$+C+Q.slice(ct);break;default:$=Q+F+$+C;break}return o($)}return U.toString=function(){return u+""},U}function h(u,f){var g=c((u=gn(u),u.type="f",u)),m=Math.max(-8,Math.min(8,Math.floor(Fe(f)/3)))*3,p=Math.pow(10,-m),v=ks[8+m/3];return function(y){return g(p*y)+v}}return{format:c,formatPrefix:h}}var $n,lo,al;qg({thousands:",",grouping:[3],currency:["$",""]});function qg(t){return $n=Gg(t),lo=$n.format,al=$n.formatPrefix,$n}function jg(t){return Math.max(0,-Fe(Math.abs(t)))}function Zg(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Fe(e)/3)))*3-Fe(Math.abs(t)))}function Qg(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Fe(e)-Fe(t))+1}function Jg(t,e,n,i){var r=lr(t,e,n),o;switch(i=gn(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(o=Zg(r,s))&&(i.precision=o),al(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=Qg(r,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=jg(r))&&(i.precision=o-(i.type==="%")*2);break}}return lo(i)}function Se(t){var e=t.domain;return t.ticks=function(n){var i=e();return sr(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var r=e();return Jg(r[0],r[r.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),r=0,o=i.length-1,s=i[r],a=i[o],l,c,h=10;for(a<s&&(c=s,s=a,a=c,c=r,r=o,o=c);h-- >0;){if(c=ar(s,a,n),c===l)return i[r]=s,i[o]=a,e(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function ll(){var t=ol();return t.copy=function(){return _n(t,ll())},Nt.apply(t,arguments),Se(t)}function cl(t){var e;function n(i){return i==null||isNaN(i=+i)?e:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(t=Array.from(i,wr),n):t.slice()},n.unknown=function(i){return arguments.length?(e=i,n):e},n.copy=function(){return cl(t).unknown(e)},t=arguments.length?Array.from(t,wr):[0,1],Se(n)}function ul(t,e){t=t.slice();var n=0,i=t.length-1,r=t[n],o=t[i],s;return o<r&&(s=n,n=i,i=s,s=r,r=o,o=s),t[n]=e.floor(r),t[i]=e.ceil(o),t}function Ss(t){return Math.log(t)}function Ts(t){return Math.exp(t)}function Kg(t){return-Math.log(-t)}function tp(t){return-Math.exp(-t)}function ep(t){return isFinite(t)?+("1e"+t):t<0?0:t}function np(t){return t===10?ep:t===Math.E?Math.exp:e=>Math.pow(t,e)}function ip(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Cs(t){return(e,n)=>-t(-e,n)}function rp(t){const e=t(Ss,Ts),n=e.domain;let i=10,r,o;function s(){return r=ip(i),o=np(i),n()[0]<0?(r=Cs(r),o=Cs(o),t(Kg,tp)):t(Ss,Ts),e}return e.base=function(a){return arguments.length?(i=+a,s()):i},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const l=n();let c=l[0],h=l[l.length-1];const u=h<c;u&&([c,h]=[h,c]);let f=r(c),g=r(h),m,p;const v=a==null?10:+a;let y=[];if(!(i%1)&&g-f<v){if(f=Math.floor(f),g=Math.ceil(g),c>0){for(;f<=g;++f)for(m=1;m<i;++m)if(p=f<0?m/o(-f):m*o(f),!(p<c)){if(p>h)break;y.push(p)}}else for(;f<=g;++f)for(m=i-1;m>=1;--m)if(p=f>0?m/o(-f):m*o(f),!(p<c)){if(p>h)break;y.push(p)}y.length*2<v&&(y=sr(c,h,v))}else y=sr(f,g,Math.min(g-f,v)).map(o);return u?y.reverse():y},e.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=i===10?"s":","),typeof l!="function"&&(!(i%1)&&(l=gn(l)).precision==null&&(l.trim=!0),l=lo(l)),a===1/0)return l;const c=Math.max(1,i*a/e.ticks().length);return h=>{let u=h/o(Math.round(r(h)));return u*i<i-.5&&(u*=i),u<=c?l(h):""}},e.nice=()=>n(ul(n(),{floor:a=>o(Math.floor(r(a))),ceil:a=>o(Math.ceil(r(a)))})),e}function hl(){const t=rp(Ai()).domain([1,10]);return t.copy=()=>_n(t,hl()).base(t.base()),Nt.apply(t,arguments),t}function As(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Ms(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function op(t){var e=1,n=t(As(e),Ms(e));return n.constant=function(i){return arguments.length?t(As(e=+i),Ms(e)):e},Se(n)}function fl(){var t=op(Ai());return t.copy=function(){return _n(t,fl()).constant(t.constant())},Nt.apply(t,arguments)}function $s(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function sp(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function ap(t){return t<0?-t*t:t*t}function lp(t){var e=t(gt,gt),n=1;function i(){return n===1?t(gt,gt):n===.5?t(sp,ap):t($s(n),$s(1/n))}return e.exponent=function(r){return arguments.length?(n=+r,i()):n},Se(e)}function co(){var t=lp(Ai());return t.copy=function(){return _n(t,co()).exponent(t.exponent())},Nt.apply(t,arguments),t}function cp(){return co.apply(null,arguments).exponent(.5)}function dl(){var t=[],e=[],n=[],i;function r(){var s=0,a=Math.max(1,e.length);for(n=new Array(a-1);++s<a;)n[s-1]=mh(t,s/a);return o}function o(s){return s==null||isNaN(s=+s)?i:e[xi(n,s)]}return o.invertExtent=function(s){var a=e.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},o.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let a of s)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(en),r()},o.range=function(s){return arguments.length?(e=Array.from(s),r()):e.slice()},o.unknown=function(s){return arguments.length?(i=s,o):i},o.quantiles=function(){return n.slice()},o.copy=function(){return dl().domain(t).range(e).unknown(i)},Nt.apply(o,arguments)}function gl(){var t=0,e=1,n=1,i=[.5],r=[0,1],o;function s(l){return l!=null&&l<=l?r[xi(i,l,0,n)]:o}function a(){var l=-1;for(i=new Array(n);++l<n;)i[l]=((l+1)*e-(l-n)*t)/(n+1);return s}return s.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,a()):[t,e]},s.range=function(l){return arguments.length?(n=(r=Array.from(l)).length-1,a()):r.slice()},s.invertExtent=function(l){var c=r.indexOf(l);return c<0?[NaN,NaN]:c<1?[t,i[0]]:c>=n?[i[n-1],e]:[i[c-1],i[c]]},s.unknown=function(l){return arguments.length&&(o=l),s},s.thresholds=function(){return i.slice()},s.copy=function(){return gl().domain([t,e]).range(r).unknown(o)},Nt.apply(Se(s),arguments)}function pl(){var t=[.5],e=[0,1],n,i=1;function r(o){return o!=null&&o<=o?e[xi(t,o,0,i)]:n}return r.domain=function(o){return arguments.length?(t=Array.from(o),i=Math.min(t.length,e.length-1),r):t.slice()},r.range=function(o){return arguments.length?(e=Array.from(o),i=Math.min(t.length,e.length-1),r):e.slice()},r.invertExtent=function(o){var s=e.indexOf(o);return[t[s-1],t[s]]},r.unknown=function(o){return arguments.length?(n=o,r):n},r.copy=function(){return pl().domain(t).range(e).unknown(n)},Nt.apply(r,arguments)}const Zi=new Date,Qi=new Date;function Z(t,e,n,i){function r(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return r.floor=o=>(t(o=new Date(+o)),o),r.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),r.round=o=>{const s=r(o),a=r.ceil(o);return o-s<a-o?s:a},r.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),r.range=(o,s,a)=>{const l=[];if(o=r.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return l;let c;do l.push(c=new Date(+o)),e(o,a),t(o);while(c<o&&o<s);return l},r.filter=o=>Z(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),n&&(r.count=(o,s)=>(Zi.setTime(+o),Qi.setTime(+s),t(Zi),t(Qi),Math.floor(n(Zi,Qi))),r.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?r.filter(i?s=>i(s)%o===0:s=>r.count(0,s)%o===0):r)),r}const ai=Z(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);ai.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Z(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):ai);ai.range;const Wt=1e3,Tt=Wt*60,Yt=Tt*60,jt=Yt*24,uo=jt*7,Es=jt*30,Ji=jt*365,ge=Z(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Wt)},(t,e)=>(e-t)/Wt,t=>t.getUTCSeconds());ge.range;const ho=Z(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Wt)},(t,e)=>{t.setTime(+t+e*Tt)},(t,e)=>(e-t)/Tt,t=>t.getMinutes());ho.range;const fo=Z(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Tt)},(t,e)=>(e-t)/Tt,t=>t.getUTCMinutes());fo.range;const go=Z(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Wt-t.getMinutes()*Tt)},(t,e)=>{t.setTime(+t+e*Yt)},(t,e)=>(e-t)/Yt,t=>t.getHours());go.range;const po=Z(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Yt)},(t,e)=>(e-t)/Yt,t=>t.getUTCHours());po.range;const yn=Z(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Tt)/jt,t=>t.getDate()-1);yn.range;const Mi=Z(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/jt,t=>t.getUTCDate()-1);Mi.range;const ml=Z(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/jt,t=>Math.floor(t/jt));ml.range;function Te(t){return Z(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*Tt)/uo)}const $i=Te(0),li=Te(1),up=Te(2),hp=Te(3),Pe=Te(4),fp=Te(5),dp=Te(6);$i.range;li.range;up.range;hp.range;Pe.range;fp.range;dp.range;function Ce(t){return Z(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/uo)}const Ei=Ce(0),ci=Ce(1),gp=Ce(2),pp=Ce(3),ze=Ce(4),mp=Ce(5),vp=Ce(6);Ei.range;ci.range;gp.range;pp.range;ze.range;mp.range;vp.range;const mo=Z(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());mo.range;const vo=Z(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());vo.range;const Zt=Z(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Zt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Z(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});Zt.range;const Qt=Z(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Qt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Z(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});Qt.range;function vl(t,e,n,i,r,o){const s=[[ge,1,Wt],[ge,5,5*Wt],[ge,15,15*Wt],[ge,30,30*Wt],[o,1,Tt],[o,5,5*Tt],[o,15,15*Tt],[o,30,30*Tt],[r,1,Yt],[r,3,3*Yt],[r,6,6*Yt],[r,12,12*Yt],[i,1,jt],[i,2,2*jt],[n,1,uo],[e,1,Es],[e,3,3*Es],[t,1,Ji]];function a(c,h,u){const f=h<c;f&&([c,h]=[h,c]);const g=u&&typeof u.range=="function"?u:l(c,h,u),m=g?g.range(c,+h+1):[];return f?m.reverse():m}function l(c,h,u){const f=Math.abs(h-c)/u,g=yi(([,,v])=>v).right(s,f);if(g===s.length)return t.every(lr(c/Ji,h/Ji,u));if(g===0)return ai.every(Math.max(lr(c,h,u),1));const[m,p]=s[f/s[g-1][2]<s[g][2]/f?g-1:g];return m.every(p)}return[a,l]}const[_p,yp]=vl(Qt,vo,Ei,ml,po,fo),[xp,bp]=vl(Zt,mo,$i,yn,go,ho);function Ki(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function tr(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Xe(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function wp(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=Ge(r),h=qe(r),u=Ge(o),f=qe(o),g=Ge(s),m=qe(s),p=Ge(a),v=qe(a),y=Ge(l),x=qe(l),_={a:nt,A:ct,b:Q,B:Dt,c:null,d:Bs,e:Bs,f:Yp,g:e0,G:i0,H:Hp,I:Up,j:Wp,L:_l,m:Xp,M:Gp,p:Kt,q:Vt,Q:zs,s:Is,S:qp,u:jp,U:Zp,V:Qp,w:Jp,W:Kp,x:null,X:null,y:t0,Y:n0,Z:r0,"%":Ps},w={a:te,A:ue,b:ut,B:ee,c:null,d:Fs,e:Fs,f:l0,g:_0,G:x0,H:o0,I:s0,j:a0,L:xl,m:c0,M:u0,p:N,q:st,Q:zs,s:Is,S:h0,u:f0,U:d0,V:g0,w:p0,W:m0,x:null,X:null,y:v0,Y:y0,Z:b0,"%":Ps},k={a:U,A:$,b:F,B:C,c:D,d:Rs,e:Rs,f:Pp,g:Os,G:Ds,H:Ls,I:Ls,j:Rp,L:Fp,m:Op,M:Lp,p:E,q:Dp,Q:Ip,s:Vp,S:Bp,u:Ap,U:Mp,V:$p,w:Cp,W:Ep,x:et,X:lt,y:Os,Y:Ds,Z:Np,"%":zp};_.x=b(n,_),_.X=b(i,_),_.c=b(e,_),w.x=b(n,w),w.X=b(i,w),w.c=b(e,w);function b(A,L){return function(P){var S=[],ht=-1,Y=0,vt=A.length,_t,he,No;for(P instanceof Date||(P=new Date(+P));++ht<vt;)A.charCodeAt(ht)===37&&(S.push(A.slice(Y,ht)),(he=Ns[_t=A.charAt(++ht)])!=null?_t=A.charAt(++ht):he=_t==="e"?" ":"0",(No=L[_t])&&(_t=No(P,he)),S.push(_t),Y=ht+1);return S.push(A.slice(Y,ht)),S.join("")}}function T(A,L){return function(P){var S=Xe(1900,void 0,1),ht=R(S,A,P+="",0),Y,vt;if(ht!=P.length)return null;if("Q"in S)return new Date(S.Q);if("s"in S)return new Date(S.s*1e3+("L"in S?S.L:0));if(L&&!("Z"in S)&&(S.Z=0),"p"in S&&(S.H=S.H%12+S.p*12),S.m===void 0&&(S.m="q"in S?S.q:0),"V"in S){if(S.V<1||S.V>53)return null;"w"in S||(S.w=1),"Z"in S?(Y=tr(Xe(S.y,0,1)),vt=Y.getUTCDay(),Y=vt>4||vt===0?ci.ceil(Y):ci(Y),Y=Mi.offset(Y,(S.V-1)*7),S.y=Y.getUTCFullYear(),S.m=Y.getUTCMonth(),S.d=Y.getUTCDate()+(S.w+6)%7):(Y=Ki(Xe(S.y,0,1)),vt=Y.getDay(),Y=vt>4||vt===0?li.ceil(Y):li(Y),Y=yn.offset(Y,(S.V-1)*7),S.y=Y.getFullYear(),S.m=Y.getMonth(),S.d=Y.getDate()+(S.w+6)%7)}else("W"in S||"U"in S)&&("w"in S||(S.w="u"in S?S.u%7:"W"in S?1:0),vt="Z"in S?tr(Xe(S.y,0,1)).getUTCDay():Ki(Xe(S.y,0,1)).getDay(),S.m=0,S.d="W"in S?(S.w+6)%7+S.W*7-(vt+5)%7:S.w+S.U*7-(vt+6)%7);return"Z"in S?(S.H+=S.Z/100|0,S.M+=S.Z%100,tr(S)):Ki(S)}}function R(A,L,P,S){for(var ht=0,Y=L.length,vt=P.length,_t,he;ht<Y;){if(S>=vt)return-1;if(_t=L.charCodeAt(ht++),_t===37){if(_t=L.charAt(ht++),he=k[_t in Ns?L.charAt(ht++):_t],!he||(S=he(A,P,S))<0)return-1}else if(_t!=P.charCodeAt(S++))return-1}return S}function E(A,L,P){var S=c.exec(L.slice(P));return S?(A.p=h.get(S[0].toLowerCase()),P+S[0].length):-1}function U(A,L,P){var S=g.exec(L.slice(P));return S?(A.w=m.get(S[0].toLowerCase()),P+S[0].length):-1}function $(A,L,P){var S=u.exec(L.slice(P));return S?(A.w=f.get(S[0].toLowerCase()),P+S[0].length):-1}function F(A,L,P){var S=y.exec(L.slice(P));return S?(A.m=x.get(S[0].toLowerCase()),P+S[0].length):-1}function C(A,L,P){var S=p.exec(L.slice(P));return S?(A.m=v.get(S[0].toLowerCase()),P+S[0].length):-1}function D(A,L,P){return R(A,e,L,P)}function et(A,L,P){return R(A,n,L,P)}function lt(A,L,P){return R(A,i,L,P)}function nt(A){return s[A.getDay()]}function ct(A){return o[A.getDay()]}function Q(A){return l[A.getMonth()]}function Dt(A){return a[A.getMonth()]}function Kt(A){return r[+(A.getHours()>=12)]}function Vt(A){return 1+~~(A.getMonth()/3)}function te(A){return s[A.getUTCDay()]}function ue(A){return o[A.getUTCDay()]}function ut(A){return l[A.getUTCMonth()]}function ee(A){return a[A.getUTCMonth()]}function N(A){return r[+(A.getUTCHours()>=12)]}function st(A){return 1+~~(A.getUTCMonth()/3)}return{format:function(A){var L=b(A+="",_);return L.toString=function(){return A},L},parse:function(A){var L=T(A+="",!1);return L.toString=function(){return A},L},utcFormat:function(A){var L=b(A+="",w);return L.toString=function(){return A},L},utcParse:function(A){var L=T(A+="",!0);return L.toString=function(){return A},L}}}var Ns={"-":"",_:" ",0:"0"},J=/^\s*\d+/,kp=/^%/,Sp=/[\\^$*+?|[\]().{}]/g;function z(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(e)+r:r)}function Tp(t){return t.replace(Sp,"\\$&")}function Ge(t){return new RegExp("^(?:"+t.map(Tp).join("|")+")","i")}function qe(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Cp(t,e,n){var i=J.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Ap(t,e,n){var i=J.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function Mp(t,e,n){var i=J.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function $p(t,e,n){var i=J.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function Ep(t,e,n){var i=J.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function Ds(t,e,n){var i=J.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Os(t,e,n){var i=J.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Np(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function Dp(t,e,n){var i=J.exec(e.slice(n,n+1));return i?(t.q=i[0]*3-3,n+i[0].length):-1}function Op(t,e,n){var i=J.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function Rs(t,e,n){var i=J.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Rp(t,e,n){var i=J.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function Ls(t,e,n){var i=J.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function Lp(t,e,n){var i=J.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function Bp(t,e,n){var i=J.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function Fp(t,e,n){var i=J.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function Pp(t,e,n){var i=J.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function zp(t,e,n){var i=kp.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function Ip(t,e,n){var i=J.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function Vp(t,e,n){var i=J.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function Bs(t,e){return z(t.getDate(),e,2)}function Hp(t,e){return z(t.getHours(),e,2)}function Up(t,e){return z(t.getHours()%12||12,e,2)}function Wp(t,e){return z(1+yn.count(Zt(t),t),e,3)}function _l(t,e){return z(t.getMilliseconds(),e,3)}function Yp(t,e){return _l(t,e)+"000"}function Xp(t,e){return z(t.getMonth()+1,e,2)}function Gp(t,e){return z(t.getMinutes(),e,2)}function qp(t,e){return z(t.getSeconds(),e,2)}function jp(t){var e=t.getDay();return e===0?7:e}function Zp(t,e){return z($i.count(Zt(t)-1,t),e,2)}function yl(t){var e=t.getDay();return e>=4||e===0?Pe(t):Pe.ceil(t)}function Qp(t,e){return t=yl(t),z(Pe.count(Zt(t),t)+(Zt(t).getDay()===4),e,2)}function Jp(t){return t.getDay()}function Kp(t,e){return z(li.count(Zt(t)-1,t),e,2)}function t0(t,e){return z(t.getFullYear()%100,e,2)}function e0(t,e){return t=yl(t),z(t.getFullYear()%100,e,2)}function n0(t,e){return z(t.getFullYear()%1e4,e,4)}function i0(t,e){var n=t.getDay();return t=n>=4||n===0?Pe(t):Pe.ceil(t),z(t.getFullYear()%1e4,e,4)}function r0(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+z(e/60|0,"0",2)+z(e%60,"0",2)}function Fs(t,e){return z(t.getUTCDate(),e,2)}function o0(t,e){return z(t.getUTCHours(),e,2)}function s0(t,e){return z(t.getUTCHours()%12||12,e,2)}function a0(t,e){return z(1+Mi.count(Qt(t),t),e,3)}function xl(t,e){return z(t.getUTCMilliseconds(),e,3)}function l0(t,e){return xl(t,e)+"000"}function c0(t,e){return z(t.getUTCMonth()+1,e,2)}function u0(t,e){return z(t.getUTCMinutes(),e,2)}function h0(t,e){return z(t.getUTCSeconds(),e,2)}function f0(t){var e=t.getUTCDay();return e===0?7:e}function d0(t,e){return z(Ei.count(Qt(t)-1,t),e,2)}function bl(t){var e=t.getUTCDay();return e>=4||e===0?ze(t):ze.ceil(t)}function g0(t,e){return t=bl(t),z(ze.count(Qt(t),t)+(Qt(t).getUTCDay()===4),e,2)}function p0(t){return t.getUTCDay()}function m0(t,e){return z(ci.count(Qt(t)-1,t),e,2)}function v0(t,e){return z(t.getUTCFullYear()%100,e,2)}function _0(t,e){return t=bl(t),z(t.getUTCFullYear()%100,e,2)}function y0(t,e){return z(t.getUTCFullYear()%1e4,e,4)}function x0(t,e){var n=t.getUTCDay();return t=n>=4||n===0?ze(t):ze.ceil(t),z(t.getUTCFullYear()%1e4,e,4)}function b0(){return"+0000"}function Ps(){return"%"}function zs(t){return+t}function Is(t){return Math.floor(+t/1e3)}var Ae,wl,kl;w0({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 w0(t){return Ae=wp(t),wl=Ae.format,Ae.parse,kl=Ae.utcFormat,Ae.utcParse,Ae}function k0(t){return new Date(t)}function S0(t){return t instanceof Date?+t:+new Date(+t)}function _o(t,e,n,i,r,o,s,a,l,c){var h=ol(),u=h.invert,f=h.domain,g=c(".%L"),m=c(":%S"),p=c("%I:%M"),v=c("%I %p"),y=c("%a %d"),x=c("%b %d"),_=c("%B"),w=c("%Y");function k(b){return(l(b)<b?g:a(b)<b?m:s(b)<b?p:o(b)<b?v:i(b)<b?r(b)<b?y:x:n(b)<b?_:w)(b)}return h.invert=function(b){return new Date(u(b))},h.domain=function(b){return arguments.length?f(Array.from(b,S0)):f().map(k0)},h.ticks=function(b){var T=f();return t(T[0],T[T.length-1],b??10)},h.tickFormat=function(b,T){return T==null?k:c(T)},h.nice=function(b){var T=f();return(!b||typeof b.range!="function")&&(b=e(T[0],T[T.length-1],b??10)),b?f(ul(T,b)):h},h.copy=function(){return _n(h,_o(t,e,n,i,r,o,s,a,l,c))},h}function T0(){return Nt.apply(_o(xp,bp,Zt,mo,$i,yn,go,ho,ge,wl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function C0(){return Nt.apply(_o(_p,yp,Qt,vo,Ei,Mi,po,fo,ge,kl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function A0(){var t=0,e=1,n,i,r,o,s=gt,a=!1,l;function c(u){return u==null||isNaN(u=+u)?l:s(r===0?.5:(u=(o(u)-n)*r,a?Math.max(0,Math.min(1,u)):u))}c.domain=function(u){return arguments.length?([t,e]=u,n=o(t=+t),i=o(e=+e),r=n===i?0:1/(i-n),c):[t,e]},c.clamp=function(u){return arguments.length?(a=!!u,c):a},c.interpolator=function(u){return arguments.length?(s=u,c):s};function h(u){return function(f){var g,m;return arguments.length?([g,m]=f,s=u(g,m),c):[s(0),s(1)]}}return c.range=h(ke),c.rangeRound=h(io),c.unknown=function(u){return arguments.length?(l=u,c):l},function(u){return o=u,n=u(t),i=u(e),r=n===i?0:1/(i-n),c}}function Sl(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Tl(){var t=Se(A0()(gt));return t.copy=function(){return Sl(t,Tl())},il.apply(t,arguments)}function M0(){var t=0,e=.5,n=1,i=1,r,o,s,a,l,c=gt,h,u=!1,f;function g(p){return isNaN(p=+p)?f:(p=.5+((p=+h(p))-o)*(i*p<i*o?a:l),c(u?Math.max(0,Math.min(1,p)):p))}g.domain=function(p){return arguments.length?([t,e,n]=p,r=h(t=+t),o=h(e=+e),s=h(n=+n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,g):[t,e,n]},g.clamp=function(p){return arguments.length?(u=!!p,g):u},g.interpolator=function(p){return arguments.length?(c=p,g):c};function m(p){return function(v){var y,x,_;return arguments.length?([y,x,_]=v,c=Ed(p,[y,x,_]),g):[c(0),c(.5),c(1)]}}return g.range=m(ke),g.rangeRound=m(io),g.unknown=function(p){return arguments.length?(f=p,g):f},function(p){return h=p,r=p(t),o=p(e),s=p(n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,g}}function Cl(){var t=Se(M0()(gt));return t.copy=function(){return Sl(t,Cl())},il.apply(t,arguments)}const Vs={scaleLinear:ll,scalePow:co,scaleSqrt:cp,scaleLog:hl,scaleSymlog:fl,scaleIdentity:cl,scaleTime:T0,scaleUtc:C0,scaleSequential:Tl,scaleDiverging:Cl,scaleQuantize:gl,scaleQuantile:dl,scaleThreshold:pl,scaleOrdinal:so,scaleBand:Ci,scalePoint:Bg};var G;(function(t){t.X="x",t.Y="y"})(G||(G={}));var $t;(function(t){t.West="west",t.East="east",t.North="north",t.South="south"})($t||($t={}));const $0=Object.assign(Object.assign({},Gr),{components:[],tooltip:void 0,crosshair:void 0,annotations:void 0,xAxis:void 0,yAxis:void 0,autoMargin:!0,xScale:void 0,xDomain:void 0,xDomainMinConstraint:void 0,xDomainMaxConstraint:void 0,xRange:void 0,yScale:void 0,yDomain:void 0,yDomainMinConstraint:void 0,yDomainMaxConstraint:void 0,yRange:void 0,yDirection:$t.North,preventEmptyDomain:null,scaleByDomain:!1});class E0 extends Re{constructor(e,n,i){var r,o;super(e),this._defaultConfig=$0,this.datamodel=new oo,this.config=this._defaultConfig,this._clipPathId=za(),this._axisMargin={top:0,bottom:0,left:0,right:0},this._firstRender=!0,this._clipPath=this.svg.append("clipPath").attr("id",this._clipPathId),this._clipPath.append("rect");const s="saturate",a=window.location.href.replace(window.location.hash,"");this.svg.attr("class",O`
|
|
53
53
|
--highlight-filter-id: url(${a}#${s}); // defining a css variable
|
|
54
|
-
`),this._svgDefs.append("filter").attr("id",s).attr("filterUnits","objectBoundingBox").html('<feColorMatrix type="saturate" in="SourceGraphic" values="1.35"/>'),n&&this.updateContainer(n,!0),i&&this.setData(i,!0),(this.config.xAxis||this.config.yAxis||!((r=this.components)===null||r===void 0)&&r.some(l=>l.datamodel.data))&&this.render(),(o=document.fonts)===null||o===void 0||o.ready.then(()=>{this._firstRender||this._renderAxes(0)})}get components(){return this.config.components}get width(){const e=this._getMargin();return Pt(this.containerWidth-e.left-e.right,0,Number.POSITIVE_INFINITY)}get height(){const e=this._getMargin();return Pt(this.containerHeight-e.top-e.bottom,0,Number.POSITIVE_INFINITY)}setData(e,n){var i,r,o,s;const{components:a,config:l}=this;e&&(this.datamodel.data=e,a.forEach(c=>{c.setData(e)}),(i=l.crosshair)===null||i===void 0||i.setData(e),(r=l.xAxis)===null||r===void 0||r.setData(e),(o=l.yAxis)===null||o===void 0||o.setData(e),(s=l.tooltip)===null||s===void 0||s.hide(),n||this.render())}updateContainer(e,n){super.updateContainer(e),this._removeAllChildren(),this.setData(this.datamodel.data,!0),e.xAxis&&(this.config.xAxis.config.type=P.X,this.element.appendChild(e.xAxis.element)),e.yAxis&&(this.config.yAxis.config.type=P.Y,this.element.appendChild(e.yAxis.element));for(const s of this.components)this.element.appendChild(s.element);const i=e.tooltip;i&&(i.hasContainer()||i.setContainer(this._container),i.setComponents(this.components));const r=e.crosshair;r&&(r.setContainer(this.svg),r.tooltip=i,this.element.appendChild(r.element));const o=e.annotations;o&&this.element.appendChild(o.element),this.element.appendChild(this._clipPath.node()),this.element.appendChild(this._svgDefs.node()),this.element.appendChild(this._svgDefsExternal.node()),n||this.render()}updateComponents(e,n){const{config:i}=this;this.components.forEach((r,o)=>{e[o]&&r.setConfig(e[o])}),this._updateScales(...this.components,i.xAxis,i.yAxis,i.crosshair),n||this.render()}update(e,n,i){i&&(this.datamodel.data=i),e&&this.updateContainer(e,!0),n&&this.updateComponents(n,!0),this.render()}_preRender(){const{config:e}=this;super._preRender(),e.autoMargin&&this._setAutoMargin();const n=we([...this.components,e.xAxis,e.yAxis,e.crosshair,e.annotations]);for(const i of n)i.setSize(this.width,this.height,this.containerWidth,this.containerHeight);this._updateScales(...this.components,e.xAxis,e.yAxis,e.crosshair)}_render(e){var n,i,r,o,s;const{config:a}=this;super._render();const l=this._getMargin();for(const u of this.components)u.g.attr("transform",`translate(${l.left},${l.top})`).style("clip-path",u.clippable?`url(#${this._clipPathId})`:null).style("-webkit-clip-path",u.clippable?`url(#${this._clipPathId})`:null),u.render(e);this._renderAxes(this._firstRender?0:e);const c=2;this._clipPath.select("rect").attr("x",-2).attr("y",-2).attr("width",this.width+2*c).attr("height",this.height+2*c),(n=a.tooltip)===null||n===void 0||n.update();const h=a.crosshair;if(h){const u=this.components.filter(p=>!p.stacked).map(p=>p.config.y),f=this.components.filter(p=>p.stacked).map(p=>p.config.y),d=(i=this.components.find(p=>p.config.baseline))===null||i===void 0?void 0:i.config,g=d==null?void 0:d.baseline;h.accessors={x:(r=this.components[0])===null||r===void 0?void 0:r.config.x,y:Pi(u),yStacked:Pi(f),baseline:g},h.g.attr("transform",`translate(${l.left},${l.top})`).style("clip-path",`url(#${this._clipPathId})`).style("-webkit-clip-path",`url(#${this._clipPathId})`),h.hide()}(o=a.annotations)===null||o===void 0||o.g.attr("transform",`translate(${l.left},${l.top})`),(s=a.annotations)===null||s===void 0||s.render(),this._firstRender=!1}_updateScales(...e){const n=we(e||this.components);this._setScales(...n),this._updateScalesDomain(...n),this._updateScalesRange(...n)}_setScales(...e){const{config:n}=this;e&&(n.xScale&&e.forEach(i=>i.setScale(H.X,n.xScale)),n.yScale&&e.forEach(i=>i.setScale(H.Y,n.yScale)))}_updateScalesDomain(...e){const{config:n}=this;if(!e)return;const i=e.filter(r=>!r.config.excludeFromDomainCalculation);Object.values(H).forEach(r=>{var o,s,a,l,c,h,u,f;const[d,g]=Nu(Uu(i.map(k=>k.getDataExtent(r,n.scaleByDomain)))),p=r===H.Y?n.yDomain:n.xDomain,v=r===H.Y?n.yDomainMinConstraint:n.xDomainMinConstraint,_=r===H.Y?n.yDomainMaxConstraint:n.xDomainMaxConstraint,x=(s=(o=p==null?void 0:p[0])!==null&&o!==void 0?o:d)!==null&&s!==void 0?s:0,y=(l=(a=p==null?void 0:p[1])!==null&&a!==void 0?a:g)!==null&&l!==void 0?l:1,T=[Pt(x,(c=v==null?void 0:v[0])!==null&&c!==void 0?c:Number.NEGATIVE_INFINITY,(h=v==null?void 0:v[1])!==null&&h!==void 0?h:Number.POSITIVE_INFINITY),Pt(y,(u=_==null?void 0:_[0])!==null&&u!==void 0?u:Number.NEGATIVE_INFINITY,(f=_==null?void 0:_[1])!==null&&f!==void 0?f:Number.POSITIVE_INFINITY)];if(T[0]===T[1]){const k=i.some(w=>{var S;return((S=w.datamodel.data)===null||S===void 0?void 0:S.length)>0});(n.preventEmptyDomain||n.preventEmptyDomain===null&&(!k||r===H.Y))&&(T[1]=T[0]+1)}e.forEach(k=>k.setScaleDomain(r,T))})}_updateScalesRange(...e){var n,i,r,o,s,a;const{config:l}=this;if(!e)return;const c=l.yDirection===Xt.South,h=[(n=l.padding.left)!==null&&n!==void 0?n:0,this.width-((i=l.padding.right)!==null&&i!==void 0?i:0)],u=[this.height-((r=l.padding.bottom)!==null&&r!==void 0?r:0),(o=l.padding.top)!==null&&o!==void 0?o:0];c&&u.reverse();for(const d of e)d.setSize(this.width,this.height,this.containerWidth,this.containerHeight),d.setScaleRange(H.X,(s=l.xRange)!==null&&s!==void 0?s:h),d.setScaleRange(H.Y,(a=l.yRange)!==null&&a!==void 0?a:u);const f=e.map(d=>d.bleed).reduce((d,g)=>{for(const p of Object.keys(d)){const v=p;d[v]<g[v]&&(d[v]=g[v])}return d},{top:0,bottom:0,left:0,right:0});for(const d of e)d.setScaleRange(H.X,[h[0]+f.left,h[1]-f.right]),d.setScaleRange(H.Y,c?[u[0]+f.top,u[1]-f.bottom]:[u[0]-f.bottom,u[1]+f.top])}_renderAxes(e){const{config:{xAxis:n,yAxis:i}}=this,r=this._getMargin();we([n,i]).forEach(s=>{const a=s.getOffset(r);s.g.attr("transform",`translate(${a.left},${a.top})`),s.render(e)})}_setAutoMargin(){const{config:{xAxis:e,yAxis:n}}=this,i=we([...this.components,e,n]);this._setScales(...i),this._updateScalesDomain(...i);const r=this._firstRender?2:1;for(let o=0;o<r;o+=1){const s={top:0,bottom:0,left:0,right:0};this._updateScalesRange(...i),we([e,n]).forEach(l=>{l.preRender();const c=l.getRequiredMargin();s.top<c.top&&(s.top=c.top),s.bottom<c.bottom&&(s.bottom=c.bottom),s.left<c.left&&(s.left=c.left),s.right<c.right&&(s.right=c.right)}),this._axisMargin=s}}_getMargin(){const{config:{margin:e}}=this;return{top:e.top+this._axisMargin.top,bottom:e.bottom+this._axisMargin.bottom,left:e.left+this._axisMargin.left,right:e.right+this._axisMargin.right}}destroy(){const{components:e,config:{tooltip:n,crosshair:i,annotations:r,xAxis:o,yAxis:s}}=this;super.destroy();for(const a of e)a==null||a.destroy();n==null||n.destroy(),i==null||i.destroy(),r==null||r.destroy(),o==null||o.destroy(),s==null||s.destroy()}}const Za={duration:600,events:{},attributes:{}};class Kg{constructor(e=De.SVG){var n,i;this.type=De.SVG,this.datamodel=new Ar,this.sizing=de.Fit,this.events={},this._defaultConfig=Za,this._width=400,this._height=200,this._containerWidth=void 0,this._containerHeight=void 0,this._setUpComponentEventsThrottled=Mn(this._setUpComponentEvents,500),this._setCustomAttributesThrottled=Mn(this._setCustomAttributes,500),e===De.SVG?this.element=document.createElementNS("http://www.w3.org/2000/svg","g"):this.element=document.createElement("div"),this.uid=la(),this.g=Z(this.element);const r=(i=(n=this.constructor)===null||n===void 0?void 0:n.selectors)===null||i===void 0?void 0:i.root;r&&this.g.attr("class",r)}setConfig(e){this.prevConfig=this.config,this.config=Zt(this._defaultConfig,e)}setData(e){this.datamodel.data=e}setSize(e,n,i,r){isFinite(e)&&(this._width=e),isFinite(n)&&(this._height=n),isFinite(i)&&(this._containerWidth=i),isFinite(r)&&(this._containerHeight=r)}render(e=this.config.duration){this._render(e);const n="animating";e&&(this.g.attr(n,""),this.g.transition(n).duration(e).on("end interrupt",()=>{this.g.attr(n,null)})),this._setUpComponentEventsThrottled(),this._setCustomAttributesThrottled()}get bleed(){return{top:0,bottom:0,left:0,right:0}}_render(e=this.config.duration){}_setCustomAttributes(){const e=this.config.attributes;Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(i=>{this.g.selectAll(`.${n}`).attr(i,e[n][i])})})}_setUpComponentEvents(){this._bindEvents(this.events),this._bindEvents(this.config.events,".user")}_bindEvents(e=this.events,n=""){Object.keys(e).forEach(i=>{Object.keys(e[i]).forEach(r=>{const o=this.g.selectAll(`.${i}`);o.on(r+n,(s,a)=>{const l=o.nodes(),c=l.indexOf(s.currentTarget),h=e[i][r];return h==null?void 0:h(a,s,c,l)})})})}destroy(){var e;(e=this.g)===null||e===void 0||e.remove(),this.element=void 0}isDestroyed(){return!this.element}}class t0 extends Ar{constructor(e){super(e)}get data(){var e;return(e=this._data)!==null&&e!==void 0?e:[]}set data(e){Array.isArray(e)&&(this._data=e)}}const Je=Object.assign(Object.assign({},Za),{x:void 0,y:void 0,id:(t,e)=>{var n;return(n=t.id)!==null&&n!==void 0?n:`${e}`},color:t=>t.color,xScale:void 0,yScale:void 0,excludeFromDomainCalculation:!1});class ai extends Kg{constructor(){super(...arguments),this.datamodel=new t0,this.clippable=!0,this.stacked=!1,this._defaultConfig=Je,this._xScale=hs.scaleLinear(),this._yScale=hs.scaleLinear()}get xScale(){return this.config.xScale||this._xScale}get yScale(){return this.config.yScale||this._yScale}setConfig(e){var n,i;!((n=this.config)===null||n===void 0)&&n.xScale&&(e.xScale=this.config.xScale),!((i=this.config)===null||i===void 0)&&i.yScale&&(e.yScale=this.config.yScale),super.setConfig(e)}setScaleDomain(e,n){var i,r;e===H.X&&((i=this._xScale)===null||i===void 0||i.domain(n)),e===H.Y&&((r=this._yScale)===null||r===void 0||r.domain(n))}setScaleRange(e,n){var i,r;e===H.X&&((i=this._xScale)===null||i===void 0||i.range(n)),e===H.Y&&((r=this._yScale)===null||r===void 0||r.range(n))}setScale(e,n){n&&e===H.X&&(this._xScale=n),n&&e===H.Y&&(this._yScale=n)}getDataExtent(e,n){const{config:i,datamodel:r}=this;switch(e){case H.X:return this.getXDataExtent();case H.Y:return this.getYDataExtent(n);default:return gi(r.data,i[e])}}getXDataExtent(){const{config:e,datamodel:n}=this;return gi(n.data,e.x)}getYDataExtent(e){const{config:n,datamodel:i}=this,r=e?Ys(i.data,this.xScale.domain(),n.x):i.data,o=jt(n.y)?n.y:[n.y];return gi(r,...o)}}var C;(function(t){t.Top="top",t.Bottom="bottom",t.Left="left",t.Right="right",t.Center="center",t.Auto="auto"})(C||(C={}));var fs;(function(t){t.Absolute="absolute",t.Fixed="fixed"})(fs||(fs={}));var ds;(function(t){t.Inside="inside",t.Outside="outside"})(ds||(ds={}));var ps;(function(t){t.Horizontal="horizontal",t.Vertical="vertical"})(ps||(ps={}));const e0={components:[],container:void 0,followCursor:!0,allowHover:!0,horizontalPlacement:C.Auto,horizontalShift:0,verticalPlacement:C.Top,verticalShift:0,attributes:{},triggers:{},className:void 0},li=O`
|
|
54
|
+
`),this._svgDefs.append("filter").attr("id",s).attr("filterUnits","objectBoundingBox").html('<feColorMatrix type="saturate" in="SourceGraphic" values="1.35"/>'),n&&this.updateContainer(n,!0),i&&this.setData(i,!0),(this.config.xAxis||this.config.yAxis||!((r=this.components)===null||r===void 0)&&r.some(l=>l.datamodel.data))&&this.render(),(o=document.fonts)===null||o===void 0||o.ready.then(()=>{this._firstRender||this._renderAxes(0)})}get components(){return this.config.components}get width(){const e=this._getMargin();return Bt(this.containerWidth-e.left-e.right,0,Number.POSITIVE_INFINITY)}get height(){const e=this._getMargin();return Bt(this.containerHeight-e.top-e.bottom,0,Number.POSITIVE_INFINITY)}setData(e,n){var i,r,o,s;const{components:a,config:l}=this;e&&(this.datamodel.data=e,a.forEach(c=>{c.setData(e)}),(i=l.crosshair)===null||i===void 0||i.setData(e),(r=l.xAxis)===null||r===void 0||r.setData(e),(o=l.yAxis)===null||o===void 0||o.setData(e),(s=l.tooltip)===null||s===void 0||s.hide(),n||this.render())}updateContainer(e,n){super.updateContainer(e),this._removeAllChildren(),this.setData(this.datamodel.data,!0),e.xAxis&&(this.config.xAxis.config.type=H.X,this.element.appendChild(e.xAxis.element)),e.yAxis&&(this.config.yAxis.config.type=H.Y,this.element.appendChild(e.yAxis.element));for(const s of this.components)this.element.appendChild(s.element);const i=e.tooltip;i&&(i.hasContainer()||i.setContainer(this._container),i.setComponents(this.components));const r=e.crosshair;r&&(r.setContainer(this.svg),r.tooltip=i,this.element.appendChild(r.element));const o=e.annotations;o&&this.element.appendChild(o.element),this.element.appendChild(this._clipPath.node()),this.element.appendChild(this._svgDefs.node()),this.element.appendChild(this._svgDefsExternal.node()),n||this.render()}updateComponents(e,n){const{config:i}=this;this.components.forEach((r,o)=>{e[o]&&r.setConfig(e[o])}),this._updateScales(...this.components,i.xAxis,i.yAxis,i.crosshair),n||this.render()}update(e,n,i){i&&(this.datamodel.data=i),e&&this.updateContainer(e,!0),n&&this.updateComponents(n,!0),this.render()}_preRender(){const{config:e}=this;super._preRender(),e.autoMargin&&this._setAutoMargin();const n=Ue([...this.components,e.xAxis,e.yAxis,e.crosshair,e.annotations]);for(const i of n)i.setSize(this.width,this.height,this.containerWidth,this.containerHeight);this._updateScales(...this.components,e.xAxis,e.yAxis,e.crosshair)}_render(e){var n,i,r,o,s;const{config:a}=this;super._render();const l=this._getMargin();for(const u of this.components)u.g.attr("transform",`translate(${l.left},${l.top})`).style("clip-path",u.clippable?`url(#${this._clipPathId})`:null).style("-webkit-clip-path",u.clippable?`url(#${this._clipPathId})`:null),u.render(e);this._renderAxes(this._firstRender?0:e);const c=2;this._clipPath.select("rect").attr("x",-2).attr("y",-2).attr("width",this.width+2*c).attr("height",this.height+2*c),(n=a.tooltip)===null||n===void 0||n.update();const h=a.crosshair;if(h){const u=this.components.filter(p=>!p.stacked).map(p=>p.config.y),f=this.components.filter(p=>p.stacked).map(p=>p.config.y),g=(i=this.components.find(p=>p.config.baseline))===null||i===void 0?void 0:i.config,m=g==null?void 0:g.baseline;h.accessors={x:(r=this.components[0])===null||r===void 0?void 0:r.config.x,y:ur(u),yStacked:ur(f),baseline:m},h.g.attr("transform",`translate(${l.left},${l.top})`).style("clip-path",`url(#${this._clipPathId})`).style("-webkit-clip-path",`url(#${this._clipPathId})`),h.hide()}(o=a.annotations)===null||o===void 0||o.g.attr("transform",`translate(${l.left},${l.top})`),(s=a.annotations)===null||s===void 0||s.render(),this._firstRender=!1}_updateScales(...e){const n=Ue(e||this.components);this._setScales(...n),this._updateScalesDomain(...n),this._updateScalesRange(...n)}_setScales(...e){const{config:n}=this;e&&(n.xScale&&e.forEach(i=>i.setScale(G.X,n.xScale)),n.yScale&&e.forEach(i=>i.setScale(G.Y,n.yScale)))}_updateScalesDomain(...e){const{config:n}=this;if(!e)return;const i=e.filter(r=>!r.config.excludeFromDomainCalculation);Object.values(G).forEach(r=>{var o,s,a,l,c,h,u,f;const[g,m]=ch(yh(i.map(k=>k.getDataExtent(r,n.scaleByDomain)))),p=r===G.Y?n.yDomain:n.xDomain,v=r===G.Y?n.yDomainMinConstraint:n.xDomainMinConstraint,y=r===G.Y?n.yDomainMaxConstraint:n.xDomainMaxConstraint,x=(s=(o=p==null?void 0:p[0])!==null&&o!==void 0?o:g)!==null&&s!==void 0?s:0,_=(l=(a=p==null?void 0:p[1])!==null&&a!==void 0?a:m)!==null&&l!==void 0?l:1,w=[Bt(x,(c=v==null?void 0:v[0])!==null&&c!==void 0?c:Number.NEGATIVE_INFINITY,(h=v==null?void 0:v[1])!==null&&h!==void 0?h:Number.POSITIVE_INFINITY),Bt(_,(u=y==null?void 0:y[0])!==null&&u!==void 0?u:Number.NEGATIVE_INFINITY,(f=y==null?void 0:y[1])!==null&&f!==void 0?f:Number.POSITIVE_INFINITY)];if(w[0]===w[1]){const k=i.some(b=>{var T;return((T=b.datamodel.data)===null||T===void 0?void 0:T.length)>0});(n.preventEmptyDomain||n.preventEmptyDomain===null&&(!k||r===G.Y))&&(w[1]=w[0]+1)}e.forEach(k=>k.setScaleDomain(r,w))})}_updateScalesRange(...e){var n,i,r,o,s,a;const{config:l}=this;if(!e)return;const c=l.yDirection===$t.South,h=[(n=l.padding.left)!==null&&n!==void 0?n:0,this.width-((i=l.padding.right)!==null&&i!==void 0?i:0)],u=[this.height-((r=l.padding.bottom)!==null&&r!==void 0?r:0),(o=l.padding.top)!==null&&o!==void 0?o:0];c&&u.reverse();for(const g of e)g.setSize(this.width,this.height,this.containerWidth,this.containerHeight),g.setScaleRange(G.X,(s=l.xRange)!==null&&s!==void 0?s:h),g.setScaleRange(G.Y,(a=l.yRange)!==null&&a!==void 0?a:u);const f=e.map(g=>g.bleed).reduce((g,m)=>{for(const p of Object.keys(g)){const v=p;g[v]<m[v]&&(g[v]=m[v])}return g},{top:0,bottom:0,left:0,right:0});for(const g of e)g.setScaleRange(G.X,[h[0]+f.left,h[1]-f.right]),g.setScaleRange(G.Y,c?[u[0]+f.top,u[1]-f.bottom]:[u[0]-f.bottom,u[1]+f.top])}_renderAxes(e){const{config:{xAxis:n,yAxis:i}}=this,r=this._getMargin();Ue([n,i]).forEach(s=>{const a=s.getOffset(r);s.g.attr("transform",`translate(${a.left},${a.top})`),s.render(e)})}_setAutoMargin(){const{config:{xAxis:e,yAxis:n}}=this,i=Ue([...this.components,e,n]);this._setScales(...i),this._updateScalesDomain(...i);const r=this._firstRender?2:1;for(let o=0;o<r;o+=1){const s={top:0,bottom:0,left:0,right:0};this._updateScalesRange(...i),Ue([e,n]).forEach(l=>{l.preRender();const c=l.getRequiredMargin();s.top<c.top&&(s.top=c.top),s.bottom<c.bottom&&(s.bottom=c.bottom),s.left<c.left&&(s.left=c.left),s.right<c.right&&(s.right=c.right)}),this._axisMargin=s}}_getMargin(){const{config:{margin:e}}=this;return{top:e.top+this._axisMargin.top,bottom:e.bottom+this._axisMargin.bottom,left:e.left+this._axisMargin.left,right:e.right+this._axisMargin.right}}destroy(){const{components:e,config:{tooltip:n,crosshair:i,annotations:r,xAxis:o,yAxis:s}}=this;super.destroy();for(const a of e)a==null||a.destroy();n==null||n.destroy(),i==null||i.destroy(),r==null||r.destroy(),o==null||o.destroy(),s==null||s.destroy()}}const yo={duration:600,events:{},attributes:{}};class Al{constructor(e=tn.SVG){var n,i;this.type=tn.SVG,this.datamodel=new oo,this.sizing=Xt.Fit,this.events={},this._defaultConfig=yo,this._width=400,this._height=200,this._containerWidth=void 0,this._containerHeight=void 0,this._setUpComponentEventsThrottled=Qn(this._setUpComponentEvents,500),this._setCustomAttributesThrottled=Qn(this._setCustomAttributes,500),e===tn.SVG?this.element=document.createElementNS("http://www.w3.org/2000/svg","g"):this.element=document.createElement("div"),this.uid=za(),this.g=at(this.element);const r=(i=(n=this.constructor)===null||n===void 0?void 0:n.selectors)===null||i===void 0?void 0:i.root;r&&this.g.attr("class",r)}setConfig(e){this.prevConfig=this.config,this.config=xe(this._defaultConfig,e)}setData(e){this.datamodel.data=e}setSize(e,n,i,r){isFinite(e)&&(this._width=e),isFinite(n)&&(this._height=n),isFinite(i)&&(this._containerWidth=i),isFinite(r)&&(this._containerHeight=r)}render(e=this.config.duration){this._render(e);const n="animating";e&&(this.g.attr(n,""),this.g.transition(n).duration(e).on("end interrupt",()=>{this.g.attr(n,null)})),this._setUpComponentEventsThrottled(),this._setCustomAttributesThrottled()}get bleed(){return{top:0,bottom:0,left:0,right:0}}_render(e=this.config.duration){}_setCustomAttributes(){const e=this.config.attributes;Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(i=>{this.g.selectAll(`.${n}`).attr(i,e[n][i])})})}_setUpComponentEvents(){this._bindEvents(this.events),this._bindEvents(this.config.events,".user")}_bindEvents(e=this.events,n=""){Object.keys(e).forEach(i=>{Object.keys(e[i]).forEach(r=>{const o=this.g.selectAll(`.${i}`);o.on(r+n,(s,a)=>{const l=o.nodes(),c=l.indexOf(s.currentTarget),h=e[i][r];return h==null?void 0:h(a,s,c,l)})})})}destroy(){var e;(e=this.g)===null||e===void 0||e.remove(),this.element=void 0}isDestroyed(){return!this.element}}class Ml extends oo{constructor(e){super(e)}get data(){var e;return(e=this._data)!==null&&e!==void 0?e:[]}set data(e){Array.isArray(e)&&(this._data=e)}}const Ve=Object.assign(Object.assign({},yo),{x:void 0,y:void 0,id:(t,e)=>{var n;return(n=t.id)!==null&&n!==void 0?n:`${e}`},color:t=>t.color,xScale:void 0,yScale:void 0,excludeFromDomainCalculation:!1});class xn extends Al{constructor(){super(...arguments),this.datamodel=new Ml,this.clippable=!0,this.stacked=!1,this._defaultConfig=Ve,this._xScale=Vs.scaleLinear(),this._yScale=Vs.scaleLinear()}get xScale(){return this.config.xScale||this._xScale}get yScale(){return this.config.yScale||this._yScale}setConfig(e){var n,i;!((n=this.config)===null||n===void 0)&&n.xScale&&(e.xScale=this.config.xScale),!((i=this.config)===null||i===void 0)&&i.yScale&&(e.yScale=this.config.yScale),super.setConfig(e)}setScaleDomain(e,n){var i,r;e===G.X&&((i=this._xScale)===null||i===void 0||i.domain(n)),e===G.Y&&((r=this._yScale)===null||r===void 0||r.domain(n))}setScaleRange(e,n){var i,r;e===G.X&&((i=this._xScale)===null||i===void 0||i.range(n)),e===G.Y&&((r=this._yScale)===null||r===void 0||r.range(n))}setScale(e,n){n&&e===G.X&&(this._xScale=n),n&&e===G.Y&&(this._yScale=n)}getDataExtent(e,n){const{config:i,datamodel:r}=this;switch(e){case G.X:return this.getXDataExtent();case G.Y:return this.getYDataExtent(n);default:return Nn(r.data,i[e])}}getXDataExtent(){const{config:e,datamodel:n}=this;return Nn(n.data,e.x)}getYDataExtent(e){const{config:n,datamodel:i}=this,r=e?wa(i.data,this.xScale.domain(),n.x):i.data,o=Gt(n.y)?n.y:[n.y];return Nn(r,...o)}}var M;(function(t){t.Top="top",t.Bottom="bottom",t.Left="left",t.Right="right",t.Center="center",t.Auto="auto"})(M||(M={}));var Hs;(function(t){t.Absolute="absolute",t.Fixed="fixed"})(Hs||(Hs={}));var Us;(function(t){t.Inside="inside",t.Outside="outside"})(Us||(Us={}));var ui;(function(t){t.Horizontal="horizontal",t.Vertical="vertical"})(ui||(ui={}));const N0={components:[],container:void 0,followCursor:!0,allowHover:!0,horizontalPlacement:M.Auto,horizontalShift:0,verticalPlacement:M.Top,verticalShift:0,attributes:{},triggers:{},className:void 0},Ni=O`
|
|
55
55
|
label: tooltip;
|
|
56
56
|
display: inline-block;
|
|
57
57
|
left: 0;
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
border: solid 1px var(--vis-tooltip-border-color);
|
|
70
70
|
background-color: var(--vis-tooltip-background-color);
|
|
71
71
|
backdrop-filter: var(--vis-tooltip-backdrop-filter);
|
|
72
|
-
`,
|
|
72
|
+
`,D0=Ni,O0=Jt`
|
|
73
73
|
:root {
|
|
74
74
|
--vis-tooltip-background-color: rgba(255, 255, 255, 0.95);
|
|
75
75
|
--vis-tooltip-border-color: #e5e9f7;
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
--vis-dark-tooltip-shadow-color: rgba(0,0,0, 0.95);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
body.theme-dark ${`.${
|
|
90
|
+
body.theme-dark ${`.${Ni}`} {
|
|
91
91
|
--vis-tooltip-background-color: var(--vis-dark-tooltip-background-color);
|
|
92
92
|
--vis-tooltip-text-color: var(--vis-dark-tooltip-text-color);
|
|
93
93
|
--vis-tooltip-border-color: var(--vis-dark-tooltip-border-color);
|
|
@@ -100,19 +100,19 @@
|
|
|
100
100
|
--vis-tooltip-border-color: var(--vis-color-grey);
|
|
101
101
|
--vis-tooltip-shadow-color: rgba(0,0,0, 0.95);
|
|
102
102
|
}
|
|
103
|
-
|
|
103
|
+
`,$l=O`
|
|
104
104
|
bottom: unset;
|
|
105
105
|
position: fixed;
|
|
106
|
-
`,
|
|
106
|
+
`,Sr=O`
|
|
107
107
|
opacity: 1;
|
|
108
|
-
`,
|
|
108
|
+
`,Tr=O`
|
|
109
109
|
display: none;
|
|
110
|
-
`,
|
|
110
|
+
`,El=O`
|
|
111
111
|
label: non-interactive;
|
|
112
112
|
pointer-events: none;
|
|
113
113
|
user-select: none;
|
|
114
|
-
`,r0=Object.freeze(Object.defineProperty({__proto__:null,hidden:Qi,nonInteractive:Ja,positionFixed:Qa,root:li,show:Zi,tooltip:n0,variables:i0},Symbol.toStringTag,{value:"Module"}));class Ka{constructor(e={}){this._defaultConfig=e0,this.config=this._defaultConfig,this._setUpEventsThrottled=Mn(this._setUpEvents,500),this._setContainerPositionThrottled=Mn(this._setContainerPosition,500),this._isShown=!1,this.element=document.createElement("div"),this.div=Z(this.element).attr("class",li),this.setConfig(e),this.components=this.config.components,this._mutationObserver=new MutationObserver(()=>{this._isShown&&(!this.config.followCursor&&this._hoveredElement?this.placeByElement(this._hoveredElement):this._position&&this.place({x:this._position[0],y:this._position[1]}))}),this._mutationObserver.observe(this.div.node(),{childList:!0,subtree:!0})}setConfig(e){var n;this.prevConfig=this.config,this.config=Zt(this._defaultConfig,e),this.prevConfig.horizontalPlacement!==this.config.horizontalPlacement&&this.overrideHorizontalPlacement(void 0),this.config.container&&this.config.container!==((n=this.prevConfig)===null||n===void 0?void 0:n.container)&&this.setContainer(this.config.container),this._setUpAttributes()}setContainer(e){var n;(n=this.element.parentNode)===null||n===void 0||n.removeChild(this.element),this._container=e,this._container.appendChild(this.element),this._setContainerPositionThrottled()}getContainer(){return this._container}hasContainer(){return!!this._container&&this._container.isConnected}setComponents(e){this.components=e}update(){this._container&&this._setUpEventsThrottled()}show(e,n){this.render(e),this.place(n)}hide(){this.div.classed(Zi,!1).on("transitionend",()=>{this.div.classed(Qi,!this._isShown)}),this._isShown=!1}display(){this.div.classed(Qi,!1).classed(Zi,!0),this._isShown=!0}place(e){if(this._position=[e.x,e.y],!this.hasContainer()){console.warn("Unovis | Tooltip: Container was not set or is not initialized yet");return}const{config:n}=this,i=this.element.offsetWidth,r=this.element.offsetHeight,o=this._overriddenHorizontalPlacement||(n.horizontalPlacement===C.Auto?C.Center:n.horizontalPlacement),s=n.verticalPlacement===C.Auto?e.y-r<0?C.Bottom:C.Top:n.verticalPlacement,a=5,l=o===C.Left?-i-a-n.horizontalShift:o===C.Center?-i/2:a+n.horizontalShift,c=s===C.Bottom?a+n.verticalShift:s===C.Center?-r/2:-5-n.verticalShift-r,[h,u]=this._constraintPosToContainer(e.x+l,e.y+c,i,r);this._applyPosition(h,u,r)}placeByElement(e){const{config:n}=this;this._hoveredElement=e;const i=5,r=this.element.offsetWidth,o=this.element.offsetHeight,s=this.isContainerBody(),a=s?window.innerWidth:this._container.scrollWidth,l=e.getBoundingClientRect(),c=s?[l.x,l.y]:kn({clientX:l.x,clientY:l.y,pageX:l.x,pageY:l.y},this._container),h=this._overriddenHorizontalPlacement||(n.horizontalPlacement===C.Auto?c[0]-r<0?C.Right:c[0]+r>a?C.Left:C.Center:n.horizontalPlacement);let u=0;switch(h){case C.Left:u=-r-i-n.horizontalShift;break;case C.Right:u=l.width+i+n.horizontalShift;break;case C.Center:default:u=(-r+l.width)/2;break}const f=n.verticalPlacement===C.Auto?h!==C.Center?C.Center:c[1]-o<0?C.Bottom:C.Top:n.verticalPlacement;let d=-o;switch(f){case C.Center:d+=(o+l.height)/2;break;case C.Bottom:d+=o+l.height+i+n.verticalShift;break;case C.Top:default:d+=-5-n.verticalShift;break}const[g,p]=this._constraintPosToContainer(c[0]+u,c[1]+d,r,o);this._applyPosition(g,p,o)}isContainerBody(){return this._container===document.body}overrideHorizontalPlacement(e){this._overriddenHorizontalPlacement=e}render(e){var n;const{config:i,prevConfig:r}=this;e instanceof HTMLElement?this.div.select(":first-child").node()!==e&&this.div.html("").append(()=>e):e&&this.div.html(e),this.div.classed((n=i.className)!==null&&n!==void 0?n:"",!!i.className).classed(Ja,!i.allowHover||i.followCursor),r!=null&&r.className&&r.className!==i.className&&this.div.classed(r.className,!1),this.display()}_applyPosition(e,n,i){const r=this.isContainerBody(),o=r?window.innerHeight:this._container.scrollHeight;this.div.classed(Qa,r).style("top",r?`${n}px`:"unset").style("bottom",r?"unset":`${o-n-i}px`).style("left",`${e}px`)}_constraintPosToContainer(e,n,i,r){const o=this.isContainerBody(),s=o?window.innerHeight:this._container.scrollHeight,a=o?window.innerWidth:this._container.scrollWidth,l=10,c=e>a-i-l,h=e<l,u=c?a-i-l:h?l:e,f=10,d=n>s-r-f,g=n<f,p=d?s-r-f:g?f:n;return[a<i?0:u,s<r?0:p]}_setContainerPosition(){var e;this._container!==document.body&&((e=getComputedStyle(this._container))===null||e===void 0?void 0:e.position)==="static"&&(this._container.style.position="relative")}_setUpEvents(){const{config:e}=this;this.components.forEach(n=>{const i=Z(n.element);i.on("mousemove.tooltip",r=>{const o=r.composedPath&&r.composedPath()||r.path||[r.target];for(const s of Object.keys(e.triggers)){const a=e.triggers[s];if(!a)continue;const l=i.selectAll(`.${s}`).nodes();for(const c of o){if(c===i.node())break;if(c.classList.contains(s)){const h=l.indexOf(c),u=Z(c).datum(),f=a(u,h,l),[d,g]=this.isContainerBody()?[r.clientX,r.clientY]:kn(r,this._container);f===null?this.hide():(this.render(f),e.followCursor?this.place({x:d,y:g}):this.placeByElement(c)),r.stopPropagation();return}}}this._isShown&&this.hide()}).on("mouseleave.tooltip",r=>{r.stopPropagation(),this.hide()})}),e.allowHover&&!e.followCursor?this.div.on("mouseenter.tooltip",this.display.bind(this)).on("mouseleave.tooltip",this.hide.bind(this)):this.div.on("mouseenter.tooltip",null).on("mouseleave.tooltip",null)}_setUpAttributes(){const e=this.config.attributes;e&&Object.keys(e).forEach(n=>{this.div.attr(n,e[n])})}destroy(){var e;this._mutationObserver.disconnect(),(e=this.div)===null||e===void 0||e.remove()}}Ka.selectors=r0;function I(t){return function(){return t}}const tl=Math.cos,In=Math.sin,vt=Math.sqrt,gs=1e-12,Un=Math.PI,ci=2*Un,Ji=Math.PI,Ki=2*Ji,It=1e-6,o0=Ki-It;function el(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function s0(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return el;const n=10**e;return function(i){this._+=i[0];for(let r=1,o=i.length;r<o;++r)this._+=Math.round(arguments[r]*n)/n+i[r]}}class a0{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?el:s0(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,i,r){this._append`Q${+e},${+n},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(e,n,i,r,o,s){this._append`C${+e},${+n},${+i},${+r},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,i,r,o){if(e=+e,n=+n,i=+i,r=+r,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=i-e,c=r-n,h=s-e,u=a-n,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>It)if(!(Math.abs(u*l-c*h)>It)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let d=i-s,g=r-a,p=l*l+c*c,v=d*d+g*g,_=Math.sqrt(p),x=Math.sqrt(f),y=o*Math.tan((Ji-Math.acos((p+f-v)/(2*_*x)))/2),T=y/x,k=y/_;Math.abs(T-1)>It&&this._append`L${e+T*h},${n+T*u}`,this._append`A${o},${o},0,0,${+(u*d>h*g)},${this._x1=e+k*l},${this._y1=n+k*c}`}}arc(e,n,i,r,o,s){if(e=+e,n=+n,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(r),l=i*Math.sin(r),c=e+a,h=n+l,u=1^s,f=s?r-o:o-r;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>It||Math.abs(this._y1-h)>It)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Ki+Ki),f>o0?this._append`A${i},${i},0,1,${u},${e-a},${n-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>It&&this._append`A${i},${i},0,${+(f>=Ji)},${u},${this._x1=e+i*Math.cos(o)},${this._y1=n+i*Math.sin(o)}`)}rect(e,n,i,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function Hr(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);e=i}return t},()=>new a0(e)}function nl(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function il(t){this._context=t}il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Wr(t){return new il(t)}function rl(t){return t[0]}function ol(t){return t[1]}function sl(t,e){var n=I(!0),i=null,r=Wr,o=null,s=Hr(a);t=typeof t=="function"?t:t===void 0?rl:I(t),e=typeof e=="function"?e:e===void 0?ol:I(e);function a(l){var c,h=(l=nl(l)).length,u,f=!1,d;for(i==null&&(o=r(d=s())),c=0;c<=h;++c)!(c<h&&n(u=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,c,l),+e(u,c,l));if(d)return o=null,d+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:I(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:I(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:I(!!l),a):n},a.curve=function(l){return arguments.length?(r=l,i!=null&&(o=r(i)),a):r},a.context=function(l){return arguments.length?(l==null?i=o=null:o=r(i=l),a):i},a}function l0(t,e,n){var i=null,r=I(!0),o=null,s=Wr,a=null,l=Hr(c);t=typeof t=="function"?t:t===void 0?rl:I(+t),e=typeof e=="function"?e:I(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?ol:I(+n);function c(u){var f,d,g,p=(u=nl(u)).length,v,_=!1,x,y=new Array(p),T=new Array(p);for(o==null&&(a=s(x=l())),f=0;f<=p;++f){if(!(f<p&&r(v=u[f],f,u))===_)if(_=!_)d=f,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),g=f-1;g>=d;--g)a.point(y[g],T[g]);a.lineEnd(),a.areaEnd()}_&&(y[f]=+t(v,f,u),T[f]=+e(v,f,u),a.point(i?+i(v,f,u):y[f],n?+n(v,f,u):T[f]))}if(x)return a=null,x+""||null}function h(){return sl().defined(r).curve(s).context(o)}return c.x=function(u){return arguments.length?(t=typeof u=="function"?u:I(+u),i=null,c):t},c.x0=function(u){return arguments.length?(t=typeof u=="function"?u:I(+u),c):t},c.x1=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:I(+u),c):i},c.y=function(u){return arguments.length?(e=typeof u=="function"?u:I(+u),n=null,c):e},c.y0=function(u){return arguments.length?(e=typeof u=="function"?u:I(+u),c):e},c.y1=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:I(+u),c):n},c.lineX0=c.lineY0=function(){return h().x(t).y(e)},c.lineY1=function(){return h().x(t).y(n)},c.lineX1=function(){return h().x(i).y(e)},c.defined=function(u){return arguments.length?(r=typeof u=="function"?u:I(!!u),c):r},c.curve=function(u){return arguments.length?(s=u,o!=null&&(a=s(o)),c):s},c.context=function(u){return arguments.length?(u==null?o=a=null:a=s(o=u),c):o},c}const al={draw(t,e){const n=vt(e/Un);t.moveTo(n,0),t.arc(0,0,n,0,ci)}},c0={draw(t,e){const n=vt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},ll=vt(1/3),u0=ll*2,h0={draw(t,e){const n=vt(e/u0),i=n*ll;t.moveTo(0,-n),t.lineTo(i,0),t.lineTo(0,n),t.lineTo(-i,0),t.closePath()}},f0={draw(t,e){const n=vt(e),i=-n/2;t.rect(i,i,n,n)}},d0=.8908130915292852,cl=In(Un/10)/In(7*Un/10),p0=In(ci/10)*cl,g0=-tl(ci/10)*cl,m0={draw(t,e){const n=vt(e*d0),i=p0*n,r=g0*n;t.moveTo(0,-n),t.lineTo(i,r);for(let o=1;o<5;++o){const s=ci*o/5,a=tl(s),l=In(s);t.lineTo(l*n,-a*n),t.lineTo(a*i-l*r,l*i+a*r)}t.closePath()}},$i=vt(3),v0={draw(t,e){const n=-vt(e/($i*3));t.moveTo(0,n*2),t.lineTo(-$i*n,-n),t.lineTo($i*n,-n),t.closePath()}},at=-.5,lt=vt(3)/2,tr=1/vt(12),_0=(tr/2+1)*3,y0={draw(t,e){const n=vt(e/_0),i=n/2,r=n*tr,o=i,s=n*tr+n,a=-o,l=s;t.moveTo(i,r),t.lineTo(o,s),t.lineTo(a,l),t.lineTo(at*i-lt*r,lt*i+at*r),t.lineTo(at*o-lt*s,lt*o+at*s),t.lineTo(at*a-lt*l,lt*a+at*l),t.lineTo(at*i+lt*r,at*r-lt*i),t.lineTo(at*o+lt*s,at*s-lt*o),t.lineTo(at*a+lt*l,at*l-lt*a),t.closePath()}};function x0(t,e){let n=null,i=Hr(r);t=typeof t=="function"?t:I(t||al),e=typeof e=="function"?e:I(e===void 0?64:+e);function r(){let o;if(n||(n=o=i()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return r.type=function(o){return arguments.length?(t=typeof o=="function"?o:I(o),r):t},r.size=function(o){return arguments.length?(e=typeof o=="function"?o:I(+o),r):e},r.context=function(o){return arguments.length?(n=o??null,r):n},r}function Lt(){}function Hn(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function ui(t){this._context=t}ui.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:Hn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Hn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function b0(t){return new ui(t)}function ul(t){this._context=t}ul.prototype={areaStart:Lt,areaEnd:Lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Hn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function w0(t){return new ul(t)}function hl(t){this._context=t}hl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Hn(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function k0(t){return new hl(t)}function fl(t,e){this._basis=new ui(t),this._beta=e}fl.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i=t[0],r=e[0],o=t[n]-i,s=e[n]-r,a=-1,l;++a<=n;)l=a/n,this._basis.point(this._beta*t[a]+(1-this._beta)*(i+l*o),this._beta*e[a]+(1-this._beta)*(r+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const T0=function t(e){function n(i){return e===1?new ui(i):new fl(i,e)}return n.beta=function(i){return t(+i)},n}(.85);function Wn(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Yr(t,e){this._context=t,this._k=(1-e)/6}Yr.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:Wn(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Wn(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const S0=function t(e){function n(i){return new Yr(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Vr(t,e){this._context=t,this._k=(1-e)/6}Vr.prototype={areaStart:Lt,areaEnd:Lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Wn(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const C0=function t(e){function n(i){return new Vr(i,e)}return n.tension=function(i){return t(+i)},n}(0);function Xr(t,e){this._context=t,this._k=(1-e)/6}Xr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Wn(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const M0=function t(e){function n(i){return new Xr(i,e)}return n.tension=function(i){return t(+i)},n}(0);function qr(t,e,n){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>gs){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>gs){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function dl(t,e){this._context=t,this._alpha=e}dl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:qr(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const A0=function t(e){function n(i){return e?new dl(i,e):new Yr(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function pl(t,e){this._context=t,this._alpha=e}pl.prototype={areaStart:Lt,areaEnd:Lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:qr(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $0=function t(e){function n(i){return e?new pl(i,e):new Vr(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function gl(t,e){this._context=t,this._alpha=e}gl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:qr(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const E0=function t(e){function n(i){return e?new gl(i,e):new Xr(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function ml(t){this._context=t}ml.prototype={areaStart:Lt,areaEnd:Lt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function N0(t){return new ml(t)}function ms(t){return t<0?-1:1}function vs(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(ms(o)+ms(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function _s(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ei(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*e,o-a,s-a*n,o,s)}function Yn(t){this._context=t}Yn.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:Ei(this,this._t0,_s(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Ei(this,_s(this,n=vs(this,t,e)),n);break;default:Ei(this,this._t0,n=vs(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function vl(t){this._context=new _l(t)}(vl.prototype=Object.create(Yn.prototype)).point=function(t,e){Yn.prototype.point.call(this,e,t)};function _l(t){this._context=t}_l.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,o){this._context.bezierCurveTo(e,t,i,n,o,r)}};function O0(t){return new Yn(t)}function D0(t){return new vl(t)}function yl(t){this._context=t}yl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var i=ys(t),r=ys(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],t[s],e[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function ys(t){var e,n=t.length-1,i,r=new Array(n),o=new Array(n),s=new Array(n);for(r[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<n-1;++e)r[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(r[n-1]=2,o[n-1]=7,s[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)i=r[e]/o[e-1],o[e]-=i,s[e]-=i*s[e-1];for(r[n-1]=s[n-1]/o[n-1],e=n-2;e>=0;--e)r[e]=(s[e]-r[e+1])/o[e];for(o[n-1]=(t[n]+r[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-r[e+1];return[r,o]}function R0(t){return new yl(t)}function hi(t,e){this._context=t,this._t=e}hi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function F0(t){return new hi(t,.5)}function P0(t){return new hi(t,0)}function B0(t){return new hi(t,1)}function xs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function L0(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xs(Object(n),!0).forEach(function(i){z0(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xs(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Pe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(e){return typeof e}:Pe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(t)}function z0(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Vn(){return Vn=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Vn.apply(this,arguments)}function I0(t,e){if(t){if(typeof t=="string")return bs(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return bs(t,e)}}function bs(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function xl(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=I0(t))||e){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
115
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var l=n.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function
|
|
114
|
+
`,R0=Object.freeze(Object.defineProperty({__proto__:null,hidden:Tr,nonInteractive:El,positionFixed:$l,root:Ni,show:Sr,tooltip:D0,variables:O0},Symbol.toStringTag,{value:"Module"}));class Nl{constructor(e={}){this._defaultConfig=N0,this.config=this._defaultConfig,this._setUpEventsThrottled=Qn(this._setUpEvents,500),this._setContainerPositionThrottled=Qn(this._setContainerPosition,500),this._isShown=!1,this.element=document.createElement("div"),this.div=at(this.element).attr("class",Ni),this.setConfig(e),this.components=this.config.components,this._mutationObserver=new MutationObserver(()=>{this._isShown&&(!this.config.followCursor&&this._hoveredElement?this.placeByElement(this._hoveredElement):this._position&&this.place({x:this._position[0],y:this._position[1]}))}),this._mutationObserver.observe(this.div.node(),{childList:!0,subtree:!0})}setConfig(e){var n;this.prevConfig=this.config,this.config=xe(this._defaultConfig,e),this.prevConfig.horizontalPlacement!==this.config.horizontalPlacement&&this.overrideHorizontalPlacement(void 0),this.config.container&&this.config.container!==((n=this.prevConfig)===null||n===void 0?void 0:n.container)&&this.setContainer(this.config.container),this._setUpAttributes()}setContainer(e){var n;(n=this.element.parentNode)===null||n===void 0||n.removeChild(this.element),this._container=e,this._container.appendChild(this.element),this._setContainerPositionThrottled()}getContainer(){return this._container}hasContainer(){return!!this._container&&this._container.isConnected}setComponents(e){this.components=e}update(){this._container&&this._setUpEventsThrottled()}show(e,n){this.render(e),this.place(n)}hide(){this.div.classed(Sr,!1).on("transitionend",()=>{this.div.classed(Tr,!this._isShown)}),this._isShown=!1}display(){this.div.classed(Tr,!1).classed(Sr,!0),this._isShown=!0}place(e){if(this._position=[e.x,e.y],!this.hasContainer()){console.warn("Unovis | Tooltip: Container was not set or is not initialized yet");return}const{config:n}=this,i=this.element.offsetWidth,r=this.element.offsetHeight,o=this._overriddenHorizontalPlacement||(n.horizontalPlacement===M.Auto?M.Center:n.horizontalPlacement),s=n.verticalPlacement===M.Auto?e.y-r<0?M.Bottom:M.Top:n.verticalPlacement,a=5,l=o===M.Left?-i-a-n.horizontalShift:o===M.Center?-i/2:a+n.horizontalShift,c=s===M.Bottom?a+n.verticalShift:s===M.Center?-r/2:-5-n.verticalShift-r,[h,u]=this._constraintPosToContainer(e.x+l,e.y+c,i,r);this._applyPosition(h,u,r)}placeByElement(e){const{config:n}=this;this._hoveredElement=e;const i=5,r=this.element.offsetWidth,o=this.element.offsetHeight,s=this.isContainerBody(),a=s?window.innerWidth:this._container.scrollWidth,l=e.getBoundingClientRect(),c=s?[l.x,l.y]:Gn({clientX:l.x,clientY:l.y,pageX:l.x,pageY:l.y},this._container),h=this._overriddenHorizontalPlacement||(n.horizontalPlacement===M.Auto?c[0]-r<0?M.Right:c[0]+r>a?M.Left:M.Center:n.horizontalPlacement);let u=0;switch(h){case M.Left:u=-r-i-n.horizontalShift;break;case M.Right:u=l.width+i+n.horizontalShift;break;case M.Center:default:u=(-r+l.width)/2;break}const f=n.verticalPlacement===M.Auto?h!==M.Center?M.Center:c[1]-o<0?M.Bottom:M.Top:n.verticalPlacement;let g=-o;switch(f){case M.Center:g+=(o+l.height)/2;break;case M.Bottom:g+=o+l.height+i+n.verticalShift;break;case M.Top:default:g+=-5-n.verticalShift;break}const[m,p]=this._constraintPosToContainer(c[0]+u,c[1]+g,r,o);this._applyPosition(m,p,o)}isContainerBody(){return this._container===document.body}overrideHorizontalPlacement(e){this._overriddenHorizontalPlacement=e}render(e){var n;const{config:i,prevConfig:r}=this;e instanceof HTMLElement?this.div.select(":first-child").node()!==e&&this.div.html("").append(()=>e):e&&this.div.html(e),this.div.classed((n=i.className)!==null&&n!==void 0?n:"",!!i.className).classed(El,!i.allowHover||i.followCursor),r!=null&&r.className&&r.className!==i.className&&this.div.classed(r.className,!1),this.display()}_applyPosition(e,n,i){const r=this.isContainerBody(),o=r?window.innerHeight:this._container.scrollHeight;this.div.classed($l,r).style("top",r?`${n}px`:"unset").style("bottom",r?"unset":`${o-n-i}px`).style("left",`${e}px`)}_constraintPosToContainer(e,n,i,r){const o=this.isContainerBody(),s=o?window.innerHeight:this._container.scrollHeight,a=o?window.innerWidth:this._container.scrollWidth,l=10,c=e>a-i-l,h=e<l,u=c?a-i-l:h?l:e,f=10,g=n>s-r-f,m=n<f,p=g?s-r-f:m?f:n;return[a<i?0:u,s<r?0:p]}_setContainerPosition(){var e;this._container!==document.body&&((e=getComputedStyle(this._container))===null||e===void 0?void 0:e.position)==="static"&&(this._container.style.position="relative")}_setUpEvents(){const{config:e}=this;this.components.forEach(n=>{const i=at(n.element);i.on("mousemove.tooltip",r=>{const o=r.composedPath&&r.composedPath()||r.path||[r.target];for(const s of Object.keys(e.triggers)){const a=e.triggers[s];if(!a)continue;const l=i.selectAll(`.${s}`).nodes();for(const c of o){if(c===i.node())break;if(c.classList.contains(s)){const h=l.indexOf(c),u=at(c).datum(),f=a(u,h,l),[g,m]=this.isContainerBody()?[r.clientX,r.clientY]:Gn(r,this._container);f===null?this.hide():(this.render(f),e.followCursor?this.place({x:g,y:m}):this.placeByElement(c)),r.stopPropagation();return}}}this._isShown&&this.hide()}).on("mouseleave.tooltip",r=>{r.stopPropagation(),this.hide()})}),e.allowHover&&!e.followCursor?this.div.on("mouseenter.tooltip",this.display.bind(this)).on("mouseleave.tooltip",this.hide.bind(this)):this.div.on("mouseenter.tooltip",null).on("mouseleave.tooltip",null)}_setUpAttributes(){const e=this.config.attributes;e&&Object.keys(e).forEach(n=>{this.div.attr(n,e[n])})}destroy(){var e;this._mutationObserver.disconnect(),(e=this.div)===null||e===void 0||e.remove()}}Nl.selectors=R0;function B(t){return function(){return t}}const Ws=Math.abs,it=Math.atan2,Ut=Math.cos,L0=Math.max,er=Math.min,ft=Math.sin,tt=Math.sqrt,ot=1e-12,se=Math.PI,hi=se/2,oe=2*se;function B0(t){return t>1?0:t<-1?se:Math.acos(t)}function Ys(t){return t>=1?hi:t<=-1?-hi:Math.asin(t)}const Cr=Math.PI,Ar=2*Cr,fe=1e-6,F0=Ar-fe;function Dl(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function P0(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Dl;const n=10**e;return function(i){this._+=i[0];for(let r=1,o=i.length;r<o;++r)this._+=Math.round(arguments[r]*n)/n+i[r]}}class z0{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Dl:P0(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,i,r){this._append`Q${+e},${+n},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(e,n,i,r,o,s){this._append`C${+e},${+n},${+i},${+r},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,i,r,o){if(e=+e,n=+n,i=+i,r=+r,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=i-e,c=r-n,h=s-e,u=a-n,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>fe)if(!(Math.abs(u*l-c*h)>fe)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let g=i-s,m=r-a,p=l*l+c*c,v=g*g+m*m,y=Math.sqrt(p),x=Math.sqrt(f),_=o*Math.tan((Cr-Math.acos((p+f-v)/(2*y*x)))/2),w=_/x,k=_/y;Math.abs(w-1)>fe&&this._append`L${e+w*h},${n+w*u}`,this._append`A${o},${o},0,0,${+(u*g>h*m)},${this._x1=e+k*l},${this._y1=n+k*c}`}}arc(e,n,i,r,o,s){if(e=+e,n=+n,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(r),l=i*Math.sin(r),c=e+a,h=n+l,u=1^s,f=s?r-o:o-r;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>fe||Math.abs(this._y1-h)>fe)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Ar+Ar),f>F0?this._append`A${i},${i},0,1,${u},${e-a},${n-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>fe&&this._append`A${i},${i},0,${+(f>=Cr)},${u},${this._x1=e+i*Math.cos(o)},${this._y1=n+i*Math.sin(o)}`)}rect(e,n,i,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function Di(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);e=i}return t},()=>new z0(e)}function I0(t){return t.innerRadius}function V0(t){return t.outerRadius}function H0(t){return t.startAngle}function U0(t){return t.endAngle}function W0(t){return t&&t.padAngle}function Y0(t,e,n,i,r,o,s,a){var l=n-t,c=i-e,h=s-r,u=a-o,f=u*l-h*c;if(!(f*f<ot))return f=(h*(e-o)-u*(t-r))/f,[t+f*l,e+f*c]}function En(t,e,n,i,r,o,s){var a=t-n,l=e-i,c=(s?o:-o)/tt(a*a+l*l),h=c*l,u=-c*a,f=t+h,g=e+u,m=n+h,p=i+u,v=(f+m)/2,y=(g+p)/2,x=m-f,_=p-g,w=x*x+_*_,k=r-o,b=f*p-m*g,T=(_<0?-1:1)*tt(L0(0,k*k*w-b*b)),R=(b*_-x*T)/w,E=(-b*x-_*T)/w,U=(b*_+x*T)/w,$=(-b*x+_*T)/w,F=R-v,C=E-y,D=U-v,et=$-y;return F*F+C*C>D*D+et*et&&(R=U,E=$),{cx:R,cy:E,x01:-h,y01:-u,x11:R*(r/k-1),y11:E*(r/k-1)}}function X0(){var t=I0,e=V0,n=B(0),i=null,r=H0,o=U0,s=W0,a=null,l=Di(c);function c(){var h,u,f=+t.apply(this,arguments),g=+e.apply(this,arguments),m=r.apply(this,arguments)-hi,p=o.apply(this,arguments)-hi,v=Ws(p-m),y=p>m;if(a||(a=h=l()),g<f&&(u=g,g=f,f=u),!(g>ot))a.moveTo(0,0);else if(v>oe-ot)a.moveTo(g*Ut(m),g*ft(m)),a.arc(0,0,g,m,p,!y),f>ot&&(a.moveTo(f*Ut(p),f*ft(p)),a.arc(0,0,f,p,m,y));else{var x=m,_=p,w=m,k=p,b=v,T=v,R=s.apply(this,arguments)/2,E=R>ot&&(i?+i.apply(this,arguments):tt(f*f+g*g)),U=er(Ws(g-f)/2,+n.apply(this,arguments)),$=U,F=U,C,D;if(E>ot){var et=Ys(E/f*ft(R)),lt=Ys(E/g*ft(R));(b-=et*2)>ot?(et*=y?1:-1,w+=et,k-=et):(b=0,w=k=(m+p)/2),(T-=lt*2)>ot?(lt*=y?1:-1,x+=lt,_-=lt):(T=0,x=_=(m+p)/2)}var nt=g*Ut(x),ct=g*ft(x),Q=f*Ut(k),Dt=f*ft(k);if(U>ot){var Kt=g*Ut(_),Vt=g*ft(_),te=f*Ut(w),ue=f*ft(w),ut;if(v<se)if(ut=Y0(nt,ct,te,ue,Kt,Vt,Q,Dt)){var ee=nt-ut[0],N=ct-ut[1],st=Kt-ut[0],A=Vt-ut[1],L=1/ft(B0((ee*st+N*A)/(tt(ee*ee+N*N)*tt(st*st+A*A)))/2),P=tt(ut[0]*ut[0]+ut[1]*ut[1]);$=er(U,(f-P)/(L-1)),F=er(U,(g-P)/(L+1))}else $=F=0}T>ot?F>ot?(C=En(te,ue,nt,ct,g,F,y),D=En(Kt,Vt,Q,Dt,g,F,y),a.moveTo(C.cx+C.x01,C.cy+C.y01),F<U?a.arc(C.cx,C.cy,F,it(C.y01,C.x01),it(D.y01,D.x01),!y):(a.arc(C.cx,C.cy,F,it(C.y01,C.x01),it(C.y11,C.x11),!y),a.arc(0,0,g,it(C.cy+C.y11,C.cx+C.x11),it(D.cy+D.y11,D.cx+D.x11),!y),a.arc(D.cx,D.cy,F,it(D.y11,D.x11),it(D.y01,D.x01),!y))):(a.moveTo(nt,ct),a.arc(0,0,g,x,_,!y)):a.moveTo(nt,ct),!(f>ot)||!(b>ot)?a.lineTo(Q,Dt):$>ot?(C=En(Q,Dt,Kt,Vt,f,-$,y),D=En(nt,ct,te,ue,f,-$,y),a.lineTo(C.cx+C.x01,C.cy+C.y01),$<U?a.arc(C.cx,C.cy,$,it(C.y01,C.x01),it(D.y01,D.x01),!y):(a.arc(C.cx,C.cy,$,it(C.y01,C.x01),it(C.y11,C.x11),!y),a.arc(0,0,f,it(C.cy+C.y11,C.cx+C.x11),it(D.cy+D.y11,D.cx+D.x11),y),a.arc(D.cx,D.cy,$,it(D.y11,D.x11),it(D.y01,D.x01),!y))):a.arc(0,0,f,k,w,y)}if(a.closePath(),h)return a=null,h+""||null}return c.centroid=function(){var h=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,u=(+r.apply(this,arguments)+ +o.apply(this,arguments))/2-se/2;return[Ut(u)*h,ft(u)*h]},c.innerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:B(+h),c):t},c.outerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:B(+h),c):e},c.cornerRadius=function(h){return arguments.length?(n=typeof h=="function"?h:B(+h),c):n},c.padRadius=function(h){return arguments.length?(i=h==null?null:typeof h=="function"?h:B(+h),c):i},c.startAngle=function(h){return arguments.length?(r=typeof h=="function"?h:B(+h),c):r},c.endAngle=function(h){return arguments.length?(o=typeof h=="function"?h:B(+h),c):o},c.padAngle=function(h){return arguments.length?(s=typeof h=="function"?h:B(+h),c):s},c.context=function(h){return arguments.length?(a=h??null,c):a},c}function xo(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Ol(t){this._context=t}Ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function bo(t){return new Ol(t)}function Rl(t){return t[0]}function Ll(t){return t[1]}function Bl(t,e){var n=B(!0),i=null,r=bo,o=null,s=Di(a);t=typeof t=="function"?t:t===void 0?Rl:B(t),e=typeof e=="function"?e:e===void 0?Ll:B(e);function a(l){var c,h=(l=xo(l)).length,u,f=!1,g;for(i==null&&(o=r(g=s())),c=0;c<=h;++c)!(c<h&&n(u=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,c,l),+e(u,c,l));if(g)return o=null,g+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:B(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:B(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:B(!!l),a):n},a.curve=function(l){return arguments.length?(r=l,i!=null&&(o=r(i)),a):r},a.context=function(l){return arguments.length?(l==null?i=o=null:o=r(i=l),a):i},a}function G0(t,e,n){var i=null,r=B(!0),o=null,s=bo,a=null,l=Di(c);t=typeof t=="function"?t:t===void 0?Rl:B(+t),e=typeof e=="function"?e:B(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?Ll:B(+n);function c(u){var f,g,m,p=(u=xo(u)).length,v,y=!1,x,_=new Array(p),w=new Array(p);for(o==null&&(a=s(x=l())),f=0;f<=p;++f){if(!(f<p&&r(v=u[f],f,u))===y)if(y=!y)g=f,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),m=f-1;m>=g;--m)a.point(_[m],w[m]);a.lineEnd(),a.areaEnd()}y&&(_[f]=+t(v,f,u),w[f]=+e(v,f,u),a.point(i?+i(v,f,u):_[f],n?+n(v,f,u):w[f]))}if(x)return a=null,x+""||null}function h(){return Bl().defined(r).curve(s).context(o)}return c.x=function(u){return arguments.length?(t=typeof u=="function"?u:B(+u),i=null,c):t},c.x0=function(u){return arguments.length?(t=typeof u=="function"?u:B(+u),c):t},c.x1=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:B(+u),c):i},c.y=function(u){return arguments.length?(e=typeof u=="function"?u:B(+u),n=null,c):e},c.y0=function(u){return arguments.length?(e=typeof u=="function"?u:B(+u),c):e},c.y1=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:B(+u),c):n},c.lineX0=c.lineY0=function(){return h().x(t).y(e)},c.lineY1=function(){return h().x(t).y(n)},c.lineX1=function(){return h().x(i).y(e)},c.defined=function(u){return arguments.length?(r=typeof u=="function"?u:B(!!u),c):r},c.curve=function(u){return arguments.length?(s=u,o!=null&&(a=s(o)),c):s},c.context=function(u){return arguments.length?(u==null?o=a=null:a=s(o=u),c):o},c}function q0(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function j0(t){return t}function Z0(){var t=j0,e=q0,n=null,i=B(0),r=B(oe),o=B(0);function s(a){var l,c=(a=xo(a)).length,h,u,f=0,g=new Array(c),m=new Array(c),p=+i.apply(this,arguments),v=Math.min(oe,Math.max(-oe,r.apply(this,arguments)-p)),y,x=Math.min(Math.abs(v)/c,o.apply(this,arguments)),_=x*(v<0?-1:1),w;for(l=0;l<c;++l)(w=m[g[l]=l]=+t(a[l],l,a))>0&&(f+=w);for(e!=null?g.sort(function(k,b){return e(m[k],m[b])}):n!=null&&g.sort(function(k,b){return n(a[k],a[b])}),l=0,u=f?(v-c*_)/f:0;l<c;++l,p=y)h=g[l],w=m[h],y=p+(w>0?w*u:0)+_,m[h]={data:a[h],index:l,value:w,startAngle:p,endAngle:y,padAngle:x};return m}return s.value=function(a){return arguments.length?(t=typeof a=="function"?a:B(+a),s):t},s.sortValues=function(a){return arguments.length?(e=a,n=null,s):e},s.sort=function(a){return arguments.length?(n=a,e=null,s):n},s.startAngle=function(a){return arguments.length?(i=typeof a=="function"?a:B(+a),s):i},s.endAngle=function(a){return arguments.length?(r=typeof a=="function"?a:B(+a),s):r},s.padAngle=function(a){return arguments.length?(o=typeof a=="function"?a:B(+a),s):o},s}const Fl={draw(t,e){const n=tt(e/se);t.moveTo(n,0),t.arc(0,0,n,0,oe)}},Q0={draw(t,e){const n=tt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Pl=tt(1/3),J0=Pl*2,K0={draw(t,e){const n=tt(e/J0),i=n*Pl;t.moveTo(0,-n),t.lineTo(i,0),t.lineTo(0,n),t.lineTo(-i,0),t.closePath()}},tm={draw(t,e){const n=tt(e),i=-n/2;t.rect(i,i,n,n)}},em=.8908130915292852,zl=ft(se/10)/ft(7*se/10),nm=ft(oe/10)*zl,im=-Ut(oe/10)*zl,rm={draw(t,e){const n=tt(e*em),i=nm*n,r=im*n;t.moveTo(0,-n),t.lineTo(i,r);for(let o=1;o<5;++o){const s=oe*o/5,a=Ut(s),l=ft(s);t.lineTo(l*n,-a*n),t.lineTo(a*i-l*r,l*i+a*r)}t.closePath()}},nr=tt(3),om={draw(t,e){const n=-tt(e/(nr*3));t.moveTo(0,n*2),t.lineTo(-nr*n,-n),t.lineTo(nr*n,-n),t.closePath()}},kt=-.5,St=tt(3)/2,Mr=1/tt(12),sm=(Mr/2+1)*3,am={draw(t,e){const n=tt(e/sm),i=n/2,r=n*Mr,o=i,s=n*Mr+n,a=-o,l=s;t.moveTo(i,r),t.lineTo(o,s),t.lineTo(a,l),t.lineTo(kt*i-St*r,St*i+kt*r),t.lineTo(kt*o-St*s,St*o+kt*s),t.lineTo(kt*a-St*l,St*a+kt*l),t.lineTo(kt*i+St*r,kt*r-St*i),t.lineTo(kt*o+St*s,kt*s-St*o),t.lineTo(kt*a+St*l,kt*l-St*a),t.closePath()}};function lm(t,e){let n=null,i=Di(r);t=typeof t=="function"?t:B(t||Fl),e=typeof e=="function"?e:B(e===void 0?64:+e);function r(){let o;if(n||(n=o=i()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),o)return n=null,o+""||null}return r.type=function(o){return arguments.length?(t=typeof o=="function"?o:B(o),r):t},r.size=function(o){return arguments.length?(e=typeof o=="function"?o:B(+o),r):e},r.context=function(o){return arguments.length?(n=o??null,r):n},r}function ae(){}function fi(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Oi(t){this._context=t}Oi.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:fi(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:fi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function cm(t){return new Oi(t)}function Il(t){this._context=t}Il.prototype={areaStart:ae,areaEnd:ae,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:fi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function um(t){return new Il(t)}function Vl(t){this._context=t}Vl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:fi(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function hm(t){return new Vl(t)}function Hl(t,e){this._basis=new Oi(t),this._beta=e}Hl.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i=t[0],r=e[0],o=t[n]-i,s=e[n]-r,a=-1,l;++a<=n;)l=a/n,this._basis.point(this._beta*t[a]+(1-this._beta)*(i+l*o),this._beta*e[a]+(1-this._beta)*(r+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const fm=function t(e){function n(i){return e===1?new Oi(i):new Hl(i,e)}return n.beta=function(i){return t(+i)},n}(.85);function di(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function wo(t,e){this._context=t,this._k=(1-e)/6}wo.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:di(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:di(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const dm=function t(e){function n(i){return new wo(i,e)}return n.tension=function(i){return t(+i)},n}(0);function ko(t,e){this._context=t,this._k=(1-e)/6}ko.prototype={areaStart:ae,areaEnd:ae,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:di(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const gm=function t(e){function n(i){return new ko(i,e)}return n.tension=function(i){return t(+i)},n}(0);function So(t,e){this._context=t,this._k=(1-e)/6}So.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:di(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const pm=function t(e){function n(i){return new So(i,e)}return n.tension=function(i){return t(+i)},n}(0);function To(t,e,n){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>ot){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>ot){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function Ul(t,e){this._context=t,this._alpha=e}Ul.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:To(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const mm=function t(e){function n(i){return e?new Ul(i,e):new wo(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Wl(t,e){this._context=t,this._alpha=e}Wl.prototype={areaStart:ae,areaEnd:ae,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:To(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const vm=function t(e){function n(i){return e?new Wl(i,e):new ko(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Yl(t,e){this._context=t,this._alpha=e}Yl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:To(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const _m=function t(e){function n(i){return e?new Yl(i,e):new So(i,0)}return n.alpha=function(i){return t(+i)},n}(.5);function Xl(t){this._context=t}Xl.prototype={areaStart:ae,areaEnd:ae,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function ym(t){return new Xl(t)}function Xs(t){return t<0?-1:1}function Gs(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(Xs(o)+Xs(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function qs(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ir(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*e,o-a,s-a*n,o,s)}function gi(t){this._context=t}gi.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:ir(this,this._t0,qs(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ir(this,qs(this,n=Gs(this,t,e)),n);break;default:ir(this,this._t0,n=Gs(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Gl(t){this._context=new ql(t)}(Gl.prototype=Object.create(gi.prototype)).point=function(t,e){gi.prototype.point.call(this,e,t)};function ql(t){this._context=t}ql.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,o){this._context.bezierCurveTo(e,t,i,n,o,r)}};function xm(t){return new gi(t)}function bm(t){return new Gl(t)}function jl(t){this._context=t}jl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var i=js(t),r=js(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],t[s],e[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function js(t){var e,n=t.length-1,i,r=new Array(n),o=new Array(n),s=new Array(n);for(r[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<n-1;++e)r[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(r[n-1]=2,o[n-1]=7,s[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)i=r[e]/o[e-1],o[e]-=i,s[e]-=i*s[e-1];for(r[n-1]=s[n-1]/o[n-1],e=n-2;e>=0;--e)r[e]=(s[e]-r[e+1])/o[e];for(o[n-1]=(t[n]+r[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-r[e+1];return[r,o]}function wm(t){return new jl(t)}function Ri(t,e){this._context=t,this._t=e}Ri.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function km(t){return new Ri(t,.5)}function Sm(t){return new Ri(t,0)}function Tm(t){return new Ri(t,1)}function Zs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function Cm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zs(Object(n),!0).forEach(function(i){Am(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zs(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function on(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?on=function(e){return typeof e}:on=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},on(t)}function Am(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pi(){return pi=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},pi.apply(this,arguments)}function Mm(t,e){if(t){if(typeof t=="string")return Qs(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qs(t,e)}}function Qs(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Zl(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Mm(t))||e){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
115
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var l=n.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function $m(t,e){var n=[],i=[];function r(o,s){if(o.length===1)n.push(o[0]),i.push(o[0]);else{for(var a=Array(o.length-1),l=0;l<a.length;l++)l===0&&n.push(o[0]),l===a.length-1&&i.push(o[l+1]),a[l]=[(1-s)*o[l][0]+s*o[l+1][0],(1-s)*o[l][1]+s*o[l+1][1]];r(a,s)}}return t.length&&r(t,e),{left:n,right:i.reverse()}}function Em(t){var e={};return t.length===4&&(e.x2=t[2][0],e.y2=t[2][1]),t.length>=3&&(e.x1=t[1][0],e.y1=t[1][1]),e.x=t[t.length-1][0],e.y=t[t.length-1][1],t.length===4?e.type="C":t.length===3?e.type="Q":e.type="L",e}function Nm(t,e){e=e||2;for(var n=[],i=t,r=1/e,o=0;o<e-1;o++){var s=r/(1-r*o),a=$m(i,s);n.push(a.left),i=a.right}return n.push(i),n}function Dm(t,e,n){var i=[[t.x,t.y]];return e.x1!=null&&i.push([e.x1,e.y1]),e.x2!=null&&i.push([e.x2,e.y2]),i.push([e.x,e.y]),Nm(i,n).map(Em)}var Om=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,Ne={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(Ne).forEach(function(t){Ne[t.toLowerCase()]=Ne[t]});function $r(t,e){for(var n=Array(t),i=0;i<t;i++)n[i]=e;return n}function Rm(t){return"".concat(t.type).concat(Ne[t.type].map(function(e){return t[e]}).join(","))}function Lm(t,e){var n={x1:"x",y1:"y",x2:"x",y2:"y"},i=["xAxisRotation","largeArcFlag","sweepFlag"];if(t.type!==e.type&&e.type.toUpperCase()!=="M"){var r={};Object.keys(e).forEach(function(o){var s=e[o],a=t[o];a===void 0&&(i.includes(o)?a=s:(a===void 0&&n[o]&&(a=t[n[o]]),a===void 0&&(a=0))),r[o]=a}),r.type=e.type,t=r}return t}function Bm(t,e,n){var i=[];if(e.type==="L"||e.type==="Q"||e.type==="C")i=i.concat(Dm(t,e,n));else{var r=pi({},t);r.type==="M"&&(r.type="L"),i=i.concat($r(n-1).map(function(){return r})),i.push(e)}return i}function Js(t,e,n){var i=t.length-1,r=e.length-1,o=i/r,s=$r(r).reduce(function(l,c,h){var u=Math.floor(o*h);if(n&&u<t.length-1&&n(t[u],t[u+1])){var f=o*h%1<.5;l[u]&&(f?u>0?u-=1:u<t.length-1&&(u+=1):u<t.length-1?u+=1:u>0&&(u-=1))}return l[u]=(l[u]||0)+1,l},[]),a=s.reduce(function(l,c,h){if(h===t.length-1){var u=$r(c,pi({},t[t.length-1]));return u[0].type==="M"&&u.forEach(function(f){f.type="L"}),l.concat(u)}return l.concat(Bm(t[h],t[h+1],c))},[]);return a.unshift(t[0]),a}function Ks(t){for(var e=(t||"").match(Om)||[],n=[],i,r,o=0;o<e.length;++o)if(i=Ne[e[o]],i){r={type:e[o]};for(var s=0;s<i.length;++s)r[i[s]]=+e[o+s+1];o+=i.length,n.push(r)}return n}function Fm(t,e,n){var i=t==null?[]:t.slice(),r=e==null?[]:e.slice(),o=on(n)==="object"?n:{excludeSegment:n,snapEndsToInput:!0},s=o.excludeSegment,a=o.snapEndsToInput;if(!i.length&&!r.length)return function(){return[]};var l=(i.length===0||i[i.length-1].type==="Z")&&(r.length===0||r[r.length-1].type==="Z");i.length>0&&i[i.length-1].type==="Z"&&i.pop(),r.length>0&&r[r.length-1].type==="Z"&&r.pop(),i.length?r.length||r.push(i[0]):i.push(r[0]);var c=Math.abs(r.length-i.length);c!==0&&(r.length>i.length?i=Js(i,r,s):r.length<i.length&&(r=Js(r,i,s))),i=i.map(function(u,f){return Lm(u,r[f])});var h=i.map(function(u){return Cm({},u)});return l&&(h.push({type:"Z"}),i.push({type:"Z"})),function(f){if(f===1&&a)return e??[];if(f===0)return i;for(var g=0;g<h.length;++g){var m=i[g],p=r[g],v=h[g],y=Zl(Ne[v.type]),x;try{for(y.s();!(x=y.n()).done;){var _=x.value;v[_]=(1-f)*m[_]+f*p[_],(_==="largeArcFlag"||_==="sweepFlag")&&(v[_]=Math.round(v[_]))}}catch(w){y.e(w)}finally{y.f()}}return h}}function Ql(t,e,n){var i=Ks(t),r=Ks(e),o=on(n)==="object"?n:{excludeSegment:n,snapEndsToInput:!0},s=o.excludeSegment,a=o.snapEndsToInput;if(!i.length&&!r.length)return function(){return""};var l=Fm(i,r,{excludeSegment:s,snapEndsToInput:a});return function(h){if(h===1&&a)return e??"";var u=l(h),f="",g=Zl(u),m;try{for(g.s();!(m=g.n()).done;){var p=m.value;f+=Rm(p)}}catch(v){g.e(v)}finally{g.f()}return f}}function pt(t,e,n,i){return Array.isArray(e)&&isFinite(n)?e[n%e.length]:Oe(t,e,n)||(xt(n)?`var(${ne(n)})`:null)}var W;(function(t){t.Basis="basis",t.BasisClosed="basisClosed",t.BasisOpen="basisOpen",t.Bundle="bundle",t.Cardinal="cardinal",t.CardinalClosed="cardinalClosed",t.CardinalOpen="cardinalOpen",t.CatmullRom="catmullRom",t.CatmullRomClosed="catmullRomClosed",t.CatmullRomOpen="catmullRomOpen",t.Linear="linear",t.LinearClosed="linearClosed",t.MonotoneX="monotoneX",t.MonotoneY="monotoneY",t.Natural="natural",t.Step="step",t.StepAfter="stepAfter",t.StepBefore="stepBefore"})(W||(W={}));const Er={[W.Basis]:cm,[W.BasisClosed]:um,[W.BasisOpen]:hm,[W.Bundle]:fm,[W.Cardinal]:dm,[W.CardinalClosed]:gm,[W.CardinalOpen]:pm,[W.CatmullRom]:mm,[W.CatmullRomClosed]:vm,[W.CatmullRomOpen]:_m,[W.Linear]:bo,[W.LinearClosed]:ym,[W.MonotoneX]:xm,[W.MonotoneY]:bm,[W.Natural]:wm,[W.Step]:km,[W.StepAfter]:Tm,[W.StepBefore]:Sm},Pm=Object.assign(Object.assign({},Ve),{curveType:W.MonotoneX,lineWidth:2,lineDashArray:void 0,fallbackValue:void 0,highlightOnHover:!1,cursor:null,interpolateMissingData:!1}),zm=Jt`
|
|
116
116
|
:root {
|
|
117
117
|
--vis-line-cursor: default;
|
|
118
118
|
--vis-line-stroke-dasharray: none;
|
|
@@ -122,35 +122,69 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
122
122
|
--vis-line-gapfill-stroke-opacity: 0.8;
|
|
123
123
|
--vis-line-gapfill-stroke-dashoffset: 0;
|
|
124
124
|
}
|
|
125
|
-
`,
|
|
125
|
+
`,Im=O`
|
|
126
126
|
label: line-component;
|
|
127
|
-
`,
|
|
127
|
+
`,Je=O`
|
|
128
128
|
label: line;
|
|
129
129
|
transition: opacity 200ms;
|
|
130
130
|
cursor: var(--vis-line-cursor);
|
|
131
|
-
`,
|
|
131
|
+
`,Nr=O`
|
|
132
132
|
label: linePath;
|
|
133
133
|
fill: none;
|
|
134
134
|
stroke-dasharray: var(--vis-line-stroke-dasharray);
|
|
135
135
|
stroke-dashoffset: var(--vis-line-stroke-dashoffset);
|
|
136
|
-
`,
|
|
136
|
+
`,Dr=O`
|
|
137
137
|
label: lineSelectionHelper;
|
|
138
138
|
fill: none;
|
|
139
139
|
stroke: rgba(0, 0, 0, 0);
|
|
140
140
|
stroke-width: 8px;
|
|
141
|
-
`,
|
|
141
|
+
`,Or=O`
|
|
142
142
|
opacity: 0.2;
|
|
143
|
-
`,
|
|
143
|
+
`,Rr=O`
|
|
144
144
|
label: interpolated-path;
|
|
145
145
|
fill: none;
|
|
146
146
|
stroke-dasharray: var(--vis-line-gapfill-stroke-dasharray);
|
|
147
147
|
stroke-dashoffset: var(--vis-line-gapfill-stroke-dashoffset);
|
|
148
148
|
stroke-opacity: var(--vis-line-gapfill-stroke-opacity);
|
|
149
|
-
`,
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
`,Vm=Object.freeze(Object.defineProperty({__proto__:null,dim:Or,globalStyles:zm,interpolatedPath:Rr,line:Je,linePath:Nr,lineSelectionHelper:Dr,root:Im},Symbol.toStringTag,{value:"Module"}));class Li extends xn{constructor(e){super(),this._defaultConfig=Pm,this.config=this._defaultConfig,this.curve=Er[W.MonotoneX],this.events={[Li.selectors.line]:{mouseover:this._highlight.bind(this),mouseleave:this._resetHighlight.bind(this)}},e&&this.setConfig(e)}get bleed(){const{config:{lineWidth:e}}=this,n=this.yScale.domain(),r=(this.yScale.range()[0]>this.yScale.range()[1]?$t.North:$t.South)===$t.South,o=e>3,s=e>=10;return{top:!s&&(!r&&n[1]===0||r&&n[0]===0)?0:e/2,bottom:!s&&(!r&&n[0]===0||r&&n[1]===0)?0:e/2,left:o?e/2:0,right:o?e/2:0}}_render(e){super._render(e);const{config:n,datamodel:{data:i}}=this,r=xt(e)?e:n.duration;this.curve=Er[n.curveType],this.lineGen=Bl().x(u=>u.x).y(u=>u.y).defined(u=>u.defined).curve(this.curve);const o=Gt(n.y)?n.y:[n.y],s=i.map((u,f)=>this.xScale(X(u,n.x,f))),a=o.map(u=>{const f=i.map((y,x)=>{const _=X(y,u,x),w=(xt(_)||_===null)&&isFinite(_)?_:n.fallbackValue,k=n.interpolateMissingData?(xt(_)||_===null)&&isFinite(_):isFinite(w);return{x:s[x],y:this.yScale(w??0),defined:k,value:w}}),g=f.reduce((y,x)=>x.defined||y,!1);let m=!1;const p=f.reduce((y,x,_)=>{!x.defined&&isFinite(n.fallbackValue)&&y.push(Object.assign(Object.assign({},x),{defined:!0})),!x.defined&&!m&&(m=!0);const w=_>0&&!f[_-1].defined||_<f.length-1&&!f[_+1].defined;return x.defined&&w&&(m||y.push(Object.assign(Object.assign({},x),{defined:!1})),y.push(x),m=!1),y},[]),v=g&&f.some(y=>y.value!==null);return{values:f,defined:g,gaps:p,visible:v}}),l=this.g.selectAll(`.${Je}`).data(a),c=l.enter().append("g").attr("class",Je);c.append("path").attr("class",Nr).attr("stroke",(u,f)=>pt(i,n.color,f)).attr("stroke-opacity",0).attr("stroke-width",n.lineWidth),c.append("path").attr("class",Dr).attr("d",this._emptyPath()),c.append("path").attr("class",Rr).attr("d",this._emptyPath()).style("opacity",0);const h=c.merge(l);h.style("cursor",(u,f)=>Oe(i,n.cursor,f)),h.each((u,f,g)=>{var m;const p=at(g[f]),v=p.select(`.${Nr}`),y=p.select(`.${Dr}`),x=p.select(`.${Rr}`),_=u.visible,w=Yr(i,n.lineDashArray,f),k=q(v,r).attr("stroke",pt(i,n.color,f)).attr("stroke-width",n.lineWidth).attr("stroke-opacity",_?1:0).style("stroke-dasharray",(m=w==null?void 0:w.join(" "))!==null&&m!==void 0?m:null),b=u.values.some(R=>!R.defined),T=this.lineGen(u.values);if(r&&!b){const R=v.attr("d")||this._emptyPath(),E=T||this._emptyPath();k.attrTween("d",()=>Ql(R,E))}else u.visible&&k.attr("d",T);y.attr("d",T).attr("visibility",_?null:"hidden"),b&&n.interpolateMissingData?q(x,r).attr("d",this.lineGen(u.gaps)).attr("stroke",pt(i,n.color,f)).attr("stroke-width",n.lineWidth-1).style("opacity",1):x.transition().duration(r).style("opacity",0)}),q(l.exit(),r).style("opacity",0).remove()}_emptyPath(){const e=this.xScale.range(),n=this.yScale.range();return`M${e[0]},${n[0]} L${e[1]},${n[0]}`}_highlight(e){const{config:n}=this;n.highlightOnHover&&this.g.selectAll(`.${Je}`).classed(Or,i=>i!==e)}_resetHighlight(){const{config:e}=this;e.highlightOnHover&&this.g.selectAll(`.${Je}`).classed(Or,!1)}}Li.selectors=Vm;function Hm({x:t,y:e,w:n,h:i,tl:r=!1,tr:o=!1,bl:s=!1,br:a=!1,r:l=0}){let c;c=`M${t+l},${e}h${n-2*l}`;let h=o?l:0,u=o?0:l;return c+=`a${h},${h} 0 0 1 ${h},${h}`,c+=`h${u}v${u}`,c+=`v${i-2*l}`,h=a?l:0,u=a?0:l,c+=`a${h},${h} 0 0 1 ${-h},${h}`,c+=`v${u}h${-u}`,c+=`h${2*l-n}`,h=s?l:0,u=s?0:l,c+=`a${h},${h} 0 0 1 ${-h},${-h}`,c+=`h${-u}v${-u}`,c+=`v${2*l-i}`,h=r?l:0,u=r?0:l,c+=`a${h},${h} 0 0 1 ${h},${-h}`,c+=`v${-u}h${u}`,c+="z",c}const Um=Object.assign(Object.assign({},Ve),{color:void 0,groupMaxWidth:void 0,groupWidth:void 0,dataStep:void 0,groupPadding:.05,barPadding:0,roundedCorners:2,barMinHeight:2,cursor:null,orientation:ui.Vertical}),Jl=O`
|
|
150
|
+
label: grouped-bar-component;
|
|
151
|
+
`,Wm=Jt`
|
|
152
|
+
:root {
|
|
153
|
+
--vis-grouped-bar-cursor: default;
|
|
154
|
+
--vis-grouped-bar-fill-color: var(--vis-color-main);
|
|
155
|
+
--vis-grouped-bar-stroke-color: none;
|
|
156
|
+
--vis-grouped-bar-stroke-width: 0px;
|
|
157
|
+
--vis-grouped-bar-hover-stroke-width: 1px;
|
|
158
|
+
--vis-grouped-bar-hover-stroke-color: none;
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
/* Dark Theme */
|
|
162
|
+
--vis-dark-grouped-bar-stroke-color: none;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
body.theme-dark ${`.${Jl}`} {
|
|
166
|
+
--vis-grouped-bar-stroke-color: var(--vis-dark-grouped-bar-stroke-color);
|
|
167
|
+
}
|
|
168
|
+
`,zn=O`
|
|
169
|
+
label: bar;
|
|
170
|
+
fill: var(--vis-grouped-bar-fill-color);
|
|
171
|
+
stroke: var(--vis-grouped-bar-stroke-color);
|
|
172
|
+
stroke-width: var(--vis-grouped-bar-stroke-width);
|
|
173
|
+
cursor: var(--vis-grouped-bar-cursor);
|
|
174
|
+
|
|
175
|
+
&:hover {
|
|
176
|
+
stroke-width: var(--vis-grouped-bar-hover-stroke-width);
|
|
177
|
+
stroke: var(--vis-grouped-bar-hover-stroke-color);
|
|
178
|
+
}
|
|
179
|
+
`,Lr=O`
|
|
180
|
+
label: barGroup;
|
|
181
|
+
`,Kl=O`
|
|
182
|
+
label: barGroupExit;
|
|
183
|
+
`,Ym=Object.freeze(Object.defineProperty({__proto__:null,bar:zn,barGroup:Lr,barGroupExit:Kl,globalStyles:Wm,root:Jl},Symbol.toStringTag,{value:"Module"}));class Bi extends xn{constructor(e){super(),this._defaultConfig=Um,this.config=this._defaultConfig,this.getAccessors=()=>Gt(this.config.y)?this.config.y:[this.config.y],this.events={},this._barData=[],e&&this.setConfig(e)}get bleed(){if(this._barData=this._getVisibleData(),this._barData.length===0)return{top:0,bottom:0,left:0,right:0};const e=!this.isVertical()&&this.dataScale.range()[0]>this.dataScale.range()[1],n=this.dataScale.domain(),i=this._getGroupWidth()/2,r=this._barData.map((g,m)=>X(g,this.config.x,m)),o=nn(r),s=cr(r),a=this.dataScale(o),l=this.dataScale(s),c=this.dataScale.invert(a+(e?i:-i)),h=this.dataScale.invert(l+(e?-i:i)),u=c<=n[0]?this.dataScale(n[0])-this.dataScale(c):0,f=h>n[1]?this.dataScale(h)-this.dataScale(n[1]):0;return{top:this.isVertical()?0:e?-f:u,bottom:this.isVertical()?0:e?-u:f,left:this.isVertical()?u:0,right:this.isVertical()?f:0}}get dataScale(){return this.isVertical()?this.xScale:this.yScale}get valueScale(){return this.isVertical()?this.yScale:this.xScale}isVertical(){return this.config.orientation===ui.Vertical}_render(e){const{config:n}=this,i=xt(e)?e:n.duration,r=this._getGroupWidth(),o=this.getAccessors(),s=[-r/2,r/2],a=Ci().domain(ya(o.length)).range(s).paddingInner(n.barPadding).paddingOuter(n.barPadding),l=this.g.selectAll(`.${Lr}`).data(this._barData,(x,_)=>{var w;return`${(w=Oe(x,n.id,_))!==null&&w!==void 0?w:_}`}),c=(x,_)=>{const w=this.dataScale(X(x,n.x,_)),k=this.isVertical()?w:0,b=this.isVertical()?0:w;return`translate(${k},${b})`},u=l.enter().append("g").attr("class",Lr).attr("transform",c).style("opacity",1).merge(l);q(u,i).attr("transform",c).style("opacity",1);const f=l.exit().attr("class",Kl);q(f,i).style("opacity",0).remove(),q(f.selectAll(`.${zn}`),i).attr("transform",(x,_,w)=>this.isVertical()?`translate(0,${this.yScale(0)}) scale(1,0)`:`translate(${this.xScale(0)},0) scale(0,1)`);const g=a.bandwidth(),m=u.selectAll(`.${zn}`).data(x=>o.map(()=>x)),p=this._getValueAxisDirection(),y=m.enter().append("path").attr("class",zn).attr("d",(x,_)=>{const w=a(_),k=this.valueScale(0),b=g;return this._getBarPath(w,k,b,0,!1,p)}).style("fill",(x,_)=>pt(x,n.color,_)).merge(m);q(y,i).attr("d",(x,_)=>{const w=a(_),k=g,b=X(x,o[_]),T=b<0;let R=T?this.valueScale(0):this.valueScale(b||0),E=Math.abs(this.valueScale(0)-this.valueScale(b))||0;if(E<n.barMinHeight){const U=p===$t.North?-1:1;R=this.valueScale(0)+U*n.barMinHeight,E=n.barMinHeight}return this._getBarPath(w,R,k,E,T,p)}).style("fill",(x,_)=>pt(x,n.color,_)).style("cursor",(x,_)=>Oe(x,n.cursor,_)),q(m.exit(),i).remove()}_getValueAxisDirection(){return this.valueScale.range()[0]>this.valueScale.range()[1]?$t.North:$t.South}_getVisibleData(){const{config:e,datamodel:{data:n}}=this,i=this._getGroupWidth(),r=n.length<2?0:i/2,o=this.dataScale,s=Math.abs(o.invert(r)-o.invert(0));return n==null?void 0:n.filter((l,c)=>{const h=X(l,e.x,c),u=o.domain(),f=+u[0],g=+u[1];return h>=f-s&&h<=g+s})}_getBarPath(e,n,i,r,o,s){const{config:a}=this,l=a.roundedCorners?xt(a.roundedCorners)?+a.roundedCorners:i/2:0,c=Bt(l,0,Math.min(r,i)/2),h=s===$t.North,u=this.isVertical()&&o!==h,f=this.isVertical()&&o===h,g=!this.isVertical()&&o,m=!this.isVertical()&&!o;return Hm({x:this.isVertical()?e:n+(h?0:-r),y:this.isVertical()?n+(h?0:-r):e,w:this.isVertical()?i:r,h:this.isVertical()?r:i,tl:u||g,tr:u||m,bl:f||g,br:f||m,r:c})}_getGroupWidth(){const{config:e,datamodel:{data:n}}=this;if(kh(n))return 0;if(e.groupWidth)return nn([e.groupWidth,e.groupMaxWidth]);const i=this.dataScale.bandwidth,r=this.dataScale.domain?this.dataScale.domain():[];let s=1+(i?r.length:r[1]-r[0])/e.dataStep||!i&&n.filter((c,h)=>{const u=X(c,e.x,h);return u>=r[0]&&u<=r[1]}).length||n.length;!i&&s>=2&&(s+=1);const l=(s<2?1:1-e.groupPadding)*(this.isVertical()?this._width:this._height)/s;return nn([l,e.groupMaxWidth])}getValueScaleExtent(e){const{datamodel:n}=this,i=this.getAccessors(),r=e?this._getVisibleData():n.data,o=xa(r,...i),s=ba(r,...i);return[o>0?0:o,s<0?0:s]}getDataScaleExtent(){const{config:e,datamodel:n}=this;return Nn(n.data,e.x)}getYDataExtent(e){return this.isVertical()?this.getValueScaleExtent(e):this.getDataScaleExtent()}getXDataExtent(){return this.isVertical()?this.getDataScaleExtent():this.getValueScaleExtent(!1)}}Bi.selectors=Ym;function Xm(t){return t}var In=1,Vn=2,Br=3,Ke=4,ta=1e-6;function Gm(t){return"translate("+t+",0)"}function qm(t){return"translate(0,"+t+")"}function jm(t){return e=>+t(e)}function Zm(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Qm(){return!this.__axis}function Fi(t,e){var n=[],i=null,r=null,o=6,s=6,a=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===In||t===Ke?-1:1,h=t===Ke||t===Vn?"x":"y",u=t===In||t===Br?Gm:qm;function f(g){var m=i??(e.ticks?e.ticks.apply(e,n):e.domain()),p=r??(e.tickFormat?e.tickFormat.apply(e,n):Xm),v=Math.max(o,0)+a,y=e.range(),x=+y[0]+l,_=+y[y.length-1]+l,w=(e.bandwidth?Zm:jm)(e.copy(),l),k=g.selection?g.selection():g,b=k.selectAll(".domain").data([null]),T=k.selectAll(".tick").data(m,e).order(),R=T.exit(),E=T.enter().append("g").attr("class","tick"),U=T.select("line"),$=T.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge(E),U=U.merge(E.append("line").attr("stroke","currentColor").attr(h+"2",c*o)),$=$.merge(E.append("text").attr("fill","currentColor").attr(h,c*v).attr("dy",t===In?"0em":t===Br?"0.71em":"0.32em")),g!==k&&(b=b.transition(g),T=T.transition(g),U=U.transition(g),$=$.transition(g),R=R.transition(g).attr("opacity",ta).attr("transform",function(F){return isFinite(F=w(F))?u(F+l):this.getAttribute("transform")}),E.attr("opacity",ta).attr("transform",function(F){var C=this.parentNode.__axis;return u((C&&isFinite(C=C(F))?C:w(F))+l)})),R.remove(),b.attr("d",t===Ke||t===Vn?s?"M"+c*s+","+x+"H"+l+"V"+_+"H"+c*s:"M"+l+","+x+"V"+_:s?"M"+x+","+c*s+"V"+l+"H"+_+"V"+c*s:"M"+x+","+l+"H"+_),T.attr("opacity",1).attr("transform",function(F){return u(w(F)+l)}),U.attr(h+"2",c*o),$.attr(h,c*v).text(p),k.filter(Qm).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Vn?"start":t===Ke?"end":"middle"),k.each(function(){this.__axis=w})}return f.scale=function(g){return arguments.length?(e=g,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(g){return arguments.length?(n=g==null?[]:Array.from(g),f):n.slice()},f.tickValues=function(g){return arguments.length?(i=g==null?null:Array.from(g),f):i&&i.slice()},f.tickFormat=function(g){return arguments.length?(r=g,f):r},f.tickSize=function(g){return arguments.length?(o=s=+g,f):o},f.tickSizeInner=function(g){return arguments.length?(o=+g,f):o},f.tickSizeOuter=function(g){return arguments.length?(s=+g,f):s},f.tickPadding=function(g){return arguments.length?(a=+g,f):a},f.offset=function(g){return arguments.length?(l=+g,f):l},f}function ea(t){return Fi(In,t)}function na(t){return Fi(Vn,t)}function ia(t){return Fi(Br,t)}function ra(t){return Fi(Ke,t)}var _e;(function(t){t.Start="start",t.Middle="middle",t.End="end"})(_e||(_e={}));var ye;(function(t){t.Top="top",t.Middle="middle",t.Bottom="bottom"})(ye||(ye={}));var mi;(function(t){t.Wrap="wrap",t.Trim="trim"})(mi||(mi={}));var At;(function(t){t.Left="left",t.Center="center",t.Right="right"})(At||(At={}));var Hn={exports:{}},Jm=Hn.exports,oa;function Km(){return oa||(oa=1,function(t){(function(e){if(typeof n!="function"){var n=function(m){return m};n.nonNative=!0}const i=n("plaintext"),r=n("html"),o=n("comment"),s=/<(\w*)>/g,a=/<\/?([^\s\/>]+)/;function l(m,p,v){m=m||"",p=p||[],v=v||"";let y=h(p,v);return u(m,y)}function c(m,p){m=m||[],p=p||"";let v=h(m,p);return function(x){return u(x||"",v)}}l.init_streaming_mode=c;function h(m,p){return m=f(m),{allowable_tags:m,tag_replacement:p,state:i,tag_buffer:"",depth:0,in_quote_char:""}}function u(m,p){if(typeof m!="string")throw new TypeError("'html' parameter must be a string");let v=p.allowable_tags,y=p.tag_replacement,x=p.state,_=p.tag_buffer,w=p.depth,k=p.in_quote_char,b="";for(let T=0,R=m.length;T<R;T++){let E=m[T];if(x===i)switch(E){case"<":x=r,_+=E;break;default:b+=E;break}else if(x===r)switch(E){case"<":if(k)break;w++;break;case">":if(k)break;if(w){w--;break}k="",x=i,_+=">",v.has(g(_))?b+=_:b+=y,_="";break;case'"':case"'":E===k?k="":k=k||E,_+=E;break;case"-":_==="<!-"&&(x=o),_+=E;break;case" ":case`
|
|
184
|
+
`:if(_==="<"){x=i,b+="< ",_="";break}_+=E;break;default:_+=E;break}else if(x===o)switch(E){case">":_.slice(-2)=="--"&&(x=i),_="";break;default:_+=E;break}}return p.state=x,p.tag_buffer=_,p.depth=w,p.in_quote_char=k,b}function f(m){let p=new Set;if(typeof m=="string"){let v;for(;v=s.exec(m);)p.add(v[1])}else!n.nonNative&&typeof m[n.iterator]=="function"?p=new Set(m):typeof m.forEach=="function"&&m.forEach(p.add,p);return p}function g(m){let p=a.exec(m);return p?p[1].toLowerCase():null}t.exports?t.exports=l:e.striptags=l})(Jm)}(Hn)),Hn.exports}var tv=Km();const ev=Bf(tv);function nv(t){switch(t){case At.Center:return"middle";case At.Right:return"end";case At.Left:default:return"start"}}function iv(t){var e;return(e=t.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g))===null||e===void 0?void 0:e.filter(Boolean).map(n=>n.toLowerCase()).join("-")}function rv(t){return t.replace(/['"]/g,"'").replace(/\u0000/g,"\\0").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\v/g,"\\v").replace(/\t/g,"\\t").replace(/\f/g,"\\f")}function ov(t,e=15){return t?t.length>e?`…${t.substr(t.length-e,e)}`:t:""}function sv(t,e=15){if(!t)return"";const n=Math.floor((e-3)/2);return t.length>e?`${t.substr(0,n)}…${t.substr(-n,n)}`:t}function av(t,e=15){return t?t.length>e?`${t.substr(0,e)}…`:t:""}function lv(t,e=15,n=_e.Middle){if(!t)return"";let i=av(t,e);return n===_e.Start?i=ov(t,e):n===_e.Middle&&(i=sv(t,e)),i}function tc(t,e=[" "]){let n=[t];for(let i=0;i<e.length;i++){const r=e[i];n.forEach((o,s)=>{const a=o.split(r),l=a.map((c,h)=>`${c}${h===a.length-1?"":r}`);n[s]=l}),n=ur(n)}return n}function cv(t,e,n=[" ","-",".",","]){const i=t.text();if(!i)return;const r=Gt(n)?n:[n],o=tc(i,r),s=parseFloat(t.attr("x"))||0;t.text("");let a=t.append("tspan").attr("x",s),l=`${o[0]}`;a.text(l),o.forEach((c,h)=>{if(h===0)return;const u=`${l}${c}`;a.text(u),a.node().getComputedTextLength()>e?(a.text(l.trim()),a=t.append("tspan").attr("x",s).attr("dy","1.2em").text(c),l=c):l+=c})}function uv(t,e,n,i,r,o){var s;e===void 0&&(e=50),n===void 0&&(n=_e.Middle),r===void 0&&(r=+((s=window.getComputedStyle(t.node()))===null||s===void 0?void 0:s.fontSize)||0);const a=t.text(),l=a.length,c=r*l*o,u=Math.ceil(l*e/(1.1*c));return u<l?(t.text(lv(a,u,n)),!0):!1}function Un(t,e,n=rd()){return t.length*e*n||0}function Wn(t,e,n){const i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg"),o=document.createElementNS(i,"text");o.textContent=t,o.setAttribute("font-size",`${n}`),o.setAttribute("font-family",e),r.appendChild(o),document.body.appendChild(r);const s=o.getComputedTextLength();return document.body.removeChild(r),s}function hv(t,e=void 0,n=!0,i=Ua,r=!1){const o=`${t.text}`;if(!o)return[];const s=Array.isArray(i)?i:[i];return o.split(`
|
|
185
|
+
`).map(l=>{const c=[];if(!e)return[l];const h=tc(l,s);let u="";for(let f=0;f<h.length;f+=1){(n?Un(u+h[f],t.fontSize,t.fontWidthToHeightRatio):Wn(u+h[f],t.fontFamily,t.fontSize))<e||f===0?u+=h[f]:(c.push(u.trim()),u=h[f]);const m=2;if(r)for(;u.trim().length>m&&(n?Un(u,t.fontSize,t.fontWidthToHeightRatio):Wn(u,t.fontFamily,t.fontSize))>e;){let v=u.trim().length-m;for(;v>0;){const y=`${u.substring(0,v)}${Wa}`;if((n?Un(y,t.fontSize,t.fontWidthToHeightRatio):Wn(y,t.fontFamily,t.fontSize))<=e||v===1){c.push(y.trim()),u=u.substring(v);break}v--}}}return u&&c.push(u.trim()),c}).flat()}function fv(t,e=void 0,n=void 0,i=!0,r=Ua,o=!1){const s=Array.isArray(t)?t.map(u=>xe(cs,u)):[xe(cs,t)],a=s.map(u=>hv(u,e,i,r,o)),l=s[0];let c=-l.fontSize*(l.lineHeight-1);const h=[];return s.forEach((u,f)=>{var g;let m=a[f];const p=f>0?h[f-1]:void 0,v=p?p.marginBottom:0,y=u.marginTop,x=Math.max(v,y);c+=x;const _=u.fontSize*u.lineHeight;let w=0;for(let k=0;k<m.length;k+=1){let b=m[k];c+=_;const T=`${b} …`,R=i?Un(T,u.fontSize,u.fontWidthToHeightRatio):Wn(T,u.fontFamily,u.fontSize);if(w=Math.max(R,w),n&&c+_>n&&k!==m.length-1){b.charAt(b.length-1)===Wa&&(b=b.substr(0,m[k].length-1)),R<e?m[k]=T:m[k]=`${m[k].substr(0,m[k].length-2)}…`,m=m.slice(0,k+1);break}}h.push(Object.assign(Object.assign({},u),{_lines:m,_estimatedHeight:c-((p==null?void 0:p._estimatedHeight)||0),_maxWidth:Math.max(w,(g=p==null?void 0:p._maxWidth)!==null&&g!==void 0?g:0)}))}),h}function dv(t,e=0,n){return t.map((i,r)=>{const o=r>0?t[r-1]:void 0,s=o?o.marginBottom/o.fontSize:0,a=i.marginTop/i.fontSize,l=Math.max(s,a),c={fontSize:i.fontSize,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fill:i.color,y:r===0&&n};return`<tspan xmlns="http://www.w3.org/2000/svg" ${Object.entries(c).filter(([u,f])=>f).map(([u,f])=>`${iv(u)}="${rv(f.toString())}"`).join(" ")}>${i._lines.map((u,f)=>{let g;return r===0&&f===0?g=.8+l:f===0?g=l+i.lineHeight:g=i.lineHeight,`<tspan x="${e}" dy="${g}em">${u.length?u:" "}</tspan>`}).join("")}</tspan>`})}function gv(t){return xh(t,e=>e._estimatedHeight)}const pv=["text","tspan","textPath","altGlyph","altGlyphDef","altGlyphItem","glyphRef","textRef","textArea"];function mv(t,e,n,i){var r,o;const s=fv(e,n.width,void 0,n.fastMode,n.separator,n.wordBreak),a=(r=n.x)!==null&&r!==void 0?r:+t.getAttribute("x"),l=(o=n.y)!==null&&o!==void 0?o:+t.getAttribute("y"),c=a??0;let h=l??0;if(n.textAlign&&t.setAttribute("text-anchor",nv(n.textAlign)),n.verticalAlign&&n.verticalAlign!==ye.Top){const u=gv(s),f=n.verticalAlign===ye.Middle?-u/2:n.verticalAlign===ye.Bottom?-u:0;h+=f}n.textRotationAngle?t.setAttribute("transform",`rotate(${n.textRotationAngle===0||n.textRotationAngle?n.textRotationAngle:0} ${c} ${h})`):t.removeAttribute("transform");{const u=new DOMParser;t.textContent="",s.forEach(f=>{const g=dv([f],c,h).join(""),m=ev(g,pv),p=u.parseFromString(m,"image/svg+xml").firstChild;t.appendChild(p)})}}const vv=Object.assign(Object.assign({},Ve),{position:void 0,type:void 0,label:void 0,labelFontSize:null,gridLine:!0,tickLine:!0,domainLine:!0,numTicks:void 0,minMaxTicksOnly:!1,minMaxTicksOnlyWhenWidthIsLess:250,tickTextWidth:void 0,tickTextSeparator:void 0,tickTextForceWordBreak:!1,tickTextTrimType:_e.Middle,tickTextFitMode:mi.Wrap,tickTextFontSize:null,tickTextAlign:void 0,tickTextColor:null,tickTextAngle:void 0,labelMargin:8,labelColor:null,tickFormat:void 0,tickValues:void 0,fullSize:!0,tickPadding:8,tickTextHideOverlapping:void 0}),ec=O`
|
|
152
186
|
label: axis-component;
|
|
153
|
-
`,
|
|
187
|
+
`,_v=Jt`
|
|
154
188
|
:root {
|
|
155
189
|
// Undefined by default to allow proper fallback to var(--vis-font-family)
|
|
156
190
|
/* --vis-axis-font-family: */
|
|
@@ -175,18 +209,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
175
209
|
--vis-dark-axis-label-color: #fefefe;
|
|
176
210
|
}
|
|
177
211
|
|
|
178
|
-
body.theme-dark ${`.${
|
|
212
|
+
body.theme-dark ${`.${ec}`} {
|
|
179
213
|
--vis-axis-tick-color: var(--vis-dark-axis-tick-color);
|
|
180
214
|
--vis-axis-domain-color: var(--vis-dark-axis-domain-color);
|
|
181
215
|
--vis-axis-tick-label-color: var(--vis-dark-axis-tick-label-color);
|
|
182
216
|
--vis-axis-grid-color: var(--vis-dark-axis-grid-color);
|
|
183
217
|
--vis-axis-label-color: var(--vis-dark-axis-label-color);
|
|
184
218
|
}
|
|
185
|
-
`,
|
|
219
|
+
`,Co=O`
|
|
186
220
|
label: hide-tick-line;
|
|
187
|
-
`,
|
|
221
|
+
`,Ao=O`
|
|
188
222
|
label: hide-domain;
|
|
189
|
-
`,
|
|
223
|
+
`,nc=O`
|
|
190
224
|
label: axis;
|
|
191
225
|
|
|
192
226
|
user-select: none;
|
|
@@ -196,18 +230,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
196
230
|
stroke-width: var(--vis-axis-domain-line-width, var(--vis-axis-grid-line-width));
|
|
197
231
|
}
|
|
198
232
|
|
|
199
|
-
&${`.${
|
|
233
|
+
&${`.${Co}`} {
|
|
200
234
|
.tick > line {
|
|
201
235
|
opacity: 0;
|
|
202
236
|
}
|
|
203
237
|
}
|
|
204
238
|
|
|
205
|
-
&${`.${
|
|
239
|
+
&${`.${Ao}`} {
|
|
206
240
|
.domain {
|
|
207
241
|
opacity: 0;
|
|
208
242
|
}
|
|
209
243
|
}
|
|
210
|
-
`,
|
|
244
|
+
`,ic=O`
|
|
211
245
|
label: grid;
|
|
212
246
|
|
|
213
247
|
.domain {
|
|
@@ -218,7 +252,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
218
252
|
stroke: var(--vis-axis-grid-color);
|
|
219
253
|
stroke-width: var(--vis-axis-grid-line-width);
|
|
220
254
|
}
|
|
221
|
-
`,
|
|
255
|
+
`,rc=O`
|
|
222
256
|
label: tick;
|
|
223
257
|
|
|
224
258
|
stroke: none;
|
|
@@ -236,21 +270,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
236
270
|
text-decoration: var(--vis-axis-tick-label-text-decoration);
|
|
237
271
|
stroke: none;
|
|
238
272
|
}
|
|
239
|
-
`,
|
|
273
|
+
`,Fr=O`
|
|
240
274
|
label: label;
|
|
241
275
|
fill: var(--vis-axis-label-color);
|
|
242
276
|
font-size: var(--vis-axis-label-font-size);
|
|
243
277
|
font-family: var(--vis-axis-font-family, var(--vis-font-family));
|
|
244
278
|
text-anchor: middle;
|
|
245
|
-
`,
|
|
279
|
+
`,oc=O`
|
|
246
280
|
label: tick-label;
|
|
247
|
-
`,
|
|
281
|
+
`,sc=O`
|
|
248
282
|
label: tick-label-hideable;
|
|
249
283
|
opacity: 0;
|
|
250
284
|
transition: var(--vis-axis-tick-label-hide-transition);
|
|
251
|
-
`,
|
|
285
|
+
`,yv=Object.freeze(Object.defineProperty({__proto__:null,axis:nc,globalStyles:_v,grid:ic,hideDomain:Ao,hideTickLine:Co,label:Fr,root:ec,tick:rc,tickLabel:oc,tickLabelHideable:sc},Symbol.toStringTag,{value:"Module"}));class ac extends xn{constructor(e){super(),this._defaultConfig=vv,this.config=this._defaultConfig,this._defaultNumTicks=3,this.events={},e&&this.setConfig(e),this.axisGroup=this.g.append("g"),this.gridGroup=this.g.append("g").attr("class",ic)}preRender(){const{config:e}=this,n=this.g.append("g").attr("opacity",0);this._renderAxis(n,0),this._axisRawBBox=n.node().getBBox(),e.tickTextAlign&&this._alignTickLabels(),this._renderAxisLabel(n),this._axisSizeBBox=this._getAxisSize(n),this._requiredMargin=this._getRequiredMargin(this._axisSizeBBox),n.remove()}getPosition(){const{config:{type:e,position:n}}=this;return n??(e===H.X?M.Bottom:M.Left)}_getAxisSize(e){return e.node().getBBox()}_getRequiredMargin(e=this._axisSizeBBox){const{config:{type:n,position:i}}=this;switch(n){case H.X:{const o=this._axisSizeBBox.x+this._axisSizeBBox.width,s=this._axisSizeBBox.x<0?Math.abs(this._axisSizeBBox.x):0,a=o-this._width>1?o-this._width:0;switch(i){case M.Top:return{top:e.height,left:s,right:a};case M.Bottom:default:return{bottom:e.height,left:s,right:a}}}case H.Y:{const r=e.height>this._height?(e.height-this._height)/2:0,o=r,s=r;switch(i){case M.Right:return{right:e.width,top:o,bottom:s};case M.Left:default:return{left:e.width,top:o,bottom:s}}}}}getRequiredMargin(){return this._requiredMargin}getOffset(e){const{config:{type:n,position:i}}=this;switch(n){case H.X:switch(i){case M.Top:return{top:e.top,left:e.left};case M.Bottom:default:return{top:e.top+this._height,left:e.left}}case H.Y:switch(i){case M.Right:return{top:e.top,left:e.left+this._width};case M.Left:default:return{top:e.top,left:e.left}}}}_render(e=this.config.duration,n=this.axisGroup){const{config:i}=this;if(this._renderAxis(n,e),this._renderAxisLabel(n),i.gridLine){const r=this._buildGrid().tickFormat(()=>"");r.tickValues(this._getConfiguredTickValues()),this.gridGroup.selectAll("*").interrupt(),q(this.gridGroup,e).call(r).style("opacity",1)}else q(this.gridGroup,e).style("opacity",0);i.tickTextAlign&&this._alignTickLabels(),this._resolveTickLabelOverlap(n)}_buildAxis(){const{config:{type:e,position:n,tickPadding:i}}=this,r=this._getNumTicks();switch(e){case H.X:switch(n){case M.Top:return ea(this.xScale).ticks(r).tickPadding(i);case M.Bottom:default:return ia(this.xScale).ticks(r).tickPadding(i)}case H.Y:switch(n){case M.Right:return na(this.yScale).ticks(r).tickPadding(i);case M.Left:default:return ra(this.yScale).ticks(r).tickPadding(i)}}}_buildGrid(){const{config:{type:e,position:n}}=this,i=this._getNumTicks();switch(e){case H.X:switch(n){case M.Top:return ea(this.xScale).ticks(i*2).tickSize(-this._height).tickSizeOuter(0);case M.Bottom:default:return ia(this.xScale).ticks(i*2).tickSize(-this._height).tickSizeOuter(0)}case H.Y:switch(n){case M.Right:return na(this.yScale).ticks(i*2).tickSize(-this._width).tickSizeOuter(0);case M.Left:default:return ra(this.yScale).ticks(i*2).tickSize(-this._width).tickSizeOuter(0)}}}_renderAxis(e=this.axisGroup,n=this.config.duration){const{config:i}=this,r=this._buildAxis(),o=this._getConfiguredTickValues()||r.scale().ticks(this._getNumTicks());r.tickValues(o),e.selectAll("*").interrupt(),q(e,n).call(r);const s=e.selectAll("g.tick");s.classed(rc,!0).style("font-size",i.tickTextFontSize);const a=e.selectAll("g.tick > text").filter(l=>o.some(c=>sn(l,c))).classed(oc,!0).classed(sc,!!i.tickTextHideOverlapping).style("fill",i.tickTextColor);if(a.nodes().forEach(l=>eo(l)),a.each((l,c,h)=>{var u,f;let g=(f=(u=i.tickFormat)===null||u===void 0?void 0:u.call(i,l,c,o))!==null&&f!==void 0?f:`${l}`;const m=h[c],p=i.tickTextWidth||(i.type===H.X?this._containerWidth/(s.size()+1):this._containerWidth/5),v=getComputedStyle(m),y=Number.parseFloat(v.fontSize),x=v.fontFamily,_={verticalAlign:i.type===H.X?ye.Top:ye.Middle,width:p,textRotationAngle:i.tickTextAngle,separator:i.tickTextSeparator,wordBreak:i.tickTextForceWordBreak};if(i.tickTextFitMode===mi.Trim){const k=at(m).text(g);uv(k,p,i.tickTextTrimType,!0,y,.58),g=at(m).text()}mv(m,{text:g,fontFamily:x,fontSize:y},_)}),e.classed(nc,!0).classed(Co,!i.tickLine).classed(Ao,!i.domainLine),i.fullSize){const l=this._getFullDomainPath(0);q(e.select(".domain"),n).attr("d",l)}}_resolveTickLabelOverlap(e=this.axisGroup){const{config:n}=this,i=e.selectAll("g.tick > text");if(!n.tickTextHideOverlapping){i.style("opacity",null);return}cancelAnimationFrame(this._collideTickLabelsAnimFrameId),this._collideTickLabelsAnimFrameId=requestAnimationFrame(()=>{this._collideTickLabels(i)})}_collideTickLabels(e){e.each((i,r,o)=>{const s=o[r];s._visible=!0});const n=3;for(let i=0;i<n;i+=1)e.each((r,o,s)=>{const a=s[o];if(!a._visible)return;const c=a.getBoundingClientRect();for(let h=o+1;h<s.length;h+=1){if(o===h)continue;const u=s[h];if(u._visible){const g=u.getBoundingClientRect();if(If(c,g,-5)){u._visible=!1;break}}}});e.each((i,r,o)=>{const s=o[r];at(s).style("opacity",s._visible?1:0)})}_getNumTicks(){const{config:{type:e,numTicks:n}}=this;if(n)return n;if(e===H.X){const i=this.xScale.range(),r=i[1]-i[0];return Math.floor(r/175)}if(e===H.Y){const i=this.yScale.range(),r=Math.abs(i[0]-i[1]);return Math.pow(r,.85)/25}return this._defaultNumTicks}_getConfiguredTickValues(){const{config:e}=this,n=e.type===H.X?this.xScale:this.yScale,i=n==null?void 0:n.domain();return e.tickValues?e.tickValues.filter(r=>r>=i[0]&&r<=i[1]):e.minMaxTicksOnly||e.type===H.X&&this._width<e.minMaxTicksOnlyWhenWidthIsLess?i:null}_getFullDomainPath(e=0){const{config:{type:n}}=this;switch(n){case H.X:return`M0.5, ${e} V0.5 H${this._width+.5} V${e}`;case H.Y:return`M${-e}, ${this._height+.5} H0.5 V0.5 H${-e}`}}_renderAxisLabel(e=this.axisGroup){var n;const{type:i,label:r,labelMargin:o,labelFontSize:s}=this.config;e.selectAll(`.${Fr}`).remove();const a=this.getPosition(),{width:l,height:c}=(n=this._axisRawBBox)!==null&&n!==void 0?n:e.node().getBBox(),h=i===H.X?this._width/2:Math.pow(-1,+(a===M.Left))*l,u=i===H.X?Math.pow(-1,+(a===M.Top))*c:this._height/2,f=i===H.X?0:Math.pow(-1,+(a===M.Left))*o,g=i===H.X?Math.pow(-1,+(a===M.Top))*o:0,m=i===H.Y?-90:0;e.append("text").attr("class",Fr).text(r).attr("dy",`${this._getLabelDY()}em`).attr("transform",`translate(${h+f},${u+g}) rotate(${m})`).style("font-size",s).style("fill",this.config.labelColor)}_getLabelDY(){const{type:e,position:n}=this.config;switch(e){case H.X:switch(n){case M.Top:return 0;case M.Bottom:default:return .75}case H.Y:switch(n){case M.Right:return .75;case M.Left:default:return-.25}}}_alignTickLabels(){const{config:{type:e,tickTextAlign:n,tickTextAngle:i,position:r}}=this,o=this.g.selectAll("g.tick > text"),s=this._getTickTextAnchor(n),a=e===H.X?0:this._getYTickTextTranslate(n,r),l=i?`translate(${a},0) rotate(${i})`:`translate(${a},0)`;o.attr("transform",l).attr("text-anchor",s)}_getTickTextAnchor(e){switch(e){case At.Left:return"start";case At.Right:return"end";case At.Center:return"middle";default:return null}}_getYTickTextTranslate(e,n=M.Left){const r=this._axisRawBBox.width-9;switch(e){case At.Left:return n===M.Left?r*-1:0;case At.Right:return n===M.Left?0:r;case At.Center:return n===M.Left?r*-.5:r*.5;default:return 0}}}ac.selectors=yv;var Rt;(function(t){t.Circle="circle",t.Cross="cross",t.Diamond="diamond",t.Square="square",t.Star="star",t.Triangle="triangle",t.Wye="wye"})(Rt||(Rt={}));const xv={[Rt.Circle]:Fl,[Rt.Cross]:Q0,[Rt.Diamond]:K0,[Rt.Square]:tm,[Rt.Star]:rm,[Rt.Triangle]:om,[Rt.Wye]:am},yt=Object.assign(Object.assign({},Rt),{Line:"line"});var vi;(function(t){t.Horizontal="horizontal",t.Vertical="vertical"})(vi||(vi={}));const bv={items:[],labelClassName:"",onLegendItemClick:void 0,labelFontSize:null,labelMaxWidth:null,bulletSize:null,bulletShape:t=>{var e;return(e=t.shape)!==null&&e!==void 0?e:yt.Circle},orientation:vi.Horizontal,renderIntoProvidedDomNode:!1},rr=fn*3,wv={[yt.Circle]:Math.PI/4,[yt.Cross]:5/9,[yt.Diamond]:Math.sqrt(3)/6,[yt.Square]:1,[yt.Star]:.3,[yt.Triangle]:Math.sqrt(3)/4,[yt.Wye]:5/11};function kv(t){t.each((e,n,i)=>{at(i[n]).append("svg").attr("width","100%").attr("height","100%").append("path")})}function Sv(t,e,n){t.each((i,r,o)=>{const s=Oe(i,e.bulletShape,r),a=pt(i,n,r),l=rr,c=s===yt.Line?rr/2.5:rr,u=at(o[r]).select("svg").attr("viewBox",`0 0 ${l} ${c}`).select("path").attr("stroke",a),f=i.inactive?"var(--vis-legend-bullet-inactive-opacity)":1;if(s===yt.Line)u.attr("d",`M0,${c/2} L${l/2},${c/2} L${l},${c/2}`).attr("transform",null).style("opacity",f).style("stroke-width","3px").style("fill",null).style("fill-opacity",null).style("marker-start","none").style("marker-end","none");else{const g=lm().type(xv[s]).size(l*c*wv[s]),m=(l-2)/l;let p=c/2;switch(s){case yt.Triangle:p+=c/8;break;case yt.Star:p+=c/16;break;case yt.Wye:p-=c/16;break}u.attr("d",g).attr("transform",`translate(${l/2}, ${Math.round(p)}) scale(${m})`).style("stroke-width","1px").style("opacity",null).style("fill",a).style("fill-opacity",f)}})}const Mo=O`
|
|
252
286
|
label: bullet-legend-component;
|
|
253
|
-
`,
|
|
287
|
+
`,Tv=Jt`
|
|
254
288
|
:root {
|
|
255
289
|
// Undefined by default to allow proper fallback to var(--vis-font-family)
|
|
256
290
|
/* --vis-legend-font-family: */
|
|
@@ -267,14 +301,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
267
301
|
--vis-dark-legend-label-color: #eee;
|
|
268
302
|
}
|
|
269
303
|
|
|
270
|
-
body.theme-dark ${`.${
|
|
304
|
+
body.theme-dark ${`.${Mo}`} {
|
|
271
305
|
--vis-legend-label-color: var(--vis-dark-legend-label-color);
|
|
272
306
|
}
|
|
273
307
|
|
|
274
308
|
body.theme-patterns {
|
|
275
309
|
--vis-legend-bullet-size: 14px;
|
|
276
310
|
}
|
|
277
|
-
`,
|
|
311
|
+
`,Yn=O`
|
|
278
312
|
label: legendItem;
|
|
279
313
|
display: inline-flex;
|
|
280
314
|
align-items: center;
|
|
@@ -284,13 +318,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
284
318
|
cursor: default;
|
|
285
319
|
user-select: none;
|
|
286
320
|
max-width: min-content;
|
|
287
|
-
|
|
321
|
+
`,lc=O`
|
|
288
322
|
label: legendItemVertical;
|
|
289
323
|
display: flex;
|
|
290
324
|
margin-top: var(--vis-legend-vertical-item-spacing);
|
|
291
|
-
`,
|
|
325
|
+
`,cc=O`
|
|
292
326
|
cursor: pointer;
|
|
293
|
-
`,
|
|
327
|
+
`,Pr=O`
|
|
294
328
|
label: legendItemLabel;
|
|
295
329
|
font-size: var(--vis-legend-label-font-size);
|
|
296
330
|
display: inline-block;
|
|
@@ -300,7 +334,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
300
334
|
text-overflow: ellipsis;
|
|
301
335
|
overflow: hidden;
|
|
302
336
|
white-space: nowrap;
|
|
303
|
-
`,
|
|
337
|
+
`,zr=O`
|
|
304
338
|
flex: 0 0 auto;
|
|
305
339
|
label: legendItemBullet;
|
|
306
340
|
margin-right: var(--vis-legend-bullet-label-spacing);
|
|
@@ -310,7 +344,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
310
344
|
svg {
|
|
311
345
|
display: block;
|
|
312
346
|
}
|
|
313
|
-
`,
|
|
347
|
+
`,Cv=Object.freeze(Object.defineProperty({__proto__:null,bullet:zr,clickable:cc,item:Yn,itemVertical:lc,label:Pr,root:Mo,variables:Tv},Symbol.toStringTag,{value:"Module"}));class uc{constructor(e,n){this._defaultConfig=bv,this.config=this._defaultConfig,this._colorAccessor=i=>i.color,this._container=e,this.div=n!=null&&n.renderIntoProvidedDomNode?at(this._container):at(this._container).append("div"),this.div.classed(Mo,!0),this.element=this.div.node(),n&&this.update(n)}update(e){this.prevConfig=this.config,this.config=xe(this._defaultConfig,e),this.render()}render(){const{config:e}=this,n=this.div.selectAll(`.${Yn}`).data(e.items),i=n.enter().append("div").on("click",this._onItemClick.bind(this)),r=i.merge(n);r.attr("class",o=>{var s;return`${Yn} ${(s=o.className)!==null&&s!==void 0?s:""}`}).classed(lc,e.orientation===vi.Vertical).classed(cc,o=>!!e.onLegendItemClick&&this._isItemClickable(o)).attr("title",o=>o.name).style("display",o=>o.hidden?"none":null),i.append("span").attr("class",zr).call(kv),r.select(`.${zr}`).style("width",e.bulletSize).style("height",e.bulletSize).style("box-sizing","content-box").call(Sv,this.config,this._colorAccessor),i.append("span").attr("class",Pr).classed(e.labelClassName,!0).style("max-width",e.labelMaxWidth).style("font-size",e.labelFontSize),r.select(`.${Pr}`).text(o=>o.name),n.exit().remove()}_isItemClickable(e){return e.pointer===void 0?!0:e.pointer}_onItemClick(e,n){const{config:{onLegendItemClick:i}}=this,o=this.div.selectAll(`.${Yn}`).nodes().indexOf(e.currentTarget);i&&i(n,o)}destroy(){this.element!==this._container&&this.div.remove()}}uc.selectors=Cv;const Av=Object.assign(Object.assign({},Ve),{yStacked:void 0,baseline:null,duration:100,tooltip:void 0,template:(t,e)=>"",hideWhenFarFromPointer:!0,hideWhenFarFromPointerDistance:100,snapToData:!0,getCircles:void 0,color:void 0,strokeColor:void 0,strokeWidth:void 0}),Mv=Jt`
|
|
314
348
|
:root {
|
|
315
349
|
--vis-crosshair-line-stroke-color: #888;
|
|
316
350
|
--vis-crosshair-line-stroke-width: 1px;
|
|
@@ -319,21 +353,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
319
353
|
--vis-crosshair-circle-stroke-width: 1px;
|
|
320
354
|
--vis-crosshair-circle-stroke-opacity: 0.75;
|
|
321
355
|
}
|
|
322
|
-
|
|
356
|
+
`,$v=O`
|
|
323
357
|
label: crosshair-component;
|
|
324
|
-
`,
|
|
358
|
+
`,hc=O`
|
|
325
359
|
stroke: var(--vis-crosshair-line-stroke-color);
|
|
326
360
|
stroke-width: var(--vis-crosshair-line-stroke-width);
|
|
327
361
|
stroke-opacity: var(--vis-crosshair-line-stroke-opacity);
|
|
328
362
|
pointer-events: none;
|
|
329
|
-
`,
|
|
363
|
+
`,fc=O`
|
|
330
364
|
stroke: var(--vis-crosshair-circle-stroke-color);
|
|
331
365
|
stroke-width: var(--vis-crosshair-circle-stroke-width);
|
|
332
366
|
stroke-opacity: var(--vis-crosshair-circle-stroke-opacity);
|
|
333
367
|
pointer-events: none;
|
|
334
|
-
`,
|
|
368
|
+
`,Ev=Object.freeze(Object.defineProperty({__proto__:null,circle:fc,globalStyles:Mv,line:hc,root:$v},Symbol.toStringTag,{value:"Module"}));class dc extends xn{constructor(e){super(),this.clippable=!0,this._defaultConfig=Av,this.config=this._defaultConfig,this.x=0,this.show=!1,this._animFrameId=null,this._accessors={x:void 0,y:void 0,yStacked:void 0,baseline:void 0},e&&this.setConfig(e),this.g.style("opacity",this.show?1:0),this.line=this.g.append("line").attr("class",hc)}set accessors(e){this._accessors=e}get accessors(){var e;const{config:n}=this,i=!!(n.x||n.y||n.yStacked),r=i?n.x:this._accessors.x,o=i?n.y:this._accessors.y,s=o?Gt(o)?o:[o]:void 0,a=i?n.yStacked:this._accessors.yStacked,l=(e=n.baseline)!==null&&e!==void 0?e:this._accessors.baseline;return{x:r,y:s,yStacked:a,baseline:l}}setContainer(e){this.container=e,this.container.on("mousemove.crosshair",this._onMouseMove.bind(this)),this.container.on("mouseout.crosshair",this._onMouseOut.bind(this))}_render(e){const{config:n}=this;if(n.snapToData&&!this.datum)return;const i=xt(e)?e:n.duration;q(this.g,i).style("opacity",this.show?1:0),this.line.attr("y1",0).attr("y1",this._height),q(this.line,i,ms).attr("x1",this.x).attr("x2",this.x);const r=this.getCircleData(),o=this.g.selectAll("circle").data(r,(a,l)=>{var c;return(c=a.id)!==null&&c!==void 0?c:l}),s=o.enter().append("circle").attr("class",fc).attr("r",0).attr("cx",this.x).attr("cy",a=>a.y).style("fill",a=>a.color).style("stroke",a=>a.strokeColor).style("stroke-width",a=>a.strokeWidth);q(s.merge(o),i,ms).attr("cx",this.x).attr("cy",a=>a.y).attr("r",4).style("opacity",a=>a.opacity).style("fill",a=>a.color).style("stroke",a=>a.strokeColor).style("stroke-width",a=>a.strokeWidth),o.exit().remove()}hide(){this._onMouseOut()}_onMouseMove(e){var n,i;const{config:r,datamodel:o,element:s}=this;!this.accessors.x&&(!((n=o.data)===null||n===void 0)&&n.length)&&console.warn("Unovis | Crosshair: X accessor function has not been configured. Please check if it's present in the configuration object");const[a]=Gn(e,s),l=this.xScale.range();if(r.snapToData){!this.accessors.y&&!this.accessors.yStacked&&(!((i=o.data)===null||i===void 0)&&i.length)&&console.warn("Unovis | Crosshair: Y accessors have not been configured. Please check if they're present in the configuration object");const c=this.xScale,h=c.invert(a);if(this.datum=Ah(o.data,h,this.accessors.x),this.datumIndex=o.data.indexOf(this.datum),!this.datum)return;this.x=Bt(Math.round(c(X(this.datum,this.accessors.x,this.datumIndex))),0,this._width),this.show=this.x>=0&&this.x<=this._width&&(!r.hideWhenFarFromPointer||Math.abs(this.x-a)<r.hideWhenFarFromPointerDistance)}else this.x=Bt(a,l[0],l[1]),this.show=a>=l[0]-2&&a<=l[1]+2;window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{this._render()}),this.show?this._showTooltip(e):this._hideTooltip()}_onMouseOut(){this.show=!1,window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{this._render()}),this._hideTooltip()}_showTooltip(e){var n;const{config:i}=this,r=(n=i.tooltip)!==null&&n!==void 0?n:this.tooltip;if(!r)return;const o=r.getContainer()||this.container.node(),[s,a]=r.isContainerBody()?[e.clientX,e.clientY]:Gn(e,o),l=i.template(this.datum,this.xScale.invert(this.x));if(r.config.followCursor=!0,!r.config.horizontalPlacement||r.config.horizontalPlacement===M.Auto){const c=r.isContainerBody()?s-this.container.node().getBoundingClientRect().left:s;r.overrideHorizontalPlacement(c>this._containerWidth/2?M.Left:M.Right)}l&&r.show(l,{x:s,y:a})}_hideTooltip(){var e;const{config:n}=this,i=(e=n.tooltip)!==null&&e!==void 0?e:this.tooltip;i==null||i.hide()}getYDataExtent(){return[void 0,void 0]}getCircleData(){var e,n;const{config:i,datamodel:{data:r}}=this;if(Wr(i.getCircles))return i.getCircles(this.xScale.invert(this.x),r,this.yScale);if(i.snapToData&&this.datum){const o=(e=this.accessors.y)!==null&&e!==void 0?e:[],s=(n=this.accessors.yStacked)!==null&&n!==void 0?n:[],a=X(this.datum,this.accessors.baseline,this.datumIndex)||0,l=Th(this.datum,this.datumIndex,...s).map((h,u,f)=>({y:this.yScale(h+a),opacity:xt(X(this.datum,s[u]))?1:0,color:pt(this.datum,i.color,u),strokeColor:i.strokeColor?pt(this.datum,i.strokeColor,u):void 0,strokeWidth:i.strokeWidth?X(this.datum,i.strokeWidth,u):void 0})),c=o.map((h,u)=>{const f=X(this.datum,h);return{y:this.yScale(f),opacity:xt(f)?1:0,color:pt(this.datum,i.color,l.length+u),strokeColor:i.strokeColor?pt(this.datum,i.strokeColor,u):void 0,strokeWidth:i.strokeWidth?X(this.datum,i.strokeWidth,u):void 0}});return l.concat(c)}return[]}}dc.selectors=Ev;const Nv=Object.assign(Object.assign({},Ve),{color:void 0,curveType:W.MonotoneX,baseline:()=>0,opacity:1,cursor:null,minHeight1Px:!1}),gc=O`
|
|
335
369
|
label: area-component;
|
|
336
|
-
`,
|
|
370
|
+
`,Dv=Jt`
|
|
337
371
|
:root {
|
|
338
372
|
--vis-area-cursor: default;
|
|
339
373
|
--vis-area-fill-opacity: 1;
|
|
@@ -348,11 +382,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
348
382
|
--vis-dark-area-stroke-color: none;
|
|
349
383
|
}
|
|
350
384
|
|
|
351
|
-
body.theme-dark ${`.${
|
|
385
|
+
body.theme-dark ${`.${gc}`} {
|
|
352
386
|
--vis-area-stroke-color: var(--vis-dark-area-stroke-color);
|
|
353
387
|
}
|
|
354
388
|
|
|
355
|
-
`,
|
|
389
|
+
`,Ir=O`
|
|
356
390
|
label: area;
|
|
357
391
|
cursor: var(--vis-area-cursor);
|
|
358
392
|
fill-opacity: var(--vis-area-fill-opacity);
|
|
@@ -365,9 +399,70 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
365
399
|
fill-opacity: var(--vis-area-hover-fill-opacity);
|
|
366
400
|
stroke-width: var(--vis-area-hover-stroke-width);
|
|
367
401
|
}
|
|
368
|
-
`,Um=Object.freeze(Object.defineProperty({__proto__:null,area:hr,globalStyles:Im,root:Fl},Symbol.toStringTag,{value:"Module"}));class pi extends ai{constructor(e){super(),this._defaultConfig=zm,this.config=this._defaultConfig,this.stacked=!0,this.events={[pi.selectors.area]:{}},e&&this.setConfig(e),this.stacked=Array.isArray(this.config.y)}_render(e){super._render(e);const{config:n,datamodel:{data:i}}=this,r=wt(e)?e:n.duration,o=nr[n.curveType];this._areaGen=l0().x(p=>p.x).y0(p=>p.y0).y1(p=>{const v=Math.abs(p.y1-p.y0)<1;return p.y1-(v&&n.minHeight1Px?1:0)}).curve(o);const s=jt(n.y)?n.y:[n.y],a=i.map((p,v)=>this.xScale(V(p,n.x,v))),l=Gu(i,n.baseline,s,this._prevNegative);this._prevNegative=l.map(p=>!!p.isMostlyNegative);const c=l.map(p=>p.map((v,_)=>({y0:this.yScale(v[0]),y1:this.yScale(v[1]),x:a[_]}))),h=c.length-1,u=c.reverse(),f=this.g.selectAll(`.${hr}`).data(u),d=f.enter().append("path").attr("class",hr).attr("d",p=>this._areaGen(p)||this._emptyPath()).style("opacity",0).style("fill",(p,v)=>bt(i,n.color,h-v)),g=ct(d.merge(f),r).style("opacity",(p,v)=>p.some(x=>x.y0-x.y1!==0)?V(i,n.opacity,h-v):0).style("fill",(p,v)=>bt(i,n.color,h-v)).style("cursor",(p,v)=>Qn(i,n.cursor,h-v));r?g.attrTween("d",(v,_,x)=>{const y=Z(x[_]).attr("d"),T=this._areaGen(v)||this._emptyPath();return bl(y,T)}):g.attr("d",p=>this._areaGen(p)||this._emptyPath()),ct(f.exit(),r).style("opacity",0).remove()}getYDataExtent(e){const{config:n,datamodel:i}=this,r=jt(n.y)?n.y:[n.y],o=e?Ys(i.data,this.xScale.domain(),n.x):i.data;return Xu(o,n.baseline,...r)}_emptyPath(){const e=this.xScale.range(),n=this.yScale.domain(),i=this.yScale((n[0]+n[1])/2),r=i;return this._areaGen([{y0:i,y1:r,x:e[0]},{y0:i,y1:r,x:e[1]}])}}pi.selectors=Um;const Qr=Symbol("componentAccessorKey"),Pl=Symbol("tooltipAccessorKey"),Bl=Symbol("crosshairAccessorKey"),Ll=Symbol("axisAccessorKey"),Hm=Symbol("annotationsAccessorKey");function be(t,e){return Be(t,e)}function ie(t){const e=m.getCurrentInstance(),n=e.attrs;return m.computed(()=>{const i={},r=(e==null?void 0:e.vnode.props)??{};return Object.keys(r).forEach(o=>{i[m.camelize(o)]=t[m.camelize(o)]}),{...i,...n}})}const Wm=m.defineComponent({__name:"index",props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},annotations:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(t,{expose:e}){const n=t,{data:i}=m.toRefs(n),r=ie(n),o=m.ref(),s=m.reactive({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),a=m.ref();return m.watch(i,()=>{o.value&&o.value.setData(i.value,!0)}),m.watchEffect(()=>{var l;s.components.map(c=>c.config),(l=o.value)==null||l.updateContainer({...m.toRaw(r.value),...m.toRaw(s)})}),m.onMounted(()=>{a.value&&(o.value=new Jg(a.value,{...m.toRaw(s)},i.value))}),m.onUnmounted(()=>{var l;return(l=o.value)==null?void 0:l.destroy()}),m.provide(Qr,{data:i,update:l=>s.components=[...s.components,l],destroy:()=>{var l;return s.components=(l=s.components)==null?void 0:l.filter(c=>!c.isDestroyed())}}),m.provide(Ll,{data:i,update:l=>s[`${l.config.type}Axis`]=l,destroy:l=>{s[`${l}Axis`]=void 0}}),m.provide(Bl,{data:i,update:l=>s.crosshair=l,destroy:()=>{s.crosshair=void 0}}),m.provide(Pl,{data:i,update:l=>s.tooltip=l,destroy:()=>{s.tooltip=void 0}}),m.provide(Hm,{data:i,update:l=>s.annotations=l,destroy:()=>{s.annotations=void 0}}),e({component:o}),(l,c)=>(m.openBlock(),m.createElementBlock("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:a,class:"unovis-xy-container"},[m.renderSlot(l.$slots,"default")],512))}}),Ym={"data-vis-component":""},Vm=m.defineComponent({__name:"index",props:{color:{},curveType:{},baseline:{},opacity:{},cursor:{},minHeight1Px:{type:Boolean},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=m.inject(Qr),i=t,r=m.computed(()=>n.data.value??i.data),o=ie(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new pi(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),m.watch(o,(a,l)=>{var c;be(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",Ym))}}),Xm={"data-vis-axis":""},Es=m.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{},y:{},id:{type:Function},color:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=m.inject(Ll),i=t,r=m.computed(()=>n.data.value??i.data),o=ie(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new Al(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy(i.type)}),m.watch(o,(a,l)=>{var c;be(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",Xm))}}),qm={"data-vis-crosshair":""},Gm=m.defineComponent({__name:"index",props:{data:{}},setup(t,{expose:e}){const n=m.inject(Bl),i=t,r=m.computed(()=>n.data.value??i.data),o=ie(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new Rl(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),m.watch(o,(a,l)=>{var c;be(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",qm))}}),jm={"data-vis-component":""},Zm=m.defineComponent({__name:"index",props:{color:{},curveType:{},lineWidth:{},lineDashArray:{},fallbackValue:{},highlightOnHover:{type:Boolean},cursor:{},interpolateMissingData:{type:Boolean},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=m.inject(Qr),i=t,r=m.computed(()=>n.data.value??i.data),o=ie(i),s=m.ref();return m.onMounted(()=>{m.nextTick(()=>{var a;s.value=new fi(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),m.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),m.watch(o,(a,l)=>{var c;be(a,l)||(c=s.value)==null||c.setConfig(o.value)}),m.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(m.openBlock(),m.createElementBlock("div",jm))}}),Qm={"data-vis-tooltip":""},Jm=m.defineComponent({__name:"index",props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},data:{}},setup(t,{expose:e}){const n=m.inject(Pl),i=ie(t),r=m.ref();return m.onMounted(()=>{m.nextTick(()=>{r.value=new Ka(i.value),n.update(r.value)})}),m.onUnmounted(()=>{var o;(o=r.value)==null||o.destroy(),n.destroy()}),m.watch(i,(o,s)=>{var a;be(o,s)||(a=r.value)==null||a.setConfig(i.value)}),e({component:r}),(o,s)=>(m.openBlock(),m.createElementBlock("div",Qm))}}),Km=m.defineComponent({__name:"index",props:{items:{},labelClassName:{},onLegendItemClick:{type:Function},labelFontSize:{},labelMaxWidth:{},bulletSize:{},bulletShape:{},orientation:{},renderIntoProvidedDomNode:{type:Boolean},data:{}},setup(t,{expose:e}){const n=t;m.computed(()=>n.data);const i=ie(n),r=m.ref(),o=m.ref();return m.onMounted(()=>{m.nextTick(()=>{o.value&&(r.value=new Nl(o.value,{...i.value,renderIntoProvidedDomNode:!0}))})}),m.onUnmounted(()=>{var s;(s=r.value)==null||s.destroy()}),m.watch(i,(s,a)=>{var l;be(s,a)||(l=r.value)==null||l.update(i.value)}),e({component:r}),(s,a)=>(m.openBlock(),m.createElementBlock("div",{"data-vis-bullet-legend":"",ref_key:"elRef",ref:o},null,512))}});(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".unovis-xy-container,.unovis-single-container{display:block;position:relative;width:100%}[data-vis-leaflet-map],[data-vis-leaflet-flow-map]{display:block;position:relative}[data-vis-bullet-legend]{display:block}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const tv={key:0,class:"flex items center justify-end"},ev=m.defineComponent({__name:"AreaChart",props:{data:{},height:{},xLabel:{},yLabel:{},categories:{},xFormatter:{},yFormatter:{},curveType:{},xNumTicks:{default:t=>t.data.length>24?24/4:t.data.length-1},yNumTicks:{default:t=>t.data.length>24?24/4:t.data.length-1},hideLegend:{type:Boolean},hideTooltip:{type:Boolean},gridLineX:{type:Boolean},domainLineX:{type:Boolean},gridLineY:{type:Boolean},domainLineY:{type:Boolean},paginationPoisition:{}},setup(t){const e=t,n=Object.values(e.categories).map(s=>s.color),i=m.computed(()=>s=>{const a=m.createApp(zl,{data:s,categories:e.categories}),l=document.createElement("div");a.mount(l);const c=l.innerHTML;return a.unmount(),c});function r(s){var a;return{y:l=>Number(l[s]),color:((a=e.categories[s])==null?void 0:a.color)??"#3b82f6"}}const o=n.map((s,a)=>`
|
|
402
|
+
`,Ov=Object.freeze(Object.defineProperty({__proto__:null,area:Ir,globalStyles:Dv,root:gc},Symbol.toStringTag,{value:"Module"}));class Pi extends xn{constructor(e){super(),this._defaultConfig=Nv,this.config=this._defaultConfig,this.stacked=!0,this.events={[Pi.selectors.area]:{}},e&&this.setConfig(e),this.stacked=Array.isArray(this.config.y)}_render(e){super._render(e);const{config:n,datamodel:{data:i}}=this,r=xt(e)?e:n.duration,o=Er[n.curveType];this._areaGen=G0().x(p=>p.x).y0(p=>p.y0).y1(p=>{const v=Math.abs(p.y1-p.y0)<1;return p.y1-(v&&n.minHeight1Px?1:0)}).curve(o);const s=Gt(n.y)?n.y:[n.y],a=i.map((p,v)=>this.xScale(X(p,n.x,v))),l=Ch(i,n.baseline,s,this._prevNegative);this._prevNegative=l.map(p=>!!p.isMostlyNegative);const c=l.map(p=>p.map((v,y)=>({y0:this.yScale(v[0]),y1:this.yScale(v[1]),x:a[y]}))),h=c.length-1,u=c.reverse(),f=this.g.selectAll(`.${Ir}`).data(u),g=f.enter().append("path").attr("class",Ir).attr("d",p=>this._areaGen(p)||this._emptyPath()).style("opacity",0).style("fill",(p,v)=>pt(i,n.color,h-v)),m=q(g.merge(f),r).style("opacity",(p,v)=>p.some(x=>x.y0-x.y1!==0)?X(i,n.opacity,h-v):0).style("fill",(p,v)=>pt(i,n.color,h-v)).style("cursor",(p,v)=>Oe(i,n.cursor,h-v));r?m.attrTween("d",(v,y,x)=>{const _=at(x[y]).attr("d"),w=this._areaGen(v)||this._emptyPath();return Ql(_,w)}):m.attr("d",p=>this._areaGen(p)||this._emptyPath()),q(f.exit(),r).style("opacity",0).remove()}getYDataExtent(e){const{config:n,datamodel:i}=this,r=Gt(n.y)?n.y:[n.y],o=e?wa(i.data,this.xScale.domain(),n.x):i.data;return Sh(o,n.baseline,...r)}_emptyPath(){const e=this.xScale.range(),n=this.yScale.domain(),i=this.yScale((n[0]+n[1])/2),r=i;return this._areaGen([{y0:i,y1:r,x:e[0]},{y0:i,y1:r,x:e[1]}])}}Pi.selectors=Ov;const Rv=Object.assign(Object.assign({},yo),{id:(t,e)=>{var n;return(n=t.id)!==null&&n!==void 0?n:e},value:void 0,angleRange:[0,2*Math.PI],padAngle:0,sortFunction:void 0,cornerRadius:0,color:void 0,radius:void 0,arcWidth:20,centralLabel:void 0,centralSubLabel:void 0,centralSubLabelWrap:!0,showEmptySegments:!1,emptySegmentAngle:.5*Math.PI/180,showBackground:!0,backgroundAngleRange:void 0,centralLabelOffsetX:void 0,centralLabelOffsetY:void 0});function Lv(t,e){t.style("fill",n=>pt(n.data,e.color,n.index)).style("opacity",0).each((n,i,r)=>{const o=r[i],s=(n.startAngle+n.endAngle)/2,a=(n.endAngle-n.startAngle)/2;o._animState={startAngle:s-a,endAngle:s+a,innerRadius:n.innerRadius,outerRadius:n.outerRadius,padAngle:n.padAngle}})}function Bv(t,e,n,i){t.style("transition",`fill ${i}ms`).style("fill",o=>pt(o.data,e.color,o.index));const r=o=>e.showEmptySegments||o.value?1:0;i?q(t,i).style("opacity",r).attrTween("d",(s,a,l)=>{const c=l[a],h={startAngle:s.startAngle,endAngle:s.endAngle,innerRadius:s.innerRadius,outerRadius:s.outerRadius,padAngle:s.padAngle},u=ke(c._animState,h);return f=>(c._animState=u(f),n(c._animState))}):t.attr("d",n).style("opacity",r)}function Fv(t,e){q(t,e).style("opacity",0).remove()}const pc=Array.from({length:4},(t,e)=>{const n=-Math.PI/2+e*Math.PI/2;return[n,n+Math.PI]}),[D_,O_,R_,L_]=pc,mc=O`
|
|
403
|
+
label: donut-component;
|
|
404
|
+
`,Pv=Jt`
|
|
405
|
+
:root {
|
|
406
|
+
--vis-donut-central-label-font-size: 16px;
|
|
407
|
+
--vis-donut-central-label-text-color: #5b5f6d;
|
|
408
|
+
// Undefined by default to allow proper fallback to var(--vis-font-family)
|
|
409
|
+
/* --vis-donut-central-label-font-family: */
|
|
410
|
+
--vis-donut-central-label-font-weight: 600;
|
|
411
|
+
|
|
412
|
+
--vis-donut-central-sub-label-font-size: 12px;
|
|
413
|
+
--vis-donut-central-sub-label-text-color: #5b5f6d;
|
|
414
|
+
// Undefined by default to allow proper fallback to var(--vis-font-family)
|
|
415
|
+
/* --vis-donut-central-sub-label-font-family: */
|
|
416
|
+
--vis-donut-central-sub-label-font-weight: 500;
|
|
417
|
+
|
|
418
|
+
--vis-donut-background-color: #E7E9F3;
|
|
419
|
+
--vis-donut-segment-stroke-width: 0;
|
|
420
|
+
// The line segment color variable is not defined by default
|
|
421
|
+
// to allow it to fallback to the donut background color
|
|
422
|
+
/* --vis-donut-segment-stroke-color: none; */
|
|
423
|
+
|
|
424
|
+
--vis-dark-donut-central-label-text-color: #C2BECE;
|
|
425
|
+
--vis-dark-donut-central-sub-label-text-color: #C2BECE;
|
|
426
|
+
--vis-dark-donut-background-color: #18160C;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
body.theme-dark ${`.${mc}`} {
|
|
430
|
+
--vis-donut-central-label-text-color: var(--vis-dark-donut-central-label-text-color);
|
|
431
|
+
--vis-donut-central-sub-label-text-color: var(--vis-dark-donut-central-sub-label-text-color);
|
|
432
|
+
--vis-donut-background-color: var(--vis-dark-donut-background-color);
|
|
433
|
+
}
|
|
434
|
+
`,vc=O`
|
|
435
|
+
label: background;
|
|
436
|
+
fill: var(--vis-donut-background-color);
|
|
437
|
+
`,Vr=O`
|
|
438
|
+
label: segment;
|
|
439
|
+
stroke-width: var(--vis-donut-segment-stroke-width);
|
|
440
|
+
stroke: var(--vis-donut-segment-stroke-color, var(--vis-donut-background-color));
|
|
441
|
+
`,_c=O`
|
|
442
|
+
label: segment-exit;
|
|
443
|
+
`,yc=O`
|
|
444
|
+
label: central-label;
|
|
445
|
+
text-anchor: middle;
|
|
446
|
+
dominant-baseline: middle;
|
|
447
|
+
font-size: var(--vis-donut-central-label-font-size);
|
|
448
|
+
font-family: var(--vis-donut-central-label-font-family, var(--vis-font-family));
|
|
449
|
+
font-weight: var(--vis-donut-central-label-font-weight);
|
|
450
|
+
fill: var(--vis-donut-central-label-text-color);
|
|
451
|
+
`,xc=O`
|
|
452
|
+
label: central-label;
|
|
453
|
+
text-anchor: middle;
|
|
454
|
+
dominant-baseline: middle;
|
|
455
|
+
font-size: var(--vis-donut-central-sub-label-font-size);
|
|
456
|
+
font-family: var(--vis-donut-central-sub-label-font-family, var(--vis-font-family));
|
|
457
|
+
font-weight: var(--vis-donut-central-sub-label-font-weight);
|
|
458
|
+
fill: var(--vis-donut-central-sub-label-text-color);
|
|
459
|
+
`,zv=Object.freeze(Object.defineProperty({__proto__:null,background:vc,centralLabel:yc,centralSubLabel:xc,root:mc,segment:Vr,segmentExit:_c,variables:Pv},Symbol.toStringTag,{value:"Module"}));class $o extends Al{constructor(e){super(),this._defaultConfig=Rv,this.config=this._defaultConfig,this.datamodel=new Ml,this.arcGen=X0(),this.events={},e&&this.setConfig(e),this.arcBackground=this.g.append("path"),this.arcGroup=this.g.append("g"),this.centralLabel=this.g.append("text").attr("class",yc),this.centralSubLabel=this.g.append("text").attr("class",xc)}get bleed(){return{top:0,bottom:0,left:0,right:0}}_render(e){var n,i,r,o,s,a,l,c,h,u,f,g,m,p;const{config:v,datamodel:y,bleed:x}=this,_=y.data.map((N,st)=>({index:st,datum:N})).filter(N=>v.showEmptySegments||X(N.datum,v.value,N.index)),w=xt(e)?e:v.duration,[k,b,T,R]=pc.map(N=>v.angleRange&&v.angleRange[0]===N[0]&&v.angleRange[1]===N[1]),E=k||T,U=b||R,$=this._width*(U?2:1),F=this._height*(E?2:1),C=v.radius||Math.min($-x.left-x.right,F-x.top-x.bottom)/2,D=v.arcWidth===0?0:Bt(C-v.arcWidth,0,C-1),et=this._height/2+(k?C/2:T?-C/2:0),lt=this._width/2+(R?C/2:b?-C/2:0),nt=`translate(${lt},${et})`;this.arcGroup.attr("transform",nt),this.arcGen.startAngle(N=>N.startAngle).endAngle(N=>N.endAngle).innerRadius(N=>N.innerRadius).outerRadius(N=>N.outerRadius).padAngle(N=>N.padAngle).cornerRadius(v.cornerRadius);const Q=Z0().startAngle((i=(n=v.angleRange)===null||n===void 0?void 0:n[0])!==null&&i!==void 0?i:0).endAngle((o=(r=v.angleRange)===null||r===void 0?void 0:r[1])!==null&&o!==void 0?o:2*Math.PI).padAngle(v.padAngle).value(N=>X(N.datum,v.value,N.index)||0).sort((N,st)=>{var A;return(A=v.sortFunction)===null||A===void 0?void 0:A.call(v,N.datum,st.datum)})(_).map(N=>{const st=Object.assign(Object.assign({},N),{data:N.data.datum,index:N.data.index,innerRadius:D,outerRadius:C});return v.showEmptySegments&&N.endAngle-N.startAngle-N.padAngle<=Number.EPSILON&&(st.endAngle=N.startAngle+Math.max(v.emptySegmentAngle,v.padAngle),st.padAngle=N.padAngle/2),st}),Dt=this.arcGroup.selectAll(`.${Vr}`).data(Q,N=>v.id(N.data,N.index)),Kt=Dt.enter().append("path").attr("class",Vr).call(Lv,v),Vt=Dt.merge(Kt);Vt.call(Bv,v,this.arcGen,w),Vt.sort((N,st)=>st.value-N.value),Dt.exit().attr("class",_c).call(Fv,w);const te=b?"start":R?"end":"middle";this.centralLabel.attr("dy",v.centralSubLabel?"-0.55em":null).style("text-anchor",te).text((s=v.centralLabel)!==null&&s!==void 0?s:null),this.centralSubLabel.attr("dy",v.centralLabel?"0.55em":null).style("text-anchor",te).text((a=v.centralSubLabel)!==null&&a!==void 0?a:null),v.centralSubLabelWrap&&cv(this.centralSubLabel,D*1.9);const ue=(v.centralLabelOffsetX||0)+lt;let ut=(v.centralLabelOffsetY||0)+et;E&&v.centralLabelOffsetX===void 0&&v.centralLabelOffsetY===void 0&&(ut=(k?-this.centralSubLabel.node().getBoundingClientRect().height:T?this.centralLabel.node().getBoundingClientRect().height:0)+et);const ee=`translate(${ue},${ut})`;this.centralLabel.attr("transform",ee),this.centralSubLabel.attr("transform",ee),this.arcBackground.attr("class",vc).attr("visibility",v.showBackground?null:"hidden").attr("transform",nt),q(this.arcBackground,w).attr("d",this.arcGen({startAngle:(u=(c=(l=v.backgroundAngleRange)===null||l===void 0?void 0:l[0])!==null&&c!==void 0?c:(h=v.angleRange)===null||h===void 0?void 0:h[0])!==null&&u!==void 0?u:0,endAngle:(p=(g=(f=v.backgroundAngleRange)===null||f===void 0?void 0:f[1])!==null&&g!==void 0?g:(m=v.angleRange)===null||m===void 0?void 0:m[1])!==null&&p!==void 0?p:2*Math.PI,innerRadius:D,outerRadius:C}))}}$o.selectors=zv;const He=Symbol("componentAccessorKey"),Eo=Symbol("tooltipAccessorKey"),bc=Symbol("crosshairAccessorKey"),wc=Symbol("axisAccessorKey"),kc=Symbol("annotationsAccessorKey");function ce(t,e){return sn(t,e)}function It(t){const e=d.getCurrentInstance(),n=e.attrs;return d.computed(()=>{const i={},r=(e==null?void 0:e.vnode.props)??{};return Object.keys(r).forEach(o=>{i[d.camelize(o)]=t[d.camelize(o)]}),{...i,...n}})}const zi=d.defineComponent({__name:"index",props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},annotations:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(t,{expose:e}){const n=t,{data:i}=d.toRefs(n),r=It(n),o=d.ref(),s=d.reactive({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),a=d.ref();return d.watch(i,()=>{o.value&&o.value.setData(i.value,!0)}),d.watchEffect(()=>{var l;s.components.map(c=>c.config),(l=o.value)==null||l.updateContainer({...d.toRaw(r.value),...d.toRaw(s)})}),d.onMounted(()=>{a.value&&(o.value=new E0(a.value,{...d.toRaw(s)},i.value))}),d.onUnmounted(()=>{var l;return(l=o.value)==null?void 0:l.destroy()}),d.provide(He,{data:i,update:l=>s.components=[...s.components,l],destroy:()=>{var l;return s.components=(l=s.components)==null?void 0:l.filter(c=>!c.isDestroyed())}}),d.provide(wc,{data:i,update:l=>s[`${l.config.type}Axis`]=l,destroy:l=>{s[`${l}Axis`]=void 0}}),d.provide(bc,{data:i,update:l=>s.crosshair=l,destroy:()=>{s.crosshair=void 0}}),d.provide(Eo,{data:i,update:l=>s.tooltip=l,destroy:()=>{s.tooltip=void 0}}),d.provide(kc,{data:i,update:l=>s.annotations=l,destroy:()=>{s.annotations=void 0}}),e({component:o}),(l,c)=>(d.openBlock(),d.createElementBlock("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:a,class:"unovis-xy-container"},[d.renderSlot(l.$slots,"default")],512))}}),Iv=d.defineComponent({__name:"index",props:{component:{},tooltip:{},annotations:{},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},data:{}},setup(t,{expose:e}){const n=t,{data:i}=d.toRefs(n),r=It(n);let o;const s=d.reactive({component:void 0,tooltip:void 0,annotations:void 0}),a=d.ref(),l=()=>{o||a.value&&s.component&&(o=new Lg(a.value,{...d.toRaw(s)},i.value))};return d.watchEffect(()=>{var c;l(),(c=s.component)==null||c.config,o==null||o.updateContainer({...d.toRaw(r.value),...d.toRaw(s)})}),d.watch(i,()=>{o?o.setData(i.value,!0):l()}),d.onUnmounted(()=>o==null?void 0:o.destroy()),d.provide(He,{data:i,update:c=>s.component=c,destroy:()=>s.component=void 0}),d.provide(Eo,{data:i,update:c=>s.tooltip=c,destroy:()=>{s.tooltip=void 0}}),d.provide(kc,{data:i,update:c=>s.annotations=c,destroy:()=>{s.annotations=void 0}}),e({component:o}),(c,h)=>(d.openBlock(),d.createElementBlock("div",{"data-vis-single-container":"",ref_key:"elRef",ref:a,class:"unovis-single-container"},[d.renderSlot(c.$slots,"default")],512))}}),Vv={"data-vis-component":""},Sc=d.defineComponent({__name:"index",props:{color:{},curveType:{},baseline:{},opacity:{},cursor:{},minHeight1Px:{type:Boolean},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=d.inject(He),i=t,r=d.computed(()=>n.data.value??i.data),o=It(i),s=d.ref();return d.onMounted(()=>{d.nextTick(()=>{var a;s.value=new Pi(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),d.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),d.watch(o,(a,l)=>{var c;ce(a,l)||(c=s.value)==null||c.setConfig(o.value)}),d.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(d.openBlock(),d.createElementBlock("div",Vv))}}),Hv={"data-vis-axis":""},le=d.defineComponent({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{},tickTextColor:{},tickTextAngle:{},tickTextHideOverlapping:{type:Boolean},tickPadding:{},x:{},y:{},id:{type:Function},color:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=d.inject(wc),i=t,r=d.computed(()=>n.data.value??i.data),o=It(i),s=d.ref();return d.onMounted(()=>{d.nextTick(()=>{var a;s.value=new ac(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),d.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy(i.type)}),d.watch(o,(a,l)=>{var c;ce(a,l)||(c=s.value)==null||c.setConfig(o.value)}),d.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(d.openBlock(),d.createElementBlock("div",Hv))}}),Uv={"data-vis-crosshair":""},Tc=d.defineComponent({__name:"index",props:{data:{}},setup(t,{expose:e}){const n=d.inject(bc),i=t,r=d.computed(()=>n.data.value??i.data),o=It(i),s=d.ref();return d.onMounted(()=>{d.nextTick(()=>{var a;s.value=new dc(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),d.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),d.watch(o,(a,l)=>{var c;ce(a,l)||(c=s.value)==null||c.setConfig(o.value)}),d.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(d.openBlock(),d.createElementBlock("div",Uv))}}),Wv={"data-vis-component":""};Bi.selectors;const Yv=d.defineComponent({__name:"index",props:{color:{},groupWidth:{},groupMaxWidth:{},dataStep:{},groupPadding:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},barMinHeight:{},cursor:{},orientation:{},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=d.inject(He),i=t,r=d.computed(()=>n.data.value??i.data),o=It(i),s=d.ref();return d.onMounted(()=>{d.nextTick(()=>{var a;s.value=new Bi(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),d.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),d.watch(o,(a,l)=>{var c;ce(a,l)||(c=s.value)==null||c.setConfig(o.value)}),d.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(d.openBlock(),d.createElementBlock("div",Wv))}}),Xv={"data-vis-component":""},Cc=d.defineComponent({__name:"index",props:{color:{},curveType:{},lineWidth:{},lineDashArray:{},fallbackValue:{},highlightOnHover:{type:Boolean},cursor:{},interpolateMissingData:{type:Boolean},x:{},y:{},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=d.inject(He),i=t,r=d.computed(()=>n.data.value??i.data),o=It(i),s=d.ref();return d.onMounted(()=>{d.nextTick(()=>{var a;s.value=new Li(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),d.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),d.watch(o,(a,l)=>{var c;ce(a,l)||(c=s.value)==null||c.setConfig(o.value)}),d.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(d.openBlock(),d.createElementBlock("div",Xv))}}),Gv={"data-vis-component":""},qv=d.defineComponent({__name:"index",props:{id:{type:Function},value:{},angleRange:{},padAngle:{},sortFunction:{type:Function},cornerRadius:{},color:{},radius:{},arcWidth:{},centralLabel:{},centralSubLabel:{},centralSubLabelWrap:{type:Boolean},showEmptySegments:{type:Boolean},emptySegmentAngle:{},showBackground:{type:Boolean},backgroundAngleRange:{},centralLabelOffsetX:{},centralLabelOffsetY:{},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=d.inject(He),i=t,r=d.computed(()=>n.data.value??i.data),o=It(i),s=d.ref();return d.onMounted(()=>{d.nextTick(()=>{var a;s.value=new $o(o.value),(a=s.value)==null||a.setData(r.value),n.update(s.value)})}),d.onUnmounted(()=>{var a;(a=s.value)==null||a.destroy(),n.destroy()}),d.watch(o,(a,l)=>{var c;ce(a,l)||(c=s.value)==null||c.setConfig(o.value)}),d.watch(r,()=>{var a;(a=s.value)==null||a.setData(r.value)}),e({component:s}),(a,l)=>(d.openBlock(),d.createElementBlock("div",Gv))}}),jv={"data-vis-tooltip":""},Ii=d.defineComponent({__name:"index",props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},data:{}},setup(t,{expose:e}){const n=d.inject(Eo),i=It(t),r=d.ref();return d.onMounted(()=>{d.nextTick(()=>{r.value=new Nl(i.value),n.update(r.value)})}),d.onUnmounted(()=>{var o;(o=r.value)==null||o.destroy(),n.destroy()}),d.watch(i,(o,s)=>{var a;ce(o,s)||(a=r.value)==null||a.setConfig(i.value)}),e({component:r}),(o,s)=>(d.openBlock(),d.createElementBlock("div",jv))}}),bn=d.defineComponent({__name:"index",props:{items:{},labelClassName:{},onLegendItemClick:{type:Function},labelFontSize:{},labelMaxWidth:{},bulletSize:{},bulletShape:{},orientation:{},renderIntoProvidedDomNode:{type:Boolean},data:{}},setup(t,{expose:e}){const n=t;d.computed(()=>n.data);const i=It(n),r=d.ref(),o=d.ref();return d.onMounted(()=>{d.nextTick(()=>{o.value&&(r.value=new uc(o.value,{...i.value,renderIntoProvidedDomNode:!0}))})}),d.onUnmounted(()=>{var s;(s=r.value)==null||s.destroy()}),d.watch(i,(s,a)=>{var l;ce(s,a)||(l=r.value)==null||l.update(i.value)}),e({component:r}),(s,a)=>(d.openBlock(),d.createElementBlock("div",{"data-vis-bullet-legend":"",ref_key:"elRef",ref:o},null,512))}});(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".unovis-xy-container,.unovis-single-container{display:block;position:relative;width:100%}[data-vis-leaflet-map],[data-vis-leaflet-flow-map]{display:block;position:relative}[data-vis-bullet-legend]{display:block}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const Zv={key:0,class:"flex items center justify-end"},Qv=d.defineComponent({__name:"AreaChart",props:{data:{},height:{},xLabel:{},yLabel:{},categories:{},xFormatter:{},yFormatter:{},curveType:{},xNumTicks:{default:t=>t.data.length>24?24/4:t.data.length-1},yNumTicks:{default:t=>t.data.length>24?24/4:t.data.length-1},hideLegend:{type:Boolean},hideTooltip:{type:Boolean},gridLineX:{type:Boolean},domainLineX:{type:Boolean},gridLineY:{type:Boolean},domainLineY:{type:Boolean},paginationPoisition:{}},setup(t){const e=t,n=Object.values(e.categories).map(s=>s.color),i=d.computed(()=>s=>{const a=d.createApp(Vi,{data:s,categories:e.categories}),l=document.createElement("div");a.mount(l);const c=l.innerHTML;return a.unmount(),c});function r(s){var a;return{y:l=>Number(l[s]),color:((a=e.categories[s])==null?void 0:a.color)??"#3b82f6"}}const o=n.map((s,a)=>`
|
|
369
460
|
<linearGradient id="gradient${a}-${s}" gradientTransform="rotate(90)">
|
|
370
461
|
<stop offset="0%" stop-color="${s}" stop-opacity="1" />
|
|
371
462
|
<stop offset="100%" stop-color="${s}" stop-opacity="0" />
|
|
372
463
|
</linearGradient>
|
|
373
|
-
`).join("");return(s,a)=>(
|
|
464
|
+
`).join("");return(s,a)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["flex flex-col space-y-4",{"flex-col-reverse":e.paginationPoisition==="top"}])},[d.createVNode(d.unref(zi),{data:s.data,height:s.height,"svg-defs":d.unref(o)},{default:d.withCtx(()=>[s.hideTooltip?d.createCommentVNode("",!0):(d.openBlock(),d.createBlock(d.unref(Ii),{key:0,"horizontal-placement":d.unref(M).Right,"vertical-placement":d.unref(M).Top},null,8,["horizontal-placement","vertical-placement"])),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(Object.keys(e.categories),(l,c)=>(d.openBlock(),d.createElementBlock(d.Fragment,{key:c},[d.createVNode(d.unref(Sc),d.mergeProps({x:(h,u)=>u,ref_for:!0},r(l),{color:`url(#gradient${c}-${d.unref(n)[c]})`,opacity:.5,"curve-type":s.curveType??d.unref(W).MonotoneX}),null,16,["x","color","curve-type"]),d.createVNode(d.unref(Cc),{x:(h,u)=>u,y:h=>h[l],color:d.unref(n)[c],"curve-type":s.curveType??d.unref(W).MonotoneX},null,8,["x","y","color","curve-type"])],64))),128)),d.createVNode(d.unref(le),{type:"x","tick-format":s.xFormatter,"num-ticks":s.xNumTicks,label:s.xLabel,"grid-line":s.gridLineX,"domain-line":s.domainLineX,"tick-line":!!s.gridLineX},null,8,["tick-format","num-ticks","label","grid-line","domain-line","tick-line"]),d.createVNode(d.unref(le),{type:"y","num-ticks":s.yNumTicks??s.data.length,"tick-format":s.yFormatter,label:s.yLabel,"grid-line":s.gridLineY,"domain-line":s.domainLineY,"tick-line":!!s.gridLineY},null,8,["num-ticks","tick-format","label","grid-line","domain-line","tick-line"]),s.hideTooltip?d.createCommentVNode("",!0):(d.openBlock(),d.createBlock(d.unref(Tc),{key:1,color:"#666",template:i.value},null,8,["template"]))]),_:1},8,["data","height","svg-defs"]),s.hideLegend?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",Zv,[d.createVNode(d.unref(bn),{items:Object.values(s.categories)},null,8,["items"])]))],2))}}),Jv={class:"flex flex-col space-y-4"},Kv={class:"flex items center justify-end"},t_=d.defineComponent({__name:"AreaStackedChart",props:{data:{},categories:{}},setup(t){const e=t,n=r=>Number.parseInt(r.date),i=[r=>r.firstTime,r=>r.returning];return(r,o)=>(d.openBlock(),d.createElementBlock("div",Jv,[d.createVNode(d.unref(zi),{data:r.data,height:200},{default:d.withCtx(()=>[d.createVNode(d.unref(Sc),{x:n,y:i,color:Object.values(e.categories).map(s=>s.color),"curve-type":d.unref(W).Linear},null,8,["color","curve-type"]),d.createVNode(d.unref(le),{type:"x",label:"Time","num-ticks":12}),d.createVNode(d.unref(le),{type:"y",label:"Number of visitors","num-ticks":3})]),_:1},8,["data"]),d.createElementVNode("div",Kv,[d.createVNode(d.unref(bn),{items:Object.values(r.categories)},null,8,["items"])])]))}}),e_={class:"space-y-2"},n_={key:0,class:"flex items center justify-end"},i_=d.defineComponent({__name:"BarChart",props:{data:{},height:{},xLabel:{},yLabel:{},categories:{},xFormatter:{type:Function},yFormatter:{type:Function},yNumTicks:{},xNumTicks:{},yAxis:{},groupPadding:{},barPadding:{},radius:{},hideLegend:{type:Boolean}},setup(t){const e=t,n=e.yAxis.map(o=>s=>s[o]),i=(o,s)=>Object.values(e.categories)[s].color,r=d.computed(()=>o=>{const s=d.createApp(Vi,{data:o,categories:e.categories}),a=document.createElement("div");s.mount(a);const l=a.innerHTML;return s.unmount(),l});return(o,s)=>(d.openBlock(),d.createElementBlock("div",e_,[d.createVNode(d.unref(zi),{height:o.height},{default:d.withCtx(()=>[d.createVNode(d.unref(Ii),{triggers:{[d.unref(Bi).selectors.bar]:r.value}},null,8,["triggers"]),d.createVNode(d.unref(Yv),{data:o.data,x:(a,l)=>l,y:d.unref(n),"grid-line":!1,"domain-line":!1,color:i,"rounded-corners":o.radius??0,"group-padding":o.groupPadding??0,"bar-padding":o.barPadding??0},null,8,["data","x","y","rounded-corners","group-padding","bar-padding"]),d.createVNode(d.unref(le),{type:"x",label:o.xLabel,"grid-line":!1,"domain-line":!1,"tick-format":o.xFormatter,"num-ticks":o.xNumTicks},null,8,["label","tick-format","num-ticks"]),d.createVNode(d.unref(le),{type:"y",label:o.yLabel,"grid-line":!0,"domain-line":!1,"tick-format":o.yFormatter},null,8,["label","tick-format"])]),_:1},8,["height"]),o.hideLegend?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",n_,[d.createVNode(d.unref(bn),{items:Object.values(o.categories)},null,8,["items"])]))]))}}),r_={class:"flex items-center justify-center"},o_={key:0,class:"flex items-center justify-center mt-4"},s_=d.defineComponent({__name:"DonutChart",props:{type:{},data:{},height:{},radius:{},hidePagination:{type:Boolean},labels:{}},setup(t){const e=t,n=o=>o,i=e.type==="half",r={[$o.selectors.segment]:o=>(console.log(),`<div class='flex items-center'><div class='w-2 h-2 rounded-full mr-2' style='background-color: ${e.labels[o.index].color} ;'></div>
|
|
465
|
+
<div>${o.data}</div>
|
|
466
|
+
</vistooltip>
|
|
467
|
+
</vissinglecontainer>
|
|
468
|
+
</div>`)};return(o,s)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",r_,[d.createVNode(d.unref(Iv),{class:d.normalizeClass(i?"mt-24":""),data:o.data,height:o.height,margin:{}},{default:d.withCtx(()=>[d.createVNode(d.unref(Ii),{"horizontal-shift":20,"vertical-shift":20,triggers:r}),d.createVNode(d.unref(qv),{value:n,"corner-radius":o.radius,color:e.labels.map(a=>a.color),"angle-range":i?[-1.5707963267948966,1.5707963267948966]:[]},null,8,["corner-radius","color","angle-range"])]),_:1},8,["class","data","height"]),d.renderSlot(o.$slots,"default")]),o.hidePagination?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",o_,[d.createVNode(d.unref(bn),{items:o.labels},null,8,["items"])]))],64))}}),a_={class:"flex flex-col"},l_={class:"flex items-center mr-2 mt-2"},c_={class:"font-semibold capitalize text-white/75"},u_={class:"flex items-center gap-2"},h_={class:"font-normal"},Vi=d.defineComponent({__name:"Tooltip",props:{data:{},categories:{}},setup(t){function e(i){var r;return((r=n.categories[i])==null?void 0:r.color)??"#f00"}const n=t;return(i,r)=>(d.openBlock(),d.createElementBlock("div",a_,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(Object.entries(i.data),([o,s])=>{var a;return d.openBlock(),d.createElementBlock(d.Fragment,{key:o},[d.createElementVNode("div",l_,[d.createElementVNode("span",c_,d.toDisplayString(o)+":",1)]),d.createElementVNode("div",u_,[(a=n.categories[o])!=null&&a.color?(d.openBlock(),d.createElementBlock("span",{key:0,style:d.normalizeStyle({backgroundColor:e(o)}),class:"w-2 h-2"},null,4)):d.createCommentVNode("",!0),d.createElementVNode("span",h_,d.toDisplayString(s),1)])],64)}),128))]))}}),f_={class:"flex items center justify-end"},d_=d.defineComponent({__name:"LineChart",props:{data:{},height:{},xLabel:{},yLabel:{},categories:{},xFormatter:{type:Function},yFormatter:{type:Function},curveType:{},yNumTicks:{},xNumTicks:{},paginationPoisition:{}},setup(t){const e=t,n=r=>Object.values(e.categories)[r].color,i=d.computed(()=>r=>{const o=d.createApp(Vi,{data:r,categories:e.categories}),s=document.createElement("div");o.mount(s);const a=s.innerHTML;return o.unmount(),a});return(r,o)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["space-y-4 flex flex-col",{"flex-col-reverse":e.paginationPoisition==="top"}])},[d.createVNode(d.unref(zi),{data:r.data,height:r.height},{default:d.withCtx(()=>[d.createVNode(d.unref(Ii),{"horizontal-placement":d.unref(M).Right,"vertical-placement":d.unref(M).Top},null,8,["horizontal-placement","vertical-placement"]),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(Object.keys(e.categories),(s,a)=>(d.openBlock(),d.createBlock(d.unref(Cc),{key:a,x:(l,c)=>c,y:l=>l[s],color:n(a),"curve-type":r.curveType??d.unref(W).MonotoneX},null,8,["x","y","color","curve-type"]))),128)),d.createVNode(d.unref(le),{type:"x","tick-format":r.xFormatter,"num-ticks":r.xNumTicks??4,label:r.xLabel,"label-margin":8,"domain-line":!1,"grid-line":!1},null,8,["tick-format","num-ticks","label"]),d.createVNode(d.unref(le),{type:"y","num-ticks":r.yNumTicks??4,"tick-format":r.yFormatter,label:r.yLabel,"domain-line":!1},null,8,["num-ticks","tick-format","label"]),d.createVNode(d.unref(Tc),{color:"#666",template:i.value},null,8,["template"])]),_:1},8,["data","height"]),d.createElementVNode("div",f_,[d.createVNode(d.unref(bn),{items:Object.values(r.categories)},null,8,["items"])])],2))}}),g_={class:"space-y-2"},p_={class:"space-y-2"},m_={class:"text-gray-500 mb-1"},v_={class:"text-xl dark:text-white font-bold"},__={class:"flex items-center justify-between text-sm font-medium dark:text-gray-500 mt-2"},y_={class:"dark:bg-white/5 bg-gray-100 rounded-full h-3"},x_=d.defineComponent({__name:"Progress",props:{label:{},value:{},unit:{},progress:{},total:{},color:{}},setup(t){const e=t,n=d.computed(()=>(e.progress/e.total*100).toFixed(1)),i=d.computed(()=>`${e.progress/e.total*100}%`);return(r,o)=>(d.openBlock(),d.createElementBlock("div",g_,[d.createElementVNode("div",p_,[d.createElementVNode("p",m_,d.toDisplayString(r.label),1),d.createElementVNode("h2",v_,d.toDisplayString(r.value),1)]),d.createElementVNode("div",__,[d.createElementVNode("div",null,d.toDisplayString(n.value)+"%",1),d.createElementVNode("div",null,d.toDisplayString(r.progress)+" of "+d.toDisplayString(r.total)+d.toDisplayString(r.unit),1)]),d.createElementVNode("div",y_,[d.createElementVNode("div",{class:"rounded-full h-full",style:d.normalizeStyle({width:i.value,backgroundColor:r.color})},null,4)])]))}}),b_={class:"ring ring-border divide-y divide-border rounded-xl shadow-sm"},w_={class:"flex items-center justify-between p-4"},k_={class:"flex items-center gap-2"},S_={class:"font-medium"},T_={class:"text-sm dark:text-gray-400"},C_={class:"p-4"},A_=d.defineComponent({__name:"Status",setup(t){const e=d.ref("example.com"),n=d.ref("99.9% uptime"),i=d.ref([{hour:0,status:"online"},{hour:1,status:"online"},{hour:2,status:"online"},{hour:3,status:"online"},{hour:4,status:"online"},{hour:5,status:"online"},{hour:6,status:"online"},{hour:7,status:"online"},{hour:8,status:"online"},{hour:9,status:"online"},{hour:10,status:"online"},{hour:11,status:"offline"},{hour:12,status:"online"},{hour:13,status:"online"},{hour:14,status:"online"},{hour:15,status:"online"},{hour:16,status:"online"},{hour:17,status:"online"},{hour:18,status:"online"},{hour:19,status:"online"},{hour:20,status:"online"},{hour:21,status:"online"},{hour:22,status:"online"},{hour:23,status:"online"},{hour:0,status:"online"},{hour:1,status:"online"},{hour:2,status:"online"},{hour:3,status:"online"},{hour:4,status:"online"},{hour:5,status:"online"},{hour:6,status:"online"},{hour:7,status:"online"},{hour:8,status:"online"},{hour:9,status:"online"},{hour:10,status:"online"},{hour:11,status:"online"},{hour:12,status:"online"},{hour:13,status:"online"},{hour:14,status:"online"},{hour:15,status:"online"},{hour:16,status:"online"},{hour:17,status:"online"},{hour:18,status:"online"},{hour:19,status:"online"},{hour:20,status:"online"},{hour:21,status:"online"},{hour:22,status:"online"},{hour:23,status:"online"},{hour:0,status:"online"},{hour:1,status:"online"}]);return(r,o)=>(d.openBlock(),d.createElementBlock("div",b_,[d.createElementVNode("div",w_,[d.createElementVNode("div",k_,[o[0]||(o[0]=d.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"size-6 text-primary"},[d.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})],-1)),d.createElementVNode("span",S_,d.toDisplayString(e.value),1)]),d.createElementVNode("span",T_,d.toDisplayString(n.value),1)]),d.createElementVNode("div",C_,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.value,(s,a)=>(d.openBlock(),d.createElementBlock("div",{key:a,class:d.normalizeClass(["w-2.5 h-8 first:rounded-tl first:rounded-bl last:rounded-tr last:rounded-br ml-[3px] inline-block",s.status==="online"?"bg-primary":"bg-white"])},null,2))),128))])]))}}),M_=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n},$_={};function E_(t,e){return d.openBlock(),d.createElementBlock("div",null,"This is not a button")}const N_=M_($_,[["render",E_]]);exports.AreaChart=Qv;exports.AreaStackedChart=t_;exports.BarChart=i_;exports.Button=N_;exports.DonutChart=s_;exports.LineChart=d_;exports.Progress=x_;exports.Status=A_;exports.Tooltip=Vi;
|