!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.tooltip=n():(t.britecharts=t.britecharts||{},t.britecharts.tooltip=n())}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=108)}([function(t,n,e){"use strict";e.d(n,"a",(function(){return u}));var r=new Date,i=new Date;function u(t,n,e,o){function a(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return a.floor=function(n){return t(n=new Date(+n)),n},a.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},a.round=function(t){var n=a(t),e=a.ceil(t);return t-n0))return o;do{o.push(u=new Date(+e)),n(e,i),t(e)}while(u=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(a.count=function(n,u){return r.setTime(+n),i.setTime(+u),t(r),t(i),Math.floor(e(r,i))},a.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?a.filter(o?function(n){return o(n)%t==0}:function(n){return a.count(0,n)%t==0}):a:null}),a}},function(t,n,e){"use strict";e.d(n,"d",(function(){return r})),e.d(n,"c",(function(){return i})),e.d(n,"b",(function(){return u})),e.d(n,"a",(function(){return o})),e.d(n,"e",(function(){return a}));var r=1e3,i=6e4,u=36e5,o=864e5,a=6048e5},function(t,n,e){"use strict";e.r(n);var r=function(t,n){return tn?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)<0?r=u+1:i=u}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)>0?i=u:r=u+1}return r}}};var u=i(r),o=u.right,a=u.left,c=o,s=function(t,n){null==n&&(n=l);for(var e=0,r=t.length-1,i=t[0],u=new Array(r<0?0:r);et?1:n>=t?0:NaN},d=function(t){return null===t?NaN:+t},_=function(t,n){var e,r,i=t.length,u=0,o=-1,a=0,c=0;if(null==n)for(;++o1)return c/(u-1)},p=function(t,n){var e=_(t,n);return e?Math.sqrt(e):e},y=function(t,n){var e,r,i,u=t.length,o=-1;if(null==n){for(;++o=e)for(r=i=e;++oe&&(r=e),i=e)for(r=i=e;++oe&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/o),n=Math.floor(n/o),u=new Array(i=Math.ceil(n-t+1));++a=0?(u>=M?10:u>=T?5:u>=O?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(u>=M?10:u>=T?5:u>=O?2:1)}function N(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),u=r/i;return u>=M?i*=10:u>=T?i*=5:u>=O&&(i*=2),nf;)h.pop(),--d;var _,p=new Array(d+1);for(i=0;i<=d;++i)(_=p[i]=[]).x0=i>0?h[i-1]:l,_.x1=i=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,u=Math.floor(i),o=+e(t[u],u,t);return o+(+e(t[u+1],u+1,t)-o)*(i-u)}},E=function(t,n,e){return t=m.call(t,d).sort(r),Math.ceil((e-n)/(2*(C(t,.75)-C(t,.25))*Math.pow(t.length,-1/3)))},D=function(t,n,e){return Math.ceil((e-n)/(3.5*p(t)*Math.pow(t.length,-1/3)))},U=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ur&&(r=e)}else for(;++u=e)for(r=e;++ur&&(r=e);return r},F=function(t,n){var e,r=t.length,i=r,u=-1,o=0;if(null==n)for(;++u=0;)for(n=(r=t[i]).length;--n>=0;)e[--o]=r[n];return e},I=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ue&&(r=e)}else for(;++u=e)for(r=e;++ue&&(r=e);return r},L=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},H=function(t,n){if(e=t.length){var e,i,u=0,o=0,a=t[o];for(null==n&&(n=r);++u>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new O(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new O(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=f.exec(t))?new O(n[1],n[2],n[3],1):(n=h.exec(t))?new O(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=d.exec(t))?w(n[1],n[2],n[3],n[4]):(n=_.exec(t))?w(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=p.exec(t))?j(n[1],n[2]/100,n[3]/100,1):(n=y.exec(t))?j(n[1],n[2]/100,n[3]/100,n[4]):v.hasOwnProperty(t)?b(v[t]):"transparent"===t?new O(NaN,NaN,NaN,0):null}function b(t){return new O(t>>16&255,t>>8&255,255&t,1)}function w(t,n,e,r){return r<=0&&(t=n=e=NaN),new O(t,n,e,r)}function M(t){return t instanceof i||(t=x(t)),t?new O((t=t.rgb()).r,t.g,t.b,t.opacity):new O}function T(t,n,e,r){return 1===arguments.length?M(t):new O(t,n,e,null==r?1:r)}function O(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function S(){return"#"+N(this.r)+N(this.g)+N(this.b)}function A(){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+")")}function N(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function j(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new E(t,n,e,r)}function k(t){if(t instanceof E)return new E(t.h,t.s,t.l,t.opacity);if(t instanceof i||(t=x(t)),!t)return new E;if(t instanceof E)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,u=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,c=o-u,s=(o+u)/2;return c?(a=n===o?(e-r)/c+6*(e0&&s<1?0:a,new E(a,c,s,t.opacity)}function C(t,n,e,r){return 1===arguments.length?k(t):new E(t,n,e,null==r?1:r)}function E(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function D(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Object(r.a)(i,x,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:g,formatHex:g,formatHsl:function(){return k(this).formatHsl()},formatRgb:m,toString:m}),Object(r.a)(O,T,Object(r.b)(i,{brighter:function(t){return t=null==t?o:Math.pow(o,t),new O(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?u:Math.pow(u,t),new O(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:S,formatHex:S,formatRgb:A,toString:A})),Object(r.a)(E,C,Object(r.b)(i,{brighter:function(t){return t=null==t?o:Math.pow(o,t),new E(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?u:Math.pow(u,t),new E(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new O(D(t>=240?t-240:t+120,i,r),D(t,i,r),D(t<120?t+240:t-120,i,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},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}))},function(t,n,e){"use strict";var r=e(18);n.a=function(t){return(t=Object(r.a)(Math.abs(t)))?t[1]:NaN}},function(t,n,e){"use strict";var r=e(19),i=e(33),u=e(34),o=function(t){return new Array(t.length)};function a(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}a.prototype={constructor:a,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function c(t,n,e,r,i,u){for(var o,c=0,s=n.length,l=u.length;cn?1:t>=n?0:NaN}var f=e(20);function h(t){return function(){this.removeAttribute(t)}}function d(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _(t,n){return function(){this.setAttribute(t,n)}}function p(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function y(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function v(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}var g=e(35);function m(t){return function(){delete this[t]}}function x(t,n){return function(){this[t]=n}}function b(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function w(t){return t.trim().split(/^|\s+/)}function M(t){return t.classList||new T(t)}function T(t){this._node=t,this._names=w(t.getAttribute("class")||"")}function O(t,n){for(var e=M(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function k(){this.textContent=""}function C(t){return function(){this.textContent=t}}function E(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function D(){this.innerHTML=""}function U(t){return function(){this.innerHTML=t}}function F(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function P(){this.nextSibling&&this.parentNode.appendChild(this)}function Y(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}var I=e(12);function L(){return null}function H(){var t=this.parentNode;t&&t.removeChild(this)}function q(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function R(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}var B=e(17),z=e(21);function X(t,n,e){var r=Object(z.a)(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function W(t,n){return function(){return X(this,t,n)}}function V(t,n){return function(){return X(this,t,n.apply(this,arguments))}}e.d(n,"c",(function(){return Z})),e.d(n,"a",(function(){return $}));var Z=[null];function $(t,n){this._groups=t,this._parents=n}function Q(){return new $([[document.documentElement]],Z)}$.prototype=Q.prototype={constructor:$,select:function(t){"function"!=typeof t&&(t=Object(r.a)(t));for(var n=this._groups,e=n.length,i=new Array(e),u=0;u=M&&(M=w+1);!(b=m[M])&&++M=0;)(r=i[u])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=l);for(var e=this._groups,r=e.length,i=new Array(r),u=0;u1?this.each((null==n?m:"function"==typeof n?b:x)(t,n)):this.node()[t]},classed:function(t,n){var e=w(t+"");if(arguments.length<2){for(var r=M(this.node()),i=-1,u=e.length;++i180||e<-180?e-360*Math.round(e/360):e):Object(r.a)(isNaN(t)?n:t)}function o(t){return 1==(t=+t)?a:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):Object(r.a)(isNaN(n)?e:n)}}function a(t,n){var e=n-t;return e?i(t,e):Object(r.a)(isNaN(t)?n:t)}},function(t,n,e){"use strict";function r(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}e.d(n,"b",(function(){return r})),n.a=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t}},function(t,n,e){"use strict";var r=e(20),i=e(14);function u(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===i.b&&n.documentElement.namespaceURI===i.b?n.createElement(t):n.createElementNS(e,t)}}function o(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}n.a=function(t){var n=Object(r.a)(t);return(n.local?o:u)(n)}},function(t,n,e){"use strict";n.a=function(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}},function(t,n,e){"use strict";e.d(n,"b",(function(){return r}));var r="http://www.w3.org/1999/xhtml";n.a={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},function(t,n,e){"use strict";e.d(n,"b",(function(){return u}));var r=e(0),i=Object(r.a)((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Object(r.a)((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null},n.a=i;var u=i.range},function(t,n,e){"use strict";e.d(n,"b",(function(){return u}));var r=e(0),i=Object(r.a)((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Object(r.a)((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null},n.a=i;var u=i.range},function(t,n,e){"use strict";e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){return l}));var r={},i=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(r={mouseenter:"mouseover",mouseleave:"mouseout"}));function u(t,n,e){return t=o(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function o(t,n,e){return function(r){var u=i;i=r;try{t.call(this,this.__data__,n,e)}finally{i=u}}}function a(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function c(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,u=n.length;r1?r[0]+r.slice(2):r,+t.slice(e+1)]}},function(t,n,e){"use strict";function r(){}n.a=function(t){return null==t?r:function(){return this.querySelector(t)}}},function(t,n,e){"use strict";var r=e(14);n.a=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),r.a.hasOwnProperty(n)?{space:r.a[n],local:t}:t}},function(t,n,e){"use strict";n.a=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}},function(t,n,e){"use strict";var r=e(17);n.a=function(){for(var t,n=r.c;t=n.sourceEvent;)n=t;return n}},function(t,n,e){"use strict";n.a=function(t){return function(){return t}}},function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"a",(function(){return u}));var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function i(t){if(!(n=r.exec(t)))throw new Error("invalid format: "+t);var n;return new u({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function u(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+""}i.prototype=u.prototype,u.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}},,function(t,n,e){"use strict";function r(t,n,e,r,i){var u=t*t,o=u*t;return((1-3*t+3*u-o)*n+(4-6*u+3*o)*e+(1+3*t+3*u-3*o)*r+o*i)/6}e.d(n,"a",(function(){return r})),n.b=function(t){var n=t.length-1;return function(e){var i=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),u=t[i],o=t[i+1],a=i>0?t[i-1]:2*u-o,c=i0?t>1?Object(r.a)((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):i:null},n.a=i;var u=i.range},function(t,n,e){"use strict";var r=e(9);n.a=function(t){return"string"==typeof t?new r.a([[document.querySelector(t)]],[document.documentElement]):new r.a([[t]],r.c)}},function(t,n,e){"use strict";function r(){return[]}n.a=function(t){return null==t?r:function(){return this.querySelectorAll(t)}}},function(t,n,e){"use strict";n.a=function(t){return function(){return this.matches(t)}}},function(t,n,e){"use strict";e.d(n,"b",(function(){return a}));var r=e(21);function i(t){return function(){this.style.removeProperty(t)}}function u(t,n,e){return function(){this.style.setProperty(t,n,e)}}function o(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function a(t,n){return t.style.getPropertyValue(n)||Object(r.a)(t).getComputedStyle(t,null).getPropertyValue(n)}n.a=function(t,n,e){return arguments.length>1?this.each((null==n?i:"function"==typeof n?o:u)(t,n,null==e?"":e)):a(this.node(),t)}},,function(t,n,e){"use strict";var r,i=e(8),u=e(24),o=e(18),a=function(t,n){var e=Object(o.a)(t,n);if(!e)return t+"";var r=e[0],i=e[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")},c={"%":function(t,n){return(100*t).toFixed(n)},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,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return a(100*t,n)},r:a,s:function(t,n){var e=Object(o.a)(t,n);if(!e)return t+"";var i=e[0],u=e[1],a=u-(r=3*Math.max(-8,Math.min(8,Math.floor(u/3))))+1,c=i.length;return a===c?i:a>c?i+new Array(a-c+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Object(o.a)(t,Math.max(0,n+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},s=function(t){return t},l=Array.prototype.map,f=["y","z","a","f","p","n","ยต","m","","k","M","G","T","P","E","Z","Y"];n.a=function(t){var n,e,o=void 0===t.grouping||void 0===t.thousands?s:(n=l.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,u=[],o=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),u.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[o=(o+1)%n.length];return u.reverse().join(e)}),a=void 0===t.currency?"":t.currency[0]+"",h=void 0===t.currency?"":t.currency[1]+"",d=void 0===t.decimal?".":t.decimal+"",_=void 0===t.numerals?s:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(l.call(t.numerals,String)),p=void 0===t.percent?"%":t.percent+"",y=void 0===t.minus?"-":t.minus+"",v=void 0===t.nan?"NaN":t.nan+"";function g(t){var n=(t=Object(u.b)(t)).fill,e=t.align,i=t.sign,s=t.symbol,l=t.zero,g=t.width,m=t.comma,x=t.precision,b=t.trim,w=t.type;"n"===w?(m=!0,w="g"):c[w]||(void 0===x&&(x=12),b=!0,w="g"),(l||"0"===n&&"="===e)&&(l=!0,n="0",e="=");var M="$"===s?a:"#"===s&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T="$"===s?h:/[%p]/.test(w)?p:"",O=c[w],S=/[defgprs%]/.test(w);function A(t){var u,a,c,s=M,h=T;if("c"===w)h=O(t)+h,t="";else{var p=(t=+t)<0;if(t=isNaN(t)?v:O(Math.abs(t),x),b&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),p&&0==+t&&(p=!1),s=(p?"("===i?i:y:"-"===i||"("===i?"":i)+s,h=("s"===w?f[8+r/3]:"")+h+(p&&"("===i?")":""),S)for(u=-1,a=t.length;++u(c=t.charCodeAt(u))||c>57){h=(46===c?d+t.slice(u+1):t.slice(u))+h,t=t.slice(0,u);break}}m&&!l&&(t=o(t,1/0));var A=s.length+t.length+h.length,N=A>1)+s+t+h+N.slice(A);break;default:t=N+s+t+h}return _(t)}return x=void 0===x?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x)),A.toString=function(){return t+""},A}return{format:g,formatPrefix:function(t,n){var e=g(((t=Object(u.b)(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Object(i.a)(n)/3))),o=Math.pow(10,-r),a=f[8+r/3];return function(t){return e(o*t)+a}}}}},function(t,n,e){"use strict";e.r(n);var r=e(0);e.d(n,"timeInterval",(function(){return r.a}));var i=e(31);e.d(n,"timeMillisecond",(function(){return i.a})),e.d(n,"timeMilliseconds",(function(){return i.b})),e.d(n,"utcMillisecond",(function(){return i.a})),e.d(n,"utcMilliseconds",(function(){return i.b}));var u=e(30);e.d(n,"timeSecond",(function(){return u.a})),e.d(n,"timeSeconds",(function(){return u.b})),e.d(n,"utcSecond",(function(){return u.a})),e.d(n,"utcSeconds",(function(){return u.b}));var o=e(49);e.d(n,"timeMinute",(function(){return o.a})),e.d(n,"timeMinutes",(function(){return o.b}));var a=e(48);e.d(n,"timeHour",(function(){return a.a})),e.d(n,"timeHours",(function(){return a.b}));var c=e(27);e.d(n,"timeDay",(function(){return c.b})),e.d(n,"timeDays",(function(){return c.a}));var s=e(3);e.d(n,"timeWeek",(function(){return s.g})),e.d(n,"timeWeeks",(function(){return s.h})),e.d(n,"timeSunday",(function(){return s.g})),e.d(n,"timeSundays",(function(){return s.h})),e.d(n,"timeMonday",(function(){return s.c})),e.d(n,"timeMondays",(function(){return s.d})),e.d(n,"timeTuesday",(function(){return s.k})),e.d(n,"timeTuesdays",(function(){return s.l})),e.d(n,"timeWednesday",(function(){return s.m})),e.d(n,"timeWednesdays",(function(){return s.n})),e.d(n,"timeThursday",(function(){return s.i})),e.d(n,"timeThursdays",(function(){return s.j})),e.d(n,"timeFriday",(function(){return s.a})),e.d(n,"timeFridays",(function(){return s.b})),e.d(n,"timeSaturday",(function(){return s.e})),e.d(n,"timeSaturdays",(function(){return s.f}));var l=e(47);e.d(n,"timeMonth",(function(){return l.a})),e.d(n,"timeMonths",(function(){return l.b}));var f=e(15);e.d(n,"timeYear",(function(){return f.a})),e.d(n,"timeYears",(function(){return f.b}));var h=e(52);e.d(n,"utcMinute",(function(){return h.a})),e.d(n,"utcMinutes",(function(){return h.b}));var d=e(51);e.d(n,"utcHour",(function(){return d.a})),e.d(n,"utcHours",(function(){return d.b}));var _=e(28);e.d(n,"utcDay",(function(){return _.a})),e.d(n,"utcDays",(function(){return _.b}));var p=e(4);e.d(n,"utcWeek",(function(){return p.g})),e.d(n,"utcWeeks",(function(){return p.h})),e.d(n,"utcSunday",(function(){return p.g})),e.d(n,"utcSundays",(function(){return p.h})),e.d(n,"utcMonday",(function(){return p.c})),e.d(n,"utcMondays",(function(){return p.d})),e.d(n,"utcTuesday",(function(){return p.k})),e.d(n,"utcTuesdays",(function(){return p.l})),e.d(n,"utcWednesday",(function(){return p.m})),e.d(n,"utcWednesdays",(function(){return p.n})),e.d(n,"utcThursday",(function(){return p.i})),e.d(n,"utcThursdays",(function(){return p.j})),e.d(n,"utcFriday",(function(){return p.a})),e.d(n,"utcFridays",(function(){return p.b})),e.d(n,"utcSaturday",(function(){return p.e})),e.d(n,"utcSaturdays",(function(){return p.f}));var y=e(50);e.d(n,"utcMonth",(function(){return y.a})),e.d(n,"utcMonths",(function(){return y.b}));var v=e(16);e.d(n,"utcYear",(function(){return v.a})),e.d(n,"utcYears",(function(){return v.b}))},function(t,n,e){"use strict";e.d(n,"b",(function(){return c})),e.d(n,"c",(function(){return s}));var r=e(7),i=e(26),u=e(53),o=e(10);function a(t){return function(n){var e,i,u=n.length,o=new Array(u),a=new Array(u),c=new Array(u);for(e=0;e=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:wt,s:Mt,S:$,u:Q,U:G,V:J,w:K,W:tt,x:null,X:null,y:nt,Y:et,Z:rt,"%":bt},Dt={a:function(t){return _[t.getUTCDay()]},A:function(t){return h[t.getUTCDay()]},b:function(t){return y[t.getUTCMonth()]},B:function(t){return p[t.getUTCMonth()]},c:null,d:it,e:it,f:st,H:ut,I:ot,j:at,L:ct,m:lt,M:ft,p:function(t){return c[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:wt,s:Mt,S:ht,u:dt,U:_t,V:pt,w:yt,W:vt,x:null,X:null,y:gt,Y:mt,Z:xt,"%":bt},Ut={a:function(t,n,e){var r=St.exec(n.slice(e));return r?(t.w=At[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=Tt.exec(n.slice(e));return r?(t.w=Ot[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=kt.exec(n.slice(e));return r?(t.m=Ct[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=Nt.exec(n.slice(e));return r?(t.m=jt[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return Yt(t,n,e,r)},d:C,e:C,f:Y,H:D,I:D,j:E,L:P,m:k,M:U,p:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.p=g[r[0].toLowerCase()],e+r[0].length):-1},q:j,Q:L,s:H,S:F,u:w,U:M,V:T,w:b,W:O,x:function(t,n,r){return Yt(t,e,n,r)},X:function(t,n,e){return Yt(t,a,n,e)},y:A,Y:S,Z:N,"%":I};function Ft(t,n){return function(e){var r,i,u,o=[],a=-1,c=0,s=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in h||(h.w=1),"Z"in h?(c=(a=l(f(h.y,0,1))).getUTCDay(),a=c>4||0===c?r.c.ceil(a):Object(r.c)(a),a=i.a.offset(a,7*(h.V-1)),h.y=a.getUTCFullYear(),h.m=a.getUTCMonth(),h.d=a.getUTCDate()+(h.w+6)%7):(c=(a=s(f(h.y,0,1))).getDay(),a=c>4||0===c?u.c.ceil(a):Object(u.c)(a),a=o.b.offset(a,7*(h.V-1)),h.y=a.getFullYear(),h.m=a.getMonth(),h.d=a.getDate()+(h.w+6)%7)}else("W"in h||"U"in h)&&("w"in h||(h.w="u"in h?h.u%7:"W"in h?1:0),c="Z"in h?l(f(h.y,0,1)).getUTCDay():s(f(h.y,0,1)).getDay(),h.m=0,h.d="W"in h?(h.w+6)%7+7*h.W-(c+5)%7:h.w+7*h.U-(c+6)%7);return"Z"in h?(h.H+=h.Z/100|0,h.M+=h.Z%100,l(h)):s(h)}}function Yt(t,n,e,r){for(var i,u,o=0,a=n.length,c=e.length;o=c)return-1;if(37===(i=n.charCodeAt(o++))){if(i=n.charAt(o++),!(u=Ut[i in d?n.charAt(o++):i])||(r=u(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return(Et.x=Ft(e,Et),Et.X=Ft(a,Et),Et.c=Ft(n,Et),Dt.x=Ft(e,Dt),Dt.X=Ft(a,Dt),Dt.c=Ft(n,Dt),{format:function(t){var n=Ft(t+="",Et);return n.toString=function(){return t},n},parse:function(t){var n=Pt(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=Ft(t+="",Dt);return n.toString=function(){return t},n},utcParse:function(t){var n=Pt(t+="",!0);return n.toString=function(){return t},n}})}var d={"-":"",_:" ",0:"0"},_=/^\s*\d+/,p=/^%/,y=/[\\^$*+?|[\]().{}]/g;function v(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",u=i.length;return r+(u68?1900:2e3),e+r[0].length):-1}function N(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function j(t,n,e){var r=_.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function k(t,n,e){var r=_.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function C(t,n,e){var r=_.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function E(t,n,e){var r=_.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function D(t,n,e){var r=_.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function U(t,n,e){var r=_.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function F(t,n,e){var r=_.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function P(t,n,e){var r=_.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function Y(t,n,e){var r=_.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function I(t,n,e){var r=p.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function L(t,n,e){var r=_.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function H(t,n,e){var r=_.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function q(t,n){return v(t.getDate(),n,2)}function R(t,n){return v(t.getHours(),n,2)}function B(t,n){return v(t.getHours()%12||12,n,2)}function z(t,n){return v(1+o.b.count(Object(a.a)(t),t),n,3)}function X(t,n){return v(t.getMilliseconds(),n,3)}function W(t,n){return X(t,n)+"000"}function V(t,n){return v(t.getMonth()+1,n,2)}function Z(t,n){return v(t.getMinutes(),n,2)}function $(t,n){return v(t.getSeconds(),n,2)}function Q(t){var n=t.getDay();return 0===n?7:n}function G(t,n){return v(u.g.count(Object(a.a)(t)-1,t),n,2)}function J(t,n){var e=t.getDay();return t=e>=4||0===e?Object(u.i)(t):u.i.ceil(t),v(u.i.count(Object(a.a)(t),t)+(4===Object(a.a)(t).getDay()),n,2)}function K(t){return t.getDay()}function tt(t,n){return v(u.c.count(Object(a.a)(t)-1,t),n,2)}function nt(t,n){return v(t.getFullYear()%100,n,2)}function et(t,n){return v(t.getFullYear()%1e4,n,4)}function rt(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+v(n/60|0,"0",2)+v(n%60,"0",2)}function it(t,n){return v(t.getUTCDate(),n,2)}function ut(t,n){return v(t.getUTCHours(),n,2)}function ot(t,n){return v(t.getUTCHours()%12||12,n,2)}function at(t,n){return v(1+i.a.count(Object(c.a)(t),t),n,3)}function ct(t,n){return v(t.getUTCMilliseconds(),n,3)}function st(t,n){return ct(t,n)+"000"}function lt(t,n){return v(t.getUTCMonth()+1,n,2)}function ft(t,n){return v(t.getUTCMinutes(),n,2)}function ht(t,n){return v(t.getUTCSeconds(),n,2)}function dt(t){var n=t.getUTCDay();return 0===n?7:n}function _t(t,n){return v(r.g.count(Object(c.a)(t)-1,t),n,2)}function pt(t,n){var e=t.getUTCDay();return t=e>=4||0===e?Object(r.i)(t):r.i.ceil(t),v(r.i.count(Object(c.a)(t),t)+(4===Object(c.a)(t).getUTCDay()),n,2)}function yt(t){return t.getUTCDay()}function vt(t,n){return v(r.c.count(Object(c.a)(t)-1,t),n,2)}function gt(t,n){return v(t.getUTCFullYear()%100,n,2)}function mt(t,n){return v(t.getUTCFullYear()%1e4,n,4)}function xt(){return"+0000"}function bt(){return"%"}function wt(t){return+t}function Mt(t){return Math.floor(+t/1e3)}},function(t,n,e){"use strict";var r=e(5),i=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,u=new RegExp(i.source,"g");n.a=function(t,n){var e,o,a,c=i.lastIndex=u.lastIndex=0,s=-1,l=[],f=[];for(t+="",n+="";(e=i.exec(t))&&(o=u.exec(n));)(a=o.index)>c&&(a=n.slice(c,a),l[s]?l[s]+=a:l[++s]=a),(e=e[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,f.push({i:s,x:Object(r.a)(e,o)})),c=u.lastIndex;return c=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function a(t,n){for(var e,r=0,i=t.length;r0)for(var e,r,i=new Array(e),u=0;u1e-6)if(Math.abs(f*c-s*l)>1e-6&&u){var d=e-o,_=i-a,p=c*c+s*s,y=d*d+_*_,v=Math.sqrt(p),g=Math.sqrt(h),m=u*Math.tan((r-Math.acos((p+h-y)/(2*v*g)))/2),x=m/g,b=m/v;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*l)+","+(n+x*f)),this._+="A"+u+","+u+",0,0,"+ +(f*d>l*_)+","+(this._x1=t+b*c)+","+(this._y1=n+b*s)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,o,a,c){t=+t,n=+n,c=!!c;var s=(e=+e)*Math.cos(o),l=e*Math.sin(o),f=t+s,h=n+l,d=1^c,_=c?o-a:a-o;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+f+","+h:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+f+","+h),e&&(_<0&&(_=_%i+i),_>u?this._+="A"+e+","+e+",0,1,"+d+","+(t-s)+","+(n-l)+"A"+e+","+e+",0,1,"+d+","+(this._x1=f)+","+(this._y1=h):_>1e-6&&(this._+="A"+e+","+e+",0,"+ +(_>=r)+","+d+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var c=a,s=function(t){return function(){return t}},l=Math.abs,f=Math.atan2,h=Math.cos,d=Math.max,_=Math.min,p=Math.sin,y=Math.sqrt,v=Math.PI,g=v/2,m=2*v;function x(t){return t>1?0:t<-1?v:Math.acos(t)}function b(t){return t>=1?g:t<=-1?-g:Math.asin(t)}function w(t){return t.innerRadius}function M(t){return t.outerRadius}function T(t){return t.startAngle}function O(t){return t.endAngle}function S(t){return t&&t.padAngle}function A(t,n,e,r,i,u,o,a){var c=e-t,s=r-n,l=o-i,f=a-u,h=f*c-l*s;if(!(h*h<1e-12))return[t+(h=(l*(n-u)-f*(t-i))/h)*c,n+h*s]}function N(t,n,e,r,i,u,o){var a=t-e,c=n-r,s=(o?u:-u)/y(a*a+c*c),l=s*c,f=-s*a,h=t+l,_=n+f,p=e+l,v=r+f,g=(h+p)/2,m=(_+v)/2,x=p-h,b=v-_,w=x*x+b*b,M=i-u,T=h*v-p*_,O=(b<0?-1:1)*y(d(0,M*M*w-T*T)),S=(T*b-x*O)/w,A=(-T*x-b*O)/w,N=(T*b+x*O)/w,j=(-T*x+b*O)/w,k=S-g,C=A-m,E=N-g,D=j-m;return k*k+C*C>E*E+D*D&&(S=N,A=j),{cx:S,cy:A,x01:-l,y01:-f,x11:S*(i/M-1),y11:A*(i/M-1)}}var j=function(){var t=w,n=M,e=s(0),r=null,i=T,u=O,o=S,a=null;function d(){var s,d,w=+t.apply(this,arguments),M=+n.apply(this,arguments),T=i.apply(this,arguments)-g,O=u.apply(this,arguments)-g,S=l(O-T),j=O>T;if(a||(a=s=c()),M1e-12)if(S>m-1e-12)a.moveTo(M*h(T),M*p(T)),a.arc(0,0,M,T,O,!j),w>1e-12&&(a.moveTo(w*h(O),w*p(O)),a.arc(0,0,w,O,T,j));else{var k,C,E=T,D=O,U=T,F=O,P=S,Y=S,I=o.apply(this,arguments)/2,L=I>1e-12&&(r?+r.apply(this,arguments):y(w*w+M*M)),H=_(l(M-w)/2,+e.apply(this,arguments)),q=H,R=H;if(L>1e-12){var B=b(L/w*p(I)),z=b(L/M*p(I));(P-=2*B)>1e-12?(U+=B*=j?1:-1,F-=B):(P=0,U=F=(T+O)/2),(Y-=2*z)>1e-12?(E+=z*=j?1:-1,D-=z):(Y=0,E=D=(T+O)/2)}var X=M*h(E),W=M*p(E),V=w*h(F),Z=w*p(F);if(H>1e-12){var $,Q=M*h(D),G=M*p(D),J=w*h(U),K=w*p(U);if(S1e-12?R>1e-12?(k=N(J,K,X,W,M,R,j),C=N(Q,G,V,Z,M,R,j),a.moveTo(k.cx+k.x01,k.cy+k.y01),R1e-12&&P>1e-12?q>1e-12?(k=N(V,Z,Q,G,w,-q,j),C=N(X,W,J,K,w,-q,j),a.lineTo(k.cx+k.x01,k.cy+k.y01),q=f;--h)a.point(v[h],g[h]);a.lineEnd(),a.areaEnd()}y&&(v[l]=+t(d,l,s),g[l]=+e(d,l,s),a.point(n?+n(d,l,s):v[l],r?+r(d,l,s):g[l]))}if(_)return a=null,_+""||null}function f(){return U().defined(i).curve(o).context(u)}return l.x=function(e){return arguments.length?(t="function"==typeof e?e:s(+e),n=null,l):t},l.x0=function(n){return arguments.length?(t="function"==typeof n?n:s(+n),l):t},l.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:s(+t),l):n},l.y=function(t){return arguments.length?(e="function"==typeof t?t:s(+t),r=null,l):e},l.y0=function(t){return arguments.length?(e="function"==typeof t?t:s(+t),l):e},l.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:s(+t),l):r},l.lineX0=l.lineY0=function(){return f().x(t).y(e)},l.lineY1=function(){return f().x(t).y(r)},l.lineX1=function(){return f().x(n).y(e)},l.defined=function(t){return arguments.length?(i="function"==typeof t?t:s(!!t),l):i},l.curve=function(t){return arguments.length?(o=t,null!=u&&(a=o(u)),l):o},l.context=function(t){return arguments.length?(null==t?u=a=null:a=o(u=t),l):u},l},P=function(t,n){return nt?1:n>=t?0:NaN},Y=function(t){return t},I=function(){var t=Y,n=P,e=null,r=s(0),i=s(m),u=s(0);function o(o){var a,c,s,l,f,h=o.length,d=0,_=new Array(h),p=new Array(h),y=+r.apply(this,arguments),v=Math.min(m,Math.max(-m,i.apply(this,arguments)-y)),g=Math.min(Math.abs(v)/h,u.apply(this,arguments)),x=g*(v<0?-1:1);for(a=0;a0&&(d+=f);for(null!=n?_.sort((function(t,e){return n(p[t],p[e])})):null!=e&&_.sort((function(t,n){return e(o[t],o[n])})),a=0,s=d?(v-h*x)/d:0;a0?f*s:0)+x,p[c]={data:o[c],index:a,value:f,startAngle:y,endAngle:l,padAngle:g};return p}return o.value=function(n){return arguments.length?(t="function"==typeof n?n:s(+n),o):t},o.sortValues=function(t){return arguments.length?(n=t,e=null,o):n},o.sort=function(t){return arguments.length?(e=t,n=null,o):e},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:s(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:s(+t),o):i},o.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:s(+t),o):u},o},L=q(C);function H(t){this._curve=t}function q(t){function n(n){return new H(t(n))}return n._curve=t,n}function R(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(q(t)):n()._curve},t}H.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var B=function(){return R(U().curve(L))},z=function(){var t=F().curve(L),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,u=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return R(e())},delete t.lineX0,t.lineEndAngle=function(){return R(r())},delete t.lineX1,t.lineInnerRadius=function(){return R(i())},delete t.lineY0,t.lineOuterRadius=function(){return R(u())},delete t.lineY1,t.curve=function(t){return arguments.length?n(q(t)):n()._curve},t},X=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},W=Array.prototype.slice;function V(t){return t.source}function Z(t){return t.target}function $(t){var n=V,e=Z,r=E,i=D,u=null;function o(){var o,a=W.call(arguments),s=n.apply(this,a),l=e.apply(this,a);if(u||(u=o=c()),t(u,+r.apply(this,(a[0]=s,a)),+i.apply(this,a),+r.apply(this,(a[0]=l,a)),+i.apply(this,a)),o)return u=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(r="function"==typeof t?t:s(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:s(+t),o):i},o.context=function(t){return arguments.length?(u=null==t?null:t,o):u},o}function Q(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function G(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function J(t,n,e,r,i){var u=X(n,e),o=X(n,e=(e+i)/2),a=X(r,e),c=X(r,i);t.moveTo(u[0],u[1]),t.bezierCurveTo(o[0],o[1],a[0],a[1],c[0],c[1])}function K(){return $(Q)}function tt(){return $(G)}function nt(){var t=$(J);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var et={draw:function(t,n){var e=Math.sqrt(n/v);t.moveTo(e,0),t.arc(0,0,e,0,m)}},rt={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},it=Math.sqrt(1/3),ut=2*it,ot={draw:function(t,n){var e=Math.sqrt(n/ut),r=e*it;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},at=Math.sin(v/10)/Math.sin(7*v/10),ct=Math.sin(m/10)*at,st=-Math.cos(m/10)*at,lt={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=ct*e,i=st*e;t.moveTo(0,-e),t.lineTo(r,i);for(var u=1;u<5;++u){var o=m*u/5,a=Math.cos(o),c=Math.sin(o);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},ft={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},ht=Math.sqrt(3),dt={draw:function(t,n){var e=-Math.sqrt(n/(3*ht));t.moveTo(0,2*e),t.lineTo(-ht*e,-e),t.lineTo(ht*e,-e),t.closePath()}},_t=Math.sqrt(3)/2,pt=1/Math.sqrt(12),yt=3*(pt/2+1),vt={draw:function(t,n){var e=Math.sqrt(n/yt),r=e/2,i=e*pt,u=r,o=e*pt+e,a=-u,c=o;t.moveTo(r,i),t.lineTo(u,o),t.lineTo(a,c),t.lineTo(-.5*r-_t*i,_t*r+-.5*i),t.lineTo(-.5*u-_t*o,_t*u+-.5*o),t.lineTo(-.5*a-_t*c,_t*a+-.5*c),t.lineTo(-.5*r+_t*i,-.5*i-_t*r),t.lineTo(-.5*u+_t*o,-.5*o-_t*u),t.lineTo(-.5*a+_t*c,-.5*c-_t*a),t.closePath()}},gt=[et,rt,ot,ft,lt,dt,vt],mt=function(){var t=s(et),n=s(64),e=null;function r(){var r;if(e||(e=r=c()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),r)return e=null,r+""||null}return r.type=function(n){return arguments.length?(t="function"==typeof n?n:s(n),r):t},r.size=function(t){return arguments.length?(n="function"==typeof t?t:s(+t),r):n},r.context=function(t){return arguments.length?(e=null==t?null:t,r):e},r},xt=function(){};function bt(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function wt(t){this._context=t}wt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:bt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:bt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Mt=function(t){return new wt(t)};function Tt(t){this._context=t}Tt.prototype={areaStart:xt,areaEnd:xt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:bt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Ot=function(t){return new Tt(t)};function St(t){this._context=t}St.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:bt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var At=function(t){return new St(t)};function Nt(t,n){this._basis=new wt(t),this._beta=n}Nt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],u=n[0],o=t[e]-i,a=n[e]-u,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*n[c]+(1-this._beta)*(u+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var jt=function t(n){function e(t){return 1===n?new wt(t):new Nt(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function kt(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Ct(t,n){this._context=t,this._k=(1-n)/6}Ct.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:kt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:kt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Et=function t(n){function e(t){return new Ct(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Dt(t,n){this._context=t,this._k=(1-n)/6}Dt.prototype={areaStart:xt,areaEnd:xt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:kt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Ut=function t(n){function e(t){return new Dt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Ft(t,n){this._context=t,this._k=(1-n)/6}Ft.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:kt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Pt=function t(n){function e(t){return new Ft(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Yt(t,n,e){var r=t._x1,i=t._y1,u=t._x2,o=t._y2;if(t._l01_a>1e-12){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);u=(u*s+t._x1*t._l23_2a-n*t._l12_2a)/l,o=(o*s+t._y1*t._l23_2a-e*t._l12_2a)/l}t._context.bezierCurveTo(r,i,u,o,t._x2,t._y2)}function It(t,n){this._context=t,this._alpha=n}It.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Yt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Lt=function t(n){function e(t){return n?new It(t,n):new Ct(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Ht(t,n){this._context=t,this._alpha=n}Ht.prototype={areaStart:xt,areaEnd:xt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Yt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var qt=function t(n){function e(t){return n?new Ht(t,n):new Dt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Rt(t,n){this._context=t,this._alpha=n}Rt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Yt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Bt=function t(n){function e(t){return n?new Rt(t,n):new Ft(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function zt(t){this._context=t}zt.prototype={areaStart:xt,areaEnd:xt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var Xt=function(t){return new zt(t)};function Wt(t){return t<0?-1:1}function Vt(t,n,e){var r=t._x1-t._x0,i=n-t._x1,u=(t._y1-t._y0)/(r||i<0&&-0),o=(e-t._y1)/(i||r<0&&-0),a=(u*i+o*r)/(r+i);return(Wt(u)+Wt(o))*Math.min(Math.abs(u),Math.abs(o),.5*Math.abs(a))||0}function Zt(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function $t(t,n,e){var r=t._x0,i=t._y0,u=t._x1,o=t._y1,a=(u-r)/3;t._context.bezierCurveTo(r+a,i+a*n,u-a,o-a*e,u,o)}function Qt(t){this._context=t}function Gt(t){this._context=new Jt(t)}function Jt(t){this._context=t}function Kt(t){return new Qt(t)}function tn(t){return new Gt(t)}function nn(t){this._context=t}function en(t){var n,e,r=t.length-1,i=new Array(r),u=new Array(r),o=new Array(r);for(i[0]=0,u[0]=2,o[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(o[n]-i[n+1])/u[n];for(u[r-1]=(t[r]+i[r-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var on=function(t){return new un(t,.5)};function an(t){return new un(t,0)}function cn(t){return new un(t,1)}var sn=function(t,n){if((i=t.length)>1)for(var e,r,i,u=1,o=t[n[0]],a=o.length;u=0;)e[n]=n;return e};function fn(t,n){return t[n]}var hn=function(){var t=s([]),n=ln,e=sn,r=fn;function i(i){var u,o,a=t.apply(this,arguments),c=i.length,s=a.length,l=new Array(s);for(u=0;u0){for(var e,r,i,u=0,o=t[0].length;u0)for(var e,r,i,u,o,a,c=0,s=t[n[0]].length;c0?(r[0]=u,r[1]=u+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)},pn=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],u=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,u=0,o=1;ou&&(u=n,r=e);return r}var mn=function(t){var n=t.map(xn);return ln(t).sort((function(t,e){return n[t]-n[e]}))};function xn(t){for(var n,e=0,r=-1,i=t.length;++r=0&&n._call.call(null,t),n=n._next;--a}()}finally{a=0,function(){var t,n,e=r,u=1/0;for(;e;)e._call?(u>e._time&&(u=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:r=n);i=t,b(u)}(),f=0}}function x(){var t=d.now(),n=t-l;n>1e3&&(h-=n,l=t)}function b(t){a||(c&&(c=clearTimeout(c)),t-f>24?(t<1/0&&(c=setTimeout(m,t-d.now()-h)),s&&(s=clearInterval(s))):(s||(l=d.now(),s=setInterval(x,1e3)),a=1,_(m)))}v.prototype=g.prototype={constructor:v,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?p():+e)+(null==n?0:+n),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=e,b()},stop:function(){this._call&&(this._call=null,this._time=1/0,b())}};var w=function(t,n,e){var r=new v;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},M=Object(o.a)("start","end","cancel","interrupt"),T=[],O=function(t,n,e,r,i,u){var o=t.__transition;if(o){if(e in o)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function u(c){var s,l,f,h;if(1!==e.state)return a();for(s in i)if((h=i[s]).name===e.name){if(3===h.state)return w(u);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[s]):+s0)throw new Error("too late; already scheduled");return e}function A(t,n){var e=N(t,n);if(e.state>3)throw new Error("too late; already running");return e}function N(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var j=function(t,n){var e,r,i,u=t.__transition,o=!0;if(u){for(i in n=null==n?null:n+"",u)(e=u[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete u[i]):o=!1;o&&delete t.__transition}},k=e(74),C=e(20);function E(t,n){var e,r;return function(){var i=A(this,t),u=i.tween;if(u!==e)for(var o=0,a=(r=e=u).length;o=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?S:A;return function(){var o=u(this,t),a=o.on;a!==r&&(i=(r=a).copy()).on(n,e),o.on=i}}var rt=e(19),it=e(33),ut=u.b.prototype.constructor,ot=e(35);function at(t){return function(){this.style.removeProperty(t)}}function ct(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function st(t,n,e){var r,i;function u(){var u=n.apply(this,arguments);return u!==i&&(r=(i=u)&&ct(t,u,e)),r}return u._value=n,u}function lt(t){return function(n){this.textContent=t.call(this,n)}}function ft(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&<(r)),n}return r._value=t,r}var ht=0;function dt(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function _t(t){return Object(u.b)().transition(t)}function pt(){return++ht}var yt=u.b.prototype;dt.prototype=_t.prototype={constructor:dt,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Object(rt.a)(t));for(var r=this._groups,i=r.length,u=new Array(i),o=0;o1&&e.name===n)return new dt([[t]],mt,n,+r);return null};e.d(n,"transition",(function(){return _t})),e.d(n,"active",(function(){return xt})),e.d(n,"interrupt",(function(){return j}))},,function(t,n,e){"use strict";var r,i,u,o,a=e(5),c=180/Math.PI,s={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},l=function(t,n,e,r,i,u){var o,a,s;return(o=Math.sqrt(t*t+n*n))&&(t/=o,n/=o),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,s/=a),t*r180?n+=360:n-t>180&&(t+=360),u.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Object(a.a)(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(u.rotate,o.rotate,c,s),function(t,n,e,u){t!==n?u.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Object(a.a)(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(u.skewX,o.skewX,c,s),function(t,n,e,r,u,o){if(t!==e||n!==r){var c=u.push(i(u)+"scale(",null,",",null,")");o.push({i:c-4,x:Object(a.a)(t,e)},{i:c-2,x:Object(a.a)(n,r)})}else 1===e&&1===r||u.push(i(u)+"scale("+e+","+r+")")}(u.scaleX,u.scaleY,o.scaleX,o.scaleY,c,s),u=o=null,function(t){for(var n,e=-1,r=s.length;++e1&&void 0!==arguments[1]?arguments[1]:12,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Arial",r=document.createElement("canvas"),i=r.getContext("2d");return i.font=n+"px "+e,i.measureText(t).width};return{getTextWidth:s,wrapText:function(t,e,s,l){var f=n.select(l),h=f.text().split(/\s+/).reverse(),d=void 0,_=[],p=0,y=r*u,v=f.attr("y"),g=parseFloat(f.attr("dy")),m=e*o,x=f.text(null).append("tspan").attr("x",t).attr("y",v-5).attr("dy",g+"em").classed(a,!0).style("font-size",e+"px");for(x.text(h.pop()),x=f.append("tspan").classed(c,!0).attr("x",t).attr("y",v+i).attr("dy",++p*y+g+"em").style("font-size",m+"px");d=h.pop();)_.push(d),x.text(_.join(" ")),x.node()&&x.node().getComputedTextLength()>s-50&&(_.pop(),x.text(_.join(" ")),_=[d],x=f.append("tspan").classed(c,!0).attr("x",t).attr("y",v+i).attr("dy",++p*y+g+"em").text(d).style("font-size",m+"px"))},wrapTextWithEllipses:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;t.each((function(){var u,o,a,c,s,l,f;for(u=(t=n.select(this)).text().split(/\s+/).reverse(),a=[],c=0,1.2,s=t.attr("y"),l=parseFloat(t.attr("dy")),f=t.text(null).append("tspan").attr("x",r).attr("y",s).attr("dy",l+"em");o=u.pop();)if(a.push(o),f.text(a.join(" ")),f.node()&&f.node().getComputedTextLength()>e){if(a.pop(),f.text(a.join(" ")),!(ce&&(i.pop(),i=[h],++u)}}catch(t){a=!0,c=t}finally{try{!o&&f.return&&f.return()}finally{if(a)throw c}}return u}}}.call(n,e,n,t))||(t.exports=r)},,,,,,,,,,,,,,,,,,,,,function(t,n,e){"use strict";var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,n){var e=[],r=!0,i=!1,u=void 0;try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done)&&(e.push(o.value),!n||e.length!==n);r=!0);}catch(t){i=!0,u=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw u}}return e}(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")};void 0===(r=function(t){var n=e(64),r=e(45),o=e(6),a=(e(72),e(65)),c=e(70).axisTimeCombinations,s=e(85),l=s.formatIntegerValue,f=s.formatDecimalValue,h=s.isInteger,d=e(87),_=d.getTextWidth,p=d.getApproximateNumberOfLines;return function(){var t=2,e=2,s=2,d=2,y="Tooltip title",v=!0,g=void 0,m={y:-55,x:0},x=void 0,b=void 0,w=void 0,M=void 0,T=48,O=0,S=37,A=void 0,N=0,j=void 0,k=n.easeQuadInOut,C=void 0,E="date",D="value",U="name",F="topics",P=c.DAY_MONTH,Y="date",I=null,L=null,H=[],q=null,R=null,B=a.timeFormat("%b %d, %Y"),z=a.timeFormat("%b %d, %I %p"),X=void 0,W=void 0;function V(n){n.each((function(n){250-d-e,45-t-s,n,function(n){W||((W=o.select(n).append("g").classed("britechart britechart-tooltip",!0).style("visibility","hidden")).append("g").classed("tooltip-container-group select-disable",!0).attr("transform","translate( "+d+", "+t+")").append("g").classed("tooltip-group",!0),x=W.selectAll(".tooltip-group").append("g").classed("tooltip-text",!0),g=x.append("rect").classed("tooltip-text-container",!0).attr("x",-54.5).attr("y",0).attr("width",250).attr("height",T).attr("rx",3).attr("ry",3).style("fill","#FFFFFF").style("stroke","#D2D6DF").style("stroke-width",1),M=x.append("text").classed("tooltip-title",!0).attr("x",J()).attr("dy",".35em").attr("y",16).style("fill","#6D717A"),e=G(Date.now()),(r=p(e,16,230))>1&&(N=17*(r-1)),b=x.append("line").classed("tooltip-divider",!0).attr("x1",-46.5).attr("x2",265).attr("y1",31+N).attr("y2",31+N).style("stroke","#D2D6DF"),w=x.append("g").classed("tooltip-body",!0).style("transform","translateY(8px)").style("fill","#282C35"));var e,r;W.transition().attr("width",250).attr("height",45),V.hide()}(this)}))}function Z(t){var n=t[D];return t.missingValue?"-":function(t){if(null!==R)return R(t);var n=f;return t?(null!==q?n=r.format(q):h(t)&&(n=l),n(t)):0}(n).toString()}function $(t){var n,e,r=t[U],i=void 0,u=void 0;n=t.topicName||r,e=Z(t),u=w.append("text").classed("tooltip-left-text",!0).attr("dy","1em").attr("x",O).attr("y",S).style("fill","#000000").text(n).call(K,170,-25),i=w.append("text").classed("tooltip-right-text",!0).attr("dy","1em").attr("x",O).attr("y",S).style("fill","#000000").text(e),A=u.node().getBBox().height?u.node().getBBox().height:A,T+=A+5,j=i.node().getBBox().width?i.node().getBBox().width:j,i.attr("x",250-j-10-62.5),w.append("circle").classed("tooltip-circle",!0).attr("cx",-39.5).attr("cy",S+8).attr("r",5).style("fill",C[r]).style("stroke-width",1),S+=A+7}function Q(t,n,e){var r,i,o=(r=u([n,e],2),i=r[0],r[1],[i-250<0?65:-205,m.y]),a=u(o,2),c=a[0],s=a[1];g.attr("width",250).attr("height",T+10),x.transition().duration(100).ease(k).attr("transform","translate("+c+", "+s+")"),b.attr("x2",190)}function G(t){var n=y,e=function(t){if("number"===Y)return Number(t);return function(t){var n=I||P,e=null,r={month:"short",day:"numeric"};n===c.DAY_MONTH||n===c.MONTH_YEAR?(e=B,r.year="numeric"):n===c.HOUR_DAY||n===c.MINUTE_HOUR?(e=z,r.hour="numeric"):n===c.CUSTOM&&"string"==typeof L&&(e=a.timeFormat(L));if(X&&"undefined"!=typeof Intl&&"object"===("undefined"==typeof Intl?"undefined":i(Intl))&&Intl.DateTimeFormat){return Intl.DateTimeFormat(X,r).format(t)}return e(t)}(new Date(t))}(t);return n.length?v&&(n=n+" - "+e):n=e,n}function J(){return-46.5}function K(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t.each((function(){var r,i,u,a,c,s,l;for(r=(t=o.select(this)).text().split(/\s+/).reverse(),u=[],a=0,1.2,c=t.attr("y"),s=parseFloat(t.attr("dy")),l=t.text(null).append("tspan").attr("x",e).attr("y",c).attr("dy",s+"em");i=r.pop();){u.push(i),l.text(u.join(" ")),_(u.join(" "),16,"Karla, sans-serif")>n&&(u.pop(),l.text(u.join(" ")),a<2&&(u=[i],l=t.append("tspan").attr("x",e).attr("y",c).attr("dy",1.2*++a+s+"em").text(i)))}}))}function tt(t){var n=t[F];H.length?n=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H;return n.map((function(n){return t.filter((function(t){return t.name===n}))[0]}))}(n):n.length&&n[0].name&&(n=function(t){return t.map((function(t){return t})).sort((function(t,n){return t.name>n.name?1:t.name===n.name?0:-1}))}(n)),w.selectAll("text").remove(),w.selectAll("circle").remove(),function(t){var n=G(t[E]);M.text(n).call(K,230,J())}(t),T=48+N,S=37+N,O=0,n.forEach($)}function nt(t,n,e){tt(t),Q(0,n,e)}return V.axisTimeCombinations=c,V.dateFormat=function(t){return arguments.length?(I=t,this):I||P},V.dateCustomFormat=function(t){return arguments.length?(L=t,this):L},V.dateLabel=function(t){return arguments.length?(E=t,this):E},V.hide=function(){return W.style("visibility","hidden"),this},V.locale=function(t){return arguments.length?(X=t,this):X},V.nameLabel=function(t){return arguments.length?(U=t,this):U},V.numberFormat=function(t){return arguments.length?(q=t,this):q},V.valueFormatter=function(t){return arguments.length?(R=t,this):R},V.shouldShowDateInTitle=function(t){return arguments.length?(v=t,this):v},V.show=function(){return W.style("visibility","visible"),this},V.title=function(t){return arguments.length?(y=t,this):y},V.tooltipOffset=function(t){return arguments.length?(m=t,this):m},V.topicsOrder=function(t){return arguments.length?(H=t,this):H},V.topicLabel=function(t){return arguments.length?(F=t,this):F},V.update=function(t,n,e){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return C=n,nt(t,e,r),this},V.valueLabel=function(t){return arguments.length?(D=t,this):D},V.xAxisValueType=function(t){return arguments.length?(Y=t,this):Y},V}}.call(n,e,n,t))||(t.exports=r)}])})); //# sourceMappingURL=tooltip.min.js.map