UNPKG

ngx-d3-tooltip

Version:

Add tooltips to your d3 visualizations using Angular Components.

1 lines 52.5 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@angular/common"],e):e(t["ngx-d3-tooltip"]={},t.ng.core,t.ng.common)}(this,function(t,e,n){"use strict";function r(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new o(r)}function o(t){this._=t}function i(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=Bt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}function a(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function f(){}function c(t){var e;return t=(t+"").trim().toLowerCase(),(e=ee.exec(t))?(e=parseInt(e[1],16),new d(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=ne.exec(t))?u(parseInt(e[1],16)):(e=re.exec(t))?new d(e[1],e[2],e[3],1):(e=oe.exec(t))?new d(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ie.exec(t))?s(e[1],e[2],e[3],e[4]):(e=ae.exec(t))?s(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=fe.exec(t))?h(e[1],e[2]/100,e[3]/100,1):(e=ce.exec(t))?h(e[1],e[2]/100,e[3]/100,e[4]):ue.hasOwnProperty(t)?u(ue[t]):"transparent"===t?new d(NaN,NaN,NaN,0):null}function u(t){return new d(t>>16&255,t>>8&255,255&t,1)}function s(t,e,n,r){return r<=0&&(t=e=n=NaN),new d(t,e,n,r)}function l(t){return t instanceof f||(t=c(t)),t?(t=t.rgb(),new d(t.r,t.g,t.b,t.opacity)):new d}function d(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function h(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new b(t,e,n,r)}function p(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof b)return new b(t.h,t.s,t.l,t.opacity);if(t instanceof f||(t=c(t)),!t)return new b;if(t instanceof b)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,u=i-o,s=(i+o)/2;return u?(a=e===i?(n-r)/u+6*(n<r):n===i?(r-e)/u+2:(e-n)/u+4,u/=s<.5?i+o:2-i-o,a*=60):u=s>0&&s<1?0:a,new b(a,u,s,t.opacity)}(t):new b(t,e,n,null==r?1:r)}function b(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function g(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function m(t){if(t instanceof y)return new y(t.l,t.a,t.b,t.opacity);if(t instanceof T){var e=t.h*se;return new y(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof d||(t=l(t));var n=_(t.r),r=_(t.g),o=_(t.b),i=w((.4124564*n+.3575761*r+.1804375*o)/de),a=w((.2126729*n+.7151522*r+.072175*o)/he);return new y(116*a-16,500*(i-a),200*(a-w((.0193339*n+.119192*r+.9503041*o)/pe)),t.opacity)}function y(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function w(t){return t>ye?Math.pow(t,1/3):t/me+be}function x(t){return t>ge?t*t*t:me*(t-be)}function v(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function _(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function M(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof T)return new T(t.h,t.c,t.l,t.opacity);t instanceof y||(t=m(t));var e=Math.atan2(t.b,t.a)*le;return new T(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new T(t,e,n,null==r?1:r)}function T(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function C(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof N)return new N(t.h,t.s,t.l,t.opacity);t instanceof d||(t=l(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(Ne*r+Te*e-Ce*n)/(Ne+Te-Ce),i=r-o,a=(Me*(n-o)-ve*i)/_e,f=Math.sqrt(a*a+i*i)/(Me*o*(1-o)),c=f?Math.atan2(a,i)*le-120:NaN;return new N(c<0?c+360:c,f,o,t.opacity)}(t):new N(t,e,n,null==r?1:r)}function N(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function k(t,e){return function(n){return t+n*e}}function U(t,e){var n=e-t;return n?k(t,n):ke(isNaN(t)?e:t)}function D(t){return function e(n){function r(e,r){var o=t((e=C(e)).h,(r=C(r)).h),i=U(e.s,r.s),a=U(e.l,r.l),f=U(e.opacity,r.opacity);return function(t){return e.h=o(t),e.s=i(t),e.l=a(Math.pow(t,n)),e.opacity=f(t),e+""}}return n=+n,r.gamma=e,r}(1)}function F(t){return{type:t}}function A(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}")}function S(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var o,i,a,f,c,u,s,l,d,h=t._root,p={data:r},b=t._x0,g=t._y0,m=t._x1,y=t._y1;if(!h)return t._root=p,t;for(;h.length;)if((u=e>=(i=(b+m)/2))?b=i:m=i,(s=n>=(a=(g+y)/2))?g=a:y=a,o=h,!(h=h[l=s<<1|u]))return o[l]=p,t;if(f=+t._x.call(null,h.data),c=+t._y.call(null,h.data),e===f&&n===c)return p.next=h,o?o[l]=p:t._root=p,t;do{o=o?o[l]=new Array(4):t._root=new Array(4),(u=e>=(i=(b+m)/2))?b=i:m=i,(s=n>=(a=(g+y)/2))?g=a:y=a}while((l=s<<1|u)==(d=(c>=a)<<1|f>=i));return o[d]=h,o[l]=p,t}function H(t,e,n,r,o,i){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=o,this._y1=i,this._root=undefined}function E(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}function Y(t){return new L(t)}function L(t){if(!(e=qe.exec(t)))throw new Error("invalid format: "+t);var e,n=e[1]||" ",r=e[2]||">",o=e[3]||"-",i=e[4]||"",a=!!e[5],f=e[6]&&+e[6],c=!!e[7],u=e[8]&&+e[8].slice(1),s=e[9]||"";"n"===s?(c=!0,s="g"):Re[s]||(s=""),(a||"0"===n&&"="===r)&&(a=!0,n="0",r="="),this.fill=n,this.align=r,this.sign=o,this.symbol=i,this.zero=a,this.width=f,this.comma=c,this.precision=u,this.type=s}function O(){this.reset()}function j(t,e,n){var r=t.s=e+n,o=r-e,i=r-o;t.t=e-i+(n-o)}function P(t,e,n,r){function o(e){return t(e=new Date(+e)),e}return o.floor=o,o.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},o.round=function(t){var e=o(t),n=o.ceil(t);return t-e<n-t?e:n},o.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},o.range=function(n,r,i){var a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;do{a.push(new Date(+n))}while(e(n,i),t(n),n<r);return a},o.filter=function(n){return P(function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})},n&&(o.count=function(e,r){return Ge.setTime(+e),Qe.setTime(+r),t(Ge),t(Qe),Math.floor(n(Ge,Qe))},o.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?o.filter(r?function(e){return r(e)%t==0}:function(e){return o.count(0,e)%t==0}):o:null}),o}function I(t){return P(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*tn)/en})}function R(t){return P(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/en})}function q(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 z(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 $(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function X(t,e,n){var r=t<0?"-":"",o=(r?-t:t)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(e)+o:o)}function Z(t){return t.replace(wn,"\\$&")}function V(t){return new RegExp("^(?:"+t.map(Z).join("|")+")","i")}function W(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function B(t,e,n){var r=mn.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function J(t,e,n){var r=mn.exec(e.slice(n));return r?(t.U=+r[0],n+r[0].length):-1}function G(t,e,n){var r=mn.exec(e.slice(n));return r?(t.W=+r[0],n+r[0].length):-1}function Q(t,e,n){var r=mn.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function K(t,e,n){var r=mn.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function tt(t,e,n){var r=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function et(t,e,n){var r=mn.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function nt(t,e,n){var r=mn.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function rt(t,e,n){var r=mn.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ot(t,e,n){var r=mn.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function it(t,e,n){var r=mn.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function at(t,e,n){var r=mn.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ft(t,e,n){var r=mn.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ct(t,e,n){var r=yn.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ut(t,e){return X(t.getDate(),e,2)}function st(t,e){return X(t.getHours(),e,2)}function lt(t,e){return X(t.getHours()%12||12,e,2)}function dt(t,e){return X(1+nn.count(an(t),t),e,3)}function ht(t,e){return X(t.getMilliseconds(),e,3)}function pt(t,e){return X(t.getMonth()+1,e,2)}function bt(t,e){return X(t.getMinutes(),e,2)}function gt(t,e){return X(t.getSeconds(),e,2)}function mt(t,e){return X(rn.count(an(t),t),e,2)}function yt(t){return t.getDay()}function wt(t,e){return X(on.count(an(t),t),e,2)}function xt(t,e){return X(t.getFullYear()%100,e,2)}function vt(t,e){return X(t.getFullYear()%1e4,e,4)}function _t(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+X(e/60|0,"0",2)+X(e%60,"0",2)}function Mt(t,e){return X(t.getUTCDate(),e,2)}function Tt(t,e){return X(t.getUTCHours(),e,2)}function Ct(t,e){return X(t.getUTCHours()%12||12,e,2)}function Nt(t,e){return X(1+fn.count(sn(t),t),e,3)}function kt(t,e){return X(t.getUTCMilliseconds(),e,3)}function Ut(t,e){return X(t.getUTCMonth()+1,e,2)}function Dt(t,e){return X(t.getUTCMinutes(),e,2)}function Ft(t,e){return X(t.getUTCSeconds(),e,2)}function At(t,e){return X(cn.count(sn(t),t),e,2)}function St(t){return t.getUTCDay()}function Ht(t,e){return X(un.count(sn(t),t),e,2)}function Et(t,e){return X(t.getUTCFullYear()%100,e,2)}function Yt(t,e){return X(t.getUTCFullYear()%1e4,e,4)}function Lt(){return"+0000"}function Ot(){return"%"}function jt(t){return ln=function(t){function e(t,e){return function(n){var r,o,i,a=[],f=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++f<u;)37===t.charCodeAt(f)&&(a.push(t.slice(c,f)),null!=(o=gn[r=t.charAt(++f)])?r=t.charAt(++f):o="e"===r?" ":"0",(i=e[r])&&(r=i(n,o)),a.push(r),c=f+1);return a.push(t.slice(c,f)),a.join("")}}function n(t,e){return function(n){var o=$(1900);if(r(o,t,n+="",0)!=n.length)return null;if("p"in o&&(o.H=o.H%12+12*o.p),"W"in o||"U"in o){"w"in o||(o.w="W"in o?1:0);var i="Z"in o?z($(o.y)).getUTCDay():e($(o.y)).getDay();o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7}return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,z(o)):e(o)}}function r(t,e,n,r){for(var o,i,a=0,f=e.length,c=n.length;a<f;){if(r>=c)return-1;if(37===(o=e.charCodeAt(a++))){if(o=e.charAt(a++),!(i=T[o in gn?e.charAt(a++):o])||(r=i(t,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}var o=t.dateTime,i=t.date,a=t.time,f=t.periods,c=t.days,u=t.shortDays,s=t.months,l=t.shortMonths,d=V(f),h=W(f),p=V(c),b=W(c),g=V(u),m=W(u),y=V(s),w=W(s),x=V(l),v=W(l),_={a:function(t){return u[t.getDay()]},A:function(t){return c[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:ut,e:ut,H:st,I:lt,j:dt,L:ht,m:pt,M:bt,p:function(t){return f[+(t.getHours()>=12)]},S:gt,U:mt,w:yt,W:wt,x:null,X:null,y:xt,Y:vt,Z:_t,"%":Ot},M={a:function(t){return u[t.getUTCDay()]},A:function(t){return c[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Mt,e:Mt,H:Tt,I:Ct,j:Nt,L:kt,m:Ut,M:Dt,p:function(t){return f[+(t.getUTCHours()>=12)]},S:Ft,U:At,w:St,W:Ht,x:null,X:null,y:Et,Y:Yt,Z:Lt,"%":Ot},T={a:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=b[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=x.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=w[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,e,n){return r(t,o,e,n)},d:nt,e:nt,H:ot,I:ot,j:rt,L:ft,m:et,M:it,p:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.p=h[r[0].toLowerCase()],n+r[0].length):-1},S:at,U:J,w:B,W:G,x:function(t,e,n){return r(t,i,e,n)},X:function(t,e,n){return r(t,a,e,n)},y:K,Y:Q,Z:tt,"%":ct};return _.x=e(i,_),_.X=e(a,_),_.c=e(o,_),M.x=e(i,M),M.X=e(a,M),M.c=e(o,M),{format:function(t){var n=e(t+="",_);return n.toString=function(){return t},n},parse:function(t){var e=n(t+="",q);return e.toString=function(){return t},e},utcFormat:function(t){var n=e(t+="",M);return n.toString=function(){return t},n},utcParse:function(t){var e=n(t,z);return e.toString=function(){return t},e}}}(t),dn=ln.format,hn=ln.parse,pn=ln.utcFormat,bn=ln.utcParse,ln}function Pt(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function It(t){return t<0?-1:1}function Rt(t,e,n){var r=t._x1-t._x0,o=e-t._x1,i=(t._y1-t._y0)/(r||o<0&&-0),a=(n-t._y1)/(o||r<0&&-0),f=(i*o+a*r)/(r+o);return(It(i)+It(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(f))||0}function qt(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function zt(t,e,n){var r=t._x0,o=t._y0,i=t._x1,a=t._y1,f=(i-r)/3;t._context.bezierCurveTo(r+f,o+f*e,i-f,a-f*n,i,a)}function $t(t){this._context=t}function Xt(t){this._context=t}var Zt=function(){return function(t){this.viewContainerRef=t}}();Zt.decorators=[{type:e.Directive,args:[{selector:"[d3TooltipHost]"}]}],Zt.ctorParameters=function(){return[{type:e.ViewContainerRef}]};var Vt=function(){function t(t){this.cfr=t,this.isVisible=!1}return Object.defineProperty(t.prototype,"cssTop",{get:function(){return this.position.top+"px"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cssLeft",{get:function(){return this.position.left+"px"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"cssClasses",{get:function(){return this.options.position+" "+this.options.cssClasses},enumerable:!0,configurable:!0}),t.prototype.loadComponent=function(){var t=this,e=this.cfr.resolveComponentFactory(this.component),n=this.componentHost.viewContainerRef;n.clear();var r=n.createComponent(e);Object.keys(this.inputs).forEach(function(e){r.instance[e]=t.inputs[e]}),Object.keys(this.outputs).forEach(function(e){r.instance[e].subscribe(t.outputs[e])})},t.prototype.ngOnInit=function(){var t=this;setTimeout(function(){t.isVisible=!0},1)},t}();Vt.decorators=[{type:e.Component,args:[{selector:"d3-tooltip",template:'\n <div class="ngx-d3-tooltip {{ cssClasses }}" [ngClass]="{ \'ngx-d3-tooltip_visible\': isVisible }">\n <div class="arrow"></div>\n <ng-template d3TooltipHost></ng-template>\n </div>\n ',styles:["\n d3-tooltip {\n position: absolute;\n width: 0;\n height: 0;\n overflow: visible;\n display: block;\n }\n d3-tooltip .ngx-d3-tooltip {\n display: inline-block;\n position: relative;\n background-color: #fff;\n border-color: #CCC;\n border-radius: 2px;\n -webkit-box-shadow: 0 1px 10px -3px rgba(0,0,0,0.3);\n box-shadow: 0 1px 10px -3px rgba(0,0,0,0.3);\n padding: 0.5rem 1rem;\n opacity: 0;\n -webkit-transition: opacity 0.2s ease-in;\n transition: opacity 0.2s ease-in;\n border: 1px solid #00000020;\n }\n d3-tooltip .ngx-d3-tooltip.ngx-d3-tooltip_visible {\n opacity: 1;\n }\n d3-tooltip .ngx-d3-tooltip .arrow {\n position: absolute;\n display: block;\n width: .8rem;\n height: .4rem;\n }\n d3-tooltip .ngx-d3-tooltip .arrow::before, d3-tooltip .ngx-d3-tooltip .arrow::after {\n position: absolute;\n display: block;\n border-color: #0000;\n border-style: solid;\n content: '';\n border-width: 10px;\n }\n /* TOP */\n d3-tooltip .ngx-d3-tooltip.top {\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n position: absolute;\n left: 0;\n bottom: 20px;\n }\n\n d3-tooltip .ngx-d3-tooltip.top .arrow {\n bottom: 0;\n left: 50%;\n }\n\n d3-tooltip .ngx-d3-tooltip.top .arrow::before {\n bottom: -20px;\n margin-left: -10px;\n border-top-color: #00000040;\n }\n\n d3-tooltip .ngx-d3-tooltip.top .arrow::after {\n bottom: -19px;\n margin-left: -10px;\n border-top-color: #fff;\n }\n\n /* BOTTOM */\n d3-tooltip .ngx-d3-tooltip.bottom {\n -webkit-transform: translateX(-50%);\n transform: translateX(-50%);\n position: absolute;\n left: 0;\n top: 20px;\n }\n\n d3-tooltip .ngx-d3-tooltip.bottom .arrow {\n top: 0;\n left: 50%;\n }\n\n d3-tooltip .ngx-d3-tooltip.bottom .arrow::before {\n top: -20px;\n margin-left: -10px;\n border-bottom-color: #00000040;\n }\n\n d3-tooltip .ngx-d3-tooltip.bottom .arrow::after {\n top: -19px;\n margin-left: -10px;\n border-bottom-color: #fff;\n }\n /* LEFT */\n d3-tooltip .ngx-d3-tooltip.left {\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n position: absolute;\n right: 20px;\n top: 0;\n }\n\n d3-tooltip .ngx-d3-tooltip.left .arrow {\n right: 0;\n top: 50%;\n }\n\n d3-tooltip .ngx-d3-tooltip.left .arrow::before {\n right: -20px;\n margin-top: -10px;\n border-left-color: #00000040;\n }\n\n d3-tooltip .ngx-d3-tooltip.left .arrow::after {\n right: -19px;\n margin-top: -10px;\n border-left-color: #fff;\n }\n\n /* RIGHT */\n d3-tooltip .ngx-d3-tooltip.right {\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n position: absolute;\n left: 20px;\n top: 0;\n }\n\n d3-tooltip .ngx-d3-tooltip.right .arrow {\n left: 0;\n top: 50%;\n }\n\n d3-tooltip .ngx-d3-tooltip.right .arrow::before {\n left: -20px;\n margin-top: -10px;\n border-right-color: #00000040;\n }\n\n d3-tooltip .ngx-d3-tooltip.right .arrow::after {\n left: -19px;\n margin-top: -10px;\n border-right-color: #fff;\n }\n\n /* TOPRIGHT */\n d3-tooltip .ngx-d3-tooltip.topRight {\n position: absolute;\n left: -15px;\n bottom: 20px;\n }\n\n d3-tooltip .ngx-d3-tooltip.topRight .arrow {\n bottom: 0;\n left: 15px;\n }\n\n d3-tooltip .ngx-d3-tooltip.topRight .arrow::before {\n bottom: -20px;\n margin-left: -10px;\n border-top-color: #00000040;\n }\n\n d3-tooltip .ngx-d3-tooltip.topRight .arrow::after {\n bottom: -19px;\n margin-left: -10px;\n border-top-color: #fff;\n }\n\n /* TOPLEFT */\n d3-tooltip .ngx-d3-tooltip.topLeft {\n position: absolute;\n right: -15px;\n bottom: 20px;\n }\n\n d3-tooltip .ngx-d3-tooltip.topLeft .arrow {\n bottom: 0;\n right: 15px;\n }\n\n d3-tooltip .ngx-d3-tooltip.topLeft .arrow::before {\n bottom: -20px;\n margin-right: -10px;\n border-top-color: #00000040;\n }\n\n d3-tooltip .ngx-d3-tooltip.topLeft .arrow::after {\n bottom: -19px;\n margin-right: -10px;\n border-top-color: #fff;\n }\n /* BOTTOMRIGHT */\n d3-tooltip .ngx-d3-tooltip.bottomRight {\n position: absolute;\n left: -15px;\n top: 25px;\n }\n\n d3-tooltip .ngx-d3-tooltip.bottomRight .arrow {\n top: 0;\n left: 15px;\n }\n\n d3-tooltip .ngx-d3-tooltip.bottomRight .arrow::before {\n top: -20px;\n margin-left: -10px;\n border-bottom-color: #00000040;\n }\n\n d3-tooltip .ngx-d3-tooltip.bottomRight .arrow::after {\n top: -19px;\n margin-left: -10px;\n border-bottom-color: #fff;\n }\n\n /* BOTTOMLEFT */\n d3-tooltip .ngx-d3-tooltip.bottomLeft {\n position: absolute;\n right: -15px;\n top: 25px;\n }\n\n d3-tooltip .ngx-d3-tooltip.bottomLeft .arrow {\n top: 0;\n right: 15px;\n }\n\n d3-tooltip .ngx-d3-tooltip.bottomLeft .arrow::before {\n top: -20px;\n margin-right: -10px;\n border-bottom-color: #00000040;\n }\n\n d3-tooltip .ngx-d3-tooltip.bottomLeft .arrow::after {\n top: -19px;\n margin-right: -10px;\n border-bottom-color: #fff;\n }\n "],encapsulation:e.ViewEncapsulation.None}]}],Vt.ctorParameters=function(){return[{type:e.ComponentFactoryResolver}]},Vt.propDecorators={component:[{type:e.Input}],position:[{type:e.Input}],options:[{type:e.Input}],inputs:[{type:e.Input}],outputs:[{type:e.Input}],componentHost:[{type:e.ViewChild,args:[Zt]}],cssTop:[{type:e.HostBinding,args:["style.top"]}],cssLeft:[{type:e.HostBinding,args:["style.left"]}]};var Wt=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},Bt=(function(t){1===t.length&&(t=function(t){return function(e,n){return Wt(t(e),n)}}(t))}(Wt),{value:function(){}});if(o.prototype=r.prototype={constructor:o,on:function(t,e){var n,r=this._,o=function(t,e){return t.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}(t+"",r),a=-1,f=o.length;{if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<f;)if(n=(t=o[a]).type)r[n]=i(r[n],t.name,e);else if(null==e)for(n in r)r[n]=i(r[n],t.name,null);return this}for(;++a<f;)if((n=(t=o[a]).type)&&(n=function(t,e){for(var n,r=0,o=t.length;r<o;++r)if((n=t[r]).name===e)return n.value}(r[n],t.name)))return n}},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new o(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,o)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}},"undefined"!=typeof document){var Jt=document.documentElement;if(!Jt.matches)Jt.webkitMatchesSelector||Jt.msMatchesSelector||Jt.mozMatchesSelector||Jt.oMatchesSelector}if("undefined"!=typeof document)document.documentElement;var Gt=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t},Qt="\\s*([+-]?\\d+)\\s*",Kt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",te="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ee=/^#([0-9a-f]{3})$/,ne=/^#([0-9a-f]{6})$/,re=new RegExp("^rgb\\("+[Qt,Qt,Qt]+"\\)$"),oe=new RegExp("^rgb\\("+[te,te,te]+"\\)$"),ie=new RegExp("^rgba\\("+[Qt,Qt,Qt,Kt]+"\\)$"),ae=new RegExp("^rgba\\("+[te,te,te,Kt]+"\\)$"),fe=new RegExp("^hsl\\("+[Kt,te,te]+"\\)$"),ce=new RegExp("^hsla\\("+[Kt,te,te,Kt]+"\\)$"),ue={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};Gt(f,c,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Gt(d,function(t,e,n,r){return 1===arguments.length?l(t):new d(t,e,n,null==r?1:r)},a(f,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new d(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new d(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),Gt(b,p,a(f,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new b(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new b(this.h,this.s,this.l*t,this.opacity)},rgb:function(){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,o=2*n-r;return new d(g(t>=240?t-240:t+120,o,r),g(t,o,r),g(t<120?t+240:t-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var se=Math.PI/180,le=180/Math.PI,de=.95047,he=1,pe=1.08883,be=4/29,ge=6/29,me=3*ge*ge,ye=ge*ge*ge;Gt(y,function(t,e,n,r){return 1===arguments.length?m(t):new y(t,e,n,null==r?1:r)},a(f,{brighter:function(t){return new y(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new y(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=he*x(t),e=de*x(e),n=pe*x(n),new d(v(3.2404542*e-1.5371385*t-.4985314*n),v(-.969266*e+1.8760108*t+.041556*n),v(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),Gt(T,M,a(f,{brighter:function(t){return new T(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new T(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return m(this).rgb()}}));var we=-.14861,xe=1.78277,ve=-.29227,_e=-.90649,Me=1.97294,Te=Me*_e,Ce=Me*xe,Ne=xe*ve-_e*we;Gt(N,C,a(f,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new N(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new N(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*se,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new d(255*(e+n*(we*r+xe*o)),255*(e+n*(ve*r+_e*o)),255*(e+n*(Me*r)),this.opacity)}}));var ke=function(t){return function(){return t}};Math.PI,Math.SQRT2;D(function(t,e){var n=e-t;return n?k(t,n>180||n<-180?n-360*Math.round(n/360):n):ke(isNaN(t)?e:t)});var Ue=D(U),De=("object"==typeof performance&&performance.now?performance:Date,"object"==typeof window&&window.requestAnimationFrame&&window.requestAnimationFrame.bind(window),r("start","end","interrupt"),Math.PI,Math.PI,["e","w"].map(F),["n","s"].map(F),["n","e","s","w","nw","ne","se","sw"].map(F),Math.PI,Math.PI,{}),Fe={},Ae=34,Se=10,He=13,Ee=function(t){function e(t,e){var r,o,i=n(t,function(t,n){if(r)return r(t,n-1);o=t,r=e?function(t,e){var n=A(t);return function(r,o){return e(n(r),o,t)}}(t,e):A(t)});return i.columns=o,i}function n(t,e){function n(){if(u)return Fe;if(s)return s=!1,De;var e,n,r=a;if(t.charCodeAt(r)===Ae){for(;a++<i&&t.charCodeAt(a)!==Ae||t.charCodeAt(++a)===Ae;);return(e=a)>=i?u=!0:(n=t.charCodeAt(a++))===Se?s=!0:n===He&&(s=!0,t.charCodeAt(a)===Se&&++a),t.slice(r+1,e-1).replace(/""/g,'"')}for(;a<i;){if((n=t.charCodeAt(e=a++))===Se)s=!0;else if(n===He)s=!0,t.charCodeAt(a)===Se&&++a;else if(n!==f)continue;return t.slice(r,e)}return u=!0,t.slice(r,i)}var r,o=[],i=t.length,a=0,c=0,u=i<=0,s=!1;for(t.charCodeAt(i-1)===Se&&--i,t.charCodeAt(i-1)===He&&--i;(r=n())!==Fe;){for(var l=[];r!==De&&r!==Fe;)l.push(r),r=n();e&&null==(l=e(l,c++))||o.push(l)}return o}function r(e,n){return null==n&&(n=function(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var r in t)r in e||n.push(e[r]=r)}),n}(e)),[n.map(i).join(t)].concat(e.map(function(e){return n.map(function(t){return i(e[t])}).join(t)})).join("\n")}function o(e){return e.map(i).join(t)}function i(t){return null==t?"":a.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}var a=new RegExp('["'+t+"\n\r]"),f=t.charCodeAt(0);return{parse:e,parseRows:n,format:r,formatRows:function(t){return t.map(o).join("\n")}}},Ye=(Ee(","),Ee("\t"),function(t,e,n,r,o){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=o}),Le=function(t,e,n){var r=new H(null==e?function(t){return t[0]}:e,null==n?function(t){return t[1]}:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}.prototype=H.prototype;Le.copy=function(){var t,e,n=new H(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=E(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var o=0;o<4;++o)(e=r.source[o])&&(e.length?t.push({source:e,target:r.target[o]=new Array(4)}):r.target[o]=E(e));return n},Le.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return S(this.cover(e,n),e,n,t)},Le.addAll=function(t){var e,n,r,o,i=t.length,a=new Array(i),f=new Array(i),c=Infinity,u=Infinity,s=-Infinity,l=-Infinity;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(a[n]=r,f[n]=o,r<c&&(c=r),r>s&&(s=r),o<u&&(u=o),o>l&&(l=o));for(s<c&&(c=this._x0,s=this._x1),l<u&&(u=this._y0,l=this._y1),this.cover(c,u).cover(s,l),n=0;n<i;++n)S(this,a[n],f[n],t[n]);return this},Le.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,o=this._x1,i=this._y1;if(isNaN(n))o=(n=Math.floor(t))+1,i=(r=Math.floor(e))+1;else{if(!(n>t||t>o||r>e||e>i))return this;var a,f,c=o-n,u=this._root;switch(f=(e<(r+i)/2)<<1|t<(n+o)/2){case 0:do{a=new Array(4),a[f]=u,u=a}while(c*=2,o=n+c,i=r+c,t>o||e>i);break;case 1:do{a=new Array(4),a[f]=u,u=a}while(c*=2,n=o-c,i=r+c,n>t||e>i);break;case 2:do{a=new Array(4),a[f]=u,u=a}while(c*=2,o=n+c,r=i-c,t>o||r>e);break;case 3:do{a=new Array(4),a[f]=u,u=a}while(c*=2,n=o-c,r=i-c,n>t||r>e)}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=o,this._y1=i,this},Le.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},Le.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?undefined:[[this._x0,this._y0],[this._x1,this._y1]]},Le.find=function(t,e,n){var r,o,i,a,f,c,u,s=this._x0,l=this._y0,d=this._x1,h=this._y1,p=[],b=this._root;for(b&&p.push(new Ye(b,s,l,d,h)),null==n?n=Infinity:(s=t-n,l=e-n,d=t+n,h=e+n,n*=n);c=p.pop();)if(!(!(b=c.node)||(o=c.x0)>d||(i=c.y0)>h||(a=c.x1)<s||(f=c.y1)<l))if(b.length){var g=(o+a)/2,m=(i+f)/2;p.push(new Ye(b[3],g,m,a,f),new Ye(b[2],o,m,g,f),new Ye(b[1],g,i,a,m),new Ye(b[0],o,i,g,m)),(u=(e>=m)<<1|t>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=c)}else{var y=t-+this._x.call(null,b.data),w=e-+this._y.call(null,b.data),x=y*y+w*w;if(x<n){var v=Math.sqrt(n=x);s=t-v,l=e-v,d=t+v,h=e+v,r=b.data}}return r},Le.remove=function(t){if(isNaN(i=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,o,i,a,f,c,u,s,l,d,h=this._root,p=this._x0,b=this._y0,g=this._x1,m=this._y1;if(!h)return this;if(h.length)for(;;){if((u=i>=(f=(p+g)/2))?p=f:g=f,(s=a>=(c=(b+m)/2))?b=c:m=c,e=h,!(h=h[l=s<<1|u]))return this;if(!h.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,d=l)}for(;h.data!==t;)if(r=h,!(h=h.next))return this;return(o=h.next)&&delete h.next,r?(o?r.next=o:delete r.next,this):e?(o?e[l]=o:delete e[l],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[d]=h:this._root=h),this):(this._root=o,this)},Le.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Le.root=function(){return this._root},Le.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},Le.visit=function(t){var e,n,r,o,i,a,f=[],c=this._root;for(c&&f.push(new Ye(c,this._x0,this._y0,this._x1,this._y1));e=f.pop();)if(!t(c=e.node,r=e.x0,o=e.y0,i=e.x1,a=e.y1)&&c.length){var u=(r+i)/2,s=(o+a)/2;(n=c[3])&&f.push(new Ye(n,u,s,i,a)),(n=c[2])&&f.push(new Ye(n,r,s,u,a)),(n=c[1])&&f.push(new Ye(n,u,o,i,s)),(n=c[0])&&f.push(new Ye(n,r,o,u,s))}return this},Le.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Ye(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var i,a=e.x0,f=e.y0,c=e.x1,u=e.y1,s=(a+c)/2,l=(f+u)/2;(i=o[0])&&n.push(new Ye(i,a,f,s,l)),(i=o[1])&&n.push(new Ye(i,s,f,c,l)),(i=o[2])&&n.push(new Ye(i,a,l,s,u)),(i=o[3])&&n.push(new Ye(i,s,l,c,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Le.x=function(t){return arguments.length?(this._x=t,this):this._x},Le.y=function(t){return arguments.length?(this._y=t,this):this._y};Math.PI,Math.sqrt(5);var Oe,je=function(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)]},Pe=function(t){return(t=je(Math.abs(t)))?t[1]:NaN},Ie=function(t,e){var n=je(t,e);if(!n)return t+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")},Re={"":function(t,e){t:for(var n,r=(t=t.toPrecision(e)).length,o=1,i=-1;o<r;++o)switch(t[o]){case".":i=n=o;break;case"0":0===i&&(i=o),n=o;break;case"e":break t;default:i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t},"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Ie(100*t,e)},r:Ie,s:function(t,e){var n=je(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(Oe=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+je(t,Math.max(0,e+i-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},qe=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;Y.prototype=L.prototype,L.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var ze,$e,Xe,Ze=function(t){return t},Ve=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],We=function(t){function e(t){function e(t){var e,r,a,s=g,x=m;if("c"===b)x=y(t)+x,t="";else{var v=(t=+t)<0;if(t=y(Math.abs(t),p),v&&0==+t&&(v=!1),s=(v?"("===u?u:"-":"-"===u||"("===u?"":u)+s,x=x+("s"===b?Ve[8+Oe/3]:"")+(v&&"("===u?")":""),w)for(e=-1,r=t.length;++e<r;)if(48>(a=t.charCodeAt(e))||a>57){x=(46===a?o+t.slice(e+1):t.slice(e))+x,t=t.slice(0,e);break}}h&&!l&&(t=n(t,Infinity));var _=s.length+t.length+x.length,M=_<d?new Array(d-_+1).join(f):"";switch(h&&l&&(t=n(M+t,M.length?d-x.length:Infinity),M=""),c){case"<":t=s+t+x+M;break;case"=":t=s+M+t+x;break;case"^":t=M.slice(0,_=M.length>>1)+s+t+x+M.slice(_);break;default:t=M+s+t+x}return i(t)}var f=(t=Y(t)).fill,c=t.align,u=t.sign,s=t.symbol,l=t.zero,d=t.width,h=t.comma,p=t.precision,b=t.type,g="$"===s?r[0]:"#"===s&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",m="$"===s?r[1]:/[%p]/.test(b)?a:"",y=Re[b],w=!b||/[defgprs%]/.test(b);return p=null==p?b?6:12:/[gprs]/.test(b)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),e.toString=function(){return t+""},e}var n=t.grouping&&t.thousands?function(t,e){return function(n,r){for(var o=n.length,i=[],a=0,f=t[0],c=0;o>0&&f>0&&(c+f+1>r&&(f=Math.max(1,r-c)),i.push(n.substring(o-=f,o+f)),!((c+=f+1)>r));)f=t[a=(a+1)%t.length];return i.reverse().join(e)}}(t.grouping,t.thousands):Ze,r=t.currency,o=t.decimal,i=t.numerals?function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(t.numerals):Ze,a=t.percent||"%";return{format:e,formatPrefix:function(t,n){var r=e((t=Y(t),t.type="f",t)),o=3*Math.max(-8,Math.min(8,Math.floor(Pe(n)/3))),i=Math.pow(10,-o),a=Ve[8+o/3];return function(t){return r(i*t)+a}}}};!function(t){ze=We(t),$e=ze.format,Xe=ze.formatPrefix}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Be=function(){return new O};O.prototype={constructor:O,reset:function(){this.s=this.t=0},add:function(t){j(Je,t,this.t),j(this,Je.s,this.s),this.s?this.t+=Je.t:this.s=Je.t},valueOf:function(){return this.s}};var Je=new O,Ge=(Math.PI,Be(),Be(),Be(),Be(),Be(),Be(),Be(),Be(),new Date),Qe=new Date,Ke=P(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});Ke.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?P(function(e){e.setTime(Math.floor(e/t)*t)},function(e,n){e.setTime(+e+n*t)},function(e,n){return(n-e)/t}):Ke:null};var tn=6e4,en=6048e5,nn=(P(function(t){t.setTime(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(+t+1e3*e)},function(t,e){return(e-t)/1e3},function(t){return t.getUTCSeconds()}),P(function(t){t.setTime(Math.floor(t/tn)*tn)},function(t,e){t.setTime(+t+e*tn)},function(t,e){return(e-t)/tn},function(t){return t.getMinutes()}),P(function(t){var e=t.getTimezoneOffset()*tn%36e5;e<0&&(e+=36e5),t.setTime(36e5*Math.floor((+t-e)/36e5)+e)},function(t,e){t.setTime(+t+36e5*e)},function(t,e){return(e-t)/36e5},function(t){return t.getHours()}),P(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*tn)/864e5},function(t){return t.getDate()-1})),rn=I(0),on=I(1),an=(I(2),I(3),I(4),I(5),I(6),P(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),P(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()}));an.every=function(t){return isFinite(t=Math.floor(t))&&t>0?P(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};P(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*tn)},function(t,e){return(e-t)/tn},function(t){return t.getUTCMinutes()}),P(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+36e5*e)},function(t,e){return(e-t)/36e5},function(t){return t.getUTCHours()});var fn=P(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/864e5},function(t){return t.getUTCDate()-1}),cn=R(0),un=R(1),sn=(R(2),R(3),R(4),R(5),R(6),P(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),P(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()}));sn.every=function(t){return isFinite(t=Math.floor(t))&&t>0?P(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};var ln,dn,hn,pn,bn,gn={"-":"",_:" ",0:"0"},mn=/^\s*\d+/,yn=/^%/,wn=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;jt({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"]});Date.prototype.toISOString||pn("%Y-%m-%dT%H:%M:%S.%LZ"),+new Date("2000-01-01T00:00:00.000Z")||bn("%Y-%m-%dT%H:%M:%S.%LZ");var xn=function(t){return t.match(/.{6}/g).map(function(t){return"#"+t})};xn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),xn("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),xn("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),xn("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),Ue(C(300,.5,0),C(-240,.5,1));Ue(C(-100,.75,.35),C(80,1.5,.8)),Ue(C(260,.75,.35),C(80,1.5,.8)),C();Pt(xn("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));Pt(xn("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Pt(xn("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Pt(xn("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),Math.PI;$t.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:zt(this,this._t0,qt(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&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,zt(this,qt(this,n=Rt(this,t,e)),n);break;default:zt(this,this._t0,n=Rt(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(function(t){this._context=new Xt(t)}.prototype=Object.create($t.prototype)).point=function(t,e){$t.prototype.point.call(this,e,t)},Xt.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,