diff --git a/dist/index.d.ts b/dist/index.d.ts index 3274eac..39e96a1 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -43,7 +43,7 @@ export declare class LinePod extends ChartwerkPod { onMouseOut(): void; protected zoomOut(): void; } -export declare const VueChartwerkLineChartObject: { +export declare const VueChartwerkLinePod: { render(createElement: any): any; mixins: { props: { diff --git a/dist/index.js b/dist/index.js index d8e29c6..ed8358e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e=n();for(var r in e)("object"==typeof exports?exports:t)[r]=e[r]}}(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=4)}([function(t,n,e){window,t.exports=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=214)}([function(t,n){var e=Array.isArray;t.exports=e},function(t,n,e){var r=e(93),i=e(54);t.exports=function(t,n){return null!=t&&i(t,n,r)}},function(t,n){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},function(t,n,e){var r=e(56),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,n){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,n,e){var r=e(29),i=e(78),o=e(14);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,n,e){var r=e(7),i=e(4);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,n,e){var r=e(12),i=e(95),o=e(96),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?i(t):o(t)}},function(t,n,e){var r=e(103),i=e(106);t.exports=function(t,n){var e=i(t,n);return r(e)?e:void 0}},function(t,n,e){var r=e(34),i=e(38);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,n,e){var r=e(122);t.exports=function(t){return r(t,5)}},function(t,n,e){var r=e(29),i=e(73),o=e(14);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,n,e){var r=e(3).Symbol;t.exports=r},function(t,n,e){var r=e(62),i=e(133),o=e(9);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,n){t.exports=function(t){return t}},function(t,n){t.exports=function(t,n){return t===n||t!=t&&n!=n}},function(t,n,e){var r=e(60),i=e(39);t.exports=function(t,n,e,o){var u=!e;e||(e={});for(var a=-1,c=n.length;++a-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}},function(t,n,e){var r=e(61);t.exports=function(t,n,e){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n,e){var r=e(132),i=e(27),o=e(42),u=o&&o.isTypedArray,a=u?i(u):r;t.exports=a},function(t,n,e){(function(t){var r=e(56),i=n&&!n.nodeType&&n,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,u=o&&o.exports===i&&r.process,a=function(){try{return o&&o.require&&o.require("util").types||u&&u.binding&&u.binding("util")}catch(t){}}();t.exports=a}).call(this,e(40)(t))},function(t,n){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},function(t,n,e){var r=e(139),i=e(66),o=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols,a=u?function(t){return null==t?[]:(t=Object(t),r(u(t),(function(n){return o.call(t,n)})))}:i;t.exports=a},function(t,n){t.exports=function(t,n){for(var e=-1,r=n.length,i=t.length;++e1&&u(t,n[0],n[1])?n=[]:e>2&&u(n[0],n[1],n[2])&&(n=[n[0]]),i(t,r(n,1),[])}));t.exports=a},function(t,n){var e=Array.prototype.reverse;t.exports=function(t){return null==t?t:e.call(t)}},function(t,n,e){var r=e(55),i=e(23),o=e(0),u=e(37),a=e(38),c=e(24);t.exports=function(t,n,e){for(var f=-1,s=(n=r(n,t)).length,l=!1;++fs))return!1;var h=c.get(t),d=c.get(n);if(h&&d)return h==n&&d==t;var p=-1,v=!0,y=2&e?new r:void 0;for(c.set(t,n),c.set(n,t);++pn}},function(t,n,e){var r=e(182)();t.exports=r},function(t,n){t.exports=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}},function(t,n,e){var r=e(15),i=e(9),o=e(37),u=e(2);t.exports=function(t,n,e){if(!u(e))return!1;var a=typeof n;return!!("number"==a?i(e)&&o(n,e.length):"string"==a&&n in e)&&r(e[n],t)}},function(t,n,e){var r=e(25),i=e(83),o=e(79),u=e(193),a=e(2),c=e(17),f=e(84);t.exports=function t(n,e,s,l,h){n!==e&&o(e,(function(o,c){if(h||(h=new r),a(o))u(n,e,c,s,t,l,h);else{var d=l?l(f(n,c),o,c+"",n,e,h):void 0;void 0===d&&(d=o),i(n,c,d)}}),c)}},function(t,n,e){var r=e(39),i=e(15);t.exports=function(t,n,e){(void 0!==e&&!i(t[n],e)||void 0===e&&!(n in t))&&r(t,n,e)}},function(t,n){t.exports=function(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}},function(t,n,e){var r=e(2),i=e(6),o=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=r(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var e=a.test(t);return e||c.test(t)?f(t.slice(2),e?2:8):u.test(t)?NaN:+t}},function(t,n,e){var r=e(198),i=e(199);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[t.i,i,""]]);var o,u=0,a={injectType:"lazyStyleTag",insert:"head",singleton:!1},c={};c.locals=i.locals||{},c.use=function(){return u++||(o=r(i,a)),c},c.unuse=function(){u>0&&!--u&&(o(),o=null)},t.exports=c},function(t,n,e){var r=e(201),i=e(9),o=e(205),u=e(206),a=e(208),c=Math.max;t.exports=function(t,n,e,f){t=i(t)?t:a(t),e=e&&!f?u(e):0;var s=t.length;return e<0&&(e=c(s+e,0)),o(t)?e<=s&&t.indexOf(n,e)>-1:!!s&&r(t,n,e)>-1}},function(t,n,e){t.exports=e(210)},function(t,n){t.exports=function(t){var n=null==t?0:t.length;return n?t[n-1]:void 0}},function(t,n,e){var r=e(211)((function(t,n){return t+n}),0);t.exports=r},function(t,n,e){var r=e(58);t.exports=function(){var t=arguments,n=r(t[0]);return t.length<3?n:n.replace(t[1],t[2])}},function(t,n,e){var r=e(2),i=e(213),o=e(85),u=Math.max,a=Math.min;t.exports=function(t,n,e){var c,f,s,l,h,d,p=0,v=!1,y=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function _(n){var e=c,r=f;return c=f=void 0,p=n,l=t.apply(r,e)}function b(t){return p=t,h=setTimeout(x,n),v?_(t):l}function m(t){var e=t-d;return void 0===d||e>=n||e<0||y&&t-p>=s}function x(){var t=i();if(m(t))return w(t);h=setTimeout(x,function(t){var e=n-(t-d);return y?a(e,s-(t-p)):e}(t))}function w(t){return h=void 0,g&&c?_(t):(c=f=void 0,l)}function M(){var t=i(),e=m(t);if(c=arguments,f=this,d=t,e){if(void 0===h)return b(d);if(y)return clearTimeout(h),h=setTimeout(x,n),_(d)}return void 0===h&&(h=setTimeout(x,n)),l}return n=o(n)||0,r(e)&&(v=!!e.leading,s=(y="maxWait"in e)?u(o(e.maxWait)||0,n):s,g="trailing"in e?!!e.trailing:g),M.cancel=function(){void 0!==h&&clearTimeout(h),p=0,c=d=f=h=void 0},M.flush=function(){return void 0===h?l:w(i())},M}},function(t,n){var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){var r=e(12),i=Object.prototype,o=i.hasOwnProperty,u=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var n=o.call(t,a),e=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=u.call(t);return r&&(n?t[a]=e:delete t[a]),i}},function(t,n){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},function(t,n,e){var r=e(98),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,u=r((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(i,(function(t,e,r,i){n.push(r?i.replace(o,"$1"):e||t)})),n}));t.exports=u},function(t,n,e){var r=e(99);t.exports=function(t){var n=r(t,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}},function(t,n,e){var r=e(33);function i(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var u=t.apply(this,r);return e.cache=o.set(i,u)||o,u};return e.cache=new(i.Cache||r),e}i.Cache=r,t.exports=i},function(t,n,e){var r=e(101),i=e(20),o=e(35);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,n,e){var r=e(102),i=e(107),o=e(108),u=e(109),a=e(110);function c(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1}},function(t,n,e){var r=e(21);t.exports=function(t,n){var e=this.__data__,i=r(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this}},function(t,n,e){var r=e(22);t.exports=function(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n}},function(t,n){t.exports=function(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}},function(t,n,e){var r=e(22);t.exports=function(t){return r(this,t).get(t)}},function(t,n,e){var r=e(22);t.exports=function(t){return r(this,t).has(t)}},function(t,n,e){var r=e(22);t.exports=function(t,n){var e=r(this,t),i=e.size;return e.set(t,n),this.size+=e.size==i?0:1,this}},function(t,n,e){var r=e(7),i=e(4);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,n,e){var r=e(25),i=e(128),o=e(60),u=e(129),a=e(135),c=e(64),f=e(65),s=e(138),l=e(140),h=e(68),d=e(141),p=e(28),v=e(146),y=e(147),g=e(72),_=e(0),b=e(26),m=e(152),x=e(2),w=e(154),M=e(13),A=e(17),S={};S["[object Arguments]"]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S["[object Object]"]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S["[object Function]"]=S["[object WeakMap]"]=!1,t.exports=function t(n,e,k,C,E,T){var O,N=1&e,j=2&e,R=4&e;if(k&&(O=E?k(n,C,E,T):k(n)),void 0!==O)return O;if(!x(n))return n;var z=_(n);if(z){if(O=v(n),!N)return f(n,O)}else{var P=p(n),L="[object Function]"==P||"[object GeneratorFunction]"==P;if(b(n))return c(n,N);if("[object Object]"==P||"[object Arguments]"==P||L&&!E){if(O=j||L?{}:g(n),!N)return j?l(n,a(O,n)):s(n,u(O,n))}else{if(!S[P])return E?n:{};O=y(n,P,N)}}T||(T=new r);var I=T.get(n);if(I)return I;T.set(n,O),w(n)?n.forEach((function(r){O.add(t(r,e,k,r,n,T))})):m(n)&&n.forEach((function(r,i){O.set(i,t(r,e,k,i,n,T))}));var F=z?void 0:(R?j?d:h:j?A:M)(n);return i(F||n,(function(r,i){F&&(r=n[i=r]),o(O,i,t(r,e,k,i,n,T))})),O}},function(t,n,e){var r=e(20);t.exports=function(){this.__data__=new r,this.size=0}},function(t,n){t.exports=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e}},function(t,n){t.exports=function(t){return this.__data__.get(t)}},function(t,n){t.exports=function(t){return this.__data__.has(t)}},function(t,n,e){var r=e(20),i=e(35),o=e(33);t.exports=function(t,n){var e=this.__data__;if(e instanceof r){var u=e.__data__;if(!i||u.length<199)return u.push([t,n]),this.size=++e.size,this;e=this.__data__=new o(u)}return e.set(t,n),this.size=e.size,this}},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length;++e0&&o(s)?e>1?t(s,e-1,o,u,a):r(a,s):u||(a[a.length]=s)}return a}},function(t,n,e){var r=e(12),i=e(23),o=e(0),u=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(u&&t&&t[u])}},function(t,n,e){var r=e(36),i=e(49),o=e(48),u=e(179),a=e(184),c=e(27),f=e(185),s=e(14),l=e(0);t.exports=function(t,n,e){n=n.length?r(n,(function(t){return l(t)?function(n){return i(n,1===t.length?t[0]:t)}:t})):[s];var h=-1;n=r(n,c(o));var d=u(t,(function(t,e,i){return{criteria:r(n,(function(n){return n(t)})),index:++h,value:t}}));return a(d,(function(t,n){return f(t,n,e)}))}},function(t,n,e){var r=e(180),i=e(9);t.exports=function(t,n){var e=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++e]=n(t,r,i)})),o}},function(t,n,e){var r=e(181),i=e(183)(r);t.exports=i},function(t,n,e){var r=e(79),i=e(13);t.exports=function(t,n){return t&&r(t,n,i)}},function(t,n){t.exports=function(t){return function(n,e,r){for(var i=-1,o=Object(n),u=r(n),a=u.length;a--;){var c=u[t?a:++i];if(!1===e(o[c],c,o))break}return n}}},function(t,n,e){var r=e(9);t.exports=function(t,n){return function(e,i){if(null==e)return e;if(!r(e))return t(e,i);for(var o=e.length,u=n?o:-1,a=Object(e);(n?u--:++u=c?f:f*("desc"==e[i]?-1:1)}return t.index-n.index}},function(t,n,e){var r=e(6);t.exports=function(t,n){if(t!==n){var e=void 0!==t,i=null===t,o=t==t,u=r(t),a=void 0!==n,c=null===n,f=n==n,s=r(n);if(!c&&!s&&!u&&t>n||u&&a&&f&&!c&&!s||i&&a&&f||!e&&f||!o)return 1;if(!i&&!u&&!s&&t0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},function(t,n,e){var r=e(82),i=e(2);t.exports=function t(n,e,o,u,a,c){return i(n)&&i(e)&&(c.set(e,n),r(n,e,void 0,t,c),c.delete(e)),n}},function(t,n,e){var r=e(83),i=e(64),o=e(71),u=e(65),a=e(72),c=e(23),f=e(0),s=e(194),l=e(26),h=e(34),d=e(2),p=e(195),v=e(41),y=e(84),g=e(196);t.exports=function(t,n,e,_,b,m,x){var w=y(t,e),M=y(n,e),A=x.get(M);if(A)r(t,e,A);else{var S=m?m(w,M,e+"",t,n,x):void 0,k=void 0===S;if(k){var C=f(M),E=!C&&l(M),T=!C&&!E&&v(M);S=M,C||E||T?f(w)?S=w:s(w)?S=u(w):E?(k=!1,S=i(M,!0)):T?(k=!1,S=o(M,!0)):S=[]:p(M)||c(M)?(S=w,c(w)?S=g(w):d(w)&&!h(w)||(S=a(M))):k=!1}k&&(x.set(M,S),b(S,M,_,m,x),x.delete(M)),r(t,e,S)}}},function(t,n,e){var r=e(9),i=e(4);t.exports=function(t){return i(t)&&r(t)}},function(t,n,e){var r=e(7),i=e(46),o=e(4),u=Function.prototype,a=Object.prototype,c=u.toString,f=a.hasOwnProperty,s=c.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var n=i(t);if(null===n)return!0;var e=f.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&c.call(e)==s}},function(t,n,e){var r=e(16),i=e(17);t.exports=function(t){return r(t,i(t))}},function(t,n,e){var r=e(50),i=e(81);t.exports=function(t){return r((function(n,e){var r=-1,o=e.length,u=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(u=t.length>3&&"function"==typeof u?(o--,u):void 0,a&&i(e[0],e[1],a)&&(u=o<3?void 0:u,o=1),n=Object(n);++r0)for(var n=this.chartContainer.append("g").attr("class","legend-row"),e=function(e){if(U()(r.seriesTargetsWithBounds,r.series[e].target))return"continue";var i=0;null!==n.selectAll("text").node()&&(i=n.node().getBBox().width+25);var o=!1!==r.series[e].visible;n.append("foreignObject").attr("x",i).attr("y",r.legendRowPositionY-12).attr("width",13).attr("height",15).html("
").on("click",(function(){void 0!==t.options.eventsCallbacks&&void 0!==t.options.eventsCallbacks.onLegendClick&&t.options.eventsCallbacks.onLegendClick(e)})),n.append("text").attr("x",i+20).attr("y",r.legendRowPositionY).attr("class","metric-legend-"+e).style("font-size","12px").style("fill",r.getSerieColor(e)).text(r.series[e].target).on("click",(function(){void 0!==t.options.eventsCallbacks&&void 0!==t.options.eventsCallbacks.onLegendLabelClick&&t.options.eventsCallbacks.onLegendLabelClick(e)}))},r=this,i=0;i.9*this.height)return;this.state.yValueRange=[l[0]-s*h,l[1]-s*h];var d=this.state.transform.y+s*f;this.state.transform={y:d};break;default:throw new Error("Unknown type of scroll pan orientation: "+r)}},t.prototype.onPanningEnd=function(){this.isPanning=!1,this.deltaYTransform=0,this.onMouseOut(),void 0!==this.options.eventsCallbacks&&void 0!==this.options.eventsCallbacks.panningEnd?this.options.eventsCallbacks.panningEnd([this.state.xValueRange,this.state.yValueRange,this.state.y1ValueRange]):console.log("on panning end, but there is no callback")},t.prototype.onBrush=function(){var t=this.d3.event.selection;if(this.options.zoomEvents.mouse.zoom.orientation===o.SQUARE&&null!==t){var n=this.getSelectionAttrs(t);void 0!==n&&this.chartContainer.select(".selection").attr("x",n.x).attr("y",n.y).attr("width",n.width).attr("height",n.height)}},t.prototype.getSelectionAttrs=function(t){if(null!==this.brushStartSelection&&null!=t){var n=this.brushStartSelection[0],e=this.brushStartSelection[1],r=t[0][0],i=t[1][0],o=t[0][1],u=i-r,a=t[1][1]-o,c=Math.min(u,a);return{x:r===n?n:n-c,y:o===e?e:e-c,width:c,height:c}}},t.prototype.onBrushStart=function(){this.isBrushing;var t=this.d3.event.selection;null!==t&&t.length>0&&(this.brushStartSelection=this.d3.event.selection[0]),this.onMouseOut()},t.prototype.onBrushEnd=function(){var t=this.d3.event.selection;if(this.isBrushing,!(null==t||t.length<2)){var n,e;switch(this.chartContainer.call(this.brush.move,null),this.options.zoomEvents.mouse.zoom.orientation){case o.HORIZONTAL:var r=this.xScale.invert(t[0]),i=this.xScale.invert(t[1]);if(Math.abs(i-r)0&&this.series[0].datapoints.length>1?this.series[0].datapoints[1][0]-this.series[0].datapoints[0][0]:void 0!==this.options.timeInterval&&void 0!==this.options.timeInterval.count?6e4*this.options.timeInterval.count:6e4},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xTickTransform",{get:function(){if(void 0===this.options.tickFormat||void 0===this.options.tickFormat.xTickOrientation)return"";switch(this.options.tickFormat.xTickOrientation){case r.VERTICAL:return"translate(-10px, 50px) rotate(-90deg)";case r.HORIZONTAL:return"";case r.DIAGONAL:return"translate(-30px, 30px) rotate(-45deg)";default:return""}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"extraMargin",{get:function(){var t={top:0,right:0,bottom:0,left:0};if(void 0!==this.options.tickFormat&&void 0!==this.options.tickFormat.xTickOrientation)switch(this.options.tickFormat.xTickOrientation){case r.VERTICAL:t.bottom+=80;break;case r.HORIZONTAL:break;case r.DIAGONAL:t.left+=15,t.bottom+=50,t.right+=10}return void 0!==this.options.labelFormat&&(void 0!==this.options.labelFormat.xAxis&&this.options.labelFormat.xAxis.length>0&&(t.bottom+=20),void 0!==this.options.labelFormat.yAxis&&this.options.labelFormat.yAxis.length>0&&(t.left+=20)),this.series.length>0&&(t.bottom+=25),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.d3Node.node().clientWidth-this.margin.left-this.margin.right},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.d3Node.node().clientHeight-this.margin.top-this.margin.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"legendRowPositionY",{get:function(){return this.height+this.margin.bottom-5},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"margin",{get:function(){return void 0!==this.options.margin?this.options.margin:X()({},tt,this.extraMargin,W.a)},enumerable:!1,configurable:!0}),t.prototype.formattedBound=function(t,n){return K()(t,"$__metric_name",n)},t.prototype.clearState=function(){this.state.clearState()},t.prototype.getSerieColor=function(t){if(void 0===this.series[t])throw new Error("Can't get color for unexisting serie: "+t+", there are only "+this.series.length+" series");var n=this.series[t].color;return void 0===n&&(n=D[t%D.length]),n},Object.defineProperty(t.prototype,"seriesTargetsWithBounds",{get:function(){var t=this;if(void 0===this.options.bounds||void 0===this.options.bounds.upper||void 0===this.options.bounds.lower)return[];var n=[];return this.series.forEach((function(e){n.push(t.formattedBound(t.options.bounds.upper,e.target)),n.push(t.formattedBound(t.options.bounds.lower,e.target))})),n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleSeries",{get:function(){return this.series.filter((function(t){return!1!==t.visible}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rectClipId",{get:function(){return 0===this._clipPathUID.length&&(this._clipPathUID=Math.random().toString(36).substr(2,12)),this._clipPathUID},enumerable:!1,configurable:!0}),t.prototype.isOutOfChart=function(){var t=this.d3.mouse(this.chartContainer.node()),n=t[0],e=t[1];return e>this.height+1||e<-1||n>this.width||n<0},t}()}])},function(t,n,e){(function(t,r){var i; +!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e=n();for(var r in e)("object"==typeof exports?exports:t)[r]=e[r]}}(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=4)}([function(t,n,e){window,t.exports=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=214)}([function(t,n){var e=Array.isArray;t.exports=e},function(t,n,e){var r=e(93),i=e(54);t.exports=function(t,n){return null!=t&&i(t,n,r)}},function(t,n){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},function(t,n,e){var r=e(56),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,n){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,n,e){var r=e(29),i=e(78),o=e(14);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,n,e){var r=e(7),i=e(4);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,n,e){var r=e(12),i=e(95),o=e(96),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?i(t):o(t)}},function(t,n,e){var r=e(103),i=e(106);t.exports=function(t,n){var e=i(t,n);return r(e)?e:void 0}},function(t,n,e){var r=e(34),i=e(38);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,n,e){var r=e(122);t.exports=function(t){return r(t,5)}},function(t,n,e){var r=e(29),i=e(73),o=e(14);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,n,e){var r=e(3).Symbol;t.exports=r},function(t,n,e){var r=e(62),i=e(133),o=e(9);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,n){t.exports=function(t){return t}},function(t,n){t.exports=function(t,n){return t===n||t!=t&&n!=n}},function(t,n,e){var r=e(60),i=e(39);t.exports=function(t,n,e,o){var u=!e;e||(e={});for(var a=-1,c=n.length;++a-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}},function(t,n,e){var r=e(61);t.exports=function(t,n,e){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n,e){var r=e(132),i=e(27),o=e(42),u=o&&o.isTypedArray,a=u?i(u):r;t.exports=a},function(t,n,e){(function(t){var r=e(56),i=n&&!n.nodeType&&n,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,u=o&&o.exports===i&&r.process,a=function(){try{return o&&o.require&&o.require("util").types||u&&u.binding&&u.binding("util")}catch(t){}}();t.exports=a}).call(this,e(40)(t))},function(t,n){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},function(t,n,e){var r=e(139),i=e(66),o=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols,a=u?function(t){return null==t?[]:(t=Object(t),r(u(t),(function(n){return o.call(t,n)})))}:i;t.exports=a},function(t,n){t.exports=function(t,n){for(var e=-1,r=n.length,i=t.length;++e1&&u(t,n[0],n[1])?n=[]:e>2&&u(n[0],n[1],n[2])&&(n=[n[0]]),i(t,r(n,1),[])}));t.exports=a},function(t,n){var e=Array.prototype.reverse;t.exports=function(t){return null==t?t:e.call(t)}},function(t,n,e){var r=e(55),i=e(23),o=e(0),u=e(37),a=e(38),c=e(24);t.exports=function(t,n,e){for(var f=-1,s=(n=r(n,t)).length,l=!1;++fs))return!1;var h=c.get(t),d=c.get(n);if(h&&d)return h==n&&d==t;var p=-1,v=!0,y=2&e?new r:void 0;for(c.set(t,n),c.set(n,t);++pn}},function(t,n,e){var r=e(182)();t.exports=r},function(t,n){t.exports=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}},function(t,n,e){var r=e(15),i=e(9),o=e(37),u=e(2);t.exports=function(t,n,e){if(!u(e))return!1;var a=typeof n;return!!("number"==a?i(e)&&o(n,e.length):"string"==a&&n in e)&&r(e[n],t)}},function(t,n,e){var r=e(25),i=e(83),o=e(79),u=e(193),a=e(2),c=e(17),f=e(84);t.exports=function t(n,e,s,l,h){n!==e&&o(e,(function(o,c){if(h||(h=new r),a(o))u(n,e,c,s,t,l,h);else{var d=l?l(f(n,c),o,c+"",n,e,h):void 0;void 0===d&&(d=o),i(n,c,d)}}),c)}},function(t,n,e){var r=e(39),i=e(15);t.exports=function(t,n,e){(void 0!==e&&!i(t[n],e)||void 0===e&&!(n in t))&&r(t,n,e)}},function(t,n){t.exports=function(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}},function(t,n,e){var r=e(2),i=e(6),o=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=r(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var e=a.test(t);return e||c.test(t)?f(t.slice(2),e?2:8):u.test(t)?NaN:+t}},function(t,n,e){var r=e(198),i=e(199);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[t.i,i,""]]);var o,u=0,a={injectType:"lazyStyleTag",insert:"head",singleton:!1},c={};c.locals=i.locals||{},c.use=function(){return u++||(o=r(i,a)),c},c.unuse=function(){u>0&&!--u&&(o(),o=null)},t.exports=c},function(t,n,e){var r=e(201),i=e(9),o=e(205),u=e(206),a=e(208),c=Math.max;t.exports=function(t,n,e,f){t=i(t)?t:a(t),e=e&&!f?u(e):0;var s=t.length;return e<0&&(e=c(s+e,0)),o(t)?e<=s&&t.indexOf(n,e)>-1:!!s&&r(t,n,e)>-1}},function(t,n,e){t.exports=e(210)},function(t,n){t.exports=function(t){var n=null==t?0:t.length;return n?t[n-1]:void 0}},function(t,n,e){var r=e(211)((function(t,n){return t+n}),0);t.exports=r},function(t,n,e){var r=e(58);t.exports=function(){var t=arguments,n=r(t[0]);return t.length<3?n:n.replace(t[1],t[2])}},function(t,n,e){var r=e(2),i=e(213),o=e(85),u=Math.max,a=Math.min;t.exports=function(t,n,e){var c,f,s,l,h,d,p=0,v=!1,y=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function _(n){var e=c,r=f;return c=f=void 0,p=n,l=t.apply(r,e)}function b(t){return p=t,h=setTimeout(x,n),v?_(t):l}function m(t){var e=t-d;return void 0===d||e>=n||e<0||y&&t-p>=s}function x(){var t=i();if(m(t))return w(t);h=setTimeout(x,function(t){var e=n-(t-d);return y?a(e,s-(t-p)):e}(t))}function w(t){return h=void 0,g&&c?_(t):(c=f=void 0,l)}function M(){var t=i(),e=m(t);if(c=arguments,f=this,d=t,e){if(void 0===h)return b(d);if(y)return clearTimeout(h),h=setTimeout(x,n),_(d)}return void 0===h&&(h=setTimeout(x,n)),l}return n=o(n)||0,r(e)&&(v=!!e.leading,s=(y="maxWait"in e)?u(o(e.maxWait)||0,n):s,g="trailing"in e?!!e.trailing:g),M.cancel=function(){void 0!==h&&clearTimeout(h),p=0,c=d=f=h=void 0},M.flush=function(){return void 0===h?l:w(i())},M}},function(t,n){var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){var r=e(12),i=Object.prototype,o=i.hasOwnProperty,u=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var n=o.call(t,a),e=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=u.call(t);return r&&(n?t[a]=e:delete t[a]),i}},function(t,n){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},function(t,n,e){var r=e(98),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,u=r((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(i,(function(t,e,r,i){n.push(r?i.replace(o,"$1"):e||t)})),n}));t.exports=u},function(t,n,e){var r=e(99);t.exports=function(t){var n=r(t,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}},function(t,n,e){var r=e(33);function i(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var u=t.apply(this,r);return e.cache=o.set(i,u)||o,u};return e.cache=new(i.Cache||r),e}i.Cache=r,t.exports=i},function(t,n,e){var r=e(101),i=e(20),o=e(35);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,n,e){var r=e(102),i=e(107),o=e(108),u=e(109),a=e(110);function c(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1}},function(t,n,e){var r=e(21);t.exports=function(t,n){var e=this.__data__,i=r(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this}},function(t,n,e){var r=e(22);t.exports=function(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n}},function(t,n){t.exports=function(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}},function(t,n,e){var r=e(22);t.exports=function(t){return r(this,t).get(t)}},function(t,n,e){var r=e(22);t.exports=function(t){return r(this,t).has(t)}},function(t,n,e){var r=e(22);t.exports=function(t,n){var e=r(this,t),i=e.size;return e.set(t,n),this.size+=e.size==i?0:1,this}},function(t,n,e){var r=e(7),i=e(4);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,n,e){var r=e(25),i=e(128),o=e(60),u=e(129),a=e(135),c=e(64),f=e(65),s=e(138),l=e(140),h=e(68),d=e(141),p=e(28),v=e(146),y=e(147),g=e(72),_=e(0),b=e(26),m=e(152),x=e(2),w=e(154),M=e(13),A=e(17),S={};S["[object Arguments]"]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S["[object Object]"]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S["[object Function]"]=S["[object WeakMap]"]=!1,t.exports=function t(n,e,k,C,E,T){var O,N=1&e,j=2&e,R=4&e;if(k&&(O=E?k(n,C,E,T):k(n)),void 0!==O)return O;if(!x(n))return n;var z=_(n);if(z){if(O=v(n),!N)return f(n,O)}else{var P=p(n),L="[object Function]"==P||"[object GeneratorFunction]"==P;if(b(n))return c(n,N);if("[object Object]"==P||"[object Arguments]"==P||L&&!E){if(O=j||L?{}:g(n),!N)return j?l(n,a(O,n)):s(n,u(O,n))}else{if(!S[P])return E?n:{};O=y(n,P,N)}}T||(T=new r);var I=T.get(n);if(I)return I;T.set(n,O),w(n)?n.forEach((function(r){O.add(t(r,e,k,r,n,T))})):m(n)&&n.forEach((function(r,i){O.set(i,t(r,e,k,i,n,T))}));var F=z?void 0:(R?j?d:h:j?A:M)(n);return i(F||n,(function(r,i){F&&(r=n[i=r]),o(O,i,t(r,e,k,i,n,T))})),O}},function(t,n,e){var r=e(20);t.exports=function(){this.__data__=new r,this.size=0}},function(t,n){t.exports=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e}},function(t,n){t.exports=function(t){return this.__data__.get(t)}},function(t,n){t.exports=function(t){return this.__data__.has(t)}},function(t,n,e){var r=e(20),i=e(35),o=e(33);t.exports=function(t,n){var e=this.__data__;if(e instanceof r){var u=e.__data__;if(!i||u.length<199)return u.push([t,n]),this.size=++e.size,this;e=this.__data__=new o(u)}return e.set(t,n),this.size=e.size,this}},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length;++e0&&o(s)?e>1?t(s,e-1,o,u,a):r(a,s):u||(a[a.length]=s)}return a}},function(t,n,e){var r=e(12),i=e(23),o=e(0),u=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(u&&t&&t[u])}},function(t,n,e){var r=e(36),i=e(49),o=e(48),u=e(179),a=e(184),c=e(27),f=e(185),s=e(14),l=e(0);t.exports=function(t,n,e){n=n.length?r(n,(function(t){return l(t)?function(n){return i(n,1===t.length?t[0]:t)}:t})):[s];var h=-1;n=r(n,c(o));var d=u(t,(function(t,e,i){return{criteria:r(n,(function(n){return n(t)})),index:++h,value:t}}));return a(d,(function(t,n){return f(t,n,e)}))}},function(t,n,e){var r=e(180),i=e(9);t.exports=function(t,n){var e=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++e]=n(t,r,i)})),o}},function(t,n,e){var r=e(181),i=e(183)(r);t.exports=i},function(t,n,e){var r=e(79),i=e(13);t.exports=function(t,n){return t&&r(t,n,i)}},function(t,n){t.exports=function(t){return function(n,e,r){for(var i=-1,o=Object(n),u=r(n),a=u.length;a--;){var c=u[t?a:++i];if(!1===e(o[c],c,o))break}return n}}},function(t,n,e){var r=e(9);t.exports=function(t,n){return function(e,i){if(null==e)return e;if(!r(e))return t(e,i);for(var o=e.length,u=n?o:-1,a=Object(e);(n?u--:++u=c?f:f*("desc"==e[i]?-1:1)}return t.index-n.index}},function(t,n,e){var r=e(6);t.exports=function(t,n){if(t!==n){var e=void 0!==t,i=null===t,o=t==t,u=r(t),a=void 0!==n,c=null===n,f=n==n,s=r(n);if(!c&&!s&&!u&&t>n||u&&a&&f&&!c&&!s||i&&a&&f||!e&&f||!o)return 1;if(!i&&!u&&!s&&t0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},function(t,n,e){var r=e(82),i=e(2);t.exports=function t(n,e,o,u,a,c){return i(n)&&i(e)&&(c.set(e,n),r(n,e,void 0,t,c),c.delete(e)),n}},function(t,n,e){var r=e(83),i=e(64),o=e(71),u=e(65),a=e(72),c=e(23),f=e(0),s=e(194),l=e(26),h=e(34),d=e(2),p=e(195),v=e(41),y=e(84),g=e(196);t.exports=function(t,n,e,_,b,m,x){var w=y(t,e),M=y(n,e),A=x.get(M);if(A)r(t,e,A);else{var S=m?m(w,M,e+"",t,n,x):void 0,k=void 0===S;if(k){var C=f(M),E=!C&&l(M),T=!C&&!E&&v(M);S=M,C||E||T?f(w)?S=w:s(w)?S=u(w):E?(k=!1,S=i(M,!0)):T?(k=!1,S=o(M,!0)):S=[]:p(M)||c(M)?(S=w,c(w)?S=g(w):d(w)&&!h(w)||(S=a(M))):k=!1}k&&(x.set(M,S),b(S,M,_,m,x),x.delete(M)),r(t,e,S)}}},function(t,n,e){var r=e(9),i=e(4);t.exports=function(t){return i(t)&&r(t)}},function(t,n,e){var r=e(7),i=e(46),o=e(4),u=Function.prototype,a=Object.prototype,c=u.toString,f=a.hasOwnProperty,s=c.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var n=i(t);if(null===n)return!0;var e=f.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&c.call(e)==s}},function(t,n,e){var r=e(16),i=e(17);t.exports=function(t){return r(t,i(t))}},function(t,n,e){var r=e(50),i=e(81);t.exports=function(t){return r((function(n,e){var r=-1,o=e.length,u=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(u=t.length>3&&"function"==typeof u?(o--,u):void 0,a&&i(e[0],e[1],a)&&(u=o<3?void 0:u,o=1),n=Object(n);++r0)for(var n=this.chartContainer.append("g").attr("class","legend-row"),e=function(e){if(U()(r.seriesTargetsWithBounds,r.series[e].target))return"continue";var i=0;null!==n.selectAll("text").node()&&(i=n.node().getBBox().width+25);var o=!1!==r.series[e].visible;n.append("foreignObject").attr("x",i).attr("y",r.legendRowPositionY-12).attr("width",13).attr("height",15).html("
").on("click",(function(){void 0!==t.options.eventsCallbacks&&void 0!==t.options.eventsCallbacks.onLegendClick&&t.options.eventsCallbacks.onLegendClick(e)})),n.append("text").attr("x",i+20).attr("y",r.legendRowPositionY).attr("class","metric-legend-"+e).style("font-size","12px").style("fill",r.getSerieColor(e)).text(r.series[e].target).on("click",(function(){void 0!==t.options.eventsCallbacks&&void 0!==t.options.eventsCallbacks.onLegendLabelClick&&t.options.eventsCallbacks.onLegendLabelClick(e)}))},r=this,i=0;i.9*this.height)return;this.state.yValueRange=[l[0]-s*h,l[1]-s*h];var d=this.state.transform.y+s*f;this.state.transform={y:d};break;default:throw new Error("Unknown type of scroll pan orientation: "+r)}},t.prototype.onPanningEnd=function(){this.isPanning=!1,this.deltaYTransform=0,this.onMouseOut(),void 0!==this.options.eventsCallbacks&&void 0!==this.options.eventsCallbacks.panningEnd?this.options.eventsCallbacks.panningEnd([this.state.xValueRange,this.state.yValueRange,this.state.y1ValueRange]):console.log("on panning end, but there is no callback")},t.prototype.onBrush=function(){var t=this.d3.event.selection;if(this.options.zoomEvents.mouse.zoom.orientation===o.SQUARE&&null!==t){var n=this.getSelectionAttrs(t);void 0!==n&&this.chartContainer.select(".selection").attr("x",n.x).attr("y",n.y).attr("width",n.width).attr("height",n.height)}},t.prototype.getSelectionAttrs=function(t){if(null!==this.brushStartSelection&&null!=t){var n=this.brushStartSelection[0],e=this.brushStartSelection[1],r=t[0][0],i=t[1][0],o=t[0][1],u=i-r,a=t[1][1]-o,c=Math.min(u,a);return{x:r===n?n:n-c,y:o===e?e:e-c,width:c,height:c}}},t.prototype.onBrushStart=function(){this.isBrushing;var t=this.d3.event.selection;null!==t&&t.length>0&&(this.brushStartSelection=this.d3.event.selection[0]),this.onMouseOut()},t.prototype.onBrushEnd=function(){var t=this.d3.event.selection;if(this.isBrushing,!(null==t||t.length<2)){var n,e;switch(this.chartContainer.call(this.brush.move,null),this.options.zoomEvents.mouse.zoom.orientation){case o.HORIZONTAL:var r=this.xScale.invert(t[0]),i=this.xScale.invert(t[1]);if(Math.abs(i-r)0&&this.series[0].datapoints.length>1?this.series[0].datapoints[1][0]-this.series[0].datapoints[0][0]:void 0!==this.options.timeInterval&&void 0!==this.options.timeInterval.count?6e4*this.options.timeInterval.count:6e4},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xTickTransform",{get:function(){if(void 0===this.options.tickFormat||void 0===this.options.tickFormat.xTickOrientation)return"";switch(this.options.tickFormat.xTickOrientation){case r.VERTICAL:return"translate(-10px, 50px) rotate(-90deg)";case r.HORIZONTAL:return"";case r.DIAGONAL:return"translate(-30px, 30px) rotate(-45deg)";default:return""}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"extraMargin",{get:function(){var t={top:0,right:0,bottom:0,left:0};if(void 0!==this.options.tickFormat&&void 0!==this.options.tickFormat.xTickOrientation)switch(this.options.tickFormat.xTickOrientation){case r.VERTICAL:t.bottom+=80;break;case r.HORIZONTAL:break;case r.DIAGONAL:t.left+=15,t.bottom+=50,t.right+=10}return void 0!==this.options.labelFormat&&(void 0!==this.options.labelFormat.xAxis&&this.options.labelFormat.xAxis.length>0&&(t.bottom+=20),void 0!==this.options.labelFormat.yAxis&&this.options.labelFormat.yAxis.length>0&&(t.left+=20)),this.series.length>0&&(t.bottom+=25),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.d3Node.node().clientWidth-this.margin.left-this.margin.right},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.d3Node.node().clientHeight-this.margin.top-this.margin.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"legendRowPositionY",{get:function(){return this.height+this.margin.bottom-5},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"margin",{get:function(){return void 0!==this.options.margin?this.options.margin:X()({},tt,this.extraMargin,W.a)},enumerable:!1,configurable:!0}),t.prototype.formattedBound=function(t,n){return K()(t,"$__metric_name",n)},t.prototype.clearState=function(){this.state.clearState()},t.prototype.getSerieColor=function(t){if(void 0===this.series[t])throw new Error("Can't get color for unexisting serie: "+t+", there are only "+this.series.length+" series");var n=this.series[t].color;return void 0===n&&(n=D[t%D.length]),n},Object.defineProperty(t.prototype,"seriesTargetsWithBounds",{get:function(){var t=this;if(void 0===this.options.bounds||void 0===this.options.bounds.upper||void 0===this.options.bounds.lower)return[];var n=[];return this.series.forEach((function(e){n.push(t.formattedBound(t.options.bounds.upper,e.target)),n.push(t.formattedBound(t.options.bounds.lower,e.target))})),n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleSeries",{get:function(){return this.series.filter((function(t){return!1!==t.visible}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rectClipId",{get:function(){return 0===this._clipPathUID.length&&(this._clipPathUID=Math.random().toString(36).substr(2,12)),this._clipPathUID},enumerable:!1,configurable:!0}),t.prototype.isOutOfChart=function(){var t=this.d3.mouse(this.chartContainer.node()),n=t[0],e=t[1];return e>this.height+1||e<-1||n>this.width||n<0},t}()}])},function(t,n,e){(function(t,r){var i; /** * @license * Lodash @@ -6,4 +6,4 @@ * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */(function(){var o="Expected a function",u="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",f="[object Array]",s="[object Boolean]",l="[object Date]",h="[object Error]",d="[object Function]",p="[object GeneratorFunction]",v="[object Map]",y="[object Number]",g="[object Object]",_="[object RegExp]",b="[object Set]",m="[object String]",x="[object Symbol]",w="[object WeakMap]",M="[object ArrayBuffer]",A="[object DataView]",S="[object Float32Array]",k="[object Float64Array]",C="[object Int8Array]",E="[object Int16Array]",T="[object Int32Array]",O="[object Uint8Array]",N="[object Uint16Array]",j="[object Uint32Array]",R=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,P=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,I=/[&<>"']/g,F=RegExp(L.source),D=RegExp(I.source),B=/<%-([\s\S]+?)%>/g,U=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,q=/^\w*$/,H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$=/[\\^$.*+?()[\]{}|]/g,X=RegExp($.source),G=/^\s+/,W=/\s/,Z=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,K=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,J=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tt=/[()=,{}\[\]\/\s]/,nt=/\\(\\)?/g,et=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,ut=/^\[object .+?Constructor\]$/,at=/^0o[0-7]+$/i,ct=/^(?:0|[1-9]\d*)$/,ft=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,st=/($^)/,lt=/['\n\r\u2028\u2029\\]/g,ht="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",dt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pt="[\\ud800-\\udfff]",vt="["+dt+"]",yt="["+ht+"]",gt="\\d+",_t="[\\u2700-\\u27bf]",bt="[a-z\\xdf-\\xf6\\xf8-\\xff]",mt="[^\\ud800-\\udfff"+dt+gt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",xt="\\ud83c[\\udffb-\\udfff]",wt="[^\\ud800-\\udfff]",Mt="(?:\\ud83c[\\udde6-\\uddff]){2}",At="[\\ud800-\\udbff][\\udc00-\\udfff]",St="[A-Z\\xc0-\\xd6\\xd8-\\xde]",kt="(?:"+bt+"|"+mt+")",Ct="(?:"+St+"|"+mt+")",Et="(?:"+yt+"|"+xt+")"+"?",Tt="[\\ufe0e\\ufe0f]?"+Et+("(?:\\u200d(?:"+[wt,Mt,At].join("|")+")[\\ufe0e\\ufe0f]?"+Et+")*"),Ot="(?:"+[_t,Mt,At].join("|")+")"+Tt,Nt="(?:"+[wt+yt+"?",yt,Mt,At,pt].join("|")+")",jt=RegExp("['’]","g"),Rt=RegExp(yt,"g"),zt=RegExp(xt+"(?="+xt+")|"+Nt+Tt,"g"),Pt=RegExp([St+"?"+bt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[vt,St,"$"].join("|")+")",Ct+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[vt,St+kt,"$"].join("|")+")",St+"?"+kt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",St+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gt,Ot].join("|"),"g"),Lt=RegExp("[\\u200d\\ud800-\\udfff"+ht+"\\ufe0e\\ufe0f]"),It=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ft=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Dt=-1,Bt={};Bt[S]=Bt[k]=Bt[C]=Bt[E]=Bt[T]=Bt[O]=Bt["[object Uint8ClampedArray]"]=Bt[N]=Bt[j]=!0,Bt[c]=Bt[f]=Bt[M]=Bt[s]=Bt[A]=Bt[l]=Bt[h]=Bt[d]=Bt[v]=Bt[y]=Bt[g]=Bt[_]=Bt[b]=Bt[m]=Bt[w]=!1;var Ut={};Ut[c]=Ut[f]=Ut[M]=Ut[A]=Ut[s]=Ut[l]=Ut[S]=Ut[k]=Ut[C]=Ut[E]=Ut[T]=Ut[v]=Ut[y]=Ut[g]=Ut[_]=Ut[b]=Ut[m]=Ut[x]=Ut[O]=Ut["[object Uint8ClampedArray]"]=Ut[N]=Ut[j]=!0,Ut[h]=Ut[d]=Ut[w]=!1;var Yt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,qt=parseInt,Ht="object"==typeof t&&t&&t.Object===Object&&t,$t="object"==typeof self&&self&&self.Object===Object&&self,Xt=Ht||$t||Function("return this")(),Gt=n&&!n.nodeType&&n,Wt=Gt&&"object"==typeof r&&r&&!r.nodeType&&r,Zt=Wt&&Wt.exports===Gt,Kt=Zt&&Ht.process,Qt=function(){try{var t=Wt&&Wt.require&&Wt.require("util").types;return t||Kt&&Kt.binding&&Kt.binding("util")}catch(t){}}(),Jt=Qt&&Qt.isArrayBuffer,tn=Qt&&Qt.isDate,nn=Qt&&Qt.isMap,en=Qt&&Qt.isRegExp,rn=Qt&&Qt.isSet,on=Qt&&Qt.isTypedArray;function un(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function an(t,n,e,r){for(var i=-1,o=null==t?0:t.length;++i-1}function dn(t,n,e){for(var r=-1,i=null==t?0:t.length;++r-1;);return e}function Ln(t,n){for(var e=t.length;e--&&wn(n,t[e],0)>-1;);return e}function In(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}var Fn=Cn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Dn=Cn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Bn(t){return"\\"+Yt[t]}function Un(t){return Lt.test(t)}function Yn(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function Vn(t,n){return function(e){return t(n(e))}}function qn(t,n){for(var e=-1,r=t.length,i=0,o=[];++e",""":'"',"'":"'"});var Kn=function t(n){var e,r=(n=null==n?Xt:Kn.defaults(Xt.Object(),n,Kn.pick(Xt,Ft))).Array,i=n.Date,W=n.Error,ht=n.Function,dt=n.Math,pt=n.Object,vt=n.RegExp,yt=n.String,gt=n.TypeError,_t=r.prototype,bt=ht.prototype,mt=pt.prototype,xt=n["__core-js_shared__"],wt=bt.toString,Mt=mt.hasOwnProperty,At=0,St=(e=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",kt=mt.toString,Ct=wt.call(pt),Et=Xt._,Tt=vt("^"+wt.call(Mt).replace($,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ot=Zt?n.Buffer:void 0,Nt=n.Symbol,zt=n.Uint8Array,Lt=Ot?Ot.allocUnsafe:void 0,Yt=Vn(pt.getPrototypeOf,pt),Ht=pt.create,$t=mt.propertyIsEnumerable,Gt=_t.splice,Wt=Nt?Nt.isConcatSpreadable:void 0,Kt=Nt?Nt.iterator:void 0,Qt=Nt?Nt.toStringTag:void 0,bn=function(){try{var t=to(pt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Cn=n.clearTimeout!==Xt.clearTimeout&&n.clearTimeout,Qn=i&&i.now!==Xt.Date.now&&i.now,Jn=n.setTimeout!==Xt.setTimeout&&n.setTimeout,te=dt.ceil,ne=dt.floor,ee=pt.getOwnPropertySymbols,re=Ot?Ot.isBuffer:void 0,ie=n.isFinite,oe=_t.join,ue=Vn(pt.keys,pt),ae=dt.max,ce=dt.min,fe=i.now,se=n.parseInt,le=dt.random,he=_t.reverse,de=to(n,"DataView"),pe=to(n,"Map"),ve=to(n,"Promise"),ye=to(n,"Set"),ge=to(n,"WeakMap"),_e=to(pt,"create"),be=ge&&new ge,me={},xe=Eo(de),we=Eo(pe),Me=Eo(ve),Ae=Eo(ye),Se=Eo(ge),ke=Nt?Nt.prototype:void 0,Ce=ke?ke.valueOf:void 0,Ee=ke?ke.toString:void 0;function Te(t){if(Hu(t)&&!zu(t)&&!(t instanceof Re)){if(t instanceof je)return t;if(Mt.call(t,"__wrapped__"))return To(t)}return new je(t)}var Oe=function(){function t(){}return function(n){if(!qu(n))return{};if(Ht)return Ht(n);t.prototype=n;var e=new t;return t.prototype=void 0,e}}();function Ne(){}function je(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=void 0}function Re(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function ze(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n=n?t:n)),t}function Ke(t,n,e,r,i,o){var u,a=1&n,f=2&n,h=4&n;if(e&&(u=i?e(t,r,i,o):e(t)),void 0!==u)return u;if(!qu(t))return t;var w=zu(t);if(w){if(u=function(t){var n=t.length,e=new t.constructor(n);n&&"string"==typeof t[0]&&Mt.call(t,"index")&&(e.index=t.index,e.input=t.input);return e}(t),!a)return _i(t,u)}else{var R=ro(t),z=R==d||R==p;if(Fu(t))return hi(t,a);if(R==g||R==c||z&&!i){if(u=f||z?{}:oo(t),!a)return f?function(t,n){return bi(t,eo(t),n)}(t,function(t,n){return t&&bi(n,wa(n),t)}(u,t)):function(t,n){return bi(t,no(t),n)}(t,Xe(u,t))}else{if(!Ut[R])return i?t:{};u=function(t,n,e){var r=t.constructor;switch(n){case M:return di(t);case s:case l:return new r(+t);case A:return function(t,n){var e=n?di(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case S:case k:case C:case E:case T:case O:case"[object Uint8ClampedArray]":case N:case j:return pi(t,e);case v:return new r;case y:case m:return new r(t);case _:return function(t){var n=new t.constructor(t.source,rt.exec(t));return n.lastIndex=t.lastIndex,n}(t);case b:return new r;case x:return i=t,Ce?pt(Ce.call(i)):{}}var i}(t,R,a)}}o||(o=new Fe);var P=o.get(t);if(P)return P;o.set(t,u),Zu(t)?t.forEach((function(r){u.add(Ke(r,n,e,r,t,o))})):$u(t)&&t.forEach((function(r,i){u.set(i,Ke(r,n,e,i,t,o))}));var L=w?void 0:(h?f?Xi:$i:f?wa:xa)(t);return cn(L||t,(function(r,i){L&&(r=t[i=r]),qe(u,i,Ke(r,n,e,i,t,o))})),u}function Qe(t,n,e){var r=e.length;if(null==t)return!r;for(t=pt(t);r--;){var i=e[r],o=n[i],u=t[i];if(void 0===u&&!(i in t)||!o(u))return!1}return!0}function Je(t,n,e){if("function"!=typeof t)throw new gt(o);return xo((function(){t.apply(void 0,e)}),n)}function tr(t,n,e,r){var i=-1,o=hn,u=!0,a=t.length,c=[],f=n.length;if(!a)return c;e&&(n=pn(n,jn(e))),r?(o=dn,u=!1):n.length>=200&&(o=zn,u=!1,n=new Ie(n));t:for(;++i-1},Pe.prototype.set=function(t,n){var e=this.__data__,r=He(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this},Le.prototype.clear=function(){this.size=0,this.__data__={hash:new ze,map:new(pe||Pe),string:new ze}},Le.prototype.delete=function(t){var n=Qi(this,t).delete(t);return this.size-=n?1:0,n},Le.prototype.get=function(t){return Qi(this,t).get(t)},Le.prototype.has=function(t){return Qi(this,t).has(t)},Le.prototype.set=function(t,n){var e=Qi(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this},Ie.prototype.add=Ie.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Ie.prototype.has=function(t){return this.__data__.has(t)},Fe.prototype.clear=function(){this.__data__=new Pe,this.size=0},Fe.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Fe.prototype.get=function(t){return this.__data__.get(t)},Fe.prototype.has=function(t){return this.__data__.has(t)},Fe.prototype.set=function(t,n){var e=this.__data__;if(e instanceof Pe){var r=e.__data__;if(!pe||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new Le(r)}return e.set(t,n),this.size=e.size,this};var nr=wi(fr),er=wi(sr,!0);function rr(t,n){var e=!0;return nr(t,(function(t,r,i){return e=!!n(t,r,i)})),e}function ir(t,n,e){for(var r=-1,i=t.length;++r0&&e(a)?n>1?ur(a,n-1,e,r,i):vn(i,a):r||(i[i.length]=a)}return i}var ar=Mi(),cr=Mi(!0);function fr(t,n){return t&&ar(t,n,xa)}function sr(t,n){return t&&cr(t,n,xa)}function lr(t,n){return ln(n,(function(n){return Uu(t[n])}))}function hr(t,n){for(var e=0,r=(n=ci(n,t)).length;null!=t&&en}function yr(t,n){return null!=t&&Mt.call(t,n)}function gr(t,n){return null!=t&&n in pt(t)}function _r(t,n,e){for(var i=e?dn:hn,o=t[0].length,u=t.length,a=u,c=r(u),f=1/0,s=[];a--;){var l=t[a];a&&n&&(l=pn(l,jn(n))),f=ce(l.length,f),c[a]=!e&&(n||o>=120&&l.length>=120)?new Ie(a&&l):void 0}l=t[0];var h=-1,d=c[0];t:for(;++h=a)return c;var f=e[r];return c*("desc"==f?-1:1)}}return t.index-n.index}(t,n,e)}))}function zr(t,n,e){for(var r=-1,i=n.length,o={};++r-1;)a!==t&&Gt.call(a,c,1),Gt.call(t,c,1);return t}function Lr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var i=n[e];if(e==r||i!==o){var o=i;ao(i)?Gt.call(t,i,1):ti(t,i)}}return t}function Ir(t,n){return t+ne(le()*(n-t+1))}function Fr(t,n){var e="";if(!t||n<1||n>9007199254740991)return e;do{n%2&&(e+=t),(n=ne(n/2))&&(t+=t)}while(n);return e}function Dr(t,n){return wo(yo(t,n,Xa),t+"")}function Br(t){return Be(Oa(t))}function Ur(t,n){var e=Oa(t);return So(e,Ze(n,0,e.length))}function Yr(t,n,e,r){if(!qu(t))return t;for(var i=-1,o=(n=ci(n,t)).length,u=o-1,a=t;null!=a&&++io?0:o+n),(e=e>o?o:e)<0&&(e+=o),o=n>e?0:e-n>>>0,n>>>=0;for(var u=r(o);++i>>1,u=t[o];null!==u&&!Qu(u)&&(e?u<=n:u=200){var f=n?null:Fi(t);if(f)return Hn(f);u=!1,i=zn,c=new Ie}else c=n?[]:a;t:for(;++r=r?t:$r(t,n,e)}var li=Cn||function(t){return Xt.clearTimeout(t)};function hi(t,n){if(n)return t.slice();var e=t.length,r=Lt?Lt(e):new t.constructor(e);return t.copy(r),r}function di(t){var n=new t.constructor(t.byteLength);return new zt(n).set(new zt(t)),n}function pi(t,n){var e=n?di(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function vi(t,n){if(t!==n){var e=void 0!==t,r=null===t,i=t==t,o=Qu(t),u=void 0!==n,a=null===n,c=n==n,f=Qu(n);if(!a&&!f&&!o&&t>n||o&&u&&c&&!a&&!f||r&&u&&c||!e&&c||!i)return 1;if(!r&&!o&&!f&&t1?e[i-1]:void 0,u=i>2?e[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,u&&co(e[0],e[1],u)&&(o=i<3?void 0:o,i=1),n=pt(n);++r-1?i[o?n[u]:u]:void 0}}function Ei(t){return Hi((function(n){var e=n.length,r=e,i=je.prototype.thru;for(t&&n.reverse();r--;){var u=n[r];if("function"!=typeof u)throw new gt(o);if(i&&!a&&"wrapper"==Wi(u))var a=new je([],!0)}for(r=a?r:e;++r1&&b.reverse(),l&&f<_&&(b.length=f),this&&this!==Xt&&this instanceof g&&(S=y||ki(S)),S.apply(A,b)}}function Oi(t,n){return function(e,r){return function(t,n,e,r){return fr(t,(function(t,i,o){n(r,e(t),i,o)})),r}(e,t,n(r),{})}}function Ni(t,n){return function(e,r){var i;if(void 0===e&&void 0===r)return n;if(void 0!==e&&(i=e),void 0!==r){if(void 0===i)return r;"string"==typeof e||"string"==typeof r?(e=Qr(e),r=Qr(r)):(e=Kr(e),r=Kr(r)),i=t(e,r)}return i}}function ji(t){return Hi((function(n){return n=pn(n,jn(Ki())),Dr((function(e){var r=this;return t(n,(function(t){return un(t,r,e)}))}))}))}function Ri(t,n){var e=(n=void 0===n?" ":Qr(n)).length;if(e<2)return e?Fr(n,t):n;var r=Fr(n,te(t/Xn(n)));return Un(n)?si(Gn(r),0,t).join(""):r.slice(0,t)}function zi(t){return function(n,e,i){return i&&"number"!=typeof i&&co(n,e,i)&&(e=i=void 0),n=ra(n),void 0===e?(e=n,n=0):e=ra(e),function(t,n,e,i){for(var o=-1,u=ae(te((n-t)/(e||1)),0),a=r(u);u--;)a[i?u:++o]=t,t+=e;return a}(n,e,i=void 0===i?na))return!1;var f=o.get(t),s=o.get(n);if(f&&s)return f==n&&s==t;var l=-1,h=!0,d=2&e?new Ie:void 0;for(o.set(t,n),o.set(n,t);++l-1&&t%1==0&&t1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(Z,"{\n/* [wrapped with "+n+"] */\n")}(r,function(t,n){return cn(a,(function(e){var r="_."+e[0];n&e[1]&&!hn(t,r)&&t.push(r)})),t.sort()}(function(t){var n=t.match(K);return n?n[1].split(Q):[]}(r),e)))}function Ao(t){var n=0,e=0;return function(){var r=fe(),i=16-(r-e);if(e=r,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}function So(t,n){var e=-1,r=t.length,i=r-1;for(n=void 0===n?r:n;++e1?t[n-1]:void 0;return e="function"==typeof e?(t.pop(),e):void 0,Wo(t,e)}));function eu(t){var n=Te(t);return n.__chain__=!0,n}function ru(t,n){return n(t)}var iu=Hi((function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,i=function(n){return We(n,t)};return!(n>1||this.__actions__.length)&&r instanceof Re&&ao(e)?((r=r.slice(e,+e+(n?1:0))).__actions__.push({func:ru,args:[i],thisArg:void 0}),new je(r,this.__chain__).thru((function(t){return n&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var ou=mi((function(t,n,e){Mt.call(t,e)?++t[e]:Ge(t,e,1)}));var uu=Ci(Ro),au=Ci(zo);function cu(t,n){return(zu(t)?cn:nr)(t,Ki(n,3))}function fu(t,n){return(zu(t)?fn:er)(t,Ki(n,3))}var su=mi((function(t,n,e){Mt.call(t,e)?t[e].push(n):Ge(t,e,[n])}));var lu=Dr((function(t,n,e){var i=-1,o="function"==typeof n,u=Lu(t)?r(t.length):[];return nr(t,(function(t){u[++i]=o?un(n,t,e):br(t,n,e)})),u})),hu=mi((function(t,n,e){Ge(t,e,n)}));function du(t,n){return(zu(t)?pn:Er)(t,Ki(n,3))}var pu=mi((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]}));var vu=Dr((function(t,n){if(null==t)return[];var e=n.length;return e>1&&co(t,n[0],n[1])?n=[]:e>2&&co(n[0],n[1],n[2])&&(n=[n[0]]),Rr(t,ur(n,1),[])})),yu=Qn||function(){return Xt.Date.now()};function gu(t,n,e){return n=e?void 0:n,Bi(t,128,void 0,void 0,void 0,void 0,n=t&&null==n?t.length:n)}function _u(t,n){var e;if("function"!=typeof n)throw new gt(o);return t=ia(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=void 0),e}}var bu=Dr((function(t,n,e){var r=1;if(e.length){var i=qn(e,Zi(bu));r|=32}return Bi(t,r,n,e,i)})),mu=Dr((function(t,n,e){var r=3;if(e.length){var i=qn(e,Zi(mu));r|=32}return Bi(n,r,t,e,i)}));function xu(t,n,e){var r,i,u,a,c,f,s=0,l=!1,h=!1,d=!0;if("function"!=typeof t)throw new gt(o);function p(n){var e=r,o=i;return r=i=void 0,s=n,a=t.apply(o,e)}function v(t){return s=t,c=xo(g,n),l?p(t):a}function y(t){var e=t-f;return void 0===f||e>=n||e<0||h&&t-s>=u}function g(){var t=yu();if(y(t))return _(t);c=xo(g,function(t){var e=n-(t-f);return h?ce(e,u-(t-s)):e}(t))}function _(t){return c=void 0,d&&r?p(t):(r=i=void 0,a)}function b(){var t=yu(),e=y(t);if(r=arguments,i=this,f=t,e){if(void 0===c)return v(f);if(h)return li(c),c=xo(g,n),p(f)}return void 0===c&&(c=xo(g,n)),a}return n=ua(n)||0,qu(e)&&(l=!!e.leading,u=(h="maxWait"in e)?ae(ua(e.maxWait)||0,n):u,d="trailing"in e?!!e.trailing:d),b.cancel=function(){void 0!==c&&li(c),s=0,r=f=i=c=void 0},b.flush=function(){return void 0===c?a:_(yu())},b}var wu=Dr((function(t,n){return Je(t,1,n)})),Mu=Dr((function(t,n,e){return Je(t,ua(n)||0,e)}));function Au(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new gt(o);var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var u=t.apply(this,r);return e.cache=o.set(i,u)||o,u};return e.cache=new(Au.Cache||Le),e}function Su(t){if("function"!=typeof t)throw new gt(o);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}Au.Cache=Le;var ku=fi((function(t,n){var e=(n=1==n.length&&zu(n[0])?pn(n[0],jn(Ki())):pn(ur(n,1),jn(Ki()))).length;return Dr((function(r){for(var i=-1,o=ce(r.length,e);++i=n})),Ru=mr(function(){return arguments}())?mr:function(t){return Hu(t)&&Mt.call(t,"callee")&&!$t.call(t,"callee")},zu=r.isArray,Pu=Jt?jn(Jt):function(t){return Hu(t)&&pr(t)==M};function Lu(t){return null!=t&&Vu(t.length)&&!Uu(t)}function Iu(t){return Hu(t)&&Lu(t)}var Fu=re||uc,Du=tn?jn(tn):function(t){return Hu(t)&&pr(t)==l};function Bu(t){if(!Hu(t))return!1;var n=pr(t);return n==h||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!Gu(t)}function Uu(t){if(!qu(t))return!1;var n=pr(t);return n==d||n==p||"[object AsyncFunction]"==n||"[object Proxy]"==n}function Yu(t){return"number"==typeof t&&t==ia(t)}function Vu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function qu(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function Hu(t){return null!=t&&"object"==typeof t}var $u=nn?jn(nn):function(t){return Hu(t)&&ro(t)==v};function Xu(t){return"number"==typeof t||Hu(t)&&pr(t)==y}function Gu(t){if(!Hu(t)||pr(t)!=g)return!1;var n=Yt(t);if(null===n)return!0;var e=Mt.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&wt.call(e)==Ct}var Wu=en?jn(en):function(t){return Hu(t)&&pr(t)==_};var Zu=rn?jn(rn):function(t){return Hu(t)&&ro(t)==b};function Ku(t){return"string"==typeof t||!zu(t)&&Hu(t)&&pr(t)==m}function Qu(t){return"symbol"==typeof t||Hu(t)&&pr(t)==x}var Ju=on?jn(on):function(t){return Hu(t)&&Vu(t.length)&&!!Bt[pr(t)]};var ta=Pi(Cr),na=Pi((function(t,n){return t<=n}));function ea(t){if(!t)return[];if(Lu(t))return Ku(t)?Gn(t):_i(t);if(Kt&&t[Kt])return function(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}(t[Kt]());var n=ro(t);return(n==v?Yn:n==b?Hn:Oa)(t)}function ra(t){return t?(t=ua(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ia(t){var n=ra(t),e=n%1;return n==n?e?n-e:n:0}function oa(t){return t?Ze(ia(t),0,4294967295):0}function ua(t){if("number"==typeof t)return t;if(Qu(t))return NaN;if(qu(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=qu(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Nn(t);var e=ot.test(t);return e||at.test(t)?qt(t.slice(2),e?2:8):it.test(t)?NaN:+t}function aa(t){return bi(t,wa(t))}function ca(t){return null==t?"":Qr(t)}var fa=xi((function(t,n){if(ho(n)||Lu(n))bi(n,xa(n),t);else for(var e in n)Mt.call(n,e)&&qe(t,e,n[e])})),sa=xi((function(t,n){bi(n,wa(n),t)})),la=xi((function(t,n,e,r){bi(n,wa(n),t,r)})),ha=xi((function(t,n,e,r){bi(n,xa(n),t,r)})),da=Hi(We);var pa=Dr((function(t,n){t=pt(t);var e=-1,r=n.length,i=r>2?n[2]:void 0;for(i&&co(n[0],n[1],i)&&(r=1);++e1),n})),bi(t,Xi(t),e),r&&(e=Ke(e,7,Vi));for(var i=n.length;i--;)ti(e,n[i]);return e}));var ka=Hi((function(t,n){return null==t?{}:function(t,n){return zr(t,n,(function(n,e){return ga(t,e)}))}(t,n)}));function Ca(t,n){if(null==t)return{};var e=pn(Xi(t),(function(t){return[t]}));return n=Ki(n),zr(t,e,(function(t,e){return n(t,e[0])}))}var Ea=Di(xa),Ta=Di(wa);function Oa(t){return null==t?[]:Rn(t,xa(t))}var Na=Si((function(t,n,e){return n=n.toLowerCase(),t+(e?ja(n):n)}));function ja(t){return Ba(ca(t).toLowerCase())}function Ra(t){return(t=ca(t))&&t.replace(ft,Fn).replace(Rt,"")}var za=Si((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),Pa=Si((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),La=Ai("toLowerCase");var Ia=Si((function(t,n,e){return t+(e?"_":"")+n.toLowerCase()}));var Fa=Si((function(t,n,e){return t+(e?" ":"")+Ba(n)}));var Da=Si((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),Ba=Ai("toUpperCase");function Ua(t,n,e){return t=ca(t),void 0===(n=e?void 0:n)?function(t){return It.test(t)}(t)?function(t){return t.match(Pt)||[]}(t):function(t){return t.match(J)||[]}(t):t.match(n)||[]}var Ya=Dr((function(t,n){try{return un(t,void 0,n)}catch(t){return Bu(t)?t:new W(t)}})),Va=Hi((function(t,n){return cn(n,(function(n){n=Co(n),Ge(t,n,bu(t[n],t))})),t}));function qa(t){return function(){return t}}var Ha=Ei(),$a=Ei(!0);function Xa(t){return t}function Ga(t){return Ar("function"==typeof t?t:Ke(t,1))}var Wa=Dr((function(t,n){return function(e){return br(e,t,n)}})),Za=Dr((function(t,n){return function(e){return br(t,e,n)}}));function Ka(t,n,e){var r=xa(n),i=lr(n,r);null!=e||qu(n)&&(i.length||!r.length)||(e=n,n=t,t=this,i=lr(n,xa(n)));var o=!(qu(e)&&"chain"in e&&!e.chain),u=Uu(t);return cn(i,(function(e){var r=n[e];t[e]=r,u&&(t.prototype[e]=function(){var n=this.__chain__;if(o||n){var e=t(this.__wrapped__),i=e.__actions__=_i(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,vn([this.value()],arguments))})})),t}function Qa(){}var Ja=ji(pn),tc=ji(sn),nc=ji(_n);function ec(t){return fo(t)?kn(Co(t)):function(t){return function(n){return hr(n,t)}}(t)}var rc=zi(),ic=zi(!0);function oc(){return[]}function uc(){return!1}var ac=Ni((function(t,n){return t+n}),0),cc=Ii("ceil"),fc=Ni((function(t,n){return t/n}),1),sc=Ii("floor");var lc,hc=Ni((function(t,n){return t*n}),1),dc=Ii("round"),pc=Ni((function(t,n){return t-n}),0);return Te.after=function(t,n){if("function"!=typeof n)throw new gt(o);return t=ia(t),function(){if(--t<1)return n.apply(this,arguments)}},Te.ary=gu,Te.assign=fa,Te.assignIn=sa,Te.assignInWith=la,Te.assignWith=ha,Te.at=da,Te.before=_u,Te.bind=bu,Te.bindAll=Va,Te.bindKey=mu,Te.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return zu(t)?t:[t]},Te.chain=eu,Te.chunk=function(t,n,e){n=(e?co(t,n,e):void 0===n)?1:ae(ia(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,u=0,a=r(te(i/n));oi?0:i+e),(r=void 0===r||r>i?i:ia(r))<0&&(r+=i),r=e>r?0:oa(r);e>>0)?(t=ca(t))&&("string"==typeof n||null!=n&&!Wu(n))&&!(n=Qr(n))&&Un(t)?si(Gn(t),0,e):t.split(n,e):[]},Te.spread=function(t,n){if("function"!=typeof t)throw new gt(o);return n=null==n?0:ae(ia(n),0),Dr((function(e){var r=e[n],i=si(e,0,n);return r&&vn(i,r),un(t,this,i)}))},Te.tail=function(t){var n=null==t?0:t.length;return n?$r(t,1,n):[]},Te.take=function(t,n,e){return t&&t.length?$r(t,0,(n=e||void 0===n?1:ia(n))<0?0:n):[]},Te.takeRight=function(t,n,e){var r=null==t?0:t.length;return r?$r(t,(n=r-(n=e||void 0===n?1:ia(n)))<0?0:n,r):[]},Te.takeRightWhile=function(t,n){return t&&t.length?ei(t,Ki(n,3),!1,!0):[]},Te.takeWhile=function(t,n){return t&&t.length?ei(t,Ki(n,3)):[]},Te.tap=function(t,n){return n(t),t},Te.throttle=function(t,n,e){var r=!0,i=!0;if("function"!=typeof t)throw new gt(o);return qu(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),xu(t,n,{leading:r,maxWait:n,trailing:i})},Te.thru=ru,Te.toArray=ea,Te.toPairs=Ea,Te.toPairsIn=Ta,Te.toPath=function(t){return zu(t)?pn(t,Co):Qu(t)?[t]:_i(ko(ca(t)))},Te.toPlainObject=aa,Te.transform=function(t,n,e){var r=zu(t),i=r||Fu(t)||Ju(t);if(n=Ki(n,4),null==e){var o=t&&t.constructor;e=i?r?new o:[]:qu(t)&&Uu(o)?Oe(Yt(t)):{}}return(i?cn:fr)(t,(function(t,r,i){return n(e,t,r,i)})),e},Te.unary=function(t){return gu(t,1)},Te.union=Ho,Te.unionBy=$o,Te.unionWith=Xo,Te.uniq=function(t){return t&&t.length?Jr(t):[]},Te.uniqBy=function(t,n){return t&&t.length?Jr(t,Ki(n,2)):[]},Te.uniqWith=function(t,n){return n="function"==typeof n?n:void 0,t&&t.length?Jr(t,void 0,n):[]},Te.unset=function(t,n){return null==t||ti(t,n)},Te.unzip=Go,Te.unzipWith=Wo,Te.update=function(t,n,e){return null==t?t:ni(t,n,ai(e))},Te.updateWith=function(t,n,e,r){return r="function"==typeof r?r:void 0,null==t?t:ni(t,n,ai(e),r)},Te.values=Oa,Te.valuesIn=function(t){return null==t?[]:Rn(t,wa(t))},Te.without=Zo,Te.words=Ua,Te.wrap=function(t,n){return Cu(ai(n),t)},Te.xor=Ko,Te.xorBy=Qo,Te.xorWith=Jo,Te.zip=tu,Te.zipObject=function(t,n){return oi(t||[],n||[],qe)},Te.zipObjectDeep=function(t,n){return oi(t||[],n||[],Yr)},Te.zipWith=nu,Te.entries=Ea,Te.entriesIn=Ta,Te.extend=sa,Te.extendWith=la,Ka(Te,Te),Te.add=ac,Te.attempt=Ya,Te.camelCase=Na,Te.capitalize=ja,Te.ceil=cc,Te.clamp=function(t,n,e){return void 0===e&&(e=n,n=void 0),void 0!==e&&(e=(e=ua(e))==e?e:0),void 0!==n&&(n=(n=ua(n))==n?n:0),Ze(ua(t),n,e)},Te.clone=function(t){return Ke(t,4)},Te.cloneDeep=function(t){return Ke(t,5)},Te.cloneDeepWith=function(t,n){return Ke(t,5,n="function"==typeof n?n:void 0)},Te.cloneWith=function(t,n){return Ke(t,4,n="function"==typeof n?n:void 0)},Te.conformsTo=function(t,n){return null==n||Qe(t,n,xa(n))},Te.deburr=Ra,Te.defaultTo=function(t,n){return null==t||t!=t?n:t},Te.divide=fc,Te.endsWith=function(t,n,e){t=ca(t),n=Qr(n);var r=t.length,i=e=void 0===e?r:Ze(ia(e),0,r);return(e-=n.length)>=0&&t.slice(e,i)==n},Te.eq=Ou,Te.escape=function(t){return(t=ca(t))&&D.test(t)?t.replace(I,Dn):t},Te.escapeRegExp=function(t){return(t=ca(t))&&X.test(t)?t.replace($,"\\$&"):t},Te.every=function(t,n,e){var r=zu(t)?sn:rr;return e&&co(t,n,e)&&(n=void 0),r(t,Ki(n,3))},Te.find=uu,Te.findIndex=Ro,Te.findKey=function(t,n){return mn(t,Ki(n,3),fr)},Te.findLast=au,Te.findLastIndex=zo,Te.findLastKey=function(t,n){return mn(t,Ki(n,3),sr)},Te.floor=sc,Te.forEach=cu,Te.forEachRight=fu,Te.forIn=function(t,n){return null==t?t:ar(t,Ki(n,3),wa)},Te.forInRight=function(t,n){return null==t?t:cr(t,Ki(n,3),wa)},Te.forOwn=function(t,n){return t&&fr(t,Ki(n,3))},Te.forOwnRight=function(t,n){return t&&sr(t,Ki(n,3))},Te.get=ya,Te.gt=Nu,Te.gte=ju,Te.has=function(t,n){return null!=t&&io(t,n,yr)},Te.hasIn=ga,Te.head=Lo,Te.identity=Xa,Te.includes=function(t,n,e,r){t=Lu(t)?t:Oa(t),e=e&&!r?ia(e):0;var i=t.length;return e<0&&(e=ae(i+e,0)),Ku(t)?e<=i&&t.indexOf(n,e)>-1:!!i&&wn(t,n,e)>-1},Te.indexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=null==e?0:ia(e);return i<0&&(i=ae(r+i,0)),wn(t,n,i)},Te.inRange=function(t,n,e){return n=ra(n),void 0===e?(e=n,n=0):e=ra(e),function(t,n,e){return t>=ce(n,e)&&t=-9007199254740991&&t<=9007199254740991},Te.isSet=Zu,Te.isString=Ku,Te.isSymbol=Qu,Te.isTypedArray=Ju,Te.isUndefined=function(t){return void 0===t},Te.isWeakMap=function(t){return Hu(t)&&ro(t)==w},Te.isWeakSet=function(t){return Hu(t)&&"[object WeakSet]"==pr(t)},Te.join=function(t,n){return null==t?"":oe.call(t,n)},Te.kebabCase=za,Te.last=Bo,Te.lastIndexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=r;return void 0!==e&&(i=(i=ia(e))<0?ae(r+i,0):ce(i,r-1)),n==n?function(t,n,e){for(var r=e+1;r--;)if(t[r]===n)return r;return r}(t,n,i):xn(t,An,i,!0)},Te.lowerCase=Pa,Te.lowerFirst=La,Te.lt=ta,Te.lte=na,Te.max=function(t){return t&&t.length?ir(t,Xa,vr):void 0},Te.maxBy=function(t,n){return t&&t.length?ir(t,Ki(n,2),vr):void 0},Te.mean=function(t){return Sn(t,Xa)},Te.meanBy=function(t,n){return Sn(t,Ki(n,2))},Te.min=function(t){return t&&t.length?ir(t,Xa,Cr):void 0},Te.minBy=function(t,n){return t&&t.length?ir(t,Ki(n,2),Cr):void 0},Te.stubArray=oc,Te.stubFalse=uc,Te.stubObject=function(){return{}},Te.stubString=function(){return""},Te.stubTrue=function(){return!0},Te.multiply=hc,Te.nth=function(t,n){return t&&t.length?jr(t,ia(n)):void 0},Te.noConflict=function(){return Xt._===this&&(Xt._=Et),this},Te.noop=Qa,Te.now=yu,Te.pad=function(t,n,e){t=ca(t);var r=(n=ia(n))?Xn(t):0;if(!n||r>=n)return t;var i=(n-r)/2;return Ri(ne(i),e)+t+Ri(te(i),e)},Te.padEnd=function(t,n,e){t=ca(t);var r=(n=ia(n))?Xn(t):0;return n&&rn){var r=t;t=n,n=r}if(e||t%1||n%1){var i=le();return ce(t+i*(n-t+Vt("1e-"+((i+"").length-1))),n)}return Ir(t,n)},Te.reduce=function(t,n,e){var r=zu(t)?yn:En,i=arguments.length<3;return r(t,Ki(n,4),e,i,nr)},Te.reduceRight=function(t,n,e){var r=zu(t)?gn:En,i=arguments.length<3;return r(t,Ki(n,4),e,i,er)},Te.repeat=function(t,n,e){return n=(e?co(t,n,e):void 0===n)?1:ia(n),Fr(ca(t),n)},Te.replace=function(){var t=arguments,n=ca(t[0]);return t.length<3?n:n.replace(t[1],t[2])},Te.result=function(t,n,e){var r=-1,i=(n=ci(n,t)).length;for(i||(i=1,t=void 0);++r9007199254740991)return[];var e=4294967295,r=ce(t,4294967295);t-=4294967295;for(var i=On(r,n=Ki(n));++e=o)return t;var a=e-Xn(r);if(a<1)return r;var c=u?si(u,0,a).join(""):t.slice(0,a);if(void 0===i)return c+r;if(u&&(a+=c.length-a),Wu(i)){if(t.slice(a).search(i)){var f,s=c;for(i.global||(i=vt(i.source,ca(rt.exec(i))+"g")),i.lastIndex=0;f=i.exec(s);)var l=f.index;c=c.slice(0,void 0===l?a:l)}}else if(t.indexOf(Qr(i),a)!=a){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+r},Te.unescape=function(t){return(t=ca(t))&&F.test(t)?t.replace(L,Zn):t},Te.uniqueId=function(t){var n=++At;return ca(t)+n},Te.upperCase=Da,Te.upperFirst=Ba,Te.each=cu,Te.eachRight=fu,Te.first=Lo,Ka(Te,(lc={},fr(Te,(function(t,n){Mt.call(Te.prototype,n)||(lc[n]=t)})),lc),{chain:!1}),Te.VERSION="4.17.21",cn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Te[t].placeholder=Te})),cn(["drop","take"],(function(t,n){Re.prototype[t]=function(e){e=void 0===e?1:ae(ia(e),0);var r=this.__filtered__&&!n?new Re(this):this.clone();return r.__filtered__?r.__takeCount__=ce(e,r.__takeCount__):r.__views__.push({size:ce(e,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},Re.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}})),cn(["filter","map","takeWhile"],(function(t,n){var e=n+1,r=1==e||3==e;Re.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:Ki(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}})),cn(["head","last"],(function(t,n){var e="take"+(n?"Right":"");Re.prototype[t]=function(){return this[e](1).value()[0]}})),cn(["initial","tail"],(function(t,n){var e="drop"+(n?"":"Right");Re.prototype[t]=function(){return this.__filtered__?new Re(this):this[e](1)}})),Re.prototype.compact=function(){return this.filter(Xa)},Re.prototype.find=function(t){return this.filter(t).head()},Re.prototype.findLast=function(t){return this.reverse().find(t)},Re.prototype.invokeMap=Dr((function(t,n){return"function"==typeof t?new Re(this):this.map((function(e){return br(e,t,n)}))})),Re.prototype.reject=function(t){return this.filter(Su(Ki(t)))},Re.prototype.slice=function(t,n){t=ia(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Re(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),void 0!==n&&(e=(n=ia(n))<0?e.dropRight(-n):e.take(n-t)),e)},Re.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Re.prototype.toArray=function(){return this.take(4294967295)},fr(Re.prototype,(function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),r=/^(?:head|last)$/.test(n),i=Te[r?"take"+("last"==n?"Right":""):n],o=r||/^find/.test(n);i&&(Te.prototype[n]=function(){var n=this.__wrapped__,u=r?[1]:arguments,a=n instanceof Re,c=u[0],f=a||zu(n),s=function(t){var n=i.apply(Te,vn([t],u));return r&&l?n[0]:n};f&&e&&"function"==typeof c&&1!=c.length&&(a=f=!1);var l=this.__chain__,h=!!this.__actions__.length,d=o&&!l,p=a&&!h;if(!o&&f){n=p?n:new Re(this);var v=t.apply(n,u);return v.__actions__.push({func:ru,args:[s],thisArg:void 0}),new je(v,l)}return d&&p?t.apply(this,u):(v=this.thru(s),d?r?v.value()[0]:v.value():v)})})),cn(["pop","push","shift","sort","splice","unshift"],(function(t){var n=_t[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Te.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(zu(i)?i:[],t)}return this[e]((function(e){return n.apply(zu(e)?e:[],t)}))}})),fr(Re.prototype,(function(t,n){var e=Te[n];if(e){var r=e.name+"";Mt.call(me,r)||(me[r]=[]),me[r].push({name:n,func:e})}})),me[Ti(void 0,2).name]=[{name:"wrapper",func:void 0}],Re.prototype.clone=function(){var t=new Re(this.__wrapped__);return t.__actions__=_i(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=_i(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=_i(this.__views__),t},Re.prototype.reverse=function(){if(this.__filtered__){var t=new Re(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Re.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=zu(t),r=n<0,i=e?t.length:0,o=function(t,n,e){var r=-1,i=e.length;for(;++r=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Te.prototype.plant=function(t){for(var n,e=this;e instanceof Ne;){var r=To(e);r.__index__=0,r.__values__=void 0,n?i.__wrapped__=r:n=r;var i=r;e=e.__wrapped__}return i.__wrapped__=t,n},Te.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Re){var n=t;return this.__actions__.length&&(n=new Re(this)),(n=n.reverse()).__actions__.push({func:ru,args:[qo],thisArg:void 0}),new je(n,this.__chain__)}return this.thru(qo)},Te.prototype.toJSON=Te.prototype.valueOf=Te.prototype.value=function(){return ri(this.__wrapped__,this.__actions__)},Te.prototype.first=Te.prototype.head,Kt&&(Te.prototype[Kt]=function(){return this}),Te}();Xt._=Kn,void 0===(i=function(){return Kn}.call(n,e,n,r))||(r.exports=i)}).call(this)}).call(this,e(2),e(3)(t))},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n,e){"use strict";e.r(n),e.d(n,"LinePod",(function(){return UM})),e.d(n,"VueChartwerkLineChartObject",(function(){return YM})),e.d(n,"Mode",(function(){return i})),e.d(n,"TickOrientation",(function(){return o.TickOrientation})),e.d(n,"TimeFormat",(function(){return o.TimeFormat}));var r={};e.r(r),e.d(r,"version",(function(){return u})),e.d(r,"bisect",(function(){return h})),e.d(r,"bisectRight",(function(){return s})),e.d(r,"bisectLeft",(function(){return l})),e.d(r,"ascending",(function(){return a})),e.d(r,"bisector",(function(){return c})),e.d(r,"cross",(function(){return v})),e.d(r,"descending",(function(){return y})),e.d(r,"deviation",(function(){return b})),e.d(r,"extent",(function(){return m})),e.d(r,"histogram",(function(){return z})),e.d(r,"thresholdFreedmanDiaconis",(function(){return L})),e.d(r,"thresholdScott",(function(){return I})),e.d(r,"thresholdSturges",(function(){return R})),e.d(r,"max",(function(){return F})),e.d(r,"mean",(function(){return D})),e.d(r,"median",(function(){return B})),e.d(r,"merge",(function(){return U})),e.d(r,"min",(function(){return Y})),e.d(r,"pairs",(function(){return d})),e.d(r,"permute",(function(){return V})),e.d(r,"quantile",(function(){return P})),e.d(r,"range",(function(){return k})),e.d(r,"scan",(function(){return q})),e.d(r,"shuffle",(function(){return H})),e.d(r,"sum",(function(){return $})),e.d(r,"ticks",(function(){return O})),e.d(r,"tickIncrement",(function(){return N})),e.d(r,"tickStep",(function(){return j})),e.d(r,"transpose",(function(){return X})),e.d(r,"variance",(function(){return _})),e.d(r,"zip",(function(){return W})),e.d(r,"axisTop",(function(){return it})),e.d(r,"axisRight",(function(){return ot})),e.d(r,"axisBottom",(function(){return ut})),e.d(r,"axisLeft",(function(){return at})),e.d(r,"brush",(function(){return Ti})),e.d(r,"brushX",(function(){return Ci})),e.d(r,"brushY",(function(){return Ei})),e.d(r,"brushSelection",(function(){return ki})),e.d(r,"chord",(function(){return Fi})),e.d(r,"ribbon",(function(){return Qi})),e.d(r,"nest",(function(){return eo})),e.d(r,"set",(function(){return so})),e.d(r,"map",(function(){return no})),e.d(r,"keys",(function(){return lo})),e.d(r,"values",(function(){return ho})),e.d(r,"entries",(function(){return po})),e.d(r,"color",(function(){return Gn})),e.d(r,"rgb",(function(){return Qn})),e.d(r,"hsl",(function(){return oe})),e.d(r,"lab",(function(){return bo})),e.d(r,"hcl",(function(){return Co})),e.d(r,"lch",(function(){return ko})),e.d(r,"gray",(function(){return _o})),e.d(r,"cubehelix",(function(){return Po})),e.d(r,"contours",(function(){return Ho})),e.d(r,"contourDensity",(function(){return Ko})),e.d(r,"dispatch",(function(){return pt})),e.d(r,"drag",(function(){return iu})),e.d(r,"dragDisable",(function(){return On})),e.d(r,"dragEnable",(function(){return Nn})),e.d(r,"dsvFormat",(function(){return lu})),e.d(r,"csvParse",(function(){return du})),e.d(r,"csvParseRows",(function(){return pu})),e.d(r,"csvFormat",(function(){return vu})),e.d(r,"csvFormatBody",(function(){return yu})),e.d(r,"csvFormatRows",(function(){return gu})),e.d(r,"csvFormatRow",(function(){return _u})),e.d(r,"csvFormatValue",(function(){return bu})),e.d(r,"tsvParse",(function(){return xu})),e.d(r,"tsvParseRows",(function(){return wu})),e.d(r,"tsvFormat",(function(){return Mu})),e.d(r,"tsvFormatBody",(function(){return Au})),e.d(r,"tsvFormatRows",(function(){return Su})),e.d(r,"tsvFormatRow",(function(){return ku})),e.d(r,"tsvFormatValue",(function(){return Cu})),e.d(r,"autoType",(function(){return Eu})),e.d(r,"easeLinear",(function(){return Ou})),e.d(r,"easeQuad",(function(){return Ru})),e.d(r,"easeQuadIn",(function(){return Nu})),e.d(r,"easeQuadOut",(function(){return ju})),e.d(r,"easeQuadInOut",(function(){return Ru})),e.d(r,"easeCubic",(function(){return Zr})),e.d(r,"easeCubicIn",(function(){return Gr})),e.d(r,"easeCubicOut",(function(){return Wr})),e.d(r,"easeCubicInOut",(function(){return Zr})),e.d(r,"easePoly",(function(){return Lu})),e.d(r,"easePolyIn",(function(){return zu})),e.d(r,"easePolyOut",(function(){return Pu})),e.d(r,"easePolyInOut",(function(){return Lu})),e.d(r,"easeSin",(function(){return Uu})),e.d(r,"easeSinIn",(function(){return Du})),e.d(r,"easeSinOut",(function(){return Bu})),e.d(r,"easeSinInOut",(function(){return Uu})),e.d(r,"easeExp",(function(){return Hu})),e.d(r,"easeExpIn",(function(){return Vu})),e.d(r,"easeExpOut",(function(){return qu})),e.d(r,"easeExpInOut",(function(){return Hu})),e.d(r,"easeCircle",(function(){return Gu})),e.d(r,"easeCircleIn",(function(){return $u})),e.d(r,"easeCircleOut",(function(){return Xu})),e.d(r,"easeCircleInOut",(function(){return Gu})),e.d(r,"easeBounce",(function(){return Zu})),e.d(r,"easeBounceIn",(function(){return Wu})),e.d(r,"easeBounceOut",(function(){return Zu})),e.d(r,"easeBounceInOut",(function(){return Ku})),e.d(r,"easeBack",(function(){return ta})),e.d(r,"easeBackIn",(function(){return Qu})),e.d(r,"easeBackOut",(function(){return Ju})),e.d(r,"easeBackInOut",(function(){return ta})),e.d(r,"easeElastic",(function(){return ra})),e.d(r,"easeElasticIn",(function(){return ea})),e.d(r,"easeElasticOut",(function(){return ra})),e.d(r,"easeElasticInOut",(function(){return ia})),e.d(r,"blob",(function(){return ua})),e.d(r,"buffer",(function(){return ca})),e.d(r,"dsv",(function(){return ha})),e.d(r,"csv",(function(){return da})),e.d(r,"tsv",(function(){return pa})),e.d(r,"image",(function(){return va})),e.d(r,"json",(function(){return ga})),e.d(r,"text",(function(){return sa})),e.d(r,"xml",(function(){return ba})),e.d(r,"html",(function(){return ma})),e.d(r,"svg",(function(){return xa})),e.d(r,"forceCenter",(function(){return wa})),e.d(r,"forceCollide",(function(){return Pa})),e.d(r,"forceLink",(function(){return Fa})),e.d(r,"forceManyBody",(function(){return Va})),e.d(r,"forceRadial",(function(){return qa})),e.d(r,"forceSimulation",(function(){return Ya})),e.d(r,"forceX",(function(){return Ha})),e.d(r,"forceY",(function(){return $a})),e.d(r,"formatDefaultLocale",(function(){return cc})),e.d(r,"format",(function(){return tc})),e.d(r,"formatPrefix",(function(){return nc})),e.d(r,"formatLocale",(function(){return ac})),e.d(r,"formatSpecifier",(function(){return Za})),e.d(r,"FormatSpecifier",(function(){return Ka})),e.d(r,"precisionFixed",(function(){return fc})),e.d(r,"precisionPrefix",(function(){return sc})),e.d(r,"precisionRound",(function(){return lc})),e.d(r,"geoArea",(function(){return ef})),e.d(r,"geoBounds",(function(){return Wf})),e.d(r,"geoCentroid",(function(){return as})),e.d(r,"geoCircle",(function(){return _s})),e.d(r,"geoClipAntimeridian",(function(){return Os})),e.d(r,"geoClipCircle",(function(){return Ns})),e.d(r,"geoClipExtent",(function(){return Ls})),e.d(r,"geoClipRectangle",(function(){return js})),e.d(r,"geoContains",(function(){return tl})),e.d(r,"geoDistance",(function(){return Hs})),e.d(r,"geoGraticule",(function(){return rl})),e.d(r,"geoGraticule10",(function(){return il})),e.d(r,"geoInterpolate",(function(){return fl})),e.d(r,"geoLength",(function(){return Ys})),e.d(r,"geoPath",(function(){return ah})),e.d(r,"geoAlbers",(function(){return kh})),e.d(r,"geoAlbersUsa",(function(){return Ch})),e.d(r,"geoAzimuthalEqualArea",(function(){return Nh})),e.d(r,"geoAzimuthalEqualAreaRaw",(function(){return Oh})),e.d(r,"geoAzimuthalEquidistant",(function(){return Rh})),e.d(r,"geoAzimuthalEquidistantRaw",(function(){return jh})),e.d(r,"geoConicConformal",(function(){return Dh})),e.d(r,"geoConicConformalRaw",(function(){return Fh})),e.d(r,"geoConicEqualArea",(function(){return Sh})),e.d(r,"geoConicEqualAreaRaw",(function(){return Ah})),e.d(r,"geoConicEquidistant",(function(){return Vh})),e.d(r,"geoConicEquidistantRaw",(function(){return Yh})),e.d(r,"geoEqualEarth",(function(){return Zh})),e.d(r,"geoEqualEarthRaw",(function(){return Wh})),e.d(r,"geoEquirectangular",(function(){return Uh})),e.d(r,"geoEquirectangularRaw",(function(){return Bh})),e.d(r,"geoGnomonic",(function(){return Qh})),e.d(r,"geoGnomonicRaw",(function(){return Kh})),e.d(r,"geoIdentity",(function(){return Jh})),e.d(r,"geoProjection",(function(){return xh})),e.d(r,"geoProjectionMutator",(function(){return wh})),e.d(r,"geoMercator",(function(){return Ph})),e.d(r,"geoMercatorRaw",(function(){return zh})),e.d(r,"geoNaturalEarth1",(function(){return nd})),e.d(r,"geoNaturalEarth1Raw",(function(){return td})),e.d(r,"geoOrthographic",(function(){return rd})),e.d(r,"geoOrthographicRaw",(function(){return ed})),e.d(r,"geoStereographic",(function(){return od})),e.d(r,"geoStereographicRaw",(function(){return id})),e.d(r,"geoTransverseMercator",(function(){return ad})),e.d(r,"geoTransverseMercatorRaw",(function(){return ud})),e.d(r,"geoRotation",(function(){return vs})),e.d(r,"geoStream",(function(){return Gc})),e.d(r,"geoTransform",(function(){return ch})),e.d(r,"cluster",(function(){return ld})),e.d(r,"hierarchy",(function(){return dd})),e.d(r,"pack",(function(){return Fd})),e.d(r,"packSiblings",(function(){return jd})),e.d(r,"packEnclose",(function(){return bd})),e.d(r,"partition",(function(){return qd})),e.d(r,"stratify",(function(){return Wd})),e.d(r,"tree",(function(){return ep})),e.d(r,"treemap",(function(){return ap})),e.d(r,"treemapBinary",(function(){return cp})),e.d(r,"treemapDice",(function(){return Vd})),e.d(r,"treemapSlice",(function(){return rp})),e.d(r,"treemapSliceDice",(function(){return fp})),e.d(r,"treemapSquarify",(function(){return up})),e.d(r,"treemapResquarify",(function(){return sp})),e.d(r,"interpolate",(function(){return je})),e.d(r,"interpolateArray",(function(){return we})),e.d(r,"interpolateBasis",(function(){return fe})),e.d(r,"interpolateBasisClosed",(function(){return se})),e.d(r,"interpolateDate",(function(){return Ae})),e.d(r,"interpolateDiscrete",(function(){return lp})),e.d(r,"interpolateHue",(function(){return hp})),e.d(r,"interpolateNumber",(function(){return Se})),e.d(r,"interpolateNumberArray",(function(){return me})),e.d(r,"interpolateObject",(function(){return ke})),e.d(r,"interpolateRound",(function(){return dp})),e.d(r,"interpolateString",(function(){return Ne})),e.d(r,"interpolateTransformCss",(function(){return vr})),e.d(r,"interpolateTransformSvg",(function(){return yr})),e.d(r,"interpolateZoom",(function(){return yp})),e.d(r,"interpolateRgb",(function(){return ye})),e.d(r,"interpolateRgbBasis",(function(){return _e})),e.d(r,"interpolateRgbBasisClosed",(function(){return be})),e.d(r,"interpolateHsl",(function(){return _p})),e.d(r,"interpolateHslLong",(function(){return bp})),e.d(r,"interpolateLab",(function(){return mp})),e.d(r,"interpolateHcl",(function(){return wp})),e.d(r,"interpolateHclLong",(function(){return Mp})),e.d(r,"interpolateCubehelix",(function(){return Sp})),e.d(r,"interpolateCubehelixLong",(function(){return kp})),e.d(r,"piecewise",(function(){return Cp})),e.d(r,"quantize",(function(){return Ep})),e.d(r,"path",(function(){return $i})),e.d(r,"polygonArea",(function(){return Tp})),e.d(r,"polygonCentroid",(function(){return Op})),e.d(r,"polygonHull",(function(){return Rp})),e.d(r,"polygonContains",(function(){return zp})),e.d(r,"polygonLength",(function(){return Pp})),e.d(r,"quadtree",(function(){return Ta})),e.d(r,"randomUniform",(function(){return Ip})),e.d(r,"randomNormal",(function(){return Fp})),e.d(r,"randomLogNormal",(function(){return Dp})),e.d(r,"randomBates",(function(){return Up})),e.d(r,"randomIrwinHall",(function(){return Bp})),e.d(r,"randomExponential",(function(){return Yp})),e.d(r,"scaleBand",(function(){return Zp})),e.d(r,"scalePoint",(function(){return Qp})),e.d(r,"scaleIdentity",(function(){return hv})),e.d(r,"scaleLinear",(function(){return lv})),e.d(r,"scaleLog",(function(){return xv})),e.d(r,"scaleSymlog",(function(){return Sv})),e.d(r,"scaleOrdinal",(function(){return Wp})),e.d(r,"scaleImplicit",(function(){return Gp})),e.d(r,"scalePow",(function(){return Ov})),e.d(r,"scaleSqrt",(function(){return Nv})),e.d(r,"scaleQuantile",(function(){return jv})),e.d(r,"scaleQuantize",(function(){return Rv})),e.d(r,"scaleThreshold",(function(){return zv})),e.d(r,"scaleTime",(function(){return g_})),e.d(r,"scaleUtc",(function(){return C_})),e.d(r,"scaleSequential",(function(){return O_})),e.d(r,"scaleSequentialLog",(function(){return N_})),e.d(r,"scaleSequentialPow",(function(){return R_})),e.d(r,"scaleSequentialSqrt",(function(){return z_})),e.d(r,"scaleSequentialSymlog",(function(){return j_})),e.d(r,"scaleSequentialQuantile",(function(){return P_})),e.d(r,"scaleDiverging",(function(){return I_})),e.d(r,"scaleDivergingLog",(function(){return F_})),e.d(r,"scaleDivergingPow",(function(){return B_})),e.d(r,"scaleDivergingSqrt",(function(){return U_})),e.d(r,"scaleDivergingSymlog",(function(){return D_})),e.d(r,"tickFormat",(function(){return fv})),e.d(r,"schemeCategory10",(function(){return V_})),e.d(r,"schemeAccent",(function(){return q_})),e.d(r,"schemeDark2",(function(){return H_})),e.d(r,"schemePaired",(function(){return $_})),e.d(r,"schemePastel1",(function(){return X_})),e.d(r,"schemePastel2",(function(){return G_})),e.d(r,"schemeSet1",(function(){return W_})),e.d(r,"schemeSet2",(function(){return Z_})),e.d(r,"schemeSet3",(function(){return K_})),e.d(r,"schemeTableau10",(function(){return Q_})),e.d(r,"interpolateBrBG",(function(){return nb})),e.d(r,"schemeBrBG",(function(){return tb})),e.d(r,"interpolatePRGn",(function(){return rb})),e.d(r,"schemePRGn",(function(){return eb})),e.d(r,"interpolatePiYG",(function(){return ob})),e.d(r,"schemePiYG",(function(){return ib})),e.d(r,"interpolatePuOr",(function(){return ab})),e.d(r,"schemePuOr",(function(){return ub})),e.d(r,"interpolateRdBu",(function(){return fb})),e.d(r,"schemeRdBu",(function(){return cb})),e.d(r,"interpolateRdGy",(function(){return lb})),e.d(r,"schemeRdGy",(function(){return sb})),e.d(r,"interpolateRdYlBu",(function(){return db})),e.d(r,"schemeRdYlBu",(function(){return hb})),e.d(r,"interpolateRdYlGn",(function(){return vb})),e.d(r,"schemeRdYlGn",(function(){return pb})),e.d(r,"interpolateSpectral",(function(){return gb})),e.d(r,"schemeSpectral",(function(){return yb})),e.d(r,"interpolateBuGn",(function(){return bb})),e.d(r,"schemeBuGn",(function(){return _b})),e.d(r,"interpolateBuPu",(function(){return xb})),e.d(r,"schemeBuPu",(function(){return mb})),e.d(r,"interpolateGnBu",(function(){return Mb})),e.d(r,"schemeGnBu",(function(){return wb})),e.d(r,"interpolateOrRd",(function(){return Sb})),e.d(r,"schemeOrRd",(function(){return Ab})),e.d(r,"interpolatePuBuGn",(function(){return Cb})),e.d(r,"schemePuBuGn",(function(){return kb})),e.d(r,"interpolatePuBu",(function(){return Tb})),e.d(r,"schemePuBu",(function(){return Eb})),e.d(r,"interpolatePuRd",(function(){return Nb})),e.d(r,"schemePuRd",(function(){return Ob})),e.d(r,"interpolateRdPu",(function(){return Rb})),e.d(r,"schemeRdPu",(function(){return jb})),e.d(r,"interpolateYlGnBu",(function(){return Pb})),e.d(r,"schemeYlGnBu",(function(){return zb})),e.d(r,"interpolateYlGn",(function(){return Ib})),e.d(r,"schemeYlGn",(function(){return Lb})),e.d(r,"interpolateYlOrBr",(function(){return Db})),e.d(r,"schemeYlOrBr",(function(){return Fb})),e.d(r,"interpolateYlOrRd",(function(){return Ub})),e.d(r,"schemeYlOrRd",(function(){return Bb})),e.d(r,"interpolateBlues",(function(){return Vb})),e.d(r,"schemeBlues",(function(){return Yb})),e.d(r,"interpolateGreens",(function(){return Hb})),e.d(r,"schemeGreens",(function(){return qb})),e.d(r,"interpolateGreys",(function(){return Xb})),e.d(r,"schemeGreys",(function(){return $b})),e.d(r,"interpolatePurples",(function(){return Wb})),e.d(r,"schemePurples",(function(){return Gb})),e.d(r,"interpolateReds",(function(){return Kb})),e.d(r,"schemeReds",(function(){return Zb})),e.d(r,"interpolateOranges",(function(){return Jb})),e.d(r,"schemeOranges",(function(){return Qb})),e.d(r,"interpolateCividis",(function(){return tm})),e.d(r,"interpolateCubehelixDefault",(function(){return nm})),e.d(r,"interpolateRainbow",(function(){return om})),e.d(r,"interpolateWarm",(function(){return em})),e.d(r,"interpolateCool",(function(){return rm})),e.d(r,"interpolateSinebow",(function(){return fm})),e.d(r,"interpolateTurbo",(function(){return sm})),e.d(r,"interpolateViridis",(function(){return hm})),e.d(r,"interpolateMagma",(function(){return dm})),e.d(r,"interpolateInferno",(function(){return pm})),e.d(r,"interpolatePlasma",(function(){return vm})),e.d(r,"create",(function(){return ym})),e.d(r,"creator",(function(){return an})),e.d(r,"local",(function(){return _m})),e.d(r,"matcher",(function(){return bt})),e.d(r,"mouse",(function(){return Le})),e.d(r,"namespace",(function(){return Ct})),e.d(r,"namespaces",(function(){return kt})),e.d(r,"clientPoint",(function(){return ze})),e.d(r,"select",(function(){return Cn})),e.d(r,"selectAll",(function(){return mm})),e.d(r,"selection",(function(){return kn})),e.d(r,"selector",(function(){return yt})),e.d(r,"selectorAll",(function(){return _t})),e.d(r,"style",(function(){return Ft})),e.d(r,"touch",(function(){return Pe})),e.d(r,"touches",(function(){return xm})),e.d(r,"window",(function(){return zt})),e.d(r,"event",(function(){return dn})),e.d(r,"customEvent",(function(){return bn})),e.d(r,"arc",(function(){return Ym})),e.d(r,"area",(function(){return Gm})),e.d(r,"line",(function(){return Xm})),e.d(r,"pie",(function(){return Km})),e.d(r,"areaRadial",(function(){return rx})),e.d(r,"radialArea",(function(){return rx})),e.d(r,"lineRadial",(function(){return ex})),e.d(r,"radialLine",(function(){return ex})),e.d(r,"pointRadial",(function(){return ix})),e.d(r,"linkHorizontal",(function(){return hx})),e.d(r,"linkVertical",(function(){return dx})),e.d(r,"linkRadial",(function(){return px})),e.d(r,"symbol",(function(){return jx})),e.d(r,"symbols",(function(){return Nx})),e.d(r,"symbolCircle",(function(){return vx})),e.d(r,"symbolCross",(function(){return yx})),e.d(r,"symbolDiamond",(function(){return bx})),e.d(r,"symbolSquare",(function(){return Ax})),e.d(r,"symbolStar",(function(){return Mx})),e.d(r,"symbolTriangle",(function(){return kx})),e.d(r,"symbolWye",(function(){return Ox})),e.d(r,"curveBasisClosed",(function(){return Fx})),e.d(r,"curveBasisOpen",(function(){return Bx})),e.d(r,"curveBasis",(function(){return Lx})),e.d(r,"curveBundle",(function(){return Yx})),e.d(r,"curveCardinalClosed",(function(){return Xx})),e.d(r,"curveCardinalOpen",(function(){return Wx})),e.d(r,"curveCardinal",(function(){return Hx})),e.d(r,"curveCatmullRomClosed",(function(){return tw})),e.d(r,"curveCatmullRomOpen",(function(){return ew})),e.d(r,"curveCatmullRom",(function(){return Qx})),e.d(r,"curveLinearClosed",(function(){return iw})),e.d(r,"curveLinear",(function(){return qm})),e.d(r,"curveMonotoneX",(function(){return hw})),e.d(r,"curveMonotoneY",(function(){return dw})),e.d(r,"curveNatural",(function(){return yw})),e.d(r,"curveStep",(function(){return _w})),e.d(r,"curveStepAfter",(function(){return mw})),e.d(r,"curveStepBefore",(function(){return bw})),e.d(r,"stack",(function(){return Aw})),e.d(r,"stackOffsetExpand",(function(){return Sw})),e.d(r,"stackOffsetDiverging",(function(){return kw})),e.d(r,"stackOffsetNone",(function(){return xw})),e.d(r,"stackOffsetSilhouette",(function(){return Cw})),e.d(r,"stackOffsetWiggle",(function(){return Ew})),e.d(r,"stackOrderAppearance",(function(){return Tw})),e.d(r,"stackOrderAscending",(function(){return Nw})),e.d(r,"stackOrderDescending",(function(){return Rw})),e.d(r,"stackOrderInsideOut",(function(){return zw})),e.d(r,"stackOrderNone",(function(){return ww})),e.d(r,"stackOrderReverse",(function(){return Pw})),e.d(r,"timeInterval",(function(){return Iv})),e.d(r,"timeMillisecond",(function(){return _y})),e.d(r,"timeMilliseconds",(function(){return by})),e.d(r,"utcMillisecond",(function(){return _y})),e.d(r,"utcMilliseconds",(function(){return by})),e.d(r,"timeSecond",(function(){return vy})),e.d(r,"timeSeconds",(function(){return yy})),e.d(r,"utcSecond",(function(){return vy})),e.d(r,"utcSeconds",(function(){return yy})),e.d(r,"timeMinute",(function(){return hy})),e.d(r,"timeMinutes",(function(){return dy})),e.d(r,"timeHour",(function(){return fy})),e.d(r,"timeHours",(function(){return sy})),e.d(r,"timeDay",(function(){return uy})),e.d(r,"timeDays",(function(){return ay})),e.d(r,"timeWeek",(function(){return Hv})),e.d(r,"timeWeeks",(function(){return Qv})),e.d(r,"timeSunday",(function(){return Hv})),e.d(r,"timeSundays",(function(){return Qv})),e.d(r,"timeMonday",(function(){return $v})),e.d(r,"timeMondays",(function(){return Jv})),e.d(r,"timeTuesday",(function(){return Xv})),e.d(r,"timeTuesdays",(function(){return ty})),e.d(r,"timeWednesday",(function(){return Gv})),e.d(r,"timeWednesdays",(function(){return ny})),e.d(r,"timeThursday",(function(){return Wv})),e.d(r,"timeThursdays",(function(){return ey})),e.d(r,"timeFriday",(function(){return Zv})),e.d(r,"timeFridays",(function(){return ry})),e.d(r,"timeSaturday",(function(){return Kv})),e.d(r,"timeSaturdays",(function(){return iy})),e.d(r,"timeMonth",(function(){return Yv})),e.d(r,"timeMonths",(function(){return Vv})),e.d(r,"timeYear",(function(){return Dv})),e.d(r,"timeYears",(function(){return Bv})),e.d(r,"utcMinute",(function(){return S_})),e.d(r,"utcMinutes",(function(){return k_})),e.d(r,"utcHour",(function(){return w_})),e.d(r,"utcHours",(function(){return M_})),e.d(r,"utcDay",(function(){return Ly})),e.d(r,"utcDays",(function(){return Iy})),e.d(r,"utcWeek",(function(){return xy})),e.d(r,"utcWeeks",(function(){return Ey})),e.d(r,"utcSunday",(function(){return xy})),e.d(r,"utcSundays",(function(){return Ey})),e.d(r,"utcMonday",(function(){return wy})),e.d(r,"utcMondays",(function(){return Ty})),e.d(r,"utcTuesday",(function(){return My})),e.d(r,"utcTuesdays",(function(){return Oy})),e.d(r,"utcWednesday",(function(){return Ay})),e.d(r,"utcWednesdays",(function(){return Ny})),e.d(r,"utcThursday",(function(){return Sy})),e.d(r,"utcThursdays",(function(){return jy})),e.d(r,"utcFriday",(function(){return ky})),e.d(r,"utcFridays",(function(){return Ry})),e.d(r,"utcSaturday",(function(){return Cy})),e.d(r,"utcSaturdays",(function(){return zy})),e.d(r,"utcMonth",(function(){return b_})),e.d(r,"utcMonths",(function(){return m_})),e.d(r,"utcYear",(function(){return Dy})),e.d(r,"utcYears",(function(){return By})),e.d(r,"timeFormatDefaultLocale",(function(){return d_})),e.d(r,"timeFormat",(function(){return $y})),e.d(r,"timeParse",(function(){return Xy})),e.d(r,"utcFormat",(function(){return Gy})),e.d(r,"utcParse",(function(){return Wy})),e.d(r,"timeFormatLocale",(function(){return qy})),e.d(r,"isoFormat",(function(){return Lw})),e.d(r,"isoParse",(function(){return Iw})),e.d(r,"now",(function(){return He})),e.d(r,"timer",(function(){return Ge})),e.d(r,"timerFlush",(function(){return We})),e.d(r,"timeout",(function(){return Je})),e.d(r,"interval",(function(){return Fw})),e.d(r,"transition",(function(){return Hr})),e.d(r,"active",(function(){return ti})),e.d(r,"interrupt",(function(){return sr})),e.d(r,"voronoi",(function(){return MM})),e.d(r,"zoom",(function(){return FM})),e.d(r,"zoomTransform",(function(){return EM})),e.d(r,"zoomIdentity",(function(){return CM}));var i,o=e(0);!function(t){t.STANDARD="Standard",t.CHARGE="Charge"}(i||(i={}));var u="5.16.0",a=function(t,n){return tn?1:t>=n?0:NaN},c=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return a(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)>0?i=o:r=o+1}return r}}};var f=c(a),s=f.right,l=f.left,h=s,d=function(t,n){null==n&&(n=p);for(var e=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);et?1:n>=t?0:NaN},g=function(t){return null===t?NaN:+t},_=function(t,n){var e,r,i=t.length,o=0,u=-1,a=0,c=0;if(null==n)for(;++u1)return c/(o-1)},b=function(t,n){var e=_(t,n);return e?Math.sqrt(e):e},m=function(t,n){var e,r,i,o=t.length,u=-1;if(null==n){for(;++u=e)for(r=i=e;++ue&&(r=e),i=e)for(r=i=e;++ue&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/u),n=Math.floor(n/u),o=new Array(i=Math.ceil(n-t+1));++a=0?(o>=C?10:o>=E?5:o>=T?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=C?10:o>=E?5:o>=T?2:1)}function j(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=C?i*=10:o>=E?i*=5:o>=T&&(i*=2),ns;)l.pop(),--d;var p,v=new Array(d+1);for(i=0;i<=d;++i)(p=v[i]=[]).x0=i>0?l[i-1]:f,p.x1=i=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),u=+e(t[o],o,t);return u+(+e(t[o+1],o+1,t)-u)*(i-o)}},L=function(t,n,e){return t=M.call(t,g).sort(a),Math.ceil((e-n)/(2*(P(t,.75)-P(t,.25))*Math.pow(t.length,-1/3)))},I=function(t,n,e){return Math.ceil((e-n)/(3.5*b(t)*Math.pow(t.length,-1/3)))},F=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++or&&(r=e)}else for(;++o=e)for(r=e;++or&&(r=e);return r},D=function(t,n){var e,r=t.length,i=r,o=-1,u=0;if(null==n)for(;++o=0;)for(n=(r=t[i]).length;--n>=0;)e[--u]=r[n];return e},Y=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++oe&&(r=e)}else for(;++o=e)for(r=e;++oe&&(r=e);return r},V=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},q=function(t,n){if(e=t.length){var e,r,i=0,o=0,u=t[o];for(null==n&&(n=a);++i=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 ht(t,n){for(var e,r=0,i=t.length;r0)for(var e,r,i=new Array(e),o=0;on?1:t>=n?0:NaN}var St="http://www.w3.org/1999/xhtml",kt={svg:"http://www.w3.org/2000/svg",xhtml:St,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ct=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),kt.hasOwnProperty(n)?{space:kt[n],local:t}:t};function Et(t){return function(){this.removeAttribute(t)}}function Tt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ot(t,n){return function(){this.setAttribute(t,n)}}function Nt(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function jt(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function Rt(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 zt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Pt(t){return function(){this.style.removeProperty(t)}}function Lt(t,n,e){return function(){this.style.setProperty(t,n,e)}}function It(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function Ft(t,n){return t.style.getPropertyValue(n)||zt(t).getComputedStyle(t,null).getPropertyValue(n)}function Dt(t){return function(){delete this[t]}}function Bt(t,n){return function(){this[t]=n}}function Ut(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function Yt(t){return t.trim().split(/^|\s+/)}function Vt(t){return t.classList||new qt(t)}function qt(t){this._node=t,this._names=Yt(t.getAttribute("class")||"")}function Ht(t,n){for(var e=Vt(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 Zt(){this.textContent=""}function Kt(t){return function(){this.textContent=t}}function Qt(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Jt(){this.innerHTML=""}function tn(t){return function(){this.innerHTML=t}}function nn(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function en(){this.nextSibling&&this.parentNode.appendChild(this)}function rn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function on(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===St&&n.documentElement.namespaceURI===St?n.createElement(t):n.createElementNS(e,t)}}function un(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var an=function(t){var n=Ct(t);return(n.local?un:on)(n)};function cn(){return null}function fn(){var t=this.parentNode;t&&t.removeChild(this)}function sn(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function ln(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}var hn={},dn=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(hn={mouseenter:"mouseover",mouseleave:"mouseout"}));function pn(t,n,e){return t=vn(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function vn(t,n,e){return function(r){var i=dn;dn=r;try{t.call(this,this.__data__,n,e)}finally{dn=i}}}function yn(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 gn(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r=x&&(x=m+1);!(b=g[x])&&++x=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=At);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?Pt:"function"==typeof n?It:Lt)(t,n,null==e?"":e)):Ft(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?Dt:"function"==typeof n?Ut:Bt)(t,n)):this.node()[t]},classed:function(t,n){var e=Yt(t+"");if(arguments.length<2){for(var r=Vt(this.node()),i=-1,o=e.length;++i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?Zn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?Zn(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=Dn.exec(t))?new Jn(n[1],n[2],n[3],1):(n=Bn.exec(t))?new Jn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Un.exec(t))?Zn(n[1],n[2],n[3],n[4]):(n=Yn.exec(t))?Zn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Vn.exec(t))?re(n[1],n[2]/100,n[3]/100,1):(n=qn.exec(t))?re(n[1],n[2]/100,n[3]/100,n[4]):Hn.hasOwnProperty(t)?Wn(Hn[t]):"transparent"===t?new Jn(NaN,NaN,NaN,0):null}function Wn(t){return new Jn(t>>16&255,t>>8&255,255&t,1)}function Zn(t,n,e,r){return r<=0&&(t=n=e=NaN),new Jn(t,n,e,r)}function Kn(t){return t instanceof zn||(t=Gn(t)),t?new Jn((t=t.rgb()).r,t.g,t.b,t.opacity):new Jn}function Qn(t,n,e,r){return 1===arguments.length?Kn(t):new Jn(t,n,e,null==r?1:r)}function Jn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function te(){return"#"+ee(this.r)+ee(this.g)+ee(this.b)}function ne(){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 ee(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function re(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new ue(t,n,e,r)}function ie(t){if(t instanceof ue)return new ue(t.h,t.s,t.l,t.opacity);if(t instanceof zn||(t=Gn(t)),!t)return new ue;if(t instanceof ue)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,c=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e0&&c<1?0:u,new ue(u,a,c,t.opacity)}function oe(t,n,e,r){return 1===arguments.length?ie(t):new ue(t,n,e,null==r?1:r)}function ue(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function ae(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function ce(t,n,e,r,i){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*e+(1+3*t+3*o-3*u)*r+u*i)/6}jn(zn,Gn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:$n,formatHex:$n,formatHsl:function(){return ie(this).formatHsl()},formatRgb:Xn,toString:Xn}),jn(Jn,Qn,Rn(zn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Jn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Jn(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:te,formatHex:te,formatRgb:ne,toString:ne})),jn(ue,oe,Rn(zn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ue(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ue(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 Jn(ae(t>=240?t-240:t+120,i,r),ae(t,i,r),ae(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+")")}}));var fe=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],u=r>0?t[r-1]:2*i-o,a=r180||e<-180?e-360*Math.round(e/360):e):le(isNaN(t)?n:t)}function pe(t){return 1==(t=+t)?ve: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):le(isNaN(n)?e:n)}}function ve(t,n){var e=n-t;return e?he(t,e):le(isNaN(t)?n:t)}var ye=function t(n){var e=pe(n);function r(t,n){var r=e((t=Qn(t)).r,(n=Qn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=ve(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}return r.gamma=t,r}(1);function ge(t){return function(n){var e,r,i=n.length,o=new Array(i),u=new Array(i),a=new Array(i);for(e=0;eo&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,c.push({i:u,x:Se(e,r)})),o=Ee.lastIndex;return o=0&&n._call.call(null,t),n=n._next;--Ie}function Ze(){Ue=(Be=Ve.now())+Ye,Ie=Fe=0;try{We()}finally{Ie=0,function(){var t,n,e=Te,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Te=n);Oe=t,Qe(r)}(),Ue=0}}function Ke(){var t=Ve.now(),n=t-Be;n>1e3&&(Ye-=n,Be=t)}function Qe(t){Ie||(Fe&&(Fe=clearTimeout(Fe)),t-Ue>24?(t<1/0&&(Fe=setTimeout(Ze,t-Ve.now()-Ye)),De&&(De=clearInterval(De))):(De||(Be=Ve.now(),De=setInterval(Ke,1e3)),Ie=1,qe(Ze)))}Xe.prototype=Ge.prototype={constructor:Xe,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?He():+e)+(null==n?0:+n),this._next||Oe===this||(Oe?Oe._next=this:Te=this,Oe=this),this._call=t,this._time=e,Qe()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qe())}};var Je=function(t,n,e){var r=new Xe;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},tr=pt("start","end","cancel","interrupt"),nr=[],er=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(c){var f,s,l,h;if(1!==e.state)return a();for(f in i)if((h=i[f]).name===e.name){if(3===h.state)return Je(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+f0)throw new Error("too late; already scheduled");return e}function ir(t,n){var e=or(t,n);if(e.state>3)throw new Error("too late; already running");return e}function or(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var ur,ar,cr,fr,sr=function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[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 o[i]):u=!1;u&&delete t.__transition}},lr=180/Math.PI,hr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},dr=function(t,n,e,r,i,o){var u,a,c;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,c/=a),t*r180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Se(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Se(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,c),function(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:Se(t,e)},{i:a-2,x:Se(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,c),o=u=null,function(t){for(var n,e=-1,r=c.length;++e=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?rr:ir;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}var Ir=kn.prototype.constructor;function Fr(t){return function(){this.style.removeProperty(t)}}function Dr(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Br(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&Dr(t,o,e)),r}return o._value=n,o}function Ur(t){return function(n){this.textContent=t.call(this,n)}}function Yr(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&Ur(r)),n}return r._value=t,r}var Vr=0;function qr(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Hr(t){return kn().transition(t)}function $r(){return++Vr}var Xr=kn.prototype;function Gr(t){return t*t*t}function Wr(t){return--t*t*t+1}function Zr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}qr.prototype=Hr.prototype={constructor:qr,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=yt(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u1&&e.name===n)return new qr([[t]],Jr,n,+r);return null},ni=function(t){return function(){return t}},ei=function(t,n,e){this.target=t,this.type=n,this.selection=e};function ri(){dn.stopImmediatePropagation()}var ii=function(){dn.preventDefault(),dn.stopImmediatePropagation()},oi={name:"drag"},ui={name:"space"},ai={name:"handle"},ci={name:"center"};function fi(t){return[+t[0],+t[1]]}function si(t){return[fi(t[0]),fi(t[1])]}function li(t){return function(n){return Pe(n,dn.touches,t)}}var hi={name:"x",handles:["w","e"].map(mi),input:function(t,n){return null==t?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},di={name:"y",handles:["n","s"].map(mi),input:function(t,n){return null==t?null:[[n[0][0],+t[0]],[n[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},pi={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(mi),input:function(t){return null==t?null:si(t)},output:function(t){return t}},vi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},yi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},gi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},_i={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},bi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function mi(t){return{type:t}}function xi(){return!dn.ctrlKey&&!dn.button}function wi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Mi(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ai(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Si(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function ki(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Ci(){return Oi(hi)}function Ei(){return Oi(di)}var Ti=function(){return Oi(pi)};function Oi(t){var n,e=wi,r=xi,i=Mi,o=!0,u=pt("start","brush","end"),a=6;function c(n){var e=n.property("__brush",v).selectAll(".overlay").data([mi("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",vi.overlay).merge(e).each((function(){var t=Ai(this).extent;Cn(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),n.selectAll(".selection").data([mi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",vi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return vi[t.type]})),n.each(f).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(){var t=Cn(this),n=Ai(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-a/2:n[0][0]-a/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-a/2:n[0][1]-a/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+a:a})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+a:a}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function s(t,n,e){var r=t.__brush.emitter;return!r||e&&r.clean?new l(t,n,e):r}function l(t,n,e){this.that=t,this.args=n,this.state=t.__brush,this.active=0,this.clean=e}function h(){if((!n||dn.touches)&&r.apply(this,arguments)){var e,i,u,a,c,l,h,d,p,v,y,g=this,_=dn.target.__data__.type,b="selection"===(o&&dn.metaKey?_="overlay":_)?oi:o&&dn.altKey?ci:ai,m=t===di?null:_i[_],x=t===hi?null:bi[_],w=Ai(g),M=w.extent,A=w.selection,S=M[0][0],k=M[0][1],C=M[1][0],E=M[1][1],T=0,O=0,N=m&&x&&o&&dn.shiftKey,j=dn.touches?li(dn.changedTouches[0].identifier):Le,R=j(g),z=R,P=s(g,arguments,!0).beforestart();"overlay"===_?(A&&(p=!0),w.selection=A=[[e=t===di?S:R[0],u=t===hi?k:R[1]],[c=t===di?C:e,h=t===hi?E:u]]):(e=A[0][0],u=A[0][1],c=A[1][0],h=A[1][1]),i=e,a=u,l=c,d=h;var L=Cn(g).attr("pointer-events","none"),I=L.selectAll(".overlay").attr("cursor",vi[_]);if(dn.touches)P.moved=D,P.ended=U;else{var F=Cn(dn.view).on("mousemove.brush",D,!0).on("mouseup.brush",U,!0);o&&F.on("keydown.brush",Y,!0).on("keyup.brush",V,!0),On(dn.view)}ri(),sr(g),f.call(g),P.start()}function D(){var t=j(g);!N||v||y||(Math.abs(t[0]-z[0])>Math.abs(t[1]-z[1])?y=!0:v=!0),z=t,p=!0,ii(),B()}function B(){var t;switch(T=z[0]-R[0],O=z[1]-R[1],b){case ui:case oi:m&&(T=Math.max(S-e,Math.min(C-c,T)),i=e+T,l=c+T),x&&(O=Math.max(k-u,Math.min(E-h,O)),a=u+O,d=h+O);break;case ai:m<0?(T=Math.max(S-e,Math.min(C-e,T)),i=e+T,l=c):m>0&&(T=Math.max(S-c,Math.min(C-c,T)),i=e,l=c+T),x<0?(O=Math.max(k-u,Math.min(E-u,O)),a=u+O,d=h):x>0&&(O=Math.max(k-h,Math.min(E-h,O)),a=u,d=h+O);break;case ci:m&&(i=Math.max(S,Math.min(C,e-T*m)),l=Math.max(S,Math.min(C,c+T*m))),x&&(a=Math.max(k,Math.min(E,u-O*x)),d=Math.max(k,Math.min(E,h+O*x)))}l0&&(e=i-T),x<0?h=d-O:x>0&&(u=a-O),b=ui,I.attr("cursor",vi.selection),B());break;default:return}ii()}function V(){switch(dn.keyCode){case 16:N&&(v=y=N=!1,B());break;case 18:b===ci&&(m<0?c=l:m>0&&(e=i),x<0?h=d:x>0&&(u=a),b=ai,B());break;case 32:b===ui&&(dn.altKey?(m&&(c=l-T*m,e=i+T*m),x&&(h=d-O*x,u=a+O*x),b=ci):(m<0?c=l:m>0&&(e=i),x<0?h=d:x>0&&(u=a),b=ai),I.attr("cursor",vi[_]),B());break;default:return}ii()}}function d(){s(this,arguments).moved()}function p(){s(this,arguments).ended()}function v(){var n=this.__brush||{selection:null};return n.extent=si(e.apply(this,arguments)),n.dim=t,n}return c.move=function(n,e){n.selection?n.on("start.brush",(function(){s(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){s(this,arguments).end()})).tween("brush",(function(){var n=this,r=n.__brush,i=s(n,arguments),o=r.selection,u=t.input("function"==typeof e?e.apply(this,arguments):e,r.extent),a=je(o,u);function c(t){r.selection=1===t&&null===u?null:a(t),f.call(n),i.brush()}return null!==o&&null!==u?c:c(1)})):n.each((function(){var n=this,r=arguments,i=n.__brush,o=t.input("function"==typeof e?e.apply(n,r):e,i.extent),u=s(n,r).beforestart();sr(n),i.selection=null===o?null:o,f.call(n),u.start().brush().end()}))},c.clear=function(t){c.move(t,null)},l.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(n){bn(new ei(c,n,t.output(this.state.selection)),u.apply,u,[n,this.that,this.args])}},c.extent=function(t){return arguments.length?(e="function"==typeof t?t:ni(si(t)),c):e},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:ni(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:ni(!!t),c):i},c.handleSize=function(t){return arguments.length?(a=+t,c):a},c.keyModifiers=function(t){return arguments.length?(o=!!t,c):o},c.on=function(){var t=u.on.apply(u,arguments);return t===u?c:t},c}var Ni=Math.cos,ji=Math.sin,Ri=Math.PI,zi=Ri/2,Pi=2*Ri,Li=Math.max;function Ii(t){return function(n,e){return t(n.source.value+n.target.value,e.source.value+e.target.value)}}var Fi=function(){var t=0,n=null,e=null,r=null;function i(i){var o,u,a,c,f,s,l=i.length,h=[],d=k(l),p=[],v=[],y=v.groups=new Array(l),g=new Array(l*l);for(o=0,f=-1;++f1e-6)if(Math.abs(s*a-c*f)>1e-6&&i){var h=e-o,d=r-u,p=a*a+c*c,v=h*h+d*d,y=Math.sqrt(p),g=Math.sqrt(l),_=i*Math.tan((Ui-Math.acos((p+l-v)/(2*y*g)))/2),b=_/g,m=_/y;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*f)+","+(n+b*s)),this._+="A"+i+","+i+",0,0,"+ +(s*h>f*d)+","+(this._x1=t+m*a)+","+(this._y1=n+m*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n,o=!!o;var u=(e=+e)*Math.cos(r),a=e*Math.sin(r),c=t+u,f=n+a,s=1^o,l=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+f:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+c+","+f),e&&(l<0&&(l=l%Yi+Yi),l>Vi?this._+="A"+e+","+e+",0,1,"+s+","+(t-u)+","+(n-a)+"A"+e+","+e+",0,1,"+s+","+(this._x1=c)+","+(this._y1=f):l>1e-6&&(this._+="A"+e+","+e+",0,"+ +(l>=Ui)+","+s+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},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 $i=Hi;function Xi(t){return t.source}function Gi(t){return t.target}function Wi(t){return t.radius}function Zi(t){return t.startAngle}function Ki(t){return t.endAngle}var Qi=function(){var t=Xi,n=Gi,e=Wi,r=Zi,i=Ki,o=null;function u(){var u,a=Di.call(arguments),c=t.apply(this,a),f=n.apply(this,a),s=+e.apply(this,(a[0]=c,a)),l=r.apply(this,a)-zi,h=i.apply(this,a)-zi,d=s*Ni(l),p=s*ji(l),v=+e.apply(this,(a[0]=f,a)),y=r.apply(this,a)-zi,g=i.apply(this,a)-zi;if(o||(o=u=$i()),o.moveTo(d,p),o.arc(0,0,s,l,h),l===y&&h===g||(o.quadraticCurveTo(0,0,v*Ni(y),v*ji(y)),o.arc(0,0,v,y,g)),o.quadraticCurveTo(0,0,d,p),o.closePath(),u)return o=null,u+""||null}return u.radius=function(t){return arguments.length?(e="function"==typeof t?t:Bi(+t),u):e},u.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Bi(+t),u):r},u.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Bi(+t),u):i},u.source=function(n){return arguments.length?(t=n,u):t},u.target=function(t){return arguments.length?(n=t,u):n},u.context=function(t){return arguments.length?(o=null==t?null:t,u):o},u};function Ji(){}function to(t,n){var e=new Ji;if(t instanceof Ji)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var c,f,s,l=-1,h=e.length,d=r[i++],p=no(),v=u();++lr.length)return e;var u,a=i[o-1];return null!=n&&o>=r.length?u=e.entries():(u=[],e.each((function(n,e){u.push({key:e,values:t(n,o)})}))),null!=a?u.sort((function(t,n){return a(t.key,n.key)})):u}(o(t,0,oo,uo),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}};function ro(){return{}}function io(t,n,e){t[n]=e}function oo(){return no()}function uo(t,n,e){t.set(n,e)}function ao(){}var co=no.prototype;function fo(t,n){var e=new ao;if(t instanceof ao)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r6/29*(6/29)*(6/29)?Math.pow(t,1/3):t/(6/29*3*(6/29))+4/29}function wo(t){return t>6/29?t*t*t:6/29*3*(6/29)*(t-4/29)}function Mo(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ao(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function So(t){if(t instanceof Eo)return new Eo(t.h,t.c,t.l,t.opacity);if(t instanceof mo||(t=go(t)),0===t.a&&0===t.b)return new Eo(NaN,0r!=d>r&&e<(h-f)*(r-s)/(d-s)+f&&(i=-i)}return i}function Yo(t,n,e){var r,i,o,u;return function(t,n,e){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])}(t,n,e)&&(i=t[r=+(t[0]===n[0])],o=e[r],u=n[r],i<=o&&o<=u||u<=o&&o<=i)}var Vo=function(){},qo=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],Ho=function(){var t=1,n=1,e=R,r=a;function i(t){var n=e(t);if(Array.isArray(n))n=n.slice().sort(Fo);else{var r=m(t),i=r[0],u=r[1];n=j(i,u,n),n=k(Math.floor(i/n)*n,Math.floor(u/n)*n,n)}return n.map((function(n){return o(t,n)}))}function o(e,i){var o=[],a=[];return function(e,r,i){var o,a,c,f,s,l,h=new Array,d=new Array;o=a=-1,f=e[0]>=r,qo[f<<1].forEach(p);for(;++o=r,qo[c|f<<1].forEach(p);qo[f<<0].forEach(p);for(;++a=r,s=e[a*t]>=r,qo[f<<1|s<<2].forEach(p);++o=r,l=s,s=e[a*t+o+1]>=r,qo[c|f<<1|s<<2|l<<3].forEach(p);qo[f|s<<3].forEach(p)}o=-1,s=e[a*t]>=r,qo[s<<2].forEach(p);for(;++o=r,qo[s<<2|l<<3].forEach(p);function p(t){var n,e,r=[t[0][0]+o,t[0][1]+a],c=[t[1][0]+o,t[1][1]+a],f=u(r),s=u(c);(n=d[f])?(e=h[s])?(delete d[n.end],delete h[e.start],n===e?(n.ring.push(c),i(n.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[n.end],n.ring.push(c),d[n.end=s]=n):(n=h[s])?(e=d[f])?(delete h[n.start],delete d[e.end],n===e?(n.ring.push(c),i(n.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[n.start],n.ring.unshift(r),h[n.start=f]=n):h[f]=d[s]={start:f,end:s,ring:[r,c]}}qo[s<<3].forEach(p)}(e,i,(function(t){r(t,e,i),function(t){for(var n=0,e=t.length,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++n0?o.push([t]):a.push(t)})),a.forEach((function(t){for(var n,e=0,r=o.length;e0&&u0&&a0&&o>0))throw new Error("invalid size");return t=r,n=o,i},i.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?Do(Io.call(t)):Do(t),i):e},i.smooth=function(t){return arguments.length?(r=t?a:Vo,i):r===a},i};function $o(t,n,e){for(var r=t.width,i=t.height,o=1+(e<<1),u=0;u=e&&(a>=o&&(c-=t.data[a-o+u*r]),n.data[a-e+u*r]=c/Math.min(a+1,r-1+o-a,o))}function Xo(t,n,e){for(var r=t.width,i=t.height,o=1+(e<<1),u=0;u=e&&(a>=o&&(c-=t.data[u+(a-o)*r]),n.data[u+(a-e)*r]=c/Math.min(a+1,i-1+o-a,o))}function Go(t){return t[0]}function Wo(t){return t[1]}function Zo(){return 1}var Ko=function(){var t=Go,n=Wo,e=Zo,r=960,i=500,o=20,u=2,a=3*o,c=r+2*a>>u,f=i+2*a>>u,s=Do(20);function l(r){var i=new Float32Array(c*f),l=new Float32Array(c*f);r.forEach((function(r,o,s){var l=+t(r,o,s)+a>>u,h=+n(r,o,s)+a>>u,d=+e(r,o,s);l>=0&&l=0&&h>u),Xo({width:c,height:f,data:l},{width:c,height:f,data:i},o>>u),$o({width:c,height:f,data:i},{width:c,height:f,data:l},o>>u),Xo({width:c,height:f,data:l},{width:c,height:f,data:i},o>>u),$o({width:c,height:f,data:i},{width:c,height:f,data:l},o>>u),Xo({width:c,height:f,data:l},{width:c,height:f,data:i},o>>u);var d=s(i);if(!Array.isArray(d)){var p=F(i);d=j(0,p,d),(d=k(0,Math.floor(p/d)*d,d)).shift()}return Ho().thresholds(d).size([c,f])(i).map(h)}function h(t){return t.value*=Math.pow(2,-2*u),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(v)}function v(t){t[0]=t[0]*Math.pow(2,u)-a,t[1]=t[1]*Math.pow(2,u)-a}function y(){return c=r+2*(a=3*o)>>u,f=i+2*a>>u,l}return l.x=function(n){return arguments.length?(t="function"==typeof n?n:Do(+n),l):t},l.y=function(t){return arguments.length?(n="function"==typeof t?t:Do(+t),l):n},l.weight=function(t){return arguments.length?(e="function"==typeof t?t:Do(+t),l):e},l.size=function(t){if(!arguments.length)return[r,i];var n=Math.ceil(t[0]),e=Math.ceil(t[1]);if(!(n>=0||n>=0))throw new Error("invalid size");return r=n,i=e,y()},l.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return u=Math.floor(Math.log(t)/Math.LN2),y()},l.thresholds=function(t){return arguments.length?(s="function"==typeof t?t:Array.isArray(t)?Do(Io.call(t)):Do(t),l):s},l.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},l},Qo=function(t){return function(){return t}};function Jo(t,n,e,r,i,o,u,a,c,f){this.target=t,this.type=n,this.subject=e,this.identifier=r,this.active=i,this.x=o,this.y=u,this.dx=a,this.dy=c,this._=f}function tu(){return!dn.ctrlKey&&!dn.button}function nu(){return this.parentNode}function eu(t){return null==t?{x:dn.x,y:dn.y}:t}function ru(){return navigator.maxTouchPoints||"ontouchstart"in this}Jo.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var iu=function(){var t,n,e,r,i=tu,o=nu,u=eu,a=ru,c={},f=pt("start","drag","end"),s=0,l=0;function h(t){t.on("mousedown.drag",d).filter(a).on("touchstart.drag",y).on("touchmove.drag",g).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var u=b("mouse",o.apply(this,arguments),Le,this,arguments);u&&(Cn(dn.view).on("mousemove.drag",p,!0).on("mouseup.drag",v,!0),On(dn.view),En(),e=!1,t=dn.clientX,n=dn.clientY,u("start"))}}function p(){if(Tn(),!e){var r=dn.clientX-t,i=dn.clientY-n;e=r*r+i*i>l}c.mouse("drag")}function v(){Cn(dn.view).on("mousemove.drag mouseup.drag",null),Nn(dn.view,e),Tn(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var t,n,e=dn.changedTouches,r=o.apply(this,arguments),u=e.length;for(t=0;t9999?"+"+fu(n,6):fu(n,4))+"-"+fu(t.getUTCMonth()+1,2)+"-"+fu(t.getUTCDate(),2)+(o?"T"+fu(e,2)+":"+fu(r,2)+":"+fu(i,2)+"."+fu(o,3)+"Z":i?"T"+fu(e,2)+":"+fu(r,2)+":"+fu(i,2)+"Z":r||e?"T"+fu(e,2)+":"+fu(r,2)+"Z":"")}var lu=function(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,u=0,a=0,c=o<=0,f=!1;function s(){if(c)return uu;if(f)return f=!1,ou;var n,r,i=u;if(34===t.charCodeAt(i)){for(;u++=o?c=!0:10===(r=t.charCodeAt(u++))?f=!0:13===r&&(f=!0,10===t.charCodeAt(u)&&++u),t.slice(i+1,n-1).replace(/""/g,'"')}for(;u=(o=(v+g)/2))?v=o:g=o,(s=e>=(u=(y+_)/2))?y=u:_=u,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(a=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===a&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(o=(v+g)/2))?v=o:g=o,(s=e>=(u=(y+_)/2))?y=u:_=u}while((l=s<<1|f)==(h=(c>=u)<<1|a>=o));return i[h]=d,i[l]=p,t}var ka=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function Ca(t){return t[0]}function Ea(t){return t[1]}function Ta(t,n,e){var r=new Oa(null==n?Ca:n,null==e?Ea:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Oa(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Na(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var ja=Ta.prototype=Oa.prototype;function Ra(t){return t.x+t.vx}function za(t){return t.y+t.vy}ja.copy=function(){var t,n,e=new Oa(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Na(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Na(n));return e},ja.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return Sa(this.cover(n,e),n,e,t)},ja.addAll=function(t){var n,e,r,i,o=t.length,u=new Array(o),a=new Array(o),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;es&&(s=r),il&&(l=i));if(c>s||f>l)return this;for(this.cover(c,f).cover(s,l),e=0;et||t>=i||r>n||n>=o;)switch(a=(nh||(o=c.y0)>d||(u=c.x1)=g)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,v.data),b=n-+this._y.call(null,v.data),m=_*_+b*b;if(m=(a=(p+y)/2))?p=a:y=a,(s=u>=(c=(v+g)/2))?v=c:g=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},ja.removeAll=function(t){for(var n=0,e=t.length;nc+d||if+d||oa.index){var p=c-u.x-u.vx,v=f-u.y-u.vy,y=p*p+v*v;yt.r&&(t.r=t[n].r)}function a(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r1?(null==e?a.remove(t):a.set(t,d(e)),n):a.get(t)},find:function(n,e,r){var i,o,u,a,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(t,e),n):f.on(t)}}},Va=function(){var t,n,e,r,i=Ma(-30),o=1,u=1/0,a=.81;function c(r){var i,o=t.length,u=Ta(t,Da,Ba).visitAfter(s);for(e=r,i=0;i=u)){(t.data!==n||t.next)&&(0===s&&(d+=(s=Aa())*s),0===l&&(d+=(l=Aa())*l),d1?r[0]+r.slice(2):r,+t.slice(e+1)]}var Ga=function(t){return(t=Xa(Math.abs(t)))?t[1]:NaN},Wa=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Za(t){if(!(n=Wa.exec(t)))throw new Error("invalid format: "+t);var n;return new Ka({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 Ka(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+""}Za.prototype=Ka.prototype,Ka.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};var Qa,Ja,tc,nc,ec=function(t,n){var e=Xa(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")},rc={"%":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.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):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 ec(100*t,n)},r:ec,s:function(t,n){var e=Xa(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Qa=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return o===u?r:o>u?r+new Array(o-u+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Xa(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},ic=function(t){return t},oc=Array.prototype.map,uc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],ac=function(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?ic:(n=oc.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],u=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[u=(u+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?ic:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(oc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",f=void 0===t.minus?"-":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function l(t){var n=(t=Za(t)).fill,e=t.align,l=t.sign,h=t.symbol,d=t.zero,p=t.width,v=t.comma,y=t.precision,g=t.trim,_=t.type;"n"===_?(v=!0,_="g"):rc[_]||(void 0===y&&(y=12),g=!0,_="g"),(d||"0"===n&&"="===e)&&(d=!0,n="0",e="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",m="$"===h?o:/[%p]/.test(_)?c:"",x=rc[_],w=/[defgprs%]/.test(_);function M(t){var i,o,c,h=b,M=m;if("c"===_)M=x(t)+M,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:x(Math.abs(t),y),g&&(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)),A&&0==+t&&"+"!==l&&(A=!1),h=(A?"("===l?l:f:"-"===l||"("===l?"":l)+h,M=("s"===_?uc[8+Qa/3]:"")+M+(A&&"("===l?")":""),w)for(i=-1,o=t.length;++i(c=t.charCodeAt(i))||c>57){M=(46===c?u+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}v&&!d&&(t=r(t,1/0));var S=h.length+t.length+M.length,k=S>1)+h+t+M+k.slice(S);break;default:t=k+h+t+M}return a(t)}return y=void 0===y?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),M.toString=function(){return t+""},M}return{format:l,formatPrefix:function(t,n){var e=l(((t=Za(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ga(n)/3))),i=Math.pow(10,-r),o=uc[8+r/3];return function(t){return e(i*t)+o}}}};function cc(t){return Ja=ac(t),tc=Ja.format,nc=Ja.formatPrefix,Ja}cc({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var fc=function(t){return Math.max(0,-Ga(Math.abs(t)))},sc=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ga(n)/3)))-Ga(Math.abs(t)))},lc=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Ga(n)-Ga(t))+1},hc=function(){return new dc};function dc(){this.reset()}dc.prototype={constructor:dc,reset:function(){this.s=this.t=0},add:function(t){vc(pc,t,this.t),vc(this,pc.s,this.s),this.s?this.t+=pc.t:this.s=pc.t},valueOf:function(){return this.s}};var pc=new dc;function vc(t,n,e){var r=t.s=n+e,i=r-n,o=r-i;t.t=n-o+(e-i)}var yc=Math.PI,gc=yc/2,_c=yc/4,bc=2*yc,mc=180/yc,xc=yc/180,wc=Math.abs,Mc=Math.atan,Ac=Math.atan2,Sc=Math.cos,kc=Math.ceil,Cc=Math.exp,Ec=(Math.floor,Math.log),Tc=Math.pow,Oc=Math.sin,Nc=Math.sign||function(t){return t>0?1:t<0?-1:0},jc=Math.sqrt,Rc=Math.tan;function zc(t){return t>1?0:t<-1?yc:Math.acos(t)}function Pc(t){return t>1?gc:t<-1?-gc:Math.asin(t)}function Lc(t){return(t=Oc(t/2))*t}function Ic(){}function Fc(t,n){t&&Bc.hasOwnProperty(t.type)&&Bc[t.type](t,n)}var Dc={Feature:function(t,n){Fc(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,o=Sc(n=(n*=xc)/2+_c),u=Oc(n),a=Xc*u,c=$c*o+a*Sc(i),f=a*r*Oc(i);Wc.add(Ac(f,c)),Hc=t,$c=o,Xc=u}var ef=function(t){return Zc.reset(),Gc(t,Kc),2*Zc};function rf(t){return[Ac(t[1],t[0]),Pc(t[2])]}function of(t){var n=t[0],e=t[1],r=Sc(e);return[r*Sc(n),r*Oc(n),Oc(e)]}function uf(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function af(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function cf(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function ff(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function sf(t){var n=jc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var lf,hf,df,pf,vf,yf,gf,_f,bf,mf,xf=hc(),wf={point:Mf,lineStart:Sf,lineEnd:kf,polygonStart:function(){wf.point=Cf,wf.lineStart=Ef,wf.lineEnd=Tf,xf.reset(),Kc.polygonStart()},polygonEnd:function(){Kc.polygonEnd(),wf.point=Mf,wf.lineStart=Sf,wf.lineEnd=kf,Wc<0?(lf=-(df=180),hf=-(pf=90)):xf>1e-6?pf=90:xf<-1e-6&&(hf=-90),mf[0]=lf,mf[1]=df},sphere:function(){lf=-(df=180),hf=-(pf=90)}};function Mf(t,n){bf.push(mf=[lf=t,df=t]),npf&&(pf=n)}function Af(t,n){var e=of([t*xc,n*xc]);if(_f){var r=af(_f,e),i=af([r[1],-r[0],0],r);sf(i),i=rf(i);var o,u=t-vf,a=u>0?1:-1,c=i[0]*mc*a,f=wc(u)>180;f^(a*vfpf&&(pf=o):f^(a*vf<(c=(c+360)%360-180)&&cpf&&(pf=n)),f?tOf(lf,df)&&(df=t):Of(t,df)>Of(lf,df)&&(lf=t):df>=lf?(tdf&&(df=t)):t>vf?Of(lf,t)>Of(lf,df)&&(df=t):Of(t,df)>Of(lf,df)&&(lf=t)}else bf.push(mf=[lf=t,df=t]);npf&&(pf=n),_f=e,vf=t}function Sf(){wf.point=Af}function kf(){mf[0]=lf,mf[1]=df,wf.point=Mf,_f=null}function Cf(t,n){if(_f){var e=t-vf;xf.add(wc(e)>180?e+(e>0?360:-360):e)}else yf=t,gf=n;Kc.point(t,n),Af(t,n)}function Ef(){Kc.lineStart()}function Tf(){Cf(yf,gf),Kc.lineEnd(),wc(xf)>1e-6&&(lf=-(df=180)),mf[0]=lf,mf[1]=df,_f=null}function Of(t,n){return(n-=t)<0?n+360:n}function Nf(t,n){return t[0]-n[0]}function jf(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nOf(r[0],r[1])&&(r[1]=i[1]),Of(i[0],r[1])>Of(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(u=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(a=Of(r[1],i[0]))>u&&(u=a,lf=i[0],df=r[1])}return bf=mf=null,lf===1/0||hf===1/0?[[NaN,NaN],[NaN,NaN]]:[[lf,hf],[df,pf]]},Zf={sphere:Ic,point:Kf,lineStart:Jf,lineEnd:es,polygonStart:function(){Zf.lineStart=rs,Zf.lineEnd=is},polygonEnd:function(){Zf.lineStart=Jf,Zf.lineEnd=es}};function Kf(t,n){t*=xc;var e=Sc(n*=xc);Qf(e*Sc(t),e*Oc(t),Oc(n))}function Qf(t,n,e){++Rf,Pf+=(t-Pf)/Rf,Lf+=(n-Lf)/Rf,If+=(e-If)/Rf}function Jf(){Zf.point=ts}function ts(t,n){t*=xc;var e=Sc(n*=xc);$f=e*Sc(t),Xf=e*Oc(t),Gf=Oc(n),Zf.point=ns,Qf($f,Xf,Gf)}function ns(t,n){t*=xc;var e=Sc(n*=xc),r=e*Sc(t),i=e*Oc(t),o=Oc(n),u=Ac(jc((u=Xf*o-Gf*i)*u+(u=Gf*r-$f*o)*u+(u=$f*i-Xf*r)*u),$f*r+Xf*i+Gf*o);zf+=u,Ff+=u*($f+($f=r)),Df+=u*(Xf+(Xf=i)),Bf+=u*(Gf+(Gf=o)),Qf($f,Xf,Gf)}function es(){Zf.point=Kf}function rs(){Zf.point=os}function is(){us(qf,Hf),Zf.point=Kf}function os(t,n){qf=t,Hf=n,t*=xc,n*=xc,Zf.point=us;var e=Sc(n);$f=e*Sc(t),Xf=e*Oc(t),Gf=Oc(n),Qf($f,Xf,Gf)}function us(t,n){t*=xc;var e=Sc(n*=xc),r=e*Sc(t),i=e*Oc(t),o=Oc(n),u=Xf*o-Gf*i,a=Gf*r-$f*o,c=$f*i-Xf*r,f=jc(u*u+a*a+c*c),s=Pc(f),l=f&&-s/f;Uf+=l*u,Yf+=l*a,Vf+=l*c,zf+=s,Ff+=s*($f+($f=r)),Df+=s*(Xf+(Xf=i)),Bf+=s*(Gf+(Gf=o)),Qf($f,Xf,Gf)}var as=function(t){Rf=zf=Pf=Lf=If=Ff=Df=Bf=Uf=Yf=Vf=0,Gc(t,Zf);var n=Uf,e=Yf,r=Vf,i=n*n+e*e+r*r;return i<1e-12&&(n=Ff,e=Df,r=Bf,zf<1e-6&&(n=Pf,e=Lf,r=If),(i=n*n+e*e+r*r)<1e-12)?[NaN,NaN]:[Ac(e,n)*mc,Pc(r/jc(i))*mc]},cs=function(t){return function(){return t}},fs=function(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return(e=n.invert(e,r))&&t.invert(e[0],e[1])}),e};function ss(t,n){return[wc(t)>yc?t+Math.round(-t/bc)*bc:t,n]}function ls(t,n,e){return(t%=bc)?n||e?fs(ds(t),ps(n,e)):ds(t):n||e?ps(n,e):ss}function hs(t){return function(n,e){return[(n+=t)>yc?n-bc:n<-yc?n+bc:n,e]}}function ds(t){var n=hs(t);return n.invert=hs(-t),n}function ps(t,n){var e=Sc(t),r=Oc(t),i=Sc(n),o=Oc(n);function u(t,n){var u=Sc(n),a=Sc(t)*u,c=Oc(t)*u,f=Oc(n),s=f*e+a*r;return[Ac(c*i-s*o,a*e-f*r),Pc(s*i+c*o)]}return u.invert=function(t,n){var u=Sc(n),a=Sc(t)*u,c=Oc(t)*u,f=Oc(n),s=f*i-c*o;return[Ac(c*i+f*o,a*e+s*r),Pc(s*e-a*r)]},u}ss.invert=ss;var vs=function(t){function n(n){return(n=t(n[0]*xc,n[1]*xc))[0]*=mc,n[1]*=mc,n}return t=ls(t[0]*xc,t[1]*xc,t.length>2?t[2]*xc:0),n.invert=function(n){return(n=t.invert(n[0]*xc,n[1]*xc))[0]*=mc,n[1]*=mc,n},n};function ys(t,n,e,r,i,o){if(e){var u=Sc(n),a=Oc(n),c=r*e;null==i?(i=n+r*bc,o=n-c/2):(i=gs(u,i),o=gs(u,o),(r>0?io)&&(i+=r*bc));for(var f,s=i;r>0?s>o:s1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}},ms=function(t,n){return wc(t[0]-n[0])<1e-6&&wc(t[1]-n[1])<1e-6};function xs(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}var ws=function(t,n,e,r,i){var o,u,a=[],c=[];if(t.forEach((function(t){if(!((n=t.length-1)<=0)){var n,e,r=t[0],u=t[n];if(ms(r,u)){if(!r[2]&&!u[2]){for(i.lineStart(),o=0;o=0;--o)i.point((s=f[o])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function Ms(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,S=A*M,k=S>yc,C=v*x;if(As.add(Ac(C*A*Oc(S),y*w+C*Sc(S))),u+=k?M+A*bc:M,k^d>=e^b>=e){var E=af(of(h),of(_));sf(E);var T=af(o,E);sf(T);var O=(k^M>=0?-1:1)*Pc(T[2]);(r>O||r===O&&(E[0]||E[1]))&&(a+=k^M>=0?1:-1)}}return(u<-1e-6||u<1e-6&&As<-1e-6)^1&a},Cs=function(t,n,e,r){return function(i){var o,u,a,c=n(i),f=bs(),s=n(f),l=!1,h={point:d,lineStart:v,lineEnd:y,polygonStart:function(){h.point=g,h.lineStart=_,h.lineEnd=b,u=[],o=[]},polygonEnd:function(){h.point=d,h.lineStart=v,h.lineEnd=y,u=U(u);var t=ks(o,r);u.length?(l||(i.polygonStart(),l=!0),ws(u,Ts,t,e,i)):t&&(l||(i.polygonStart(),l=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=o=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(n,e){t(n,e)&&i.point(n,e)}function p(t,n){c.point(t,n)}function v(){h.point=p,c.lineStart()}function y(){h.point=d,c.lineEnd()}function g(t,n){a.push([t,n]),s.point(t,n)}function _(){s.lineStart(),a=[]}function b(){g(a[0][0],a[0][1]),s.lineEnd();var t,n,e,r,c=s.clean(),h=f.result(),d=h.length;if(a.pop(),o.push(a),a=null,d)if(1&c){if((n=(e=h[0]).length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t1&&2&c&&h.push(h.pop().concat(h.shift())),u.push(h.filter(Es))}return h}};function Es(t){return t.length>1}function Ts(t,n){return((t=t.x)[0]<0?t[1]-gc-1e-6:gc-t[1])-((n=n.x)[0]<0?n[1]-gc-1e-6:gc-n[1])}var Os=Cs((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,u){var a=o>0?yc:-yc,c=wc(o-e);wc(c-yc)<1e-6?(t.point(e,r=(r+u)/2>0?gc:-gc),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),n=0):i!==a&&c>=yc&&(wc(e-i)<1e-6&&(e-=1e-6*i),wc(o-a)<1e-6&&(o-=1e-6*a),r=function(t,n,e,r){var i,o,u=Oc(t-e);return wc(u)>1e-6?Mc((Oc(n)*(o=Sc(r))*Oc(e)-Oc(r)*(i=Sc(n))*Oc(t))/(i*o*u)):(n+r)/2}(e,r,o,u),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),n=0),t.point(e=o,r=u),i=a},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*gc,r.point(-yc,i),r.point(0,i),r.point(yc,i),r.point(yc,0),r.point(yc,-i),r.point(0,-i),r.point(-yc,-i),r.point(-yc,0),r.point(-yc,i);else if(wc(t[0]-n[0])>1e-6){var o=t[0]0,i=wc(n)>1e-6;function o(t,e){return Sc(t)*Sc(e)>n}function u(t,e,r){var i=[1,0,0],o=af(of(t),of(e)),u=uf(o,o),a=o[0],c=u-a*a;if(!c)return!r&&t;var f=n*u/c,s=-n*a/c,l=af(i,o),h=ff(i,f);cf(h,ff(o,s));var d=l,p=uf(h,d),v=uf(d,d),y=p*p-v*(uf(h,h)-1);if(!(y<0)){var g=jc(y),_=ff(d,(-p-g)/v);if(cf(_,h),_=rf(_),!r)return _;var b,m=t[0],x=e[0],w=t[1],M=e[1];x0^_[1]<(wc(_[0]-m)<1e-6?w:M):w<=_[1]&&_[1]<=M:A>yc^(m<=_[0]&&_[0]<=x)){var k=ff(d,(-p+g)/v);return cf(k,h),[_,rf(k)]}}}function a(n,e){var i=r?t:yc-t,o=0;return n<-i?o|=1:n>i&&(o|=2),e<-i?o|=4:e>i&&(o|=8),o}return Cs(o,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],v=o(l,h),y=r?v?0:a(l,h):v?a(l+(l<0?yc:-yc),h):0;if(!n&&(f=c=v)&&t.lineStart(),v!==c&&(!(d=u(n,p))||ms(n,d)||ms(p,d))&&(p[2]=1),v!==c)s=0,v?(t.lineStart(),d=u(p,n),t.point(d[0],d[1])):(d=u(n,p),t.point(d[0],d[1],2),t.lineEnd()),n=d;else if(i&&n&&r^v){var g;y&e||!(g=u(p,n,!0))||(s=0,r?(t.lineStart(),t.point(g[0][0],g[0][1]),t.point(g[1][0],g[1][1]),t.lineEnd()):(t.point(g[1][0],g[1][1]),t.lineEnd(),t.lineStart(),t.point(g[0][0],g[0][1],3)))}!v||n&&ms(n,p)||t.point(p[0],p[1]),n=p,c=v,e=y},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,o){ys(o,t,e,i,n,r)}),r?[0,-t]:[-yc,t-yc])};function js(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,a,f){var s=0,l=0;if(null==i||(s=u(i,a))!==(l=u(o,a))||c(i,o)<0^a>0)do{f.point(0===s||3===s?t:e,s>1?r:n)}while((s=(s+a+4)%4)!==l);else f.point(o[0],o[1])}function u(r,i){return wc(r[0]-t)<1e-6?i>0?0:3:wc(r[0]-e)<1e-6?i>0?2:1:wc(r[1]-n)<1e-6?i>0?1:0:i>0?3:2}function a(t,n){return c(t.x,n.x)}function c(t,n){var e=u(t,1),r=u(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(u){var c,f,s,l,h,d,p,v,y,g,_,b=u,m=bs(),x={point:w,lineStart:function(){x.point=M,f&&f.push(s=[]);g=!0,y=!1,p=v=NaN},lineEnd:function(){c&&(M(l,h),d&&y&&m.rejoin(),c.push(m.result()));x.point=w,y&&b.lineEnd()},polygonStart:function(){b=m,c=[],f=[],_=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,i=f.length;er&&(h-o)*(r-u)>(d-u)*(t-o)&&++n:d<=r&&(h-o)*(r-u)<(d-u)*(t-o)&&--n;return n}(),e=_&&n,i=(c=U(c)).length;(e||i)&&(u.polygonStart(),e&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),i&&ws(c,a,n,o,u),u.polygonEnd());b=u,c=f=s=null}};function w(t,n){i(t,n)&&b.point(t,n)}function M(o,u){var a=i(o,u);if(f&&s.push([o,u]),g)l=o,h=u,d=a,g=!1,a&&(b.lineStart(),b.point(o,u));else if(a&&y)b.point(o,u);else{var c=[p=Math.max(-1e9,Math.min(1e9,p)),v=Math.max(-1e9,Math.min(1e9,v))],m=[o=Math.max(-1e9,Math.min(1e9,o)),u=Math.max(-1e9,Math.min(1e9,u))];!function(t,n,e,r,i,o){var u,a=t[0],c=t[1],f=0,s=1,l=n[0]-a,h=n[1]-c;if(u=e-a,l||!(u>0)){if(u/=l,l<0){if(u0){if(u>s)return;u>f&&(f=u)}if(u=i-a,l||!(u<0)){if(u/=l,l<0){if(u>s)return;u>f&&(f=u)}else if(l>0){if(u0)){if(u/=h,h<0){if(u0){if(u>s)return;u>f&&(f=u)}if(u=o-c,h||!(u<0)){if(u/=h,h<0){if(u>s)return;u>f&&(f=u)}else if(h>0){if(u0&&(t[0]=a+f*l,t[1]=c+f*h),s<1&&(n[0]=a+s*l,n[1]=c+s*h),!0}}}}}(c,m,t,n,e,r)?a&&(b.lineStart(),b.point(o,u),_=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(m[0],m[1]),a||b.lineEnd(),_=!1)}p=o,v=u,y=a}return x}}var Rs,zs,Ps,Ls=function(){var t,n,e,r=0,i=0,o=960,u=500;return e={stream:function(e){return t&&n===e?t:t=js(r,i,o,u)(n=e)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],o=+a[1][0],u=+a[1][1],t=n=null,e):[[r,i],[o,u]]}}},Is=hc(),Fs={sphere:Ic,point:Ic,lineStart:function(){Fs.point=Bs,Fs.lineEnd=Ds},lineEnd:Ic,polygonStart:Ic,polygonEnd:Ic};function Ds(){Fs.point=Fs.lineEnd=Ic}function Bs(t,n){Rs=t*=xc,zs=Oc(n*=xc),Ps=Sc(n),Fs.point=Us}function Us(t,n){t*=xc;var e=Oc(n*=xc),r=Sc(n),i=wc(t-Rs),o=Sc(i),u=r*Oc(i),a=Ps*e-zs*r*o,c=zs*e+Ps*r*o;Is.add(Ac(jc(u*u+a*a),c)),Rs=t,zs=e,Ps=r}var Ys=function(t){return Is.reset(),Gc(t,Fs),+Is},Vs=[null,null],qs={type:"LineString",coordinates:Vs},Hs=function(t,n){return Vs[0]=t,Vs[1]=n,Ys(qs)},$s={Feature:function(t,n){return Gs(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r0&&(i=Hs(t[o],t[o-1]))>0&&e<=i&&r<=i&&(e+r-i)*(1-Math.pow((e-r)/i,2))<1e-12*i)return!0;e=r}return!1}function Ks(t,n){return!!ks(t.map(Qs),Js(n))}function Qs(t){return(t=t.map(Js)).pop(),t}function Js(t){return[t[0]*xc,t[1]*xc]}var tl=function(t,n){return(t&&$s.hasOwnProperty(t.type)?$s[t.type]:Gs)(t,n)};function nl(t,n,e){var r=k(t,n-1e-6,e).concat(n);return function(t){return r.map((function(n){return[t,n]}))}}function el(t,n,e){var r=k(t,n-1e-6,e).concat(n);return function(t){return r.map((function(n){return[n,t]}))}}function rl(){var t,n,e,r,i,o,u,a,c,f,s,l,h=10,d=h,p=90,v=360,y=2.5;function g(){return{type:"MultiLineString",coordinates:_()}}function _(){return k(kc(r/p)*p,e,p).map(s).concat(k(kc(a/v)*v,u,v).map(l)).concat(k(kc(n/h)*h,t,h).filter((function(t){return wc(t%p)>1e-6})).map(c)).concat(k(kc(o/d)*d,i,d).filter((function(t){return wc(t%v)>1e-6})).map(f))}return g.lines=function(){return _().map((function(t){return{type:"LineString",coordinates:t}}))},g.outline=function(){return{type:"Polygon",coordinates:[s(r).concat(l(u).slice(1),s(e).reverse().slice(1),l(a).reverse().slice(1))]}},g.extent=function(t){return arguments.length?g.extentMajor(t).extentMinor(t):g.extentMinor()},g.extentMajor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],u=+t[1][1],r>e&&(t=r,r=e,e=t),a>u&&(t=a,a=u,u=t),g.precision(y)):[[r,a],[e,u]]},g.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),o>i&&(e=o,o=i,i=e),g.precision(y)):[[n,o],[t,i]]},g.step=function(t){return arguments.length?g.stepMajor(t).stepMinor(t):g.stepMinor()},g.stepMajor=function(t){return arguments.length?(p=+t[0],v=+t[1],g):[p,v]},g.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],g):[h,d]},g.precision=function(h){return arguments.length?(y=+h,c=nl(o,i,90),f=el(n,t,y),s=nl(a,u,90),l=el(r,e,y),g):y},g.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function il(){return rl()()}var ol,ul,al,cl,fl=function(t,n){var e=t[0]*xc,r=t[1]*xc,i=n[0]*xc,o=n[1]*xc,u=Sc(r),a=Oc(r),c=Sc(o),f=Oc(o),s=u*Sc(e),l=u*Oc(e),h=c*Sc(i),d=c*Oc(i),p=2*Pc(jc(Lc(o-r)+u*c*Lc(i-e))),v=Oc(p),y=p?function(t){var n=Oc(t*=p)/v,e=Oc(p-t)/v,r=e*s+n*h,i=e*l+n*d,o=e*a+n*f;return[Ac(i,r)*mc,Ac(o,jc(r*r+i*i))*mc]}:function(){return[e*mc,r*mc]};return y.distance=p,y},sl=function(t){return t},ll=hc(),hl=hc(),dl={point:Ic,lineStart:Ic,lineEnd:Ic,polygonStart:function(){dl.lineStart=pl,dl.lineEnd=gl},polygonEnd:function(){dl.lineStart=dl.lineEnd=dl.point=Ic,ll.add(wc(hl)),hl.reset()},result:function(){var t=ll/2;return ll.reset(),t}};function pl(){dl.point=vl}function vl(t,n){dl.point=yl,ol=al=t,ul=cl=n}function yl(t,n){hl.add(cl*t-al*n),al=t,cl=n}function gl(){yl(ol,ul)}var _l=dl,bl=1/0,ml=bl,xl=-bl,wl=xl;var Ml,Al,Sl,kl,Cl={point:function(t,n){txl&&(xl=t);nwl&&(wl=n)},lineStart:Ic,lineEnd:Ic,polygonStart:Ic,polygonEnd:Ic,result:function(){var t=[[bl,ml],[xl,wl]];return xl=wl=-(ml=bl=1/0),t}},El=0,Tl=0,Ol=0,Nl=0,jl=0,Rl=0,zl=0,Pl=0,Ll=0,Il={point:Fl,lineStart:Dl,lineEnd:Yl,polygonStart:function(){Il.lineStart=Vl,Il.lineEnd=ql},polygonEnd:function(){Il.point=Fl,Il.lineStart=Dl,Il.lineEnd=Yl},result:function(){var t=Ll?[zl/Ll,Pl/Ll]:Rl?[Nl/Rl,jl/Rl]:Ol?[El/Ol,Tl/Ol]:[NaN,NaN];return El=Tl=Ol=Nl=jl=Rl=zl=Pl=Ll=0,t}};function Fl(t,n){El+=t,Tl+=n,++Ol}function Dl(){Il.point=Bl}function Bl(t,n){Il.point=Ul,Fl(Sl=t,kl=n)}function Ul(t,n){var e=t-Sl,r=n-kl,i=jc(e*e+r*r);Nl+=i*(Sl+t)/2,jl+=i*(kl+n)/2,Rl+=i,Fl(Sl=t,kl=n)}function Yl(){Il.point=Fl}function Vl(){Il.point=Hl}function ql(){$l(Ml,Al)}function Hl(t,n){Il.point=$l,Fl(Ml=Sl=t,Al=kl=n)}function $l(t,n){var e=t-Sl,r=n-kl,i=jc(e*e+r*r);Nl+=i*(Sl+t)/2,jl+=i*(kl+n)/2,Rl+=i,zl+=(i=kl*t-Sl*n)*(Sl+t),Pl+=i*(kl+n),Ll+=3*i,Fl(Sl=t,kl=n)}var Xl=Il;function Gl(t){this._context=t}Gl.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,bc)}},result:Ic};var Wl,Zl,Kl,Ql,Jl,th=hc(),nh={point:Ic,lineStart:function(){nh.point=eh},lineEnd:function(){Wl&&rh(Zl,Kl),nh.point=Ic},polygonStart:function(){Wl=!0},polygonEnd:function(){Wl=null},result:function(){var t=+th;return th.reset(),t}};function eh(t,n){nh.point=rh,Zl=Ql=t,Kl=Jl=n}function rh(t,n){Ql-=t,Jl-=n,th.add(jc(Ql*Ql+Jl*Jl)),Ql=t,Jl=n}var ih=nh;function oh(){this._string=[]}function uh(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}oh.prototype={_radius:4.5,_circle:uh(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=uh(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ah=function(t,n){var e,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Gc(t,e(r))),r.result()}return o.area=function(t){return Gc(t,e(_l)),_l.result()},o.measure=function(t){return Gc(t,e(ih)),ih.result()},o.bounds=function(t){return Gc(t,e(Cl)),Cl.result()},o.centroid=function(t){return Gc(t,e(Xl)),Xl.result()},o.projection=function(n){return arguments.length?(e=null==n?(t=null,sl):(t=n).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(n=null,new oh):new Gl(n=t),"function"!=typeof i&&r.pointRadius(i),o):n},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(n)},ch=function(t){return{stream:fh(t)}};function fh(t){return function(n){var e=new sh;for(var r in t)e[r]=t[r];return e.stream=n,e}}function sh(){}function lh(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Gc(e,t.stream(Cl)),n(Cl.result()),null!=r&&t.clipExtent(r),t}function hh(t,n,e){return lh(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),u=+n[0][0]+(r-o*(e[1][0]+e[0][0]))/2,a=+n[0][1]+(i-o*(e[1][1]+e[0][1]))/2;t.scale(150*o).translate([u,a])}),e)}function dh(t,n,e){return hh(t,[[0,0],n],e)}function ph(t,n,e){return lh(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),o=(r-i*(e[1][0]+e[0][0]))/2,u=-i*e[0][1];t.scale(150*i).translate([o,u])}),e)}function vh(t,n,e){return lh(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),o=-i*e[0][0],u=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([o,u])}),e)}sh.prototype={constructor:sh,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var yh=Sc(30*xc),gh=function(t,n){return+n?function(t,n){function e(r,i,o,u,a,c,f,s,l,h,d,p,v,y){var g=f-r,_=s-i,b=g*g+_*_;if(b>4*n&&v--){var m=u+h,x=a+d,w=c+p,M=jc(m*m+x*x+w*w),A=Pc(w/=M),S=wc(wc(w)-1)<1e-6||wc(o-l)<1e-6?(o+l)/2:Ac(x,m),k=t(S,A),C=k[0],E=k[1],T=C-r,O=E-i,N=_*T-g*O;(N*N/b>n||wc((g*T+_*O)/b-.5)>.3||u*h+a*d+c*p2?t[2]%360*xc:0,T()):[y*mc,g*mc,_*mc]},C.angle=function(t){return arguments.length?(b=t%360*xc,T()):b*mc},C.reflectX=function(t){return arguments.length?(m=t?-1:1,T()):m<0},C.reflectY=function(t){return arguments.length?(x=t?-1:1,T()):x<0},C.precision=function(t){return arguments.length?(u=gh(a,k=t*t),O()):jc(k)},C.fitExtent=function(t,n){return hh(C,t,n)},C.fitSize=function(t,n){return dh(C,t,n)},C.fitWidth=function(t,n){return ph(C,t,n)},C.fitHeight=function(t,n){return vh(C,t,n)},function(){return n=t.apply(this,arguments),C.invert=n.invert&&E,T()}}function Mh(t){var n=0,e=yc/3,r=wh(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*xc,e=t[1]*xc):[n*mc,e*mc]},i}function Ah(t,n){var e=Oc(t),r=(e+Oc(n))/2;if(wc(r)<1e-6)return function(t){var n=Sc(t);function e(t,e){return[t*n,Oc(e)/n]}return e.invert=function(t,e){return[t/n,Pc(e*n)]},e}(t);var i=1+e*(2*r-e),o=jc(i)/r;function u(t,n){var e=jc(i-2*r*Oc(n))/r;return[e*Oc(t*=r),o-e*Sc(t)]}return u.invert=function(t,n){var e=o-n,u=Ac(t,wc(e))*Nc(e);return e*r<0&&(u-=yc*Nc(t)*Nc(e)),[u/r,Pc((i-(t*t+e*e)*r*r)/(2*r))]},u}var Sh=function(){return Mh(Ah).scale(155.424).center([0,33.6442])},kh=function(){return Sh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var Ch=function(){var t,n,e,r,i,o,u=kh(),a=Sh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Sh().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f={point:function(t,n){o=[t,n]}};function s(t){var n=t[0],u=t[1];return o=null,e.point(n,u),o||(r.point(n,u),o)||(i.point(n,u),o)}function l(){return t=n=null,s}return s.invert=function(t){var n=u.scale(),e=u.translate(),r=(t[0]-e[0])/n,i=(t[1]-e[1])/n;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:u).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[u.stream(n=e),a.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e0?n<1e-6-gc&&(n=1e-6-gc):n>gc-1e-6&&(n=gc-1e-6);var e=i/Tc(Ih(n),r);return[e*Oc(r*t),i-e*Sc(r*t)]}return o.invert=function(t,n){var e=i-n,o=Nc(r)*jc(t*t+e*e),u=Ac(t,wc(e))*Nc(e);return e*r<0&&(u-=yc*Nc(t)*Nc(e)),[u/r,2*Mc(Tc(i/o,1/r))-gc]},o}var Dh=function(){return Mh(Fh).scale(109.5).parallels([30,30])};function Bh(t,n){return[t,n]}Bh.invert=Bh;var Uh=function(){return xh(Bh).scale(152.63)};function Yh(t,n){var e=Sc(t),r=t===n?Oc(t):(e-Sc(n))/(n-t),i=e/r+t;if(wc(r)<1e-6)return Bh;function o(t,n){var e=i-n,o=r*t;return[e*Oc(o),i-e*Sc(o)]}return o.invert=function(t,n){var e=i-n,o=Ac(t,wc(e))*Nc(e);return e*r<0&&(o-=yc*Nc(t)*Nc(e)),[o/r,i-Nc(r)*jc(t*t+e*e)]},o}var Vh=function(){return Mh(Yh).scale(131.154).center([0,13.9389])},qh=1.340264,Hh=-.081106,$h=893e-6,Xh=.003796,Gh=jc(3)/2;function Wh(t,n){var e=Pc(Gh*Oc(n)),r=e*e,i=r*r*r;return[t*Sc(e)/(Gh*(qh+3*Hh*r+i*(7*$h+9*Xh*r))),e*(qh+Hh*r+i*($h+Xh*r))]}Wh.invert=function(t,n){for(var e,r=n,i=r*r,o=i*i*i,u=0;u<12&&(o=(i=(r-=e=(r*(qh+Hh*i+o*($h+Xh*i))-n)/(qh+3*Hh*i+o*(7*$h+9*Xh*i)))*r)*i*i,!(wc(e)<1e-12));++u);return[Gh*t*(qh+3*Hh*i+o*(7*$h+9*Xh*i))/Sc(r),Pc(Oc(r)/Gh)]};var Zh=function(){return xh(Wh).scale(177.158)};function Kh(t,n){var e=Sc(n),r=Sc(t)*e;return[e*Oc(t)/r,Oc(n)/r]}Kh.invert=Th(Mc);var Qh=function(){return xh(Kh).scale(144.049).clipAngle(60)},Jh=function(){var t,n,e,r,i,o,u,a=1,c=0,f=0,s=1,l=1,h=0,d=null,p=1,v=1,y=fh({point:function(t,n){var e=b([t,n]);this.stream.point(e[0],e[1])}}),g=sl;function _(){return p=a*s,v=a*l,o=u=null,b}function b(e){var r=e[0]*p,i=e[1]*v;if(h){var o=i*t-r*n;r=r*t+i*n,i=o}return[r+c,i+f]}return b.invert=function(e){var r=e[0]-c,i=e[1]-f;if(h){var o=i*t+r*n;r=r*t-i*n,i=o}return[r/p,i/v]},b.stream=function(t){return o&&u===t?o:o=y(g(u=t))},b.postclip=function(t){return arguments.length?(g=t,d=e=r=i=null,_()):g},b.clipExtent=function(t){return arguments.length?(g=null==t?(d=e=r=i=null,sl):js(d=+t[0][0],e=+t[0][1],r=+t[1][0],i=+t[1][1]),_()):null==d?null:[[d,e],[r,i]]},b.scale=function(t){return arguments.length?(a=+t,_()):a},b.translate=function(t){return arguments.length?(c=+t[0],f=+t[1],_()):[c,f]},b.angle=function(e){return arguments.length?(n=Oc(h=e%360*xc),t=Sc(h),_()):h*mc},b.reflectX=function(t){return arguments.length?(s=t?-1:1,_()):s<0},b.reflectY=function(t){return arguments.length?(l=t?-1:1,_()):l<0},b.fitExtent=function(t,n){return hh(b,t,n)},b.fitSize=function(t,n){return dh(b,t,n)},b.fitWidth=function(t,n){return ph(b,t,n)},b.fitHeight=function(t,n){return vh(b,t,n)},b};function td(t,n){var e=n*n,r=e*e;return[t*(.8707-.131979*e+r*(r*(.003971*e-.001529*r)-.013791)),n*(1.007226+e*(.015085+r*(.028874*e-.044475-.005916*r)))]}td.invert=function(t,n){var e,r=n,i=25;do{var o=r*r,u=o*o;r-=e=(r*(1.007226+o*(.015085+u*(.028874*o-.044475-.005916*u)))-n)/(1.007226+o*(.045255+u*(.259866*o-.311325-.005916*11*u)))}while(wc(e)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]};var nd=function(){return xh(td).scale(175.295)};function ed(t,n){return[Sc(n)*Oc(t),Oc(n)]}ed.invert=Th(Pc);var rd=function(){return xh(ed).scale(249.5).clipAngle(90.000001)};function id(t,n){var e=Sc(n),r=1+Sc(t)*e;return[e*Oc(t)/r,Oc(n)/r]}id.invert=Th((function(t){return 2*Mc(t)}));var od=function(){return xh(id).scale(250).clipAngle(142)};function ud(t,n){return[Ec(Rc((gc+n)/2)),-t]}ud.invert=function(t,n){return[-n,2*Mc(Cc(t))-gc]};var ad=function(){var t=Lh(ud),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)};function cd(t,n){return t.parent===n.parent?1:2}function fd(t,n){return t+n.x}function sd(t,n){return Math.max(t,n.y)}var ld=function(){var t=cd,n=1,e=1,r=!1;function i(i){var o,u=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(fd,0)/t.length}(e),n.y=function(t){return 1+t.reduce(sd,0)}(e)):(n.x=o?u+=t(n,o):0,n.y=0,o=n)}));var a=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=a.x-t(a,c)/2,s=c.x+t(c,a)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i};function hd(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function dd(t,n){var e,r,i,o,u,a=new gd(t),c=+t.value&&(a.value=t.value),f=[a];for(null==n&&(n=pd);e=f.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(u=i.length))for(e.children=new Array(u),o=u-1;o>=0;--o)f.push(r=e.children[o]=new gd(i[o])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(yd)}function pd(t){return t.children}function vd(t){t.data=t.data.data}function yd(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function gd(t){this.data=t,this.depth=this.height=0,this.parent=null}gd.prototype=dd.prototype={constructor:gd,count:function(){return this.eachAfter(hd)},each:function(t){var n,e,r,i,o=this,u=[o];do{for(n=u.reverse(),u=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;t=e.pop(),n=r.pop();for(;t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each((function(n){t.push(n)})),t},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return dd(this).eachBefore(vd)}};var _d=Array.prototype.slice;var bd=function(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(_d.call(t))).length,o=[];r0&&e*e>r*r+i*i}function Md(t,n){for(var e=0;e(u*=u)?(r=(f+u-i)/(2*f),o=Math.sqrt(Math.max(0,u/f-r*r)),e.x=t.x-r*a-o*c,e.y=t.y-r*c+o*a):(r=(f+i-u)/(2*f),o=Math.sqrt(Math.max(0,i/f-r*r)),e.x=n.x+r*a-o*c,e.y=n.y+r*c+o*a)):(e.x=n.x+e.r,e.y=n.y)}function Ed(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function Td(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function Od(t){this._=t,this.next=null,this.previous=null}function Nd(t){if(!(i=t.length))return 0;var n,e,r,i,o,u,a,c,f,s,l;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;Cd(e,n,r=t[2]),n=new Od(n),e=new Od(e),r=new Od(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a0)throw new Error("cycle");return o}return e.id=function(n){return arguments.length?(t=zd(n),e):t},e.parentId=function(t){return arguments.length?(n=zd(t),e):n},e};function Zd(t,n){return t.parent===n.parent?1:2}function Kd(t){var n=t.children;return n?n[0]:t.t}function Qd(t){var n=t.children;return n?n[n.length-1]:t.t}function Jd(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function tp(t,n,e){return t.a.parent===n.parent?t.a:e}function np(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}np.prototype=Object.create(gd.prototype);var ep=function(){var t=Zd,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,o,u=new np(t,0),a=[u];n=a.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)a.push(e=n.children[i]=new np(r[i],i)),e.parent=n;return(u.parent=new np(null,0)).children=[u],u}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(u),r)i.eachBefore(a);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),v=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*v}))}return i}function o(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var o=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-o):n.z=o}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,o=n,u=n,a=e,c=o.parent.children[0],f=o.m,s=u.m,l=a.m,h=c.m;a=Qd(a),o=Kd(o),a&&o;)c=Kd(c),(u=Qd(u)).a=n,(i=a.z+l-o.z-f+t(a._,o._))>0&&(Jd(tp(a,n,r),n,i),f+=i,s+=i),l+=a.m,f+=o.m,h+=c.m,s+=u.m;a&&!Qd(u)&&(u.t=a,u.m+=l-s),o&&!Kd(c)&&(c.t=o,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},rp=function(t,n,e,r,i){for(var o,u=t.children,a=-1,c=u.length,f=t.value&&(i-e)/t.value;++ah&&(h=a),y=s*s*v,(d=Math.max(h/y,y/l))>p){s-=a;break}p=d}g.push(u={value:s,dice:c1?n:1)},e}(ip),ap=function(){var t=up,n=!1,e=1,r=1,i=[0],o=Pd,u=Pd,a=Pd,c=Pd,f=Pd;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(Yd),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=a[n];return s.x0=i,s.y0=o,s.x1=u,void(s.y1=c)}var l=f[n],h=r/2+l,d=n+1,p=e-1;for(;d>>1;f[v]c-o){var _=(i*g+u*y)/r;t(n,d,y,i,o,_,c),t(d,e,g,_,o,u,c)}else{var b=(o*g+c*y)/r;t(n,d,y,i,o,u,b),t(d,e,g,i,b,u,c)}}(0,c,t.value,n,e,r,i)},fp=function(t,n,e,r,i){(1&t.depth?rp:Vd)(t,n,e,r,i)},sp=function t(n){function e(t,e,r,i,o){if((u=t._squarify)&&u.ratio===n)for(var u,a,c,f,s,l=-1,h=u.length,d=t.value;++l1?n:1)},e}(ip),lp=function(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}},hp=function(t,n){var e=de(+t,+n);return function(t){var n=e(t);return n-360*Math.floor(n/360)}},dp=function(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}},pp=Math.SQRT2;function vp(t){return((t=Math.exp(t))+1/t)/2}var yp=function(t,n){var e,r,i=t[0],o=t[1],u=t[2],a=n[0],c=n[1],f=n[2],s=a-i,l=c-o,h=s*s+l*l;if(h<1e-12)r=Math.log(f/u)/pp,e=function(t){return[i+t*s,o+t*l,u*Math.exp(pp*t*r)]};else{var d=Math.sqrt(h),p=(f*f-u*u+4*h)/(2*u*2*d),v=(f*f-u*u-4*h)/(2*f*2*d),y=Math.log(Math.sqrt(p*p+1)-p),g=Math.log(Math.sqrt(v*v+1)-v);r=(g-y)/pp,e=function(t){var n,e=t*r,a=vp(y),c=u/(2*d)*(a*(n=pp*e+y,((n=Math.exp(2*n))-1)/(n+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+c*s,o+c*l,u*a/vp(pp*e+y)]}}return e.duration=1e3*r,e};function gp(t){return function(n,e){var r=t((n=oe(n)).h,(e=oe(e)).h),i=ve(n.s,e.s),o=ve(n.l,e.l),u=ve(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=o(t),n.opacity=u(t),n+""}}}var _p=gp(de),bp=gp(ve);function mp(t,n){var e=ve((t=bo(t)).l,(n=bo(n)).l),r=ve(t.a,n.a),i=ve(t.b,n.b),o=ve(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+""}}function xp(t){return function(n,e){var r=t((n=Co(n)).h,(e=Co(e)).h),i=ve(n.c,e.c),o=ve(n.l,e.l),u=ve(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=o(t),n.opacity=u(t),n+""}}}var wp=xp(de),Mp=xp(ve);function Ap(t){return function n(e){function r(n,r){var i=t((n=Po(n)).h,(r=Po(r)).h),o=ve(n.s,r.s),u=ve(n.l,r.l),a=ve(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=u(Math.pow(t,e)),n.opacity=a(t),n+""}}return e=+e,r.gamma=n,r}(1)}var Sp=Ap(de),kp=Ap(ve);function Cp(t,n){for(var e=0,r=n.length-1,i=n[0],o=new Array(r<0?0:r);e1&&(n=t[o[u-2]],e=t[o[u-1]],r=t[a],(e[0]-n[0])*(r[1]-n[1])-(e[1]-n[1])*(r[0]-n[0])<=0);)--u;o[u++]=a}return o.slice(0,u)}var Rp=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)f.push(t[r[o[n]][2]]);for(n=+a;na!=f>a&&u<(c-e)*(a-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},Pp=function(t){for(var n,e,r=-1,i=t.length,o=t[i-1],u=o[0],a=o[1],c=0;++r1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(Lp),Dp=function t(n){function e(){var t=Fp.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(Lp),Bp=function t(n){function e(t){return function(){for(var e=0,r=0;rr&&(n=e,e=r,r=n),function(t){return Math.max(e,Math.min(r,t))}}function iv(t,n,e){var r=t[0],i=t[1],o=n[0],u=n[1];return i2?ov:iv,i=o=null,l}function l(n){return isNaN(n=+n)?e:(i||(i=r(u.map(t),a,c)))(t(f(n)))}return l.invert=function(e){return f(n((o||(o=r(a,u.map(t),Se)))(e)))},l.domain=function(t){return arguments.length?(u=$p.call(t,Jp),f===nv||(f=rv(u)),s()):u.slice()},l.range=function(t){return arguments.length?(a=Xp.call(t),s()):a.slice()},l.rangeRound=function(t){return a=Xp.call(t),c=dp,s()},l.clamp=function(t){return arguments.length?(f=t?rv(u):nv,l):f!==nv},l.interpolate=function(t){return arguments.length?(c=t,s()):c},l.unknown=function(t){return arguments.length?(e=t,l):e},function(e,r){return t=e,n=r,s()}}function cv(t,n){return av()(t,n)}var fv=function(t,n,e,r){var i,o=j(t,n,e);switch((r=Za(null==r?",f":r)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=sc(o,u))||(r.precision=i),nc(r,u);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=lc(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=fc(o))||(r.precision=i-2*("%"===r.type))}return tc(r)};function sv(t){var n=t.domain;return t.ticks=function(t){var e=n();return O(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return fv(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i=n(),o=0,u=i.length-1,a=i[o],c=i[u];return c0?r=N(a=Math.floor(a/r)*r,c=Math.ceil(c/r)*r,e):r<0&&(r=N(a=Math.ceil(a*r)/r,c=Math.floor(c*r)/r,e)),r>0?(i[o]=Math.floor(a/r)*r,i[u]=Math.ceil(c/r)*r,n(i)):r<0&&(i[o]=Math.ceil(a*r)/r,i[u]=Math.floor(c*r)/r,n(i)),t},t}function lv(){var t=cv(nv,nv);return t.copy=function(){return uv(t,lv())},Vp.apply(t,arguments),sv(t)}function hv(t){var n;function e(t){return isNaN(t=+t)?n:t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=$p.call(n,Jp),e):t.slice()},e.unknown=function(t){return arguments.length?(n=t,e):n},e.copy=function(){return hv(t).unknown(n)},t=arguments.length?$p.call(t,Jp):[0,1],sv(e)}var dv=function(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],u=t[i];return u0){for(;hc)break;v.push(l)}}else for(;h=1;--s)if(!((l=f*s)c)break;v.push(l)}}else v=O(h,d,Math.min(d-h,p)).map(e);return r?v.reverse():v},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=tc(i)),t===1/0)return i;null==t&&(t=10);var u=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/e(Math.round(n(t)));return r*o0?r[i-1]:n[0],i=r?[i[r-1],e]:[i[u-1],i[u]]},u.unknown=function(n){return arguments.length?(t=n,u):u},u.thresholds=function(){return i.slice()},u.copy=function(){return Rv().domain([n,e]).range(o).unknown(t)},Vp.apply(sv(u),arguments)}function zv(){var t,n=[.5],e=[0,1],r=1;function i(i){return i<=i?e[h(n,i,0,r)]:t}return i.domain=function(t){return arguments.length?(n=Xp.call(t),r=Math.min(n.length,e.length-1),i):n.slice()},i.range=function(t){return arguments.length?(e=Xp.call(t),r=Math.min(n.length,e.length-1),i):e.slice()},i.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},i.unknown=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return zv().domain(n).range(e).unknown(t)},Vp.apply(i,arguments)}var Pv=new Date,Lv=new Date;function Iv(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=function(n){return t(n=new Date(+n)),n},i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n0))return a;do{a.push(u=new Date(+e)),n(e,o),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&&(i.count=function(n,r){return Pv.setTime(+n),Lv.setTime(+r),t(Pv),t(Lv),Math.floor(e(Pv,Lv))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var Fv=Iv((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()}));Fv.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Iv((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};var Dv=Fv,Bv=Fv.range,Uv=Iv((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),Yv=Uv,Vv=Uv.range;function qv(t){return Iv((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var Hv=qv(0),$v=qv(1),Xv=qv(2),Gv=qv(3),Wv=qv(4),Zv=qv(5),Kv=qv(6),Qv=Hv.range,Jv=$v.range,ty=Xv.range,ny=Gv.range,ey=Wv.range,ry=Zv.range,iy=Kv.range,oy=Iv((function(t){t.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),uy=oy,ay=oy.range,cy=Iv((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()})),fy=cy,sy=cy.range,ly=Iv((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,n){t.setTime(+t+6e4*n)}),(function(t,n){return(n-t)/6e4}),(function(t){return t.getMinutes()})),hy=ly,dy=ly.range,py=Iv((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})),vy=py,yy=py.range,gy=Iv((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));gy.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Iv((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):gy:null};var _y=gy,by=gy.range;function my(t){return Iv((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/6048e5}))}var xy=my(0),wy=my(1),My=my(2),Ay=my(3),Sy=my(4),ky=my(5),Cy=my(6),Ey=xy.range,Ty=wy.range,Oy=My.range,Ny=Ay.range,jy=Sy.range,Ry=ky.range,zy=Cy.range,Py=Iv((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1})),Ly=Py,Iy=Py.range,Fy=Iv((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()}));Fy.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Iv((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};var Dy=Fy,By=Fy.range;function Uy(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Yy(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Vy(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}function qy(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,u=t.shortDays,a=t.months,c=t.shortMonths,f=eg(i),s=rg(i),l=eg(o),h=rg(o),d=eg(u),p=rg(u),v=eg(a),y=rg(a),g=eg(c),_=rg(c),b={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:Ag,e:Ag,f:Tg,g:Bg,G:Yg,H:Sg,I:kg,j:Cg,L:Eg,m:Og,M:Ng,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:l_,s:h_,S:jg,u:Rg,U:zg,V:Lg,w:Ig,W:Fg,x:null,X:null,y:Dg,Y:Ug,Z:Vg,"%":s_},m={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:qg,e:qg,f:Wg,g:u_,G:c_,H:Hg,I:$g,j:Xg,L:Gg,m:Zg,M:Kg,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:l_,s:h_,S:Qg,u:Jg,U:t_,V:e_,w:r_,W:i_,x:null,X:null,y:o_,Y:a_,Z:f_,"%":s_},x={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=g.exec(n.slice(e));return r?(t.m=_[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=y[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return A(t,n,e,r)},d:pg,e:pg,f:mg,g:sg,G:fg,H:yg,I:yg,j:vg,L:bg,m:dg,M:gg,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1},q:hg,Q:wg,s:Mg,S:_g,u:og,U:ug,V:ag,w:ig,W:cg,x:function(t,n,r){return A(t,e,n,r)},X:function(t,n,e){return A(t,r,n,e)},y:sg,Y:fg,Z:lg,"%":xg};function w(t,n){return function(e){var r,i,o,u=[],a=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Yy(Vy(o.y,0,1))).getUTCDay(),r=i>4||0===i?wy.ceil(r):wy(r),r=Ly.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Uy(Vy(o.y,0,1))).getDay(),r=i>4||0===i?$v.ceil(r):$v(r),r=uy.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Yy(Vy(o.y,0,1)).getUTCDay():Uy(Vy(o.y,0,1)).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,Yy(o)):Uy(o)}}function A(t,n,e,r){for(var i,o,u=0,a=n.length,c=e.length;u=c)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=x[i in Zy?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return b.x=w(e,b),b.X=w(r,b),b.c=w(n,b),m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),{format:function(t){var n=w(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}}}var Hy,$y,Xy,Gy,Wy,Zy={"-":"",_:" ",0:"0"},Ky=/^\s*\d+/,Qy=/^%/,Jy=/[\\^$*+?|[\]().{}]/g;function tg(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),e+r[0].length):-1}function lg(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 hg(t,n,e){var r=Ky.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function dg(t,n,e){var r=Ky.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function pg(t,n,e){var r=Ky.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function vg(t,n,e){var r=Ky.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function yg(t,n,e){var r=Ky.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function gg(t,n,e){var r=Ky.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function _g(t,n,e){var r=Ky.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function bg(t,n,e){var r=Ky.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function mg(t,n,e){var r=Ky.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function xg(t,n,e){var r=Qy.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function wg(t,n,e){var r=Ky.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function Mg(t,n,e){var r=Ky.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function Ag(t,n){return tg(t.getDate(),n,2)}function Sg(t,n){return tg(t.getHours(),n,2)}function kg(t,n){return tg(t.getHours()%12||12,n,2)}function Cg(t,n){return tg(1+uy.count(Dv(t),t),n,3)}function Eg(t,n){return tg(t.getMilliseconds(),n,3)}function Tg(t,n){return Eg(t,n)+"000"}function Og(t,n){return tg(t.getMonth()+1,n,2)}function Ng(t,n){return tg(t.getMinutes(),n,2)}function jg(t,n){return tg(t.getSeconds(),n,2)}function Rg(t){var n=t.getDay();return 0===n?7:n}function zg(t,n){return tg(Hv.count(Dv(t)-1,t),n,2)}function Pg(t){var n=t.getDay();return n>=4||0===n?Wv(t):Wv.ceil(t)}function Lg(t,n){return t=Pg(t),tg(Wv.count(Dv(t),t)+(4===Dv(t).getDay()),n,2)}function Ig(t){return t.getDay()}function Fg(t,n){return tg($v.count(Dv(t)-1,t),n,2)}function Dg(t,n){return tg(t.getFullYear()%100,n,2)}function Bg(t,n){return tg((t=Pg(t)).getFullYear()%100,n,2)}function Ug(t,n){return tg(t.getFullYear()%1e4,n,4)}function Yg(t,n){var e=t.getDay();return tg((t=e>=4||0===e?Wv(t):Wv.ceil(t)).getFullYear()%1e4,n,4)}function Vg(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+tg(n/60|0,"0",2)+tg(n%60,"0",2)}function qg(t,n){return tg(t.getUTCDate(),n,2)}function Hg(t,n){return tg(t.getUTCHours(),n,2)}function $g(t,n){return tg(t.getUTCHours()%12||12,n,2)}function Xg(t,n){return tg(1+Ly.count(Dy(t),t),n,3)}function Gg(t,n){return tg(t.getUTCMilliseconds(),n,3)}function Wg(t,n){return Gg(t,n)+"000"}function Zg(t,n){return tg(t.getUTCMonth()+1,n,2)}function Kg(t,n){return tg(t.getUTCMinutes(),n,2)}function Qg(t,n){return tg(t.getUTCSeconds(),n,2)}function Jg(t){var n=t.getUTCDay();return 0===n?7:n}function t_(t,n){return tg(xy.count(Dy(t)-1,t),n,2)}function n_(t){var n=t.getUTCDay();return n>=4||0===n?Sy(t):Sy.ceil(t)}function e_(t,n){return t=n_(t),tg(Sy.count(Dy(t),t)+(4===Dy(t).getUTCDay()),n,2)}function r_(t){return t.getUTCDay()}function i_(t,n){return tg(wy.count(Dy(t)-1,t),n,2)}function o_(t,n){return tg(t.getUTCFullYear()%100,n,2)}function u_(t,n){return tg((t=n_(t)).getUTCFullYear()%100,n,2)}function a_(t,n){return tg(t.getUTCFullYear()%1e4,n,4)}function c_(t,n){var e=t.getUTCDay();return tg((t=e>=4||0===e?Sy(t):Sy.ceil(t)).getUTCFullYear()%1e4,n,4)}function f_(){return"+0000"}function s_(){return"%"}function l_(t){return+t}function h_(t){return Math.floor(+t/1e3)}function d_(t){return Hy=qy(t),$y=Hy.format,Xy=Hy.parse,Gy=Hy.utcFormat,Wy=Hy.utcParse,Hy}d_({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function p_(t){return new Date(t)}function v_(t){return t instanceof Date?+t:+new Date(+t)}function y_(t,n,e,r,i,o,u,a,f){var s=cv(nv,nv),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),v=f("%I:%M"),y=f("%I %p"),g=f("%a %d"),_=f("%b %d"),b=f("%B"),m=f("%Y"),x=[[u,1,1e3],[u,5,5e3],[u,15,15e3],[u,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[e,1,6048e5],[n,1,2592e6],[n,3,7776e6],[t,1,31536e6]];function w(a){return(u(a)1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return im.h=360*t-100,im.s=1.5-1.5*n,im.l=.8-.9*n,im+""},um=Qn(),am=Math.PI/3,cm=2*Math.PI/3,fm=function(t){var n;return t=(.5-t)*Math.PI,um.r=255*(n=Math.sin(t))*n,um.g=255*(n=Math.sin(t+am))*n,um.b=255*(n=Math.sin(t+cm))*n,um+""},sm=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function lm(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var hm=lm(Y_("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),dm=lm(Y_("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),pm=lm(Y_("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),vm=lm(Y_("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),ym=function(t){return Cn(an(t).call(document.documentElement))},gm=0;function _m(){return new bm}function bm(){this._="@"+(++gm).toString(36)}bm.prototype=_m.prototype={constructor:bm,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var mm=function(t){return"string"==typeof t?new An([document.querySelectorAll(t)],[document.documentElement]):new An([null==t?[]:t],Mn)},xm=function(t,n){null==n&&(n=Re().touches);for(var e=0,r=n?n.length:0,i=new Array(r);e1?0:t<-1?Om:Math.acos(t)}function zm(t){return t>=1?Nm:t<=-1?-Nm:Math.asin(t)}function Pm(t){return t.innerRadius}function Lm(t){return t.outerRadius}function Im(t){return t.startAngle}function Fm(t){return t.endAngle}function Dm(t){return t&&t.padAngle}function Bm(t,n,e,r,i,o,u,a){var c=e-t,f=r-n,s=u-i,l=a-o,h=l*c-s*f;if(!(h*h<1e-12))return[t+(h=(s*(n-o)-l*(t-i))/h)*c,n+h*f]}function Um(t,n,e,r,i,o,u){var a=t-e,c=n-r,f=(u?o:-o)/Tm(a*a+c*c),s=f*c,l=-f*a,h=t+s,d=n+l,p=e+s,v=r+l,y=(h+p)/2,g=(d+v)/2,_=p-h,b=v-d,m=_*_+b*b,x=i-o,w=h*v-p*d,M=(b<0?-1:1)*Tm(km(0,x*x*m-w*w)),A=(w*b-_*M)/m,S=(-w*_-b*M)/m,k=(w*b+_*M)/m,C=(-w*_+b*M)/m,E=A-y,T=S-g,O=k-y,N=C-g;return E*E+T*T>O*O+N*N&&(A=k,S=C),{cx:A,cy:S,x01:-s,y01:-l,x11:A*(i/x-1),y11:S*(i/x-1)}}var Ym=function(){var t=Pm,n=Lm,e=wm(0),r=null,i=Im,o=Fm,u=Dm,a=null;function c(){var c,f,s=+t.apply(this,arguments),l=+n.apply(this,arguments),h=i.apply(this,arguments)-Nm,d=o.apply(this,arguments)-Nm,p=Mm(d-h),v=d>h;if(a||(a=c=$i()),l1e-12)if(p>jm-1e-12)a.moveTo(l*Sm(h),l*Em(h)),a.arc(0,0,l,h,d,!v),s>1e-12&&(a.moveTo(s*Sm(d),s*Em(d)),a.arc(0,0,s,d,h,v));else{var y,g,_=h,b=d,m=h,x=d,w=p,M=p,A=u.apply(this,arguments)/2,S=A>1e-12&&(r?+r.apply(this,arguments):Tm(s*s+l*l)),k=Cm(Mm(l-s)/2,+e.apply(this,arguments)),C=k,E=k;if(S>1e-12){var T=zm(S/s*Em(A)),O=zm(S/l*Em(A));(w-=2*T)>1e-12?(m+=T*=v?1:-1,x-=T):(w=0,m=x=(h+d)/2),(M-=2*O)>1e-12?(_+=O*=v?1:-1,b-=O):(M=0,_=b=(h+d)/2)}var N=l*Sm(_),j=l*Em(_),R=s*Sm(x),z=s*Em(x);if(k>1e-12){var P,L=l*Sm(b),I=l*Em(b),F=s*Sm(m),D=s*Em(m);if(p1e-12?E>1e-12?(y=Um(F,D,N,j,l,E,v),g=Um(L,I,R,z,l,E,v),a.moveTo(y.cx+y.x01,y.cy+y.y01),E1e-12&&w>1e-12?C>1e-12?(y=Um(R,z,L,I,s,-C,v),g=Um(N,j,F,D,s,-C,v),a.lineTo(y.cx+y.x01,y.cy+y.y01),C=s;--l)a.point(y[l],g[l]);a.lineEnd(),a.areaEnd()}v&&(y[f]=+t(h,f,c),g[f]=+e(h,f,c),a.point(n?+n(h,f,c):y[f],r?+r(h,f,c):g[f]))}if(d)return a=null,d+""||null}function f(){return Xm().defined(i).curve(u).context(o)}return c.x=function(e){return arguments.length?(t="function"==typeof e?e:wm(+e),n=null,c):t},c.x0=function(n){return arguments.length?(t="function"==typeof n?n:wm(+n),c):t},c.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:wm(+t),c):n},c.y=function(t){return arguments.length?(e="function"==typeof t?t:wm(+t),r=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:wm(+t),c):e},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:wm(+t),c):r},c.lineX0=c.lineY0=function(){return f().x(t).y(e)},c.lineY1=function(){return f().x(t).y(r)},c.lineX1=function(){return f().x(n).y(e)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:wm(!!t),c):i},c.curve=function(t){return arguments.length?(u=t,null!=o&&(a=u(o)),c):u},c.context=function(t){return arguments.length?(null==t?o=a=null:a=u(o=t),c):o},c},Wm=function(t,n){return nt?1:n>=t?0:NaN},Zm=function(t){return t},Km=function(){var t=Zm,n=Wm,e=null,r=wm(0),i=wm(jm),o=wm(0);function u(u){var a,c,f,s,l,h=u.length,d=0,p=new Array(h),v=new Array(h),y=+r.apply(this,arguments),g=Math.min(jm,Math.max(-jm,i.apply(this,arguments)-y)),_=Math.min(Math.abs(g)/h,o.apply(this,arguments)),b=_*(g<0?-1:1);for(a=0;a0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(v[t],v[e])})):null!=e&&p.sort((function(t,n){return e(u[t],u[n])})),a=0,f=d?(g-h*b)/d:0;a0?l*f:0)+b,v[c]={data:u[c],index:a,value:l,startAngle:y,endAngle:s,padAngle:_};return v}return u.value=function(n){return arguments.length?(t="function"==typeof n?n:wm(+n),u):t},u.sortValues=function(t){return arguments.length?(n=t,e=null,u):n},u.sort=function(t){return arguments.length?(e=t,n=null,u):e},u.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:wm(+t),u):r},u.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:wm(+t),u):i},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:wm(+t),u):o},u},Qm=tx(qm);function Jm(t){this._curve=t}function tx(t){function n(n){return new Jm(t(n))}return n._curve=t,n}function nx(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(tx(t)):n()._curve},t}Jm.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 ex=function(){return nx(Xm().curve(Qm))},rx=function(){var t=Gm().curve(Qm),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=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 nx(e())},delete t.lineX0,t.lineEndAngle=function(){return nx(r())},delete t.lineX1,t.lineInnerRadius=function(){return nx(i())},delete t.lineY0,t.lineOuterRadius=function(){return nx(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(tx(t)):n()._curve},t},ix=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},ox=Array.prototype.slice;function ux(t){return t.source}function ax(t){return t.target}function cx(t){var n=ux,e=ax,r=Hm,i=$m,o=null;function u(){var u,a=ox.call(arguments),c=n.apply(this,a),f=e.apply(this,a);if(o||(o=u=$i()),t(o,+r.apply(this,(a[0]=c,a)),+i.apply(this,a),+r.apply(this,(a[0]=f,a)),+i.apply(this,a)),u)return o=null,u+""||null}return u.source=function(t){return arguments.length?(n=t,u):n},u.target=function(t){return arguments.length?(e=t,u):e},u.x=function(t){return arguments.length?(r="function"==typeof t?t:wm(+t),u):r},u.y=function(t){return arguments.length?(i="function"==typeof t?t:wm(+t),u):i},u.context=function(t){return arguments.length?(o=null==t?null:t,u):o},u}function fx(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function sx(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function lx(t,n,e,r,i){var o=ix(n,e),u=ix(n,e=(e+i)/2),a=ix(r,e),c=ix(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(u[0],u[1],a[0],a[1],c[0],c[1])}function hx(){return cx(fx)}function dx(){return cx(sx)}function px(){var t=cx(lx);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var vx={draw:function(t,n){var e=Math.sqrt(n/Om);t.moveTo(e,0),t.arc(0,0,e,0,jm)}},yx={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()}},gx=Math.sqrt(1/3),_x=2*gx,bx={draw:function(t,n){var e=Math.sqrt(n/_x),r=e*gx;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},mx=Math.sin(Om/10)/Math.sin(7*Om/10),xx=Math.sin(jm/10)*mx,wx=-Math.cos(jm/10)*mx,Mx={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=xx*e,i=wx*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var u=jm*o/5,a=Math.cos(u),c=Math.sin(u);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},Ax={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},Sx=Math.sqrt(3),kx={draw:function(t,n){var e=-Math.sqrt(n/(3*Sx));t.moveTo(0,2*e),t.lineTo(-Sx*e,-e),t.lineTo(Sx*e,-e),t.closePath()}},Cx=Math.sqrt(3)/2,Ex=1/Math.sqrt(12),Tx=3*(Ex/2+1),Ox={draw:function(t,n){var e=Math.sqrt(n/Tx),r=e/2,i=e*Ex,o=r,u=e*Ex+e,a=-o,c=u;t.moveTo(r,i),t.lineTo(o,u),t.lineTo(a,c),t.lineTo(-.5*r-Cx*i,Cx*r+-.5*i),t.lineTo(-.5*o-Cx*u,Cx*o+-.5*u),t.lineTo(-.5*a-Cx*c,Cx*a+-.5*c),t.lineTo(-.5*r+Cx*i,-.5*i-Cx*r),t.lineTo(-.5*o+Cx*u,-.5*u-Cx*o),t.lineTo(-.5*a+Cx*c,-.5*c-Cx*a),t.closePath()}},Nx=[vx,yx,bx,Ax,Mx,kx,Ox],jx=function(){var t=wm(vx),n=wm(64),e=null;function r(){var r;if(e||(e=r=$i()),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:wm(n),r):t},r.size=function(t){return arguments.length?(n="function"==typeof t?t:wm(+t),r):n},r.context=function(t){return arguments.length?(e=null==t?null:t,r):e},r},Rx=function(){};function zx(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 Px(t){this._context=t}Px.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:zx(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:zx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Lx=function(t){return new Px(t)};function Ix(t){this._context=t}Ix.prototype={areaStart:Rx,areaEnd:Rx,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:zx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Fx=function(t){return new Ix(t)};function Dx(t){this._context=t}Dx.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:zx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Bx=function(t){return new Dx(t)};function Ux(t,n){this._basis=new Px(t),this._beta=n}Ux.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],o=n[0],u=t[e]-i,a=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*u),this._beta*n[c]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Yx=function t(n){function e(t){return 1===n?new Px(t):new Ux(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Vx(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 qx(t,n){this._context=t,this._k=(1-n)/6}qx.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:Vx(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:Vx(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 Hx=function t(n){function e(t){return new qx(t,n)}return e.tension=function(n){return t(+n)},e}(0);function $x(t,n){this._context=t,this._k=(1-n)/6}$x.prototype={areaStart:Rx,areaEnd:Rx,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:Vx(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 Xx=function t(n){function e(t){return new $x(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Gx(t,n){this._context=t,this._k=(1-n)/6}Gx.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:Vx(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 Wx=function t(n){function e(t){return new Gx(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Zx(t,n,e){var r=t._x1,i=t._y1,o=t._x2,u=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 f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-n*t._l12_2a)/s,u=(u*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,o,u,t._x2,t._y2)}function Kx(t,n){this._context=t,this._alpha=n}Kx.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:Zx(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 Qx=function t(n){function e(t){return n?new Kx(t,n):new qx(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Jx(t,n){this._context=t,this._alpha=n}Jx.prototype={areaStart:Rx,areaEnd:Rx,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:Zx(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 tw=function t(n){function e(t){return n?new Jx(t,n):new $x(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function nw(t,n){this._context=t,this._alpha=n}nw.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:Zx(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 ew=function t(n){function e(t){return n?new nw(t,n):new Gx(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function rw(t){this._context=t}rw.prototype={areaStart:Rx,areaEnd:Rx,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 iw=function(t){return new rw(t)};function ow(t){return t<0?-1:1}function uw(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),u=(e-t._y1)/(i||r<0&&-0),a=(o*i+u*r)/(r+i);return(ow(o)+ow(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function aw(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function cw(t,n,e){var r=t._x0,i=t._y0,o=t._x1,u=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*n,o-a,u-a*e,o,u)}function fw(t){this._context=t}function sw(t){this._context=new lw(t)}function lw(t){this._context=t}function hw(t){return new fw(t)}function dw(t){return new sw(t)}function pw(t){this._context=t}function vw(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),u=new Array(r);for(i[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(u[n]-i[n+1])/o[n];for(o[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 _w=function(t){return new gw(t,.5)};function bw(t){return new gw(t,0)}function mw(t){return new gw(t,1)}var xw=function(t,n){if((i=t.length)>1)for(var e,r,i,o=1,u=t[n[0]],a=u.length;o=0;)e[n]=n;return e};function Mw(t,n){return t[n]}var Aw=function(){var t=wm([]),n=ww,e=xw,r=Mw;function i(i){var o,u,a=t.apply(this,arguments),c=i.length,f=a.length,s=new Array(f);for(o=0;o0){for(var e,r,i,o=0,u=t[0].length;o0)for(var e,r,i,o,u,a,c=0,f=t[n[0]].length;c0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=u,r[0]=u+=i):(r[0]=0,r[1]=i)},Cw=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,u=1;uo&&(o=n,r=e);return r}var Nw=function(t){var n=t.map(jw);return ww(t).sort((function(t,e){return n[t]-n[e]}))};function jw(t){for(var n,e=0,r=-1,i=t.length;++r0)){if(o/=h,h<0){if(o0){if(o>l)return;o>s&&(s=o)}if(o=r-c,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>s&&(s=o)}else if(h>0){if(o0)){if(o/=d,d<0){if(o0){if(o>l)return;o>s&&(s=o)}if(o=i-f,d||!(o<0)){if(o/=d,d<0){if(o>l)return;o>s&&(s=o)}else if(d>0){if(o0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function Qw(t,n,e,r,i){var o=t[1];if(o)return!0;var u,a,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,y=(h+p)/2;if(p===h){if(v=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,e];o=[v,i]}else{if(c){if(c[1]1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-a)/u,e];o=[(i-a)/u,i]}else{if(c){if(c[1]=r)return}else c=[n,u*n+a];o=[r,u*r+a]}else{if(c){if(c[0]=-mM)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,y=(c*p-s*d)/h,g=rM.pop()||new iM;g.arc=t,g.site=i,g.x=v+u,g.y=(g.cy=y+a)+Math.sqrt(v*v+y*y),t.circle=g;for(var _=null,b=gM._;b;)if(g.ybM)a=a.L;else{if(!((i=o-pM(a,u))>bM)){r>-bM?(n=a.P,e=a):i>-bM?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){yM[t.index]={site:t,halfedges:[]}}(t);var c=fM(t);if(vM.insert(n,c),n||e){if(n===e)return uM(n),e=fM(n.site),vM.insert(c,e),c.edge=e.edge=Gw(n.site,c.site),oM(n),void oM(e);if(e){uM(n),uM(e);var f=n.site,s=f[0],l=f[1],h=t[0]-s,d=t[1]-l,p=e.site,v=p[0]-s,y=p[1]-l,g=2*(h*y-d*v),_=h*h+d*d,b=v*v+y*y,m=[(y*_-d*b)/g+s,(h*b-v*_)/g+l];Zw(e.edge,f,p,m),c.edge=Gw(f,t,null,m),e.edge=Gw(t,p,null,m),oM(n),oM(e)}else c.edge=Gw(n.site,c.site)}}function dM(t,n){var e=t.site,r=e[0],i=e[1],o=i-n;if(!o)return r;var u=t.P;if(!u)return-1/0;var a=(e=u.site)[0],c=e[1],f=c-n;if(!f)return a;var s=a-r,l=1/o-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-o/2)))/l+r:(r+a)/2}function pM(t,n){var e=t.N;if(e)return dM(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var vM,yM,gM,_M,bM=1e-6,mM=1e-12;function xM(t,n){return n[1]-t[1]||n[0]-t[0]}function wM(t,n){var e,r,i,o=t.sort(xM).pop();for(_M=[],yM=new Array(t.length),vM=new Xw,gM=new Xw;;)if(i=eM,o&&(!i||o[1]bM||Math.abs(i[0][1]-i[1][1])>bM)||delete _M[o]}(u,a,c,f),function(t,n,e,r){var i,o,u,a,c,f,s,l,h,d,p,v,y=yM.length,g=!0;for(i=0;ibM||Math.abs(v-h)>bM)&&(c.splice(a,0,_M.push(Ww(u,d,Math.abs(p-t)bM?[t,Math.abs(l-t)bM?[Math.abs(h-r)bM?[e,Math.abs(l-e)bM?[Math.abs(h-n)=a)return null;var c=t-i.site[0],f=n-i.site[1],s=c*c+f*f;do{i=o.cells[r=u],u=null,i.halfedges.forEach((function(e){var r=o.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=t-a[0],f=n-a[1],l=c*c+f*f;lr?(r+i)/2:Math.min(0,r)||Math.max(0,i),u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u))}var IM,FM=function(){var t,n,e=NM,r=jM,i=LM,o=zM,u=PM,a=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,s=yp,l=pt("start","zoom","end"),h=0;function d(t){t.property("__zoom",RM).on("wheel.zoom",m).on("mousedown.zoom",x).on("dblclick.zoom",w).filter(u).on("touchstart.zoom",M).on("touchmove.zoom",A).on("touchend.zoom touchcancel.zoom",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(t,n){return(n=Math.max(a[0],Math.min(a[1],n)))===t.k?t:new kM(n,t.x,t.y)}function v(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new kM(t.k,r,i)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function g(t,n,e){t.on("start.zoom",(function(){_(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){_(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,o=_(t,i),u=r.apply(t,i),a=null==e?y(u):"function"==typeof e?e.apply(t,i):e,c=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),f=t.__zoom,l="function"==typeof n?n.apply(t,i):n,h=s(f.invert(a).concat(c/f.k),l.invert(a).concat(c/l.k));return function(t){if(1===t)t=l;else{var n=h(t),e=c/n[2];t=new kM(e,a[0]-n[0]*e,a[1]-n[1]*e)}o.zoom(null,t)}}))}function _(t,n,e){return!e&&t.__zooming||new b(t,n)}function b(t,n){this.that=t,this.args=n,this.active=0,this.extent=r.apply(t,n),this.taps=0}function m(){if(e.apply(this,arguments)){var t=_(this,arguments),n=this.__zoom,r=Math.max(a[0],Math.min(a[1],n.k*Math.pow(2,o.apply(this,arguments)))),u=Le(this);if(t.wheel)t.mouse[0][0]===u[0]&&t.mouse[0][1]===u[1]||(t.mouse[1]=n.invert(t.mouse[0]=u)),clearTimeout(t.wheel);else{if(n.k===r)return;t.mouse=[u,n.invert(u)],sr(this),t.start()}OM(),t.wheel=setTimeout(f,150),t.zoom("mouse",i(v(p(n,r),t.mouse[0],t.mouse[1]),t.extent,c))}function f(){t.wheel=null,t.end()}}function x(){if(!n&&e.apply(this,arguments)){var t=_(this,arguments,!0),r=Cn(dn.view).on("mousemove.zoom",f,!0).on("mouseup.zoom",s,!0),o=Le(this),u=dn.clientX,a=dn.clientY;On(dn.view),TM(),t.mouse=[o,this.__zoom.invert(o)],sr(this),t.start()}function f(){if(OM(),!t.moved){var n=dn.clientX-u,e=dn.clientY-a;t.moved=n*n+e*e>h}t.zoom("mouse",i(v(t.that.__zoom,t.mouse[0]=Le(t.that),t.mouse[1]),t.extent,c))}function s(){r.on("mousemove.zoom mouseup.zoom",null),Nn(dn.view,t.moved),OM(),t.end()}}function w(){if(e.apply(this,arguments)){var t=this.__zoom,n=Le(this),o=t.invert(n),u=t.k*(dn.shiftKey?.5:2),a=i(v(p(t,u),n,o),r.apply(this,arguments),c);OM(),f>0?Cn(this).transition().duration(f).call(g,a,n):Cn(this).call(d.transform,a)}}function M(){if(e.apply(this,arguments)){var n,r,i,o,u=dn.touches,a=u.length,c=_(this,arguments,dn.changedTouches.length===a);for(TM(),r=0;ri&&this.series[r].datapoints.shift()}for(r=0;rt[0][0]?"green":t[1][0]=t.length?t.length-1:(u>0&&Math.abs(i-t[u-1][r])c/2},n.prototype.onMouseOver=function(){this.crosshair.style("display",null),this.crosshair.selectAll(".crosshair-circle").style("display",null)},n.prototype.onMouseOut=function(){void 0!==this.options.eventsCallbacks&&void 0!==this.options.eventsCallbacks.mouseOut&&this.options.eventsCallbacks.mouseOut(),this.crosshair.style("display","none")},n.prototype.zoomOut=function(){if(!0!==this.isOutOfChart()){var t=this.options.zoomEvents.mouse.zoom.orientation,n=this.state.xValueRange[1]-this.state.xValueRange[0],e=this.state.yValueRange[1]-this.state.yValueRange[0];switch(t){case o.BrushOrientation.HORIZONTAL:this.state.xValueRange=[this.state.xValueRange[0]-n/2,this.state.xValueRange[1]+n/2];break;case o.BrushOrientation.VERTICAL:this.state.yValueRange=[this.state.yValueRange[0]-e/2,this.state.yValueRange[1]+e/2];break;case o.BrushOrientation.RECTANGLE:case o.BrushOrientation.SQUARE:this.state.xValueRange=[this.state.xValueRange[0]-n/2,this.state.xValueRange[1]+n/2],this.state.yValueRange=[this.state.yValueRange[0]-e/2,this.state.yValueRange[1]+e/2];break;default:throw new Error("Unknown type of orientation: "+t+", path: options.zoomEvents.mouse.zoom.orientation")}if(this.renderMetrics(),this.renderXAxis(),this.renderYAxis(),this.renderGrid(),this.onMouseOver(),void 0!==this.options.eventsCallbacks&&void 0!==this.options.eventsCallbacks.zoomOut){var r={x:this.xScale.invert(this.width/2),y:this.yScale.invert(this.height/2)};this.options.eventsCallbacks.zoomOut(r)}}},n}(o.ChartwerkPod),YM={render:function(t){return t("div",{class:{"chartwerk-line-chart":!0},attrs:{id:this.id}})},mixins:[o.VueChartwerkPodMixin],methods:{render:function(){void 0===this.pod?(this.pod=new UM(document.getElementById(this.id),this.series,this.options),this.pod.render()):this.pod.updateData(this.series,this.options)},renderSharedCrosshair:function(t){this.pod.renderSharedCrosshair(t)},hideSharedCrosshair:function(){this.pod.hideSharedCrosshair()}}}}])})); \ No newline at end of file + */(function(){var o="Expected a function",u="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",f="[object Array]",s="[object Boolean]",l="[object Date]",h="[object Error]",d="[object Function]",p="[object GeneratorFunction]",v="[object Map]",y="[object Number]",g="[object Object]",_="[object RegExp]",b="[object Set]",m="[object String]",x="[object Symbol]",w="[object WeakMap]",M="[object ArrayBuffer]",A="[object DataView]",S="[object Float32Array]",k="[object Float64Array]",C="[object Int8Array]",E="[object Int16Array]",T="[object Int32Array]",O="[object Uint8Array]",N="[object Uint16Array]",j="[object Uint32Array]",R=/\b__p \+= '';/g,z=/\b(__p \+=) '' \+/g,P=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,I=/[&<>"']/g,F=RegExp(L.source),D=RegExp(I.source),B=/<%-([\s\S]+?)%>/g,U=/<%([\s\S]+?)%>/g,Y=/<%=([\s\S]+?)%>/g,V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,q=/^\w*$/,H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$=/[\\^$.*+?()[\]{}|]/g,X=RegExp($.source),G=/^\s+/,W=/\s/,Z=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,K=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,J=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tt=/[()=,{}\[\]\/\s]/,nt=/\\(\\)?/g,et=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,ut=/^\[object .+?Constructor\]$/,at=/^0o[0-7]+$/i,ct=/^(?:0|[1-9]\d*)$/,ft=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,st=/($^)/,lt=/['\n\r\u2028\u2029\\]/g,ht="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",dt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pt="[\\ud800-\\udfff]",vt="["+dt+"]",yt="["+ht+"]",gt="\\d+",_t="[\\u2700-\\u27bf]",bt="[a-z\\xdf-\\xf6\\xf8-\\xff]",mt="[^\\ud800-\\udfff"+dt+gt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",xt="\\ud83c[\\udffb-\\udfff]",wt="[^\\ud800-\\udfff]",Mt="(?:\\ud83c[\\udde6-\\uddff]){2}",At="[\\ud800-\\udbff][\\udc00-\\udfff]",St="[A-Z\\xc0-\\xd6\\xd8-\\xde]",kt="(?:"+bt+"|"+mt+")",Ct="(?:"+St+"|"+mt+")",Et="(?:"+yt+"|"+xt+")"+"?",Tt="[\\ufe0e\\ufe0f]?"+Et+("(?:\\u200d(?:"+[wt,Mt,At].join("|")+")[\\ufe0e\\ufe0f]?"+Et+")*"),Ot="(?:"+[_t,Mt,At].join("|")+")"+Tt,Nt="(?:"+[wt+yt+"?",yt,Mt,At,pt].join("|")+")",jt=RegExp("['’]","g"),Rt=RegExp(yt,"g"),zt=RegExp(xt+"(?="+xt+")|"+Nt+Tt,"g"),Pt=RegExp([St+"?"+bt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[vt,St,"$"].join("|")+")",Ct+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[vt,St+kt,"$"].join("|")+")",St+"?"+kt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",St+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gt,Ot].join("|"),"g"),Lt=RegExp("[\\u200d\\ud800-\\udfff"+ht+"\\ufe0e\\ufe0f]"),It=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ft=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Dt=-1,Bt={};Bt[S]=Bt[k]=Bt[C]=Bt[E]=Bt[T]=Bt[O]=Bt["[object Uint8ClampedArray]"]=Bt[N]=Bt[j]=!0,Bt[c]=Bt[f]=Bt[M]=Bt[s]=Bt[A]=Bt[l]=Bt[h]=Bt[d]=Bt[v]=Bt[y]=Bt[g]=Bt[_]=Bt[b]=Bt[m]=Bt[w]=!1;var Ut={};Ut[c]=Ut[f]=Ut[M]=Ut[A]=Ut[s]=Ut[l]=Ut[S]=Ut[k]=Ut[C]=Ut[E]=Ut[T]=Ut[v]=Ut[y]=Ut[g]=Ut[_]=Ut[b]=Ut[m]=Ut[x]=Ut[O]=Ut["[object Uint8ClampedArray]"]=Ut[N]=Ut[j]=!0,Ut[h]=Ut[d]=Ut[w]=!1;var Yt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,qt=parseInt,Ht="object"==typeof t&&t&&t.Object===Object&&t,$t="object"==typeof self&&self&&self.Object===Object&&self,Xt=Ht||$t||Function("return this")(),Gt=n&&!n.nodeType&&n,Wt=Gt&&"object"==typeof r&&r&&!r.nodeType&&r,Zt=Wt&&Wt.exports===Gt,Kt=Zt&&Ht.process,Qt=function(){try{var t=Wt&&Wt.require&&Wt.require("util").types;return t||Kt&&Kt.binding&&Kt.binding("util")}catch(t){}}(),Jt=Qt&&Qt.isArrayBuffer,tn=Qt&&Qt.isDate,nn=Qt&&Qt.isMap,en=Qt&&Qt.isRegExp,rn=Qt&&Qt.isSet,on=Qt&&Qt.isTypedArray;function un(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function an(t,n,e,r){for(var i=-1,o=null==t?0:t.length;++i-1}function dn(t,n,e){for(var r=-1,i=null==t?0:t.length;++r-1;);return e}function Ln(t,n){for(var e=t.length;e--&&wn(n,t[e],0)>-1;);return e}function In(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}var Fn=Cn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Dn=Cn({"&":"&","<":"<",">":">",'"':""","'":"'"});function Bn(t){return"\\"+Yt[t]}function Un(t){return Lt.test(t)}function Yn(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function Vn(t,n){return function(e){return t(n(e))}}function qn(t,n){for(var e=-1,r=t.length,i=0,o=[];++e",""":'"',"'":"'"});var Kn=function t(n){var e,r=(n=null==n?Xt:Kn.defaults(Xt.Object(),n,Kn.pick(Xt,Ft))).Array,i=n.Date,W=n.Error,ht=n.Function,dt=n.Math,pt=n.Object,vt=n.RegExp,yt=n.String,gt=n.TypeError,_t=r.prototype,bt=ht.prototype,mt=pt.prototype,xt=n["__core-js_shared__"],wt=bt.toString,Mt=mt.hasOwnProperty,At=0,St=(e=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",kt=mt.toString,Ct=wt.call(pt),Et=Xt._,Tt=vt("^"+wt.call(Mt).replace($,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ot=Zt?n.Buffer:void 0,Nt=n.Symbol,zt=n.Uint8Array,Lt=Ot?Ot.allocUnsafe:void 0,Yt=Vn(pt.getPrototypeOf,pt),Ht=pt.create,$t=mt.propertyIsEnumerable,Gt=_t.splice,Wt=Nt?Nt.isConcatSpreadable:void 0,Kt=Nt?Nt.iterator:void 0,Qt=Nt?Nt.toStringTag:void 0,bn=function(){try{var t=to(pt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Cn=n.clearTimeout!==Xt.clearTimeout&&n.clearTimeout,Qn=i&&i.now!==Xt.Date.now&&i.now,Jn=n.setTimeout!==Xt.setTimeout&&n.setTimeout,te=dt.ceil,ne=dt.floor,ee=pt.getOwnPropertySymbols,re=Ot?Ot.isBuffer:void 0,ie=n.isFinite,oe=_t.join,ue=Vn(pt.keys,pt),ae=dt.max,ce=dt.min,fe=i.now,se=n.parseInt,le=dt.random,he=_t.reverse,de=to(n,"DataView"),pe=to(n,"Map"),ve=to(n,"Promise"),ye=to(n,"Set"),ge=to(n,"WeakMap"),_e=to(pt,"create"),be=ge&&new ge,me={},xe=Eo(de),we=Eo(pe),Me=Eo(ve),Ae=Eo(ye),Se=Eo(ge),ke=Nt?Nt.prototype:void 0,Ce=ke?ke.valueOf:void 0,Ee=ke?ke.toString:void 0;function Te(t){if(Hu(t)&&!zu(t)&&!(t instanceof Re)){if(t instanceof je)return t;if(Mt.call(t,"__wrapped__"))return To(t)}return new je(t)}var Oe=function(){function t(){}return function(n){if(!qu(n))return{};if(Ht)return Ht(n);t.prototype=n;var e=new t;return t.prototype=void 0,e}}();function Ne(){}function je(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=void 0}function Re(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function ze(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n=n?t:n)),t}function Ke(t,n,e,r,i,o){var u,a=1&n,f=2&n,h=4&n;if(e&&(u=i?e(t,r,i,o):e(t)),void 0!==u)return u;if(!qu(t))return t;var w=zu(t);if(w){if(u=function(t){var n=t.length,e=new t.constructor(n);n&&"string"==typeof t[0]&&Mt.call(t,"index")&&(e.index=t.index,e.input=t.input);return e}(t),!a)return _i(t,u)}else{var R=ro(t),z=R==d||R==p;if(Fu(t))return hi(t,a);if(R==g||R==c||z&&!i){if(u=f||z?{}:oo(t),!a)return f?function(t,n){return bi(t,eo(t),n)}(t,function(t,n){return t&&bi(n,wa(n),t)}(u,t)):function(t,n){return bi(t,no(t),n)}(t,Xe(u,t))}else{if(!Ut[R])return i?t:{};u=function(t,n,e){var r=t.constructor;switch(n){case M:return di(t);case s:case l:return new r(+t);case A:return function(t,n){var e=n?di(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case S:case k:case C:case E:case T:case O:case"[object Uint8ClampedArray]":case N:case j:return pi(t,e);case v:return new r;case y:case m:return new r(t);case _:return function(t){var n=new t.constructor(t.source,rt.exec(t));return n.lastIndex=t.lastIndex,n}(t);case b:return new r;case x:return i=t,Ce?pt(Ce.call(i)):{}}var i}(t,R,a)}}o||(o=new Fe);var P=o.get(t);if(P)return P;o.set(t,u),Zu(t)?t.forEach((function(r){u.add(Ke(r,n,e,r,t,o))})):$u(t)&&t.forEach((function(r,i){u.set(i,Ke(r,n,e,i,t,o))}));var L=w?void 0:(h?f?Xi:$i:f?wa:xa)(t);return cn(L||t,(function(r,i){L&&(r=t[i=r]),qe(u,i,Ke(r,n,e,i,t,o))})),u}function Qe(t,n,e){var r=e.length;if(null==t)return!r;for(t=pt(t);r--;){var i=e[r],o=n[i],u=t[i];if(void 0===u&&!(i in t)||!o(u))return!1}return!0}function Je(t,n,e){if("function"!=typeof t)throw new gt(o);return xo((function(){t.apply(void 0,e)}),n)}function tr(t,n,e,r){var i=-1,o=hn,u=!0,a=t.length,c=[],f=n.length;if(!a)return c;e&&(n=pn(n,jn(e))),r?(o=dn,u=!1):n.length>=200&&(o=zn,u=!1,n=new Ie(n));t:for(;++i-1},Pe.prototype.set=function(t,n){var e=this.__data__,r=He(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this},Le.prototype.clear=function(){this.size=0,this.__data__={hash:new ze,map:new(pe||Pe),string:new ze}},Le.prototype.delete=function(t){var n=Qi(this,t).delete(t);return this.size-=n?1:0,n},Le.prototype.get=function(t){return Qi(this,t).get(t)},Le.prototype.has=function(t){return Qi(this,t).has(t)},Le.prototype.set=function(t,n){var e=Qi(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this},Ie.prototype.add=Ie.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Ie.prototype.has=function(t){return this.__data__.has(t)},Fe.prototype.clear=function(){this.__data__=new Pe,this.size=0},Fe.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Fe.prototype.get=function(t){return this.__data__.get(t)},Fe.prototype.has=function(t){return this.__data__.has(t)},Fe.prototype.set=function(t,n){var e=this.__data__;if(e instanceof Pe){var r=e.__data__;if(!pe||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new Le(r)}return e.set(t,n),this.size=e.size,this};var nr=wi(fr),er=wi(sr,!0);function rr(t,n){var e=!0;return nr(t,(function(t,r,i){return e=!!n(t,r,i)})),e}function ir(t,n,e){for(var r=-1,i=t.length;++r0&&e(a)?n>1?ur(a,n-1,e,r,i):vn(i,a):r||(i[i.length]=a)}return i}var ar=Mi(),cr=Mi(!0);function fr(t,n){return t&&ar(t,n,xa)}function sr(t,n){return t&&cr(t,n,xa)}function lr(t,n){return ln(n,(function(n){return Uu(t[n])}))}function hr(t,n){for(var e=0,r=(n=ci(n,t)).length;null!=t&&en}function yr(t,n){return null!=t&&Mt.call(t,n)}function gr(t,n){return null!=t&&n in pt(t)}function _r(t,n,e){for(var i=e?dn:hn,o=t[0].length,u=t.length,a=u,c=r(u),f=1/0,s=[];a--;){var l=t[a];a&&n&&(l=pn(l,jn(n))),f=ce(l.length,f),c[a]=!e&&(n||o>=120&&l.length>=120)?new Ie(a&&l):void 0}l=t[0];var h=-1,d=c[0];t:for(;++h=a)return c;var f=e[r];return c*("desc"==f?-1:1)}}return t.index-n.index}(t,n,e)}))}function zr(t,n,e){for(var r=-1,i=n.length,o={};++r-1;)a!==t&&Gt.call(a,c,1),Gt.call(t,c,1);return t}function Lr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var i=n[e];if(e==r||i!==o){var o=i;ao(i)?Gt.call(t,i,1):ti(t,i)}}return t}function Ir(t,n){return t+ne(le()*(n-t+1))}function Fr(t,n){var e="";if(!t||n<1||n>9007199254740991)return e;do{n%2&&(e+=t),(n=ne(n/2))&&(t+=t)}while(n);return e}function Dr(t,n){return wo(yo(t,n,Xa),t+"")}function Br(t){return Be(Oa(t))}function Ur(t,n){var e=Oa(t);return So(e,Ze(n,0,e.length))}function Yr(t,n,e,r){if(!qu(t))return t;for(var i=-1,o=(n=ci(n,t)).length,u=o-1,a=t;null!=a&&++io?0:o+n),(e=e>o?o:e)<0&&(e+=o),o=n>e?0:e-n>>>0,n>>>=0;for(var u=r(o);++i>>1,u=t[o];null!==u&&!Qu(u)&&(e?u<=n:u=200){var f=n?null:Fi(t);if(f)return Hn(f);u=!1,i=zn,c=new Ie}else c=n?[]:a;t:for(;++r=r?t:$r(t,n,e)}var li=Cn||function(t){return Xt.clearTimeout(t)};function hi(t,n){if(n)return t.slice();var e=t.length,r=Lt?Lt(e):new t.constructor(e);return t.copy(r),r}function di(t){var n=new t.constructor(t.byteLength);return new zt(n).set(new zt(t)),n}function pi(t,n){var e=n?di(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function vi(t,n){if(t!==n){var e=void 0!==t,r=null===t,i=t==t,o=Qu(t),u=void 0!==n,a=null===n,c=n==n,f=Qu(n);if(!a&&!f&&!o&&t>n||o&&u&&c&&!a&&!f||r&&u&&c||!e&&c||!i)return 1;if(!r&&!o&&!f&&t1?e[i-1]:void 0,u=i>2?e[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,u&&co(e[0],e[1],u)&&(o=i<3?void 0:o,i=1),n=pt(n);++r-1?i[o?n[u]:u]:void 0}}function Ei(t){return Hi((function(n){var e=n.length,r=e,i=je.prototype.thru;for(t&&n.reverse();r--;){var u=n[r];if("function"!=typeof u)throw new gt(o);if(i&&!a&&"wrapper"==Wi(u))var a=new je([],!0)}for(r=a?r:e;++r1&&b.reverse(),l&&f<_&&(b.length=f),this&&this!==Xt&&this instanceof g&&(S=y||ki(S)),S.apply(A,b)}}function Oi(t,n){return function(e,r){return function(t,n,e,r){return fr(t,(function(t,i,o){n(r,e(t),i,o)})),r}(e,t,n(r),{})}}function Ni(t,n){return function(e,r){var i;if(void 0===e&&void 0===r)return n;if(void 0!==e&&(i=e),void 0!==r){if(void 0===i)return r;"string"==typeof e||"string"==typeof r?(e=Qr(e),r=Qr(r)):(e=Kr(e),r=Kr(r)),i=t(e,r)}return i}}function ji(t){return Hi((function(n){return n=pn(n,jn(Ki())),Dr((function(e){var r=this;return t(n,(function(t){return un(t,r,e)}))}))}))}function Ri(t,n){var e=(n=void 0===n?" ":Qr(n)).length;if(e<2)return e?Fr(n,t):n;var r=Fr(n,te(t/Xn(n)));return Un(n)?si(Gn(r),0,t).join(""):r.slice(0,t)}function zi(t){return function(n,e,i){return i&&"number"!=typeof i&&co(n,e,i)&&(e=i=void 0),n=ra(n),void 0===e?(e=n,n=0):e=ra(e),function(t,n,e,i){for(var o=-1,u=ae(te((n-t)/(e||1)),0),a=r(u);u--;)a[i?u:++o]=t,t+=e;return a}(n,e,i=void 0===i?na))return!1;var f=o.get(t),s=o.get(n);if(f&&s)return f==n&&s==t;var l=-1,h=!0,d=2&e?new Ie:void 0;for(o.set(t,n),o.set(n,t);++l-1&&t%1==0&&t1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(Z,"{\n/* [wrapped with "+n+"] */\n")}(r,function(t,n){return cn(a,(function(e){var r="_."+e[0];n&e[1]&&!hn(t,r)&&t.push(r)})),t.sort()}(function(t){var n=t.match(K);return n?n[1].split(Q):[]}(r),e)))}function Ao(t){var n=0,e=0;return function(){var r=fe(),i=16-(r-e);if(e=r,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}function So(t,n){var e=-1,r=t.length,i=r-1;for(n=void 0===n?r:n;++e1?t[n-1]:void 0;return e="function"==typeof e?(t.pop(),e):void 0,Wo(t,e)}));function eu(t){var n=Te(t);return n.__chain__=!0,n}function ru(t,n){return n(t)}var iu=Hi((function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,i=function(n){return We(n,t)};return!(n>1||this.__actions__.length)&&r instanceof Re&&ao(e)?((r=r.slice(e,+e+(n?1:0))).__actions__.push({func:ru,args:[i],thisArg:void 0}),new je(r,this.__chain__).thru((function(t){return n&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var ou=mi((function(t,n,e){Mt.call(t,e)?++t[e]:Ge(t,e,1)}));var uu=Ci(Ro),au=Ci(zo);function cu(t,n){return(zu(t)?cn:nr)(t,Ki(n,3))}function fu(t,n){return(zu(t)?fn:er)(t,Ki(n,3))}var su=mi((function(t,n,e){Mt.call(t,e)?t[e].push(n):Ge(t,e,[n])}));var lu=Dr((function(t,n,e){var i=-1,o="function"==typeof n,u=Lu(t)?r(t.length):[];return nr(t,(function(t){u[++i]=o?un(n,t,e):br(t,n,e)})),u})),hu=mi((function(t,n,e){Ge(t,e,n)}));function du(t,n){return(zu(t)?pn:Er)(t,Ki(n,3))}var pu=mi((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]}));var vu=Dr((function(t,n){if(null==t)return[];var e=n.length;return e>1&&co(t,n[0],n[1])?n=[]:e>2&&co(n[0],n[1],n[2])&&(n=[n[0]]),Rr(t,ur(n,1),[])})),yu=Qn||function(){return Xt.Date.now()};function gu(t,n,e){return n=e?void 0:n,Bi(t,128,void 0,void 0,void 0,void 0,n=t&&null==n?t.length:n)}function _u(t,n){var e;if("function"!=typeof n)throw new gt(o);return t=ia(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=void 0),e}}var bu=Dr((function(t,n,e){var r=1;if(e.length){var i=qn(e,Zi(bu));r|=32}return Bi(t,r,n,e,i)})),mu=Dr((function(t,n,e){var r=3;if(e.length){var i=qn(e,Zi(mu));r|=32}return Bi(n,r,t,e,i)}));function xu(t,n,e){var r,i,u,a,c,f,s=0,l=!1,h=!1,d=!0;if("function"!=typeof t)throw new gt(o);function p(n){var e=r,o=i;return r=i=void 0,s=n,a=t.apply(o,e)}function v(t){return s=t,c=xo(g,n),l?p(t):a}function y(t){var e=t-f;return void 0===f||e>=n||e<0||h&&t-s>=u}function g(){var t=yu();if(y(t))return _(t);c=xo(g,function(t){var e=n-(t-f);return h?ce(e,u-(t-s)):e}(t))}function _(t){return c=void 0,d&&r?p(t):(r=i=void 0,a)}function b(){var t=yu(),e=y(t);if(r=arguments,i=this,f=t,e){if(void 0===c)return v(f);if(h)return li(c),c=xo(g,n),p(f)}return void 0===c&&(c=xo(g,n)),a}return n=ua(n)||0,qu(e)&&(l=!!e.leading,u=(h="maxWait"in e)?ae(ua(e.maxWait)||0,n):u,d="trailing"in e?!!e.trailing:d),b.cancel=function(){void 0!==c&&li(c),s=0,r=f=i=c=void 0},b.flush=function(){return void 0===c?a:_(yu())},b}var wu=Dr((function(t,n){return Je(t,1,n)})),Mu=Dr((function(t,n,e){return Je(t,ua(n)||0,e)}));function Au(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new gt(o);var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var u=t.apply(this,r);return e.cache=o.set(i,u)||o,u};return e.cache=new(Au.Cache||Le),e}function Su(t){if("function"!=typeof t)throw new gt(o);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}Au.Cache=Le;var ku=fi((function(t,n){var e=(n=1==n.length&&zu(n[0])?pn(n[0],jn(Ki())):pn(ur(n,1),jn(Ki()))).length;return Dr((function(r){for(var i=-1,o=ce(r.length,e);++i=n})),Ru=mr(function(){return arguments}())?mr:function(t){return Hu(t)&&Mt.call(t,"callee")&&!$t.call(t,"callee")},zu=r.isArray,Pu=Jt?jn(Jt):function(t){return Hu(t)&&pr(t)==M};function Lu(t){return null!=t&&Vu(t.length)&&!Uu(t)}function Iu(t){return Hu(t)&&Lu(t)}var Fu=re||uc,Du=tn?jn(tn):function(t){return Hu(t)&&pr(t)==l};function Bu(t){if(!Hu(t))return!1;var n=pr(t);return n==h||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!Gu(t)}function Uu(t){if(!qu(t))return!1;var n=pr(t);return n==d||n==p||"[object AsyncFunction]"==n||"[object Proxy]"==n}function Yu(t){return"number"==typeof t&&t==ia(t)}function Vu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function qu(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function Hu(t){return null!=t&&"object"==typeof t}var $u=nn?jn(nn):function(t){return Hu(t)&&ro(t)==v};function Xu(t){return"number"==typeof t||Hu(t)&&pr(t)==y}function Gu(t){if(!Hu(t)||pr(t)!=g)return!1;var n=Yt(t);if(null===n)return!0;var e=Mt.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&wt.call(e)==Ct}var Wu=en?jn(en):function(t){return Hu(t)&&pr(t)==_};var Zu=rn?jn(rn):function(t){return Hu(t)&&ro(t)==b};function Ku(t){return"string"==typeof t||!zu(t)&&Hu(t)&&pr(t)==m}function Qu(t){return"symbol"==typeof t||Hu(t)&&pr(t)==x}var Ju=on?jn(on):function(t){return Hu(t)&&Vu(t.length)&&!!Bt[pr(t)]};var ta=Pi(Cr),na=Pi((function(t,n){return t<=n}));function ea(t){if(!t)return[];if(Lu(t))return Ku(t)?Gn(t):_i(t);if(Kt&&t[Kt])return function(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}(t[Kt]());var n=ro(t);return(n==v?Yn:n==b?Hn:Oa)(t)}function ra(t){return t?(t=ua(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ia(t){var n=ra(t),e=n%1;return n==n?e?n-e:n:0}function oa(t){return t?Ze(ia(t),0,4294967295):0}function ua(t){if("number"==typeof t)return t;if(Qu(t))return NaN;if(qu(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=qu(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Nn(t);var e=ot.test(t);return e||at.test(t)?qt(t.slice(2),e?2:8):it.test(t)?NaN:+t}function aa(t){return bi(t,wa(t))}function ca(t){return null==t?"":Qr(t)}var fa=xi((function(t,n){if(ho(n)||Lu(n))bi(n,xa(n),t);else for(var e in n)Mt.call(n,e)&&qe(t,e,n[e])})),sa=xi((function(t,n){bi(n,wa(n),t)})),la=xi((function(t,n,e,r){bi(n,wa(n),t,r)})),ha=xi((function(t,n,e,r){bi(n,xa(n),t,r)})),da=Hi(We);var pa=Dr((function(t,n){t=pt(t);var e=-1,r=n.length,i=r>2?n[2]:void 0;for(i&&co(n[0],n[1],i)&&(r=1);++e1),n})),bi(t,Xi(t),e),r&&(e=Ke(e,7,Vi));for(var i=n.length;i--;)ti(e,n[i]);return e}));var ka=Hi((function(t,n){return null==t?{}:function(t,n){return zr(t,n,(function(n,e){return ga(t,e)}))}(t,n)}));function Ca(t,n){if(null==t)return{};var e=pn(Xi(t),(function(t){return[t]}));return n=Ki(n),zr(t,e,(function(t,e){return n(t,e[0])}))}var Ea=Di(xa),Ta=Di(wa);function Oa(t){return null==t?[]:Rn(t,xa(t))}var Na=Si((function(t,n,e){return n=n.toLowerCase(),t+(e?ja(n):n)}));function ja(t){return Ba(ca(t).toLowerCase())}function Ra(t){return(t=ca(t))&&t.replace(ft,Fn).replace(Rt,"")}var za=Si((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),Pa=Si((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),La=Ai("toLowerCase");var Ia=Si((function(t,n,e){return t+(e?"_":"")+n.toLowerCase()}));var Fa=Si((function(t,n,e){return t+(e?" ":"")+Ba(n)}));var Da=Si((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),Ba=Ai("toUpperCase");function Ua(t,n,e){return t=ca(t),void 0===(n=e?void 0:n)?function(t){return It.test(t)}(t)?function(t){return t.match(Pt)||[]}(t):function(t){return t.match(J)||[]}(t):t.match(n)||[]}var Ya=Dr((function(t,n){try{return un(t,void 0,n)}catch(t){return Bu(t)?t:new W(t)}})),Va=Hi((function(t,n){return cn(n,(function(n){n=Co(n),Ge(t,n,bu(t[n],t))})),t}));function qa(t){return function(){return t}}var Ha=Ei(),$a=Ei(!0);function Xa(t){return t}function Ga(t){return Ar("function"==typeof t?t:Ke(t,1))}var Wa=Dr((function(t,n){return function(e){return br(e,t,n)}})),Za=Dr((function(t,n){return function(e){return br(t,e,n)}}));function Ka(t,n,e){var r=xa(n),i=lr(n,r);null!=e||qu(n)&&(i.length||!r.length)||(e=n,n=t,t=this,i=lr(n,xa(n)));var o=!(qu(e)&&"chain"in e&&!e.chain),u=Uu(t);return cn(i,(function(e){var r=n[e];t[e]=r,u&&(t.prototype[e]=function(){var n=this.__chain__;if(o||n){var e=t(this.__wrapped__),i=e.__actions__=_i(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,vn([this.value()],arguments))})})),t}function Qa(){}var Ja=ji(pn),tc=ji(sn),nc=ji(_n);function ec(t){return fo(t)?kn(Co(t)):function(t){return function(n){return hr(n,t)}}(t)}var rc=zi(),ic=zi(!0);function oc(){return[]}function uc(){return!1}var ac=Ni((function(t,n){return t+n}),0),cc=Ii("ceil"),fc=Ni((function(t,n){return t/n}),1),sc=Ii("floor");var lc,hc=Ni((function(t,n){return t*n}),1),dc=Ii("round"),pc=Ni((function(t,n){return t-n}),0);return Te.after=function(t,n){if("function"!=typeof n)throw new gt(o);return t=ia(t),function(){if(--t<1)return n.apply(this,arguments)}},Te.ary=gu,Te.assign=fa,Te.assignIn=sa,Te.assignInWith=la,Te.assignWith=ha,Te.at=da,Te.before=_u,Te.bind=bu,Te.bindAll=Va,Te.bindKey=mu,Te.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return zu(t)?t:[t]},Te.chain=eu,Te.chunk=function(t,n,e){n=(e?co(t,n,e):void 0===n)?1:ae(ia(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,u=0,a=r(te(i/n));oi?0:i+e),(r=void 0===r||r>i?i:ia(r))<0&&(r+=i),r=e>r?0:oa(r);e>>0)?(t=ca(t))&&("string"==typeof n||null!=n&&!Wu(n))&&!(n=Qr(n))&&Un(t)?si(Gn(t),0,e):t.split(n,e):[]},Te.spread=function(t,n){if("function"!=typeof t)throw new gt(o);return n=null==n?0:ae(ia(n),0),Dr((function(e){var r=e[n],i=si(e,0,n);return r&&vn(i,r),un(t,this,i)}))},Te.tail=function(t){var n=null==t?0:t.length;return n?$r(t,1,n):[]},Te.take=function(t,n,e){return t&&t.length?$r(t,0,(n=e||void 0===n?1:ia(n))<0?0:n):[]},Te.takeRight=function(t,n,e){var r=null==t?0:t.length;return r?$r(t,(n=r-(n=e||void 0===n?1:ia(n)))<0?0:n,r):[]},Te.takeRightWhile=function(t,n){return t&&t.length?ei(t,Ki(n,3),!1,!0):[]},Te.takeWhile=function(t,n){return t&&t.length?ei(t,Ki(n,3)):[]},Te.tap=function(t,n){return n(t),t},Te.throttle=function(t,n,e){var r=!0,i=!0;if("function"!=typeof t)throw new gt(o);return qu(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),xu(t,n,{leading:r,maxWait:n,trailing:i})},Te.thru=ru,Te.toArray=ea,Te.toPairs=Ea,Te.toPairsIn=Ta,Te.toPath=function(t){return zu(t)?pn(t,Co):Qu(t)?[t]:_i(ko(ca(t)))},Te.toPlainObject=aa,Te.transform=function(t,n,e){var r=zu(t),i=r||Fu(t)||Ju(t);if(n=Ki(n,4),null==e){var o=t&&t.constructor;e=i?r?new o:[]:qu(t)&&Uu(o)?Oe(Yt(t)):{}}return(i?cn:fr)(t,(function(t,r,i){return n(e,t,r,i)})),e},Te.unary=function(t){return gu(t,1)},Te.union=Ho,Te.unionBy=$o,Te.unionWith=Xo,Te.uniq=function(t){return t&&t.length?Jr(t):[]},Te.uniqBy=function(t,n){return t&&t.length?Jr(t,Ki(n,2)):[]},Te.uniqWith=function(t,n){return n="function"==typeof n?n:void 0,t&&t.length?Jr(t,void 0,n):[]},Te.unset=function(t,n){return null==t||ti(t,n)},Te.unzip=Go,Te.unzipWith=Wo,Te.update=function(t,n,e){return null==t?t:ni(t,n,ai(e))},Te.updateWith=function(t,n,e,r){return r="function"==typeof r?r:void 0,null==t?t:ni(t,n,ai(e),r)},Te.values=Oa,Te.valuesIn=function(t){return null==t?[]:Rn(t,wa(t))},Te.without=Zo,Te.words=Ua,Te.wrap=function(t,n){return Cu(ai(n),t)},Te.xor=Ko,Te.xorBy=Qo,Te.xorWith=Jo,Te.zip=tu,Te.zipObject=function(t,n){return oi(t||[],n||[],qe)},Te.zipObjectDeep=function(t,n){return oi(t||[],n||[],Yr)},Te.zipWith=nu,Te.entries=Ea,Te.entriesIn=Ta,Te.extend=sa,Te.extendWith=la,Ka(Te,Te),Te.add=ac,Te.attempt=Ya,Te.camelCase=Na,Te.capitalize=ja,Te.ceil=cc,Te.clamp=function(t,n,e){return void 0===e&&(e=n,n=void 0),void 0!==e&&(e=(e=ua(e))==e?e:0),void 0!==n&&(n=(n=ua(n))==n?n:0),Ze(ua(t),n,e)},Te.clone=function(t){return Ke(t,4)},Te.cloneDeep=function(t){return Ke(t,5)},Te.cloneDeepWith=function(t,n){return Ke(t,5,n="function"==typeof n?n:void 0)},Te.cloneWith=function(t,n){return Ke(t,4,n="function"==typeof n?n:void 0)},Te.conformsTo=function(t,n){return null==n||Qe(t,n,xa(n))},Te.deburr=Ra,Te.defaultTo=function(t,n){return null==t||t!=t?n:t},Te.divide=fc,Te.endsWith=function(t,n,e){t=ca(t),n=Qr(n);var r=t.length,i=e=void 0===e?r:Ze(ia(e),0,r);return(e-=n.length)>=0&&t.slice(e,i)==n},Te.eq=Ou,Te.escape=function(t){return(t=ca(t))&&D.test(t)?t.replace(I,Dn):t},Te.escapeRegExp=function(t){return(t=ca(t))&&X.test(t)?t.replace($,"\\$&"):t},Te.every=function(t,n,e){var r=zu(t)?sn:rr;return e&&co(t,n,e)&&(n=void 0),r(t,Ki(n,3))},Te.find=uu,Te.findIndex=Ro,Te.findKey=function(t,n){return mn(t,Ki(n,3),fr)},Te.findLast=au,Te.findLastIndex=zo,Te.findLastKey=function(t,n){return mn(t,Ki(n,3),sr)},Te.floor=sc,Te.forEach=cu,Te.forEachRight=fu,Te.forIn=function(t,n){return null==t?t:ar(t,Ki(n,3),wa)},Te.forInRight=function(t,n){return null==t?t:cr(t,Ki(n,3),wa)},Te.forOwn=function(t,n){return t&&fr(t,Ki(n,3))},Te.forOwnRight=function(t,n){return t&&sr(t,Ki(n,3))},Te.get=ya,Te.gt=Nu,Te.gte=ju,Te.has=function(t,n){return null!=t&&io(t,n,yr)},Te.hasIn=ga,Te.head=Lo,Te.identity=Xa,Te.includes=function(t,n,e,r){t=Lu(t)?t:Oa(t),e=e&&!r?ia(e):0;var i=t.length;return e<0&&(e=ae(i+e,0)),Ku(t)?e<=i&&t.indexOf(n,e)>-1:!!i&&wn(t,n,e)>-1},Te.indexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=null==e?0:ia(e);return i<0&&(i=ae(r+i,0)),wn(t,n,i)},Te.inRange=function(t,n,e){return n=ra(n),void 0===e?(e=n,n=0):e=ra(e),function(t,n,e){return t>=ce(n,e)&&t=-9007199254740991&&t<=9007199254740991},Te.isSet=Zu,Te.isString=Ku,Te.isSymbol=Qu,Te.isTypedArray=Ju,Te.isUndefined=function(t){return void 0===t},Te.isWeakMap=function(t){return Hu(t)&&ro(t)==w},Te.isWeakSet=function(t){return Hu(t)&&"[object WeakSet]"==pr(t)},Te.join=function(t,n){return null==t?"":oe.call(t,n)},Te.kebabCase=za,Te.last=Bo,Te.lastIndexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=r;return void 0!==e&&(i=(i=ia(e))<0?ae(r+i,0):ce(i,r-1)),n==n?function(t,n,e){for(var r=e+1;r--;)if(t[r]===n)return r;return r}(t,n,i):xn(t,An,i,!0)},Te.lowerCase=Pa,Te.lowerFirst=La,Te.lt=ta,Te.lte=na,Te.max=function(t){return t&&t.length?ir(t,Xa,vr):void 0},Te.maxBy=function(t,n){return t&&t.length?ir(t,Ki(n,2),vr):void 0},Te.mean=function(t){return Sn(t,Xa)},Te.meanBy=function(t,n){return Sn(t,Ki(n,2))},Te.min=function(t){return t&&t.length?ir(t,Xa,Cr):void 0},Te.minBy=function(t,n){return t&&t.length?ir(t,Ki(n,2),Cr):void 0},Te.stubArray=oc,Te.stubFalse=uc,Te.stubObject=function(){return{}},Te.stubString=function(){return""},Te.stubTrue=function(){return!0},Te.multiply=hc,Te.nth=function(t,n){return t&&t.length?jr(t,ia(n)):void 0},Te.noConflict=function(){return Xt._===this&&(Xt._=Et),this},Te.noop=Qa,Te.now=yu,Te.pad=function(t,n,e){t=ca(t);var r=(n=ia(n))?Xn(t):0;if(!n||r>=n)return t;var i=(n-r)/2;return Ri(ne(i),e)+t+Ri(te(i),e)},Te.padEnd=function(t,n,e){t=ca(t);var r=(n=ia(n))?Xn(t):0;return n&&rn){var r=t;t=n,n=r}if(e||t%1||n%1){var i=le();return ce(t+i*(n-t+Vt("1e-"+((i+"").length-1))),n)}return Ir(t,n)},Te.reduce=function(t,n,e){var r=zu(t)?yn:En,i=arguments.length<3;return r(t,Ki(n,4),e,i,nr)},Te.reduceRight=function(t,n,e){var r=zu(t)?gn:En,i=arguments.length<3;return r(t,Ki(n,4),e,i,er)},Te.repeat=function(t,n,e){return n=(e?co(t,n,e):void 0===n)?1:ia(n),Fr(ca(t),n)},Te.replace=function(){var t=arguments,n=ca(t[0]);return t.length<3?n:n.replace(t[1],t[2])},Te.result=function(t,n,e){var r=-1,i=(n=ci(n,t)).length;for(i||(i=1,t=void 0);++r9007199254740991)return[];var e=4294967295,r=ce(t,4294967295);t-=4294967295;for(var i=On(r,n=Ki(n));++e=o)return t;var a=e-Xn(r);if(a<1)return r;var c=u?si(u,0,a).join(""):t.slice(0,a);if(void 0===i)return c+r;if(u&&(a+=c.length-a),Wu(i)){if(t.slice(a).search(i)){var f,s=c;for(i.global||(i=vt(i.source,ca(rt.exec(i))+"g")),i.lastIndex=0;f=i.exec(s);)var l=f.index;c=c.slice(0,void 0===l?a:l)}}else if(t.indexOf(Qr(i),a)!=a){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+r},Te.unescape=function(t){return(t=ca(t))&&F.test(t)?t.replace(L,Zn):t},Te.uniqueId=function(t){var n=++At;return ca(t)+n},Te.upperCase=Da,Te.upperFirst=Ba,Te.each=cu,Te.eachRight=fu,Te.first=Lo,Ka(Te,(lc={},fr(Te,(function(t,n){Mt.call(Te.prototype,n)||(lc[n]=t)})),lc),{chain:!1}),Te.VERSION="4.17.21",cn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Te[t].placeholder=Te})),cn(["drop","take"],(function(t,n){Re.prototype[t]=function(e){e=void 0===e?1:ae(ia(e),0);var r=this.__filtered__&&!n?new Re(this):this.clone();return r.__filtered__?r.__takeCount__=ce(e,r.__takeCount__):r.__views__.push({size:ce(e,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},Re.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}})),cn(["filter","map","takeWhile"],(function(t,n){var e=n+1,r=1==e||3==e;Re.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:Ki(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}})),cn(["head","last"],(function(t,n){var e="take"+(n?"Right":"");Re.prototype[t]=function(){return this[e](1).value()[0]}})),cn(["initial","tail"],(function(t,n){var e="drop"+(n?"":"Right");Re.prototype[t]=function(){return this.__filtered__?new Re(this):this[e](1)}})),Re.prototype.compact=function(){return this.filter(Xa)},Re.prototype.find=function(t){return this.filter(t).head()},Re.prototype.findLast=function(t){return this.reverse().find(t)},Re.prototype.invokeMap=Dr((function(t,n){return"function"==typeof t?new Re(this):this.map((function(e){return br(e,t,n)}))})),Re.prototype.reject=function(t){return this.filter(Su(Ki(t)))},Re.prototype.slice=function(t,n){t=ia(t);var e=this;return e.__filtered__&&(t>0||n<0)?new Re(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),void 0!==n&&(e=(n=ia(n))<0?e.dropRight(-n):e.take(n-t)),e)},Re.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Re.prototype.toArray=function(){return this.take(4294967295)},fr(Re.prototype,(function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),r=/^(?:head|last)$/.test(n),i=Te[r?"take"+("last"==n?"Right":""):n],o=r||/^find/.test(n);i&&(Te.prototype[n]=function(){var n=this.__wrapped__,u=r?[1]:arguments,a=n instanceof Re,c=u[0],f=a||zu(n),s=function(t){var n=i.apply(Te,vn([t],u));return r&&l?n[0]:n};f&&e&&"function"==typeof c&&1!=c.length&&(a=f=!1);var l=this.__chain__,h=!!this.__actions__.length,d=o&&!l,p=a&&!h;if(!o&&f){n=p?n:new Re(this);var v=t.apply(n,u);return v.__actions__.push({func:ru,args:[s],thisArg:void 0}),new je(v,l)}return d&&p?t.apply(this,u):(v=this.thru(s),d?r?v.value()[0]:v.value():v)})})),cn(["pop","push","shift","sort","splice","unshift"],(function(t){var n=_t[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Te.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(zu(i)?i:[],t)}return this[e]((function(e){return n.apply(zu(e)?e:[],t)}))}})),fr(Re.prototype,(function(t,n){var e=Te[n];if(e){var r=e.name+"";Mt.call(me,r)||(me[r]=[]),me[r].push({name:n,func:e})}})),me[Ti(void 0,2).name]=[{name:"wrapper",func:void 0}],Re.prototype.clone=function(){var t=new Re(this.__wrapped__);return t.__actions__=_i(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=_i(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=_i(this.__views__),t},Re.prototype.reverse=function(){if(this.__filtered__){var t=new Re(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Re.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=zu(t),r=n<0,i=e?t.length:0,o=function(t,n,e){var r=-1,i=e.length;for(;++r=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Te.prototype.plant=function(t){for(var n,e=this;e instanceof Ne;){var r=To(e);r.__index__=0,r.__values__=void 0,n?i.__wrapped__=r:n=r;var i=r;e=e.__wrapped__}return i.__wrapped__=t,n},Te.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Re){var n=t;return this.__actions__.length&&(n=new Re(this)),(n=n.reverse()).__actions__.push({func:ru,args:[qo],thisArg:void 0}),new je(n,this.__chain__)}return this.thru(qo)},Te.prototype.toJSON=Te.prototype.valueOf=Te.prototype.value=function(){return ri(this.__wrapped__,this.__actions__)},Te.prototype.first=Te.prototype.head,Kt&&(Te.prototype[Kt]=function(){return this}),Te}();Xt._=Kn,void 0===(i=function(){return Kn}.call(n,e,n,r))||(r.exports=i)}).call(this)}).call(this,e(2),e(3)(t))},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n,e){"use strict";e.r(n),e.d(n,"LinePod",(function(){return UM})),e.d(n,"VueChartwerkLinePod",(function(){return YM})),e.d(n,"Mode",(function(){return i})),e.d(n,"TickOrientation",(function(){return o.TickOrientation})),e.d(n,"TimeFormat",(function(){return o.TimeFormat}));var r={};e.r(r),e.d(r,"version",(function(){return u})),e.d(r,"bisect",(function(){return h})),e.d(r,"bisectRight",(function(){return s})),e.d(r,"bisectLeft",(function(){return l})),e.d(r,"ascending",(function(){return a})),e.d(r,"bisector",(function(){return c})),e.d(r,"cross",(function(){return v})),e.d(r,"descending",(function(){return y})),e.d(r,"deviation",(function(){return b})),e.d(r,"extent",(function(){return m})),e.d(r,"histogram",(function(){return z})),e.d(r,"thresholdFreedmanDiaconis",(function(){return L})),e.d(r,"thresholdScott",(function(){return I})),e.d(r,"thresholdSturges",(function(){return R})),e.d(r,"max",(function(){return F})),e.d(r,"mean",(function(){return D})),e.d(r,"median",(function(){return B})),e.d(r,"merge",(function(){return U})),e.d(r,"min",(function(){return Y})),e.d(r,"pairs",(function(){return d})),e.d(r,"permute",(function(){return V})),e.d(r,"quantile",(function(){return P})),e.d(r,"range",(function(){return k})),e.d(r,"scan",(function(){return q})),e.d(r,"shuffle",(function(){return H})),e.d(r,"sum",(function(){return $})),e.d(r,"ticks",(function(){return O})),e.d(r,"tickIncrement",(function(){return N})),e.d(r,"tickStep",(function(){return j})),e.d(r,"transpose",(function(){return X})),e.d(r,"variance",(function(){return _})),e.d(r,"zip",(function(){return W})),e.d(r,"axisTop",(function(){return it})),e.d(r,"axisRight",(function(){return ot})),e.d(r,"axisBottom",(function(){return ut})),e.d(r,"axisLeft",(function(){return at})),e.d(r,"brush",(function(){return Ti})),e.d(r,"brushX",(function(){return Ci})),e.d(r,"brushY",(function(){return Ei})),e.d(r,"brushSelection",(function(){return ki})),e.d(r,"chord",(function(){return Fi})),e.d(r,"ribbon",(function(){return Qi})),e.d(r,"nest",(function(){return eo})),e.d(r,"set",(function(){return so})),e.d(r,"map",(function(){return no})),e.d(r,"keys",(function(){return lo})),e.d(r,"values",(function(){return ho})),e.d(r,"entries",(function(){return po})),e.d(r,"color",(function(){return Gn})),e.d(r,"rgb",(function(){return Qn})),e.d(r,"hsl",(function(){return oe})),e.d(r,"lab",(function(){return bo})),e.d(r,"hcl",(function(){return Co})),e.d(r,"lch",(function(){return ko})),e.d(r,"gray",(function(){return _o})),e.d(r,"cubehelix",(function(){return Po})),e.d(r,"contours",(function(){return Ho})),e.d(r,"contourDensity",(function(){return Ko})),e.d(r,"dispatch",(function(){return pt})),e.d(r,"drag",(function(){return iu})),e.d(r,"dragDisable",(function(){return On})),e.d(r,"dragEnable",(function(){return Nn})),e.d(r,"dsvFormat",(function(){return lu})),e.d(r,"csvParse",(function(){return du})),e.d(r,"csvParseRows",(function(){return pu})),e.d(r,"csvFormat",(function(){return vu})),e.d(r,"csvFormatBody",(function(){return yu})),e.d(r,"csvFormatRows",(function(){return gu})),e.d(r,"csvFormatRow",(function(){return _u})),e.d(r,"csvFormatValue",(function(){return bu})),e.d(r,"tsvParse",(function(){return xu})),e.d(r,"tsvParseRows",(function(){return wu})),e.d(r,"tsvFormat",(function(){return Mu})),e.d(r,"tsvFormatBody",(function(){return Au})),e.d(r,"tsvFormatRows",(function(){return Su})),e.d(r,"tsvFormatRow",(function(){return ku})),e.d(r,"tsvFormatValue",(function(){return Cu})),e.d(r,"autoType",(function(){return Eu})),e.d(r,"easeLinear",(function(){return Ou})),e.d(r,"easeQuad",(function(){return Ru})),e.d(r,"easeQuadIn",(function(){return Nu})),e.d(r,"easeQuadOut",(function(){return ju})),e.d(r,"easeQuadInOut",(function(){return Ru})),e.d(r,"easeCubic",(function(){return Zr})),e.d(r,"easeCubicIn",(function(){return Gr})),e.d(r,"easeCubicOut",(function(){return Wr})),e.d(r,"easeCubicInOut",(function(){return Zr})),e.d(r,"easePoly",(function(){return Lu})),e.d(r,"easePolyIn",(function(){return zu})),e.d(r,"easePolyOut",(function(){return Pu})),e.d(r,"easePolyInOut",(function(){return Lu})),e.d(r,"easeSin",(function(){return Uu})),e.d(r,"easeSinIn",(function(){return Du})),e.d(r,"easeSinOut",(function(){return Bu})),e.d(r,"easeSinInOut",(function(){return Uu})),e.d(r,"easeExp",(function(){return Hu})),e.d(r,"easeExpIn",(function(){return Vu})),e.d(r,"easeExpOut",(function(){return qu})),e.d(r,"easeExpInOut",(function(){return Hu})),e.d(r,"easeCircle",(function(){return Gu})),e.d(r,"easeCircleIn",(function(){return $u})),e.d(r,"easeCircleOut",(function(){return Xu})),e.d(r,"easeCircleInOut",(function(){return Gu})),e.d(r,"easeBounce",(function(){return Zu})),e.d(r,"easeBounceIn",(function(){return Wu})),e.d(r,"easeBounceOut",(function(){return Zu})),e.d(r,"easeBounceInOut",(function(){return Ku})),e.d(r,"easeBack",(function(){return ta})),e.d(r,"easeBackIn",(function(){return Qu})),e.d(r,"easeBackOut",(function(){return Ju})),e.d(r,"easeBackInOut",(function(){return ta})),e.d(r,"easeElastic",(function(){return ra})),e.d(r,"easeElasticIn",(function(){return ea})),e.d(r,"easeElasticOut",(function(){return ra})),e.d(r,"easeElasticInOut",(function(){return ia})),e.d(r,"blob",(function(){return ua})),e.d(r,"buffer",(function(){return ca})),e.d(r,"dsv",(function(){return ha})),e.d(r,"csv",(function(){return da})),e.d(r,"tsv",(function(){return pa})),e.d(r,"image",(function(){return va})),e.d(r,"json",(function(){return ga})),e.d(r,"text",(function(){return sa})),e.d(r,"xml",(function(){return ba})),e.d(r,"html",(function(){return ma})),e.d(r,"svg",(function(){return xa})),e.d(r,"forceCenter",(function(){return wa})),e.d(r,"forceCollide",(function(){return Pa})),e.d(r,"forceLink",(function(){return Fa})),e.d(r,"forceManyBody",(function(){return Va})),e.d(r,"forceRadial",(function(){return qa})),e.d(r,"forceSimulation",(function(){return Ya})),e.d(r,"forceX",(function(){return Ha})),e.d(r,"forceY",(function(){return $a})),e.d(r,"formatDefaultLocale",(function(){return cc})),e.d(r,"format",(function(){return tc})),e.d(r,"formatPrefix",(function(){return nc})),e.d(r,"formatLocale",(function(){return ac})),e.d(r,"formatSpecifier",(function(){return Za})),e.d(r,"FormatSpecifier",(function(){return Ka})),e.d(r,"precisionFixed",(function(){return fc})),e.d(r,"precisionPrefix",(function(){return sc})),e.d(r,"precisionRound",(function(){return lc})),e.d(r,"geoArea",(function(){return ef})),e.d(r,"geoBounds",(function(){return Wf})),e.d(r,"geoCentroid",(function(){return as})),e.d(r,"geoCircle",(function(){return _s})),e.d(r,"geoClipAntimeridian",(function(){return Os})),e.d(r,"geoClipCircle",(function(){return Ns})),e.d(r,"geoClipExtent",(function(){return Ls})),e.d(r,"geoClipRectangle",(function(){return js})),e.d(r,"geoContains",(function(){return tl})),e.d(r,"geoDistance",(function(){return Hs})),e.d(r,"geoGraticule",(function(){return rl})),e.d(r,"geoGraticule10",(function(){return il})),e.d(r,"geoInterpolate",(function(){return fl})),e.d(r,"geoLength",(function(){return Ys})),e.d(r,"geoPath",(function(){return ah})),e.d(r,"geoAlbers",(function(){return kh})),e.d(r,"geoAlbersUsa",(function(){return Ch})),e.d(r,"geoAzimuthalEqualArea",(function(){return Nh})),e.d(r,"geoAzimuthalEqualAreaRaw",(function(){return Oh})),e.d(r,"geoAzimuthalEquidistant",(function(){return Rh})),e.d(r,"geoAzimuthalEquidistantRaw",(function(){return jh})),e.d(r,"geoConicConformal",(function(){return Dh})),e.d(r,"geoConicConformalRaw",(function(){return Fh})),e.d(r,"geoConicEqualArea",(function(){return Sh})),e.d(r,"geoConicEqualAreaRaw",(function(){return Ah})),e.d(r,"geoConicEquidistant",(function(){return Vh})),e.d(r,"geoConicEquidistantRaw",(function(){return Yh})),e.d(r,"geoEqualEarth",(function(){return Zh})),e.d(r,"geoEqualEarthRaw",(function(){return Wh})),e.d(r,"geoEquirectangular",(function(){return Uh})),e.d(r,"geoEquirectangularRaw",(function(){return Bh})),e.d(r,"geoGnomonic",(function(){return Qh})),e.d(r,"geoGnomonicRaw",(function(){return Kh})),e.d(r,"geoIdentity",(function(){return Jh})),e.d(r,"geoProjection",(function(){return xh})),e.d(r,"geoProjectionMutator",(function(){return wh})),e.d(r,"geoMercator",(function(){return Ph})),e.d(r,"geoMercatorRaw",(function(){return zh})),e.d(r,"geoNaturalEarth1",(function(){return nd})),e.d(r,"geoNaturalEarth1Raw",(function(){return td})),e.d(r,"geoOrthographic",(function(){return rd})),e.d(r,"geoOrthographicRaw",(function(){return ed})),e.d(r,"geoStereographic",(function(){return od})),e.d(r,"geoStereographicRaw",(function(){return id})),e.d(r,"geoTransverseMercator",(function(){return ad})),e.d(r,"geoTransverseMercatorRaw",(function(){return ud})),e.d(r,"geoRotation",(function(){return vs})),e.d(r,"geoStream",(function(){return Gc})),e.d(r,"geoTransform",(function(){return ch})),e.d(r,"cluster",(function(){return ld})),e.d(r,"hierarchy",(function(){return dd})),e.d(r,"pack",(function(){return Fd})),e.d(r,"packSiblings",(function(){return jd})),e.d(r,"packEnclose",(function(){return bd})),e.d(r,"partition",(function(){return qd})),e.d(r,"stratify",(function(){return Wd})),e.d(r,"tree",(function(){return ep})),e.d(r,"treemap",(function(){return ap})),e.d(r,"treemapBinary",(function(){return cp})),e.d(r,"treemapDice",(function(){return Vd})),e.d(r,"treemapSlice",(function(){return rp})),e.d(r,"treemapSliceDice",(function(){return fp})),e.d(r,"treemapSquarify",(function(){return up})),e.d(r,"treemapResquarify",(function(){return sp})),e.d(r,"interpolate",(function(){return je})),e.d(r,"interpolateArray",(function(){return we})),e.d(r,"interpolateBasis",(function(){return fe})),e.d(r,"interpolateBasisClosed",(function(){return se})),e.d(r,"interpolateDate",(function(){return Ae})),e.d(r,"interpolateDiscrete",(function(){return lp})),e.d(r,"interpolateHue",(function(){return hp})),e.d(r,"interpolateNumber",(function(){return Se})),e.d(r,"interpolateNumberArray",(function(){return me})),e.d(r,"interpolateObject",(function(){return ke})),e.d(r,"interpolateRound",(function(){return dp})),e.d(r,"interpolateString",(function(){return Ne})),e.d(r,"interpolateTransformCss",(function(){return vr})),e.d(r,"interpolateTransformSvg",(function(){return yr})),e.d(r,"interpolateZoom",(function(){return yp})),e.d(r,"interpolateRgb",(function(){return ye})),e.d(r,"interpolateRgbBasis",(function(){return _e})),e.d(r,"interpolateRgbBasisClosed",(function(){return be})),e.d(r,"interpolateHsl",(function(){return _p})),e.d(r,"interpolateHslLong",(function(){return bp})),e.d(r,"interpolateLab",(function(){return mp})),e.d(r,"interpolateHcl",(function(){return wp})),e.d(r,"interpolateHclLong",(function(){return Mp})),e.d(r,"interpolateCubehelix",(function(){return Sp})),e.d(r,"interpolateCubehelixLong",(function(){return kp})),e.d(r,"piecewise",(function(){return Cp})),e.d(r,"quantize",(function(){return Ep})),e.d(r,"path",(function(){return $i})),e.d(r,"polygonArea",(function(){return Tp})),e.d(r,"polygonCentroid",(function(){return Op})),e.d(r,"polygonHull",(function(){return Rp})),e.d(r,"polygonContains",(function(){return zp})),e.d(r,"polygonLength",(function(){return Pp})),e.d(r,"quadtree",(function(){return Ta})),e.d(r,"randomUniform",(function(){return Ip})),e.d(r,"randomNormal",(function(){return Fp})),e.d(r,"randomLogNormal",(function(){return Dp})),e.d(r,"randomBates",(function(){return Up})),e.d(r,"randomIrwinHall",(function(){return Bp})),e.d(r,"randomExponential",(function(){return Yp})),e.d(r,"scaleBand",(function(){return Zp})),e.d(r,"scalePoint",(function(){return Qp})),e.d(r,"scaleIdentity",(function(){return hv})),e.d(r,"scaleLinear",(function(){return lv})),e.d(r,"scaleLog",(function(){return xv})),e.d(r,"scaleSymlog",(function(){return Sv})),e.d(r,"scaleOrdinal",(function(){return Wp})),e.d(r,"scaleImplicit",(function(){return Gp})),e.d(r,"scalePow",(function(){return Ov})),e.d(r,"scaleSqrt",(function(){return Nv})),e.d(r,"scaleQuantile",(function(){return jv})),e.d(r,"scaleQuantize",(function(){return Rv})),e.d(r,"scaleThreshold",(function(){return zv})),e.d(r,"scaleTime",(function(){return g_})),e.d(r,"scaleUtc",(function(){return C_})),e.d(r,"scaleSequential",(function(){return O_})),e.d(r,"scaleSequentialLog",(function(){return N_})),e.d(r,"scaleSequentialPow",(function(){return R_})),e.d(r,"scaleSequentialSqrt",(function(){return z_})),e.d(r,"scaleSequentialSymlog",(function(){return j_})),e.d(r,"scaleSequentialQuantile",(function(){return P_})),e.d(r,"scaleDiverging",(function(){return I_})),e.d(r,"scaleDivergingLog",(function(){return F_})),e.d(r,"scaleDivergingPow",(function(){return B_})),e.d(r,"scaleDivergingSqrt",(function(){return U_})),e.d(r,"scaleDivergingSymlog",(function(){return D_})),e.d(r,"tickFormat",(function(){return fv})),e.d(r,"schemeCategory10",(function(){return V_})),e.d(r,"schemeAccent",(function(){return q_})),e.d(r,"schemeDark2",(function(){return H_})),e.d(r,"schemePaired",(function(){return $_})),e.d(r,"schemePastel1",(function(){return X_})),e.d(r,"schemePastel2",(function(){return G_})),e.d(r,"schemeSet1",(function(){return W_})),e.d(r,"schemeSet2",(function(){return Z_})),e.d(r,"schemeSet3",(function(){return K_})),e.d(r,"schemeTableau10",(function(){return Q_})),e.d(r,"interpolateBrBG",(function(){return nb})),e.d(r,"schemeBrBG",(function(){return tb})),e.d(r,"interpolatePRGn",(function(){return rb})),e.d(r,"schemePRGn",(function(){return eb})),e.d(r,"interpolatePiYG",(function(){return ob})),e.d(r,"schemePiYG",(function(){return ib})),e.d(r,"interpolatePuOr",(function(){return ab})),e.d(r,"schemePuOr",(function(){return ub})),e.d(r,"interpolateRdBu",(function(){return fb})),e.d(r,"schemeRdBu",(function(){return cb})),e.d(r,"interpolateRdGy",(function(){return lb})),e.d(r,"schemeRdGy",(function(){return sb})),e.d(r,"interpolateRdYlBu",(function(){return db})),e.d(r,"schemeRdYlBu",(function(){return hb})),e.d(r,"interpolateRdYlGn",(function(){return vb})),e.d(r,"schemeRdYlGn",(function(){return pb})),e.d(r,"interpolateSpectral",(function(){return gb})),e.d(r,"schemeSpectral",(function(){return yb})),e.d(r,"interpolateBuGn",(function(){return bb})),e.d(r,"schemeBuGn",(function(){return _b})),e.d(r,"interpolateBuPu",(function(){return xb})),e.d(r,"schemeBuPu",(function(){return mb})),e.d(r,"interpolateGnBu",(function(){return Mb})),e.d(r,"schemeGnBu",(function(){return wb})),e.d(r,"interpolateOrRd",(function(){return Sb})),e.d(r,"schemeOrRd",(function(){return Ab})),e.d(r,"interpolatePuBuGn",(function(){return Cb})),e.d(r,"schemePuBuGn",(function(){return kb})),e.d(r,"interpolatePuBu",(function(){return Tb})),e.d(r,"schemePuBu",(function(){return Eb})),e.d(r,"interpolatePuRd",(function(){return Nb})),e.d(r,"schemePuRd",(function(){return Ob})),e.d(r,"interpolateRdPu",(function(){return Rb})),e.d(r,"schemeRdPu",(function(){return jb})),e.d(r,"interpolateYlGnBu",(function(){return Pb})),e.d(r,"schemeYlGnBu",(function(){return zb})),e.d(r,"interpolateYlGn",(function(){return Ib})),e.d(r,"schemeYlGn",(function(){return Lb})),e.d(r,"interpolateYlOrBr",(function(){return Db})),e.d(r,"schemeYlOrBr",(function(){return Fb})),e.d(r,"interpolateYlOrRd",(function(){return Ub})),e.d(r,"schemeYlOrRd",(function(){return Bb})),e.d(r,"interpolateBlues",(function(){return Vb})),e.d(r,"schemeBlues",(function(){return Yb})),e.d(r,"interpolateGreens",(function(){return Hb})),e.d(r,"schemeGreens",(function(){return qb})),e.d(r,"interpolateGreys",(function(){return Xb})),e.d(r,"schemeGreys",(function(){return $b})),e.d(r,"interpolatePurples",(function(){return Wb})),e.d(r,"schemePurples",(function(){return Gb})),e.d(r,"interpolateReds",(function(){return Kb})),e.d(r,"schemeReds",(function(){return Zb})),e.d(r,"interpolateOranges",(function(){return Jb})),e.d(r,"schemeOranges",(function(){return Qb})),e.d(r,"interpolateCividis",(function(){return tm})),e.d(r,"interpolateCubehelixDefault",(function(){return nm})),e.d(r,"interpolateRainbow",(function(){return om})),e.d(r,"interpolateWarm",(function(){return em})),e.d(r,"interpolateCool",(function(){return rm})),e.d(r,"interpolateSinebow",(function(){return fm})),e.d(r,"interpolateTurbo",(function(){return sm})),e.d(r,"interpolateViridis",(function(){return hm})),e.d(r,"interpolateMagma",(function(){return dm})),e.d(r,"interpolateInferno",(function(){return pm})),e.d(r,"interpolatePlasma",(function(){return vm})),e.d(r,"create",(function(){return ym})),e.d(r,"creator",(function(){return an})),e.d(r,"local",(function(){return _m})),e.d(r,"matcher",(function(){return bt})),e.d(r,"mouse",(function(){return Le})),e.d(r,"namespace",(function(){return Ct})),e.d(r,"namespaces",(function(){return kt})),e.d(r,"clientPoint",(function(){return ze})),e.d(r,"select",(function(){return Cn})),e.d(r,"selectAll",(function(){return mm})),e.d(r,"selection",(function(){return kn})),e.d(r,"selector",(function(){return yt})),e.d(r,"selectorAll",(function(){return _t})),e.d(r,"style",(function(){return Ft})),e.d(r,"touch",(function(){return Pe})),e.d(r,"touches",(function(){return xm})),e.d(r,"window",(function(){return zt})),e.d(r,"event",(function(){return dn})),e.d(r,"customEvent",(function(){return bn})),e.d(r,"arc",(function(){return Ym})),e.d(r,"area",(function(){return Gm})),e.d(r,"line",(function(){return Xm})),e.d(r,"pie",(function(){return Km})),e.d(r,"areaRadial",(function(){return rx})),e.d(r,"radialArea",(function(){return rx})),e.d(r,"lineRadial",(function(){return ex})),e.d(r,"radialLine",(function(){return ex})),e.d(r,"pointRadial",(function(){return ix})),e.d(r,"linkHorizontal",(function(){return hx})),e.d(r,"linkVertical",(function(){return dx})),e.d(r,"linkRadial",(function(){return px})),e.d(r,"symbol",(function(){return jx})),e.d(r,"symbols",(function(){return Nx})),e.d(r,"symbolCircle",(function(){return vx})),e.d(r,"symbolCross",(function(){return yx})),e.d(r,"symbolDiamond",(function(){return bx})),e.d(r,"symbolSquare",(function(){return Ax})),e.d(r,"symbolStar",(function(){return Mx})),e.d(r,"symbolTriangle",(function(){return kx})),e.d(r,"symbolWye",(function(){return Ox})),e.d(r,"curveBasisClosed",(function(){return Fx})),e.d(r,"curveBasisOpen",(function(){return Bx})),e.d(r,"curveBasis",(function(){return Lx})),e.d(r,"curveBundle",(function(){return Yx})),e.d(r,"curveCardinalClosed",(function(){return Xx})),e.d(r,"curveCardinalOpen",(function(){return Wx})),e.d(r,"curveCardinal",(function(){return Hx})),e.d(r,"curveCatmullRomClosed",(function(){return tw})),e.d(r,"curveCatmullRomOpen",(function(){return ew})),e.d(r,"curveCatmullRom",(function(){return Qx})),e.d(r,"curveLinearClosed",(function(){return iw})),e.d(r,"curveLinear",(function(){return qm})),e.d(r,"curveMonotoneX",(function(){return hw})),e.d(r,"curveMonotoneY",(function(){return dw})),e.d(r,"curveNatural",(function(){return yw})),e.d(r,"curveStep",(function(){return _w})),e.d(r,"curveStepAfter",(function(){return mw})),e.d(r,"curveStepBefore",(function(){return bw})),e.d(r,"stack",(function(){return Aw})),e.d(r,"stackOffsetExpand",(function(){return Sw})),e.d(r,"stackOffsetDiverging",(function(){return kw})),e.d(r,"stackOffsetNone",(function(){return xw})),e.d(r,"stackOffsetSilhouette",(function(){return Cw})),e.d(r,"stackOffsetWiggle",(function(){return Ew})),e.d(r,"stackOrderAppearance",(function(){return Tw})),e.d(r,"stackOrderAscending",(function(){return Nw})),e.d(r,"stackOrderDescending",(function(){return Rw})),e.d(r,"stackOrderInsideOut",(function(){return zw})),e.d(r,"stackOrderNone",(function(){return ww})),e.d(r,"stackOrderReverse",(function(){return Pw})),e.d(r,"timeInterval",(function(){return Iv})),e.d(r,"timeMillisecond",(function(){return _y})),e.d(r,"timeMilliseconds",(function(){return by})),e.d(r,"utcMillisecond",(function(){return _y})),e.d(r,"utcMilliseconds",(function(){return by})),e.d(r,"timeSecond",(function(){return vy})),e.d(r,"timeSeconds",(function(){return yy})),e.d(r,"utcSecond",(function(){return vy})),e.d(r,"utcSeconds",(function(){return yy})),e.d(r,"timeMinute",(function(){return hy})),e.d(r,"timeMinutes",(function(){return dy})),e.d(r,"timeHour",(function(){return fy})),e.d(r,"timeHours",(function(){return sy})),e.d(r,"timeDay",(function(){return uy})),e.d(r,"timeDays",(function(){return ay})),e.d(r,"timeWeek",(function(){return Hv})),e.d(r,"timeWeeks",(function(){return Qv})),e.d(r,"timeSunday",(function(){return Hv})),e.d(r,"timeSundays",(function(){return Qv})),e.d(r,"timeMonday",(function(){return $v})),e.d(r,"timeMondays",(function(){return Jv})),e.d(r,"timeTuesday",(function(){return Xv})),e.d(r,"timeTuesdays",(function(){return ty})),e.d(r,"timeWednesday",(function(){return Gv})),e.d(r,"timeWednesdays",(function(){return ny})),e.d(r,"timeThursday",(function(){return Wv})),e.d(r,"timeThursdays",(function(){return ey})),e.d(r,"timeFriday",(function(){return Zv})),e.d(r,"timeFridays",(function(){return ry})),e.d(r,"timeSaturday",(function(){return Kv})),e.d(r,"timeSaturdays",(function(){return iy})),e.d(r,"timeMonth",(function(){return Yv})),e.d(r,"timeMonths",(function(){return Vv})),e.d(r,"timeYear",(function(){return Dv})),e.d(r,"timeYears",(function(){return Bv})),e.d(r,"utcMinute",(function(){return S_})),e.d(r,"utcMinutes",(function(){return k_})),e.d(r,"utcHour",(function(){return w_})),e.d(r,"utcHours",(function(){return M_})),e.d(r,"utcDay",(function(){return Ly})),e.d(r,"utcDays",(function(){return Iy})),e.d(r,"utcWeek",(function(){return xy})),e.d(r,"utcWeeks",(function(){return Ey})),e.d(r,"utcSunday",(function(){return xy})),e.d(r,"utcSundays",(function(){return Ey})),e.d(r,"utcMonday",(function(){return wy})),e.d(r,"utcMondays",(function(){return Ty})),e.d(r,"utcTuesday",(function(){return My})),e.d(r,"utcTuesdays",(function(){return Oy})),e.d(r,"utcWednesday",(function(){return Ay})),e.d(r,"utcWednesdays",(function(){return Ny})),e.d(r,"utcThursday",(function(){return Sy})),e.d(r,"utcThursdays",(function(){return jy})),e.d(r,"utcFriday",(function(){return ky})),e.d(r,"utcFridays",(function(){return Ry})),e.d(r,"utcSaturday",(function(){return Cy})),e.d(r,"utcSaturdays",(function(){return zy})),e.d(r,"utcMonth",(function(){return b_})),e.d(r,"utcMonths",(function(){return m_})),e.d(r,"utcYear",(function(){return Dy})),e.d(r,"utcYears",(function(){return By})),e.d(r,"timeFormatDefaultLocale",(function(){return d_})),e.d(r,"timeFormat",(function(){return $y})),e.d(r,"timeParse",(function(){return Xy})),e.d(r,"utcFormat",(function(){return Gy})),e.d(r,"utcParse",(function(){return Wy})),e.d(r,"timeFormatLocale",(function(){return qy})),e.d(r,"isoFormat",(function(){return Lw})),e.d(r,"isoParse",(function(){return Iw})),e.d(r,"now",(function(){return He})),e.d(r,"timer",(function(){return Ge})),e.d(r,"timerFlush",(function(){return We})),e.d(r,"timeout",(function(){return Je})),e.d(r,"interval",(function(){return Fw})),e.d(r,"transition",(function(){return Hr})),e.d(r,"active",(function(){return ti})),e.d(r,"interrupt",(function(){return sr})),e.d(r,"voronoi",(function(){return MM})),e.d(r,"zoom",(function(){return FM})),e.d(r,"zoomTransform",(function(){return EM})),e.d(r,"zoomIdentity",(function(){return CM}));var i,o=e(0);!function(t){t.STANDARD="Standard",t.CHARGE="Charge"}(i||(i={}));var u="5.16.0",a=function(t,n){return tn?1:t>=n?0:NaN},c=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return a(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[o],e)>0?i=o:r=o+1}return r}}};var f=c(a),s=f.right,l=f.left,h=s,d=function(t,n){null==n&&(n=p);for(var e=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);et?1:n>=t?0:NaN},g=function(t){return null===t?NaN:+t},_=function(t,n){var e,r,i=t.length,o=0,u=-1,a=0,c=0;if(null==n)for(;++u1)return c/(o-1)},b=function(t,n){var e=_(t,n);return e?Math.sqrt(e):e},m=function(t,n){var e,r,i,o=t.length,u=-1;if(null==n){for(;++u=e)for(r=i=e;++ue&&(r=e),i=e)for(r=i=e;++ue&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/u),n=Math.floor(n/u),o=new Array(i=Math.ceil(n-t+1));++a=0?(o>=C?10:o>=E?5:o>=T?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=C?10:o>=E?5:o>=T?2:1)}function j(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=C?i*=10:o>=E?i*=5:o>=T&&(i*=2),ns;)l.pop(),--d;var p,v=new Array(d+1);for(i=0;i<=d;++i)(p=v[i]=[]).x0=i>0?l[i-1]:f,p.x1=i=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),u=+e(t[o],o,t);return u+(+e(t[o+1],o+1,t)-u)*(i-o)}},L=function(t,n,e){return t=M.call(t,g).sort(a),Math.ceil((e-n)/(2*(P(t,.75)-P(t,.25))*Math.pow(t.length,-1/3)))},I=function(t,n,e){return Math.ceil((e-n)/(3.5*b(t)*Math.pow(t.length,-1/3)))},F=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++or&&(r=e)}else for(;++o=e)for(r=e;++or&&(r=e);return r},D=function(t,n){var e,r=t.length,i=r,o=-1,u=0;if(null==n)for(;++o=0;)for(n=(r=t[i]).length;--n>=0;)e[--u]=r[n];return e},Y=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++oe&&(r=e)}else for(;++o=e)for(r=e;++oe&&(r=e);return r},V=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},q=function(t,n){if(e=t.length){var e,r,i=0,o=0,u=t[o];for(null==n&&(n=a);++i=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 ht(t,n){for(var e,r=0,i=t.length;r0)for(var e,r,i=new Array(e),o=0;on?1:t>=n?0:NaN}var St="http://www.w3.org/1999/xhtml",kt={svg:"http://www.w3.org/2000/svg",xhtml:St,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ct=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),kt.hasOwnProperty(n)?{space:kt[n],local:t}:t};function Et(t){return function(){this.removeAttribute(t)}}function Tt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ot(t,n){return function(){this.setAttribute(t,n)}}function Nt(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function jt(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function Rt(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 zt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Pt(t){return function(){this.style.removeProperty(t)}}function Lt(t,n,e){return function(){this.style.setProperty(t,n,e)}}function It(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function Ft(t,n){return t.style.getPropertyValue(n)||zt(t).getComputedStyle(t,null).getPropertyValue(n)}function Dt(t){return function(){delete this[t]}}function Bt(t,n){return function(){this[t]=n}}function Ut(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function Yt(t){return t.trim().split(/^|\s+/)}function Vt(t){return t.classList||new qt(t)}function qt(t){this._node=t,this._names=Yt(t.getAttribute("class")||"")}function Ht(t,n){for(var e=Vt(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 Zt(){this.textContent=""}function Kt(t){return function(){this.textContent=t}}function Qt(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Jt(){this.innerHTML=""}function tn(t){return function(){this.innerHTML=t}}function nn(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function en(){this.nextSibling&&this.parentNode.appendChild(this)}function rn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function on(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===St&&n.documentElement.namespaceURI===St?n.createElement(t):n.createElementNS(e,t)}}function un(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var an=function(t){var n=Ct(t);return(n.local?un:on)(n)};function cn(){return null}function fn(){var t=this.parentNode;t&&t.removeChild(this)}function sn(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function ln(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}var hn={},dn=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(hn={mouseenter:"mouseover",mouseleave:"mouseout"}));function pn(t,n,e){return t=vn(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function vn(t,n,e){return function(r){var i=dn;dn=r;try{t.call(this,this.__data__,n,e)}finally{dn=i}}}function yn(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 gn(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r=x&&(x=m+1);!(b=g[x])&&++x=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=At);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?Pt:"function"==typeof n?It:Lt)(t,n,null==e?"":e)):Ft(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?Dt:"function"==typeof n?Ut:Bt)(t,n)):this.node()[t]},classed:function(t,n){var e=Yt(t+"");if(arguments.length<2){for(var r=Vt(this.node()),i=-1,o=e.length;++i>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?Zn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?Zn(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=Dn.exec(t))?new Jn(n[1],n[2],n[3],1):(n=Bn.exec(t))?new Jn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Un.exec(t))?Zn(n[1],n[2],n[3],n[4]):(n=Yn.exec(t))?Zn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Vn.exec(t))?re(n[1],n[2]/100,n[3]/100,1):(n=qn.exec(t))?re(n[1],n[2]/100,n[3]/100,n[4]):Hn.hasOwnProperty(t)?Wn(Hn[t]):"transparent"===t?new Jn(NaN,NaN,NaN,0):null}function Wn(t){return new Jn(t>>16&255,t>>8&255,255&t,1)}function Zn(t,n,e,r){return r<=0&&(t=n=e=NaN),new Jn(t,n,e,r)}function Kn(t){return t instanceof zn||(t=Gn(t)),t?new Jn((t=t.rgb()).r,t.g,t.b,t.opacity):new Jn}function Qn(t,n,e,r){return 1===arguments.length?Kn(t):new Jn(t,n,e,null==r?1:r)}function Jn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function te(){return"#"+ee(this.r)+ee(this.g)+ee(this.b)}function ne(){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 ee(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function re(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new ue(t,n,e,r)}function ie(t){if(t instanceof ue)return new ue(t.h,t.s,t.l,t.opacity);if(t instanceof zn||(t=Gn(t)),!t)return new ue;if(t instanceof ue)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,c=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e0&&c<1?0:u,new ue(u,a,c,t.opacity)}function oe(t,n,e,r){return 1===arguments.length?ie(t):new ue(t,n,e,null==r?1:r)}function ue(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function ae(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function ce(t,n,e,r,i){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*e+(1+3*t+3*o-3*u)*r+u*i)/6}jn(zn,Gn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:$n,formatHex:$n,formatHsl:function(){return ie(this).formatHsl()},formatRgb:Xn,toString:Xn}),jn(Jn,Qn,Rn(zn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Jn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Jn(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:te,formatHex:te,formatRgb:ne,toString:ne})),jn(ue,oe,Rn(zn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ue(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ue(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 Jn(ae(t>=240?t-240:t+120,i,r),ae(t,i,r),ae(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+")")}}));var fe=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],u=r>0?t[r-1]:2*i-o,a=r180||e<-180?e-360*Math.round(e/360):e):le(isNaN(t)?n:t)}function pe(t){return 1==(t=+t)?ve: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):le(isNaN(n)?e:n)}}function ve(t,n){var e=n-t;return e?he(t,e):le(isNaN(t)?n:t)}var ye=function t(n){var e=pe(n);function r(t,n){var r=e((t=Qn(t)).r,(n=Qn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=ve(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}return r.gamma=t,r}(1);function ge(t){return function(n){var e,r,i=n.length,o=new Array(i),u=new Array(i),a=new Array(i);for(e=0;eo&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,c.push({i:u,x:Se(e,r)})),o=Ee.lastIndex;return o=0&&n._call.call(null,t),n=n._next;--Ie}function Ze(){Ue=(Be=Ve.now())+Ye,Ie=Fe=0;try{We()}finally{Ie=0,function(){var t,n,e=Te,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Te=n);Oe=t,Qe(r)}(),Ue=0}}function Ke(){var t=Ve.now(),n=t-Be;n>1e3&&(Ye-=n,Be=t)}function Qe(t){Ie||(Fe&&(Fe=clearTimeout(Fe)),t-Ue>24?(t<1/0&&(Fe=setTimeout(Ze,t-Ve.now()-Ye)),De&&(De=clearInterval(De))):(De||(Be=Ve.now(),De=setInterval(Ke,1e3)),Ie=1,qe(Ze)))}Xe.prototype=Ge.prototype={constructor:Xe,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?He():+e)+(null==n?0:+n),this._next||Oe===this||(Oe?Oe._next=this:Te=this,Oe=this),this._call=t,this._time=e,Qe()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qe())}};var Je=function(t,n,e){var r=new Xe;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},tr=pt("start","end","cancel","interrupt"),nr=[],er=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(c){var f,s,l,h;if(1!==e.state)return a();for(f in i)if((h=i[f]).name===e.name){if(3===h.state)return Je(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+f0)throw new Error("too late; already scheduled");return e}function ir(t,n){var e=or(t,n);if(e.state>3)throw new Error("too late; already running");return e}function or(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var ur,ar,cr,fr,sr=function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[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 o[i]):u=!1;u&&delete t.__transition}},lr=180/Math.PI,hr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},dr=function(t,n,e,r,i,o){var u,a,c;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,c/=a),t*r180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Se(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Se(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,c),function(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:Se(t,e)},{i:a-2,x:Se(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,c),o=u=null,function(t){for(var n,e=-1,r=c.length;++e=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?rr:ir;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}var Ir=kn.prototype.constructor;function Fr(t){return function(){this.style.removeProperty(t)}}function Dr(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Br(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&Dr(t,o,e)),r}return o._value=n,o}function Ur(t){return function(n){this.textContent=t.call(this,n)}}function Yr(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&Ur(r)),n}return r._value=t,r}var Vr=0;function qr(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Hr(t){return kn().transition(t)}function $r(){return++Vr}var Xr=kn.prototype;function Gr(t){return t*t*t}function Wr(t){return--t*t*t+1}function Zr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}qr.prototype=Hr.prototype={constructor:qr,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=yt(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u1&&e.name===n)return new qr([[t]],Jr,n,+r);return null},ni=function(t){return function(){return t}},ei=function(t,n,e){this.target=t,this.type=n,this.selection=e};function ri(){dn.stopImmediatePropagation()}var ii=function(){dn.preventDefault(),dn.stopImmediatePropagation()},oi={name:"drag"},ui={name:"space"},ai={name:"handle"},ci={name:"center"};function fi(t){return[+t[0],+t[1]]}function si(t){return[fi(t[0]),fi(t[1])]}function li(t){return function(n){return Pe(n,dn.touches,t)}}var hi={name:"x",handles:["w","e"].map(mi),input:function(t,n){return null==t?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},di={name:"y",handles:["n","s"].map(mi),input:function(t,n){return null==t?null:[[n[0][0],+t[0]],[n[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},pi={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(mi),input:function(t){return null==t?null:si(t)},output:function(t){return t}},vi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},yi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},gi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},_i={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},bi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function mi(t){return{type:t}}function xi(){return!dn.ctrlKey&&!dn.button}function wi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Mi(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ai(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Si(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function ki(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Ci(){return Oi(hi)}function Ei(){return Oi(di)}var Ti=function(){return Oi(pi)};function Oi(t){var n,e=wi,r=xi,i=Mi,o=!0,u=pt("start","brush","end"),a=6;function c(n){var e=n.property("__brush",v).selectAll(".overlay").data([mi("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",vi.overlay).merge(e).each((function(){var t=Ai(this).extent;Cn(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),n.selectAll(".selection").data([mi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",vi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return vi[t.type]})),n.each(f).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(){var t=Cn(this),n=Ai(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-a/2:n[0][0]-a/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-a/2:n[0][1]-a/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+a:a})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+a:a}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function s(t,n,e){var r=t.__brush.emitter;return!r||e&&r.clean?new l(t,n,e):r}function l(t,n,e){this.that=t,this.args=n,this.state=t.__brush,this.active=0,this.clean=e}function h(){if((!n||dn.touches)&&r.apply(this,arguments)){var e,i,u,a,c,l,h,d,p,v,y,g=this,_=dn.target.__data__.type,b="selection"===(o&&dn.metaKey?_="overlay":_)?oi:o&&dn.altKey?ci:ai,m=t===di?null:_i[_],x=t===hi?null:bi[_],w=Ai(g),M=w.extent,A=w.selection,S=M[0][0],k=M[0][1],C=M[1][0],E=M[1][1],T=0,O=0,N=m&&x&&o&&dn.shiftKey,j=dn.touches?li(dn.changedTouches[0].identifier):Le,R=j(g),z=R,P=s(g,arguments,!0).beforestart();"overlay"===_?(A&&(p=!0),w.selection=A=[[e=t===di?S:R[0],u=t===hi?k:R[1]],[c=t===di?C:e,h=t===hi?E:u]]):(e=A[0][0],u=A[0][1],c=A[1][0],h=A[1][1]),i=e,a=u,l=c,d=h;var L=Cn(g).attr("pointer-events","none"),I=L.selectAll(".overlay").attr("cursor",vi[_]);if(dn.touches)P.moved=D,P.ended=U;else{var F=Cn(dn.view).on("mousemove.brush",D,!0).on("mouseup.brush",U,!0);o&&F.on("keydown.brush",Y,!0).on("keyup.brush",V,!0),On(dn.view)}ri(),sr(g),f.call(g),P.start()}function D(){var t=j(g);!N||v||y||(Math.abs(t[0]-z[0])>Math.abs(t[1]-z[1])?y=!0:v=!0),z=t,p=!0,ii(),B()}function B(){var t;switch(T=z[0]-R[0],O=z[1]-R[1],b){case ui:case oi:m&&(T=Math.max(S-e,Math.min(C-c,T)),i=e+T,l=c+T),x&&(O=Math.max(k-u,Math.min(E-h,O)),a=u+O,d=h+O);break;case ai:m<0?(T=Math.max(S-e,Math.min(C-e,T)),i=e+T,l=c):m>0&&(T=Math.max(S-c,Math.min(C-c,T)),i=e,l=c+T),x<0?(O=Math.max(k-u,Math.min(E-u,O)),a=u+O,d=h):x>0&&(O=Math.max(k-h,Math.min(E-h,O)),a=u,d=h+O);break;case ci:m&&(i=Math.max(S,Math.min(C,e-T*m)),l=Math.max(S,Math.min(C,c+T*m))),x&&(a=Math.max(k,Math.min(E,u-O*x)),d=Math.max(k,Math.min(E,h+O*x)))}l0&&(e=i-T),x<0?h=d-O:x>0&&(u=a-O),b=ui,I.attr("cursor",vi.selection),B());break;default:return}ii()}function V(){switch(dn.keyCode){case 16:N&&(v=y=N=!1,B());break;case 18:b===ci&&(m<0?c=l:m>0&&(e=i),x<0?h=d:x>0&&(u=a),b=ai,B());break;case 32:b===ui&&(dn.altKey?(m&&(c=l-T*m,e=i+T*m),x&&(h=d-O*x,u=a+O*x),b=ci):(m<0?c=l:m>0&&(e=i),x<0?h=d:x>0&&(u=a),b=ai),I.attr("cursor",vi[_]),B());break;default:return}ii()}}function d(){s(this,arguments).moved()}function p(){s(this,arguments).ended()}function v(){var n=this.__brush||{selection:null};return n.extent=si(e.apply(this,arguments)),n.dim=t,n}return c.move=function(n,e){n.selection?n.on("start.brush",(function(){s(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){s(this,arguments).end()})).tween("brush",(function(){var n=this,r=n.__brush,i=s(n,arguments),o=r.selection,u=t.input("function"==typeof e?e.apply(this,arguments):e,r.extent),a=je(o,u);function c(t){r.selection=1===t&&null===u?null:a(t),f.call(n),i.brush()}return null!==o&&null!==u?c:c(1)})):n.each((function(){var n=this,r=arguments,i=n.__brush,o=t.input("function"==typeof e?e.apply(n,r):e,i.extent),u=s(n,r).beforestart();sr(n),i.selection=null===o?null:o,f.call(n),u.start().brush().end()}))},c.clear=function(t){c.move(t,null)},l.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(n){bn(new ei(c,n,t.output(this.state.selection)),u.apply,u,[n,this.that,this.args])}},c.extent=function(t){return arguments.length?(e="function"==typeof t?t:ni(si(t)),c):e},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:ni(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:ni(!!t),c):i},c.handleSize=function(t){return arguments.length?(a=+t,c):a},c.keyModifiers=function(t){return arguments.length?(o=!!t,c):o},c.on=function(){var t=u.on.apply(u,arguments);return t===u?c:t},c}var Ni=Math.cos,ji=Math.sin,Ri=Math.PI,zi=Ri/2,Pi=2*Ri,Li=Math.max;function Ii(t){return function(n,e){return t(n.source.value+n.target.value,e.source.value+e.target.value)}}var Fi=function(){var t=0,n=null,e=null,r=null;function i(i){var o,u,a,c,f,s,l=i.length,h=[],d=k(l),p=[],v=[],y=v.groups=new Array(l),g=new Array(l*l);for(o=0,f=-1;++f1e-6)if(Math.abs(s*a-c*f)>1e-6&&i){var h=e-o,d=r-u,p=a*a+c*c,v=h*h+d*d,y=Math.sqrt(p),g=Math.sqrt(l),_=i*Math.tan((Ui-Math.acos((p+l-v)/(2*y*g)))/2),b=_/g,m=_/y;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*f)+","+(n+b*s)),this._+="A"+i+","+i+",0,0,"+ +(s*h>f*d)+","+(this._x1=t+m*a)+","+(this._y1=n+m*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n,o=!!o;var u=(e=+e)*Math.cos(r),a=e*Math.sin(r),c=t+u,f=n+a,s=1^o,l=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+f:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+c+","+f),e&&(l<0&&(l=l%Yi+Yi),l>Vi?this._+="A"+e+","+e+",0,1,"+s+","+(t-u)+","+(n-a)+"A"+e+","+e+",0,1,"+s+","+(this._x1=c)+","+(this._y1=f):l>1e-6&&(this._+="A"+e+","+e+",0,"+ +(l>=Ui)+","+s+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},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 $i=Hi;function Xi(t){return t.source}function Gi(t){return t.target}function Wi(t){return t.radius}function Zi(t){return t.startAngle}function Ki(t){return t.endAngle}var Qi=function(){var t=Xi,n=Gi,e=Wi,r=Zi,i=Ki,o=null;function u(){var u,a=Di.call(arguments),c=t.apply(this,a),f=n.apply(this,a),s=+e.apply(this,(a[0]=c,a)),l=r.apply(this,a)-zi,h=i.apply(this,a)-zi,d=s*Ni(l),p=s*ji(l),v=+e.apply(this,(a[0]=f,a)),y=r.apply(this,a)-zi,g=i.apply(this,a)-zi;if(o||(o=u=$i()),o.moveTo(d,p),o.arc(0,0,s,l,h),l===y&&h===g||(o.quadraticCurveTo(0,0,v*Ni(y),v*ji(y)),o.arc(0,0,v,y,g)),o.quadraticCurveTo(0,0,d,p),o.closePath(),u)return o=null,u+""||null}return u.radius=function(t){return arguments.length?(e="function"==typeof t?t:Bi(+t),u):e},u.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Bi(+t),u):r},u.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Bi(+t),u):i},u.source=function(n){return arguments.length?(t=n,u):t},u.target=function(t){return arguments.length?(n=t,u):n},u.context=function(t){return arguments.length?(o=null==t?null:t,u):o},u};function Ji(){}function to(t,n){var e=new Ji;if(t instanceof Ji)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var c,f,s,l=-1,h=e.length,d=r[i++],p=no(),v=u();++lr.length)return e;var u,a=i[o-1];return null!=n&&o>=r.length?u=e.entries():(u=[],e.each((function(n,e){u.push({key:e,values:t(n,o)})}))),null!=a?u.sort((function(t,n){return a(t.key,n.key)})):u}(o(t,0,oo,uo),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}};function ro(){return{}}function io(t,n,e){t[n]=e}function oo(){return no()}function uo(t,n,e){t.set(n,e)}function ao(){}var co=no.prototype;function fo(t,n){var e=new ao;if(t instanceof ao)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r6/29*(6/29)*(6/29)?Math.pow(t,1/3):t/(6/29*3*(6/29))+4/29}function wo(t){return t>6/29?t*t*t:6/29*3*(6/29)*(t-4/29)}function Mo(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ao(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function So(t){if(t instanceof Eo)return new Eo(t.h,t.c,t.l,t.opacity);if(t instanceof mo||(t=go(t)),0===t.a&&0===t.b)return new Eo(NaN,0r!=d>r&&e<(h-f)*(r-s)/(d-s)+f&&(i=-i)}return i}function Yo(t,n,e){var r,i,o,u;return function(t,n,e){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])}(t,n,e)&&(i=t[r=+(t[0]===n[0])],o=e[r],u=n[r],i<=o&&o<=u||u<=o&&o<=i)}var Vo=function(){},qo=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],Ho=function(){var t=1,n=1,e=R,r=a;function i(t){var n=e(t);if(Array.isArray(n))n=n.slice().sort(Fo);else{var r=m(t),i=r[0],u=r[1];n=j(i,u,n),n=k(Math.floor(i/n)*n,Math.floor(u/n)*n,n)}return n.map((function(n){return o(t,n)}))}function o(e,i){var o=[],a=[];return function(e,r,i){var o,a,c,f,s,l,h=new Array,d=new Array;o=a=-1,f=e[0]>=r,qo[f<<1].forEach(p);for(;++o=r,qo[c|f<<1].forEach(p);qo[f<<0].forEach(p);for(;++a=r,s=e[a*t]>=r,qo[f<<1|s<<2].forEach(p);++o=r,l=s,s=e[a*t+o+1]>=r,qo[c|f<<1|s<<2|l<<3].forEach(p);qo[f|s<<3].forEach(p)}o=-1,s=e[a*t]>=r,qo[s<<2].forEach(p);for(;++o=r,qo[s<<2|l<<3].forEach(p);function p(t){var n,e,r=[t[0][0]+o,t[0][1]+a],c=[t[1][0]+o,t[1][1]+a],f=u(r),s=u(c);(n=d[f])?(e=h[s])?(delete d[n.end],delete h[e.start],n===e?(n.ring.push(c),i(n.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[n.end],n.ring.push(c),d[n.end=s]=n):(n=h[s])?(e=d[f])?(delete h[n.start],delete d[e.end],n===e?(n.ring.push(c),i(n.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[n.start],n.ring.unshift(r),h[n.start=f]=n):h[f]=d[s]={start:f,end:s,ring:[r,c]}}qo[s<<3].forEach(p)}(e,i,(function(t){r(t,e,i),function(t){for(var n=0,e=t.length,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++n0?o.push([t]):a.push(t)})),a.forEach((function(t){for(var n,e=0,r=o.length;e0&&u0&&a0&&o>0))throw new Error("invalid size");return t=r,n=o,i},i.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?Do(Io.call(t)):Do(t),i):e},i.smooth=function(t){return arguments.length?(r=t?a:Vo,i):r===a},i};function $o(t,n,e){for(var r=t.width,i=t.height,o=1+(e<<1),u=0;u=e&&(a>=o&&(c-=t.data[a-o+u*r]),n.data[a-e+u*r]=c/Math.min(a+1,r-1+o-a,o))}function Xo(t,n,e){for(var r=t.width,i=t.height,o=1+(e<<1),u=0;u=e&&(a>=o&&(c-=t.data[u+(a-o)*r]),n.data[u+(a-e)*r]=c/Math.min(a+1,i-1+o-a,o))}function Go(t){return t[0]}function Wo(t){return t[1]}function Zo(){return 1}var Ko=function(){var t=Go,n=Wo,e=Zo,r=960,i=500,o=20,u=2,a=3*o,c=r+2*a>>u,f=i+2*a>>u,s=Do(20);function l(r){var i=new Float32Array(c*f),l=new Float32Array(c*f);r.forEach((function(r,o,s){var l=+t(r,o,s)+a>>u,h=+n(r,o,s)+a>>u,d=+e(r,o,s);l>=0&&l=0&&h>u),Xo({width:c,height:f,data:l},{width:c,height:f,data:i},o>>u),$o({width:c,height:f,data:i},{width:c,height:f,data:l},o>>u),Xo({width:c,height:f,data:l},{width:c,height:f,data:i},o>>u),$o({width:c,height:f,data:i},{width:c,height:f,data:l},o>>u),Xo({width:c,height:f,data:l},{width:c,height:f,data:i},o>>u);var d=s(i);if(!Array.isArray(d)){var p=F(i);d=j(0,p,d),(d=k(0,Math.floor(p/d)*d,d)).shift()}return Ho().thresholds(d).size([c,f])(i).map(h)}function h(t){return t.value*=Math.pow(2,-2*u),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(v)}function v(t){t[0]=t[0]*Math.pow(2,u)-a,t[1]=t[1]*Math.pow(2,u)-a}function y(){return c=r+2*(a=3*o)>>u,f=i+2*a>>u,l}return l.x=function(n){return arguments.length?(t="function"==typeof n?n:Do(+n),l):t},l.y=function(t){return arguments.length?(n="function"==typeof t?t:Do(+t),l):n},l.weight=function(t){return arguments.length?(e="function"==typeof t?t:Do(+t),l):e},l.size=function(t){if(!arguments.length)return[r,i];var n=Math.ceil(t[0]),e=Math.ceil(t[1]);if(!(n>=0||n>=0))throw new Error("invalid size");return r=n,i=e,y()},l.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return u=Math.floor(Math.log(t)/Math.LN2),y()},l.thresholds=function(t){return arguments.length?(s="function"==typeof t?t:Array.isArray(t)?Do(Io.call(t)):Do(t),l):s},l.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},l},Qo=function(t){return function(){return t}};function Jo(t,n,e,r,i,o,u,a,c,f){this.target=t,this.type=n,this.subject=e,this.identifier=r,this.active=i,this.x=o,this.y=u,this.dx=a,this.dy=c,this._=f}function tu(){return!dn.ctrlKey&&!dn.button}function nu(){return this.parentNode}function eu(t){return null==t?{x:dn.x,y:dn.y}:t}function ru(){return navigator.maxTouchPoints||"ontouchstart"in this}Jo.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var iu=function(){var t,n,e,r,i=tu,o=nu,u=eu,a=ru,c={},f=pt("start","drag","end"),s=0,l=0;function h(t){t.on("mousedown.drag",d).filter(a).on("touchstart.drag",y).on("touchmove.drag",g).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var u=b("mouse",o.apply(this,arguments),Le,this,arguments);u&&(Cn(dn.view).on("mousemove.drag",p,!0).on("mouseup.drag",v,!0),On(dn.view),En(),e=!1,t=dn.clientX,n=dn.clientY,u("start"))}}function p(){if(Tn(),!e){var r=dn.clientX-t,i=dn.clientY-n;e=r*r+i*i>l}c.mouse("drag")}function v(){Cn(dn.view).on("mousemove.drag mouseup.drag",null),Nn(dn.view,e),Tn(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var t,n,e=dn.changedTouches,r=o.apply(this,arguments),u=e.length;for(t=0;t9999?"+"+fu(n,6):fu(n,4))+"-"+fu(t.getUTCMonth()+1,2)+"-"+fu(t.getUTCDate(),2)+(o?"T"+fu(e,2)+":"+fu(r,2)+":"+fu(i,2)+"."+fu(o,3)+"Z":i?"T"+fu(e,2)+":"+fu(r,2)+":"+fu(i,2)+"Z":r||e?"T"+fu(e,2)+":"+fu(r,2)+"Z":"")}var lu=function(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,u=0,a=0,c=o<=0,f=!1;function s(){if(c)return uu;if(f)return f=!1,ou;var n,r,i=u;if(34===t.charCodeAt(i)){for(;u++=o?c=!0:10===(r=t.charCodeAt(u++))?f=!0:13===r&&(f=!0,10===t.charCodeAt(u)&&++u),t.slice(i+1,n-1).replace(/""/g,'"')}for(;u=(o=(v+g)/2))?v=o:g=o,(s=e>=(u=(y+_)/2))?y=u:_=u,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(a=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===a&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(o=(v+g)/2))?v=o:g=o,(s=e>=(u=(y+_)/2))?y=u:_=u}while((l=s<<1|f)==(h=(c>=u)<<1|a>=o));return i[h]=d,i[l]=p,t}var ka=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function Ca(t){return t[0]}function Ea(t){return t[1]}function Ta(t,n,e){var r=new Oa(null==n?Ca:n,null==e?Ea:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Oa(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Na(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var ja=Ta.prototype=Oa.prototype;function Ra(t){return t.x+t.vx}function za(t){return t.y+t.vy}ja.copy=function(){var t,n,e=new Oa(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Na(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Na(n));return e},ja.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return Sa(this.cover(n,e),n,e,t)},ja.addAll=function(t){var n,e,r,i,o=t.length,u=new Array(o),a=new Array(o),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;es&&(s=r),il&&(l=i));if(c>s||f>l)return this;for(this.cover(c,f).cover(s,l),e=0;et||t>=i||r>n||n>=o;)switch(a=(nh||(o=c.y0)>d||(u=c.x1)=g)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,v.data),b=n-+this._y.call(null,v.data),m=_*_+b*b;if(m=(a=(p+y)/2))?p=a:y=a,(s=u>=(c=(v+g)/2))?v=c:g=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},ja.removeAll=function(t){for(var n=0,e=t.length;nc+d||if+d||oa.index){var p=c-u.x-u.vx,v=f-u.y-u.vy,y=p*p+v*v;yt.r&&(t.r=t[n].r)}function a(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r1?(null==e?a.remove(t):a.set(t,d(e)),n):a.get(t)},find:function(n,e,r){var i,o,u,a,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(t,e),n):f.on(t)}}},Va=function(){var t,n,e,r,i=Ma(-30),o=1,u=1/0,a=.81;function c(r){var i,o=t.length,u=Ta(t,Da,Ba).visitAfter(s);for(e=r,i=0;i=u)){(t.data!==n||t.next)&&(0===s&&(d+=(s=Aa())*s),0===l&&(d+=(l=Aa())*l),d1?r[0]+r.slice(2):r,+t.slice(e+1)]}var Ga=function(t){return(t=Xa(Math.abs(t)))?t[1]:NaN},Wa=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Za(t){if(!(n=Wa.exec(t)))throw new Error("invalid format: "+t);var n;return new Ka({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 Ka(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+""}Za.prototype=Ka.prototype,Ka.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};var Qa,Ja,tc,nc,ec=function(t,n){var e=Xa(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")},rc={"%":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.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):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 ec(100*t,n)},r:ec,s:function(t,n){var e=Xa(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Qa=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return o===u?r:o>u?r+new Array(o-u+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Xa(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},ic=function(t){return t},oc=Array.prototype.map,uc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],ac=function(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?ic:(n=oc.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],u=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[u=(u+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",u=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?ic:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(oc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",f=void 0===t.minus?"-":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function l(t){var n=(t=Za(t)).fill,e=t.align,l=t.sign,h=t.symbol,d=t.zero,p=t.width,v=t.comma,y=t.precision,g=t.trim,_=t.type;"n"===_?(v=!0,_="g"):rc[_]||(void 0===y&&(y=12),g=!0,_="g"),(d||"0"===n&&"="===e)&&(d=!0,n="0",e="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",m="$"===h?o:/[%p]/.test(_)?c:"",x=rc[_],w=/[defgprs%]/.test(_);function M(t){var i,o,c,h=b,M=m;if("c"===_)M=x(t)+M,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:x(Math.abs(t),y),g&&(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)),A&&0==+t&&"+"!==l&&(A=!1),h=(A?"("===l?l:f:"-"===l||"("===l?"":l)+h,M=("s"===_?uc[8+Qa/3]:"")+M+(A&&"("===l?")":""),w)for(i=-1,o=t.length;++i(c=t.charCodeAt(i))||c>57){M=(46===c?u+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}v&&!d&&(t=r(t,1/0));var S=h.length+t.length+M.length,k=S>1)+h+t+M+k.slice(S);break;default:t=k+h+t+M}return a(t)}return y=void 0===y?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),M.toString=function(){return t+""},M}return{format:l,formatPrefix:function(t,n){var e=l(((t=Za(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ga(n)/3))),i=Math.pow(10,-r),o=uc[8+r/3];return function(t){return e(i*t)+o}}}};function cc(t){return Ja=ac(t),tc=Ja.format,nc=Ja.formatPrefix,Ja}cc({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var fc=function(t){return Math.max(0,-Ga(Math.abs(t)))},sc=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ga(n)/3)))-Ga(Math.abs(t)))},lc=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Ga(n)-Ga(t))+1},hc=function(){return new dc};function dc(){this.reset()}dc.prototype={constructor:dc,reset:function(){this.s=this.t=0},add:function(t){vc(pc,t,this.t),vc(this,pc.s,this.s),this.s?this.t+=pc.t:this.s=pc.t},valueOf:function(){return this.s}};var pc=new dc;function vc(t,n,e){var r=t.s=n+e,i=r-n,o=r-i;t.t=n-o+(e-i)}var yc=Math.PI,gc=yc/2,_c=yc/4,bc=2*yc,mc=180/yc,xc=yc/180,wc=Math.abs,Mc=Math.atan,Ac=Math.atan2,Sc=Math.cos,kc=Math.ceil,Cc=Math.exp,Ec=(Math.floor,Math.log),Tc=Math.pow,Oc=Math.sin,Nc=Math.sign||function(t){return t>0?1:t<0?-1:0},jc=Math.sqrt,Rc=Math.tan;function zc(t){return t>1?0:t<-1?yc:Math.acos(t)}function Pc(t){return t>1?gc:t<-1?-gc:Math.asin(t)}function Lc(t){return(t=Oc(t/2))*t}function Ic(){}function Fc(t,n){t&&Bc.hasOwnProperty(t.type)&&Bc[t.type](t,n)}var Dc={Feature:function(t,n){Fc(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,o=Sc(n=(n*=xc)/2+_c),u=Oc(n),a=Xc*u,c=$c*o+a*Sc(i),f=a*r*Oc(i);Wc.add(Ac(f,c)),Hc=t,$c=o,Xc=u}var ef=function(t){return Zc.reset(),Gc(t,Kc),2*Zc};function rf(t){return[Ac(t[1],t[0]),Pc(t[2])]}function of(t){var n=t[0],e=t[1],r=Sc(e);return[r*Sc(n),r*Oc(n),Oc(e)]}function uf(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function af(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function cf(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function ff(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function sf(t){var n=jc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var lf,hf,df,pf,vf,yf,gf,_f,bf,mf,xf=hc(),wf={point:Mf,lineStart:Sf,lineEnd:kf,polygonStart:function(){wf.point=Cf,wf.lineStart=Ef,wf.lineEnd=Tf,xf.reset(),Kc.polygonStart()},polygonEnd:function(){Kc.polygonEnd(),wf.point=Mf,wf.lineStart=Sf,wf.lineEnd=kf,Wc<0?(lf=-(df=180),hf=-(pf=90)):xf>1e-6?pf=90:xf<-1e-6&&(hf=-90),mf[0]=lf,mf[1]=df},sphere:function(){lf=-(df=180),hf=-(pf=90)}};function Mf(t,n){bf.push(mf=[lf=t,df=t]),npf&&(pf=n)}function Af(t,n){var e=of([t*xc,n*xc]);if(_f){var r=af(_f,e),i=af([r[1],-r[0],0],r);sf(i),i=rf(i);var o,u=t-vf,a=u>0?1:-1,c=i[0]*mc*a,f=wc(u)>180;f^(a*vfpf&&(pf=o):f^(a*vf<(c=(c+360)%360-180)&&cpf&&(pf=n)),f?tOf(lf,df)&&(df=t):Of(t,df)>Of(lf,df)&&(lf=t):df>=lf?(tdf&&(df=t)):t>vf?Of(lf,t)>Of(lf,df)&&(df=t):Of(t,df)>Of(lf,df)&&(lf=t)}else bf.push(mf=[lf=t,df=t]);npf&&(pf=n),_f=e,vf=t}function Sf(){wf.point=Af}function kf(){mf[0]=lf,mf[1]=df,wf.point=Mf,_f=null}function Cf(t,n){if(_f){var e=t-vf;xf.add(wc(e)>180?e+(e>0?360:-360):e)}else yf=t,gf=n;Kc.point(t,n),Af(t,n)}function Ef(){Kc.lineStart()}function Tf(){Cf(yf,gf),Kc.lineEnd(),wc(xf)>1e-6&&(lf=-(df=180)),mf[0]=lf,mf[1]=df,_f=null}function Of(t,n){return(n-=t)<0?n+360:n}function Nf(t,n){return t[0]-n[0]}function jf(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nOf(r[0],r[1])&&(r[1]=i[1]),Of(i[0],r[1])>Of(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(u=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(a=Of(r[1],i[0]))>u&&(u=a,lf=i[0],df=r[1])}return bf=mf=null,lf===1/0||hf===1/0?[[NaN,NaN],[NaN,NaN]]:[[lf,hf],[df,pf]]},Zf={sphere:Ic,point:Kf,lineStart:Jf,lineEnd:es,polygonStart:function(){Zf.lineStart=rs,Zf.lineEnd=is},polygonEnd:function(){Zf.lineStart=Jf,Zf.lineEnd=es}};function Kf(t,n){t*=xc;var e=Sc(n*=xc);Qf(e*Sc(t),e*Oc(t),Oc(n))}function Qf(t,n,e){++Rf,Pf+=(t-Pf)/Rf,Lf+=(n-Lf)/Rf,If+=(e-If)/Rf}function Jf(){Zf.point=ts}function ts(t,n){t*=xc;var e=Sc(n*=xc);$f=e*Sc(t),Xf=e*Oc(t),Gf=Oc(n),Zf.point=ns,Qf($f,Xf,Gf)}function ns(t,n){t*=xc;var e=Sc(n*=xc),r=e*Sc(t),i=e*Oc(t),o=Oc(n),u=Ac(jc((u=Xf*o-Gf*i)*u+(u=Gf*r-$f*o)*u+(u=$f*i-Xf*r)*u),$f*r+Xf*i+Gf*o);zf+=u,Ff+=u*($f+($f=r)),Df+=u*(Xf+(Xf=i)),Bf+=u*(Gf+(Gf=o)),Qf($f,Xf,Gf)}function es(){Zf.point=Kf}function rs(){Zf.point=os}function is(){us(qf,Hf),Zf.point=Kf}function os(t,n){qf=t,Hf=n,t*=xc,n*=xc,Zf.point=us;var e=Sc(n);$f=e*Sc(t),Xf=e*Oc(t),Gf=Oc(n),Qf($f,Xf,Gf)}function us(t,n){t*=xc;var e=Sc(n*=xc),r=e*Sc(t),i=e*Oc(t),o=Oc(n),u=Xf*o-Gf*i,a=Gf*r-$f*o,c=$f*i-Xf*r,f=jc(u*u+a*a+c*c),s=Pc(f),l=f&&-s/f;Uf+=l*u,Yf+=l*a,Vf+=l*c,zf+=s,Ff+=s*($f+($f=r)),Df+=s*(Xf+(Xf=i)),Bf+=s*(Gf+(Gf=o)),Qf($f,Xf,Gf)}var as=function(t){Rf=zf=Pf=Lf=If=Ff=Df=Bf=Uf=Yf=Vf=0,Gc(t,Zf);var n=Uf,e=Yf,r=Vf,i=n*n+e*e+r*r;return i<1e-12&&(n=Ff,e=Df,r=Bf,zf<1e-6&&(n=Pf,e=Lf,r=If),(i=n*n+e*e+r*r)<1e-12)?[NaN,NaN]:[Ac(e,n)*mc,Pc(r/jc(i))*mc]},cs=function(t){return function(){return t}},fs=function(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return(e=n.invert(e,r))&&t.invert(e[0],e[1])}),e};function ss(t,n){return[wc(t)>yc?t+Math.round(-t/bc)*bc:t,n]}function ls(t,n,e){return(t%=bc)?n||e?fs(ds(t),ps(n,e)):ds(t):n||e?ps(n,e):ss}function hs(t){return function(n,e){return[(n+=t)>yc?n-bc:n<-yc?n+bc:n,e]}}function ds(t){var n=hs(t);return n.invert=hs(-t),n}function ps(t,n){var e=Sc(t),r=Oc(t),i=Sc(n),o=Oc(n);function u(t,n){var u=Sc(n),a=Sc(t)*u,c=Oc(t)*u,f=Oc(n),s=f*e+a*r;return[Ac(c*i-s*o,a*e-f*r),Pc(s*i+c*o)]}return u.invert=function(t,n){var u=Sc(n),a=Sc(t)*u,c=Oc(t)*u,f=Oc(n),s=f*i-c*o;return[Ac(c*i+f*o,a*e+s*r),Pc(s*e-a*r)]},u}ss.invert=ss;var vs=function(t){function n(n){return(n=t(n[0]*xc,n[1]*xc))[0]*=mc,n[1]*=mc,n}return t=ls(t[0]*xc,t[1]*xc,t.length>2?t[2]*xc:0),n.invert=function(n){return(n=t.invert(n[0]*xc,n[1]*xc))[0]*=mc,n[1]*=mc,n},n};function ys(t,n,e,r,i,o){if(e){var u=Sc(n),a=Oc(n),c=r*e;null==i?(i=n+r*bc,o=n-c/2):(i=gs(u,i),o=gs(u,o),(r>0?io)&&(i+=r*bc));for(var f,s=i;r>0?s>o:s1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}},ms=function(t,n){return wc(t[0]-n[0])<1e-6&&wc(t[1]-n[1])<1e-6};function xs(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}var ws=function(t,n,e,r,i){var o,u,a=[],c=[];if(t.forEach((function(t){if(!((n=t.length-1)<=0)){var n,e,r=t[0],u=t[n];if(ms(r,u)){if(!r[2]&&!u[2]){for(i.lineStart(),o=0;o=0;--o)i.point((s=f[o])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function Ms(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,S=A*M,k=S>yc,C=v*x;if(As.add(Ac(C*A*Oc(S),y*w+C*Sc(S))),u+=k?M+A*bc:M,k^d>=e^b>=e){var E=af(of(h),of(_));sf(E);var T=af(o,E);sf(T);var O=(k^M>=0?-1:1)*Pc(T[2]);(r>O||r===O&&(E[0]||E[1]))&&(a+=k^M>=0?1:-1)}}return(u<-1e-6||u<1e-6&&As<-1e-6)^1&a},Cs=function(t,n,e,r){return function(i){var o,u,a,c=n(i),f=bs(),s=n(f),l=!1,h={point:d,lineStart:v,lineEnd:y,polygonStart:function(){h.point=g,h.lineStart=_,h.lineEnd=b,u=[],o=[]},polygonEnd:function(){h.point=d,h.lineStart=v,h.lineEnd=y,u=U(u);var t=ks(o,r);u.length?(l||(i.polygonStart(),l=!0),ws(u,Ts,t,e,i)):t&&(l||(i.polygonStart(),l=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=o=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(n,e){t(n,e)&&i.point(n,e)}function p(t,n){c.point(t,n)}function v(){h.point=p,c.lineStart()}function y(){h.point=d,c.lineEnd()}function g(t,n){a.push([t,n]),s.point(t,n)}function _(){s.lineStart(),a=[]}function b(){g(a[0][0],a[0][1]),s.lineEnd();var t,n,e,r,c=s.clean(),h=f.result(),d=h.length;if(a.pop(),o.push(a),a=null,d)if(1&c){if((n=(e=h[0]).length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t1&&2&c&&h.push(h.pop().concat(h.shift())),u.push(h.filter(Es))}return h}};function Es(t){return t.length>1}function Ts(t,n){return((t=t.x)[0]<0?t[1]-gc-1e-6:gc-t[1])-((n=n.x)[0]<0?n[1]-gc-1e-6:gc-n[1])}var Os=Cs((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,u){var a=o>0?yc:-yc,c=wc(o-e);wc(c-yc)<1e-6?(t.point(e,r=(r+u)/2>0?gc:-gc),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),n=0):i!==a&&c>=yc&&(wc(e-i)<1e-6&&(e-=1e-6*i),wc(o-a)<1e-6&&(o-=1e-6*a),r=function(t,n,e,r){var i,o,u=Oc(t-e);return wc(u)>1e-6?Mc((Oc(n)*(o=Sc(r))*Oc(e)-Oc(r)*(i=Sc(n))*Oc(t))/(i*o*u)):(n+r)/2}(e,r,o,u),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),n=0),t.point(e=o,r=u),i=a},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*gc,r.point(-yc,i),r.point(0,i),r.point(yc,i),r.point(yc,0),r.point(yc,-i),r.point(0,-i),r.point(-yc,-i),r.point(-yc,0),r.point(-yc,i);else if(wc(t[0]-n[0])>1e-6){var o=t[0]0,i=wc(n)>1e-6;function o(t,e){return Sc(t)*Sc(e)>n}function u(t,e,r){var i=[1,0,0],o=af(of(t),of(e)),u=uf(o,o),a=o[0],c=u-a*a;if(!c)return!r&&t;var f=n*u/c,s=-n*a/c,l=af(i,o),h=ff(i,f);cf(h,ff(o,s));var d=l,p=uf(h,d),v=uf(d,d),y=p*p-v*(uf(h,h)-1);if(!(y<0)){var g=jc(y),_=ff(d,(-p-g)/v);if(cf(_,h),_=rf(_),!r)return _;var b,m=t[0],x=e[0],w=t[1],M=e[1];x0^_[1]<(wc(_[0]-m)<1e-6?w:M):w<=_[1]&&_[1]<=M:A>yc^(m<=_[0]&&_[0]<=x)){var k=ff(d,(-p+g)/v);return cf(k,h),[_,rf(k)]}}}function a(n,e){var i=r?t:yc-t,o=0;return n<-i?o|=1:n>i&&(o|=2),e<-i?o|=4:e>i&&(o|=8),o}return Cs(o,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],v=o(l,h),y=r?v?0:a(l,h):v?a(l+(l<0?yc:-yc),h):0;if(!n&&(f=c=v)&&t.lineStart(),v!==c&&(!(d=u(n,p))||ms(n,d)||ms(p,d))&&(p[2]=1),v!==c)s=0,v?(t.lineStart(),d=u(p,n),t.point(d[0],d[1])):(d=u(n,p),t.point(d[0],d[1],2),t.lineEnd()),n=d;else if(i&&n&&r^v){var g;y&e||!(g=u(p,n,!0))||(s=0,r?(t.lineStart(),t.point(g[0][0],g[0][1]),t.point(g[1][0],g[1][1]),t.lineEnd()):(t.point(g[1][0],g[1][1]),t.lineEnd(),t.lineStart(),t.point(g[0][0],g[0][1],3)))}!v||n&&ms(n,p)||t.point(p[0],p[1]),n=p,c=v,e=y},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,o){ys(o,t,e,i,n,r)}),r?[0,-t]:[-yc,t-yc])};function js(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,a,f){var s=0,l=0;if(null==i||(s=u(i,a))!==(l=u(o,a))||c(i,o)<0^a>0)do{f.point(0===s||3===s?t:e,s>1?r:n)}while((s=(s+a+4)%4)!==l);else f.point(o[0],o[1])}function u(r,i){return wc(r[0]-t)<1e-6?i>0?0:3:wc(r[0]-e)<1e-6?i>0?2:1:wc(r[1]-n)<1e-6?i>0?1:0:i>0?3:2}function a(t,n){return c(t.x,n.x)}function c(t,n){var e=u(t,1),r=u(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(u){var c,f,s,l,h,d,p,v,y,g,_,b=u,m=bs(),x={point:w,lineStart:function(){x.point=M,f&&f.push(s=[]);g=!0,y=!1,p=v=NaN},lineEnd:function(){c&&(M(l,h),d&&y&&m.rejoin(),c.push(m.result()));x.point=w,y&&b.lineEnd()},polygonStart:function(){b=m,c=[],f=[],_=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,i=f.length;er&&(h-o)*(r-u)>(d-u)*(t-o)&&++n:d<=r&&(h-o)*(r-u)<(d-u)*(t-o)&&--n;return n}(),e=_&&n,i=(c=U(c)).length;(e||i)&&(u.polygonStart(),e&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),i&&ws(c,a,n,o,u),u.polygonEnd());b=u,c=f=s=null}};function w(t,n){i(t,n)&&b.point(t,n)}function M(o,u){var a=i(o,u);if(f&&s.push([o,u]),g)l=o,h=u,d=a,g=!1,a&&(b.lineStart(),b.point(o,u));else if(a&&y)b.point(o,u);else{var c=[p=Math.max(-1e9,Math.min(1e9,p)),v=Math.max(-1e9,Math.min(1e9,v))],m=[o=Math.max(-1e9,Math.min(1e9,o)),u=Math.max(-1e9,Math.min(1e9,u))];!function(t,n,e,r,i,o){var u,a=t[0],c=t[1],f=0,s=1,l=n[0]-a,h=n[1]-c;if(u=e-a,l||!(u>0)){if(u/=l,l<0){if(u0){if(u>s)return;u>f&&(f=u)}if(u=i-a,l||!(u<0)){if(u/=l,l<0){if(u>s)return;u>f&&(f=u)}else if(l>0){if(u0)){if(u/=h,h<0){if(u0){if(u>s)return;u>f&&(f=u)}if(u=o-c,h||!(u<0)){if(u/=h,h<0){if(u>s)return;u>f&&(f=u)}else if(h>0){if(u0&&(t[0]=a+f*l,t[1]=c+f*h),s<1&&(n[0]=a+s*l,n[1]=c+s*h),!0}}}}}(c,m,t,n,e,r)?a&&(b.lineStart(),b.point(o,u),_=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(m[0],m[1]),a||b.lineEnd(),_=!1)}p=o,v=u,y=a}return x}}var Rs,zs,Ps,Ls=function(){var t,n,e,r=0,i=0,o=960,u=500;return e={stream:function(e){return t&&n===e?t:t=js(r,i,o,u)(n=e)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],o=+a[1][0],u=+a[1][1],t=n=null,e):[[r,i],[o,u]]}}},Is=hc(),Fs={sphere:Ic,point:Ic,lineStart:function(){Fs.point=Bs,Fs.lineEnd=Ds},lineEnd:Ic,polygonStart:Ic,polygonEnd:Ic};function Ds(){Fs.point=Fs.lineEnd=Ic}function Bs(t,n){Rs=t*=xc,zs=Oc(n*=xc),Ps=Sc(n),Fs.point=Us}function Us(t,n){t*=xc;var e=Oc(n*=xc),r=Sc(n),i=wc(t-Rs),o=Sc(i),u=r*Oc(i),a=Ps*e-zs*r*o,c=zs*e+Ps*r*o;Is.add(Ac(jc(u*u+a*a),c)),Rs=t,zs=e,Ps=r}var Ys=function(t){return Is.reset(),Gc(t,Fs),+Is},Vs=[null,null],qs={type:"LineString",coordinates:Vs},Hs=function(t,n){return Vs[0]=t,Vs[1]=n,Ys(qs)},$s={Feature:function(t,n){return Gs(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r0&&(i=Hs(t[o],t[o-1]))>0&&e<=i&&r<=i&&(e+r-i)*(1-Math.pow((e-r)/i,2))<1e-12*i)return!0;e=r}return!1}function Ks(t,n){return!!ks(t.map(Qs),Js(n))}function Qs(t){return(t=t.map(Js)).pop(),t}function Js(t){return[t[0]*xc,t[1]*xc]}var tl=function(t,n){return(t&&$s.hasOwnProperty(t.type)?$s[t.type]:Gs)(t,n)};function nl(t,n,e){var r=k(t,n-1e-6,e).concat(n);return function(t){return r.map((function(n){return[t,n]}))}}function el(t,n,e){var r=k(t,n-1e-6,e).concat(n);return function(t){return r.map((function(n){return[n,t]}))}}function rl(){var t,n,e,r,i,o,u,a,c,f,s,l,h=10,d=h,p=90,v=360,y=2.5;function g(){return{type:"MultiLineString",coordinates:_()}}function _(){return k(kc(r/p)*p,e,p).map(s).concat(k(kc(a/v)*v,u,v).map(l)).concat(k(kc(n/h)*h,t,h).filter((function(t){return wc(t%p)>1e-6})).map(c)).concat(k(kc(o/d)*d,i,d).filter((function(t){return wc(t%v)>1e-6})).map(f))}return g.lines=function(){return _().map((function(t){return{type:"LineString",coordinates:t}}))},g.outline=function(){return{type:"Polygon",coordinates:[s(r).concat(l(u).slice(1),s(e).reverse().slice(1),l(a).reverse().slice(1))]}},g.extent=function(t){return arguments.length?g.extentMajor(t).extentMinor(t):g.extentMinor()},g.extentMajor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],u=+t[1][1],r>e&&(t=r,r=e,e=t),a>u&&(t=a,a=u,u=t),g.precision(y)):[[r,a],[e,u]]},g.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),o>i&&(e=o,o=i,i=e),g.precision(y)):[[n,o],[t,i]]},g.step=function(t){return arguments.length?g.stepMajor(t).stepMinor(t):g.stepMinor()},g.stepMajor=function(t){return arguments.length?(p=+t[0],v=+t[1],g):[p,v]},g.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],g):[h,d]},g.precision=function(h){return arguments.length?(y=+h,c=nl(o,i,90),f=el(n,t,y),s=nl(a,u,90),l=el(r,e,y),g):y},g.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function il(){return rl()()}var ol,ul,al,cl,fl=function(t,n){var e=t[0]*xc,r=t[1]*xc,i=n[0]*xc,o=n[1]*xc,u=Sc(r),a=Oc(r),c=Sc(o),f=Oc(o),s=u*Sc(e),l=u*Oc(e),h=c*Sc(i),d=c*Oc(i),p=2*Pc(jc(Lc(o-r)+u*c*Lc(i-e))),v=Oc(p),y=p?function(t){var n=Oc(t*=p)/v,e=Oc(p-t)/v,r=e*s+n*h,i=e*l+n*d,o=e*a+n*f;return[Ac(i,r)*mc,Ac(o,jc(r*r+i*i))*mc]}:function(){return[e*mc,r*mc]};return y.distance=p,y},sl=function(t){return t},ll=hc(),hl=hc(),dl={point:Ic,lineStart:Ic,lineEnd:Ic,polygonStart:function(){dl.lineStart=pl,dl.lineEnd=gl},polygonEnd:function(){dl.lineStart=dl.lineEnd=dl.point=Ic,ll.add(wc(hl)),hl.reset()},result:function(){var t=ll/2;return ll.reset(),t}};function pl(){dl.point=vl}function vl(t,n){dl.point=yl,ol=al=t,ul=cl=n}function yl(t,n){hl.add(cl*t-al*n),al=t,cl=n}function gl(){yl(ol,ul)}var _l=dl,bl=1/0,ml=bl,xl=-bl,wl=xl;var Ml,Al,Sl,kl,Cl={point:function(t,n){txl&&(xl=t);nwl&&(wl=n)},lineStart:Ic,lineEnd:Ic,polygonStart:Ic,polygonEnd:Ic,result:function(){var t=[[bl,ml],[xl,wl]];return xl=wl=-(ml=bl=1/0),t}},El=0,Tl=0,Ol=0,Nl=0,jl=0,Rl=0,zl=0,Pl=0,Ll=0,Il={point:Fl,lineStart:Dl,lineEnd:Yl,polygonStart:function(){Il.lineStart=Vl,Il.lineEnd=ql},polygonEnd:function(){Il.point=Fl,Il.lineStart=Dl,Il.lineEnd=Yl},result:function(){var t=Ll?[zl/Ll,Pl/Ll]:Rl?[Nl/Rl,jl/Rl]:Ol?[El/Ol,Tl/Ol]:[NaN,NaN];return El=Tl=Ol=Nl=jl=Rl=zl=Pl=Ll=0,t}};function Fl(t,n){El+=t,Tl+=n,++Ol}function Dl(){Il.point=Bl}function Bl(t,n){Il.point=Ul,Fl(Sl=t,kl=n)}function Ul(t,n){var e=t-Sl,r=n-kl,i=jc(e*e+r*r);Nl+=i*(Sl+t)/2,jl+=i*(kl+n)/2,Rl+=i,Fl(Sl=t,kl=n)}function Yl(){Il.point=Fl}function Vl(){Il.point=Hl}function ql(){$l(Ml,Al)}function Hl(t,n){Il.point=$l,Fl(Ml=Sl=t,Al=kl=n)}function $l(t,n){var e=t-Sl,r=n-kl,i=jc(e*e+r*r);Nl+=i*(Sl+t)/2,jl+=i*(kl+n)/2,Rl+=i,zl+=(i=kl*t-Sl*n)*(Sl+t),Pl+=i*(kl+n),Ll+=3*i,Fl(Sl=t,kl=n)}var Xl=Il;function Gl(t){this._context=t}Gl.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,bc)}},result:Ic};var Wl,Zl,Kl,Ql,Jl,th=hc(),nh={point:Ic,lineStart:function(){nh.point=eh},lineEnd:function(){Wl&&rh(Zl,Kl),nh.point=Ic},polygonStart:function(){Wl=!0},polygonEnd:function(){Wl=null},result:function(){var t=+th;return th.reset(),t}};function eh(t,n){nh.point=rh,Zl=Ql=t,Kl=Jl=n}function rh(t,n){Ql-=t,Jl-=n,th.add(jc(Ql*Ql+Jl*Jl)),Ql=t,Jl=n}var ih=nh;function oh(){this._string=[]}function uh(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}oh.prototype={_radius:4.5,_circle:uh(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=uh(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ah=function(t,n){var e,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Gc(t,e(r))),r.result()}return o.area=function(t){return Gc(t,e(_l)),_l.result()},o.measure=function(t){return Gc(t,e(ih)),ih.result()},o.bounds=function(t){return Gc(t,e(Cl)),Cl.result()},o.centroid=function(t){return Gc(t,e(Xl)),Xl.result()},o.projection=function(n){return arguments.length?(e=null==n?(t=null,sl):(t=n).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(n=null,new oh):new Gl(n=t),"function"!=typeof i&&r.pointRadius(i),o):n},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(n)},ch=function(t){return{stream:fh(t)}};function fh(t){return function(n){var e=new sh;for(var r in t)e[r]=t[r];return e.stream=n,e}}function sh(){}function lh(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Gc(e,t.stream(Cl)),n(Cl.result()),null!=r&&t.clipExtent(r),t}function hh(t,n,e){return lh(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),u=+n[0][0]+(r-o*(e[1][0]+e[0][0]))/2,a=+n[0][1]+(i-o*(e[1][1]+e[0][1]))/2;t.scale(150*o).translate([u,a])}),e)}function dh(t,n,e){return hh(t,[[0,0],n],e)}function ph(t,n,e){return lh(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),o=(r-i*(e[1][0]+e[0][0]))/2,u=-i*e[0][1];t.scale(150*i).translate([o,u])}),e)}function vh(t,n,e){return lh(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),o=-i*e[0][0],u=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([o,u])}),e)}sh.prototype={constructor:sh,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var yh=Sc(30*xc),gh=function(t,n){return+n?function(t,n){function e(r,i,o,u,a,c,f,s,l,h,d,p,v,y){var g=f-r,_=s-i,b=g*g+_*_;if(b>4*n&&v--){var m=u+h,x=a+d,w=c+p,M=jc(m*m+x*x+w*w),A=Pc(w/=M),S=wc(wc(w)-1)<1e-6||wc(o-l)<1e-6?(o+l)/2:Ac(x,m),k=t(S,A),C=k[0],E=k[1],T=C-r,O=E-i,N=_*T-g*O;(N*N/b>n||wc((g*T+_*O)/b-.5)>.3||u*h+a*d+c*p2?t[2]%360*xc:0,T()):[y*mc,g*mc,_*mc]},C.angle=function(t){return arguments.length?(b=t%360*xc,T()):b*mc},C.reflectX=function(t){return arguments.length?(m=t?-1:1,T()):m<0},C.reflectY=function(t){return arguments.length?(x=t?-1:1,T()):x<0},C.precision=function(t){return arguments.length?(u=gh(a,k=t*t),O()):jc(k)},C.fitExtent=function(t,n){return hh(C,t,n)},C.fitSize=function(t,n){return dh(C,t,n)},C.fitWidth=function(t,n){return ph(C,t,n)},C.fitHeight=function(t,n){return vh(C,t,n)},function(){return n=t.apply(this,arguments),C.invert=n.invert&&E,T()}}function Mh(t){var n=0,e=yc/3,r=wh(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*xc,e=t[1]*xc):[n*mc,e*mc]},i}function Ah(t,n){var e=Oc(t),r=(e+Oc(n))/2;if(wc(r)<1e-6)return function(t){var n=Sc(t);function e(t,e){return[t*n,Oc(e)/n]}return e.invert=function(t,e){return[t/n,Pc(e*n)]},e}(t);var i=1+e*(2*r-e),o=jc(i)/r;function u(t,n){var e=jc(i-2*r*Oc(n))/r;return[e*Oc(t*=r),o-e*Sc(t)]}return u.invert=function(t,n){var e=o-n,u=Ac(t,wc(e))*Nc(e);return e*r<0&&(u-=yc*Nc(t)*Nc(e)),[u/r,Pc((i-(t*t+e*e)*r*r)/(2*r))]},u}var Sh=function(){return Mh(Ah).scale(155.424).center([0,33.6442])},kh=function(){return Sh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var Ch=function(){var t,n,e,r,i,o,u=kh(),a=Sh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Sh().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f={point:function(t,n){o=[t,n]}};function s(t){var n=t[0],u=t[1];return o=null,e.point(n,u),o||(r.point(n,u),o)||(i.point(n,u),o)}function l(){return t=n=null,s}return s.invert=function(t){var n=u.scale(),e=u.translate(),r=(t[0]-e[0])/n,i=(t[1]-e[1])/n;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:u).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[u.stream(n=e),a.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e0?n<1e-6-gc&&(n=1e-6-gc):n>gc-1e-6&&(n=gc-1e-6);var e=i/Tc(Ih(n),r);return[e*Oc(r*t),i-e*Sc(r*t)]}return o.invert=function(t,n){var e=i-n,o=Nc(r)*jc(t*t+e*e),u=Ac(t,wc(e))*Nc(e);return e*r<0&&(u-=yc*Nc(t)*Nc(e)),[u/r,2*Mc(Tc(i/o,1/r))-gc]},o}var Dh=function(){return Mh(Fh).scale(109.5).parallels([30,30])};function Bh(t,n){return[t,n]}Bh.invert=Bh;var Uh=function(){return xh(Bh).scale(152.63)};function Yh(t,n){var e=Sc(t),r=t===n?Oc(t):(e-Sc(n))/(n-t),i=e/r+t;if(wc(r)<1e-6)return Bh;function o(t,n){var e=i-n,o=r*t;return[e*Oc(o),i-e*Sc(o)]}return o.invert=function(t,n){var e=i-n,o=Ac(t,wc(e))*Nc(e);return e*r<0&&(o-=yc*Nc(t)*Nc(e)),[o/r,i-Nc(r)*jc(t*t+e*e)]},o}var Vh=function(){return Mh(Yh).scale(131.154).center([0,13.9389])},qh=1.340264,Hh=-.081106,$h=893e-6,Xh=.003796,Gh=jc(3)/2;function Wh(t,n){var e=Pc(Gh*Oc(n)),r=e*e,i=r*r*r;return[t*Sc(e)/(Gh*(qh+3*Hh*r+i*(7*$h+9*Xh*r))),e*(qh+Hh*r+i*($h+Xh*r))]}Wh.invert=function(t,n){for(var e,r=n,i=r*r,o=i*i*i,u=0;u<12&&(o=(i=(r-=e=(r*(qh+Hh*i+o*($h+Xh*i))-n)/(qh+3*Hh*i+o*(7*$h+9*Xh*i)))*r)*i*i,!(wc(e)<1e-12));++u);return[Gh*t*(qh+3*Hh*i+o*(7*$h+9*Xh*i))/Sc(r),Pc(Oc(r)/Gh)]};var Zh=function(){return xh(Wh).scale(177.158)};function Kh(t,n){var e=Sc(n),r=Sc(t)*e;return[e*Oc(t)/r,Oc(n)/r]}Kh.invert=Th(Mc);var Qh=function(){return xh(Kh).scale(144.049).clipAngle(60)},Jh=function(){var t,n,e,r,i,o,u,a=1,c=0,f=0,s=1,l=1,h=0,d=null,p=1,v=1,y=fh({point:function(t,n){var e=b([t,n]);this.stream.point(e[0],e[1])}}),g=sl;function _(){return p=a*s,v=a*l,o=u=null,b}function b(e){var r=e[0]*p,i=e[1]*v;if(h){var o=i*t-r*n;r=r*t+i*n,i=o}return[r+c,i+f]}return b.invert=function(e){var r=e[0]-c,i=e[1]-f;if(h){var o=i*t+r*n;r=r*t-i*n,i=o}return[r/p,i/v]},b.stream=function(t){return o&&u===t?o:o=y(g(u=t))},b.postclip=function(t){return arguments.length?(g=t,d=e=r=i=null,_()):g},b.clipExtent=function(t){return arguments.length?(g=null==t?(d=e=r=i=null,sl):js(d=+t[0][0],e=+t[0][1],r=+t[1][0],i=+t[1][1]),_()):null==d?null:[[d,e],[r,i]]},b.scale=function(t){return arguments.length?(a=+t,_()):a},b.translate=function(t){return arguments.length?(c=+t[0],f=+t[1],_()):[c,f]},b.angle=function(e){return arguments.length?(n=Oc(h=e%360*xc),t=Sc(h),_()):h*mc},b.reflectX=function(t){return arguments.length?(s=t?-1:1,_()):s<0},b.reflectY=function(t){return arguments.length?(l=t?-1:1,_()):l<0},b.fitExtent=function(t,n){return hh(b,t,n)},b.fitSize=function(t,n){return dh(b,t,n)},b.fitWidth=function(t,n){return ph(b,t,n)},b.fitHeight=function(t,n){return vh(b,t,n)},b};function td(t,n){var e=n*n,r=e*e;return[t*(.8707-.131979*e+r*(r*(.003971*e-.001529*r)-.013791)),n*(1.007226+e*(.015085+r*(.028874*e-.044475-.005916*r)))]}td.invert=function(t,n){var e,r=n,i=25;do{var o=r*r,u=o*o;r-=e=(r*(1.007226+o*(.015085+u*(.028874*o-.044475-.005916*u)))-n)/(1.007226+o*(.045255+u*(.259866*o-.311325-.005916*11*u)))}while(wc(e)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]};var nd=function(){return xh(td).scale(175.295)};function ed(t,n){return[Sc(n)*Oc(t),Oc(n)]}ed.invert=Th(Pc);var rd=function(){return xh(ed).scale(249.5).clipAngle(90.000001)};function id(t,n){var e=Sc(n),r=1+Sc(t)*e;return[e*Oc(t)/r,Oc(n)/r]}id.invert=Th((function(t){return 2*Mc(t)}));var od=function(){return xh(id).scale(250).clipAngle(142)};function ud(t,n){return[Ec(Rc((gc+n)/2)),-t]}ud.invert=function(t,n){return[-n,2*Mc(Cc(t))-gc]};var ad=function(){var t=Lh(ud),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)};function cd(t,n){return t.parent===n.parent?1:2}function fd(t,n){return t+n.x}function sd(t,n){return Math.max(t,n.y)}var ld=function(){var t=cd,n=1,e=1,r=!1;function i(i){var o,u=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(fd,0)/t.length}(e),n.y=function(t){return 1+t.reduce(sd,0)}(e)):(n.x=o?u+=t(n,o):0,n.y=0,o=n)}));var a=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=a.x-t(a,c)/2,s=c.x+t(c,a)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i};function hd(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function dd(t,n){var e,r,i,o,u,a=new gd(t),c=+t.value&&(a.value=t.value),f=[a];for(null==n&&(n=pd);e=f.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(u=i.length))for(e.children=new Array(u),o=u-1;o>=0;--o)f.push(r=e.children[o]=new gd(i[o])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(yd)}function pd(t){return t.children}function vd(t){t.data=t.data.data}function yd(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function gd(t){this.data=t,this.depth=this.height=0,this.parent=null}gd.prototype=dd.prototype={constructor:gd,count:function(){return this.eachAfter(hd)},each:function(t){var n,e,r,i,o=this,u=[o];do{for(n=u.reverse(),u=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;t=e.pop(),n=r.pop();for(;t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each((function(n){t.push(n)})),t},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return dd(this).eachBefore(vd)}};var _d=Array.prototype.slice;var bd=function(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(_d.call(t))).length,o=[];r0&&e*e>r*r+i*i}function Md(t,n){for(var e=0;e(u*=u)?(r=(f+u-i)/(2*f),o=Math.sqrt(Math.max(0,u/f-r*r)),e.x=t.x-r*a-o*c,e.y=t.y-r*c+o*a):(r=(f+i-u)/(2*f),o=Math.sqrt(Math.max(0,i/f-r*r)),e.x=n.x+r*a-o*c,e.y=n.y+r*c+o*a)):(e.x=n.x+e.r,e.y=n.y)}function Ed(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function Td(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function Od(t){this._=t,this.next=null,this.previous=null}function Nd(t){if(!(i=t.length))return 0;var n,e,r,i,o,u,a,c,f,s,l;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;Cd(e,n,r=t[2]),n=new Od(n),e=new Od(e),r=new Od(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a0)throw new Error("cycle");return o}return e.id=function(n){return arguments.length?(t=zd(n),e):t},e.parentId=function(t){return arguments.length?(n=zd(t),e):n},e};function Zd(t,n){return t.parent===n.parent?1:2}function Kd(t){var n=t.children;return n?n[0]:t.t}function Qd(t){var n=t.children;return n?n[n.length-1]:t.t}function Jd(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function tp(t,n,e){return t.a.parent===n.parent?t.a:e}function np(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}np.prototype=Object.create(gd.prototype);var ep=function(){var t=Zd,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,o,u=new np(t,0),a=[u];n=a.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)a.push(e=n.children[i]=new np(r[i],i)),e.parent=n;return(u.parent=new np(null,0)).children=[u],u}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(u),r)i.eachBefore(a);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),v=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*v}))}return i}function o(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var o=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-o):n.z=o}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,o=n,u=n,a=e,c=o.parent.children[0],f=o.m,s=u.m,l=a.m,h=c.m;a=Qd(a),o=Kd(o),a&&o;)c=Kd(c),(u=Qd(u)).a=n,(i=a.z+l-o.z-f+t(a._,o._))>0&&(Jd(tp(a,n,r),n,i),f+=i,s+=i),l+=a.m,f+=o.m,h+=c.m,s+=u.m;a&&!Qd(u)&&(u.t=a,u.m+=l-s),o&&!Kd(c)&&(c.t=o,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},rp=function(t,n,e,r,i){for(var o,u=t.children,a=-1,c=u.length,f=t.value&&(i-e)/t.value;++ah&&(h=a),y=s*s*v,(d=Math.max(h/y,y/l))>p){s-=a;break}p=d}g.push(u={value:s,dice:c1?n:1)},e}(ip),ap=function(){var t=up,n=!1,e=1,r=1,i=[0],o=Pd,u=Pd,a=Pd,c=Pd,f=Pd;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(Yd),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=a[n];return s.x0=i,s.y0=o,s.x1=u,void(s.y1=c)}var l=f[n],h=r/2+l,d=n+1,p=e-1;for(;d>>1;f[v]c-o){var _=(i*g+u*y)/r;t(n,d,y,i,o,_,c),t(d,e,g,_,o,u,c)}else{var b=(o*g+c*y)/r;t(n,d,y,i,o,u,b),t(d,e,g,i,b,u,c)}}(0,c,t.value,n,e,r,i)},fp=function(t,n,e,r,i){(1&t.depth?rp:Vd)(t,n,e,r,i)},sp=function t(n){function e(t,e,r,i,o){if((u=t._squarify)&&u.ratio===n)for(var u,a,c,f,s,l=-1,h=u.length,d=t.value;++l1?n:1)},e}(ip),lp=function(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}},hp=function(t,n){var e=de(+t,+n);return function(t){var n=e(t);return n-360*Math.floor(n/360)}},dp=function(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}},pp=Math.SQRT2;function vp(t){return((t=Math.exp(t))+1/t)/2}var yp=function(t,n){var e,r,i=t[0],o=t[1],u=t[2],a=n[0],c=n[1],f=n[2],s=a-i,l=c-o,h=s*s+l*l;if(h<1e-12)r=Math.log(f/u)/pp,e=function(t){return[i+t*s,o+t*l,u*Math.exp(pp*t*r)]};else{var d=Math.sqrt(h),p=(f*f-u*u+4*h)/(2*u*2*d),v=(f*f-u*u-4*h)/(2*f*2*d),y=Math.log(Math.sqrt(p*p+1)-p),g=Math.log(Math.sqrt(v*v+1)-v);r=(g-y)/pp,e=function(t){var n,e=t*r,a=vp(y),c=u/(2*d)*(a*(n=pp*e+y,((n=Math.exp(2*n))-1)/(n+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+c*s,o+c*l,u*a/vp(pp*e+y)]}}return e.duration=1e3*r,e};function gp(t){return function(n,e){var r=t((n=oe(n)).h,(e=oe(e)).h),i=ve(n.s,e.s),o=ve(n.l,e.l),u=ve(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=o(t),n.opacity=u(t),n+""}}}var _p=gp(de),bp=gp(ve);function mp(t,n){var e=ve((t=bo(t)).l,(n=bo(n)).l),r=ve(t.a,n.a),i=ve(t.b,n.b),o=ve(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+""}}function xp(t){return function(n,e){var r=t((n=Co(n)).h,(e=Co(e)).h),i=ve(n.c,e.c),o=ve(n.l,e.l),u=ve(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=o(t),n.opacity=u(t),n+""}}}var wp=xp(de),Mp=xp(ve);function Ap(t){return function n(e){function r(n,r){var i=t((n=Po(n)).h,(r=Po(r)).h),o=ve(n.s,r.s),u=ve(n.l,r.l),a=ve(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=u(Math.pow(t,e)),n.opacity=a(t),n+""}}return e=+e,r.gamma=n,r}(1)}var Sp=Ap(de),kp=Ap(ve);function Cp(t,n){for(var e=0,r=n.length-1,i=n[0],o=new Array(r<0?0:r);e1&&(n=t[o[u-2]],e=t[o[u-1]],r=t[a],(e[0]-n[0])*(r[1]-n[1])-(e[1]-n[1])*(r[0]-n[0])<=0);)--u;o[u++]=a}return o.slice(0,u)}var Rp=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)f.push(t[r[o[n]][2]]);for(n=+a;na!=f>a&&u<(c-e)*(a-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},Pp=function(t){for(var n,e,r=-1,i=t.length,o=t[i-1],u=o[0],a=o[1],c=0;++r1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(Lp),Dp=function t(n){function e(){var t=Fp.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(Lp),Bp=function t(n){function e(t){return function(){for(var e=0,r=0;rr&&(n=e,e=r,r=n),function(t){return Math.max(e,Math.min(r,t))}}function iv(t,n,e){var r=t[0],i=t[1],o=n[0],u=n[1];return i2?ov:iv,i=o=null,l}function l(n){return isNaN(n=+n)?e:(i||(i=r(u.map(t),a,c)))(t(f(n)))}return l.invert=function(e){return f(n((o||(o=r(a,u.map(t),Se)))(e)))},l.domain=function(t){return arguments.length?(u=$p.call(t,Jp),f===nv||(f=rv(u)),s()):u.slice()},l.range=function(t){return arguments.length?(a=Xp.call(t),s()):a.slice()},l.rangeRound=function(t){return a=Xp.call(t),c=dp,s()},l.clamp=function(t){return arguments.length?(f=t?rv(u):nv,l):f!==nv},l.interpolate=function(t){return arguments.length?(c=t,s()):c},l.unknown=function(t){return arguments.length?(e=t,l):e},function(e,r){return t=e,n=r,s()}}function cv(t,n){return av()(t,n)}var fv=function(t,n,e,r){var i,o=j(t,n,e);switch((r=Za(null==r?",f":r)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=sc(o,u))||(r.precision=i),nc(r,u);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=lc(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=fc(o))||(r.precision=i-2*("%"===r.type))}return tc(r)};function sv(t){var n=t.domain;return t.ticks=function(t){var e=n();return O(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return fv(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i=n(),o=0,u=i.length-1,a=i[o],c=i[u];return c0?r=N(a=Math.floor(a/r)*r,c=Math.ceil(c/r)*r,e):r<0&&(r=N(a=Math.ceil(a*r)/r,c=Math.floor(c*r)/r,e)),r>0?(i[o]=Math.floor(a/r)*r,i[u]=Math.ceil(c/r)*r,n(i)):r<0&&(i[o]=Math.ceil(a*r)/r,i[u]=Math.floor(c*r)/r,n(i)),t},t}function lv(){var t=cv(nv,nv);return t.copy=function(){return uv(t,lv())},Vp.apply(t,arguments),sv(t)}function hv(t){var n;function e(t){return isNaN(t=+t)?n:t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=$p.call(n,Jp),e):t.slice()},e.unknown=function(t){return arguments.length?(n=t,e):n},e.copy=function(){return hv(t).unknown(n)},t=arguments.length?$p.call(t,Jp):[0,1],sv(e)}var dv=function(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],u=t[i];return u0){for(;hc)break;v.push(l)}}else for(;h=1;--s)if(!((l=f*s)c)break;v.push(l)}}else v=O(h,d,Math.min(d-h,p)).map(e);return r?v.reverse():v},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=tc(i)),t===1/0)return i;null==t&&(t=10);var u=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/e(Math.round(n(t)));return r*o0?r[i-1]:n[0],i=r?[i[r-1],e]:[i[u-1],i[u]]},u.unknown=function(n){return arguments.length?(t=n,u):u},u.thresholds=function(){return i.slice()},u.copy=function(){return Rv().domain([n,e]).range(o).unknown(t)},Vp.apply(sv(u),arguments)}function zv(){var t,n=[.5],e=[0,1],r=1;function i(i){return i<=i?e[h(n,i,0,r)]:t}return i.domain=function(t){return arguments.length?(n=Xp.call(t),r=Math.min(n.length,e.length-1),i):n.slice()},i.range=function(t){return arguments.length?(e=Xp.call(t),r=Math.min(n.length,e.length-1),i):e.slice()},i.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},i.unknown=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return zv().domain(n).range(e).unknown(t)},Vp.apply(i,arguments)}var Pv=new Date,Lv=new Date;function Iv(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=function(n){return t(n=new Date(+n)),n},i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n0))return a;do{a.push(u=new Date(+e)),n(e,o),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&&(i.count=function(n,r){return Pv.setTime(+n),Lv.setTime(+r),t(Pv),t(Lv),Math.floor(e(Pv,Lv))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var Fv=Iv((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()}));Fv.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Iv((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};var Dv=Fv,Bv=Fv.range,Uv=Iv((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),Yv=Uv,Vv=Uv.range;function qv(t){return Iv((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var Hv=qv(0),$v=qv(1),Xv=qv(2),Gv=qv(3),Wv=qv(4),Zv=qv(5),Kv=qv(6),Qv=Hv.range,Jv=$v.range,ty=Xv.range,ny=Gv.range,ey=Wv.range,ry=Zv.range,iy=Kv.range,oy=Iv((function(t){t.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),uy=oy,ay=oy.range,cy=Iv((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()})),fy=cy,sy=cy.range,ly=Iv((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,n){t.setTime(+t+6e4*n)}),(function(t,n){return(n-t)/6e4}),(function(t){return t.getMinutes()})),hy=ly,dy=ly.range,py=Iv((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})),vy=py,yy=py.range,gy=Iv((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));gy.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Iv((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):gy:null};var _y=gy,by=gy.range;function my(t){return Iv((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/6048e5}))}var xy=my(0),wy=my(1),My=my(2),Ay=my(3),Sy=my(4),ky=my(5),Cy=my(6),Ey=xy.range,Ty=wy.range,Oy=My.range,Ny=Ay.range,jy=Sy.range,Ry=ky.range,zy=Cy.range,Py=Iv((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1})),Ly=Py,Iy=Py.range,Fy=Iv((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()}));Fy.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Iv((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};var Dy=Fy,By=Fy.range;function Uy(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Yy(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Vy(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}function qy(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,u=t.shortDays,a=t.months,c=t.shortMonths,f=eg(i),s=rg(i),l=eg(o),h=rg(o),d=eg(u),p=rg(u),v=eg(a),y=rg(a),g=eg(c),_=rg(c),b={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:Ag,e:Ag,f:Tg,g:Bg,G:Yg,H:Sg,I:kg,j:Cg,L:Eg,m:Og,M:Ng,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:l_,s:h_,S:jg,u:Rg,U:zg,V:Lg,w:Ig,W:Fg,x:null,X:null,y:Dg,Y:Ug,Z:Vg,"%":s_},m={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:qg,e:qg,f:Wg,g:u_,G:c_,H:Hg,I:$g,j:Xg,L:Gg,m:Zg,M:Kg,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:l_,s:h_,S:Qg,u:Jg,U:t_,V:e_,w:r_,W:i_,x:null,X:null,y:o_,Y:a_,Z:f_,"%":s_},x={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=g.exec(n.slice(e));return r?(t.m=_[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=y[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return A(t,n,e,r)},d:pg,e:pg,f:mg,g:sg,G:fg,H:yg,I:yg,j:vg,L:bg,m:dg,M:gg,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1},q:hg,Q:wg,s:Mg,S:_g,u:og,U:ug,V:ag,w:ig,W:cg,x:function(t,n,r){return A(t,e,n,r)},X:function(t,n,e){return A(t,r,n,e)},y:sg,Y:fg,Z:lg,"%":xg};function w(t,n){return function(e){var r,i,o,u=[],a=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Yy(Vy(o.y,0,1))).getUTCDay(),r=i>4||0===i?wy.ceil(r):wy(r),r=Ly.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Uy(Vy(o.y,0,1))).getDay(),r=i>4||0===i?$v.ceil(r):$v(r),r=uy.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Yy(Vy(o.y,0,1)).getUTCDay():Uy(Vy(o.y,0,1)).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,Yy(o)):Uy(o)}}function A(t,n,e,r){for(var i,o,u=0,a=n.length,c=e.length;u=c)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=x[i in Zy?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return b.x=w(e,b),b.X=w(r,b),b.c=w(n,b),m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),{format:function(t){var n=w(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}}}var Hy,$y,Xy,Gy,Wy,Zy={"-":"",_:" ",0:"0"},Ky=/^\s*\d+/,Qy=/^%/,Jy=/[\\^$*+?|[\]().{}]/g;function tg(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),e+r[0].length):-1}function lg(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 hg(t,n,e){var r=Ky.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function dg(t,n,e){var r=Ky.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function pg(t,n,e){var r=Ky.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function vg(t,n,e){var r=Ky.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function yg(t,n,e){var r=Ky.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function gg(t,n,e){var r=Ky.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function _g(t,n,e){var r=Ky.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function bg(t,n,e){var r=Ky.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function mg(t,n,e){var r=Ky.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function xg(t,n,e){var r=Qy.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function wg(t,n,e){var r=Ky.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function Mg(t,n,e){var r=Ky.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function Ag(t,n){return tg(t.getDate(),n,2)}function Sg(t,n){return tg(t.getHours(),n,2)}function kg(t,n){return tg(t.getHours()%12||12,n,2)}function Cg(t,n){return tg(1+uy.count(Dv(t),t),n,3)}function Eg(t,n){return tg(t.getMilliseconds(),n,3)}function Tg(t,n){return Eg(t,n)+"000"}function Og(t,n){return tg(t.getMonth()+1,n,2)}function Ng(t,n){return tg(t.getMinutes(),n,2)}function jg(t,n){return tg(t.getSeconds(),n,2)}function Rg(t){var n=t.getDay();return 0===n?7:n}function zg(t,n){return tg(Hv.count(Dv(t)-1,t),n,2)}function Pg(t){var n=t.getDay();return n>=4||0===n?Wv(t):Wv.ceil(t)}function Lg(t,n){return t=Pg(t),tg(Wv.count(Dv(t),t)+(4===Dv(t).getDay()),n,2)}function Ig(t){return t.getDay()}function Fg(t,n){return tg($v.count(Dv(t)-1,t),n,2)}function Dg(t,n){return tg(t.getFullYear()%100,n,2)}function Bg(t,n){return tg((t=Pg(t)).getFullYear()%100,n,2)}function Ug(t,n){return tg(t.getFullYear()%1e4,n,4)}function Yg(t,n){var e=t.getDay();return tg((t=e>=4||0===e?Wv(t):Wv.ceil(t)).getFullYear()%1e4,n,4)}function Vg(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+tg(n/60|0,"0",2)+tg(n%60,"0",2)}function qg(t,n){return tg(t.getUTCDate(),n,2)}function Hg(t,n){return tg(t.getUTCHours(),n,2)}function $g(t,n){return tg(t.getUTCHours()%12||12,n,2)}function Xg(t,n){return tg(1+Ly.count(Dy(t),t),n,3)}function Gg(t,n){return tg(t.getUTCMilliseconds(),n,3)}function Wg(t,n){return Gg(t,n)+"000"}function Zg(t,n){return tg(t.getUTCMonth()+1,n,2)}function Kg(t,n){return tg(t.getUTCMinutes(),n,2)}function Qg(t,n){return tg(t.getUTCSeconds(),n,2)}function Jg(t){var n=t.getUTCDay();return 0===n?7:n}function t_(t,n){return tg(xy.count(Dy(t)-1,t),n,2)}function n_(t){var n=t.getUTCDay();return n>=4||0===n?Sy(t):Sy.ceil(t)}function e_(t,n){return t=n_(t),tg(Sy.count(Dy(t),t)+(4===Dy(t).getUTCDay()),n,2)}function r_(t){return t.getUTCDay()}function i_(t,n){return tg(wy.count(Dy(t)-1,t),n,2)}function o_(t,n){return tg(t.getUTCFullYear()%100,n,2)}function u_(t,n){return tg((t=n_(t)).getUTCFullYear()%100,n,2)}function a_(t,n){return tg(t.getUTCFullYear()%1e4,n,4)}function c_(t,n){var e=t.getUTCDay();return tg((t=e>=4||0===e?Sy(t):Sy.ceil(t)).getUTCFullYear()%1e4,n,4)}function f_(){return"+0000"}function s_(){return"%"}function l_(t){return+t}function h_(t){return Math.floor(+t/1e3)}function d_(t){return Hy=qy(t),$y=Hy.format,Xy=Hy.parse,Gy=Hy.utcFormat,Wy=Hy.utcParse,Hy}d_({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function p_(t){return new Date(t)}function v_(t){return t instanceof Date?+t:+new Date(+t)}function y_(t,n,e,r,i,o,u,a,f){var s=cv(nv,nv),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),v=f("%I:%M"),y=f("%I %p"),g=f("%a %d"),_=f("%b %d"),b=f("%B"),m=f("%Y"),x=[[u,1,1e3],[u,5,5e3],[u,15,15e3],[u,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[e,1,6048e5],[n,1,2592e6],[n,3,7776e6],[t,1,31536e6]];function w(a){return(u(a)1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return im.h=360*t-100,im.s=1.5-1.5*n,im.l=.8-.9*n,im+""},um=Qn(),am=Math.PI/3,cm=2*Math.PI/3,fm=function(t){var n;return t=(.5-t)*Math.PI,um.r=255*(n=Math.sin(t))*n,um.g=255*(n=Math.sin(t+am))*n,um.b=255*(n=Math.sin(t+cm))*n,um+""},sm=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function lm(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var hm=lm(Y_("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),dm=lm(Y_("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),pm=lm(Y_("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),vm=lm(Y_("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),ym=function(t){return Cn(an(t).call(document.documentElement))},gm=0;function _m(){return new bm}function bm(){this._="@"+(++gm).toString(36)}bm.prototype=_m.prototype={constructor:bm,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var mm=function(t){return"string"==typeof t?new An([document.querySelectorAll(t)],[document.documentElement]):new An([null==t?[]:t],Mn)},xm=function(t,n){null==n&&(n=Re().touches);for(var e=0,r=n?n.length:0,i=new Array(r);e1?0:t<-1?Om:Math.acos(t)}function zm(t){return t>=1?Nm:t<=-1?-Nm:Math.asin(t)}function Pm(t){return t.innerRadius}function Lm(t){return t.outerRadius}function Im(t){return t.startAngle}function Fm(t){return t.endAngle}function Dm(t){return t&&t.padAngle}function Bm(t,n,e,r,i,o,u,a){var c=e-t,f=r-n,s=u-i,l=a-o,h=l*c-s*f;if(!(h*h<1e-12))return[t+(h=(s*(n-o)-l*(t-i))/h)*c,n+h*f]}function Um(t,n,e,r,i,o,u){var a=t-e,c=n-r,f=(u?o:-o)/Tm(a*a+c*c),s=f*c,l=-f*a,h=t+s,d=n+l,p=e+s,v=r+l,y=(h+p)/2,g=(d+v)/2,_=p-h,b=v-d,m=_*_+b*b,x=i-o,w=h*v-p*d,M=(b<0?-1:1)*Tm(km(0,x*x*m-w*w)),A=(w*b-_*M)/m,S=(-w*_-b*M)/m,k=(w*b+_*M)/m,C=(-w*_+b*M)/m,E=A-y,T=S-g,O=k-y,N=C-g;return E*E+T*T>O*O+N*N&&(A=k,S=C),{cx:A,cy:S,x01:-s,y01:-l,x11:A*(i/x-1),y11:S*(i/x-1)}}var Ym=function(){var t=Pm,n=Lm,e=wm(0),r=null,i=Im,o=Fm,u=Dm,a=null;function c(){var c,f,s=+t.apply(this,arguments),l=+n.apply(this,arguments),h=i.apply(this,arguments)-Nm,d=o.apply(this,arguments)-Nm,p=Mm(d-h),v=d>h;if(a||(a=c=$i()),l1e-12)if(p>jm-1e-12)a.moveTo(l*Sm(h),l*Em(h)),a.arc(0,0,l,h,d,!v),s>1e-12&&(a.moveTo(s*Sm(d),s*Em(d)),a.arc(0,0,s,d,h,v));else{var y,g,_=h,b=d,m=h,x=d,w=p,M=p,A=u.apply(this,arguments)/2,S=A>1e-12&&(r?+r.apply(this,arguments):Tm(s*s+l*l)),k=Cm(Mm(l-s)/2,+e.apply(this,arguments)),C=k,E=k;if(S>1e-12){var T=zm(S/s*Em(A)),O=zm(S/l*Em(A));(w-=2*T)>1e-12?(m+=T*=v?1:-1,x-=T):(w=0,m=x=(h+d)/2),(M-=2*O)>1e-12?(_+=O*=v?1:-1,b-=O):(M=0,_=b=(h+d)/2)}var N=l*Sm(_),j=l*Em(_),R=s*Sm(x),z=s*Em(x);if(k>1e-12){var P,L=l*Sm(b),I=l*Em(b),F=s*Sm(m),D=s*Em(m);if(p1e-12?E>1e-12?(y=Um(F,D,N,j,l,E,v),g=Um(L,I,R,z,l,E,v),a.moveTo(y.cx+y.x01,y.cy+y.y01),E1e-12&&w>1e-12?C>1e-12?(y=Um(R,z,L,I,s,-C,v),g=Um(N,j,F,D,s,-C,v),a.lineTo(y.cx+y.x01,y.cy+y.y01),C=s;--l)a.point(y[l],g[l]);a.lineEnd(),a.areaEnd()}v&&(y[f]=+t(h,f,c),g[f]=+e(h,f,c),a.point(n?+n(h,f,c):y[f],r?+r(h,f,c):g[f]))}if(d)return a=null,d+""||null}function f(){return Xm().defined(i).curve(u).context(o)}return c.x=function(e){return arguments.length?(t="function"==typeof e?e:wm(+e),n=null,c):t},c.x0=function(n){return arguments.length?(t="function"==typeof n?n:wm(+n),c):t},c.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:wm(+t),c):n},c.y=function(t){return arguments.length?(e="function"==typeof t?t:wm(+t),r=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:wm(+t),c):e},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:wm(+t),c):r},c.lineX0=c.lineY0=function(){return f().x(t).y(e)},c.lineY1=function(){return f().x(t).y(r)},c.lineX1=function(){return f().x(n).y(e)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:wm(!!t),c):i},c.curve=function(t){return arguments.length?(u=t,null!=o&&(a=u(o)),c):u},c.context=function(t){return arguments.length?(null==t?o=a=null:a=u(o=t),c):o},c},Wm=function(t,n){return nt?1:n>=t?0:NaN},Zm=function(t){return t},Km=function(){var t=Zm,n=Wm,e=null,r=wm(0),i=wm(jm),o=wm(0);function u(u){var a,c,f,s,l,h=u.length,d=0,p=new Array(h),v=new Array(h),y=+r.apply(this,arguments),g=Math.min(jm,Math.max(-jm,i.apply(this,arguments)-y)),_=Math.min(Math.abs(g)/h,o.apply(this,arguments)),b=_*(g<0?-1:1);for(a=0;a0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(v[t],v[e])})):null!=e&&p.sort((function(t,n){return e(u[t],u[n])})),a=0,f=d?(g-h*b)/d:0;a0?l*f:0)+b,v[c]={data:u[c],index:a,value:l,startAngle:y,endAngle:s,padAngle:_};return v}return u.value=function(n){return arguments.length?(t="function"==typeof n?n:wm(+n),u):t},u.sortValues=function(t){return arguments.length?(n=t,e=null,u):n},u.sort=function(t){return arguments.length?(e=t,n=null,u):e},u.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:wm(+t),u):r},u.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:wm(+t),u):i},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:wm(+t),u):o},u},Qm=tx(qm);function Jm(t){this._curve=t}function tx(t){function n(n){return new Jm(t(n))}return n._curve=t,n}function nx(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(tx(t)):n()._curve},t}Jm.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 ex=function(){return nx(Xm().curve(Qm))},rx=function(){var t=Gm().curve(Qm),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=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 nx(e())},delete t.lineX0,t.lineEndAngle=function(){return nx(r())},delete t.lineX1,t.lineInnerRadius=function(){return nx(i())},delete t.lineY0,t.lineOuterRadius=function(){return nx(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(tx(t)):n()._curve},t},ix=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},ox=Array.prototype.slice;function ux(t){return t.source}function ax(t){return t.target}function cx(t){var n=ux,e=ax,r=Hm,i=$m,o=null;function u(){var u,a=ox.call(arguments),c=n.apply(this,a),f=e.apply(this,a);if(o||(o=u=$i()),t(o,+r.apply(this,(a[0]=c,a)),+i.apply(this,a),+r.apply(this,(a[0]=f,a)),+i.apply(this,a)),u)return o=null,u+""||null}return u.source=function(t){return arguments.length?(n=t,u):n},u.target=function(t){return arguments.length?(e=t,u):e},u.x=function(t){return arguments.length?(r="function"==typeof t?t:wm(+t),u):r},u.y=function(t){return arguments.length?(i="function"==typeof t?t:wm(+t),u):i},u.context=function(t){return arguments.length?(o=null==t?null:t,u):o},u}function fx(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function sx(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function lx(t,n,e,r,i){var o=ix(n,e),u=ix(n,e=(e+i)/2),a=ix(r,e),c=ix(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(u[0],u[1],a[0],a[1],c[0],c[1])}function hx(){return cx(fx)}function dx(){return cx(sx)}function px(){var t=cx(lx);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var vx={draw:function(t,n){var e=Math.sqrt(n/Om);t.moveTo(e,0),t.arc(0,0,e,0,jm)}},yx={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()}},gx=Math.sqrt(1/3),_x=2*gx,bx={draw:function(t,n){var e=Math.sqrt(n/_x),r=e*gx;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},mx=Math.sin(Om/10)/Math.sin(7*Om/10),xx=Math.sin(jm/10)*mx,wx=-Math.cos(jm/10)*mx,Mx={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=xx*e,i=wx*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var u=jm*o/5,a=Math.cos(u),c=Math.sin(u);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},Ax={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},Sx=Math.sqrt(3),kx={draw:function(t,n){var e=-Math.sqrt(n/(3*Sx));t.moveTo(0,2*e),t.lineTo(-Sx*e,-e),t.lineTo(Sx*e,-e),t.closePath()}},Cx=Math.sqrt(3)/2,Ex=1/Math.sqrt(12),Tx=3*(Ex/2+1),Ox={draw:function(t,n){var e=Math.sqrt(n/Tx),r=e/2,i=e*Ex,o=r,u=e*Ex+e,a=-o,c=u;t.moveTo(r,i),t.lineTo(o,u),t.lineTo(a,c),t.lineTo(-.5*r-Cx*i,Cx*r+-.5*i),t.lineTo(-.5*o-Cx*u,Cx*o+-.5*u),t.lineTo(-.5*a-Cx*c,Cx*a+-.5*c),t.lineTo(-.5*r+Cx*i,-.5*i-Cx*r),t.lineTo(-.5*o+Cx*u,-.5*u-Cx*o),t.lineTo(-.5*a+Cx*c,-.5*c-Cx*a),t.closePath()}},Nx=[vx,yx,bx,Ax,Mx,kx,Ox],jx=function(){var t=wm(vx),n=wm(64),e=null;function r(){var r;if(e||(e=r=$i()),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:wm(n),r):t},r.size=function(t){return arguments.length?(n="function"==typeof t?t:wm(+t),r):n},r.context=function(t){return arguments.length?(e=null==t?null:t,r):e},r},Rx=function(){};function zx(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 Px(t){this._context=t}Px.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:zx(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:zx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Lx=function(t){return new Px(t)};function Ix(t){this._context=t}Ix.prototype={areaStart:Rx,areaEnd:Rx,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:zx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Fx=function(t){return new Ix(t)};function Dx(t){this._context=t}Dx.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:zx(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Bx=function(t){return new Dx(t)};function Ux(t,n){this._basis=new Px(t),this._beta=n}Ux.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],o=n[0],u=t[e]-i,a=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*u),this._beta*n[c]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Yx=function t(n){function e(t){return 1===n?new Px(t):new Ux(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Vx(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 qx(t,n){this._context=t,this._k=(1-n)/6}qx.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:Vx(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:Vx(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 Hx=function t(n){function e(t){return new qx(t,n)}return e.tension=function(n){return t(+n)},e}(0);function $x(t,n){this._context=t,this._k=(1-n)/6}$x.prototype={areaStart:Rx,areaEnd:Rx,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:Vx(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 Xx=function t(n){function e(t){return new $x(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Gx(t,n){this._context=t,this._k=(1-n)/6}Gx.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:Vx(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 Wx=function t(n){function e(t){return new Gx(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Zx(t,n,e){var r=t._x1,i=t._y1,o=t._x2,u=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 f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-n*t._l12_2a)/s,u=(u*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,o,u,t._x2,t._y2)}function Kx(t,n){this._context=t,this._alpha=n}Kx.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:Zx(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 Qx=function t(n){function e(t){return n?new Kx(t,n):new qx(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Jx(t,n){this._context=t,this._alpha=n}Jx.prototype={areaStart:Rx,areaEnd:Rx,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:Zx(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 tw=function t(n){function e(t){return n?new Jx(t,n):new $x(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function nw(t,n){this._context=t,this._alpha=n}nw.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:Zx(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 ew=function t(n){function e(t){return n?new nw(t,n):new Gx(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function rw(t){this._context=t}rw.prototype={areaStart:Rx,areaEnd:Rx,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 iw=function(t){return new rw(t)};function ow(t){return t<0?-1:1}function uw(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),u=(e-t._y1)/(i||r<0&&-0),a=(o*i+u*r)/(r+i);return(ow(o)+ow(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function aw(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function cw(t,n,e){var r=t._x0,i=t._y0,o=t._x1,u=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*n,o-a,u-a*e,o,u)}function fw(t){this._context=t}function sw(t){this._context=new lw(t)}function lw(t){this._context=t}function hw(t){return new fw(t)}function dw(t){return new sw(t)}function pw(t){this._context=t}function vw(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),u=new Array(r);for(i[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(u[n]-i[n+1])/o[n];for(o[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 _w=function(t){return new gw(t,.5)};function bw(t){return new gw(t,0)}function mw(t){return new gw(t,1)}var xw=function(t,n){if((i=t.length)>1)for(var e,r,i,o=1,u=t[n[0]],a=u.length;o=0;)e[n]=n;return e};function Mw(t,n){return t[n]}var Aw=function(){var t=wm([]),n=ww,e=xw,r=Mw;function i(i){var o,u,a=t.apply(this,arguments),c=i.length,f=a.length,s=new Array(f);for(o=0;o0){for(var e,r,i,o=0,u=t[0].length;o0)for(var e,r,i,o,u,a,c=0,f=t[n[0]].length;c0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=u,r[0]=u+=i):(r[0]=0,r[1]=i)},Cw=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,u=1;uo&&(o=n,r=e);return r}var Nw=function(t){var n=t.map(jw);return ww(t).sort((function(t,e){return n[t]-n[e]}))};function jw(t){for(var n,e=0,r=-1,i=t.length;++r0)){if(o/=h,h<0){if(o0){if(o>l)return;o>s&&(s=o)}if(o=r-c,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>s&&(s=o)}else if(h>0){if(o0)){if(o/=d,d<0){if(o0){if(o>l)return;o>s&&(s=o)}if(o=i-f,d||!(o<0)){if(o/=d,d<0){if(o>l)return;o>s&&(s=o)}else if(d>0){if(o0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function Qw(t,n,e,r,i){var o=t[1];if(o)return!0;var u,a,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,y=(h+p)/2;if(p===h){if(v=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,e];o=[v,i]}else{if(c){if(c[1]1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-a)/u,e];o=[(i-a)/u,i]}else{if(c){if(c[1]=r)return}else c=[n,u*n+a];o=[r,u*r+a]}else{if(c){if(c[0]=-mM)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,y=(c*p-s*d)/h,g=rM.pop()||new iM;g.arc=t,g.site=i,g.x=v+u,g.y=(g.cy=y+a)+Math.sqrt(v*v+y*y),t.circle=g;for(var _=null,b=gM._;b;)if(g.ybM)a=a.L;else{if(!((i=o-pM(a,u))>bM)){r>-bM?(n=a.P,e=a):i>-bM?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){yM[t.index]={site:t,halfedges:[]}}(t);var c=fM(t);if(vM.insert(n,c),n||e){if(n===e)return uM(n),e=fM(n.site),vM.insert(c,e),c.edge=e.edge=Gw(n.site,c.site),oM(n),void oM(e);if(e){uM(n),uM(e);var f=n.site,s=f[0],l=f[1],h=t[0]-s,d=t[1]-l,p=e.site,v=p[0]-s,y=p[1]-l,g=2*(h*y-d*v),_=h*h+d*d,b=v*v+y*y,m=[(y*_-d*b)/g+s,(h*b-v*_)/g+l];Zw(e.edge,f,p,m),c.edge=Gw(f,t,null,m),e.edge=Gw(t,p,null,m),oM(n),oM(e)}else c.edge=Gw(n.site,c.site)}}function dM(t,n){var e=t.site,r=e[0],i=e[1],o=i-n;if(!o)return r;var u=t.P;if(!u)return-1/0;var a=(e=u.site)[0],c=e[1],f=c-n;if(!f)return a;var s=a-r,l=1/o-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-o/2)))/l+r:(r+a)/2}function pM(t,n){var e=t.N;if(e)return dM(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var vM,yM,gM,_M,bM=1e-6,mM=1e-12;function xM(t,n){return n[1]-t[1]||n[0]-t[0]}function wM(t,n){var e,r,i,o=t.sort(xM).pop();for(_M=[],yM=new Array(t.length),vM=new Xw,gM=new Xw;;)if(i=eM,o&&(!i||o[1]bM||Math.abs(i[0][1]-i[1][1])>bM)||delete _M[o]}(u,a,c,f),function(t,n,e,r){var i,o,u,a,c,f,s,l,h,d,p,v,y=yM.length,g=!0;for(i=0;ibM||Math.abs(v-h)>bM)&&(c.splice(a,0,_M.push(Ww(u,d,Math.abs(p-t)bM?[t,Math.abs(l-t)bM?[Math.abs(h-r)bM?[e,Math.abs(l-e)bM?[Math.abs(h-n)=a)return null;var c=t-i.site[0],f=n-i.site[1],s=c*c+f*f;do{i=o.cells[r=u],u=null,i.halfedges.forEach((function(e){var r=o.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=t-a[0],f=n-a[1],l=c*c+f*f;lr?(r+i)/2:Math.min(0,r)||Math.max(0,i),u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u))}var IM,FM=function(){var t,n,e=NM,r=jM,i=LM,o=zM,u=PM,a=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,s=yp,l=pt("start","zoom","end"),h=0;function d(t){t.property("__zoom",RM).on("wheel.zoom",m).on("mousedown.zoom",x).on("dblclick.zoom",w).filter(u).on("touchstart.zoom",M).on("touchmove.zoom",A).on("touchend.zoom touchcancel.zoom",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(t,n){return(n=Math.max(a[0],Math.min(a[1],n)))===t.k?t:new kM(n,t.x,t.y)}function v(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new kM(t.k,r,i)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function g(t,n,e){t.on("start.zoom",(function(){_(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){_(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,o=_(t,i),u=r.apply(t,i),a=null==e?y(u):"function"==typeof e?e.apply(t,i):e,c=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),f=t.__zoom,l="function"==typeof n?n.apply(t,i):n,h=s(f.invert(a).concat(c/f.k),l.invert(a).concat(c/l.k));return function(t){if(1===t)t=l;else{var n=h(t),e=c/n[2];t=new kM(e,a[0]-n[0]*e,a[1]-n[1]*e)}o.zoom(null,t)}}))}function _(t,n,e){return!e&&t.__zooming||new b(t,n)}function b(t,n){this.that=t,this.args=n,this.active=0,this.extent=r.apply(t,n),this.taps=0}function m(){if(e.apply(this,arguments)){var t=_(this,arguments),n=this.__zoom,r=Math.max(a[0],Math.min(a[1],n.k*Math.pow(2,o.apply(this,arguments)))),u=Le(this);if(t.wheel)t.mouse[0][0]===u[0]&&t.mouse[0][1]===u[1]||(t.mouse[1]=n.invert(t.mouse[0]=u)),clearTimeout(t.wheel);else{if(n.k===r)return;t.mouse=[u,n.invert(u)],sr(this),t.start()}OM(),t.wheel=setTimeout(f,150),t.zoom("mouse",i(v(p(n,r),t.mouse[0],t.mouse[1]),t.extent,c))}function f(){t.wheel=null,t.end()}}function x(){if(!n&&e.apply(this,arguments)){var t=_(this,arguments,!0),r=Cn(dn.view).on("mousemove.zoom",f,!0).on("mouseup.zoom",s,!0),o=Le(this),u=dn.clientX,a=dn.clientY;On(dn.view),TM(),t.mouse=[o,this.__zoom.invert(o)],sr(this),t.start()}function f(){if(OM(),!t.moved){var n=dn.clientX-u,e=dn.clientY-a;t.moved=n*n+e*e>h}t.zoom("mouse",i(v(t.that.__zoom,t.mouse[0]=Le(t.that),t.mouse[1]),t.extent,c))}function s(){r.on("mousemove.zoom mouseup.zoom",null),Nn(dn.view,t.moved),OM(),t.end()}}function w(){if(e.apply(this,arguments)){var t=this.__zoom,n=Le(this),o=t.invert(n),u=t.k*(dn.shiftKey?.5:2),a=i(v(p(t,u),n,o),r.apply(this,arguments),c);OM(),f>0?Cn(this).transition().duration(f).call(g,a,n):Cn(this).call(d.transform,a)}}function M(){if(e.apply(this,arguments)){var n,r,i,o,u=dn.touches,a=u.length,c=_(this,arguments,dn.changedTouches.length===a);for(TM(),r=0;ri&&this.series[r].datapoints.shift()}for(r=0;rt[0][0]?"green":t[1][0]=t.length?t.length-1:(u>0&&Math.abs(i-t[u-1][r])c/2},n.prototype.onMouseOver=function(){this.crosshair.style("display",null),this.crosshair.selectAll(".crosshair-circle").style("display",null)},n.prototype.onMouseOut=function(){void 0!==this.options.eventsCallbacks&&void 0!==this.options.eventsCallbacks.mouseOut&&this.options.eventsCallbacks.mouseOut(),this.crosshair.style("display","none")},n.prototype.zoomOut=function(){if(!0!==this.isOutOfChart()){var t=this.options.zoomEvents.mouse.zoom.orientation,n=this.state.xValueRange[1]-this.state.xValueRange[0],e=this.state.yValueRange[1]-this.state.yValueRange[0];switch(t){case o.BrushOrientation.HORIZONTAL:this.state.xValueRange=[this.state.xValueRange[0]-n/2,this.state.xValueRange[1]+n/2];break;case o.BrushOrientation.VERTICAL:this.state.yValueRange=[this.state.yValueRange[0]-e/2,this.state.yValueRange[1]+e/2];break;case o.BrushOrientation.RECTANGLE:case o.BrushOrientation.SQUARE:this.state.xValueRange=[this.state.xValueRange[0]-n/2,this.state.xValueRange[1]+n/2],this.state.yValueRange=[this.state.yValueRange[0]-e/2,this.state.yValueRange[1]+e/2];break;default:throw new Error("Unknown type of orientation: "+t+", path: options.zoomEvents.mouse.zoom.orientation")}if(this.renderMetrics(),this.renderXAxis(),this.renderYAxis(),this.renderGrid(),this.onMouseOver(),void 0!==this.options.eventsCallbacks&&void 0!==this.options.eventsCallbacks.zoomOut){var r={x:this.xScale.invert(this.width/2),y:this.yScale.invert(this.height/2)};this.options.eventsCallbacks.zoomOut(r)}}},n}(o.ChartwerkPod),YM={render:function(t){return t("div",{class:{"chartwerk-line-pod":!0},attrs:{id:this.id}})},mixins:[o.VueChartwerkPodMixin],methods:{render:function(){void 0===this.pod?(this.pod=new UM(document.getElementById(this.id),this.series,this.options),this.pod.render()):this.pod.updateData(this.series,this.options)},renderSharedCrosshair:function(t){this.pod.renderSharedCrosshair(t)},hideSharedCrosshair:function(){this.pod.hideSharedCrosshair()}}}}])})); \ No newline at end of file diff --git a/dist/types.d.ts b/dist/types.d.ts index 19fe47b..d3f1b60 100644 --- a/dist/types.d.ts +++ b/dist/types.d.ts @@ -6,6 +6,8 @@ declare type LineTimeSerieParams = { renderDots: boolean; renderLines: boolean; useOutOfRange: boolean; + dashArray: string; + class: string; }; export declare enum Mode { STANDARD = "Standard", diff --git a/examples/demo.html b/examples/demo.html index abc8086..33c8716 100755 --- a/examples/demo.html +++ b/examples/demo.html @@ -28,9 +28,9 @@ var pod = new LinePod( document.getElementById('chart'), [ - { target: 'test1', datapoints: data1, color: 'green' }, + { target: 'test1', datapoints: data1, color: 'green', dashArray: '5,3', class: 'first' }, { target: 'test2', datapoints: data2, color: 'blue' }, - { target: 'test3', datapoints: data3, color: 'orange' }, + { target: 'test3', datapoints: data3, color: 'orange' }, ], options ); diff --git a/package-lock.json b/package-lock.json index 0d80300..32924f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,13 @@ { "name": "@chartwerk/line-pod", - "version": "0.4.6", + "version": "0.4.8", "lockfileVersion": 1, "requires": true, "dependencies": { "@chartwerk/core": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@chartwerk/core/-/core-0.3.3.tgz", - "integrity": "sha512-aauWwYLPeMuLF727twW74GW6Uw2yqPXD8vYuFle/4nN4xjKbjWJvU7/9wlF4xh/azrpOrYWdD4l4SD25u8DzUg==" + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@chartwerk/core/-/core-0.3.4.tgz", + "integrity": "sha512-dDk+xjcR0XVzTrsQnXlQh6syg41gdn2yh6+q+HPMHwG28+OpFoyRufIPhxzobWp8orINn0PtlfnzgYkfnuSIPg==" }, "@types/d3": { "version": "5.16.4", diff --git a/package.json b/package.json index 6e54b12..0d6bde0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chartwerk/line-pod", - "version": "0.4.7", + "version": "0.4.8", "description": "Chartwerk line chart", "main": "dist/index.js", "scripts": { @@ -15,7 +15,7 @@ "author": "CorpGlory", "license": "ISC", "dependencies": { - "@chartwerk/core": "^0.3.3" + "@chartwerk/core": "^0.3.4" }, "devDependencies": { "@types/d3": "5.16.4", diff --git a/src/index.ts b/src/index.ts index 8417b31..21ba9b0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -56,7 +56,7 @@ export class LinePod extends ChartwerkPod { clearAllMetrics(): void { // TODO: temporary hack before it will be implemented in core. - this.d3.selectAll('.metric-el').remove(); + this.chartContainer.selectAll('.metric-el').remove(); } initLineGenerator(): void { @@ -101,11 +101,13 @@ export class LinePod extends ChartwerkPod { } _renderDots(datapoints: number[][], serieIdx: number): void { + const customClass = this.series[serieIdx].class || ''; + this.metricContainer.selectAll(null) .data(datapoints) .enter() .append('circle') - .attr('class', `metric-circle-${serieIdx} metric-el`) + .attr('class', `metric-circle-${serieIdx} metric-el ${customClass}`) .attr('fill', this.getSerieColor(serieIdx)) .attr('r', METRIC_CIRCLE_RADIUS) .style('pointer-events', 'none') @@ -114,15 +116,19 @@ export class LinePod extends ChartwerkPod { } _renderLines(datapoints: number[][], serieIdx: number): void { + const dashArray = this.series[serieIdx].dashArray !== undefined ? this.series[serieIdx].dashArray : '0'; + const customClass = this.series[serieIdx].class || '' + this.metricContainer .append('path') .datum(datapoints) - .attr('class', `metric-path-${serieIdx} metric-el`) + .attr('class', `metric-path-${serieIdx} metric-el ${customClass}`) .attr('fill', 'none') .attr('stroke', this.getSerieColor(serieIdx)) .attr('stroke-width', 1) .attr('stroke-opacity', 0.7) .attr('pointer-events', 'none') + .style('stroke-dasharray', dashArray) .attr('d', this.lineGenerator); } @@ -490,14 +496,14 @@ export class LinePod extends ChartwerkPod { } } -// it is used with Vue.component, e.g.: Vue.component('chartwerk-line-pod', VueChartwerkLineChartObject) -export const VueChartwerkLineChartObject = { +// it is used with Vue.component, e.g.: Vue.component('chartwerk-line-pod', VueChartwerkLinePod) +export const VueChartwerkLinePod = { // alternative to `template: '
'` render(createElement) { return createElement( 'div', { - class: { 'chartwerk-line-chart': true }, + class: { 'chartwerk-line-pod': true }, attrs: { id: this.id } } ); diff --git a/src/types.ts b/src/types.ts index f627637..1b40ae5 100644 --- a/src/types.ts +++ b/src/types.ts @@ -7,6 +7,8 @@ type LineTimeSerieParams = { renderDots: boolean, renderLines: boolean, // TODO: refactor same as scatter-pod useOutOfRange: boolean, // It's temporary hack. Need to refactor getValueInterval() method + dashArray: string; // dasharray attr, only for lines + class: string; // option to add custom class to each serie element } export enum Mode { STANDARD = 'Standard',