UNPKG

vue-speedometer

Version:

Vue component for showing speedomenter like gauge with d3

1 lines 85.2 kB
import{ref as t,onMounted as e,onUpdated as n,openBlock as r,createElementBlock as i}from'vue';function o(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf('e'))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function a(t){return(t=o(Math.abs(t)))?t[1]:NaN}var u,s=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(t){if(!(e=s.exec(t)))throw new Error('invalid format: '+t);var e;return new c({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]})}function c(t){this.fill=void 0===t.fill?' ':t.fill+'',this.align=void 0===t.align?'>':t.align+'',this.sign=void 0===t.sign?'-':t.sign+'',this.symbol=void 0===t.symbol?'':t.symbol+'',this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?'':t.type+''}function h(t,e){var n=o(t,e);if(!n)return t+'';var r=n[0],i=n[1];return i<0?'0.'+new Array(-i).join('0')+r:r.length>i+1?r.slice(0,i+1)+'.'+r.slice(i+1):r+new Array(i-r.length+2).join('0')}l.prototype=c.prototype,c.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?'0':'')+(void 0===this.width?'':Math.max(1,0|this.width))+(this.comma?',':'')+(void 0===this.precision?'':'.'+Math.max(0,0|this.precision))+(this.trim?'~':'')+this.type};const f={'%':(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+'',d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString('en').replace(/,/g,''):t.toString(10)},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)=>h(100*t,e),r:h,s:function(t,e){var n=o(t,e);if(!n)return t+'';var r=n[0],i=n[1],a=i-(u=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join('0'):a>0?r.slice(0,a)+'.'+r.slice(a):'0.'+new Array(1-a).join('0')+o(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function p(t){return t}var d,g,v,y=Array.prototype.map,m=['y','z','a','f','p','n','µ','m','','k','M','G','T','P','E','Z','Y'];function _(t){var e=void 0===t.grouping||void 0===t.thousands?p:function(t,e){return(n,r)=>{for(var i=n.length,o=[],a=0,u=t[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),o.push(n.substring(i-=u,i+u)),!((s+=u+1)>r));)u=t[a=(a+1)%t.length];return o.reverse().join(e)}}(y.call(t.grouping,Number),t.thousands+''),n=void 0===t.currency?'':t.currency[0]+'',r=void 0===t.currency?'':t.currency[1]+'',i=void 0===t.decimal?'.':t.decimal+'',o=void 0===t.numerals?p:function(t){return e=>e.replace(/[0-9]/g,(e=>t[+e]))}(y.call(t.numerals,String)),s=void 0===t.percent?'%':t.percent+'',c=void 0===t.minus?'−':t.minus+'',h=void 0===t.nan?'NaN':t.nan+'';function d(t){var a=(t=l(t)).fill,p=t.align,d=t.sign,g=t.symbol,v=t.zero,y=t.width,_=t.comma,b=t.precision,w=t.trim,x=t.type;'n'===x?(_=!0,x='g'):f[x]||(void 0===b&&(b=12),w=!0,x='g'),(v||'0'===a&&'='===p)&&(v=!0,a='0',p='=');var M='$'===g?n:'#'===g&&/[boxX]/.test(x)?'0'+x.toLowerCase():'',S='$'===g?r:/[%p]/.test(x)?s:'',A=f[x],$=/[defgprs%]/.test(x);function O(t){var n,r,s,l=M,f=S;if('c'===x)f=A(t)+f,t='';else{var g=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:A(Math.abs(t),b),w&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case'.':i=e=r;break;case'0':0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),g&&0==+t&&'+'!==d&&(g=!1),l=(g?'('===d?d:c:'-'===d||'('===d?'':d)+l,f=('s'===x?m[8+u/3]:'')+f+(g&&'('===d?')':''),$)for(n=-1,r=t.length;++n<r;)if(48>(s=t.charCodeAt(n))||s>57){f=(46===s?i+t.slice(n+1):t.slice(n))+f,t=t.slice(0,n);break}}_&&!v&&(t=e(t,1/0));var O=l.length+t.length+f.length,j=O<y?new Array(y-O+1).join(a):'';switch(_&&v&&(t=e(j+t,j.length?y-f.length:1/0),j=''),p){case'<':t=l+t+f+j;break;case'=':t=l+j+t+f;break;case'^':t=j.slice(0,O=j.length>>1)+l+t+f+j.slice(O);break;default:t=j+l+t+f}return o(t)}return b=void 0===b?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),O.toString=()=>t+'',O}return{format:d,formatPrefix:function(t,e){var n=d(((t=l(t)).type='f',t)),r=3*Math.max(-8,Math.min(8,Math.floor(a(e)/3))),i=Math.pow(10,-r),o=m[8+r/3];return t=>n(i*t)+o}}}d=_({thousands:',',grouping:[3],currency:['$','']}),g=d.format,v=d.formatPrefix;var b='http://www.w3.org/1999/xhtml';const w={svg:'http://www.w3.org/2000/svg',xhtml:b,xlink:'http://www.w3.org/1999/xlink',xml:'http://www.w3.org/XML/1998/namespace',xmlns:'http://www.w3.org/2000/xmlns/'};function x(t){var e=t+='',n=e.indexOf(':');return n>=0&&'xmlns'!==(e=t.slice(0,n))&&(t=t.slice(n+1)),w.hasOwnProperty(e)?{space:w[e],local:t}:t}function M(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===b&&e.documentElement.namespaceURI===b?e.createElement(t):e.createElementNS(n,t)}}function S(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function A(t){var e=x(t);return(e.local?S:M)(e)}function $(){}function O(t){return null==t?$:function(){return this.querySelector(t)}}function j(){return[]}function N(t){return null==t?j:function(){return this.querySelectorAll(t)}}function k(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function E(t){return function(){return this.matches(t)}}function I(t){return e=>e.matches(t)}var C=Array.prototype.find;function T(){return this.firstElementChild}var P=Array.prototype.filter;function q(){return Array.from(this.children)}function z(t){return new Array(t.length)}function V(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function L(t,e,n,r,i,o){for(var a,u=0,s=e.length,l=o.length;u<l;++u)(a=e[u])?(a.__data__=o[u],r[u]=a):n[u]=new V(t,o[u]);for(;u<s;++u)(a=e[u])&&(i[u]=a)}function F(t,e,n,r,i,o,a){var u,s,l,c=new Map,h=e.length,f=o.length,p=new Array(h);for(u=0;u<h;++u)(s=e[u])&&(p[u]=l=a.call(s,s.__data__,u,e)+'',c.has(l)?i[u]=s:c.set(l,s));for(u=0;u<f;++u)l=a.call(t,o[u],u,o)+'',(s=c.get(l))?(r[u]=s,s.__data__=o[u],c.delete(l)):n[u]=new V(t,o[u]);for(u=0;u<h;++u)(s=e[u])&&c.get(p[u])===s&&(i[u]=s)}function R(t){return t.__data__}function B(t){return'object'==typeof t&&'length'in t?t:Array.from(t)}function D(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function H(t){return function(){this.removeAttribute(t)}}function W(t){return function(){this.removeAttributeNS(t.space,t.local)}}function U(t,e){return function(){this.setAttribute(t,e)}}function X(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Q(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Y(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Z(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function G(t){return function(){this.style.removeProperty(t)}}function K(t,e,n){return function(){this.style.setProperty(t,e,n)}}function J(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function tt(t,e){return t.style.getPropertyValue(e)||Z(t).getComputedStyle(t,null).getPropertyValue(e)}function et(t){return function(){delete this[t]}}function nt(t,e){return function(){this[t]=e}}function rt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function it(t){return t.trim().split(/^|\s+/)}function ot(t){return t.classList||new at(t)}function at(t){this._node=t,this._names=it(t.getAttribute('class')||'')}function ut(t,e){for(var n=ot(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function st(t,e){for(var n=ot(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function lt(t){return function(){ut(this,t)}}function ct(t){return function(){st(this,t)}}function ht(t,e){return function(){(e.apply(this,arguments)?ut:st)(this,t)}}function ft(){this.textContent=''}function pt(t){return function(){this.textContent=t}}function dt(t){return function(){var e=t.apply(this,arguments);this.textContent=e??''}}function gt(){this.innerHTML=''}function vt(t){return function(){this.innerHTML=t}}function yt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??''}}function mt(){this.nextSibling&&this.parentNode.appendChild(this)}function _t(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function bt(){return null}function wt(){var t=this.parentNode;t&&t.removeChild(this)}function xt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Mt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function St(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function At(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,u=i.length;a<u;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);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 $t(t,e,n){var r=Z(t),i=r.CustomEvent;'function'==typeof i?i=new i(e,n):(i=r.document.createEvent('Event'),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Ot(t,e){return function(){return $t(this,t,e)}}function jt(t,e){return function(){return $t(this,t,e.apply(this,arguments))}}V.prototype={constructor:V,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)}},at.prototype={add:function(t){this._names.indexOf(t)<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}};var Nt=[null];function kt(t,e){this._groups=t,this._parents=e}function Et(){return new kt([[document.documentElement]],Nt)}function It(t){return'string'==typeof t?new kt([[document.querySelector(t)]],[document.documentElement]):new kt([[t]],Nt)}kt.prototype=Et.prototype={constructor:kt,select:function(t){'function'!=typeof t&&(t=O(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,u=e[i],s=u.length,l=r[i]=new Array(s),c=0;c<s;++c)(o=u[c])&&(a=t.call(o,o.__data__,c,u))&&('__data__'in o&&(a.__data__=o.__data__),l[c]=a);return new kt(r,this._parents)},selectAll:function(t){t='function'==typeof t?k(t):N(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,u=e[o],s=u.length,l=0;l<s;++l)(a=u[l])&&(r.push(t.call(a,a.__data__,l,u)),i.push(a));return new kt(r,i)},selectChild:function(t){return this.select(null==t?T:function(t){return function(){return C.call(this.children,t)}}('function'==typeof t?t:I(t)))},selectChildren:function(t){return this.selectAll(null==t?q:function(t){return function(){return P.call(this.children,t)}}('function'==typeof t?t:I(t)))},filter:function(t){'function'!=typeof t&&(t=E(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,s=r[i]=[],l=0;l<u;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&s.push(o);return new kt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,R);var n=e?F:L,r=this._parents,i=this._groups;'function'!=typeof t&&(t=function(t){return()=>t}(t));for(var o=i.length,a=new Array(o),u=new Array(o),s=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,p=B(t.call(c,c&&c.__data__,l,r)),d=p.length,g=u[l]=new Array(d),v=a[l]=new Array(d);n(c,h,g,v,s[l]=new Array(f),p,e);for(var y,m,_=0,b=0;_<d;++_)if(y=g[_]){for(_>=b&&(b=_+1);!(m=v[b])&&++b<d;);y._next=m||null}}return(a=new kt(a,r))._enter=u,a._exit=s,a},enter:function(){return new kt(this._enter||this._groups.map(z),this._parents)},exit:function(){return new kt(this._exit||this._groups.map(z),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return'function'==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+''),null!=e&&((i=e(i))&&(i=i.selection())),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),u=new Array(i),s=0;s<a;++s)for(var l,c=n[s],h=r[s],f=c.length,p=u[s]=new Array(f),d=0;d<f;++d)(l=c[d]||h[d])&&(p[d]=l);for(;s<i;++s)u[s]=n[s];return new kt(u,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=D);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,u=n[o],s=u.length,l=i[o]=new Array(s),c=0;c<s;++c)(a=u[c])&&(l[c]=a);l.sort(e)}return new kt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=x(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?W:H:'function'==typeof e?n.local?Y:Q:n.local?X:U)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?G:'function'==typeof e?J:K)(t,e,n??'')):tt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?et:'function'==typeof e?rt:nt)(t,e)):this.node()[t]},classed:function(t,e){var n=it(t+'');if(arguments.length<2){for(var r=ot(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(('function'==typeof e?ht:e?lt:ct)(n,e))},text:function(t){return arguments.length?this.each(null==t?ft:('function'==typeof t?dt:pt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?gt:('function'==typeof t?yt:vt)(t)):this.node().innerHTML},raise:function(){return this.each(mt)},lower:function(){return this.each(_t)},append:function(t){var e='function'==typeof t?t:A(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n='function'==typeof t?t:A(t),r=null==e?bt:'function'==typeof e?e:O(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(wt)},clone:function(t){return this.select(t?Mt:xt)},datum:function(t){return arguments.length?this.property('__data__',t):this.node().__data__},on:function(t,e,n){var r,i,o=function(t){return t.trim().split(/^|\s+/).map((t=>{var e='',n=t.indexOf('.');return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+''),a=o.length;if(!(arguments.length<2)){for(u=e?At:St,r=0;r<a;++r)this.each(u(o[r],e,n));return this}var u=this.node().__on;if(u)for(var s,l=0,c=u.length;l<c;++l)for(r=0,s=u[l];r<a;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,e){return this.each(('function'==typeof e?jt:Ot)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var Ct='object'==typeof global&&global&&global.Object===Object&&global,Tt='object'==typeof self&&self&&self.Object===Object&&self,Pt=Ct||Tt||Function('return this')(),qt=Pt.Symbol,zt=Object.prototype,Vt=zt.hasOwnProperty,Lt=zt.toString,Ft=qt?qt.toStringTag:void 0;var Rt=Object.prototype.toString;var Bt='[object Null]',Dt='[object Undefined]',Ht=qt?qt.toStringTag:void 0;function Wt(t){return null==t?void 0===t?Dt:Bt:Ht&&Ht in Object(t)?function(t){var e=Vt.call(t,Ft),n=t[Ft];try{t[Ft]=void 0;var r=!0}catch{}var i=Lt.call(t);return r&&(e?t[Ft]=n:delete t[Ft]),i}(t):function(t){return Rt.call(t)}(t)}function Ut(t){var e=typeof t;return null!=t&&('object'==e||'function'==e)}var Xt='[object AsyncFunction]',Qt='[object Function]',Yt='[object GeneratorFunction]',Zt='[object Proxy]';function Gt(t){if(!Ut(t))return!1;var e=Wt(t);return e==Qt||e==Yt||e==Xt||e==Zt}var Kt=Pt['__core-js_shared__'],Jt=(()=>{var t=/[^.]+$/.exec(Kt&&Kt.keys&&Kt.keys.IE_PROTO||'');return t?'Symbol(src)_1.'+t:''})();var te=Function.prototype.toString;function ee(t){if(null!=t){try{return te.call(t)}catch{}try{return t+''}catch{}}return''}var ne=/^\[object .+?Constructor\]$/,re=Function.prototype,ie=Object.prototype,oe=re.toString,ae=ie.hasOwnProperty,ue=RegExp('^'+oe.call(ae).replace(/[\\^$.*+?()[\]{}|]/g,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$');function se(t){return!(!Ut(t)||function(t){return!!Jt&&Jt in t}(t))&&(Gt(t)?ue:ne).test(ee(t))}function le(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return se(n)?n:void 0}var ce=(()=>{try{var t=le(Object,'defineProperty');return t({},'',{}),t}catch{}})();var he=function(t){return(e,n,r)=>{for(var i=-1,o=Object(e),a=r(e),u=a.length;u--;){var s=a[t?u:++i];if(!1===n(o[s],s,o))break}return e}}();function fe(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function pe(t){return null!=t&&'object'==typeof t}function de(t){return pe(t)&&'[object Arguments]'==Wt(t)}var ge=Object.prototype,ve=ge.hasOwnProperty,ye=ge.propertyIsEnumerable,me=de(function(){return arguments}())?de:t=>pe(t)&&ve.call(t,'callee')&&!ye.call(t,'callee'),_e=Array.isArray;var be='object'==typeof exports&&exports&&!exports.nodeType&&exports,we=be&&'object'==typeof module&&module&&!module.nodeType&&module,xe=we&&we.exports===be?Pt.Buffer:void 0;const Me=(xe?xe.isBuffer:void 0)||function(){return!1};var Se=9007199254740991,Ae=/^(?:0|[1-9]\d*)$/;function $e(t,e){var n=typeof t;return!!(e=e??Se)&&('number'==n||'symbol'!=n&&Ae.test(t))&&t>-1&&t%1==0&&t<e}var Oe=9007199254740991;function je(t){return'number'==typeof t&&t>-1&&t%1==0&&t<=Oe}var Ne={};Ne['[object Float32Array]']=Ne['[object Float64Array]']=Ne['[object Int8Array]']=Ne['[object Int16Array]']=Ne['[object Int32Array]']=Ne['[object Uint8Array]']=Ne['[object Uint8ClampedArray]']=Ne['[object Uint16Array]']=Ne['[object Uint32Array]']=!0,Ne['[object Arguments]']=Ne['[object Array]']=Ne['[object ArrayBuffer]']=Ne['[object Boolean]']=Ne['[object DataView]']=Ne['[object Date]']=Ne['[object Error]']=Ne['[object Function]']=Ne['[object Map]']=Ne['[object Number]']=Ne['[object Object]']=Ne['[object RegExp]']=Ne['[object Set]']=Ne['[object String]']=Ne['[object WeakMap]']=!1;var ke='object'==typeof exports&&exports&&!exports.nodeType&&exports,Ee=ke&&'object'==typeof module&&module&&!module.nodeType&&module,Ie=Ee&&Ee.exports===ke&&Ct.process,Ce=(()=>{try{return Ee&&Ee.require&&Ee.require('util').types||Ie&&Ie.binding&&Ie.binding('util')}catch{}})(),Te=Ce&&Ce.isTypedArray,Pe=Te?function(t){return e=>t(e)}(Te):function(t){return pe(t)&&je(t.length)&&!!Ne[Wt(t)]};const qe=Pe;var ze=Object.prototype.hasOwnProperty;var Ve=Object.prototype;function Le(t){var e=t&&t.constructor;return t===('function'==typeof e&&e.prototype||Ve)}var Fe=function(t,e){return n=>t(e(n))}(Object.keys,Object),Re=Object.prototype.hasOwnProperty;function Be(t){if(!Le(t))return Fe(t);var e=[];for(var n in Object(t))Re.call(t,n)&&'constructor'!=n&&e.push(n);return e}function De(t){return null!=t&&je(t.length)&&!Gt(t)}function He(t){return De(t)?function(t,e){var n=_e(t),r=!n&&me(t),i=!n&&!r&&Me(t),o=!n&&!r&&!i&&qe(t),a=n||r||i||o,u=a?fe(t.length,String):[],s=u.length;for(var l in t)(e||ze.call(t,l))&&(!a||!('length'==l||i&&('offset'==l||'parent'==l)||o&&('buffer'==l||'byteLength'==l||'byteOffset'==l)||$e(l,s)))&&u.push(l);return u}(t):Be(t)}function We(t,e){return t===e||t!=t&&e!=e}function Ue(t,e){for(var n=t.length;n--;)if(We(t[n][0],e))return n;return-1}var Xe=Array.prototype.splice;function Qe(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Qe.prototype.clear=function(){this.__data__=[],this.size=0},Qe.prototype.delete=function(t){var e=this.__data__,n=Ue(e,t);return!(n<0)&&(n==e.length-1?e.pop():Xe.call(e,n,1),--this.size,!0)},Qe.prototype.get=function(t){var e=this.__data__,n=Ue(e,t);return n<0?void 0:e[n][1]},Qe.prototype.has=function(t){return Ue(this.__data__,t)>-1},Qe.prototype.set=function(t,e){var n=this.__data__,r=Ue(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Ye=le(Pt,'Map'),Ze=le(Object,'create');var Ge=Object.prototype.hasOwnProperty;var Ke=Object.prototype.hasOwnProperty;function Je(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function tn(t,e){var n=t.__data__;return function(t){var e=typeof t;return'string'==e||'number'==e||'symbol'==e||'boolean'==e?'__proto__'!==t:null===t}(e)?n['string'==typeof e?'string':'hash']:n.map}function en(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Je.prototype.clear=function(){this.__data__=Ze?Ze(null):{},this.size=0},Je.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Je.prototype.get=function(t){var e=this.__data__;if(Ze){var n=e[t];return'__lodash_hash_undefined__'===n?void 0:n}return Ge.call(e,t)?e[t]:void 0},Je.prototype.has=function(t){var e=this.__data__;return Ze?void 0!==e[t]:Ke.call(e,t)},Je.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ze&&void 0===e?'__lodash_hash_undefined__':e,this},en.prototype.clear=function(){this.size=0,this.__data__={hash:new Je,map:new(Ye||Qe),string:new Je}},en.prototype.delete=function(t){var e=tn(this,t).delete(t);return this.size-=e?1:0,e},en.prototype.get=function(t){return tn(this,t).get(t)},en.prototype.has=function(t){return tn(this,t).has(t)},en.prototype.set=function(t,e){var n=tn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function nn(t){var e=this.__data__=new Qe(t);this.size=e.size}nn.prototype.clear=function(){this.__data__=new Qe,this.size=0},nn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},nn.prototype.get=function(t){return this.__data__.get(t)},nn.prototype.has=function(t){return this.__data__.has(t)},nn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Qe){var r=n.__data__;if(!Ye||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new en(r)}return n.set(t,e),this.size=n.size,this};function rn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new en;++e<n;)this.add(t[e])}function on(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function an(t,e){return t.has(e)}rn.prototype.add=rn.prototype.push=function(t){return this.__data__.set(t,'__lodash_hash_undefined__'),this},rn.prototype.has=function(t){return this.__data__.has(t)};var un=1,sn=2;function ln(t,e,n,r,i,o){var a=n&un,u=t.length,s=e.length;if(u!=s&&!(a&&s>u))return!1;var l=o.get(t),c=o.get(e);if(l&&c)return l==e&&c==t;var h=-1,f=!0,p=n&sn?new rn:void 0;for(o.set(t,e),o.set(e,t);++h<u;){var d=t[h],g=e[h];if(r)var v=a?r(g,d,h,e,t,o):r(d,g,h,t,e,o);if(void 0!==v){if(v)continue;f=!1;break}if(p){if(!on(e,((t,e)=>{if(!an(p,e)&&(d===t||i(d,t,n,r,o)))return p.push(e)}))){f=!1;break}}else if(d!==g&&!i(d,g,n,r,o)){f=!1;break}}return o.delete(t),o.delete(e),f}const cn=Pt.Uint8Array;function hn(t){var e=-1,n=Array(t.size);return t.forEach(((t,r)=>{n[++e]=[r,t]})),n}function fn(t){var e=-1,n=Array(t.size);return t.forEach((t=>{n[++e]=t})),n}var pn=1,dn=2,gn='[object Boolean]',vn='[object Date]',yn='[object Error]',mn='[object Map]',_n='[object Number]',bn='[object RegExp]',wn='[object Set]',xn='[object String]',Mn='[object Symbol]',Sn='[object ArrayBuffer]',An='[object DataView]',$n=qt?qt.prototype:void 0,On=$n?$n.valueOf:void 0;var jn=Object.prototype.propertyIsEnumerable,Nn=Object.getOwnPropertySymbols,kn=Nn?t=>null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(Nn(t),(e=>jn.call(t,e)))):function(){return[]};const En=kn;function In(t){return function(t,e,n){var r=e(t);return _e(t)?r:((t,e)=>{for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t})(r,n(t))}(t,He,En)}var Cn=1,Tn=Object.prototype.hasOwnProperty;var Pn=le(Pt,'DataView'),qn=le(Pt,'Promise'),zn=le(Pt,'Set'),Vn=le(Pt,'WeakMap'),Ln='[object Map]',Fn='[object Promise]',Rn='[object Set]',Bn='[object WeakMap]',Dn='[object DataView]',Hn=ee(Pn),Wn=ee(Ye),Un=ee(qn),Xn=ee(zn),Qn=ee(Vn),Yn=Wt;(Pn&&Yn(new Pn(new ArrayBuffer(1)))!=Dn||Ye&&Yn(new Ye)!=Ln||qn&&Yn(qn.resolve())!=Fn||zn&&Yn(new zn)!=Rn||Vn&&Yn(new Vn)!=Bn)&&(Yn=t=>{var e=Wt(t),n='[object Object]'==e?t.constructor:void 0,r=n?ee(n):'';if(r)switch(r){case Hn:return Dn;case Wn:return Ln;case Un:return Fn;case Xn:return Rn;case Qn:return Bn}return e});const Zn=Yn;var Gn=1,Kn='[object Arguments]',Jn='[object Array]',tr='[object Object]',er=Object.prototype.hasOwnProperty;function nr(t,e,n,r,i,o){var a=_e(t),u=_e(e),s=a?Jn:Zn(t),l=u?Jn:Zn(e),c=(s=s==Kn?tr:s)==tr,h=(l=l==Kn?tr:l)==tr,f=s==l;if(f&&Me(t)){if(!Me(e))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new nn),a||qe(t)?ln(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case An:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Sn:return!(t.byteLength!=e.byteLength||!o(new cn(t),new cn(e)));case gn:case vn:case _n:return We(+t,+e);case yn:return t.name==e.name&&t.message==e.message;case bn:case xn:return t==e+'';case mn:var u=hn;case wn:var s=r&pn;if(u||(u=fn),t.size!=e.size&&!s)return!1;var l=a.get(t);if(l)return l==e;r|=dn,a.set(t,e);var c=ln(u(t),u(e),r,i,o,a);return a.delete(t),c;case Mn:if(On)return On.call(t)==On.call(e)}return!1}(t,e,s,n,r,i,o);if(!(n&Gn)){var p=c&&er.call(t,'__wrapped__'),d=h&&er.call(e,'__wrapped__');if(p||d){var g=p?t.value():t,v=d?e.value():e;return o||(o=new nn),i(g,v,n,r,o)}}return!!f&&(o||(o=new nn),function(t,e,n,r,i,o){var a=n&Cn,u=In(t),s=u.length;if(s!=In(e).length&&!a)return!1;for(var l=s;l--;){var c=u[l];if(!(a?c in e:Tn.call(e,c)))return!1}var h=o.get(t),f=o.get(e);if(h&&f)return h==e&&f==t;var p=!0;o.set(t,e),o.set(e,t);for(var d=a;++l<s;){var g=t[c=u[l]],v=e[c];if(r)var y=a?r(v,g,c,e,t,o):r(g,v,c,t,e,o);if(!(void 0===y?g===v||i(g,v,n,r,o):y)){p=!1;break}d||(d='constructor'==c)}if(p&&!d){var m=t.constructor,_=e.constructor;m!=_&&'constructor'in t&&'constructor'in e&&!('function'==typeof m&&m instanceof m&&'function'==typeof _&&_ instanceof _)&&(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,i,o))}function rr(t,e,n,r,i){return t===e||(null==t||null==e||!pe(t)&&!pe(e)?t!=t&&e!=e:nr(t,e,n,r,rr,i))}var ir=1,or=2;function ar(t){return t==t&&!Ut(t)}function ur(t,e){return n=>null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}function sr(t){var e=function(t){for(var e=He(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,ar(i)]}return e}(t);return 1==e.length&&e[0][2]?ur(e[0][0],e[0][1]):n=>n===t||function(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var u=n[i];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<o;){var s=(u=n[i])[0],l=t[s],c=u[1];if(a&&u[2]){if(void 0===l&&!(s in t))return!1}else{var h=new nn;if(r)var f=r(l,c,s,t,e,h);if(!(void 0===f?rr(c,l,ir|or,r,h):f))return!1}}return!0}(n,t,e)}var lr='[object Symbol]';function cr(t){return'symbol'==typeof t||pe(t)&&Wt(t)==lr}var hr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fr=/^\w*$/;function pr(t,e){if(_e(t))return!1;var n=typeof t;return!('number'!=n&&'symbol'!=n&&'boolean'!=n&&null!=t&&!cr(t))||(fr.test(t)||!hr.test(t)||null!=e&&t in Object(e))}var dr='Expected a function';function gr(t,e){if('function'!=typeof t||null!=e&&'function'!=typeof e)throw new TypeError(dr);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(gr.Cache||en),n}gr.Cache=en;var vr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yr=/\\(\\)?/g,mr=function(t){var e=gr(t,(t=>(500===n.size&&n.clear(),t))),n=e.cache;return e}((t=>{var e=[];return 46===t.charCodeAt(0)&&e.push(''),t.replace(vr,((t,n,r,i)=>{e.push(r?i.replace(yr,'$1'):n||t)})),e}));var _r=1/0,br=qt?qt.prototype:void 0,wr=br?br.toString:void 0;function xr(t){if('string'==typeof t)return t;if(_e(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}(t,xr)+'';if(cr(t))return wr?wr.call(t):'';var e=t+'';return'0'==e&&1/t==-_r?'-0':e}function Mr(t,e){return _e(t)?t:pr(t,e)?[t]:mr(function(t){return null==t?'':xr(t)}(t))}var Sr=1/0;function Ar(t){if('string'==typeof t||cr(t))return t;var e=t+'';return'0'==e&&1/t==-Sr?'-0':e}function $r(t,e){for(var n=0,r=(e=Mr(e,t)).length;null!=t&&n<r;)t=t[Ar(e[n++])];return n&&n==r?t:void 0}function Or(t,e){return null!=t&&e in Object(t)}function jr(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Mr(e,t)).length,o=!1;++r<i;){var a=Ar(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&je(i)&&$e(a,i)&&(_e(t)||me(t))}(t,e,Or)}var Nr=1,kr=2;function Er(t,e){return pr(t)&&ar(e)?ur(Ar(t),e):n=>{var r=function(t,e,n){var r=null==t?void 0:$r(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?jr(n,t):rr(e,r,Nr|kr)}}function Ir(t){return t}function Cr(t){return pr(t)?function(t){return e=>null==e?void 0:e[t]}(Ar(t)):function(t){return e=>$r(e,t)}(t)}function Tr(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Pr(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function qr(t){let e,n,r;function i(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{const e=i+o>>>1;n(t[e],r)<0?i=e+1:o=e}while(i<o)}return i}return 2!==t.length?(e=Tr,n=(e,n)=>Tr(t(e),n),r=(e,n)=>t(e)-n):(e=t===Tr||t===Pr?t:zr,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){const a=i(t,e,n,o-1);return a>n&&r(t[a-1],e)>-r(t[a],e)?a-1:a},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{const e=i+o>>>1;n(t[e],r)<=0?i=e+1:o=e}while(i<o)}return i}}}function zr(){return 0}const Vr=qr(Tr).right;qr((function(t){return null===t?NaN:+t})).center;const Lr=Math.sqrt(50),Fr=Math.sqrt(10),Rr=Math.sqrt(2);function Br(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=Lr?10:o>=Fr?5:o>=Rr?2:1;let u,s,l;return i<0?(l=Math.pow(10,-i)/a,u=Math.round(t*l),s=Math.round(e*l),u/l<t&&++u,s/l>e&&--s,l=-l):(l=Math.pow(10,i)*a,u=Math.round(t/l),s=Math.round(e/l),u*l<t&&++u,s*l>e&&--s),s<u&&.5<=n&&n<2?Br(t,e,2*n):[u,s,l]}function Dr(t,e,n){return Br(t=+t,e=+e,n=+n)[2]}function Hr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Wr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ur(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Xr(){}var Qr=.7,Yr=1/Qr,Zr='\\s*([+-]?\\d+)\\s*',Gr='\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*',Kr='\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*',Jr=/^#([0-9a-f]{3,8})$/,ti=new RegExp(`^rgb\\(${Zr},${Zr},${Zr}\\)$`),ei=new RegExp(`^rgb\\(${Kr},${Kr},${Kr}\\)$`),ni=new RegExp(`^rgba\\(${Zr},${Zr},${Zr},${Gr}\\)$`),ri=new RegExp(`^rgba\\(${Kr},${Kr},${Kr},${Gr}\\)$`),ii=new RegExp(`^hsl\\(${Gr},${Kr},${Kr}\\)$`),oi=new RegExp(`^hsla\\(${Gr},${Kr},${Kr},${Gr}\\)$`),ai={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};function ui(){return this.rgb().formatHex()}function si(){return this.rgb().formatRgb()}function li(t){var e,n;return t=(t+'').trim().toLowerCase(),(e=Jr.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ci(e):3===n?new pi(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?hi(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?hi(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ti.exec(t))?new pi(e[1],e[2],e[3],1):(e=ei.exec(t))?new pi(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ni.exec(t))?hi(e[1],e[2],e[3],e[4]):(e=ri.exec(t))?hi(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ii.exec(t))?_i(e[1],e[2]/100,e[3]/100,1):(e=oi.exec(t))?_i(e[1],e[2]/100,e[3]/100,e[4]):ai.hasOwnProperty(t)?ci(ai[t]):'transparent'===t?new pi(NaN,NaN,NaN,0):null}function ci(t){return new pi(t>>16&255,t>>8&255,255&t,1)}function hi(t,e,n,r){return r<=0&&(t=e=n=NaN),new pi(t,e,n,r)}function fi(t,e,n,r){return 1===arguments.length?function(t){return t instanceof Xr||(t=li(t)),t?new pi((t=t.rgb()).r,t.g,t.b,t.opacity):new pi}(t):new pi(t,e,n,r??1)}function pi(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function di(){return`#${mi(this.r)}${mi(this.g)}${mi(this.b)}`}function gi(){const t=vi(this.opacity);return`${1===t?'rgb(':'rgba('}${yi(this.r)}, ${yi(this.g)}, ${yi(this.b)}${1===t?')':`, ${t})`}`}function vi(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function yi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function mi(t){return((t=yi(t))<16?'0':'')+t.toString(16)}function _i(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new xi(t,e,n,r)}function bi(t){if(t instanceof xi)return new xi(t.h,t.s,t.l,t.opacity);if(t instanceof Xr||(t=li(t)),!t)return new xi;if(t instanceof xi)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(n<r):n===o?(r-e)/u+2:(e-n)/u+4,u/=s<.5?o+i:2-o-i,a*=60):u=s>0&&s<1?0:a,new xi(a,u,s,t.opacity)}function wi(t,e,n,r){return 1===arguments.length?bi(t):new xi(t,e,n,r??1)}function xi(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Mi(t){return(t=(t||0)%360)<0?t+360:t}function Si(t){return Math.max(0,Math.min(1,t||0))}function Ai(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Wr(Xr,li,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ui,formatHex:ui,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return bi(this).formatHsl()},formatRgb:si,toString:si}),Wr(pi,fi,Ur(Xr,{brighter(t){return t=null==t?Yr:Math.pow(Yr,t),new pi(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Qr:Math.pow(Qr,t),new pi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new pi(yi(this.r),yi(this.g),yi(this.b),vi(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:di,formatHex:di,formatHex8:function(){return`#${mi(this.r)}${mi(this.g)}${mi(this.b)}${mi(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:gi,toString:gi})),Wr(xi,wi,Ur(Xr,{brighter(t){return t=null==t?Yr:Math.pow(Yr,t),new xi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Qr:Math.pow(Qr,t),new xi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new pi(Ai(t>=240?t-240:t+120,i,r),Ai(t,i,r),Ai(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new xi(Mi(this.h),Si(this.s),Si(this.l),vi(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=vi(this.opacity);return`${1===t?'hsl(':'hsla('}${Mi(this.h)}, ${100*Si(this.s)}%, ${100*Si(this.l)}%${1===t?')':`, ${t})`}`}}));const $i=t=>()=>t;function Oi(t,e){return n=>t+n*e}function ji(t){return 1==(t=+t)?Ni:(e,n)=>n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,r=>Math.pow(t+r*e,n)}(e,n,t):$i(isNaN(e)?n:e)}function Ni(t,e){var n=e-t;return n?Oi(t,n):$i(isNaN(t)?e:t)}const ki=function t(e){var n=ji(e);function r(t,e){var r=n((t=fi(t)).r,(e=fi(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Ni(t.opacity,e.opacity);return e=>(t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+'')}return r.gamma=t,r}(1);function Ei(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return o=>{for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function Ii(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Li(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return t=>{for(n=0;n<i;++n)a[n]=o[n](t);return a}}function Ci(t,e){var n=new Date;return t=+t,e=+e,r=>(n.setTime(t*(1-r)+e*r),n)}function Ti(t,e){return t=+t,e=+e,n=>t*(1-n)+e*n}function Pi(t,e){var n,r={},i={};for(n in(null===t||'object'!=typeof t)&&(t={}),(null===e||'object'!=typeof e)&&(e={}),e)n in t?r[n]=Li(t[n],e[n]):i[n]=e[n];return t=>{for(n in r)i[n]=r[n](t);return i}}var qi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zi=new RegExp(qi.source,'g');function Vi(t,e){var n,r,i,o=qi.lastIndex=zi.lastIndex=0,a=-1,u=[],s=[];for(t+='',e+='';(n=qi.exec(t))&&(r=zi.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:Ti(n,r)})),o=zi.lastIndex;return o<e.length&&(i=e.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?s[0]?function(t){return e=>t(e)+''}(s[0].x):function(t){return()=>t}(e):(e=s.length,t=>{for(var n,r=0;r<e;++r)u[(n=s[r]).i]=n.x(t);return u.join('')})}function Li(t,e){var n,r=typeof e;return null==e||'boolean'===r?$i(e):('number'===r?Ti:'string'===r?(n=li(e))?(e=n,ki):Vi:e instanceof li?ki:e instanceof Date?Ci:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Ei:Array.isArray(e)?Ii:'function'!=typeof e.valueOf&&'function'!=typeof e.toString||isNaN(e)?Pi:Ti)(t,e)}function Fi(t,e){return t=+t,e=+e,n=>Math.round(t*(1-n)+e*n)}var Ri,Bi=180/Math.PI,Di={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Hi(t,e,n,r,i,o){var a,u,s;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,s/=u),t*r<e*n&&(t=-t,e=-e,s=-s,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Bi,skewX:Math.atan(s)*Bi,scaleX:a,scaleY:u}}function Wi(t,e,n,r){function i(t){return t.length?t.pop()+' ':''}return(o,a)=>{var u=[],s=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var s=a.push('translate(',null,e,null,n);u.push({i:s-4,x:Ti(t,i)},{i:s-2,x:Ti(r,o)})}else(i||o)&&a.push('translate('+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,u,s),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+'rotate(',null,r)-2,x:Ti(t,e)})):e&&n.push(i(n)+'rotate('+e+r)}(o.rotate,a.rotate,u,s),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+'skewX(',null,r)-2,x:Ti(t,e)}):e&&n.push(i(n)+'skewX('+e+r)}(o.skewX,a.skewX,u,s),function(t,e,n,r,o,a){if(t!==n||e!==r){var u=o.push(i(o)+'scale(',null,',',null,')');a.push({i:u-4,x:Ti(t,n)},{i:u-2,x:Ti(e,r)})}else(1!==n||1!==r)&&o.push(i(o)+'scale('+n+','+r+')')}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,s),o=a=null,t=>{for(var e,n=-1,r=s.length;++n<r;)u[(e=s[n]).i]=e.x(t);return u.join('')}}}var Ui=Wi((function(t){const e=new('function'==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+'');return e.isIdentity?Di:Hi(e.a,e.b,e.c,e.d,e.e,e.f)}),'px, ','px)','deg)'),Xi=Wi((function(t){return null!=t&&(Ri||(Ri=document.createElementNS('http://www.w3.org/2000/svg','g')),Ri.setAttribute('transform',t),t=Ri.transform.baseVal.consolidate())?Hi((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Di}),', ',')',')');const Qi=function(t){return(e,n)=>{var r=t((e=wi(e)).h,(n=wi(n)).h),i=Ni(e.s,n.s),o=Ni(e.l,n.l),a=Ni(e.opacity,n.opacity);return t=>(e.h=r(t),e.s=i(t),e.l=o(t),e.opacity=a(t),e+'')}}((function(t,e){var n=e-t;return n?Oi(t,n>180||n<-180?n-360*Math.round(n/360):n):$i(isNaN(t)?e:t)}));function Yi(t){return+t}var Zi=[0,1];function Gi(t){return t}function Ki(t,e){return(e-=t=+t)?n=>(n-t)/e:function(t){return()=>t}(isNaN(e)?NaN:.5)}function Ji(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Ki(i,r),o=n(a,o)):(r=Ki(r,i),o=n(o,a)),t=>o(r(t))}function to(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Ki(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return e=>{var n=Vr(t,e,1,r)-1;return o[n](i[n](e))}}function eo(){var t,e,n,r,i,o,a=Zi,u=Zi,s=Li,l=Gi;function c(){var t=Math.min(a.length,u.length);return l!==Gi&&(l=function(t,e){var n;return t>e&&(n=t,t=e,e=n),n=>Math.max(t,Math.min(e,n))}(a[0],a[t-1])),r=t>2?to:Ji,i=o=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(a.map(t),u,s)))(t(l(e)))}return h.invert=n=>l(e((o||(o=r(u,a.map(t),Ti)))(n))),h.domain=function(t){return arguments.length?(a=Array.from(t,Yi),c()):a.slice()},h.range=function(t){return arguments.length?(u=Array.from(t),c()):u.slice()},h.rangeRound=t=>(u=Array.from(t),s=Fi,c()),h.clamp=function(t){return arguments.length?(l=!!t||Gi,c()):l!==Gi},h.interpolate=function(t){return arguments.length?(s=t,c()):s},h.unknown=function(t){return arguments.length?(n=t,h):n},(n,r)=>(t=n,e=r,c())}function no(t,e,n,r){var i,o=function(t,e,n){n=+n;const r=(e=+e)<(t=+t),i=r?Dr(e,t,n):Dr(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}(t,e,n);switch((r=l(r??',f')).type){case's':var u=Math.max(Math.abs(t),Math.abs(e));return null==r.precision&&!isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(a(e)/3)))-a(Math.abs(t)))}(o,u))&&(r.precision=i),v(r,u);case'':case'e':case'g':case'p':case'r':null==r.precision&&!isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,a(e)-a(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=i-('e'===r.type));break;case'f':case'%':null==r.precision&&!isNaN(i=function(t){return Math.max(0,-a(Math.abs(t)))}(o))&&(r.precision=i-2*('%'===r.type))}return g(r)}function ro(t){var e=t.domain;return t.ticks=t=>{var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const r=e<t,[i,o,a]=r?Br(e,t,n):Br(t,e,n);if(!(o>=i))return[];const u=o-i+1,s=new Array(u);if(r)if(a<0)for(let t=0;t<u;++t)s[t]=(o-t)/-a;else for(let t=0;t<u;++t)s[t]=(o-t)*a;else if(a<0)for(let t=0;t<u;++t)s[t]=(i+t)/-a;else for(let t=0;t<u;++t)s[t]=(i+t)*a;return s}(n[0],n[n.length-1],t??10)},t.tickFormat=(t,n)=>{var r=e();return no(r[0],r[r.length-1],t??10,n)},t.nice=n=>{null==n&&(n=10);var r,i,o=e(),a=0,u=o.length-1,s=o[a],l=o[u],c=10;for(l<s&&(i=s,s=l,l=i,i=a,a=u,u=i);c-- >0;){if((i=Dr(s,l,n))===r)return o[a]=s,o[u]=l,e(o);if(i>0)s=Math.floor(s/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;s=Math.ceil(s*i)/i,l=Math.floor(l*i)/i}r=i}return t},t}function io(){var t=eo()(Gi,Gi);return t.copy=()=>function(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}(t,io()),Hr.apply(t,arguments),ro(t)}function oo(){var t,e=0,n=1,r=1,i=[.5],o=[0,1];function a(e){return null!=e&&e<=e?o[Vr(i,e,0,r)]:t}function u(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return a}return a.domain=function(t){return arguments.length?([e,n]=t,e=+e,n=+n,u()):[e,n]},a.range=function(t){return arguments.length?(r=(o=Array.from(t)).length-1,u()):o.slice()},a.invertExtent=t=>{var a=o.indexOf(t);return a<0?[NaN,NaN]:a<1?[e,i[0]]:a>=r?[i[r-1],n]:[i[a-1],i[a]]},a.unknown=function(e){return arguments.length&&(t=e),a},a.thresholds=()=>i.slice(),a.copy=()=>oo().domain([e,n]).range(o).unknown(t),Hr.apply(ro(a),arguments)}var ao='[object Number]';var uo='[object Map]',so='[object Set]',lo=Object.prototype.hasOwnProperty;function co(t){if(null==t)return!0;if(De(t)&&(_e(t)||'string'==typeof t||'function'==typeof t.splice||Me(t)||qe(t)||me(t)))return!t.length;var e=Zn(t);if(e==uo||e==so)return!t.size;if(Le(t))return!Be(t).length;for(var n in t)if(lo.call(t,n))return!1;return!0}function ho(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}function fo(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}var po=/\s/;var go=/^\s+/;function vo(t){return t&&t.slice(0,function(t){for(var e=t.length;e--&&po.test(t.charAt(e)););return e}(t)+1).replace(go,'')}var yo=NaN,mo=/^[-+]0x[0-9a-f]+$/i,_o=/^0b[01]+$/i,bo=/^0o[0-7]+$/i,wo=parseInt;var xo=1/0,Mo=17976931348623157e292;function So(t){return t?(t=function(t){if('number'==typeof t)return t;if(cr(t))return yo;if(Ut(t)){var e='function'==typeof t.valueOf?t.valueOf():t;t=Ut(e)?e+'':e}if('string'!=typeof t)return 0===t?t:+t;t=vo(t);var n=_o.test(t);return n||bo.test(t)?wo(t.slice(2),n?2:8):mo.test(t)?yo:+t}(t),t===xo||t===-xo?(t<0?-1:1)*Mo:t==t?t:0):0===t?t:0}function Ao(t){var e=So(t),n=e%1;return e==e?n?e-n:e:0}var $o=9007199254740991,Oo=4294967295,jo=Math.min;function No(t,e){if((t=Ao(t))<1||t>$o)return[];var n=Oo,r=jo(t,Oo);e=function(t){return'function'==typeof t?t:Ir}(e),t-=Oo;for(var i=fe(r,e);++n<t;)e(n);return i}function ko(t,e){return function(t){return t&&t.length?((t,e)=>{for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n})(t,Ir):0}(function(t,e,n){return t&&t.length?fo(t,0,(e=n||void 0===e?1:Ao(e))<0?0:e):[]}(t,e))}function Eo({tickData:t,customSegmentStops:e,min:n,max:r}){if(!_e(e)||co(e))return t;if(function(t){return t&&t.length?t[0]:void 0}(e)!==n)throw new Error(`First value should be equivalent to min value given. Current min value - ${n}`);if(ho(e)!==r)throw new Error(`Last value should be equivalent to max value given. Current min value - ${r}`);return function(t,e,n){var r=null==t?0:t.length;return r?fo(t,(e=n||void 0===e?1:Ao(e))<0?0:e,r):[]}(e.map(((t,i)=>{if(0!==i)return(t-e[i-1])/(r-n)})))}function Io({maxSegmentLabelCount:t,segmentCount:e}){const n=parseInt(t,10),r=parseInt(e,10);return function(t){return'number'==typeof t||pe(t)&&Wt(t)==ao}(n)&&n>=0&&n<=r?n:r}function Co(t){return t*Math.PI/180}const To={Inside:'INSIDE',Outside:'OUTSIDE'},Po={easeLinear:'easeLinear',easeQuadIn:'easeQuadIn',easeQuadOut:'easeQuadOut',easeQuadInOut:'easeQuadInOut',easeCubicIn:'easeCubicIn',easeCubicOut:'easeCubicOut',easeCubicInOut:'easeCubicInOut',easePolyIn:'easePolyIn',easePolyOut:'easePolyOut',easePolyInOut:'easePolyInOut',easeSinIn:'easeSinIn',easeSinOut:'easeSinOut',easeSinInOut:'easeSinInOut',easeExpIn:'easeExpIn',easeExpOut:'easeExpOut',easeExpInOut:'easeExpInOut',easeCircleIn:'easeCircleIn',easeCircleOut:'easeCircleOut',easeCircleInOut:'easeCircleInOut',easeBounceIn:'easeBounceIn',easeBounceOut:'easeBounceOut',easeBounceInOut:'easeBounceInOut',easeBackIn:'easeBackIn',easeBackOut:'easeBackOut',easeBackInOut:'easeBackInOut',easeElasticIn:'easeElasticIn',easeElasticOut:'easeElasticOut',easeElasticInOut:'easeElasticInOut',easeElastic:'easeElastic'},qo=t=>t,zo={value:0,minValue:0,max