app/assets/javascripts/index.pack.js in attractor-0.5.0 vs app/assets/javascripts/index.pack.js in attractor-0.5.1

- old
+ new

@@ -25,6 +25,6 @@ * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r,i,a,o,l;if(Object.defineProperty(e,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,s=null,c=function(){if(null!==u)try{var t=e.unstable_now();u(!0,t),u=null}catch(t){throw setTimeout(c,0),t}},f=Date.now();e.unstable_now=function(){return Date.now()-f},r=function(t){null!==u?setTimeout(r,0,t):(u=t,setTimeout(c,0))},i=function(t,e){s=setTimeout(t,e)},a=function(){clearTimeout(s)},o=function(){return!1},l=e.unstable_forceFrameRate=function(){}}else{var h=window.performance,p=window.Date,d=window.setTimeout,m=window.clearTimeout,y=window.requestAnimationFrame,v=window.cancelAnimationFrame;if("undefined"!=typeof console&&("function"!=typeof y&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),"object"==typeof h&&"function"==typeof h.now)e.unstable_now=function(){return h.now()};else{var g=p.now();e.unstable_now=function(){return p.now()-g}}var _=!1,b=null,w=-1,x=5,k=0;o=function(){return e.unstable_now()>=k},l=function(){},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):x=0<t?Math.floor(1e3/t):33.33};var E=new MessageChannel,T=E.port2;E.port1.onmessage=function(){if(null!==b){var t=e.unstable_now();k=t+x;try{b(!0,t)?T.postMessage(null):(_=!1,b=null)}catch(t){throw T.postMessage(null),t}}else _=!1},r=function(t){b=t,_||(_=!0,T.postMessage(null))},i=function(t,n){w=d((function(){t(e.unstable_now())}),n)},a=function(){m(w),w=-1}}function S(t,e){var n=t.length;t.push(e);t:for(;;){var r=Math.floor((n-1)/2),i=t[r];if(!(void 0!==i&&0<N(i,e)))break t;t[r]=e,t[n]=i,n=r}}function C(t){return void 0===(t=t[0])?null:t}function M(t){var e=t[0];if(void 0!==e){var n=t.pop();if(n!==e){t[0]=n;t:for(var r=0,i=t.length;r<i;){var a=2*(r+1)-1,o=t[a],l=a+1,u=t[l];if(void 0!==o&&0>N(o,n))void 0!==u&&0>N(u,o)?(t[r]=u,t[l]=n,r=l):(t[r]=o,t[a]=n,r=a);else{if(!(void 0!==u&&0>N(u,n)))break t;t[r]=u,t[l]=n,r=l}}}return e}return null}function N(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}var P=[],O=[],A=1,L=null,z=3,U=!1,R=!1,F=!1;function I(t){for(var e=C(O);null!==e;){if(null===e.callback)M(O);else{if(!(e.startTime<=t))break;M(O),e.sortIndex=e.expirationTime,S(P,e)}e=C(O)}}function D(t){if(F=!1,I(t),!R)if(null!==C(P))R=!0,r(j);else{var e=C(O);null!==e&&i(D,e.startTime-t)}}function j(t,n){R=!1,F&&(F=!1,a()),U=!0;var r=z;try{for(I(n),L=C(P);null!==L&&(!(L.expirationTime>n)||t&&!o());){var l=L.callback;if(null!==l){L.callback=null,z=L.priorityLevel;var u=l(L.expirationTime<=n);n=e.unstable_now(),"function"==typeof u?L.callback=u:L===C(P)&&M(P),I(n)}else M(P);L=C(P)}if(null!==L)var s=!0;else{var c=C(O);null!==c&&i(D,c.startTime-n),s=!1}return s}finally{L=null,z=r,U=!1}}function H(t){switch(t){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var W=l;e.unstable_ImmediatePriority=1,e.unstable_UserBlockingPriority=2,e.unstable_NormalPriority=3,e.unstable_IdlePriority=5,e.unstable_LowPriority=4,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=z;z=t;try{return e()}finally{z=n}},e.unstable_next=function(t){switch(z){case 1:case 2:case 3:var e=3;break;default:e=z}var n=z;z=e;try{return t()}finally{z=n}},e.unstable_scheduleCallback=function(t,n,o){var l=e.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0<u?l+u:l,o="number"==typeof o.timeout?o.timeout:H(t)}else o=H(t),u=l;return t={id:A++,callback:n,priorityLevel:t,startTime:u,expirationTime:o=u+o,sortIndex:-1},u>l?(t.sortIndex=u,S(O,t),null===C(P)&&t===C(O)&&(F?a():F=!0,i(D,u-l))):(t.sortIndex=o,S(P,t),R||U||(R=!0,r(j))),t},e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_wrapCallback=function(t){var e=z;return function(){var n=z;z=e;try{return t.apply(this,arguments)}finally{z=n}}},e.unstable_getCurrentPriorityLevel=function(){return z},e.unstable_shouldYield=function(){var t=e.unstable_now();I(t);var n=C(P);return n!==L&&null!==L&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime<L.expirationTime||o()},e.unstable_requestPaint=W,e.unstable_continueExecution=function(){R||U||(R=!0,r(j))},e.unstable_pauseExecution=function(){},e.unstable_getFirstCallbackNode=function(){return C(P)},e.unstable_Profiling=null},function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),o=new C(r||[]);return a._invoke=function(t,e,n){var r=c;return function(i,a){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw a;return N()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var l=E(o,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===c)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=s(t,e,n);if("normal"===u.type){if(r=n.done?p:f,u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(t,n,o),a}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var c="suspendedStart",f="suspendedYield",h="executing",p="completed",d={};function m(){}function y(){}function v(){}var g={};g[a]=function(){return this};var _=Object.getPrototypeOf,b=_&&_(_(M([])));b&&b!==n&&r.call(b,a)&&(g=b);var w=v.prototype=m.prototype=Object.create(g);function x(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function k(t){var e;this._invoke=function(n,i){function a(){return new Promise((function(e,a){!function e(n,i,a,o){var l=s(t[n],t,i);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?Promise.resolve(c.__await).then((function(t){e("next",t,a,o)}),(function(t){e("throw",t,a,o)})):Promise.resolve(c).then((function(t){u.value=t,a(u)}),(function(t){return e("throw",t,a,o)}))}o(l.arg)}(n,i,e,a)}))}return e=e?e.then(a,a):a()}}function E(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=s(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:N}}function N(){return{value:e,done:!0}}return y.prototype=w.constructor=v,v.constructor=y,v[l]=y.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l in t||(t[l]="GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},x(k.prototype),k.prototype[o]=function(){return this},t.AsyncIterator=k,t.async=function(e,n,r,i){var a=new k(u(e,n,r,i));return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(w),w[l]="Generator",w[a]=function(){return this},w.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=M,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return l.type="throw",l.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,l=t[Symbol.iterator]();!(r=(o=l.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw a}}return n}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(21),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(7))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,a,o,l,u=1,s={},c=!1,f=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){d(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((a=new MessageChannel).port1.onmessage=function(t){d(t.data)},r=function(t){a.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(t){var e=f.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(d,0,t)}:(o="setImmediate$"+Math.random()+"$",l=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(o)&&d(+e.data.slice(o.length))},t.addEventListener?t.addEventListener("message",l,!1):t.attachEvent("onmessage",l),r=function(e){t.postMessage(o+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return s[u]=i,r(u),u++},h.clearImmediate=p}function p(t){delete s[t]}function d(t){if(c)setTimeout(d,0,t);else{var e=s[t];if(e){c=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}(e)}finally{p(t),c=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(7),n(22))},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var u,s=[],c=!1,f=-1;function h(){c&&u&&(c=!1,u.length?s=u.concat(s):f=-1,s.length&&p())}function p(){if(!c){var t=l(h);c=!0;for(var e=s.length;e;){for(u=s,s=[];++f<e;)u&&u[f].run();f=-1,e=s.length}u=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new d(t,e)),1!==s.length||c||l(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(24);function i(){}function a(){}a.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,a,o){if(o!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),a=n(8),o=n.n(a),l=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},u=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return l(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}};var s=u(l),c=s.right,f=(s.left,c);var h=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},p=Array.prototype,d=(p.slice,p.map,Math.sqrt(50)),m=Math.sqrt(10),y=Math.sqrt(2),v=function(t,e,n){var r,i,a,o,l=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=g(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++l<i;)a[l]=(t+l)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++l<i;)a[l]=(t-l)/o;return r&&a.reverse(),a};function g(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=d?10:a>=m?5:a>=y?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=d?10:a>=m?5:a>=y?2:1)}function _(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=d?i*=10:a>=m?i*=5:a>=y&&(i*=2),e<t?-i:i}var b=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r},w=function(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n};var x=Array.prototype.slice,k=function(t){return t},E=1,T=2,S=3,C=4,M=1e-6;function N(t){return"translate("+(t+.5)+",0)"}function P(t){return"translate(0,"+(t+.5)+")"}function O(t){return function(e){return+t(e)}}function A(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function L(){return!this.__axis}function z(t,e){var n=[],r=null,i=null,a=6,o=6,l=3,u=t===E||t===C?-1:1,s=t===C||t===T?"x":"y",c=t===E||t===S?N:P;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):k:i,d=Math.max(a,0)+l,m=e.range(),y=+m[0]+.5,v=+m[m.length-1]+.5,g=(e.bandwidth?A:O)(e.copy()),_=f.selection?f.selection():f,b=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(h,e).order(),x=w.exit(),N=w.enter().append("g").attr("class","tick"),P=w.select("line"),z=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(N),P=P.merge(N.append("line").attr("stroke","currentColor").attr(s+"2",u*a)),z=z.merge(N.append("text").attr("fill","currentColor").attr(s,u*d).attr("dy",t===E?"0em":t===S?"0.71em":"0.32em")),f!==_&&(b=b.transition(f),w=w.transition(f),P=P.transition(f),z=z.transition(f),x=x.transition(f).attr("opacity",M).attr("transform",(function(t){return isFinite(t=g(t))?c(t):this.getAttribute("transform")})),N.attr("opacity",M).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:g(t))}))),x.remove(),b.attr("d",t===C||t==T?o?"M"+u*o+","+y+"H0.5V"+v+"H"+u*o:"M0.5,"+y+"V"+v:o?"M"+y+","+u*o+"V0.5H"+v+"V"+u*o:"M"+y+",0.5H"+v),w.attr("opacity",1).attr("transform",(function(t){return c(g(t))})),P.attr(s+"2",u*a),z.attr(s,u*d).text(p),_.filter(L).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===T?"start":t===C?"end":"middle"),_.each((function(){this.__axis=g}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=x.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:x.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:x.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(l=+t,f):l},f}function U(t){return z(S,t)}function R(t){return z(C,t)}var F={value:function(){}};function I(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new D(r)}function D(t){this._=t}function j(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function H(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function W(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=F,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}D.prototype=I.prototype={constructor:D,on:function(t,e){var n,r=this._,i=j(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=W(r[n],t.name,e);else if(null==e)for(n in r)r[n]=W(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=H(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new D(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var B=I,V="http://www.w3.org/1999/xhtml",Y={svg:"http://www.w3.org/2000/svg",xhtml:V,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},q=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Y.hasOwnProperty(e)?{space:Y[e],local:t}:t};function $(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===V&&e.documentElement.namespaceURI===V?e.createElement(t):e.createElementNS(n,t)}}function Q(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var X=function(t){var e=q(t);return(e.local?Q:$)(e)};function K(){}var Z=function(t){return null==t?K:function(){return this.querySelector(t)}};function G(){return[]}var J=function(t){return null==t?G:function(){return this.querySelectorAll(t)}},tt=function(t){return function(){return this.matches(t)}},et=function(t){return new Array(t.length)};function nt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}nt.prototype={constructor:nt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var rt="$";function it(t,e,n,r,i,a){for(var o,l=0,u=e.length,s=a.length;l<s;++l)(o=e[l])?(o.__data__=a[l],r[l]=o):n[l]=new nt(t,a[l]);for(;l<u;++l)(o=e[l])&&(i[l]=o)}function at(t,e,n,r,i,a,o){var l,u,s,c={},f=e.length,h=a.length,p=new Array(f);for(l=0;l<f;++l)(u=e[l])&&(p[l]=s=rt+o.call(u,u.__data__,l,e),s in c?i[l]=u:c[s]=u);for(l=0;l<h;++l)(u=c[s=rt+o.call(t,a[l],l,a)])?(r[l]=u,u.__data__=a[l],c[s]=null):n[l]=new nt(t,a[l]);for(l=0;l<f;++l)(u=e[l])&&c[p[l]]===u&&(i[l]=u)}function ot(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function lt(t){return function(){this.removeAttribute(t)}}function ut(t){return function(){this.removeAttributeNS(t.space,t.local)}}function st(t,e){return function(){this.setAttribute(t,e)}}function ct(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ft(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ht(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var pt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function dt(t){return function(){this.style.removeProperty(t)}}function mt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function yt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function vt(t,e){return t.style.getPropertyValue(e)||pt(t).getComputedStyle(t,null).getPropertyValue(e)}function gt(t){return function(){delete this[t]}}function _t(t,e){return function(){this[t]=e}}function bt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function wt(t){return t.trim().split(/^|\s+/)}function xt(t){return t.classList||new kt(t)}function kt(t){this._node=t,this._names=wt(t.getAttribute("class")||"")}function Et(t,e){for(var n=xt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Tt(t,e){for(var n=xt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function St(t){return function(){Et(this,t)}}function Ct(t){return function(){Tt(this,t)}}function Mt(t,e){return function(){(e.apply(this,arguments)?Et:Tt)(this,t)}}kt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Nt(){this.textContent=""}function Pt(t){return function(){this.textContent=t}}function Ot(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function At(){this.innerHTML=""}function Lt(t){return function(){this.innerHTML=t}}function zt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Ut(){this.nextSibling&&this.parentNode.appendChild(this)}function Rt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ft(){return null}function It(){var t=this.parentNode;t&&t.removeChild(this)}function Dt(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function jt(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var Ht={},Wt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Ht={mouseenter:"mouseover",mouseleave:"mouseout"}));function Bt(t,e,n){return t=Vt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Vt(t,e,n){return function(r){var i=Wt;Wt=r;try{t.call(this,this.__data__,e,n)}finally{Wt=i}}}function Yt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function qt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function $t(t,e,n){var r=Ht.hasOwnProperty(t.type)?Bt:Vt;return function(i,a,o){var l,u=this.__on,s=r(e,a,o);if(u)for(var c=0,f=u.length;c<f;++c)if((l=u[c]).type===t.type&&l.name===t.name)return this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=s,l.capture=n),void(l.value=e);this.addEventListener(t.type,s,n),l={type:t.type,name:t.name,value:e,listener:s,capture:n},u?u.push(l):this.__on=[l]}}function Qt(t,e,n){var r=pt(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Xt(t,e){return function(){return Qt(this,t,e)}}function Kt(t,e){return function(){return Qt(this,t,e.apply(this,arguments))}}var Zt=[null];function Gt(t,e){this._groups=t,this._parents=e}function Jt(){return new Gt([[document.documentElement]],Zt)}Gt.prototype=Jt.prototype={constructor:Gt,select:function(t){"function"!=typeof t&&(t=Z(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,l=e[i],u=l.length,s=r[i]=new Array(u),c=0;c<u;++c)(a=l[c])&&(o=t.call(a,a.__data__,c,l))&&("__data__"in a&&(o.__data__=a.__data__),s[c]=o);return new Gt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=J(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,l=e[a],u=l.length,s=0;s<u;++s)(o=l[s])&&(r.push(t.call(o,o.__data__,s,l)),i.push(o));return new Gt(r,i)},filter:function(t){"function"!=typeof t&&(t=tt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],l=o.length,u=r[i]=[],s=0;s<l;++s)(a=o[s])&&t.call(a,a.__data__,s,o)&&u.push(a);return new Gt(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var n,r=e?at:it,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,l=new Array(o),u=new Array(o),s=new Array(o),c=0;c<o;++c){var f=i[c],h=a[c],p=h.length,d=t.call(f,f&&f.__data__,c,i),m=d.length,y=u[c]=new Array(m),v=l[c]=new Array(m);r(f,h,y,v,s[c]=new Array(p),d,e);for(var g,_,b=0,w=0;b<m;++b)if(g=y[b]){for(b>=w&&(w=b+1);!(_=v[w])&&++w<m;);g._next=_||null}}return(l=new Gt(l,i))._enter=u,l._exit=s,l},enter:function(){return new Gt(this._enter||this._groups.map(et),this._parents)},exit:function(){return new Gt(this._exit||this._groups.map(et),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var u,s=e[l],c=n[l],f=s.length,h=o[l]=new Array(f),p=0;p<f;++p)(u=s[p]||c[p])&&(h[p]=u);for(;l<r;++l)o[l]=e[l];return new Gt(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ot);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,l=n[a],u=l.length,s=i[a]=new Array(u),c=0;c<u;++c)(o=l[c])&&(s[c]=o);s.sort(e)}return new Gt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,l=a.length;o<l;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=q(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?ut:lt:"function"==typeof e?n.local?ht:ft:n.local?ct:st)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?dt:"function"==typeof e?yt:mt)(t,e,null==n?"":n)):vt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?gt:"function"==typeof e?bt:_t)(t,e)):this.node()[t]},classed:function(t,e){var n=wt(t+"");if(arguments.length<2){for(var r=xt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Mt:e?St:Ct)(n,e))},text:function(t){return arguments.length?this.each(null==t?Nt:("function"==typeof t?Ot:Pt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?At:("function"==typeof t?zt:Lt)(t)):this.node().innerHTML},raise:function(){return this.each(Ut)},lower:function(){return this.each(Rt)},append:function(t){var e="function"==typeof t?t:X(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:X(t),r=null==e?Ft:"function"==typeof e?e:Z(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(It)},clone:function(t){return this.select(t?jt:Dt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Yt(t+""),o=a.length;if(!(arguments.length<2)){for(l=e?$t:qt,null==n&&(n=!1),r=0;r<o;++r)this.each(l(a[r],e,n));return this}var l=this.node().__on;if(l)for(var u,s=0,c=l.length;s<c;++s)for(r=0,u=l[s];r<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?Kt:Xt)(t,e))}};var te=Jt,ee=function(t){return"string"==typeof t?new Gt([[document.querySelector(t)]],[document.documentElement]):new Gt([[t]],Zt)},ne=0;function re(){this._="@"+(++ne).toString(36)}re.prototype=function(){return new re}.prototype={constructor:re,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function ie(t,e,n,r,i,a,o,l,u,s){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=l,this.dy=u,this._=s}ie.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var ae=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function oe(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function le(){}var ue="\\s*([+-]?\\d+)\\s*",se="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ce="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fe=/^#([0-9a-f]{3,8})$/,he=new RegExp("^rgb\\("+[ue,ue,ue]+"\\)$"),pe=new RegExp("^rgb\\("+[ce,ce,ce]+"\\)$"),de=new RegExp("^rgba\\("+[ue,ue,ue,se]+"\\)$"),me=new RegExp("^rgba\\("+[ce,ce,ce,se]+"\\)$"),ye=new RegExp("^hsl\\("+[se,ce,ce]+"\\)$"),ve=new RegExp("^hsla\\("+[se,ce,ce,se]+"\\)$"),ge={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function _e(){return this.rgb().formatHex()}function be(){return this.rgb().formatRgb()}function we(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=fe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?xe(e):3===n?new Se(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Se(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Se(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=he.exec(t))?new Se(e[1],e[2],e[3],1):(e=pe.exec(t))?new Se(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=de.exec(t))?ke(e[1],e[2],e[3],e[4]):(e=me.exec(t))?ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ye.exec(t))?Pe(e[1],e[2]/100,e[3]/100,1):(e=ve.exec(t))?Pe(e[1],e[2]/100,e[3]/100,e[4]):ge.hasOwnProperty(t)?xe(ge[t]):"transparent"===t?new Se(NaN,NaN,NaN,0):null}function xe(t){return new Se(t>>16&255,t>>8&255,255&t,1)}function ke(t,e,n,r){return r<=0&&(t=e=n=NaN),new Se(t,e,n,r)}function Ee(t){return t instanceof le||(t=we(t)),t?new Se((t=t.rgb()).r,t.g,t.b,t.opacity):new Se}function Te(t,e,n,r){return 1===arguments.length?Ee(t):new Se(t,e,n,null==r?1:r)}function Se(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ce(){return"#"+Ne(this.r)+Ne(this.g)+Ne(this.b)}function Me(){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 Ne(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Pe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Le(t,e,n,r)}function Oe(t){if(t instanceof Le)return new Le(t.h,t.s,t.l,t.opacity);if(t instanceof le||(t=we(t)),!t)return new Le;if(t instanceof Le)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,l=a-i,u=(a+i)/2;return l?(o=e===a?(n-r)/l+6*(n<r):n===a?(r-e)/l+2:(e-n)/l+4,l/=u<.5?a+i:2-a-i,o*=60):l=u>0&&u<1?0:o,new Le(o,l,u,t.opacity)}function Ae(t,e,n,r){return 1===arguments.length?Oe(t):new Le(t,e,n,null==r?1:r)}function Le(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ze(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Ue(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}ae(le,we,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:_e,formatHex:_e,formatHsl:function(){return Oe(this).formatHsl()},formatRgb:be,toString:be}),ae(Se,Te,oe(le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Se(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Se(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:Ce,formatHex:Ce,formatRgb:Me,toString:Me})),ae(Le,Ae,oe(le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Le(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Le(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Se(ze(t>=240?t-240:t+120,i,r),ze(t,i,r),ze(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 Re=function(t){return function(){return t}};function Fe(t,e){return function(n){return t+n*e}}function Ie(t,e){var n=e-t;return n?Fe(t,n>180||n<-180?n-360*Math.round(n/360):n):Re(isNaN(t)?e:t)}function De(t){return 1==(t=+t)?je:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Re(isNaN(e)?n:e)}}function je(t,e){var n=e-t;return n?Fe(t,n):Re(isNaN(t)?e:t)}var He=function t(e){var n=De(e);function r(t,e){var r=n((t=Te(t)).r,(e=Te(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=je(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function We(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),l=new Array(i);for(n=0;n<i;++n)r=Te(e[n]),a[n]=r.r||0,o[n]=r.g||0,l[n]=r.b||0;return a=t(a),o=t(o),l=t(l),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=l(t),r+""}}}We((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,l=r<e-1?t[r+2]:2*a-i;return Ue((n-r/e)*e,o,i,a,l)}})),We((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],l=t[(r+2)%e];return Ue((n-r/e)*e,i,a,o,l)}}));var Be=function(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=tn(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}},Ve=function(t,e){var n=new Date;return e-=t=+t,function(r){return n.setTime(t+e*r),n}},Ye=function(t,e){return e-=t=+t,function(n){return t+e*n}},qe=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=tn(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},$e=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qe=new RegExp($e.source,"g");var Xe,Ke,Ze,Ge,Je=function(t,e){var n,r,i,a=$e.lastIndex=Qe.lastIndex=0,o=-1,l=[],u=[];for(t+="",e+="";(n=$e.exec(t))&&(r=Qe.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),l[o]?l[o]+=i:l[++o]=i),(n=n[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,u.push({i:o,x:Ye(n,r)})),a=Qe.lastIndex;return a<e.length&&(i=e.slice(a),l[o]?l[o]+=i:l[++o]=i),l.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)l[(n=u[r]).i]=n.x(t);return l.join("")})},tn=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?Re(e):("number"===r?Ye:"string"===r?(n=we(e))?(e=n,He):Je:e instanceof we?He:e instanceof Date?Ve:Array.isArray(e)?Be:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?qe:Ye)(t,e)},en=function(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}},nn=180/Math.PI,rn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},an=function(t,e,n,r,i,a){var o,l,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,u/=l),t*r<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*nn,skewX:Math.atan(u)*nn,scaleX:o,scaleY:l}};function on(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var l=[],u=[];return a=t(a),o=t(o),function(t,r,i,a,o,l){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);l.push({i:u-4,x:Ye(t,i)},{i:u-2,x:Ye(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,l,u),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Ye(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,l,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Ye(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,l,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var l=a.push(i(a)+"scale(",null,",",null,")");o.push({i:l-4,x:Ye(t,n)},{i:l-2,x:Ye(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,l,u),a=o=null,function(t){for(var e,n=-1,r=u.length;++n<r;)l[(e=u[n]).i]=e.x(t);return l.join("")}}}var ln=on((function(t){return"none"===t?rn:(Xe||(Xe=document.createElement("DIV"),Ke=document.documentElement,Ze=document.defaultView),Xe.style.transform=t,t=Ze.getComputedStyle(Ke.appendChild(Xe),null).getPropertyValue("transform"),Ke.removeChild(Xe),t=t.slice(7,-1).split(","),an(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),un=on((function(t){return null==t?rn:(Ge||(Ge=document.createElementNS("http://www.w3.org/2000/svg","g")),Ge.setAttribute("transform",t),(t=Ge.transform.baseVal.consolidate())?(t=t.matrix,an(t.a,t.b,t.c,t.d,t.e,t.f)):rn)}),", ",")",")");Math.SQRT2;function sn(t){return function(e,n){var r=t((e=Ae(e)).h,(n=Ae(n)).h),i=je(e.s,n.s),a=je(e.l,n.l),o=je(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}sn(Ie),sn(je);var cn=Math.PI/180,fn=180/Math.PI,hn=.96422,pn=1,dn=.82521,mn=4/29,yn=6/29,vn=3*yn*yn,gn=yn*yn*yn;function _n(t){if(t instanceof wn)return new wn(t.l,t.a,t.b,t.opacity);if(t instanceof Mn)return Nn(t);t instanceof Se||(t=Ee(t));var e,n,r=Tn(t.r),i=Tn(t.g),a=Tn(t.b),o=xn((.2225045*r+.7168786*i+.0606169*a)/pn);return r===i&&i===a?e=n=o:(e=xn((.4360747*r+.3850649*i+.1430804*a)/hn),n=xn((.0139322*r+.0971045*i+.7141733*a)/dn)),new wn(116*o-16,500*(e-o),200*(o-n),t.opacity)}function bn(t,e,n,r){return 1===arguments.length?_n(t):new wn(t,e,n,null==r?1:r)}function wn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function xn(t){return t>gn?Math.pow(t,1/3):t/vn+mn}function kn(t){return t>yn?t*t*t:vn*(t-mn)}function En(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Tn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Sn(t){if(t instanceof Mn)return new Mn(t.h,t.c,t.l,t.opacity);if(t instanceof wn||(t=_n(t)),0===t.a&&0===t.b)return new Mn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*fn;return new Mn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Cn(t,e,n,r){return 1===arguments.length?Sn(t):new Mn(t,e,n,null==r?1:r)}function Mn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Nn(t){if(isNaN(t.h))return new wn(t.l,0,0,t.opacity);var e=t.h*cn;return new wn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function Pn(t){return function(e,n){var r=t((e=Cn(e)).h,(n=Cn(n)).h),i=je(e.c,n.c),a=je(e.l,n.l),o=je(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}ae(wn,bn,oe(le,{brighter:function(t){return new wn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new wn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Se(En(3.1338561*(e=hn*kn(e))-1.6168667*(t=pn*kn(t))-.4906146*(n=dn*kn(n))),En(-.9787684*e+1.9161415*t+.033454*n),En(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),ae(Mn,Cn,oe(le,{brighter:function(t){return new Mn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Mn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Nn(this).rgb()}}));Pn(Ie),Pn(je);var On=-.29227,An=-.90649,Ln=1.97294,zn=Ln*An,Un=1.78277*Ln,Rn=1.78277*On- -.14861*An;function Fn(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof In)return new In(t.h,t.s,t.l,t.opacity);t instanceof Se||(t=Ee(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Rn*r+zn*e-Un*n)/(Rn+zn-Un),a=r-i,o=(Ln*(n-i)-On*a)/An,l=Math.sqrt(o*o+a*a)/(Ln*i*(1-i)),u=l?Math.atan2(o,a)*fn-120:NaN;return new In(u<0?u+360:u,l,i,t.opacity)}(t):new In(t,e,n,null==r?1:r)}function In(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Dn(t){return function e(n){function r(e,r){var i=t((e=Fn(e)).h,(r=Fn(r)).h),a=je(e.s,r.s),o=je(e.l,r.l),l=je(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=l(t),e+""}}return n=+n,r.gamma=e,r}(1)}ae(In,Fn,oe(le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new In(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new In(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*cn,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Se(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(On*r+An*i)),255*(e+n*(Ln*r)),this.opacity)}}));Dn(Ie),Dn(je);var jn,Hn,Wn=0,Bn=0,Vn=0,Yn=1e3,qn=0,$n=0,Qn=0,Xn="object"==typeof performance&&performance.now?performance:Date,Kn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zn(){return $n||(Kn(Gn),$n=Xn.now()+Qn)}function Gn(){$n=0}function Jn(){this._call=this._time=this._next=null}function tr(t,e,n){var r=new Jn;return r.restart(t,e,n),r}function er(){$n=(qn=Xn.now())+Qn,Wn=Bn=0;try{!function(){Zn(),++Wn;for(var t,e=jn;e;)(t=$n-e._time)>=0&&e._call.call(null,t),e=e._next;--Wn}()}finally{Wn=0,function(){var t,e,n=jn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:jn=e);Hn=t,rr(r)}(),$n=0}}function nr(){var t=Xn.now(),e=t-qn;e>Yn&&(Qn-=e,qn=t)}function rr(t){Wn||(Bn&&(Bn=clearTimeout(Bn)),t-$n>24?(t<1/0&&(Bn=setTimeout(er,t-Xn.now()-Qn)),Vn&&(Vn=clearInterval(Vn))):(Vn||(qn=Xn.now(),Vn=setInterval(nr,Yn)),Wn=1,Kn(er)))}Jn.prototype=tr.prototype={constructor:Jn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Zn():+n)+(null==e?0:+e),this._next||Hn===this||(Hn?Hn._next=this:jn=this,Hn=this),this._call=t,this._time=n,rr()},stop:function(){this._call&&(this._call=null,this._time=1/0,rr())}};var ir=function(t,e,n){var r=new Jn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},ar=B("start","end","cancel","interrupt"),or=[],lr=0,ur=1,sr=2,cr=3,fr=4,hr=5,pr=6,dr=function(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(u){var s,c,f,h;if(n.state!==ur)return l();for(s in i)if((h=i[s]).name===n.name){if(h.state===cr)return ir(a);h.state===fr?(h.state=pr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[s]):+s<e&&(h.state=pr,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[s])}if(ir((function(){n.state===cr&&(n.state=fr,n.timer.restart(o,n.delay,n.time),o(u))})),n.state=sr,n.on.call("start",t,t.__data__,n.index,n.group),n.state===sr){for(n.state=cr,r=new Array(f=n.tween.length),s=0,c=-1;s<f;++s)(h=n.tween[s].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=hr,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);n.state===hr&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=pr,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=tr((function(t){n.state=ur,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:ar,tween:or,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:lr})};function mr(t,e){var n=vr(t,e);if(n.state>lr)throw new Error("too late; already scheduled");return n}function yr(t,e){var n=vr(t,e);if(n.state>cr)throw new Error("too late; already running");return n}function vr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var gr=function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>sr&&n.state<hr,n.state=pr,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}};function _r(t,e){var n,r;return function(){var i=yr(this,t),a=i.tween;if(a!==n)for(var o=0,l=(r=n=a).length;o<l;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function br(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=yr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var l={name:e,value:n},u=0,s=i.length;u<s;++u)if(i[u].name===e){i[u]=l;break}u===s&&i.push(l)}a.tween=i}}function wr(t,e,n){var r=t._id;return t.each((function(){var t=yr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return vr(t,r).value[e]}}var xr=function(t,e){var n;return("number"==typeof e?Ye:e instanceof we?He:(n=we(e))?(e=n,He):Je)(t,e)};function kr(t){return function(){this.removeAttribute(t)}}function Er(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Tr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function Sr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function Cr(t,e,n){var r,i,a;return function(){var o,l,u=n(this);if(null!=u)return(o=this.getAttribute(t))===(l=u+"")?null:o===r&&l===i?a:(i=l,a=e(r=o,u));this.removeAttribute(t)}}function Mr(t,e,n){var r,i,a;return function(){var o,l,u=n(this);if(null!=u)return(o=this.getAttributeNS(t.space,t.local))===(l=u+"")?null:o===r&&l===i?a:(i=l,a=e(r=o,u));this.removeAttributeNS(t.space,t.local)}}function Nr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e(n))}}(t,i)),n}return i._value=e,i}function Pr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e(n))}}(t,i)),n}return i._value=e,i}function Or(t,e){return function(){mr(this,t).delay=+e.apply(this,arguments)}}function Ar(t,e){return e=+e,function(){mr(this,t).delay=e}}function Lr(t,e){return function(){yr(this,t).duration=+e.apply(this,arguments)}}function zr(t,e){return e=+e,function(){yr(this,t).duration=e}}function Ur(t,e){if("function"!=typeof e)throw new Error;return function(){yr(this,t).ease=e}}function Rr(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?mr:yr;return function(){var o=a(this,t),l=o.on;l!==r&&(i=(r=l).copy()).on(e,n),o.on=i}}var Fr=te.prototype.constructor;function Ir(t){return function(){this.style.removeProperty(t)}}function Dr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e(r),n)}}(t,a,n)),r}return a._value=e,a}var jr=0;function Hr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Wr(){return++jr}var Br=te.prototype;Hr.prototype=function(t){return te().transition(t)}.prototype={constructor:Hr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Z(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var l,u,s=r[o],c=s.length,f=a[o]=new Array(c),h=0;h<c;++h)(l=s[h])&&(u=t.call(l,l.__data__,h,s))&&("__data__"in l&&(u.__data__=l.__data__),f[h]=u,dr(f[h],e,n,h,f,vr(l,n)));return new Hr(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=J(t));for(var r=this._groups,i=r.length,a=[],o=[],l=0;l<i;++l)for(var u,s=r[l],c=s.length,f=0;f<c;++f)if(u=s[f]){for(var h,p=t.call(u,u.__data__,f,s),d=vr(u,n),m=0,y=p.length;m<y;++m)(h=p[m])&&dr(h,e,n,m,p,d);a.push(p),o.push(u)}return new Hr(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=tt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],l=o.length,u=r[i]=[],s=0;s<l;++s)(a=o[s])&&t.call(a,a.__data__,s,o)&&u.push(a);return new Hr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var u,s=e[l],c=n[l],f=s.length,h=o[l]=new Array(f),p=0;p<f;++p)(u=s[p]||c[p])&&(h[p]=u);for(;l<r;++l)o[l]=e[l];return new Hr(o,this._parents,this._name,this._id)},selection:function(){return new Fr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Wr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,l=r[a],u=l.length,s=0;s<u;++s)if(o=l[s]){var c=vr(o,e);dr(o,t,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Hr(r,this._parents,t,n)},call:Br.call,nodes:Br.nodes,node:Br.node,size:Br.size,empty:Br.empty,each:Br.each,on:function(t,e){var n=this._id;return arguments.length<2?vr(this.node(),n).on.on(t):this.each(Rr(n,t,e))},attr:function(t,e){var n=q(t),r="transform"===n?un:xr;return this.attrTween(t,"function"==typeof e?(n.local?Mr:Cr)(n,r,wr(this,"attr."+t,e)):null==e?(n.local?Er:kr)(n):(n.local?Sr:Tr)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=q(t);return this.tween(n,(r.local?Nr:Pr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?ln:xr;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=vt(this,t),o=(this.style.removeProperty(t),vt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Ir(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=vt(this,t),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(t),u=l=vt(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,l))}}(t,r,wr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,l="end."+o;return function(){var u=yr(this,t),s=u.on,c=null==u.value[o]?a||(a=Ir(e)):void 0;s===n&&i===c||(r=(n=s).copy()).on(l,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=vt(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Dr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(wr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=vr(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?_r:br)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Or:Ar)(e,t)):vr(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Lr:zr)(e,t)):vr(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Ur(e,t)):vr(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var l={value:o},u={value:function(){0==--i&&a()}};n.each((function(){var n=yr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(l),e._.interrupt.push(l),e._.end.push(u)),n.on=e}))}))}};(function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n})(3),function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Math.PI;(function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n})(1.70158),function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158);var Vr=2*Math.PI,Yr=(function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vr);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Vr)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vr);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Vr)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vr);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Vr)},i.period=function(n){return t(e,n)},i}(1,.3),{time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}});function qr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Yr.time=Zn(),Yr;return n}te.prototype.interrupt=function(t){return this.each((function(){gr(this,t)}))},te.prototype.transition=function(t){var e,n;t instanceof Hr?(e=t._id,t=t._name):(e=Wr(),(n=Yr).time=Zn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,l=r[a],u=l.length,s=0;s<u;++s)(o=l[s])&&dr(o,t,e,s,l,n||qr(o,e));return new Hr(r,this._parents,t,e)};function $r(t){return[+t[0],+t[1]]}function Qr(t){return[$r(t[0]),$r(t[1])]}["w","e"].map(Xr),["n","s"].map(Xr),["n","w","e","s","nw","ne","sw","se"].map(Xr);function Xr(t){return{type:t}}Math.cos,Math.sin,Math.PI,Math.max;Array.prototype.slice;var Kr=Math.PI,Zr=2*Kr,Gr=Zr-1e-6;function Jr(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ti(){return new Jr}Jr.prototype=ti.prototype={constructor:Jr,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,l=n-t,u=r-e,s=a-t,c=o-e,f=s*s+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(c*l-u*s)>1e-6&&i){var h=n-a,p=r-o,d=l*l+u*u,m=h*h+p*p,y=Math.sqrt(d),v=Math.sqrt(f),g=i*Math.tan((Kr-Math.acos((d+f-m)/(2*y*v)))/2),_=g/v,b=g/y;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*s)+","+(e+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*h>s*p)+","+(this._x1=t+b*l)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),l=n*Math.sin(r),u=t+o,s=e+l,c=1^a,f=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+s:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-s)>1e-6)&&(this._+="L"+u+","+s),n&&(f<0&&(f=f%Zr+Zr),f>Gr?this._+="A"+n+","+n+",0,1,"+c+","+(t-o)+","+(e-l)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=s):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=Kr)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var ei=ti;function ni(){}function ri(t,e){var n=new ni;if(t instanceof ni)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}ni.prototype=ri.prototype={constructor:ni,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var ii=ri;function ai(){}var oi=ii.prototype;function li(t,e){var n=new ai;if(t instanceof ai)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}ai.prototype=li.prototype={constructor:ai,has:oi.has,add:function(t){return this["$"+(t+="")]=t,this},remove:oi.remove,clear:oi.clear,values:oi.keys,size:oi.size,empty:oi.empty,each:oi.each};Array.prototype.slice;var ui={},si={},ci=34,fi=10,hi=13;function pi(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+"]"})).join(",")+"}")}function di(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function mi(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function yi(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+mi(-e,6):e>9999?"+"+mi(e,6):mi(e,4))+"-"+mi(t.getUTCMonth()+1,2)+"-"+mi(t.getUTCDate(),2)+(a?"T"+mi(n,2)+":"+mi(r,2)+":"+mi(i,2)+"."+mi(a,3)+"Z":i?"T"+mi(n,2)+":"+mi(r,2)+":"+mi(i,2)+"Z":r||n?"T"+mi(n,2)+":"+mi(r,2)+"Z":"")}var vi=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,l=0,u=a<=0,s=!1;function c(){if(u)return si;if(s)return s=!1,ui;var e,r,i=o;if(t.charCodeAt(i)===ci){for(;o++<a&&t.charCodeAt(o)!==ci||t.charCodeAt(++o)===ci;);return(e=o)>=a?u=!0:(r=t.charCodeAt(o++))===fi?s=!0:r===hi&&(s=!0,t.charCodeAt(o)===fi&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if((r=t.charCodeAt(e=o++))===fi)s=!0;else if(r===hi)s=!0,t.charCodeAt(o)===fi&&++o;else if(r!==n)continue;return t.slice(i,e)}return u=!0,t.slice(i,a)}for(t.charCodeAt(a-1)===fi&&--a,t.charCodeAt(a-1)===hi&&--a;(r=c())!==si;){for(var f=[];r!==ui&&r!==si;)f.push(r),r=c();e&&null==(f=e(f,l++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?yi(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=pi(t);return function(r,i){return e(n(r),i,t)}}(t,e):pi(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=di(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=di(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")}}},gi=vi(","),_i=gi.parse,bi=(gi.parseRows,gi.format,gi.formatBody,gi.formatRows,vi("\t")),wi=bi.parse;bi.parseRows,bi.format,bi.formatBody,bi.formatRows;function xi(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var ki=function(t,e){return fetch(t,e).then(xi)};function Ei(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),ki(e,n).then((function(e){return t(e,r)}))}}Ei(_i),Ei(wi);function Ti(t){return function(e,n){return ki(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}Ti("application/xml"),Ti("text/html"),Ti("image/svg+xml");function Si(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,l,u,s,c,f,h,p=t._root,d={data:r},m=t._x0,y=t._y0,v=t._x1,g=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((s=e>=(a=(m+v)/2))?m=a:v=a,(c=n>=(o=(y+g)/2))?y=o:g=o,i=p,!(p=p[f=c<<1|s]))return i[f]=d,t;if(l=+t._x.call(null,p.data),u=+t._y.call(null,p.data),e===l&&n===u)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(s=e>=(a=(m+v)/2))?m=a:v=a,(c=n>=(o=(y+g)/2))?y=o:g=o}while((f=c<<1|s)==(h=(u>=o)<<1|l>=a));return i[h]=p,i[f]=d,t}var Ci=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function Mi(t){return t[0]}function Ni(t){return t[1]}function Pi(t,e,n){var r=new Oi(null==e?Mi:e,null==n?Ni:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Oi(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Ai(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Li=Pi.prototype=Oi.prototype;Li.copy=function(){var t,e,n=new Oi(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Ai(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Ai(e));return n},Li.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Si(this.cover(e,n),e,n,t)},Li.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),l=new Array(a),u=1/0,s=1/0,c=-1/0,f=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,l[n]=i,r<u&&(u=r),r>c&&(c=r),i<s&&(s=i),i>f&&(f=i));if(u>c||s>f)return this;for(this.cover(u,s).cover(c,f),n=0;n<a;++n)Si(this,o[n],l[n],t[n]);return this},Li.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,l,u=i-n,s=this._root;n>t||t>=i||r>e||e>=a;)switch(l=(e<r)<<1|t<n,(o=new Array(4))[l]=s,s=o,u*=2,l){case 0:i=n+u,a=r+u;break;case 1:n=i-u,a=r+u;break;case 2:i=n+u,r=a-u;break;case 3:n=i-u,r=a-u}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},Li.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Li.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Li.find=function(t,e,n){var r,i,a,o,l,u,s,c=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],m=this._root;for(m&&d.push(new Ci(m,c,f,h,p)),null==n?n=1/0:(c=t-n,f=e-n,h=t+n,p=e+n,n*=n);u=d.pop();)if(!(!(m=u.node)||(i=u.x0)>h||(a=u.y0)>p||(o=u.x1)<c||(l=u.y1)<f))if(m.length){var y=(i+o)/2,v=(a+l)/2;d.push(new Ci(m[3],y,v,o,l),new Ci(m[2],i,v,y,l),new Ci(m[1],y,a,o,v),new Ci(m[0],i,a,y,v)),(s=(e>=v)<<1|t>=y)&&(u=d[d.length-1],d[d.length-1]=d[d.length-1-s],d[d.length-1-s]=u)}else{var g=t-+this._x.call(null,m.data),_=e-+this._y.call(null,m.data),b=g*g+_*_;if(b<n){var w=Math.sqrt(n=b);c=t-w,f=e-w,h=t+w,p=e+w,r=m.data}}return r},Li.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,l,u,s,c,f,h,p=this._root,d=this._x0,m=this._y0,y=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((s=a>=(l=(d+y)/2))?d=l:y=l,(c=o>=(u=(m+v)/2))?m=u:v=u,e=p,!(p=p[f=c<<1|s]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=i,this)},Li.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Li.root=function(){return this._root},Li.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Li.visit=function(t){var e,n,r,i,a,o,l=[],u=this._root;for(u&&l.push(new Ci(u,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(u=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&u.length){var s=(r+a)/2,c=(i+o)/2;(n=u[3])&&l.push(new Ci(n,s,c,a,o)),(n=u[2])&&l.push(new Ci(n,r,c,s,o)),(n=u[1])&&l.push(new Ci(n,s,i,a,c)),(n=u[0])&&l.push(new Ci(n,r,i,s,c))}return this},Li.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Ci(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,l=e.y0,u=e.x1,s=e.y1,c=(o+u)/2,f=(l+s)/2;(a=i[0])&&n.push(new Ci(a,o,l,c,f)),(a=i[1])&&n.push(new Ci(a,c,l,u,f)),(a=i[2])&&n.push(new Ci(a,o,f,c,s)),(a=i[3])&&n.push(new Ci(a,c,f,u,s))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Li.x=function(t){return arguments.length?(this._x=t,this):this._x},Li.y=function(t){return arguments.length?(this._y=t,this):this._y};Math.PI,Math.sqrt(5);var zi=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]},Ui=function(t){return(t=zi(Math.abs(t)))?t[1]:NaN},Ri=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Fi(t){if(!(e=Ri.exec(t)))throw new Error("invalid format: "+t);var e;return new Ii({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Ii(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+""}Fi.prototype=Ii.prototype,Ii.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 Di,ji,Hi,Wi,Bi=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(e+1):t},Vi=function(t,e){var n=zi(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Yi={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Vi(100*t,e)},r:Vi,s:function(t,e){var n=zi(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Di=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+zi(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},qi=function(t){return t},$i=Array.prototype.map,Qi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];ji=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?qi:(e=$i.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>r&&(l=Math.max(1,r-u)),a.push(t.substring(i-=l,i+l)),!((u+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?qi:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}($i.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Fi(t)).fill,n=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,m=t.comma,y=t.precision,v=t.trim,g=t.type;"n"===g?(m=!0,g="g"):Yi[g]||(void 0===y&&(y=12),v=!0,g="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===h?i:"#"===h&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",b="$"===h?a:/[%p]/.test(g)?u:"",w=Yi[g],x=/[defgprs%]/.test(g);function k(t){var i,a,u,h=_,k=b;if("c"===g)k=w(t)+k,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?c:w(Math.abs(t),y),v&&(t=Bi(t)),E&&0==+t&&(E=!1),h=(E?"("===f?f:s:"-"===f||"("===f?"":f)+h,k=("s"===g?Qi[8+Di/3]:"")+k+(E&&"("===f?")":""),x)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){k=(46===u?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}m&&!p&&(t=r(t,1/0));var T=h.length+t.length+k.length,S=T<d?new Array(d-T+1).join(e):"";switch(m&&p&&(t=r(S+t,S.length?d-k.length:1/0),S=""),n){case"<":t=h+t+k+S;break;case"=":t=h+S+t+k;break;case"^":t=S.slice(0,T=S.length>>1)+h+t+k+S.slice(T);break;default:t=S+h+t+k}return l(t)}return y=void 0===y?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:f,formatPrefix:function(t,e){var n=f(((t=Fi(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ui(e)/3))),i=Math.pow(10,-r),a=Qi[8+r/3];return function(t){return n(i*t)+a}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Hi=ji.format,Wi=ji.formatPrefix;var Xi=function(){return new Ki};function Ki(){this.reset()}Ki.prototype={constructor:Ki,reset:function(){this.s=this.t=0},add:function(t){Gi(Zi,t,this.t),Gi(this,Zi.s,this.s),this.s?this.t+=Zi.t:this.s=Zi.t},valueOf:function(){return this.s}};var Zi=new Ki;function Gi(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var Ji=1e-6,ta=1e-12,ea=Math.PI,na=ea/2,ra=ea/4,ia=2*ea,aa=ea/180,oa=Math.abs,la=Math.atan,ua=Math.atan2,sa=Math.cos,ca=(Math.ceil,Math.exp),fa=(Math.floor,Math.log),ha=(Math.pow,Math.sin),pa=Math.sign||function(t){return t>0?1:t<0?-1:0},da=Math.sqrt,ma=Math.tan;function ya(t){return t>1?0:t<-1?ea:Math.acos(t)}function va(t){return t>1?na:t<-1?-na:Math.asin(t)}function ga(){}Xi(),Xi();function _a(t){var e=t[0],n=t[1],r=sa(n);return[r*sa(e),r*ha(e),ha(n)]}function ba(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function wa(t){var e=da(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}Xi();function xa(t,e){return[oa(t)>ea?t+Math.round(-t/ia)*ia:t,e]}xa.invert=xa;var ka=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:ga,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},Ea=function(t,e){return oa(t[0]-e[0])<Ji&&oa(t[1]-e[1])<Ji};function Ta(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var Sa=function(t,e,n,r,i){var a,o,l=[],u=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(Ea(r,o)){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);i.lineEnd()}else l.push(n=new Ta(r,t,null,!0)),u.push(n.o=new Ta(r,null,n,!1)),l.push(n=new Ta(o,t,null,!1)),u.push(n.o=new Ta(o,null,n,!0))}})),l.length){for(u.sort(e),Ca(l),Ca(u),a=0,o=u.length;a<o;++a)u[a].e=n=!n;for(var s,c,f=l[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;s=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(a=0,o=s.length;a<o;++a)i.point((c=s[a])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(s=h.p.z,a=s.length-1;a>=0;--a)i.point((c=s[a])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}s=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}};function Ca(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var Ma=Xi();function Na(t){return oa(t[0])<=ea?t[0]:pa(t[0])*((oa(t[0])+ea)%ia-ea)}var Pa=function(t,e){var n=Na(e),r=e[1],i=ha(r),a=[ha(n),-sa(n),0],o=0,l=0;Ma.reset(),1===i?r=na+Ji:-1===i&&(r=-na-Ji);for(var u=0,s=t.length;u<s;++u)if(f=(c=t[u]).length)for(var c,f,h=c[f-1],p=Na(h),d=h[1]/2+ra,m=ha(d),y=sa(d),v=0;v<f;++v,p=_,m=w,y=x,h=g){var g=c[v],_=Na(g),b=g[1]/2+ra,w=ha(b),x=sa(b),k=_-p,E=k>=0?1:-1,T=E*k,S=T>ea,C=m*w;if(Ma.add(ua(C*E*ha(T),y*x+C*sa(T))),o+=S?k+E*ia:k,S^p>=n^_>=n){var M=ba(_a(h),_a(g));wa(M);var N=ba(a,M);wa(N);var P=(S^k>=0?-1:1)*va(N[2]);(r>P||r===P&&(M[0]||M[1]))&&(l+=S^k>=0?1:-1)}}return(o<-Ji||o<Ji&&Ma<-Ji)^1&l},Oa=function(t,e,n,r){return function(i){var a,o,l,u=e(i),s=ka(),c=e(s),f=!1,h={point:p,lineStart:m,lineEnd:y,polygonStart:function(){h.point=v,h.lineStart=g,h.lineEnd=_,o=[],a=[]},polygonEnd:function(){h.point=p,h.lineStart=m,h.lineEnd=y,o=w(o);var t=Pa(a,r);o.length?(f||(i.polygonStart(),f=!0),Sa(o,La,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){u.point(t,e)}function m(){h.point=d,u.lineStart()}function y(){h.point=p,u.lineEnd()}function v(t,e){l.push([t,e]),c.point(t,e)}function g(){c.lineStart(),l=[]}function _(){v(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,u=c.clean(),h=s.result(),p=h.length;if(l.pop(),a.push(l),l=null,p)if(1&u){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else p>1&&2&u&&h.push(h.pop().concat(h.shift())),o.push(h.filter(Aa))}return h}};function Aa(t){return t.length>1}function La(t,e){return((t=t.x)[0]<0?t[1]-na-Ji:na-t[1])-((e=e.x)[0]<0?e[1]-na-Ji:na-e[1])}Oa((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var l=a>0?ea:-ea,u=oa(a-n);oa(u-ea)<Ji?(t.point(n,r=(r+o)/2>0?na:-na),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(a,r),e=0):i!==l&&u>=ea&&(oa(n-i)<Ji&&(n-=i*Ji),oa(a-l)<Ji&&(a-=l*Ji),r=function(t,e,n,r){var i,a,o=ha(t-n);return oa(o)>Ji?la((ha(e)*(a=sa(r))*ha(n)-ha(r)*(i=sa(e))*ha(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),e=0),t.point(n=a,r=o),i=l},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*na,r.point(-ea,i),r.point(0,i),r.point(ea,i),r.point(ea,0),r.point(ea,-i),r.point(0,-i),r.point(-ea,-i),r.point(-ea,0),r.point(-ea,i);else if(oa(t[0]-e[0])>Ji){var a=t[0]<e[0]?ea:-ea;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-ea,-na]);Xi();Xi(),Xi();function za(t){this._context=t}za.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,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,ia)}},result:ga};Xi();function Ua(){this._string=[]}function Ra(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Ua.prototype={_radius:4.5,_circle:Ra(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,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Ra(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};function Fa(t){return function(e){var n=new Ia;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Ia(){}Ia.prototype={constructor:Ia,point:function(t,e){this.stream.point(t,e)},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()}};sa(30*aa);Fa({point:function(t,e){this.stream.point(t*aa,e*aa)}});function Da(t){return function(e,n){var r=sa(e),i=sa(n),a=t(r*i);return[a*i*ha(e),a*ha(n)]}}function ja(t){return function(e,n){var r=da(e*e+n*n),i=t(r),a=ha(i),o=sa(i);return[ua(e*a,r*o),va(r&&n*a/r)]}}var Ha=Da((function(t){return da(2/(1+t))}));Ha.invert=ja((function(t){return 2*va(t/2)}));var Wa=Da((function(t){return(t=ya(t))&&t/ha(t)}));Wa.invert=ja((function(t){return t}));function Ba(t,e){return[t,fa(ma((na+e)/2))]}Ba.invert=function(t,e){return[t,2*la(ca(e))-na]};function Va(t,e){return[t,e]}Va.invert=Va;var Ya=1.340264,qa=-.081106,$a=893e-6,Qa=.003796,Xa=da(3)/2;function Ka(t,e){var n=va(Xa*ha(e)),r=n*n,i=r*r*r;return[t*sa(n)/(Xa*(Ya+3*qa*r+i*(7*$a+9*Qa*r))),n*(Ya+qa*r+i*($a+Qa*r))]}Ka.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(Ya+qa*i+a*($a+Qa*i))-e)/(Ya+3*qa*i+a*(7*$a+9*Qa*i)))*r)*i*i,!(oa(n)<ta));++o);return[Xa*t*(Ya+3*qa*i+a*(7*$a+9*Qa*i))/sa(r),va(ha(r)/Xa)]};function Za(t,e){var n=sa(e),r=sa(t)*n;return[n*ha(t)/r,ha(e)/r]}Za.invert=ja(la);function Ga(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Ga.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(oa(n)>Ji&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};function Ja(t,e){return[sa(e)*ha(t),ha(e)]}Ja.invert=ja(va);function to(t,e){var n=sa(e),r=1+sa(t)*n;return[n*ha(t)/r,ha(e)/r]}to.invert=ja((function(t){return 2*la(t)}));function eo(t,e){return[fa(ma((na+e)/2)),-t]}eo.invert=function(t,e){return[-e,2*la(ca(t))-na]};function no(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function ro(t,e){var n,r,i,a,o,l=new lo(t),u=+t.value&&(l.value=t.value),s=[l];for(null==e&&(e=io);n=s.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)s.push(r=n.children[a]=new lo(i[a])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(oo)}function io(t){return t.children}function ao(t){t.data=t.data.data}function oo(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function lo(t){this.data=t,this.depth=this.height=0,this.parent=null}lo.prototype=ro.prototype={constructor:lo,count:function(){return this.eachAfter(no)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return ro(this).eachBefore(ao)}};Array.prototype.slice;var uo=function(t,e,n,r,i){for(var a,o=t.children,l=-1,u=o.length,s=t.value&&(r-e)/t.value;++l<u;)(a=o[l]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*s};function so(t,e){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=e}so.prototype=Object.create(lo.prototype);var co=function(t,e,n,r,i){for(var a,o=t.children,l=-1,u=o.length,s=t.value&&(i-n)/t.value;++l<u;)(a=o[l]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*s},fo=(1+Math.sqrt(5))/2;function ho(t,e,n,r,i,a){for(var o,l,u,s,c,f,h,p,d,m,y,v=[],g=e.children,_=0,b=0,w=g.length,x=e.value;_<w;){u=i-n,s=a-r;do{c=g[b++].value}while(!c&&b<w);for(f=h=c,y=c*c*(m=Math.max(s/u,u/s)/(x*t)),d=Math.max(h/y,y/f);b<w;++b){if(c+=l=g[b].value,l<f&&(f=l),l>h&&(h=l),y=c*c*m,(p=Math.max(h/y,y/f))>d){c-=l;break}d=p}v.push(o={value:c,dice:u<s,children:g.slice(_,b)}),o.dice?uo(o,n,r,i,x?r+=s*c/x:a):co(o,n,r,x?n+=u*c/x:i,a),x-=c,_=b}return v}(function t(e){function n(t,n,r,i,a){ho(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n})(fo),function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,l,u,s,c,f=-1,h=o.length,p=t.value;++f<h;){for(u=(l=o[f]).children,s=l.value=0,c=u.length;s<c;++s)l.value+=u[s].value;l.dice?uo(l,n,r,i,r+=(a-r)*l.value/p):co(l,n,r,n+=(i-n)*l.value/p,a),p-=l.value}else t._squarify=o=ho(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(fo);var po=function(){return Math.random()},mo=(function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(po),function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(po)),yo=(function t(e){function n(){var t=mo.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(po),function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(po));(function t(e){function n(t){var n=yo.source(e)(t);return function(){return n()/t}}return n.source=t,n})(po),function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(po);function vo(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var go=Array.prototype,_o=go.map,bo=go.slice;var wo=function(t){return function(){return t}},xo=function(t){return+t},ko=[0,1];function Eo(t){return t}function To(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:wo(isNaN(e)?NaN:.5)}function So(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Co(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=To(i,r),a=n(o,a)):(r=To(r,i),a=n(a,o)),function(t){return a(r(t))}}function Mo(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=To(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=f(t,e,1,r)-1;return a[n](i[n](e))}}function No(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Po(){var t,e,n,r,i,a,o=ko,l=ko,u=tn,s=Eo;function c(){return r=Math.min(o.length,l.length)>2?Mo:Co,i=a=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),l,u)))(t(s(e)))}return f.invert=function(n){return s(e((a||(a=r(l,o.map(t),Ye)))(n)))},f.domain=function(t){return arguments.length?(o=_o.call(t,xo),s===Eo||(s=So(o)),c()):o.slice()},f.range=function(t){return arguments.length?(l=bo.call(t),c()):l.slice()},f.rangeRound=function(t){return l=bo.call(t),u=en,c()},f.clamp=function(t){return arguments.length?(s=t?So(o):Eo,f):s!==Eo},f.interpolate=function(t){return arguments.length?(u=t,c()):u},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,c()}}function Oo(t,e){return Po()(t,e)}var Ao=function(t,e,n,r){var i,a=_(t,e,n);switch((r=Fi(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ui(e)/3)))-Ui(Math.abs(t)))}(a,o))||(r.precision=i),Wi(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ui(e)-Ui(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Ui(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Hi(r)};function Lo(t){var e=t.domain;return t.ticks=function(t){var n=e();return v(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Ao(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,l=i[a],u=i[o];return u<l&&(r=l,l=u,u=r,r=a,a=o,o=r),(r=g(l,u,n))>0?r=g(l=Math.floor(l/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=g(l=Math.ceil(l*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[a]=Math.floor(l/r)*r,i[o]=Math.ceil(u/r)*r,e(i)):r<0&&(i[a]=Math.ceil(l*r)/r,i[o]=Math.floor(u*r)/r,e(i)),t},t}function zo(){var t=Oo(Eo,Eo);return t.copy=function(){return No(t,zo())},vo.apply(t,arguments),Lo(t)}var Uo=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t};function Ro(t){return Math.log(t)}function Fo(t){return Math.exp(t)}function Io(t){return-Math.log(-t)}function Do(t){return-Math.exp(-t)}function jo(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ho(t){return function(e){return-t(-e)}}function Wo(t){var e,n,r=t(Ro,Fo),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?jo:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=Ho(e),n=Ho(n),t(Io,Do)):t(Ro,Fo),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),l=o[0],u=o[o.length-1];(r=u<l)&&(h=l,l=u,u=h);var s,c,f,h=e(l),p=e(u),d=null==t?10:+t,m=[];if(!(a%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,l>0){for(;h<p;++h)for(c=1,s=n(h);c<a;++c)if(!((f=s*c)<l)){if(f>u)break;m.push(f)}}else for(;h<p;++h)for(c=a-1,s=n(h);c>=1;--c)if(!((f=s*c)<l)){if(f>u)break;m.push(f)}}else m=v(h,p,Math.min(p-h,d)).map(n);return r?m.reverse():m},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Hi(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(Uo(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function Bo(){var t=Wo(Po()).domain([1,10]);return t.copy=function(){return No(t,Bo()).base(t.base())},vo.apply(t,arguments),t}var Vo=new Date,Yo=new Date;function qo(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,l=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return l;do{l.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return l},i.filter=function(n){return qo((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Vo.setTime(+e),Yo.setTime(+r),t(Vo),t(Yo),Math.floor(n(Vo,Yo))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var $o=qo((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));$o.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qo((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Qo=$o,Xo=($o.range,qo((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),Ko=(Xo.range,6e4),Zo=6048e5;function Go(t){return qo((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ko)/Zo}))}var Jo=Go(0),tl=Go(1),el=Go(2),nl=Go(3),rl=Go(4),il=Go(5),al=Go(6),ol=(Jo.range,tl.range,el.range,nl.range,rl.range,il.range,al.range,qo((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ko)/864e5}),(function(t){return t.getDate()-1}))),ll=ol,ul=(ol.range,qo((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*Ko)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()}))),sl=(ul.range,qo((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+e*Ko)}),(function(t,e){return(e-t)/Ko}),(function(t){return t.getMinutes()}))),cl=(sl.range,qo((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()}))),fl=(cl.range,qo((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t})));fl.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?qo((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):fl:null};fl.range;function hl(t){return qo((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/Zo}))}var pl=hl(0),dl=hl(1),ml=hl(2),yl=hl(3),vl=hl(4),gl=hl(5),_l=hl(6),bl=(pl.range,dl.range,ml.range,yl.range,vl.range,gl.range,_l.range,qo((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}))),wl=bl,xl=(bl.range,qo((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));xl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qo((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var kl=xl;xl.range;function El(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Tl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Sl(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}var Cl,Ml,Nl,Pl={"-":"",_:" ",0:"0"},Ol=/^\s*\d+/,Al=/^%/,Ll=/[\\^$*+?|[\]().{}]/g;function zl(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Ul(t){return t.replace(Ll,"\\$&")}function Rl(t){return new RegExp("^(?:"+t.map(Ul).join("|")+")","i")}function Fl(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Il(t,e,n){var r=Ol.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Dl(t,e,n){var r=Ol.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function jl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Hl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Wl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Bl(t,e,n){var r=Ol.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Vl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Yl(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ql(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function $l(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Ql(t,e,n){var r=Ol.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Xl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Kl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Zl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Gl(t,e,n){var r=Ol.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Jl(t,e,n){var r=Ol.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function tu(t,e,n){var r=Al.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function eu(t,e,n){var r=Ol.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function nu(t,e,n){var r=Ol.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function ru(t,e){return zl(t.getDate(),e,2)}function iu(t,e){return zl(t.getHours(),e,2)}function au(t,e){return zl(t.getHours()%12||12,e,2)}function ou(t,e){return zl(1+ll.count(Qo(t),t),e,3)}function lu(t,e){return zl(t.getMilliseconds(),e,3)}function uu(t,e){return lu(t,e)+"000"}function su(t,e){return zl(t.getMonth()+1,e,2)}function cu(t,e){return zl(t.getMinutes(),e,2)}function fu(t,e){return zl(t.getSeconds(),e,2)}function hu(t){var e=t.getDay();return 0===e?7:e}function pu(t,e){return zl(Jo.count(Qo(t),t),e,2)}function du(t,e){var n=t.getDay();return t=n>=4||0===n?rl(t):rl.ceil(t),zl(rl.count(Qo(t),t)+(4===Qo(t).getDay()),e,2)}function mu(t){return t.getDay()}function yu(t,e){return zl(tl.count(Qo(t),t),e,2)}function vu(t,e){return zl(t.getFullYear()%100,e,2)}function gu(t,e){return zl(t.getFullYear()%1e4,e,4)}function _u(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+zl(e/60|0,"0",2)+zl(e%60,"0",2)}function bu(t,e){return zl(t.getUTCDate(),e,2)}function wu(t,e){return zl(t.getUTCHours(),e,2)}function xu(t,e){return zl(t.getUTCHours()%12||12,e,2)}function ku(t,e){return zl(1+wl.count(kl(t),t),e,3)}function Eu(t,e){return zl(t.getUTCMilliseconds(),e,3)}function Tu(t,e){return Eu(t,e)+"000"}function Su(t,e){return zl(t.getUTCMonth()+1,e,2)}function Cu(t,e){return zl(t.getUTCMinutes(),e,2)}function Mu(t,e){return zl(t.getUTCSeconds(),e,2)}function Nu(t){var e=t.getUTCDay();return 0===e?7:e}function Pu(t,e){return zl(pl.count(kl(t),t),e,2)}function Ou(t,e){var n=t.getUTCDay();return t=n>=4||0===n?vl(t):vl.ceil(t),zl(vl.count(kl(t),t)+(4===kl(t).getUTCDay()),e,2)}function Au(t){return t.getUTCDay()}function Lu(t,e){return zl(dl.count(kl(t),t),e,2)}function zu(t,e){return zl(t.getUTCFullYear()%100,e,2)}function Uu(t,e){return zl(t.getUTCFullYear()%1e4,e,4)}function Ru(){return"+0000"}function Fu(){return"%"}function Iu(t){return+t}function Du(t){return Math.floor(+t/1e3)}!function(t){Cl=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,l=t.months,u=t.shortMonths,s=Rl(i),c=Fl(i),f=Rl(a),h=Fl(a),p=Rl(o),d=Fl(o),m=Rl(l),y=Fl(l),v=Rl(u),g=Fl(u),_={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:null,d:ru,e:ru,f:uu,H:iu,I:au,j:ou,L:lu,m:su,M:cu,p:function(t){return i[+(t.getHours()>=12)]},Q:Iu,s:Du,S:fu,u:hu,U:pu,V:du,w:mu,W:yu,x:null,X:null,y:vu,Y:gu,Z:_u,"%":Fu},b={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return l[t.getUTCMonth()]},c:null,d:bu,e:bu,f:Tu,H:wu,I:xu,j:ku,L:Eu,m:Su,M:Cu,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:Iu,s:Du,S:Mu,u:Nu,U:Pu,V:Ou,w:Au,W:Lu,x:null,X:null,y:zu,Y:Uu,Z:Ru,"%":Fu},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:$l,e:$l,f:Jl,H:Xl,I:Xl,j:Ql,L:Gl,m:ql,M:Kl,p:function(t,e,n){var r=s.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:eu,s:nu,S:Zl,u:Dl,U:jl,V:Hl,w:Il,W:Wl,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:Vl,Y:Bl,Z:Yl,"%":tu};function x(t,e){return function(n){var r,i,a,o=[],l=-1,u=0,s=t.length;for(n instanceof Date||(n=new Date(+n));++l<s;)37===t.charCodeAt(l)&&(o.push(t.slice(u,l)),null!=(i=Pl[r=t.charAt(++l)])?r=t.charAt(++l):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),u=l+1);return o.push(t.slice(u,l)),o.join("")}}function k(t,e){return function(n){var r,i,a=Sl(1900);if(E(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("p"in a&&(a.H=a.H%12+12*a.p),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Tl(Sl(a.y))).getUTCDay(),r=i>4||0===i?dl.ceil(r):dl(r),r=wl.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=e(Sl(a.y))).getDay(),r=i>4||0===i?tl.ceil(r):tl(r),r=ll.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Tl(Sl(a.y)).getUTCDay():e(Sl(a.y)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Tl(a)):e(a)}}function E(t,e,n,r){for(var i,a,o=0,l=e.length,u=n.length;o<l;){if(r>=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=w[i in Pl?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=x(n,_),_.X=x(r,_),_.c=x(e,_),b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",El);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t,Tl);return e.toString=function(){return t},e}}}(t),Cl.format,Cl.parse,Ml=Cl.utcFormat,Nl=Cl.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Date.prototype.toISOString||Ml("%Y-%m-%dT%H:%M:%S.%LZ");+new Date("2000-01-01T00:00:00.000Z")||Nl("%Y-%m-%dT%H:%M:%S.%LZ");var ju=qo((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),Hu=(ju.range,qo((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()}))),Wu=(Hu.range,qo((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*Ko)}),(function(t,e){return(e-t)/Ko}),(function(t){return t.getUTCMinutes()})));Wu.range;var Bu=function(t){return function(){return t}},Vu=(Math.abs,Math.atan2,Math.cos,Math.max,Math.min,Math.sin,Math.sqrt,1e-12),Yu=Math.PI,qu=2*Yu;function $u(t){this._context=t}$u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Qu=function(t){return new $u(t)};function Xu(t){return t[0]}function Ku(t){return t[1]}var Zu=function(){var t=Xu,e=Ku,n=Bu(!0),r=null,i=Qu,a=null;function o(o){var l,u,s,c=o.length,f=!1;for(null==r&&(a=i(s=ei())),l=0;l<=c;++l)!(l<c&&n(u=o[l],l,o))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(u,l,o),+e(u,l,o));if(s)return a=null,s+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:Bu(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Bu(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Bu(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o};Ju(Qu);function Gu(t){this._curve=t}function Ju(t){function e(e){return new Gu(t(e))}return e._curve=t,e}Gu.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};Array.prototype.slice;Math.sqrt(1/3);var ts=Math.sin(Yu/10)/Math.sin(7*Yu/10),es=(Math.sin(qu/10),Math.cos(qu/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12),function(){});function ns(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function rs(t){this._context=t}rs.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:ns(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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ns(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function is(t){this._context=t}is.prototype={areaStart:es,areaEnd:es,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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ns(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function as(t){this._context=t}as.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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ns(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function os(t,e){this._basis=new rs(t),this._beta=e}os.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,l=e[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(1-this._beta)*(a+r*l));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};(function t(e){function n(t){return 1===e?new rs(t):new os(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function ls(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function us(t,e){this._context=t,this._k=(1-e)/6}us.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:ls(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:ls(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new us(t,e)}return n.tension=function(e){return t(+e)},n})(0);function ss(t,e){this._context=t,this._k=(1-e)/6}ss.prototype={areaStart:es,areaEnd:es,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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ls(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new ss(t,e)}return n.tension=function(e){return t(+e)},n})(0);function cs(t,e){this._context=t,this._k=(1-e)/6}cs.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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ls(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new cs(t,e)}return n.tension=function(e){return t(+e)},n})(0);function fs(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Vu){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Vu){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*s+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*s+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function hs(t,e){this._context=t,this._alpha=e}hs.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,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:fs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new hs(t,e):new us(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function ps(t,e){this._context=t,this._alpha=e}ps.prototype={areaStart:es,areaEnd:es,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,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:fs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new ps(t,e):new ss(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function ds(t,e){this._context=t,this._alpha=e}ds.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,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+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:fs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new ds(t,e):new cs(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function ms(t){this._context=t}ms.prototype={areaStart:es,areaEnd:es,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function ys(t){return t<0?-1:1}function vs(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),l=(a*i+o*r)/(r+i);return(ys(a)+ys(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function gs(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function _s(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,l=(a-r)/3;t._context.bezierCurveTo(r+l,i+l*e,a-l,o-l*n,a,o)}function bs(t){this._context=t}function ws(t){this._context=new xs(t)}function xs(t){this._context=t}function ks(t){this._context=t}function Es(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:_s(this,this._t0,gs(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,_s(this,gs(this,n=vs(this,t,e)),n);break;default:_s(this,this._t0,n=vs(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(ws.prototype=Object.create(bs.prototype)).point=function(t,e){bs.prototype.point.call(this,e,t)},xs.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},ks.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=Es(t),i=Es(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Ts(t,e){this._context=t,this._t=e}Ts.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};function Ss(){this._=null}function Cs(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Ms(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Ns(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Ps(t){for(;t.L;)t=t.L;return t}Ss.prototype={constructor:Ss,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Ps(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Ms(this,n),n=(t=n).U),n.C=!1,r.C=!0,Ns(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Ns(this,n),n=(t=n).U),n.C=!1,r.C=!0,Ms(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?Ps(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Ms(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Ns(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Ms(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Ns(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Ms(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Ns(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Os=Ss;function As(t,e,n,r){var i=[null,null],a=nc.push(i)-1;return i.left=t,i.right=e,n&&zs(i,t,e,n),r&&zs(i,e,t,r),tc[t.index].halfedges.push(a),tc[e.index].halfedges.push(a),i}function Ls(t,e,n){var r=[e,n];return r.left=t,r}function zs(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function Us(t,e,n,r,i){var a,o=t[0],l=t[1],u=o[0],s=o[1],c=0,f=1,h=l[0]-u,p=l[1]-s;if(a=e-u,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<f&&(f=a)}else if(h>0){if(a>f)return;a>c&&(c=a)}if(a=r-u,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<f&&(f=a)}if(a=n-s,p||!(a>0)){if(a/=p,p<0){if(a<c)return;a<f&&(f=a)}else if(p>0){if(a>f)return;a>c&&(c=a)}if(a=i-s,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>c&&(c=a)}else if(p>0){if(a<c)return;a<f&&(f=a)}return!(c>0||f<1)||(c>0&&(t[0]=[u+c*h,s+c*p]),f<1&&(t[1]=[u+f*h,s+f*p]),!0)}}}}}function Rs(t,e,n,r,i){var a=t[1];if(a)return!0;var o,l,u=t[0],s=t.left,c=t.right,f=s[0],h=s[1],p=c[0],d=c[1],m=(f+p)/2,y=(h+d)/2;if(d===h){if(m<e||m>=r)return;if(f>p){if(u){if(u[1]>=i)return}else u=[m,n];a=[m,i]}else{if(u){if(u[1]<n)return}else u=[m,i];a=[m,n]}}else if(l=y-(o=(f-p)/(d-h))*m,o<-1||o>1)if(f>p){if(u){if(u[1]>=i)return}else u=[(n-l)/o,n];a=[(i-l)/o,i]}else{if(u){if(u[1]<n)return}else u=[(i-l)/o,i];a=[(n-l)/o,n]}else if(h<d){if(u){if(u[0]>=r)return}else u=[e,o*e+l];a=[r,o*r+l]}else{if(u){if(u[0]<e)return}else u=[r,o*r+l];a=[e,o*e+l]}return t[0]=u,t[1]=a,!0}function Fs(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Is(t,e){return e[+(e.left!==t.site)]}function Ds(t,e){return e[+(e.left===t.site)]}var js,Hs=[];function Ws(){Cs(this),this.x=this.y=this.arc=this.site=this.cy=null}function Bs(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],l=i[1],u=r[0]-o,s=r[1]-l,c=a[0]-o,f=a[1]-l,h=2*(u*f-s*c);if(!(h>=-ic)){var p=u*u+s*s,d=c*c+f*f,m=(f*p-s*d)/h,y=(u*d-c*p)/h,v=Hs.pop()||new Ws;v.arc=t,v.site=i,v.x=m+o,v.y=(v.cy=y+l)+Math.sqrt(m*m+y*y),t.circle=v;for(var g=null,_=ec._;_;)if(v.y<_.y||v.y===_.y&&v.x<=_.x){if(!_.L){g=_.P;break}_=_.L}else{if(!_.R){g=_;break}_=_.R}ec.insert(g,v),g||(js=v)}}}}function Vs(t){var e=t.circle;e&&(e.P||(js=e.N),ec.remove(e),Hs.push(e),Cs(e),t.circle=null)}var Ys=[];function qs(){Cs(this),this.edge=this.site=this.circle=null}function $s(t){var e=Ys.pop()||new qs;return e.site=t,e}function Qs(t){Vs(t),Js.remove(t),Ys.push(t),Cs(t)}function Xs(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,l=[t];Qs(t);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<rc&&Math.abs(r-u.circle.cy)<rc;)a=u.P,l.unshift(u),Qs(u),u=a;l.unshift(u),Vs(u);for(var s=o;s.circle&&Math.abs(n-s.circle.x)<rc&&Math.abs(r-s.circle.cy)<rc;)o=s.N,l.push(s),Qs(s),s=o;l.push(s),Vs(s);var c,f=l.length;for(c=1;c<f;++c)s=l[c],u=l[c-1],zs(s.edge,u.site,s.site,i);u=l[0],(s=l[f-1]).edge=As(u.site,s.site,null,i),Bs(u),Bs(s)}function Ks(t){for(var e,n,r,i,a=t[0],o=t[1],l=Js._;l;)if((r=Zs(l,o)-a)>rc)l=l.L;else{if(!((i=a-Gs(l,o))>rc)){r>-rc?(e=l.P,n=l):i>-rc?(e=l,n=l.N):e=n=l;break}if(!l.R){e=l;break}l=l.R}!function(t){tc[t.index]={site:t,halfedges:[]}}(t);var u=$s(t);if(Js.insert(e,u),e||n){if(e===n)return Vs(e),n=$s(e.site),Js.insert(u,n),u.edge=n.edge=As(e.site,u.site),Bs(e),void Bs(n);if(n){Vs(e),Vs(n);var s=e.site,c=s[0],f=s[1],h=t[0]-c,p=t[1]-f,d=n.site,m=d[0]-c,y=d[1]-f,v=2*(h*y-p*m),g=h*h+p*p,_=m*m+y*y,b=[(y*g-p*_)/v+c,(h*_-m*g)/v+f];zs(n.edge,s,d,b),u.edge=As(s,t,null,b),n.edge=As(t,d,null,b),Bs(e),Bs(n)}else u.edge=As(e.site,u.site)}}function Zs(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var l=(n=o.site)[0],u=n[1],s=u-e;if(!s)return l;var c=l-r,f=1/a-1/s,h=c/s;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*s)-u+s/2+i-a/2)))/f+r:(r+l)/2}function Gs(t,e){var n=t.N;if(n)return Zs(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Js,tc,ec,nc,rc=1e-6,ic=1e-12;function ac(t,e){return e[1]-t[1]||e[0]-t[0]}function oc(t,e){var n,r,i,a=t.sort(ac).pop();for(nc=[],tc=new Array(t.length),Js=new Os,ec=new Os;;)if(i=js,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(Ks(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;Xs(i.arc)}if(function(){for(var t,e,n,r,i=0,a=tc.length;i<a;++i)if((t=tc[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),l=new Array(r);for(n=0;n<r;++n)o[n]=n,l[n]=Fs(t,nc[e[n]]);for(o.sort((function(t,e){return l[e]-l[t]})),n=0;n<r;++n)l[n]=e[o[n]];for(n=0;n<r;++n)e[n]=l[n]}}(),e){var o=+e[0][0],l=+e[0][1],u=+e[1][0],s=+e[1][1];!function(t,e,n,r){for(var i,a=nc.length;a--;)Rs(i=nc[a],t,e,n,r)&&Us(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>rc||Math.abs(i[0][1]-i[1][1])>rc)||delete nc[a]}(o,l,u,s),function(t,e,n,r){var i,a,o,l,u,s,c,f,h,p,d,m,y=tc.length,v=!0;for(i=0;i<y;++i)if(a=tc[i]){for(o=a.site,l=(u=a.halfedges).length;l--;)nc[u[l]]||u.splice(l,1);for(l=0,s=u.length;l<s;)d=(p=Ds(a,nc[u[l]]))[0],m=p[1],f=(c=Is(a,nc[u[++l%s]]))[0],h=c[1],(Math.abs(d-f)>rc||Math.abs(m-h)>rc)&&(u.splice(l,0,nc.push(Ls(o,p,Math.abs(d-t)<rc&&r-m>rc?[t,Math.abs(f-t)<rc?h:r]:Math.abs(m-r)<rc&&n-d>rc?[Math.abs(h-r)<rc?f:n,r]:Math.abs(d-n)<rc&&m-e>rc?[n,Math.abs(f-n)<rc?h:e]:Math.abs(m-e)<rc&&d-t>rc?[Math.abs(h-e)<rc?f:t,e]:null))-1),++s);s&&(v=!1)}if(v){var g,_,b,w=1/0;for(i=0,v=null;i<y;++i)(a=tc[i])&&(b=(g=(o=a.site)[0]-t)*g+(_=o[1]-e)*_)<w&&(w=b,v=a);if(v){var x=[t,e],k=[t,r],E=[n,r],T=[n,e];v.halfedges.push(nc.push(Ls(o=v.site,x,k))-1,nc.push(Ls(o,k,E))-1,nc.push(Ls(o,E,T))-1,nc.push(Ls(o,T,x))-1)}}for(i=0;i<y;++i)(a=tc[i])&&(a.halfedges.length||delete tc[i])}(o,l,u,s)}this.edges=nc,this.cells=tc,Js=ec=nc=tc=null}oc.prototype={constructor:oc,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return Is(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,l,u,s,c=n.site,f=-1,h=e[i[a-1]],p=h.left===c?h.right:h.left;++f<a;)o=p,p=(h=e[i[f]]).left===c?h.right:h.left,o&&p&&r<o.index&&r<p.index&&(u=o,s=p,((l=c)[0]-s[0])*(u[1]-l[1])-(l[0]-u[0])*(s[1]-l[1])<0)&&t.push([c.data,o.data,p.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,l=a.cells.length;!(i=a.cells[o]);)if(++o>=l)return null;var u=t-i.site[0],s=e-i.site[1],c=u*u+s*s;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],l=r.left;if(l!==i.site&&l||(l=r.right)){var u=t-l[0],s=e-l[1],f=u*u+s*s;f<c&&(c=f,o=l.index)}}))}while(null!==o);return a._found=r,null==n||c<=n*n?i.site:null}};function lc(t,e,n){this.k=t,this.x=e,this.y=n}lc.prototype={constructor:lc,scale:function(t){return 1===t?this:new lc(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new lc(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new lc(1,0,0);lc.prototype;function uc(t,e,n,r,i){const a=t.length;let o=0,l=0;for(let u=0;u<a;u++){const s=t[u],c=e(s),f=n(s),h=i(c);o+=Math.pow(f-h,2),l+=Math.pow(f-r/a,2)}return 1-o/l}function sc(t){return 180*Math.atan2(t[1][1]-t[0][1],t[1][0]-t[0][0])/Math.PI}function cc(t,e,n){const r=.01;let i=[o(t),o(e)],a=0;for(;l(i)&&a<1e4;);return i;function o(t){return[t,n(t)]}function l(t){a++;const e=t.length;let n=!1;for(let a=0;a<e-1;a++){const e=t[a],l=t[a+1],u=[((i=[e,l])[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2],s=o(u[0]),c=sc([e,u]),f=sc([e,s]);Math.abs(c-f)>r&&(t.splice(a+1,0,s),n=!0)}var i;return n}}var fc=function(){let t,e=t=>t[0],n=t=>t[1];function r(r){let i=r.length,a=0,o=0,l=0,u=0,s=0,c=t?+t[0]:1/0,f=t?+t[1]:-1/0;for(let h=0;h<i;h++){const i=r[h],p=e(i,h,r),d=n(i,h,r);null!=p&&isFinite(p)&&null!=d&&isFinite(d)&&(a++,o+=p,l+=d,u+=p*d,s+=p*p,t||(p<c&&(c=p),p>f&&(f=p)))}const h=((i=a)*u-o*l)/(i*s-o*o),p=(l-h*o)/i,d=t=>h*t+p,m=uc(r,e,n,l,d),y=[[c,c*h+p],[f,f*h+p]];return y.a=h,y.b=p,y.predict=d,y.rSquared=m,y}return r.domain=function(e){return arguments.length?(t=e,r):t},r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r};var hc=function(){let t,e=t=>t[0],n=t=>t[1];function r(r){let i=r.length,a=0,o=0,l=0,u=0,s=0,c=0,f=t?+t[0]:1/0,h=t?+t[1]:-1/0;for(let p=0;p<i;p++){const i=r[p],d=e(i,p,r),m=n(i,p,r);null!=d&&isFinite(d)&&null!=m&&isFinite(m)&&(a++,o+=Math.log(d),l+=Math.log(m)*Math.log(d),u+=Math.log(m),s+=Math.pow(Math.log(d),2),c+=m,t||(d<f&&(f=d),d>h&&(h=d)))}const p=((i=a)*l-o*u)/(i*s-Math.pow(o,2)),d=Math.exp((u-p*o)/i),m=t=>d*Math.pow(t,p),y=cc(f,h,m);return y.a=d,y.b=p,y.predict=m,y.rSquared=uc(r,e,n,c,m),y}return r.domain=function(e){return arguments.length?(t=e,r):t},r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r},pc=n(3),dc=n.n(pc),mc=n(5),yc=n.n(mc),vc=n(2),gc=n.n(vc),_c=0,bc=1,wc=function(){var t=Object(r.useRef)(null),e=Object(r.useState)(!0),n=gc()(e,2),a=n[0],o=n[1],l=Object(r.useState)(!0),u=gc()(l,2),s=u[0],c=u[1],f=Object(r.useState)([]),h=gc()(f,2),p=h[0],d=h[1],m=Object(r.useState)(""),y=gc()(m,2),v=y[0],g=y[1],_=Object(r.useState)(""),b=gc()(_,2),w=b[0],x=b[1],k=Object(r.useState)({}),E=gc()(k,2),T=E[0],S=E[1],C=function(){var t=yc()(dc.a.mark((function t(){var e;return dc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("/values");case 2:return t.next=4,t.sent.json();case 4:return e=t.sent,t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),M=function(){var t=yc()(dc.a.mark((function t(){var e;return dc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("/file_prefix");case 2:return t.next=4,t.sent.json();case 4:return e=t.sent,t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),N=function(t){S(t)};Object(r.useEffect)((function(){yc()(dc.a.mark((function e(){var n,r,i,a;return dc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([C(),M()]);case 2:n=e.sent,r=gc()(n,2),i=r[0],a=r[1],d(i),a.file_prefix&&g(a.file_prefix),kc(i,t.current,!0,_c,a.file_prefix||"",N);case 9:case"end":return e.stop()}}),e)})))()}),[]);return i.a.createElement("div",{className:"row"},i.a.createElement("div",{className:0===Object.keys(T).length?"col-12":"col-8"},i.a.createElement("div",{className:"card"},i.a.createElement("div",{className:"card-header"},i.a.createElement("h5",{className:"card-title"},"Churn vs Complexity"),i.a.createElement("h6",{className:"text-muted"},"Click on a point for additional information")),i.a.createElement("div",{className:"card-body"},i.a.createElement("div",{className:"row"},i.a.createElement("div",{className:"col-2 col-lg-3"}),i.a.createElement("div",{className:"col-8 col-lg-6"},i.a.createElement("div",{id:"path-input-group"},i.a.createElement("label",{htmlFor:"path",className:"text-muted"},i.a.createElement("small",null,"Base Path")),i.a.createElement("div",{className:"input-group mb-3"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("span",{className:"input-group-text",id:"path-text"},"./".concat(v||""))),i.a.createElement("input",{type:"text",className:"form-control",placeholder:"","aria-label":"","aria-describedby":"path-text",id:"path",value:w,onChange:function(e){x(e.target.value),kc(p,t.current,a,s,"".concat(v).concat(e.target.value),N)}})))),i.a.createElement("div",{className:"col-2 col-lg-3"})),i.a.createElement("div",{className:"d-flex justify-items-center",id:"canvas-wrapper"},i.a.createElement("div",{id:"canvas",ref:t})),i.a.createElement("div",{className:"mt-3"},i.a.createElement("h6",{className:"text-muted"},i.a.createElement("strong",null,"Regression")),i.a.createElement("form",null,i.a.createElement("div",{className:"form-row"},i.a.createElement("div",{className:"form-group col-3"},i.a.createElement("input",{checked:a,className:"form-check-input",type:"checkbox",id:"regression-check",onChange:function(){o(!a),kc(p,t.current,!a,s,"".concat(v).concat(w),N)}}),i.a.createElement("label",{className:"form-check-label text-muted",htmlFor:"regression-check"},i.a.createElement("small",null,"Display regression"))),i.a.createElement("div",{className:"form-group col-3"},i.a.createElement("label",{htmlFor:"regression-type",className:"text-muted"},i.a.createElement("small",null,"Regression Type")),i.a.createElement("select",{id:"regression-type",className:"form-control",onChange:function(e){c(parseInt(e.currentTarget.value)),kc(p,t.current,a,parseInt(e.currentTarget.value),"".concat(v).concat(w),N)}},i.a.createElement("option",{selected:!0,value:"0"},"Power Law"),i.a.createElement("option",{value:"1"},"Linear"))))))))),Object.keys(T).length>0&&i.a.createElement("div",{className:"col-4"},i.a.createElement("div",{className:"card"},i.a.createElement("div",{className:"card-header"},i.a.createElement("h5",{className:"card-title"},T.file_path),i.a.createElement("h6",{className:"text-muted"},"Additional information"),i.a.createElement("button",{type:"button",className:"close","aria-label":"Close",onClick:function(){S({})}},i.a.createElement("span",{"aria-hidden":"true"},"×"))),i.a.createElement("div",{className:"card-body"},i.a.createElement("h6",{className:"text-muted"},i.a.createElement("strong",null,"Method Teardown")),i.a.createElement("table",{className:"table table-borderless mt-0 method-table"},i.a.createElement("tbody",null,Object.entries(T.details).map((function(t){var e=gc()(t,2),n=e[0],r=e[1];return i.a.createElement("tr",{className:"row",key:n},i.a.createElement("td",{className:"px-3 py-1 col-9 text-truncate"},n),i.a.createElement("td",{className:"px-3 py-1 col-3"},Math.round(100*r)/100))})))),i.a.createElement("h6",{className:"text-muted mt-3"},"Git history (last 10 commits)"),i.a.createElement("table",{className:"table table-borderless mt-0 method-table"},i.a.createElement("tbody",null,T.history.map((function(t){var e=gc()(t,2),n=e[0],r=e[1];return i.a.createElement("tr",{className:"row",key:n},i.a.createElement("td",{className:"px-3 py-1 col-3 text-truncate"},n),i.a.createElement("td",{className:"px-3 py-1 col-8 text-truncate"},r))}))))))))},xc=function(t,e){switch(t){case bc:return"y = ".concat(e.a.toFixed(2)," x + ").concat(e.b.toFixed(2));case _c:default:return"y = ".concat(e.a.toFixed(2)," x ^ ").concat(e.b.toFixed(2))}},kc=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){};e.innerHTML="";var o=600,l=600;t=t.filter((function(t){return t.file_path.startsWith(i)}));var u={top:20,right:30,bottom:30,left:40},s=Bo().domain(h(t.filter((function(t){return t.y>0})),(function(t){return t.x*t.y}))).range(["green","red"]),c=zo().domain(h(t,(function(t){return t.x}))).nice().range([u.left,o-u.right]),f=zo().domain(h(t,(function(t){return t.y}))).nice().range([l-u.bottom,u.top]),p=function(t){return t.attr("transform","translate(0,".concat(l-u.bottom,")")).call(U(c)).call((function(t){return t.select(".domain").remove()})).call((function(t){return t.append("text").attr("x",o/2+u.left).attr("y",30).attr("fill","#000").attr("font-size",12).attr("font-weight","bold").attr("text-anchor","end").text("Churn")}))},d=function(t){return t.attr("transform","translate(".concat(u.left,",0)")).call(R(f)).call((function(t){return t.select(".domain").remove()})).call((function(t){return t.append("text").attr("y",-30).attr("x",-l/2).attr("transform","rotate(-90)").attr("fill","#000").attr("font-size",12).attr("text-anchor","start").attr("font-weight","bold").text("Complexity")}))},m=Zu().x((function(t){return c(t[0])})).y((function(t){return f(t[1])})),y=ee(e).append("svg").attr("viewBox",[0,0,o,l]),v=y.append("g");if(v.append("g").attr("class","axis").call(p).selectAll(".tick line").classed("baseline",(function(t){return 0===t})),v.append("g").attr("class","axis").call(d).selectAll(".tick line").classed("baseline",(function(t){return 0===t})),v.append("g").attr("stroke-width",1.5).attr("font-family","Red Hat Text").attr("font-size",12).selectAll("g").data(t).join("g").attr("transform",(function(t){return"translate(".concat(c(t.x),",").concat(f(t.y),")")})).call((function(t){return t.append("circle").attr("fill",(function(t){return s(t.x*t.y)})).attr("stroke",(function(t){return s(t.x*t.y)})).attr("r",4)})).call((function(t){return t.append("text").attr("dy","0.35em").attr("x",7).attr("style","cursor:pointer").text((function(t){return t.file_path}))})).on("click",(function(t){a(t)})),n){var g=function(e){switch(e){case bc:return fc().x((function(t){return t.x})).y((function(t){return t.y})).domain([0,b(t,(function(t){return t.x}))]);case _c:default:return t=t.filter((function(t){return t.y>0})),hc().x((function(t){return t.x})).y((function(t){return t.y})).domain([0,b(t,(function(t){return t.x}))])}}(r),_=g(t);v.append("g").attr("font-family","Red Hat Text").attr("font-size",24).call((function(e){return e.append("path").attr("class","regression").datum(g(t)).attr("d",m)})).call((function(t){return t.append("text").attr("dy","60").attr("dx","33%").text("R^2 = ".concat(_.rSquared.toFixed(2)))})).call((function(t){return t.append("text").attr("dy","30").attr("dx","33%").text(xc(r,_))}))}},Ec=n(9),Tc=n(1),Sc=n.n(Tc);function Cc(t){return(Cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Mc(t,e,n[e])}))}return t}function Pc(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Oc(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function Ac(t){return e=t,(e-=0)==e?t:(t=t.replace(/[\-_\s]+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))).substr(0,1).toLowerCase()+t.substr(1);var e}var Lc=!1;try{Lc=!0}catch(t){}function zc(t){return null===t?null:"object"===Cc(t)&&t.prefix&&t.iconName?t:Array.isArray(t)&&2===t.length?{prefix:t[0],iconName:t[1]}:"string"==typeof t?{prefix:"fas",iconName:t}:void 0}function Uc(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?Mc({},t,e):{}}function Rc(t){var e=t.icon,n=t.mask,r=t.symbol,i=t.className,a=t.title,o=zc(e),l=Uc("classes",[].concat(Oc(function(t){var e,n=t.spin,r=t.pulse,i=t.fixedWidth,a=t.inverse,o=t.border,l=t.listItem,u=t.flip,s=t.size,c=t.rotation,f=t.pull,h=(Mc(e={"fa-spin":n,"fa-pulse":r,"fa-fw":i,"fa-inverse":a,"fa-border":o,"fa-li":l,"fa-flip-horizontal":"horizontal"===u||"both"===u,"fa-flip-vertical":"vertical"===u||"both"===u},"fa-".concat(s),void 0!==s),Mc(e,"fa-rotate-".concat(c),void 0!==c),Mc(e,"fa-pull-".concat(f),void 0!==f),Mc(e,"fa-swap-opacity",t.swapOpacity),e);return Object.keys(h).map((function(t){return h[t]?t:null})).filter((function(t){return t}))}(t)),Oc(i.split(" ")))),u=Uc("transform","string"==typeof t.transform?Ec.b.transform(t.transform):t.transform),s=Uc("mask",zc(n)),c=Object(Ec.a)(o,Nc({},l,u,s,{symbol:r,title:a}));if(!c)return function(){var t;!Lc&&console&&"function"==typeof console.error&&(t=console).error.apply(t,arguments)}("Could not find icon",o),null;var f=c.abstract,h={};return Object.keys(t).forEach((function(e){Rc.defaultProps.hasOwnProperty(e)||(h[e]=t[e])})),Fc(f[0],h)}Rc.displayName="FontAwesomeIcon",Rc.propTypes={border:Sc.a.bool,className:Sc.a.string,mask:Sc.a.oneOfType([Sc.a.object,Sc.a.array,Sc.a.string]),fixedWidth:Sc.a.bool,inverse:Sc.a.bool,flip:Sc.a.oneOf(["horizontal","vertical","both"]),icon:Sc.a.oneOfType([Sc.a.object,Sc.a.array,Sc.a.string]),listItem:Sc.a.bool,pull:Sc.a.oneOf(["right","left"]),pulse:Sc.a.bool,rotation:Sc.a.oneOf([90,180,270]),size:Sc.a.oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:Sc.a.bool,symbol:Sc.a.oneOfType([Sc.a.bool,Sc.a.string]),title:Sc.a.string,transform:Sc.a.oneOfType([Sc.a.string,Sc.a.object]),swapOpacity:Sc.a.bool},Rc.defaultProps={border:!1,className:"",mask:null,fixedWidth:!1,inverse:!1,flip:null,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,symbol:!1,title:"",transform:null,swapOpacity:!1};var Fc=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var i=(n.children||[]).map((function(n){return t(e,n)})),a=Object.keys(n.attributes||{}).reduce((function(t,e){var r=n.attributes[e];switch(e){case"class":t.attrs.className=r,delete n.attributes.class;break;case"style":t.attrs.style=function(t){return t.split(";").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var n,r=e.indexOf(":"),i=Ac(e.slice(0,r)),a=e.slice(r+1).trim();return i.startsWith("webkit")?t[(n=i,n.charAt(0).toUpperCase()+n.slice(1))]=a:t[i]=a,t}),{})}(r);break;default:0===e.indexOf("aria-")||0===e.indexOf("data-")?t.attrs[e.toLowerCase()]=r:t.attrs[Ac(e)]=r}return t}),{attrs:{}}),o=r.style,l=void 0===o?{}:o,u=Pc(r,["style"]);return a.attrs.style=Nc({},a.attrs.style,l),e.apply(void 0,[n.tag,Nc({},a.attrs,u)].concat(Oc(i)))}.bind(null,i.a.createElement),Ic={prefix:"fas",iconName:"arrow-right",icon:[448,512,[],"f061","M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"]};function Dc(){var t=Object(r.useState)(95),e=gc()(t,2),n=e[0],a=e[1],o=Object(r.useState)([]),l=gc()(o,2),u=l[0],s=l[1],c=function(){var t=yc()(dc.a.mark((function t(e){var n;return dc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("/suggestions?t=".concat(e));case 2:return t.next=4,t.sent.json();case 4:n=t.sent,s(n);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){c(n)}),[]),i.a.createElement("div",{className:"card"},i.a.createElement("div",{className:"card-body"},i.a.createElement("div",{className:"d-flex justify-content-between"},i.a.createElement("div",null,i.a.createElement("h5",{className:"card-title"},"Refactoring Candidates"),i.a.createElement("h6",{className:"card-subtitle text-muted"},"Top 95 Percentile of Churn * Complexity")),i.a.createElement("div",{id:"percentile-input-group"},i.a.createElement("label",{htmlFor:"percentile",className:"text-muted"},i.a.createElement("small",null,"Percentile")),i.a.createElement("div",{className:"input-group align-items-start"},i.a.createElement("input",{type:"text",className:"form-control",placeholder:"","aria-label":"","aria-describedby":"percentile-button",id:"percentile",value:n,onChange:function(t){return a(t.target.value)}}),i.a.createElement("div",{className:"input-group-append"},i.a.createElement("button",{className:"btn btn-dark",type:"button",id:"percentile-button",onClick:function(t){t.preventDefault(),c(n)}},i.a.createElement(Rc,{icon:Ic})))))),i.a.createElement("table",{className:"table mt-4"},i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",{scope:"col"},"File Path"),i.a.createElement("th",{scope:"col"},"Churn"),i.a.createElement("th",{scope:"col"},"Complexity"),i.a.createElement("th",{scope:"col"},"Churn * Complexity"))),i.a.createElement("tbody",{id:"suggestions-table"},u.map((function(t){return i.a.createElement("tr",{key:t.file_path},i.a.createElement("td",null,t.file_path),i.a.createElement("td",null,t.x),i.a.createElement("td",null,Math.round(t.y)),i.a.createElement("td",null,Math.round(t.x*t.y)))}))))))}document.addEventListener("DOMContentLoaded",(function(){document.getElementById("react-graph")&&(o.a.render(i.a.createElement(wc,null),document.getElementById("react-graph")),o.a.render(i.a.createElement(Dc,null),document.getElementById("react-suggestions")))})),window.chart=kc}]); + */var r,i,a,o,l;if(Object.defineProperty(e,"__esModule",{value:!0}),"undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,s=null,c=function(){if(null!==u)try{var t=e.unstable_now();u(!0,t),u=null}catch(t){throw setTimeout(c,0),t}},f=Date.now();e.unstable_now=function(){return Date.now()-f},r=function(t){null!==u?setTimeout(r,0,t):(u=t,setTimeout(c,0))},i=function(t,e){s=setTimeout(t,e)},a=function(){clearTimeout(s)},o=function(){return!1},l=e.unstable_forceFrameRate=function(){}}else{var h=window.performance,p=window.Date,d=window.setTimeout,m=window.clearTimeout,y=window.requestAnimationFrame,v=window.cancelAnimationFrame;if("undefined"!=typeof console&&("function"!=typeof y&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),"object"==typeof h&&"function"==typeof h.now)e.unstable_now=function(){return h.now()};else{var g=p.now();e.unstable_now=function(){return p.now()-g}}var _=!1,b=null,w=-1,x=5,k=0;o=function(){return e.unstable_now()>=k},l=function(){},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):x=0<t?Math.floor(1e3/t):33.33};var E=new MessageChannel,T=E.port2;E.port1.onmessage=function(){if(null!==b){var t=e.unstable_now();k=t+x;try{b(!0,t)?T.postMessage(null):(_=!1,b=null)}catch(t){throw T.postMessage(null),t}}else _=!1},r=function(t){b=t,_||(_=!0,T.postMessage(null))},i=function(t,n){w=d((function(){t(e.unstable_now())}),n)},a=function(){m(w),w=-1}}function S(t,e){var n=t.length;t.push(e);t:for(;;){var r=Math.floor((n-1)/2),i=t[r];if(!(void 0!==i&&0<N(i,e)))break t;t[r]=e,t[n]=i,n=r}}function C(t){return void 0===(t=t[0])?null:t}function M(t){var e=t[0];if(void 0!==e){var n=t.pop();if(n!==e){t[0]=n;t:for(var r=0,i=t.length;r<i;){var a=2*(r+1)-1,o=t[a],l=a+1,u=t[l];if(void 0!==o&&0>N(o,n))void 0!==u&&0>N(u,o)?(t[r]=u,t[l]=n,r=l):(t[r]=o,t[a]=n,r=a);else{if(!(void 0!==u&&0>N(u,n)))break t;t[r]=u,t[l]=n,r=l}}}return e}return null}function N(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}var P=[],O=[],A=1,L=null,z=3,U=!1,R=!1,F=!1;function I(t){for(var e=C(O);null!==e;){if(null===e.callback)M(O);else{if(!(e.startTime<=t))break;M(O),e.sortIndex=e.expirationTime,S(P,e)}e=C(O)}}function D(t){if(F=!1,I(t),!R)if(null!==C(P))R=!0,r(j);else{var e=C(O);null!==e&&i(D,e.startTime-t)}}function j(t,n){R=!1,F&&(F=!1,a()),U=!0;var r=z;try{for(I(n),L=C(P);null!==L&&(!(L.expirationTime>n)||t&&!o());){var l=L.callback;if(null!==l){L.callback=null,z=L.priorityLevel;var u=l(L.expirationTime<=n);n=e.unstable_now(),"function"==typeof u?L.callback=u:L===C(P)&&M(P),I(n)}else M(P);L=C(P)}if(null!==L)var s=!0;else{var c=C(O);null!==c&&i(D,c.startTime-n),s=!1}return s}finally{L=null,z=r,U=!1}}function H(t){switch(t){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var W=l;e.unstable_ImmediatePriority=1,e.unstable_UserBlockingPriority=2,e.unstable_NormalPriority=3,e.unstable_IdlePriority=5,e.unstable_LowPriority=4,e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=z;z=t;try{return e()}finally{z=n}},e.unstable_next=function(t){switch(z){case 1:case 2:case 3:var e=3;break;default:e=z}var n=z;z=e;try{return t()}finally{z=n}},e.unstable_scheduleCallback=function(t,n,o){var l=e.unstable_now();if("object"==typeof o&&null!==o){var u=o.delay;u="number"==typeof u&&0<u?l+u:l,o="number"==typeof o.timeout?o.timeout:H(t)}else o=H(t),u=l;return t={id:A++,callback:n,priorityLevel:t,startTime:u,expirationTime:o=u+o,sortIndex:-1},u>l?(t.sortIndex=u,S(O,t),null===C(P)&&t===C(O)&&(F?a():F=!0,i(D,u-l))):(t.sortIndex=o,S(P,t),R||U||(R=!0,r(j))),t},e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_wrapCallback=function(t){var e=z;return function(){var n=z;z=e;try{return t.apply(this,arguments)}finally{z=n}}},e.unstable_getCurrentPriorityLevel=function(){return z},e.unstable_shouldYield=function(){var t=e.unstable_now();I(t);var n=C(P);return n!==L&&null!==L&&null!==n&&null!==n.callback&&n.startTime<=t&&n.expirationTime<L.expirationTime||o()},e.unstable_requestPaint=W,e.unstable_continueExecution=function(){R||U||(R=!0,r(j))},e.unstable_pauseExecution=function(){},e.unstable_getFirstCallbackNode=function(){return C(P)},e.unstable_Profiling=null},function(t,e,n){var r=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),o=new C(r||[]);return a._invoke=function(t,e,n){var r=c;return function(i,a){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw a;return N()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var l=E(o,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===c)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var u=s(t,e,n);if("normal"===u.type){if(r=n.done?p:f,u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(t,n,o),a}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var c="suspendedStart",f="suspendedYield",h="executing",p="completed",d={};function m(){}function y(){}function v(){}var g={};g[a]=function(){return this};var _=Object.getPrototypeOf,b=_&&_(_(M([])));b&&b!==n&&r.call(b,a)&&(g=b);var w=v.prototype=m.prototype=Object.create(g);function x(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function k(t){var e;this._invoke=function(n,i){function a(){return new Promise((function(e,a){!function e(n,i,a,o){var l=s(t[n],t,i);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?Promise.resolve(c.__await).then((function(t){e("next",t,a,o)}),(function(t){e("throw",t,a,o)})):Promise.resolve(c).then((function(t){u.value=t,a(u)}),(function(t){return e("throw",t,a,o)}))}o(l.arg)}(n,i,e,a)}))}return e=e?e.then(a,a):a()}}function E(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=s(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function M(t){if(t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:N}}function N(){return{value:e,done:!0}}return y.prototype=w.constructor=v,v.constructor=y,v[l]=y.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l in t||(t[l]="GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},x(k.prototype),k.prototype[o]=function(){return this},t.AsyncIterator=k,t.async=function(e,n,r,i){var a=new k(u(e,n,r,i));return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(w),w[l]="Generator",w[a]=function(){return this},w.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=M,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return l.type="throw",l.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(u&&s){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,i=!1,a=void 0;try{for(var o,l=t[Symbol.iterator]();!(r=(o=l.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,a=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw a}}return n}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new a(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new a(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(21),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(7))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,a,o,l,u=1,s={},c=!1,f=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){d(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((a=new MessageChannel).port1.onmessage=function(t){d(t.data)},r=function(t){a.port2.postMessage(t)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(t){var e=f.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(d,0,t)}:(o="setImmediate$"+Math.random()+"$",l=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(o)&&d(+e.data.slice(o.length))},t.addEventListener?t.addEventListener("message",l,!1):t.attachEvent("onmessage",l),r=function(e){t.postMessage(o+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return s[u]=i,r(u),u++},h.clearImmediate=p}function p(t){delete s[t]}function d(t){if(c)setTimeout(d,0,t);else{var e=s[t];if(e){c=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(n,r)}}(e)}finally{p(t),c=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(7),n(22))},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var u,s=[],c=!1,f=-1;function h(){c&&u&&(c=!1,u.length?s=u.concat(s):f=-1,s.length&&p())}function p(){if(!c){var t=l(h);c=!0;for(var e=s.length;e;){for(u=s,s=[];++f<e;)u&&u[f].run();f=-1,e=s.length}u=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new d(t,e)),1!==s.length||c||l(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";var r=n(24);function i(){}function a(){}a.resetWarningCache=i,t.exports=function(){function t(t,e,n,i,a,o){if(o!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),a=n(8),o=n.n(a),l=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},u=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return l(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}};var s=u(l),c=s.right,f=(s.left,c);var h=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},p=Array.prototype,d=(p.slice,p.map,Math.sqrt(50)),m=Math.sqrt(10),y=Math.sqrt(2),v=function(t,e,n){var r,i,a,o,l=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=g(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++l<i;)a[l]=(t+l)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++l<i;)a[l]=(t-l)/o;return r&&a.reverse(),a};function g(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=d?10:a>=m?5:a>=y?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=d?10:a>=m?5:a>=y?2:1)}function _(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=d?i*=10:a>=m?i*=5:a>=y&&(i*=2),e<t?-i:i}var b=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r},w=function(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n};var x=Array.prototype.slice,k=function(t){return t},E=1,T=2,S=3,C=4,M=1e-6;function N(t){return"translate("+(t+.5)+",0)"}function P(t){return"translate(0,"+(t+.5)+")"}function O(t){return function(e){return+t(e)}}function A(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function L(){return!this.__axis}function z(t,e){var n=[],r=null,i=null,a=6,o=6,l=3,u=t===E||t===C?-1:1,s=t===C||t===T?"x":"y",c=t===E||t===S?N:P;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):k:i,d=Math.max(a,0)+l,m=e.range(),y=+m[0]+.5,v=+m[m.length-1]+.5,g=(e.bandwidth?A:O)(e.copy()),_=f.selection?f.selection():f,b=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(h,e).order(),x=w.exit(),N=w.enter().append("g").attr("class","tick"),P=w.select("line"),z=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(N),P=P.merge(N.append("line").attr("stroke","currentColor").attr(s+"2",u*a)),z=z.merge(N.append("text").attr("fill","currentColor").attr(s,u*d).attr("dy",t===E?"0em":t===S?"0.71em":"0.32em")),f!==_&&(b=b.transition(f),w=w.transition(f),P=P.transition(f),z=z.transition(f),x=x.transition(f).attr("opacity",M).attr("transform",(function(t){return isFinite(t=g(t))?c(t):this.getAttribute("transform")})),N.attr("opacity",M).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:g(t))}))),x.remove(),b.attr("d",t===C||t==T?o?"M"+u*o+","+y+"H0.5V"+v+"H"+u*o:"M0.5,"+y+"V"+v:o?"M"+y+","+u*o+"V0.5H"+v+"V"+u*o:"M"+y+",0.5H"+v),w.attr("opacity",1).attr("transform",(function(t){return c(g(t))})),P.attr(s+"2",u*a),z.attr(s,u*d).text(p),_.filter(L).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===T?"start":t===C?"end":"middle"),_.each((function(){this.__axis=g}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=x.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:x.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:x.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(l=+t,f):l},f}function U(t){return z(S,t)}function R(t){return z(C,t)}var F={value:function(){}};function I(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new D(r)}function D(t){this._=t}function j(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function H(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function W(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=F,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}D.prototype=I.prototype={constructor:D,on:function(t,e){var n,r=this._,i=j(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=W(r[n],t.name,e);else if(null==e)for(n in r)r[n]=W(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=H(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new D(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var B=I,V="http://www.w3.org/1999/xhtml",Y={svg:"http://www.w3.org/2000/svg",xhtml:V,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},q=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Y.hasOwnProperty(e)?{space:Y[e],local:t}:t};function $(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===V&&e.documentElement.namespaceURI===V?e.createElement(t):e.createElementNS(n,t)}}function Q(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var X=function(t){var e=q(t);return(e.local?Q:$)(e)};function K(){}var Z=function(t){return null==t?K:function(){return this.querySelector(t)}};function G(){return[]}var J=function(t){return null==t?G:function(){return this.querySelectorAll(t)}},tt=function(t){return function(){return this.matches(t)}},et=function(t){return new Array(t.length)};function nt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}nt.prototype={constructor:nt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var rt="$";function it(t,e,n,r,i,a){for(var o,l=0,u=e.length,s=a.length;l<s;++l)(o=e[l])?(o.__data__=a[l],r[l]=o):n[l]=new nt(t,a[l]);for(;l<u;++l)(o=e[l])&&(i[l]=o)}function at(t,e,n,r,i,a,o){var l,u,s,c={},f=e.length,h=a.length,p=new Array(f);for(l=0;l<f;++l)(u=e[l])&&(p[l]=s=rt+o.call(u,u.__data__,l,e),s in c?i[l]=u:c[s]=u);for(l=0;l<h;++l)(u=c[s=rt+o.call(t,a[l],l,a)])?(r[l]=u,u.__data__=a[l],c[s]=null):n[l]=new nt(t,a[l]);for(l=0;l<f;++l)(u=e[l])&&c[p[l]]===u&&(i[l]=u)}function ot(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function lt(t){return function(){this.removeAttribute(t)}}function ut(t){return function(){this.removeAttributeNS(t.space,t.local)}}function st(t,e){return function(){this.setAttribute(t,e)}}function ct(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ft(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ht(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var pt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function dt(t){return function(){this.style.removeProperty(t)}}function mt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function yt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function vt(t,e){return t.style.getPropertyValue(e)||pt(t).getComputedStyle(t,null).getPropertyValue(e)}function gt(t){return function(){delete this[t]}}function _t(t,e){return function(){this[t]=e}}function bt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function wt(t){return t.trim().split(/^|\s+/)}function xt(t){return t.classList||new kt(t)}function kt(t){this._node=t,this._names=wt(t.getAttribute("class")||"")}function Et(t,e){for(var n=xt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Tt(t,e){for(var n=xt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function St(t){return function(){Et(this,t)}}function Ct(t){return function(){Tt(this,t)}}function Mt(t,e){return function(){(e.apply(this,arguments)?Et:Tt)(this,t)}}kt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Nt(){this.textContent=""}function Pt(t){return function(){this.textContent=t}}function Ot(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function At(){this.innerHTML=""}function Lt(t){return function(){this.innerHTML=t}}function zt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Ut(){this.nextSibling&&this.parentNode.appendChild(this)}function Rt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ft(){return null}function It(){var t=this.parentNode;t&&t.removeChild(this)}function Dt(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function jt(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var Ht={},Wt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Ht={mouseenter:"mouseover",mouseleave:"mouseout"}));function Bt(t,e,n){return t=Vt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Vt(t,e,n){return function(r){var i=Wt;Wt=r;try{t.call(this,this.__data__,e,n)}finally{Wt=i}}}function Yt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function qt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function $t(t,e,n){var r=Ht.hasOwnProperty(t.type)?Bt:Vt;return function(i,a,o){var l,u=this.__on,s=r(e,a,o);if(u)for(var c=0,f=u.length;c<f;++c)if((l=u[c]).type===t.type&&l.name===t.name)return this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=s,l.capture=n),void(l.value=e);this.addEventListener(t.type,s,n),l={type:t.type,name:t.name,value:e,listener:s,capture:n},u?u.push(l):this.__on=[l]}}function Qt(t,e,n){var r=pt(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Xt(t,e){return function(){return Qt(this,t,e)}}function Kt(t,e){return function(){return Qt(this,t,e.apply(this,arguments))}}var Zt=[null];function Gt(t,e){this._groups=t,this._parents=e}function Jt(){return new Gt([[document.documentElement]],Zt)}Gt.prototype=Jt.prototype={constructor:Gt,select:function(t){"function"!=typeof t&&(t=Z(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,l=e[i],u=l.length,s=r[i]=new Array(u),c=0;c<u;++c)(a=l[c])&&(o=t.call(a,a.__data__,c,l))&&("__data__"in a&&(o.__data__=a.__data__),s[c]=o);return new Gt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=J(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,l=e[a],u=l.length,s=0;s<u;++s)(o=l[s])&&(r.push(t.call(o,o.__data__,s,l)),i.push(o));return new Gt(r,i)},filter:function(t){"function"!=typeof t&&(t=tt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],l=o.length,u=r[i]=[],s=0;s<l;++s)(a=o[s])&&t.call(a,a.__data__,s,o)&&u.push(a);return new Gt(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var n,r=e?at:it,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,l=new Array(o),u=new Array(o),s=new Array(o),c=0;c<o;++c){var f=i[c],h=a[c],p=h.length,d=t.call(f,f&&f.__data__,c,i),m=d.length,y=u[c]=new Array(m),v=l[c]=new Array(m);r(f,h,y,v,s[c]=new Array(p),d,e);for(var g,_,b=0,w=0;b<m;++b)if(g=y[b]){for(b>=w&&(w=b+1);!(_=v[w])&&++w<m;);g._next=_||null}}return(l=new Gt(l,i))._enter=u,l._exit=s,l},enter:function(){return new Gt(this._enter||this._groups.map(et),this._parents)},exit:function(){return new Gt(this._exit||this._groups.map(et),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var u,s=e[l],c=n[l],f=s.length,h=o[l]=new Array(f),p=0;p<f;++p)(u=s[p]||c[p])&&(h[p]=u);for(;l<r;++l)o[l]=e[l];return new Gt(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ot);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,l=n[a],u=l.length,s=i[a]=new Array(u),c=0;c<u;++c)(o=l[c])&&(s[c]=o);s.sort(e)}return new Gt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,l=a.length;o<l;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=q(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?ut:lt:"function"==typeof e?n.local?ht:ft:n.local?ct:st)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?dt:"function"==typeof e?yt:mt)(t,e,null==n?"":n)):vt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?gt:"function"==typeof e?bt:_t)(t,e)):this.node()[t]},classed:function(t,e){var n=wt(t+"");if(arguments.length<2){for(var r=xt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Mt:e?St:Ct)(n,e))},text:function(t){return arguments.length?this.each(null==t?Nt:("function"==typeof t?Ot:Pt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?At:("function"==typeof t?zt:Lt)(t)):this.node().innerHTML},raise:function(){return this.each(Ut)},lower:function(){return this.each(Rt)},append:function(t){var e="function"==typeof t?t:X(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:X(t),r=null==e?Ft:"function"==typeof e?e:Z(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(It)},clone:function(t){return this.select(t?jt:Dt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Yt(t+""),o=a.length;if(!(arguments.length<2)){for(l=e?$t:qt,null==n&&(n=!1),r=0;r<o;++r)this.each(l(a[r],e,n));return this}var l=this.node().__on;if(l)for(var u,s=0,c=l.length;s<c;++s)for(r=0,u=l[s];r<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?Kt:Xt)(t,e))}};var te=Jt,ee=function(t){return"string"==typeof t?new Gt([[document.querySelector(t)]],[document.documentElement]):new Gt([[t]],Zt)},ne=0;function re(){this._="@"+(++ne).toString(36)}re.prototype=function(){return new re}.prototype={constructor:re,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};function ie(t,e,n,r,i,a,o,l,u,s){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=l,this.dy=u,this._=s}ie.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var ae=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function oe(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function le(){}var ue="\\s*([+-]?\\d+)\\s*",se="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ce="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fe=/^#([0-9a-f]{3,8})$/,he=new RegExp("^rgb\\("+[ue,ue,ue]+"\\)$"),pe=new RegExp("^rgb\\("+[ce,ce,ce]+"\\)$"),de=new RegExp("^rgba\\("+[ue,ue,ue,se]+"\\)$"),me=new RegExp("^rgba\\("+[ce,ce,ce,se]+"\\)$"),ye=new RegExp("^hsl\\("+[se,ce,ce]+"\\)$"),ve=new RegExp("^hsla\\("+[se,ce,ce,se]+"\\)$"),ge={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function _e(){return this.rgb().formatHex()}function be(){return this.rgb().formatRgb()}function we(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=fe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?xe(e):3===n?new Se(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Se(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Se(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=he.exec(t))?new Se(e[1],e[2],e[3],1):(e=pe.exec(t))?new Se(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=de.exec(t))?ke(e[1],e[2],e[3],e[4]):(e=me.exec(t))?ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ye.exec(t))?Pe(e[1],e[2]/100,e[3]/100,1):(e=ve.exec(t))?Pe(e[1],e[2]/100,e[3]/100,e[4]):ge.hasOwnProperty(t)?xe(ge[t]):"transparent"===t?new Se(NaN,NaN,NaN,0):null}function xe(t){return new Se(t>>16&255,t>>8&255,255&t,1)}function ke(t,e,n,r){return r<=0&&(t=e=n=NaN),new Se(t,e,n,r)}function Ee(t){return t instanceof le||(t=we(t)),t?new Se((t=t.rgb()).r,t.g,t.b,t.opacity):new Se}function Te(t,e,n,r){return 1===arguments.length?Ee(t):new Se(t,e,n,null==r?1:r)}function Se(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ce(){return"#"+Ne(this.r)+Ne(this.g)+Ne(this.b)}function Me(){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 Ne(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Pe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Le(t,e,n,r)}function Oe(t){if(t instanceof Le)return new Le(t.h,t.s,t.l,t.opacity);if(t instanceof le||(t=we(t)),!t)return new Le;if(t instanceof Le)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,l=a-i,u=(a+i)/2;return l?(o=e===a?(n-r)/l+6*(n<r):n===a?(r-e)/l+2:(e-n)/l+4,l/=u<.5?a+i:2-a-i,o*=60):l=u>0&&u<1?0:o,new Le(o,l,u,t.opacity)}function Ae(t,e,n,r){return 1===arguments.length?Oe(t):new Le(t,e,n,null==r?1:r)}function Le(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ze(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Ue(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}ae(le,we,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:_e,formatHex:_e,formatHsl:function(){return Oe(this).formatHsl()},formatRgb:be,toString:be}),ae(Se,Te,oe(le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Se(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Se(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:Ce,formatHex:Ce,formatRgb:Me,toString:Me})),ae(Le,Ae,oe(le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Le(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Le(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Se(ze(t>=240?t-240:t+120,i,r),ze(t,i,r),ze(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 Re=function(t){return function(){return t}};function Fe(t,e){return function(n){return t+n*e}}function Ie(t,e){var n=e-t;return n?Fe(t,n>180||n<-180?n-360*Math.round(n/360):n):Re(isNaN(t)?e:t)}function De(t){return 1==(t=+t)?je:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Re(isNaN(e)?n:e)}}function je(t,e){var n=e-t;return n?Fe(t,n):Re(isNaN(t)?e:t)}var He=function t(e){var n=De(e);function r(t,e){var r=n((t=Te(t)).r,(e=Te(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=je(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function We(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),l=new Array(i);for(n=0;n<i;++n)r=Te(e[n]),a[n]=r.r||0,o[n]=r.g||0,l[n]=r.b||0;return a=t(a),o=t(o),l=t(l),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=l(t),r+""}}}We((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,l=r<e-1?t[r+2]:2*a-i;return Ue((n-r/e)*e,o,i,a,l)}})),We((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],l=t[(r+2)%e];return Ue((n-r/e)*e,i,a,o,l)}}));var Be=function(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=tn(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}},Ve=function(t,e){var n=new Date;return e-=t=+t,function(r){return n.setTime(t+e*r),n}},Ye=function(t,e){return e-=t=+t,function(n){return t+e*n}},qe=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=tn(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},$e=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qe=new RegExp($e.source,"g");var Xe,Ke,Ze,Ge,Je=function(t,e){var n,r,i,a=$e.lastIndex=Qe.lastIndex=0,o=-1,l=[],u=[];for(t+="",e+="";(n=$e.exec(t))&&(r=Qe.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),l[o]?l[o]+=i:l[++o]=i),(n=n[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,u.push({i:o,x:Ye(n,r)})),a=Qe.lastIndex;return a<e.length&&(i=e.slice(a),l[o]?l[o]+=i:l[++o]=i),l.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)l[(n=u[r]).i]=n.x(t);return l.join("")})},tn=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?Re(e):("number"===r?Ye:"string"===r?(n=we(e))?(e=n,He):Je:e instanceof we?He:e instanceof Date?Ve:Array.isArray(e)?Be:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?qe:Ye)(t,e)},en=function(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}},nn=180/Math.PI,rn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},an=function(t,e,n,r,i,a){var o,l,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,u/=l),t*r<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*nn,skewX:Math.atan(u)*nn,scaleX:o,scaleY:l}};function on(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var l=[],u=[];return a=t(a),o=t(o),function(t,r,i,a,o,l){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);l.push({i:u-4,x:Ye(t,i)},{i:u-2,x:Ye(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,l,u),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Ye(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,l,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Ye(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,l,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var l=a.push(i(a)+"scale(",null,",",null,")");o.push({i:l-4,x:Ye(t,n)},{i:l-2,x:Ye(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,l,u),a=o=null,function(t){for(var e,n=-1,r=u.length;++n<r;)l[(e=u[n]).i]=e.x(t);return l.join("")}}}var ln=on((function(t){return"none"===t?rn:(Xe||(Xe=document.createElement("DIV"),Ke=document.documentElement,Ze=document.defaultView),Xe.style.transform=t,t=Ze.getComputedStyle(Ke.appendChild(Xe),null).getPropertyValue("transform"),Ke.removeChild(Xe),t=t.slice(7,-1).split(","),an(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),un=on((function(t){return null==t?rn:(Ge||(Ge=document.createElementNS("http://www.w3.org/2000/svg","g")),Ge.setAttribute("transform",t),(t=Ge.transform.baseVal.consolidate())?(t=t.matrix,an(t.a,t.b,t.c,t.d,t.e,t.f)):rn)}),", ",")",")");Math.SQRT2;function sn(t){return function(e,n){var r=t((e=Ae(e)).h,(n=Ae(n)).h),i=je(e.s,n.s),a=je(e.l,n.l),o=je(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}sn(Ie),sn(je);var cn=Math.PI/180,fn=180/Math.PI,hn=.96422,pn=1,dn=.82521,mn=4/29,yn=6/29,vn=3*yn*yn,gn=yn*yn*yn;function _n(t){if(t instanceof wn)return new wn(t.l,t.a,t.b,t.opacity);if(t instanceof Mn)return Nn(t);t instanceof Se||(t=Ee(t));var e,n,r=Tn(t.r),i=Tn(t.g),a=Tn(t.b),o=xn((.2225045*r+.7168786*i+.0606169*a)/pn);return r===i&&i===a?e=n=o:(e=xn((.4360747*r+.3850649*i+.1430804*a)/hn),n=xn((.0139322*r+.0971045*i+.7141733*a)/dn)),new wn(116*o-16,500*(e-o),200*(o-n),t.opacity)}function bn(t,e,n,r){return 1===arguments.length?_n(t):new wn(t,e,n,null==r?1:r)}function wn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function xn(t){return t>gn?Math.pow(t,1/3):t/vn+mn}function kn(t){return t>yn?t*t*t:vn*(t-mn)}function En(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Tn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Sn(t){if(t instanceof Mn)return new Mn(t.h,t.c,t.l,t.opacity);if(t instanceof wn||(t=_n(t)),0===t.a&&0===t.b)return new Mn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*fn;return new Mn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Cn(t,e,n,r){return 1===arguments.length?Sn(t):new Mn(t,e,n,null==r?1:r)}function Mn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Nn(t){if(isNaN(t.h))return new wn(t.l,0,0,t.opacity);var e=t.h*cn;return new wn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function Pn(t){return function(e,n){var r=t((e=Cn(e)).h,(n=Cn(n)).h),i=je(e.c,n.c),a=je(e.l,n.l),o=je(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}ae(wn,bn,oe(le,{brighter:function(t){return new wn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new wn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Se(En(3.1338561*(e=hn*kn(e))-1.6168667*(t=pn*kn(t))-.4906146*(n=dn*kn(n))),En(-.9787684*e+1.9161415*t+.033454*n),En(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),ae(Mn,Cn,oe(le,{brighter:function(t){return new Mn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Mn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Nn(this).rgb()}}));Pn(Ie),Pn(je);var On=-.29227,An=-.90649,Ln=1.97294,zn=Ln*An,Un=1.78277*Ln,Rn=1.78277*On- -.14861*An;function Fn(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof In)return new In(t.h,t.s,t.l,t.opacity);t instanceof Se||(t=Ee(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Rn*r+zn*e-Un*n)/(Rn+zn-Un),a=r-i,o=(Ln*(n-i)-On*a)/An,l=Math.sqrt(o*o+a*a)/(Ln*i*(1-i)),u=l?Math.atan2(o,a)*fn-120:NaN;return new In(u<0?u+360:u,l,i,t.opacity)}(t):new In(t,e,n,null==r?1:r)}function In(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Dn(t){return function e(n){function r(e,r){var i=t((e=Fn(e)).h,(r=Fn(r)).h),a=je(e.s,r.s),o=je(e.l,r.l),l=je(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=l(t),e+""}}return n=+n,r.gamma=e,r}(1)}ae(In,Fn,oe(le,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new In(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new In(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*cn,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Se(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(On*r+An*i)),255*(e+n*(Ln*r)),this.opacity)}}));Dn(Ie),Dn(je);var jn,Hn,Wn=0,Bn=0,Vn=0,Yn=1e3,qn=0,$n=0,Qn=0,Xn="object"==typeof performance&&performance.now?performance:Date,Kn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Zn(){return $n||(Kn(Gn),$n=Xn.now()+Qn)}function Gn(){$n=0}function Jn(){this._call=this._time=this._next=null}function tr(t,e,n){var r=new Jn;return r.restart(t,e,n),r}function er(){$n=(qn=Xn.now())+Qn,Wn=Bn=0;try{!function(){Zn(),++Wn;for(var t,e=jn;e;)(t=$n-e._time)>=0&&e._call.call(null,t),e=e._next;--Wn}()}finally{Wn=0,function(){var t,e,n=jn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:jn=e);Hn=t,rr(r)}(),$n=0}}function nr(){var t=Xn.now(),e=t-qn;e>Yn&&(Qn-=e,qn=t)}function rr(t){Wn||(Bn&&(Bn=clearTimeout(Bn)),t-$n>24?(t<1/0&&(Bn=setTimeout(er,t-Xn.now()-Qn)),Vn&&(Vn=clearInterval(Vn))):(Vn||(qn=Xn.now(),Vn=setInterval(nr,Yn)),Wn=1,Kn(er)))}Jn.prototype=tr.prototype={constructor:Jn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Zn():+n)+(null==e?0:+e),this._next||Hn===this||(Hn?Hn._next=this:jn=this,Hn=this),this._call=t,this._time=n,rr()},stop:function(){this._call&&(this._call=null,this._time=1/0,rr())}};var ir=function(t,e,n){var r=new Jn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},ar=B("start","end","cancel","interrupt"),or=[],lr=0,ur=1,sr=2,cr=3,fr=4,hr=5,pr=6,dr=function(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(u){var s,c,f,h;if(n.state!==ur)return l();for(s in i)if((h=i[s]).name===n.name){if(h.state===cr)return ir(a);h.state===fr?(h.state=pr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[s]):+s<e&&(h.state=pr,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[s])}if(ir((function(){n.state===cr&&(n.state=fr,n.timer.restart(o,n.delay,n.time),o(u))})),n.state=sr,n.on.call("start",t,t.__data__,n.index,n.group),n.state===sr){for(n.state=cr,r=new Array(f=n.tween.length),s=0,c=-1;s<f;++s)(h=n.tween[s].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=hr,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);n.state===hr&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=pr,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=tr((function(t){n.state=ur,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:ar,tween:or,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:lr})};function mr(t,e){var n=vr(t,e);if(n.state>lr)throw new Error("too late; already scheduled");return n}function yr(t,e){var n=vr(t,e);if(n.state>cr)throw new Error("too late; already running");return n}function vr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var gr=function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>sr&&n.state<hr,n.state=pr,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}};function _r(t,e){var n,r;return function(){var i=yr(this,t),a=i.tween;if(a!==n)for(var o=0,l=(r=n=a).length;o<l;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function br(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=yr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var l={name:e,value:n},u=0,s=i.length;u<s;++u)if(i[u].name===e){i[u]=l;break}u===s&&i.push(l)}a.tween=i}}function wr(t,e,n){var r=t._id;return t.each((function(){var t=yr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return vr(t,r).value[e]}}var xr=function(t,e){var n;return("number"==typeof e?Ye:e instanceof we?He:(n=we(e))?(e=n,He):Je)(t,e)};function kr(t){return function(){this.removeAttribute(t)}}function Er(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Tr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function Sr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function Cr(t,e,n){var r,i,a;return function(){var o,l,u=n(this);if(null!=u)return(o=this.getAttribute(t))===(l=u+"")?null:o===r&&l===i?a:(i=l,a=e(r=o,u));this.removeAttribute(t)}}function Mr(t,e,n){var r,i,a;return function(){var o,l,u=n(this);if(null!=u)return(o=this.getAttributeNS(t.space,t.local))===(l=u+"")?null:o===r&&l===i?a:(i=l,a=e(r=o,u));this.removeAttributeNS(t.space,t.local)}}function Nr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e(n))}}(t,i)),n}return i._value=e,i}function Pr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e(n))}}(t,i)),n}return i._value=e,i}function Or(t,e){return function(){mr(this,t).delay=+e.apply(this,arguments)}}function Ar(t,e){return e=+e,function(){mr(this,t).delay=e}}function Lr(t,e){return function(){yr(this,t).duration=+e.apply(this,arguments)}}function zr(t,e){return e=+e,function(){yr(this,t).duration=e}}function Ur(t,e){if("function"!=typeof e)throw new Error;return function(){yr(this,t).ease=e}}function Rr(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?mr:yr;return function(){var o=a(this,t),l=o.on;l!==r&&(i=(r=l).copy()).on(e,n),o.on=i}}var Fr=te.prototype.constructor;function Ir(t){return function(){this.style.removeProperty(t)}}function Dr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e(r),n)}}(t,a,n)),r}return a._value=e,a}var jr=0;function Hr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Wr(){return++jr}var Br=te.prototype;Hr.prototype=function(t){return te().transition(t)}.prototype={constructor:Hr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Z(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var l,u,s=r[o],c=s.length,f=a[o]=new Array(c),h=0;h<c;++h)(l=s[h])&&(u=t.call(l,l.__data__,h,s))&&("__data__"in l&&(u.__data__=l.__data__),f[h]=u,dr(f[h],e,n,h,f,vr(l,n)));return new Hr(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=J(t));for(var r=this._groups,i=r.length,a=[],o=[],l=0;l<i;++l)for(var u,s=r[l],c=s.length,f=0;f<c;++f)if(u=s[f]){for(var h,p=t.call(u,u.__data__,f,s),d=vr(u,n),m=0,y=p.length;m<y;++m)(h=p[m])&&dr(h,e,n,m,p,d);a.push(p),o.push(u)}return new Hr(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=tt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],l=o.length,u=r[i]=[],s=0;s<l;++s)(a=o[s])&&t.call(a,a.__data__,s,o)&&u.push(a);return new Hr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var u,s=e[l],c=n[l],f=s.length,h=o[l]=new Array(f),p=0;p<f;++p)(u=s[p]||c[p])&&(h[p]=u);for(;l<r;++l)o[l]=e[l];return new Hr(o,this._parents,this._name,this._id)},selection:function(){return new Fr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Wr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,l=r[a],u=l.length,s=0;s<u;++s)if(o=l[s]){var c=vr(o,e);dr(o,t,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Hr(r,this._parents,t,n)},call:Br.call,nodes:Br.nodes,node:Br.node,size:Br.size,empty:Br.empty,each:Br.each,on:function(t,e){var n=this._id;return arguments.length<2?vr(this.node(),n).on.on(t):this.each(Rr(n,t,e))},attr:function(t,e){var n=q(t),r="transform"===n?un:xr;return this.attrTween(t,"function"==typeof e?(n.local?Mr:Cr)(n,r,wr(this,"attr."+t,e)):null==e?(n.local?Er:kr)(n):(n.local?Sr:Tr)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=q(t);return this.tween(n,(r.local?Nr:Pr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?ln:xr;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=vt(this,t),o=(this.style.removeProperty(t),vt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Ir(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=vt(this,t),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(t),u=l=vt(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,l))}}(t,r,wr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,l="end."+o;return function(){var u=yr(this,t),s=u.on,c=null==u.value[o]?a||(a=Ir(e)):void 0;s===n&&i===c||(r=(n=s).copy()).on(l,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=vt(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Dr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(wr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=vr(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?_r:br)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Or:Ar)(e,t)):vr(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Lr:zr)(e,t)):vr(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Ur(e,t)):vr(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var l={value:o},u={value:function(){0==--i&&a()}};n.each((function(){var n=yr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(l),e._.interrupt.push(l),e._.end.push(u)),n.on=e}))}))}};(function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n})(3),function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Math.PI;(function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n})(1.70158),function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158);var Vr=2*Math.PI,Yr=(function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vr);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Vr)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vr);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Vr)},i.period=function(n){return t(e,n)},i}(1,.3),function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Vr);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Vr)},i.period=function(n){return t(e,n)},i}(1,.3),{time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}});function qr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Yr.time=Zn(),Yr;return n}te.prototype.interrupt=function(t){return this.each((function(){gr(this,t)}))},te.prototype.transition=function(t){var e,n;t instanceof Hr?(e=t._id,t=t._name):(e=Wr(),(n=Yr).time=Zn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,l=r[a],u=l.length,s=0;s<u;++s)(o=l[s])&&dr(o,t,e,s,l,n||qr(o,e));return new Hr(r,this._parents,t,e)};function $r(t){return[+t[0],+t[1]]}function Qr(t){return[$r(t[0]),$r(t[1])]}["w","e"].map(Xr),["n","s"].map(Xr),["n","w","e","s","nw","ne","sw","se"].map(Xr);function Xr(t){return{type:t}}Math.cos,Math.sin,Math.PI,Math.max;Array.prototype.slice;var Kr=Math.PI,Zr=2*Kr,Gr=Zr-1e-6;function Jr(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ti(){return new Jr}Jr.prototype=ti.prototype={constructor:Jr,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,l=n-t,u=r-e,s=a-t,c=o-e,f=s*s+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(c*l-u*s)>1e-6&&i){var h=n-a,p=r-o,d=l*l+u*u,m=h*h+p*p,y=Math.sqrt(d),v=Math.sqrt(f),g=i*Math.tan((Kr-Math.acos((d+f-m)/(2*y*v)))/2),_=g/v,b=g/y;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*s)+","+(e+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*h>s*p)+","+(this._x1=t+b*l)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),l=n*Math.sin(r),u=t+o,s=e+l,c=1^a,f=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+s:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-s)>1e-6)&&(this._+="L"+u+","+s),n&&(f<0&&(f=f%Zr+Zr),f>Gr?this._+="A"+n+","+n+",0,1,"+c+","+(t-o)+","+(e-l)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=s):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=Kr)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var ei=ti;function ni(){}function ri(t,e){var n=new ni;if(t instanceof ni)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}ni.prototype=ri.prototype={constructor:ni,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var ii=ri;function ai(){}var oi=ii.prototype;function li(t,e){var n=new ai;if(t instanceof ai)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}ai.prototype=li.prototype={constructor:ai,has:oi.has,add:function(t){return this["$"+(t+="")]=t,this},remove:oi.remove,clear:oi.clear,values:oi.keys,size:oi.size,empty:oi.empty,each:oi.each};Array.prototype.slice;var ui={},si={},ci=34,fi=10,hi=13;function pi(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+"]"})).join(",")+"}")}function di(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function mi(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function yi(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+mi(-e,6):e>9999?"+"+mi(e,6):mi(e,4))+"-"+mi(t.getUTCMonth()+1,2)+"-"+mi(t.getUTCDate(),2)+(a?"T"+mi(n,2)+":"+mi(r,2)+":"+mi(i,2)+"."+mi(a,3)+"Z":i?"T"+mi(n,2)+":"+mi(r,2)+":"+mi(i,2)+"Z":r||n?"T"+mi(n,2)+":"+mi(r,2)+"Z":"")}var vi=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,l=0,u=a<=0,s=!1;function c(){if(u)return si;if(s)return s=!1,ui;var e,r,i=o;if(t.charCodeAt(i)===ci){for(;o++<a&&t.charCodeAt(o)!==ci||t.charCodeAt(++o)===ci;);return(e=o)>=a?u=!0:(r=t.charCodeAt(o++))===fi?s=!0:r===hi&&(s=!0,t.charCodeAt(o)===fi&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if((r=t.charCodeAt(e=o++))===fi)s=!0;else if(r===hi)s=!0,t.charCodeAt(o)===fi&&++o;else if(r!==n)continue;return t.slice(i,e)}return u=!0,t.slice(i,a)}for(t.charCodeAt(a-1)===fi&&--a,t.charCodeAt(a-1)===hi&&--a;(r=c())!==si;){for(var f=[];r!==ui&&r!==si;)f.push(r),r=c();e&&null==(f=e(f,l++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?yi(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=pi(t);return function(r,i){return e(n(r),i,t)}}(t,e):pi(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=di(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=di(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")}}},gi=vi(","),_i=gi.parse,bi=(gi.parseRows,gi.format,gi.formatBody,gi.formatRows,vi("\t")),wi=bi.parse;bi.parseRows,bi.format,bi.formatBody,bi.formatRows;function xi(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var ki=function(t,e){return fetch(t,e).then(xi)};function Ei(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),ki(e,n).then((function(e){return t(e,r)}))}}Ei(_i),Ei(wi);function Ti(t){return function(e,n){return ki(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}Ti("application/xml"),Ti("text/html"),Ti("image/svg+xml");function Si(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,l,u,s,c,f,h,p=t._root,d={data:r},m=t._x0,y=t._y0,v=t._x1,g=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((s=e>=(a=(m+v)/2))?m=a:v=a,(c=n>=(o=(y+g)/2))?y=o:g=o,i=p,!(p=p[f=c<<1|s]))return i[f]=d,t;if(l=+t._x.call(null,p.data),u=+t._y.call(null,p.data),e===l&&n===u)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(s=e>=(a=(m+v)/2))?m=a:v=a,(c=n>=(o=(y+g)/2))?y=o:g=o}while((f=c<<1|s)==(h=(u>=o)<<1|l>=a));return i[h]=p,i[f]=d,t}var Ci=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function Mi(t){return t[0]}function Ni(t){return t[1]}function Pi(t,e,n){var r=new Oi(null==e?Mi:e,null==n?Ni:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Oi(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Ai(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Li=Pi.prototype=Oi.prototype;Li.copy=function(){var t,e,n=new Oi(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Ai(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Ai(e));return n},Li.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Si(this.cover(e,n),e,n,t)},Li.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),l=new Array(a),u=1/0,s=1/0,c=-1/0,f=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,l[n]=i,r<u&&(u=r),r>c&&(c=r),i<s&&(s=i),i>f&&(f=i));if(u>c||s>f)return this;for(this.cover(u,s).cover(c,f),n=0;n<a;++n)Si(this,o[n],l[n],t[n]);return this},Li.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,l,u=i-n,s=this._root;n>t||t>=i||r>e||e>=a;)switch(l=(e<r)<<1|t<n,(o=new Array(4))[l]=s,s=o,u*=2,l){case 0:i=n+u,a=r+u;break;case 1:n=i-u,a=r+u;break;case 2:i=n+u,r=a-u;break;case 3:n=i-u,r=a-u}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},Li.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Li.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Li.find=function(t,e,n){var r,i,a,o,l,u,s,c=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],m=this._root;for(m&&d.push(new Ci(m,c,f,h,p)),null==n?n=1/0:(c=t-n,f=e-n,h=t+n,p=e+n,n*=n);u=d.pop();)if(!(!(m=u.node)||(i=u.x0)>h||(a=u.y0)>p||(o=u.x1)<c||(l=u.y1)<f))if(m.length){var y=(i+o)/2,v=(a+l)/2;d.push(new Ci(m[3],y,v,o,l),new Ci(m[2],i,v,y,l),new Ci(m[1],y,a,o,v),new Ci(m[0],i,a,y,v)),(s=(e>=v)<<1|t>=y)&&(u=d[d.length-1],d[d.length-1]=d[d.length-1-s],d[d.length-1-s]=u)}else{var g=t-+this._x.call(null,m.data),_=e-+this._y.call(null,m.data),b=g*g+_*_;if(b<n){var w=Math.sqrt(n=b);c=t-w,f=e-w,h=t+w,p=e+w,r=m.data}}return r},Li.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,l,u,s,c,f,h,p=this._root,d=this._x0,m=this._y0,y=this._x1,v=this._y1;if(!p)return this;if(p.length)for(;;){if((s=a>=(l=(d+y)/2))?d=l:y=l,(c=o>=(u=(m+v)/2))?m=u:v=u,e=p,!(p=p[f=c<<1|s]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=i,this)},Li.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Li.root=function(){return this._root},Li.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Li.visit=function(t){var e,n,r,i,a,o,l=[],u=this._root;for(u&&l.push(new Ci(u,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(u=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&u.length){var s=(r+a)/2,c=(i+o)/2;(n=u[3])&&l.push(new Ci(n,s,c,a,o)),(n=u[2])&&l.push(new Ci(n,r,c,s,o)),(n=u[1])&&l.push(new Ci(n,s,i,a,c)),(n=u[0])&&l.push(new Ci(n,r,i,s,c))}return this},Li.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Ci(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,l=e.y0,u=e.x1,s=e.y1,c=(o+u)/2,f=(l+s)/2;(a=i[0])&&n.push(new Ci(a,o,l,c,f)),(a=i[1])&&n.push(new Ci(a,c,l,u,f)),(a=i[2])&&n.push(new Ci(a,o,f,c,s)),(a=i[3])&&n.push(new Ci(a,c,f,u,s))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Li.x=function(t){return arguments.length?(this._x=t,this):this._x},Li.y=function(t){return arguments.length?(this._y=t,this):this._y};Math.PI,Math.sqrt(5);var zi=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]},Ui=function(t){return(t=zi(Math.abs(t)))?t[1]:NaN},Ri=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Fi(t){if(!(e=Ri.exec(t)))throw new Error("invalid format: "+t);var e;return new Ii({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Ii(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+""}Fi.prototype=Ii.prototype,Ii.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 Di,ji,Hi,Wi,Bi=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(e+1):t},Vi=function(t,e){var n=zi(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Yi={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Vi(100*t,e)},r:Vi,s:function(t,e){var n=zi(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Di=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+zi(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},qi=function(t){return t},$i=Array.prototype.map,Qi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];ji=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?qi:(e=$i.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>r&&(l=Math.max(1,r-u)),a.push(t.substring(i-=l,i+l)),!((u+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?qi:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}($i.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",s=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Fi(t)).fill,n=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,m=t.comma,y=t.precision,v=t.trim,g=t.type;"n"===g?(m=!0,g="g"):Yi[g]||(void 0===y&&(y=12),v=!0,g="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var _="$"===h?i:"#"===h&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",b="$"===h?a:/[%p]/.test(g)?u:"",w=Yi[g],x=/[defgprs%]/.test(g);function k(t){var i,a,u,h=_,k=b;if("c"===g)k=w(t)+k,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?c:w(Math.abs(t),y),v&&(t=Bi(t)),E&&0==+t&&(E=!1),h=(E?"("===f?f:s:"-"===f||"("===f?"":f)+h,k=("s"===g?Qi[8+Di/3]:"")+k+(E&&"("===f?")":""),x)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){k=(46===u?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}m&&!p&&(t=r(t,1/0));var T=h.length+t.length+k.length,S=T<d?new Array(d-T+1).join(e):"";switch(m&&p&&(t=r(S+t,S.length?d-k.length:1/0),S=""),n){case"<":t=h+t+k+S;break;case"=":t=h+S+t+k;break;case"^":t=S.slice(0,T=S.length>>1)+h+t+k+S.slice(T);break;default:t=S+h+t+k}return l(t)}return y=void 0===y?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:f,formatPrefix:function(t,e){var n=f(((t=Fi(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ui(e)/3))),i=Math.pow(10,-r),a=Qi[8+r/3];return function(t){return n(i*t)+a}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Hi=ji.format,Wi=ji.formatPrefix;var Xi=function(){return new Ki};function Ki(){this.reset()}Ki.prototype={constructor:Ki,reset:function(){this.s=this.t=0},add:function(t){Gi(Zi,t,this.t),Gi(this,Zi.s,this.s),this.s?this.t+=Zi.t:this.s=Zi.t},valueOf:function(){return this.s}};var Zi=new Ki;function Gi(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var Ji=1e-6,ta=1e-12,ea=Math.PI,na=ea/2,ra=ea/4,ia=2*ea,aa=ea/180,oa=Math.abs,la=Math.atan,ua=Math.atan2,sa=Math.cos,ca=(Math.ceil,Math.exp),fa=(Math.floor,Math.log),ha=(Math.pow,Math.sin),pa=Math.sign||function(t){return t>0?1:t<0?-1:0},da=Math.sqrt,ma=Math.tan;function ya(t){return t>1?0:t<-1?ea:Math.acos(t)}function va(t){return t>1?na:t<-1?-na:Math.asin(t)}function ga(){}Xi(),Xi();function _a(t){var e=t[0],n=t[1],r=sa(n);return[r*sa(e),r*ha(e),ha(n)]}function ba(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function wa(t){var e=da(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}Xi();function xa(t,e){return[oa(t)>ea?t+Math.round(-t/ia)*ia:t,e]}xa.invert=xa;var ka=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:ga,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},Ea=function(t,e){return oa(t[0]-e[0])<Ji&&oa(t[1]-e[1])<Ji};function Ta(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var Sa=function(t,e,n,r,i){var a,o,l=[],u=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(Ea(r,o)){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);i.lineEnd()}else l.push(n=new Ta(r,t,null,!0)),u.push(n.o=new Ta(r,null,n,!1)),l.push(n=new Ta(o,t,null,!1)),u.push(n.o=new Ta(o,null,n,!0))}})),l.length){for(u.sort(e),Ca(l),Ca(u),a=0,o=u.length;a<o;++a)u[a].e=n=!n;for(var s,c,f=l[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;s=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(a=0,o=s.length;a<o;++a)i.point((c=s[a])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(s=h.p.z,a=s.length-1;a>=0;--a)i.point((c=s[a])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}s=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}};function Ca(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var Ma=Xi();function Na(t){return oa(t[0])<=ea?t[0]:pa(t[0])*((oa(t[0])+ea)%ia-ea)}var Pa=function(t,e){var n=Na(e),r=e[1],i=ha(r),a=[ha(n),-sa(n),0],o=0,l=0;Ma.reset(),1===i?r=na+Ji:-1===i&&(r=-na-Ji);for(var u=0,s=t.length;u<s;++u)if(f=(c=t[u]).length)for(var c,f,h=c[f-1],p=Na(h),d=h[1]/2+ra,m=ha(d),y=sa(d),v=0;v<f;++v,p=_,m=w,y=x,h=g){var g=c[v],_=Na(g),b=g[1]/2+ra,w=ha(b),x=sa(b),k=_-p,E=k>=0?1:-1,T=E*k,S=T>ea,C=m*w;if(Ma.add(ua(C*E*ha(T),y*x+C*sa(T))),o+=S?k+E*ia:k,S^p>=n^_>=n){var M=ba(_a(h),_a(g));wa(M);var N=ba(a,M);wa(N);var P=(S^k>=0?-1:1)*va(N[2]);(r>P||r===P&&(M[0]||M[1]))&&(l+=S^k>=0?1:-1)}}return(o<-Ji||o<Ji&&Ma<-Ji)^1&l},Oa=function(t,e,n,r){return function(i){var a,o,l,u=e(i),s=ka(),c=e(s),f=!1,h={point:p,lineStart:m,lineEnd:y,polygonStart:function(){h.point=v,h.lineStart=g,h.lineEnd=_,o=[],a=[]},polygonEnd:function(){h.point=p,h.lineStart=m,h.lineEnd=y,o=w(o);var t=Pa(a,r);o.length?(f||(i.polygonStart(),f=!0),Sa(o,La,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){u.point(t,e)}function m(){h.point=d,u.lineStart()}function y(){h.point=p,u.lineEnd()}function v(t,e){l.push([t,e]),c.point(t,e)}function g(){c.lineStart(),l=[]}function _(){v(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,u=c.clean(),h=s.result(),p=h.length;if(l.pop(),a.push(l),l=null,p)if(1&u){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else p>1&&2&u&&h.push(h.pop().concat(h.shift())),o.push(h.filter(Aa))}return h}};function Aa(t){return t.length>1}function La(t,e){return((t=t.x)[0]<0?t[1]-na-Ji:na-t[1])-((e=e.x)[0]<0?e[1]-na-Ji:na-e[1])}Oa((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var l=a>0?ea:-ea,u=oa(a-n);oa(u-ea)<Ji?(t.point(n,r=(r+o)/2>0?na:-na),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(a,r),e=0):i!==l&&u>=ea&&(oa(n-i)<Ji&&(n-=i*Ji),oa(a-l)<Ji&&(a-=l*Ji),r=function(t,e,n,r){var i,a,o=ha(t-n);return oa(o)>Ji?la((ha(e)*(a=sa(r))*ha(n)-ha(r)*(i=sa(e))*ha(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),e=0),t.point(n=a,r=o),i=l},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*na,r.point(-ea,i),r.point(0,i),r.point(ea,i),r.point(ea,0),r.point(ea,-i),r.point(0,-i),r.point(-ea,-i),r.point(-ea,0),r.point(-ea,i);else if(oa(t[0]-e[0])>Ji){var a=t[0]<e[0]?ea:-ea;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-ea,-na]);Xi();Xi(),Xi();function za(t){this._context=t}za.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,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,ia)}},result:ga};Xi();function Ua(){this._string=[]}function Ra(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Ua.prototype={_radius:4.5,_circle:Ra(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,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Ra(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};function Fa(t){return function(e){var n=new Ia;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Ia(){}Ia.prototype={constructor:Ia,point:function(t,e){this.stream.point(t,e)},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()}};sa(30*aa);Fa({point:function(t,e){this.stream.point(t*aa,e*aa)}});function Da(t){return function(e,n){var r=sa(e),i=sa(n),a=t(r*i);return[a*i*ha(e),a*ha(n)]}}function ja(t){return function(e,n){var r=da(e*e+n*n),i=t(r),a=ha(i),o=sa(i);return[ua(e*a,r*o),va(r&&n*a/r)]}}var Ha=Da((function(t){return da(2/(1+t))}));Ha.invert=ja((function(t){return 2*va(t/2)}));var Wa=Da((function(t){return(t=ya(t))&&t/ha(t)}));Wa.invert=ja((function(t){return t}));function Ba(t,e){return[t,fa(ma((na+e)/2))]}Ba.invert=function(t,e){return[t,2*la(ca(e))-na]};function Va(t,e){return[t,e]}Va.invert=Va;var Ya=1.340264,qa=-.081106,$a=893e-6,Qa=.003796,Xa=da(3)/2;function Ka(t,e){var n=va(Xa*ha(e)),r=n*n,i=r*r*r;return[t*sa(n)/(Xa*(Ya+3*qa*r+i*(7*$a+9*Qa*r))),n*(Ya+qa*r+i*($a+Qa*r))]}Ka.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(Ya+qa*i+a*($a+Qa*i))-e)/(Ya+3*qa*i+a*(7*$a+9*Qa*i)))*r)*i*i,!(oa(n)<ta));++o);return[Xa*t*(Ya+3*qa*i+a*(7*$a+9*Qa*i))/sa(r),va(ha(r)/Xa)]};function Za(t,e){var n=sa(e),r=sa(t)*n;return[n*ha(t)/r,ha(e)/r]}Za.invert=ja(la);function Ga(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Ga.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(oa(n)>Ji&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};function Ja(t,e){return[sa(e)*ha(t),ha(e)]}Ja.invert=ja(va);function to(t,e){var n=sa(e),r=1+sa(t)*n;return[n*ha(t)/r,ha(e)/r]}to.invert=ja((function(t){return 2*la(t)}));function eo(t,e){return[fa(ma((na+e)/2)),-t]}eo.invert=function(t,e){return[-e,2*la(ca(t))-na]};function no(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function ro(t,e){var n,r,i,a,o,l=new lo(t),u=+t.value&&(l.value=t.value),s=[l];for(null==e&&(e=io);n=s.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)s.push(r=n.children[a]=new lo(i[a])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(oo)}function io(t){return t.children}function ao(t){t.data=t.data.data}function oo(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function lo(t){this.data=t,this.depth=this.height=0,this.parent=null}lo.prototype=ro.prototype={constructor:lo,count:function(){return this.eachAfter(no)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return ro(this).eachBefore(ao)}};Array.prototype.slice;var uo=function(t,e,n,r,i){for(var a,o=t.children,l=-1,u=o.length,s=t.value&&(r-e)/t.value;++l<u;)(a=o[l]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*s};function so(t,e){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=e}so.prototype=Object.create(lo.prototype);var co=function(t,e,n,r,i){for(var a,o=t.children,l=-1,u=o.length,s=t.value&&(i-n)/t.value;++l<u;)(a=o[l]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*s},fo=(1+Math.sqrt(5))/2;function ho(t,e,n,r,i,a){for(var o,l,u,s,c,f,h,p,d,m,y,v=[],g=e.children,_=0,b=0,w=g.length,x=e.value;_<w;){u=i-n,s=a-r;do{c=g[b++].value}while(!c&&b<w);for(f=h=c,y=c*c*(m=Math.max(s/u,u/s)/(x*t)),d=Math.max(h/y,y/f);b<w;++b){if(c+=l=g[b].value,l<f&&(f=l),l>h&&(h=l),y=c*c*m,(p=Math.max(h/y,y/f))>d){c-=l;break}d=p}v.push(o={value:c,dice:u<s,children:g.slice(_,b)}),o.dice?uo(o,n,r,i,x?r+=s*c/x:a):co(o,n,r,x?n+=u*c/x:i,a),x-=c,_=b}return v}(function t(e){function n(t,n,r,i,a){ho(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n})(fo),function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,l,u,s,c,f=-1,h=o.length,p=t.value;++f<h;){for(u=(l=o[f]).children,s=l.value=0,c=u.length;s<c;++s)l.value+=u[s].value;l.dice?uo(l,n,r,i,r+=(a-r)*l.value/p):co(l,n,r,n+=(i-n)*l.value/p,a),p-=l.value}else t._squarify=o=ho(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(fo);var po=function(){return Math.random()},mo=(function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(po),function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(po)),yo=(function t(e){function n(){var t=mo.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(po),function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(po));(function t(e){function n(t){var n=yo.source(e)(t);return function(){return n()/t}}return n.source=t,n})(po),function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(po);function vo(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var go=Array.prototype,_o=go.map,bo=go.slice;var wo=function(t){return function(){return t}},xo=function(t){return+t},ko=[0,1];function Eo(t){return t}function To(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:wo(isNaN(e)?NaN:.5)}function So(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Co(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=To(i,r),a=n(o,a)):(r=To(r,i),a=n(a,o)),function(t){return a(r(t))}}function Mo(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=To(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=f(t,e,1,r)-1;return a[n](i[n](e))}}function No(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Po(){var t,e,n,r,i,a,o=ko,l=ko,u=tn,s=Eo;function c(){return r=Math.min(o.length,l.length)>2?Mo:Co,i=a=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),l,u)))(t(s(e)))}return f.invert=function(n){return s(e((a||(a=r(l,o.map(t),Ye)))(n)))},f.domain=function(t){return arguments.length?(o=_o.call(t,xo),s===Eo||(s=So(o)),c()):o.slice()},f.range=function(t){return arguments.length?(l=bo.call(t),c()):l.slice()},f.rangeRound=function(t){return l=bo.call(t),u=en,c()},f.clamp=function(t){return arguments.length?(s=t?So(o):Eo,f):s!==Eo},f.interpolate=function(t){return arguments.length?(u=t,c()):u},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,c()}}function Oo(t,e){return Po()(t,e)}var Ao=function(t,e,n,r){var i,a=_(t,e,n);switch((r=Fi(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ui(e)/3)))-Ui(Math.abs(t)))}(a,o))||(r.precision=i),Wi(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ui(e)-Ui(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Ui(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Hi(r)};function Lo(t){var e=t.domain;return t.ticks=function(t){var n=e();return v(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Ao(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,l=i[a],u=i[o];return u<l&&(r=l,l=u,u=r,r=a,a=o,o=r),(r=g(l,u,n))>0?r=g(l=Math.floor(l/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=g(l=Math.ceil(l*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[a]=Math.floor(l/r)*r,i[o]=Math.ceil(u/r)*r,e(i)):r<0&&(i[a]=Math.ceil(l*r)/r,i[o]=Math.floor(u*r)/r,e(i)),t},t}function zo(){var t=Oo(Eo,Eo);return t.copy=function(){return No(t,zo())},vo.apply(t,arguments),Lo(t)}var Uo=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t};function Ro(t){return Math.log(t)}function Fo(t){return Math.exp(t)}function Io(t){return-Math.log(-t)}function Do(t){return-Math.exp(-t)}function jo(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ho(t){return function(e){return-t(-e)}}function Wo(t){var e,n,r=t(Ro,Fo),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?jo:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=Ho(e),n=Ho(n),t(Io,Do)):t(Ro,Fo),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),l=o[0],u=o[o.length-1];(r=u<l)&&(h=l,l=u,u=h);var s,c,f,h=e(l),p=e(u),d=null==t?10:+t,m=[];if(!(a%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,l>0){for(;h<p;++h)for(c=1,s=n(h);c<a;++c)if(!((f=s*c)<l)){if(f>u)break;m.push(f)}}else for(;h<p;++h)for(c=a-1,s=n(h);c>=1;--c)if(!((f=s*c)<l)){if(f>u)break;m.push(f)}}else m=v(h,p,Math.min(p-h,d)).map(n);return r?m.reverse():m},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Hi(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(Uo(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function Bo(){var t=Wo(Po()).domain([1,10]);return t.copy=function(){return No(t,Bo()).base(t.base())},vo.apply(t,arguments),t}var Vo=new Date,Yo=new Date;function qo(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,l=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return l;do{l.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return l},i.filter=function(n){return qo((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Vo.setTime(+e),Yo.setTime(+r),t(Vo),t(Yo),Math.floor(n(Vo,Yo))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var $o=qo((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));$o.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qo((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Qo=$o,Xo=($o.range,qo((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),Ko=(Xo.range,6e4),Zo=6048e5;function Go(t){return qo((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ko)/Zo}))}var Jo=Go(0),tl=Go(1),el=Go(2),nl=Go(3),rl=Go(4),il=Go(5),al=Go(6),ol=(Jo.range,tl.range,el.range,nl.range,rl.range,il.range,al.range,qo((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ko)/864e5}),(function(t){return t.getDate()-1}))),ll=ol,ul=(ol.range,qo((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*Ko)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()}))),sl=(ul.range,qo((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+e*Ko)}),(function(t,e){return(e-t)/Ko}),(function(t){return t.getMinutes()}))),cl=(sl.range,qo((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()}))),fl=(cl.range,qo((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t})));fl.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?qo((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):fl:null};fl.range;function hl(t){return qo((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/Zo}))}var pl=hl(0),dl=hl(1),ml=hl(2),yl=hl(3),vl=hl(4),gl=hl(5),_l=hl(6),bl=(pl.range,dl.range,ml.range,yl.range,vl.range,gl.range,_l.range,qo((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}))),wl=bl,xl=(bl.range,qo((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));xl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qo((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var kl=xl;xl.range;function El(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Tl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Sl(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}var Cl,Ml,Nl,Pl={"-":"",_:" ",0:"0"},Ol=/^\s*\d+/,Al=/^%/,Ll=/[\\^$*+?|[\]().{}]/g;function zl(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Ul(t){return t.replace(Ll,"\\$&")}function Rl(t){return new RegExp("^(?:"+t.map(Ul).join("|")+")","i")}function Fl(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Il(t,e,n){var r=Ol.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Dl(t,e,n){var r=Ol.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function jl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Hl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Wl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Bl(t,e,n){var r=Ol.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Vl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Yl(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ql(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function $l(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Ql(t,e,n){var r=Ol.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Xl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Kl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Zl(t,e,n){var r=Ol.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Gl(t,e,n){var r=Ol.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Jl(t,e,n){var r=Ol.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function tu(t,e,n){var r=Al.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function eu(t,e,n){var r=Ol.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function nu(t,e,n){var r=Ol.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function ru(t,e){return zl(t.getDate(),e,2)}function iu(t,e){return zl(t.getHours(),e,2)}function au(t,e){return zl(t.getHours()%12||12,e,2)}function ou(t,e){return zl(1+ll.count(Qo(t),t),e,3)}function lu(t,e){return zl(t.getMilliseconds(),e,3)}function uu(t,e){return lu(t,e)+"000"}function su(t,e){return zl(t.getMonth()+1,e,2)}function cu(t,e){return zl(t.getMinutes(),e,2)}function fu(t,e){return zl(t.getSeconds(),e,2)}function hu(t){var e=t.getDay();return 0===e?7:e}function pu(t,e){return zl(Jo.count(Qo(t),t),e,2)}function du(t,e){var n=t.getDay();return t=n>=4||0===n?rl(t):rl.ceil(t),zl(rl.count(Qo(t),t)+(4===Qo(t).getDay()),e,2)}function mu(t){return t.getDay()}function yu(t,e){return zl(tl.count(Qo(t),t),e,2)}function vu(t,e){return zl(t.getFullYear()%100,e,2)}function gu(t,e){return zl(t.getFullYear()%1e4,e,4)}function _u(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+zl(e/60|0,"0",2)+zl(e%60,"0",2)}function bu(t,e){return zl(t.getUTCDate(),e,2)}function wu(t,e){return zl(t.getUTCHours(),e,2)}function xu(t,e){return zl(t.getUTCHours()%12||12,e,2)}function ku(t,e){return zl(1+wl.count(kl(t),t),e,3)}function Eu(t,e){return zl(t.getUTCMilliseconds(),e,3)}function Tu(t,e){return Eu(t,e)+"000"}function Su(t,e){return zl(t.getUTCMonth()+1,e,2)}function Cu(t,e){return zl(t.getUTCMinutes(),e,2)}function Mu(t,e){return zl(t.getUTCSeconds(),e,2)}function Nu(t){var e=t.getUTCDay();return 0===e?7:e}function Pu(t,e){return zl(pl.count(kl(t),t),e,2)}function Ou(t,e){var n=t.getUTCDay();return t=n>=4||0===n?vl(t):vl.ceil(t),zl(vl.count(kl(t),t)+(4===kl(t).getUTCDay()),e,2)}function Au(t){return t.getUTCDay()}function Lu(t,e){return zl(dl.count(kl(t),t),e,2)}function zu(t,e){return zl(t.getUTCFullYear()%100,e,2)}function Uu(t,e){return zl(t.getUTCFullYear()%1e4,e,4)}function Ru(){return"+0000"}function Fu(){return"%"}function Iu(t){return+t}function Du(t){return Math.floor(+t/1e3)}!function(t){Cl=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,l=t.months,u=t.shortMonths,s=Rl(i),c=Fl(i),f=Rl(a),h=Fl(a),p=Rl(o),d=Fl(o),m=Rl(l),y=Fl(l),v=Rl(u),g=Fl(u),_={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:null,d:ru,e:ru,f:uu,H:iu,I:au,j:ou,L:lu,m:su,M:cu,p:function(t){return i[+(t.getHours()>=12)]},Q:Iu,s:Du,S:fu,u:hu,U:pu,V:du,w:mu,W:yu,x:null,X:null,y:vu,Y:gu,Z:_u,"%":Fu},b={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return l[t.getUTCMonth()]},c:null,d:bu,e:bu,f:Tu,H:wu,I:xu,j:ku,L:Eu,m:Su,M:Cu,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:Iu,s:Du,S:Mu,u:Nu,U:Pu,V:Ou,w:Au,W:Lu,x:null,X:null,y:zu,Y:Uu,Z:Ru,"%":Fu},w={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:$l,e:$l,f:Jl,H:Xl,I:Xl,j:Ql,L:Gl,m:ql,M:Kl,p:function(t,e,n){var r=s.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:eu,s:nu,S:Zl,u:Dl,U:jl,V:Hl,w:Il,W:Wl,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:Vl,Y:Bl,Z:Yl,"%":tu};function x(t,e){return function(n){var r,i,a,o=[],l=-1,u=0,s=t.length;for(n instanceof Date||(n=new Date(+n));++l<s;)37===t.charCodeAt(l)&&(o.push(t.slice(u,l)),null!=(i=Pl[r=t.charAt(++l)])?r=t.charAt(++l):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),u=l+1);return o.push(t.slice(u,l)),o.join("")}}function k(t,e){return function(n){var r,i,a=Sl(1900);if(E(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("p"in a&&(a.H=a.H%12+12*a.p),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Tl(Sl(a.y))).getUTCDay(),r=i>4||0===i?dl.ceil(r):dl(r),r=wl.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=e(Sl(a.y))).getDay(),r=i>4||0===i?tl.ceil(r):tl(r),r=ll.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Tl(Sl(a.y)).getUTCDay():e(Sl(a.y)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Tl(a)):e(a)}}function E(t,e,n,r){for(var i,a,o=0,l=e.length,u=n.length;o<l;){if(r>=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=w[i in Pl?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=x(n,_),_.X=x(r,_),_.c=x(e,_),b.x=x(n,b),b.X=x(r,b),b.c=x(e,b),{format:function(t){var e=x(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",El);return e.toString=function(){return t},e},utcFormat:function(t){var e=x(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t,Tl);return e.toString=function(){return t},e}}}(t),Cl.format,Cl.parse,Ml=Cl.utcFormat,Nl=Cl.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Date.prototype.toISOString||Ml("%Y-%m-%dT%H:%M:%S.%LZ");+new Date("2000-01-01T00:00:00.000Z")||Nl("%Y-%m-%dT%H:%M:%S.%LZ");var ju=qo((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),Hu=(ju.range,qo((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()}))),Wu=(Hu.range,qo((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*Ko)}),(function(t,e){return(e-t)/Ko}),(function(t){return t.getUTCMinutes()})));Wu.range;var Bu=function(t){return function(){return t}},Vu=(Math.abs,Math.atan2,Math.cos,Math.max,Math.min,Math.sin,Math.sqrt,1e-12),Yu=Math.PI,qu=2*Yu;function $u(t){this._context=t}$u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Qu=function(t){return new $u(t)};function Xu(t){return t[0]}function Ku(t){return t[1]}var Zu=function(){var t=Xu,e=Ku,n=Bu(!0),r=null,i=Qu,a=null;function o(o){var l,u,s,c=o.length,f=!1;for(null==r&&(a=i(s=ei())),l=0;l<=c;++l)!(l<c&&n(u=o[l],l,o))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(u,l,o),+e(u,l,o));if(s)return a=null,s+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:Bu(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:Bu(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:Bu(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o};Ju(Qu);function Gu(t){this._curve=t}function Ju(t){function e(e){return new Gu(t(e))}return e._curve=t,e}Gu.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};Array.prototype.slice;Math.sqrt(1/3);var ts=Math.sin(Yu/10)/Math.sin(7*Yu/10),es=(Math.sin(qu/10),Math.cos(qu/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12),function(){});function ns(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function rs(t){this._context=t}rs.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:ns(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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ns(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function is(t){this._context=t}is.prototype={areaStart:es,areaEnd:es,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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ns(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function as(t){this._context=t}as.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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ns(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function os(t,e){this._basis=new rs(t),this._beta=e}os.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,l=e[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(1-this._beta)*(a+r*l));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};(function t(e){function n(t){return 1===e?new rs(t):new os(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function ls(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function us(t,e){this._context=t,this._k=(1-e)/6}us.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:ls(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:ls(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new us(t,e)}return n.tension=function(e){return t(+e)},n})(0);function ss(t,e){this._context=t,this._k=(1-e)/6}ss.prototype={areaStart:es,areaEnd:es,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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ls(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new ss(t,e)}return n.tension=function(e){return t(+e)},n})(0);function cs(t,e){this._context=t,this._k=(1-e)/6}cs.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,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ls(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return new cs(t,e)}return n.tension=function(e){return t(+e)},n})(0);function fs(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Vu){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Vu){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*s+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*s+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function hs(t,e){this._context=t,this._alpha=e}hs.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,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:fs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new hs(t,e):new us(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function ps(t,e){this._context=t,this._alpha=e}ps.prototype={areaStart:es,areaEnd:es,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,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:fs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new ps(t,e):new ss(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function ds(t,e){this._context=t,this._alpha=e}ds.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,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+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:fs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(t){return e?new ds(t,e):new cs(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function ms(t){this._context=t}ms.prototype={areaStart:es,areaEnd:es,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function ys(t){return t<0?-1:1}function vs(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),l=(a*i+o*r)/(r+i);return(ys(a)+ys(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function gs(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function _s(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,l=(a-r)/3;t._context.bezierCurveTo(r+l,i+l*e,a-l,o-l*n,a,o)}function bs(t){this._context=t}function ws(t){this._context=new xs(t)}function xs(t){this._context=t}function ks(t){this._context=t}function Es(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:_s(this,this._t0,gs(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,_s(this,gs(this,n=vs(this,t,e)),n);break;default:_s(this,this._t0,n=vs(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(ws.prototype=Object.create(bs.prototype)).point=function(t,e){bs.prototype.point.call(this,e,t)},xs.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},ks.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=Es(t),i=Es(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Ts(t,e){this._context=t,this._t=e}Ts.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};function Ss(){this._=null}function Cs(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Ms(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Ns(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Ps(t){for(;t.L;)t=t.L;return t}Ss.prototype={constructor:Ss,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Ps(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Ms(this,n),n=(t=n).U),n.C=!1,r.C=!0,Ns(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Ns(this,n),n=(t=n).U),n.C=!1,r.C=!0,Ms(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?Ps(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Ms(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Ns(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Ms(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Ns(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Ms(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Ns(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Os=Ss;function As(t,e,n,r){var i=[null,null],a=nc.push(i)-1;return i.left=t,i.right=e,n&&zs(i,t,e,n),r&&zs(i,e,t,r),tc[t.index].halfedges.push(a),tc[e.index].halfedges.push(a),i}function Ls(t,e,n){var r=[e,n];return r.left=t,r}function zs(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function Us(t,e,n,r,i){var a,o=t[0],l=t[1],u=o[0],s=o[1],c=0,f=1,h=l[0]-u,p=l[1]-s;if(a=e-u,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<f&&(f=a)}else if(h>0){if(a>f)return;a>c&&(c=a)}if(a=r-u,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<f&&(f=a)}if(a=n-s,p||!(a>0)){if(a/=p,p<0){if(a<c)return;a<f&&(f=a)}else if(p>0){if(a>f)return;a>c&&(c=a)}if(a=i-s,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>c&&(c=a)}else if(p>0){if(a<c)return;a<f&&(f=a)}return!(c>0||f<1)||(c>0&&(t[0]=[u+c*h,s+c*p]),f<1&&(t[1]=[u+f*h,s+f*p]),!0)}}}}}function Rs(t,e,n,r,i){var a=t[1];if(a)return!0;var o,l,u=t[0],s=t.left,c=t.right,f=s[0],h=s[1],p=c[0],d=c[1],m=(f+p)/2,y=(h+d)/2;if(d===h){if(m<e||m>=r)return;if(f>p){if(u){if(u[1]>=i)return}else u=[m,n];a=[m,i]}else{if(u){if(u[1]<n)return}else u=[m,i];a=[m,n]}}else if(l=y-(o=(f-p)/(d-h))*m,o<-1||o>1)if(f>p){if(u){if(u[1]>=i)return}else u=[(n-l)/o,n];a=[(i-l)/o,i]}else{if(u){if(u[1]<n)return}else u=[(i-l)/o,i];a=[(n-l)/o,n]}else if(h<d){if(u){if(u[0]>=r)return}else u=[e,o*e+l];a=[r,o*r+l]}else{if(u){if(u[0]<e)return}else u=[r,o*r+l];a=[e,o*e+l]}return t[0]=u,t[1]=a,!0}function Fs(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Is(t,e){return e[+(e.left!==t.site)]}function Ds(t,e){return e[+(e.left===t.site)]}var js,Hs=[];function Ws(){Cs(this),this.x=this.y=this.arc=this.site=this.cy=null}function Bs(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],l=i[1],u=r[0]-o,s=r[1]-l,c=a[0]-o,f=a[1]-l,h=2*(u*f-s*c);if(!(h>=-ic)){var p=u*u+s*s,d=c*c+f*f,m=(f*p-s*d)/h,y=(u*d-c*p)/h,v=Hs.pop()||new Ws;v.arc=t,v.site=i,v.x=m+o,v.y=(v.cy=y+l)+Math.sqrt(m*m+y*y),t.circle=v;for(var g=null,_=ec._;_;)if(v.y<_.y||v.y===_.y&&v.x<=_.x){if(!_.L){g=_.P;break}_=_.L}else{if(!_.R){g=_;break}_=_.R}ec.insert(g,v),g||(js=v)}}}}function Vs(t){var e=t.circle;e&&(e.P||(js=e.N),ec.remove(e),Hs.push(e),Cs(e),t.circle=null)}var Ys=[];function qs(){Cs(this),this.edge=this.site=this.circle=null}function $s(t){var e=Ys.pop()||new qs;return e.site=t,e}function Qs(t){Vs(t),Js.remove(t),Ys.push(t),Cs(t)}function Xs(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,l=[t];Qs(t);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<rc&&Math.abs(r-u.circle.cy)<rc;)a=u.P,l.unshift(u),Qs(u),u=a;l.unshift(u),Vs(u);for(var s=o;s.circle&&Math.abs(n-s.circle.x)<rc&&Math.abs(r-s.circle.cy)<rc;)o=s.N,l.push(s),Qs(s),s=o;l.push(s),Vs(s);var c,f=l.length;for(c=1;c<f;++c)s=l[c],u=l[c-1],zs(s.edge,u.site,s.site,i);u=l[0],(s=l[f-1]).edge=As(u.site,s.site,null,i),Bs(u),Bs(s)}function Ks(t){for(var e,n,r,i,a=t[0],o=t[1],l=Js._;l;)if((r=Zs(l,o)-a)>rc)l=l.L;else{if(!((i=a-Gs(l,o))>rc)){r>-rc?(e=l.P,n=l):i>-rc?(e=l,n=l.N):e=n=l;break}if(!l.R){e=l;break}l=l.R}!function(t){tc[t.index]={site:t,halfedges:[]}}(t);var u=$s(t);if(Js.insert(e,u),e||n){if(e===n)return Vs(e),n=$s(e.site),Js.insert(u,n),u.edge=n.edge=As(e.site,u.site),Bs(e),void Bs(n);if(n){Vs(e),Vs(n);var s=e.site,c=s[0],f=s[1],h=t[0]-c,p=t[1]-f,d=n.site,m=d[0]-c,y=d[1]-f,v=2*(h*y-p*m),g=h*h+p*p,_=m*m+y*y,b=[(y*g-p*_)/v+c,(h*_-m*g)/v+f];zs(n.edge,s,d,b),u.edge=As(s,t,null,b),n.edge=As(t,d,null,b),Bs(e),Bs(n)}else u.edge=As(e.site,u.site)}}function Zs(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var l=(n=o.site)[0],u=n[1],s=u-e;if(!s)return l;var c=l-r,f=1/a-1/s,h=c/s;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*s)-u+s/2+i-a/2)))/f+r:(r+l)/2}function Gs(t,e){var n=t.N;if(n)return Zs(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Js,tc,ec,nc,rc=1e-6,ic=1e-12;function ac(t,e){return e[1]-t[1]||e[0]-t[0]}function oc(t,e){var n,r,i,a=t.sort(ac).pop();for(nc=[],tc=new Array(t.length),Js=new Os,ec=new Os;;)if(i=js,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(Ks(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;Xs(i.arc)}if(function(){for(var t,e,n,r,i=0,a=tc.length;i<a;++i)if((t=tc[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),l=new Array(r);for(n=0;n<r;++n)o[n]=n,l[n]=Fs(t,nc[e[n]]);for(o.sort((function(t,e){return l[e]-l[t]})),n=0;n<r;++n)l[n]=e[o[n]];for(n=0;n<r;++n)e[n]=l[n]}}(),e){var o=+e[0][0],l=+e[0][1],u=+e[1][0],s=+e[1][1];!function(t,e,n,r){for(var i,a=nc.length;a--;)Rs(i=nc[a],t,e,n,r)&&Us(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>rc||Math.abs(i[0][1]-i[1][1])>rc)||delete nc[a]}(o,l,u,s),function(t,e,n,r){var i,a,o,l,u,s,c,f,h,p,d,m,y=tc.length,v=!0;for(i=0;i<y;++i)if(a=tc[i]){for(o=a.site,l=(u=a.halfedges).length;l--;)nc[u[l]]||u.splice(l,1);for(l=0,s=u.length;l<s;)d=(p=Ds(a,nc[u[l]]))[0],m=p[1],f=(c=Is(a,nc[u[++l%s]]))[0],h=c[1],(Math.abs(d-f)>rc||Math.abs(m-h)>rc)&&(u.splice(l,0,nc.push(Ls(o,p,Math.abs(d-t)<rc&&r-m>rc?[t,Math.abs(f-t)<rc?h:r]:Math.abs(m-r)<rc&&n-d>rc?[Math.abs(h-r)<rc?f:n,r]:Math.abs(d-n)<rc&&m-e>rc?[n,Math.abs(f-n)<rc?h:e]:Math.abs(m-e)<rc&&d-t>rc?[Math.abs(h-e)<rc?f:t,e]:null))-1),++s);s&&(v=!1)}if(v){var g,_,b,w=1/0;for(i=0,v=null;i<y;++i)(a=tc[i])&&(b=(g=(o=a.site)[0]-t)*g+(_=o[1]-e)*_)<w&&(w=b,v=a);if(v){var x=[t,e],k=[t,r],E=[n,r],T=[n,e];v.halfedges.push(nc.push(Ls(o=v.site,x,k))-1,nc.push(Ls(o,k,E))-1,nc.push(Ls(o,E,T))-1,nc.push(Ls(o,T,x))-1)}}for(i=0;i<y;++i)(a=tc[i])&&(a.halfedges.length||delete tc[i])}(o,l,u,s)}this.edges=nc,this.cells=tc,Js=ec=nc=tc=null}oc.prototype={constructor:oc,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return Is(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,l,u,s,c=n.site,f=-1,h=e[i[a-1]],p=h.left===c?h.right:h.left;++f<a;)o=p,p=(h=e[i[f]]).left===c?h.right:h.left,o&&p&&r<o.index&&r<p.index&&(u=o,s=p,((l=c)[0]-s[0])*(u[1]-l[1])-(l[0]-u[0])*(s[1]-l[1])<0)&&t.push([c.data,o.data,p.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,l=a.cells.length;!(i=a.cells[o]);)if(++o>=l)return null;var u=t-i.site[0],s=e-i.site[1],c=u*u+s*s;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],l=r.left;if(l!==i.site&&l||(l=r.right)){var u=t-l[0],s=e-l[1],f=u*u+s*s;f<c&&(c=f,o=l.index)}}))}while(null!==o);return a._found=r,null==n||c<=n*n?i.site:null}};function lc(t,e,n){this.k=t,this.x=e,this.y=n}lc.prototype={constructor:lc,scale:function(t){return 1===t?this:new lc(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new lc(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new lc(1,0,0);lc.prototype;function uc(t,e,n,r,i){const a=t.length;let o=0,l=0;for(let u=0;u<a;u++){const s=t[u],c=e(s),f=n(s),h=i(c);o+=Math.pow(f-h,2),l+=Math.pow(f-r/a,2)}return 1-o/l}function sc(t){return 180*Math.atan2(t[1][1]-t[0][1],t[1][0]-t[0][0])/Math.PI}function cc(t,e,n){const r=.01;let i=[o(t),o(e)],a=0;for(;l(i)&&a<1e4;);return i;function o(t){return[t,n(t)]}function l(t){a++;const e=t.length;let n=!1;for(let a=0;a<e-1;a++){const e=t[a],l=t[a+1],u=[((i=[e,l])[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2],s=o(u[0]),c=sc([e,u]),f=sc([e,s]);Math.abs(c-f)>r&&(t.splice(a+1,0,s),n=!0)}var i;return n}}var fc=function(){let t,e=t=>t[0],n=t=>t[1];function r(r){let i=r.length,a=0,o=0,l=0,u=0,s=0,c=t?+t[0]:1/0,f=t?+t[1]:-1/0;for(let h=0;h<i;h++){const i=r[h],p=e(i,h,r),d=n(i,h,r);null!=p&&isFinite(p)&&null!=d&&isFinite(d)&&(a++,o+=p,l+=d,u+=p*d,s+=p*p,t||(p<c&&(c=p),p>f&&(f=p)))}const h=((i=a)*u-o*l)/(i*s-o*o),p=(l-h*o)/i,d=t=>h*t+p,m=uc(r,e,n,l,d),y=[[c,c*h+p],[f,f*h+p]];return y.a=h,y.b=p,y.predict=d,y.rSquared=m,y}return r.domain=function(e){return arguments.length?(t=e,r):t},r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r};var hc=function(){let t,e=t=>t[0],n=t=>t[1];function r(r){let i=r.length,a=0,o=0,l=0,u=0,s=0,c=0,f=t?+t[0]:1/0,h=t?+t[1]:-1/0;for(let p=0;p<i;p++){const i=r[p],d=e(i,p,r),m=n(i,p,r);null!=d&&isFinite(d)&&null!=m&&isFinite(m)&&(a++,o+=Math.log(d),l+=Math.log(m)*Math.log(d),u+=Math.log(m),s+=Math.pow(Math.log(d),2),c+=m,t||(d<f&&(f=d),d>h&&(h=d)))}const p=((i=a)*l-o*u)/(i*s-Math.pow(o,2)),d=Math.exp((u-p*o)/i),m=t=>d*Math.pow(t,p),y=cc(f,h,m);return y.a=d,y.b=p,y.predict=m,y.rSquared=uc(r,e,n,c,m),y}return r.domain=function(e){return arguments.length?(t=e,r):t},r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r},pc=n(3),dc=n.n(pc),mc=n(5),yc=n.n(mc),vc=n(2),gc=n.n(vc),_c=0,bc=1,wc=function(){var t=Object(r.useRef)(null),e=Object(r.useState)(!1),n=gc()(e,2),a=n[0],o=n[1],l=Object(r.useState)(!1),u=gc()(l,2),s=u[0],c=u[1],f=Object(r.useState)(!0),h=gc()(f,2),p=h[0],d=h[1],m=Object(r.useState)([]),y=gc()(m,2),v=y[0],g=y[1],_=Object(r.useState)(""),b=gc()(_,2),w=b[0],x=b[1],k=Object(r.useState)(""),E=gc()(k,2),T=E[0],S=E[1],C=Object(r.useState)({}),M=gc()(C,2),N=M[0],P=M[1],O=function(){var t=yc()(dc.a.mark((function t(){var e;return dc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("/values");case 2:return t.next=4,t.sent.json();case 4:return e=t.sent,t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),A=function(){var t=yc()(dc.a.mark((function t(){var e;return dc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("/file_prefix");case 2:return t.next=4,t.sent.json();case 4:return e=t.sent,t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),L=function(t){P(t)};Object(r.useEffect)((function(){yc()(dc.a.mark((function e(){var n,r,i,a;return dc.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([O(),A()]);case 2:n=e.sent,r=gc()(n,2),i=r[0],a=r[1],g(i),a.file_prefix&&x(a.file_prefix),kc(i,t.current,!1,_c,!1,a.file_prefix||"",L);case 9:case"end":return e.stop()}}),e)})))()}),[]);return i.a.createElement("div",{className:"row"},i.a.createElement("div",{className:0===Object.keys(N).length?"col-12":"col-8"},i.a.createElement("div",{className:"card"},i.a.createElement("div",{className:"card-header"},i.a.createElement("h5",{className:"card-title"},"Churn vs Complexity"),i.a.createElement("h6",{className:"text-muted"},"Click on a point for additional information")),i.a.createElement("div",{className:"card-body"},i.a.createElement("div",{className:"row"},i.a.createElement("div",{className:"col-2 col-lg-3"}),i.a.createElement("div",{className:"col-8 col-lg-6"},i.a.createElement("div",{id:"path-input-group"},i.a.createElement("label",{htmlFor:"path",className:"text-muted"},i.a.createElement("small",null,"Base Path")),i.a.createElement("div",{className:"input-group mb-3"},i.a.createElement("div",{className:"input-group-prepend"},i.a.createElement("span",{className:"input-group-text",id:"path-text"},"./".concat(w||""))),i.a.createElement("input",{type:"text",className:"form-control",placeholder:"","aria-label":"","aria-describedby":"path-text",id:"path",value:T,onChange:function(e){S(e.target.value),kc(v,t.current,a,p,s,"".concat(w).concat(e.target.value),L)}})))),i.a.createElement("div",{className:"col-2 col-lg-3"})),i.a.createElement("div",{className:"d-flex justify-items-center",id:"canvas-wrapper"},i.a.createElement("div",{id:"canvas",ref:t})),i.a.createElement("div",{className:"mt-3"},i.a.createElement("h6",{className:"text-muted"},i.a.createElement("strong",null,"Display options")),i.a.createElement("form",null,i.a.createElement("div",{className:"form-row"},i.a.createElement("div",{className:"form-group col-2"},i.a.createElement("input",{checked:s,className:"form-check-input",type:"checkbox",id:"filenames-check",onChange:function(){c(!s),kc(v,t.current,a,p,!s,"".concat(w).concat(T),L)}}),i.a.createElement("label",{className:"form-check-label text-muted",htmlFor:"filenames-check"},i.a.createElement("small",null,"Display filenames"))),i.a.createElement("div",{className:"form-group col-2"},i.a.createElement("input",{checked:a,className:"form-check-input",type:"checkbox",id:"regression-check",onChange:function(){o(!a),kc(v,t.current,!a,p,s,"".concat(w).concat(T),L)}}),i.a.createElement("label",{className:"form-check-label text-muted",htmlFor:"regression-check"},i.a.createElement("small",null,"Display regression"))),i.a.createElement("div",{className:"form-group col-3"},i.a.createElement("label",{htmlFor:"regression-type",className:"text-muted"},i.a.createElement("small",null,"Regression Type")),i.a.createElement("select",{id:"regression-type",className:"form-control",onChange:function(e){d(parseInt(e.currentTarget.value)),kc(v,t.current,a,parseInt(e.currentTarget.value),s,"".concat(w).concat(T),L)}},i.a.createElement("option",{selected:!0,value:"0"},"Power Law"),i.a.createElement("option",{value:"1"},"Linear"))))))))),Object.keys(N).length>0&&i.a.createElement("div",{className:"col-4"},i.a.createElement("div",{className:"card"},i.a.createElement("div",{className:"card-header"},i.a.createElement("h5",{className:"card-title"},N.file_path),i.a.createElement("h6",{className:"text-muted"},"Additional information"),i.a.createElement("button",{type:"button",className:"close","aria-label":"Close",onClick:function(){P({})}},i.a.createElement("span",{"aria-hidden":"true"},"×"))),i.a.createElement("div",{className:"card-body"},i.a.createElement("h6",{className:"text-muted"},i.a.createElement("strong",null,"Method Teardown")),i.a.createElement("table",{className:"table table-borderless mt-0 method-table"},i.a.createElement("tbody",null,Object.entries(N.details).map((function(t){var e=gc()(t,2),n=e[0],r=e[1];return i.a.createElement("tr",{className:"row",key:n},i.a.createElement("td",{className:"px-3 py-1 col-9 text-truncate"},n),i.a.createElement("td",{className:"px-3 py-1 col-3"},Math.round(100*r)/100))})))),i.a.createElement("h6",{className:"text-muted mt-3"},"Git history (last 10 commits)"),i.a.createElement("table",{className:"table table-borderless mt-0 method-table"},i.a.createElement("tbody",null,N.history.map((function(t){var e=gc()(t,2),n=e[0],r=e[1];return i.a.createElement("tr",{className:"row",key:n},i.a.createElement("td",{className:"px-3 py-1 col-3 text-truncate"},n),i.a.createElement("td",{className:"px-3 py-1 col-8 text-truncate"},r))}))))))))},xc=function(t,e){switch(t){case bc:return"y = ".concat(e.a.toFixed(2)," x + ").concat(e.b.toFixed(2));case _c:default:return"y = ".concat(e.a.toFixed(2)," x ^ ").concat(e.b.toFixed(2))}},kc=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};e.innerHTML="";var l=600,u=600;t=t.filter((function(t){return t.file_path.startsWith(a)}));var s={top:20,right:30,bottom:30,left:40},c=Bo().domain(h(t.filter((function(t){return t.y>0})),(function(t){return t.x*t.y}))).range(["green","red"]),f=Bo().domain(h(t.filter((function(t){return t.y>0})),(function(t){return t.x*t.y}))).range(["lightgreen","tomato"]),p=zo().domain(h(t,(function(t){return t.x}))).nice().range([s.left,l-s.right]),d=zo().domain(h(t,(function(t){return t.y}))).nice().range([u-s.bottom,s.top]),m=function(t){return t.attr("transform","translate(0,".concat(u-s.bottom,")")).call(U(p)).call((function(t){return t.select(".domain").remove()})).call((function(t){return t.append("text").attr("x",l/2+s.left).attr("y",30).attr("fill","#000").attr("font-size",12).attr("font-weight","bold").attr("text-anchor","end").text("Churn")}))},y=function(t){return t.attr("transform","translate(".concat(s.left,",0)")).call(R(d)).call((function(t){return t.select(".domain").remove()})).call((function(t){return t.append("text").attr("y",-30).attr("x",-u/2).attr("transform","rotate(-90)").attr("fill","#000").attr("font-size",12).attr("text-anchor","start").attr("font-weight","bold").text("Complexity")}))},v=Zu().x((function(t){return p(t[0])})).y((function(t){return d(t[1])})),g=ee(e).append("svg").attr("viewBox",[0,0,l,u]),_=g.append("g");if(_.append("g").attr("class","axis").call(m).selectAll(".tick line").classed("baseline",(function(t){return 0===t})),_.append("g").attr("class","axis").call(y).selectAll(".tick line").classed("baseline",(function(t){return 0===t})),_.append("g").attr("stroke-width",1.5).attr("font-family","Red Hat Text").attr("font-size",12).selectAll("g").data(t).join("g").attr("transform",(function(t){return"translate(".concat(p(t.x),",").concat(d(t.y),")")})).call((function(t){return t.append("circle").attr("fill",(function(t){return f(t.x*t.y)})).attr("stroke",(function(t){return c(t.x*t.y)})).attr("style","cursor:pointer").attr("r",4)})).call((function(t){return i?t.append("text").attr("dy","0.35em").attr("x",7).attr("style","cursor:pointer").text((function(t){return t.file_path})):null})).on("click",(function(t){o(t)})),n){var w=function(e){switch(e){case bc:return fc().x((function(t){return t.x})).y((function(t){return t.y})).domain([3,b(t,(function(t){return t.x}))]);case _c:default:return t=t.filter((function(t){return t.y>0})),hc().x((function(t){return t.x})).y((function(t){return t.y})).domain([3,b(t,(function(t){return t.x}))])}}(r),x=w(t);_.append("g").attr("font-family","Red Hat Text").attr("font-size",24).call((function(e){return e.append("path").attr("class","regression").datum(w(t)).attr("d",v)})).call((function(t){return t.append("text").attr("dy","60").attr("dx","33%").text("R^2 = ".concat(x.rSquared.toFixed(2)))})).call((function(t){return t.append("text").attr("dy","30").attr("dx","33%").text(xc(r,x))}))}},Ec=n(9),Tc=n(1),Sc=n.n(Tc);function Cc(t){return(Cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Nc(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Mc(t,e,n[e])}))}return t}function Pc(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},a=Object.keys(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r<a.length;r++)n=a[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Oc(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function Ac(t){return e=t,(e-=0)==e?t:(t=t.replace(/[\-_\s]+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))).substr(0,1).toLowerCase()+t.substr(1);var e}var Lc=!1;try{Lc=!0}catch(t){}function zc(t){return null===t?null:"object"===Cc(t)&&t.prefix&&t.iconName?t:Array.isArray(t)&&2===t.length?{prefix:t[0],iconName:t[1]}:"string"==typeof t?{prefix:"fas",iconName:t}:void 0}function Uc(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?Mc({},t,e):{}}function Rc(t){var e=t.icon,n=t.mask,r=t.symbol,i=t.className,a=t.title,o=zc(e),l=Uc("classes",[].concat(Oc(function(t){var e,n=t.spin,r=t.pulse,i=t.fixedWidth,a=t.inverse,o=t.border,l=t.listItem,u=t.flip,s=t.size,c=t.rotation,f=t.pull,h=(Mc(e={"fa-spin":n,"fa-pulse":r,"fa-fw":i,"fa-inverse":a,"fa-border":o,"fa-li":l,"fa-flip-horizontal":"horizontal"===u||"both"===u,"fa-flip-vertical":"vertical"===u||"both"===u},"fa-".concat(s),void 0!==s),Mc(e,"fa-rotate-".concat(c),void 0!==c),Mc(e,"fa-pull-".concat(f),void 0!==f),Mc(e,"fa-swap-opacity",t.swapOpacity),e);return Object.keys(h).map((function(t){return h[t]?t:null})).filter((function(t){return t}))}(t)),Oc(i.split(" ")))),u=Uc("transform","string"==typeof t.transform?Ec.b.transform(t.transform):t.transform),s=Uc("mask",zc(n)),c=Object(Ec.a)(o,Nc({},l,u,s,{symbol:r,title:a}));if(!c)return function(){var t;!Lc&&console&&"function"==typeof console.error&&(t=console).error.apply(t,arguments)}("Could not find icon",o),null;var f=c.abstract,h={};return Object.keys(t).forEach((function(e){Rc.defaultProps.hasOwnProperty(e)||(h[e]=t[e])})),Fc(f[0],h)}Rc.displayName="FontAwesomeIcon",Rc.propTypes={border:Sc.a.bool,className:Sc.a.string,mask:Sc.a.oneOfType([Sc.a.object,Sc.a.array,Sc.a.string]),fixedWidth:Sc.a.bool,inverse:Sc.a.bool,flip:Sc.a.oneOf(["horizontal","vertical","both"]),icon:Sc.a.oneOfType([Sc.a.object,Sc.a.array,Sc.a.string]),listItem:Sc.a.bool,pull:Sc.a.oneOf(["right","left"]),pulse:Sc.a.bool,rotation:Sc.a.oneOf([90,180,270]),size:Sc.a.oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:Sc.a.bool,symbol:Sc.a.oneOfType([Sc.a.bool,Sc.a.string]),title:Sc.a.string,transform:Sc.a.oneOfType([Sc.a.string,Sc.a.object]),swapOpacity:Sc.a.bool},Rc.defaultProps={border:!1,className:"",mask:null,fixedWidth:!1,inverse:!1,flip:null,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,symbol:!1,title:"",transform:null,swapOpacity:!1};var Fc=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var i=(n.children||[]).map((function(n){return t(e,n)})),a=Object.keys(n.attributes||{}).reduce((function(t,e){var r=n.attributes[e];switch(e){case"class":t.attrs.className=r,delete n.attributes.class;break;case"style":t.attrs.style=function(t){return t.split(";").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,e){var n,r=e.indexOf(":"),i=Ac(e.slice(0,r)),a=e.slice(r+1).trim();return i.startsWith("webkit")?t[(n=i,n.charAt(0).toUpperCase()+n.slice(1))]=a:t[i]=a,t}),{})}(r);break;default:0===e.indexOf("aria-")||0===e.indexOf("data-")?t.attrs[e.toLowerCase()]=r:t.attrs[Ac(e)]=r}return t}),{attrs:{}}),o=r.style,l=void 0===o?{}:o,u=Pc(r,["style"]);return a.attrs.style=Nc({},a.attrs.style,l),e.apply(void 0,[n.tag,Nc({},a.attrs,u)].concat(Oc(i)))}.bind(null,i.a.createElement),Ic={prefix:"fas",iconName:"arrow-right",icon:[448,512,[],"f061","M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"]};function Dc(){var t=Object(r.useState)(95),e=gc()(t,2),n=e[0],a=e[1],o=Object(r.useState)([]),l=gc()(o,2),u=l[0],s=l[1],c=function(){var t=yc()(dc.a.mark((function t(e){var n;return dc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("/suggestions?t=".concat(e));case 2:return t.next=4,t.sent.json();case 4:n=t.sent,s(n);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){c(n)}),[]),i.a.createElement("div",{className:"card"},i.a.createElement("div",{className:"card-body"},i.a.createElement("div",{className:"d-flex justify-content-between"},i.a.createElement("div",null,i.a.createElement("h5",{className:"card-title"},"Refactoring Candidates"),i.a.createElement("h6",{className:"card-subtitle text-muted"},"Top 95 Percentile of Churn * Complexity")),i.a.createElement("div",{id:"percentile-input-group"},i.a.createElement("label",{htmlFor:"percentile",className:"text-muted"},i.a.createElement("small",null,"Percentile")),i.a.createElement("div",{className:"input-group align-items-start"},i.a.createElement("input",{type:"text",className:"form-control",placeholder:"","aria-label":"","aria-describedby":"percentile-button",id:"percentile",value:n,onChange:function(t){return a(t.target.value)}}),i.a.createElement("div",{className:"input-group-append"},i.a.createElement("button",{className:"btn btn-dark",type:"button",id:"percentile-button",onClick:function(t){t.preventDefault(),c(n)}},i.a.createElement(Rc,{icon:Ic})))))),i.a.createElement("table",{className:"table mt-4"},i.a.createElement("thead",null,i.a.createElement("tr",null,i.a.createElement("th",{scope:"col"},"File Path"),i.a.createElement("th",{scope:"col"},"Churn"),i.a.createElement("th",{scope:"col"},"Complexity"),i.a.createElement("th",{scope:"col"},"Churn * Complexity"))),i.a.createElement("tbody",{id:"suggestions-table"},u.map((function(t){return i.a.createElement("tr",{key:t.file_path},i.a.createElement("td",null,t.file_path),i.a.createElement("td",null,t.x),i.a.createElement("td",null,Math.round(t.y)),i.a.createElement("td",null,Math.round(t.x*t.y)))}))))))}document.addEventListener("DOMContentLoaded",(function(){document.getElementById("react-graph")&&(o.a.render(i.a.createElement(wc,null),document.getElementById("react-graph")),o.a.render(i.a.createElement(Dc,null),document.getElementById("react-suggestions")))})),window.chart=kc}]); \ No newline at end of file