attractor 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11835b70ba787d947df52990eb130dd226a33dca6081905d3d8358e87d8425fa
4
- data.tar.gz: 5d6908e051be5d673b98d331d6e7549df112652b133918621ba4ed7d022f1e1b
3
+ metadata.gz: 3a0acbe6a12975ea7a7aef0aceb983b61b45b3ec6bb7f3da95f2aaa992761011
4
+ data.tar.gz: 9541fe95c00fd300b2ce44bb9c19eb5c0819bb5eb69959bbe8270d56dd031fb3
5
5
  SHA512:
6
- metadata.gz: 7aa8164fb88a2addaf36f180cfca2e58701c5700fc5a61111fd4cf11a6b3506f4b2d19645befc3f7f9dd39604e4339de2fc28b4d97d41997a549f02ed318c331
7
- data.tar.gz: 5cccb6fa1fbf7b55d01a1473b3d6303cb509ae7914b97d55b08899661983112c041cfd35d125dbea2393defe0a83fea21c2a49423f60a2f1745bc973dab5b996
6
+ metadata.gz: d25be5b596d5af43eee4ba6827d483f3c9daa6a4be37c9dcb740906b81ea30c9dd8c4a5f7610ff994f38385ce1346f1cccb3c4892fd68214f99057e71b11b057
7
+ data.tar.gz: ee49bd39b824ce6918514ecbb9ef913a7bed6d7fdb2dd79982cd097755121ba1af49e94764aafbd2511ed827b085a202f222c187d52162a003c6ae15eb4f4002
@@ -0,0 +1,25 @@
1
+ {
2
+ "files": [
3
+ "README.md"
4
+ ],
5
+ "imageSize": 100,
6
+ "commit": false,
7
+ "contributors": [
8
+ {
9
+ "login": "julianrubisch",
10
+ "name": "Julian Rubisch",
11
+ "avatar_url": "https://avatars0.githubusercontent.com/u/4352208?v=4",
12
+ "profile": "http://www.julianrubisch.at",
13
+ "contributions": [
14
+ "code",
15
+ "doc"
16
+ ]
17
+ }
18
+ ],
19
+ "contributorsPerLine": 7,
20
+ "projectName": "attractor",
21
+ "projectOwner": "julianrubisch",
22
+ "repoType": "github",
23
+ "repoHost": "https://github.com",
24
+ "skipCi": true
25
+ }
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## RELEASE 1.1.0
2
+
3
+ * FEATURE: Auto-detect ruby and js projects
4
+
1
5
  ## RELEASE 1.0.2
2
6
 
3
7
  * ENHANCEMENT: make launching of browser optional
data/README.md CHANGED
@@ -1,9 +1,25 @@
1
1
  # Attractor ![build status](https://travis-ci.org/julianrubisch/attractor.svg?branch=master) <img src="https://user-images.githubusercontent.com/4352208/65411858-3dc84200-ddee-11e9-99b6-c9cdbeb533c5.png" width="32">
2
+ <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
3
+ [![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
4
+ <!-- ALL-CONTRIBUTORS-BADGE:END -->
2
5
 
3
6
  ![attractor_v0 6 1](https://user-images.githubusercontent.com/4352208/67033292-b41e4280-f115-11e9-8c91-81b3bea4451c.gif)
4
7
 
5
8
  Many authors ([Michael Feathers](https://www.agileconnection.com/article/getting-empirical-about-refactoring), [Sandi Metz](https://www.sandimetz.com/blog/2017/9/13/breaking-up-the-behemoth)) have shown that an evaluation of churn vs complexity of files in software projects provide a valuable metric towards code quality. This is another take on the matter, for ruby code, using the `churn` and `flog` projects.
6
9
 
10
+ ## Table of Contents
11
+
12
+ * [Installation](#installation)
13
+ * [Usage](#usage)
14
+ + [Live Reloading](#live-reloading)
15
+ * [CI Usage](#ci-usage)
16
+ + [Gitlab Example](#gitlab-example)
17
+ * [CLI Commands and Options](#cli-commands-and-options)
18
+ * [Development](#development)
19
+ * [Contributing](#contributing)
20
+ * [Social](#social)
21
+ * [Logo Attribution](#logo-attribution)
22
+
7
23
  ## Installation
8
24
 
9
25
  Add this line to your application's Gemfile:
@@ -54,6 +70,29 @@ Enable rack-livereload:
54
70
 
55
71
  If you have `guard-livereload` (or a similar service) running on your project, you can leverage the hot reloading functionality by specifying `--watch|-w`. Attractor will then live-reload the browser window when a file watched by `guard-livereload` changes.
56
72
 
73
+ ## CI Usage
74
+
75
+ To use this CLI in a CI environment, use the `--ci` option, which will suppress automatic opening of a browser window.
76
+
77
+ ### Gitlab Example
78
+
79
+ The simplest use case is to store the `attractor_output` directory as an artifact.
80
+
81
+ ```yml
82
+ attractor:
83
+ stage: your-stage-label
84
+ image: ruby:latest
85
+ script:
86
+ - gem install attractor
87
+ - attractor report --ci
88
+ artifacts:
89
+ when: on_success
90
+ paths:
91
+ - attractor_output
92
+ ```
93
+
94
+ Alternatively,
95
+
57
96
  ## CLI Commands and Options
58
97
 
59
98
  Print a simple output to console:
@@ -96,3 +135,22 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/julian
96
135
 
97
136
  ## Logo Attribution
98
137
  [Black Hole by Eynav Raphael from the Noun Project](https://thenounproject.com/term/black-hole/1043893)
138
+
139
+ ## Contributors ✨
140
+
141
+ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
142
+
143
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
144
+ <!-- prettier-ignore-start -->
145
+ <!-- markdownlint-disable -->
146
+ <table>
147
+ <tr>
148
+ <td align="center"><a href="http://www.julianrubisch.at"><img src="https://avatars0.githubusercontent.com/u/4352208?v=4" width="100px;" alt=""/><br /><sub><b>Julian Rubisch</b></sub></a><br /><a href="https://github.com/julianrubisch/attractor/commits?author=julianrubisch" title="Code">💻</a> <a href="https://github.com/julianrubisch/attractor/commits?author=julianrubisch" title="Documentation">📖</a></td>
149
+ </tr>
150
+ </table>
151
+
152
+ <!-- markdownlint-enable -->
153
+ <!-- prettier-ignore-end -->
154
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
155
+
156
+ This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
@@ -35,4 +35,4 @@ object-assign
35
35
  *
36
36
  * This source code is licensed under the MIT license found in the
37
37
  * LICENSE file in the root directory of this source tree.
38
- */Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case i:switch(t=t.type){case f:case h:case o:case u:case l:case d:return t;default:switch(t=t&&t.$$typeof){case c:case p:case s:return t;default:return e}}case v:case y:case a:return e}}}function x(t){return w(t)===h}e.typeOf=w,e.AsyncMode=f,e.ConcurrentMode=h,e.ContextConsumer=c,e.ContextProvider=s,e.Element=i,e.ForwardRef=p,e.Fragment=o,e.Lazy=v,e.Memo=y,e.Portal=a,e.Profiler=u,e.StrictMode=l,e.Suspense=d,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===h||t===u||t===l||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===y||t.$$typeof===s||t.$$typeof===c||t.$$typeof===p||t.$$typeof===g||t.$$typeof===_||t.$$typeof===b)},e.isAsyncMode=function(t){return x(t)||w(t)===f},e.isConcurrentMode=x,e.isContextConsumer=function(t){return w(t)===c},e.isContextProvider=function(t){return w(t)===s},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===i},e.isForwardRef=function(t){return w(t)===p},e.isFragment=function(t){return w(t)===o},e.isLazy=function(t){return w(t)===v},e.isMemo=function(t){return w(t)===y},e.isPortal=function(t){return w(t)===a},e.isProfiler=function(t){return w(t)===u},e.isStrictMode=function(t){return w(t)===l},e.isSuspense=function(t){return w(t)===d}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),a=n(40),o=n.n(a),l=n(2),u=n.n(l),s=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var c,f,h=(1===(c=s).length&&(f=c,c=function(t,e){return s(f(t),e)}),{left:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;c(t[i],e)<0?n=i+1:r=i}return n},right:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;c(t[i],e)>0?r=i:n=i+1}return n}}),p=h.right;var d=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]},m=Array.prototype,y=m.slice,v=(m.map,function(t){return function(){return t}}),g=function(t){return t},_=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a},b=Math.sqrt(50),w=Math.sqrt(10),x=Math.sqrt(2);var k=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},E=function(){var t=g,e=d,n=k;function r(r){var i,a,o=r.length,l=new Array(o);for(i=0;i<o;++i)l[i]=t(r[i],i,r);var u,s,c,f,h,d,m=e(l),y=m[0],v=m[1],g=n(l,y,v);Array.isArray(g)||(u=y,s=v,c=g,f=Math.abs(s-u)/Math.max(0,c),h=Math.pow(10,Math.floor(Math.log(f)/Math.LN10)),(d=f/h)>=b?h*=10:d>=w?h*=5:d>=x&&(h*=2),g=s<u?-h:h,g=_(Math.ceil(y/g)*g,v,g));for(var k=g.length;g[0]<=y;)g.shift(),--k;for(;g[k-1]>v;)g.pop(),--k;var E,T=new Array(k+1);for(i=0;i<=k;++i)(E=T[i]=[]).x0=i>0?g[i-1]:y,E.x1=i<k?g[i]:v;for(i=0;i<o;++i)y<=(a=l[i])&&a<=v&&T[p(g,a,0,k)].push(r[i]);return T}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:v(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:v([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?v(y.call(t)):v(t),r):n},r},T=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};var S=Array.prototype.slice,C=function(t){return t},M=1,N=2,P=3,O=4,A=1e-6;function F(t){return"translate("+(t+.5)+",0)"}function L(t){return"translate(0,"+(t+.5)+")"}function R(t){return function(e){return+t(e)}}function z(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function j(){return!this.__axis}function I(t,e){var n=[],r=null,i=null,a=6,o=6,l=3,u=t===M||t===O?-1:1,s=t===O||t===N?"x":"y",c=t===M||t===P?F:L;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):C:i,d=Math.max(a,0)+l,m=e.range(),y=+m[0]+.5,v=+m[m.length-1]+.5,g=(e.bandwidth?z:R)(e.copy()),_=f.selection?f.selection():f,b=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(h,e).order(),x=w.exit(),k=w.enter().append("g").attr("class","tick"),E=w.select("line"),T=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(k),E=E.merge(k.append("line").attr("stroke","currentColor").attr(s+"2",u*a)),T=T.merge(k.append("text").attr("fill","currentColor").attr(s,u*d).attr("dy",t===M?"0em":t===P?"0.71em":"0.32em")),f!==_&&(b=b.transition(f),w=w.transition(f),E=E.transition(f),T=T.transition(f),x=x.transition(f).attr("opacity",A).attr("transform",(function(t){return isFinite(t=g(t))?c(t):this.getAttribute("transform")})),k.attr("opacity",A).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===O||t==N?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))})),E.attr(s+"2",u*a),T.attr(s,u*d).text(p),_.filter(j).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===N?"start":t===O?"end":"middle"),_.each((function(){this.__axis=g}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=S.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:S.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:S.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 I(P,t)}function D(t){return I(O,t)}var H={value:function(){}};function $(){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 W(r)}function W(t){this._=t}function B(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 q(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Y(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=H,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}W.prototype=$.prototype={constructor:W,on:function(t,e){var n,r=this._,i=B(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]=Y(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Y(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=q(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new W(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 V=$,X="http://www.w3.org/1999/xhtml",Q={svg:"http://www.w3.org/2000/svg",xhtml:X,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},K=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Q.hasOwnProperty(e)?{space:Q[e],local:t}:t};function G(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===X&&e.documentElement.namespaceURI===X?e.createElement(t):e.createElementNS(n,t)}}function Z(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var J=function(t){var e=K(t);return(e.local?Z:G)(e)};function tt(){}var et=function(t){return null==t?tt:function(){return this.querySelector(t)}};function nt(){return[]}var rt=function(t){return null==t?nt:function(){return this.querySelectorAll(t)}},it=function(t){return function(){return this.matches(t)}},at=function(t){return new Array(t.length)};function ot(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ot.prototype={constructor:ot,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 lt="$";function ut(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 ot(t,a[l]);for(;l<u;++l)(o=e[l])&&(i[l]=o)}function st(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=lt+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=lt+o.call(t,a[l],l,a)])?(r[l]=u,u.__data__=a[l],c[s]=null):n[l]=new ot(t,a[l]);for(l=0;l<f;++l)(u=e[l])&&c[p[l]]===u&&(i[l]=u)}function ct(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ft(t){return function(){this.removeAttribute(t)}}function ht(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pt(t,e){return function(){this.setAttribute(t,e)}}function dt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function mt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function yt(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 vt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function gt(t){return function(){this.style.removeProperty(t)}}function _t(t,e,n){return function(){this.style.setProperty(t,e,n)}}function bt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function wt(t,e){return t.style.getPropertyValue(e)||vt(t).getComputedStyle(t,null).getPropertyValue(e)}function xt(t){return function(){delete this[t]}}function kt(t,e){return function(){this[t]=e}}function Et(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Tt(t){return t.trim().split(/^|\s+/)}function St(t){return t.classList||new Ct(t)}function Ct(t){this._node=t,this._names=Tt(t.getAttribute("class")||"")}function Mt(t,e){for(var n=St(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Nt(t,e){for(var n=St(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Pt(t){return function(){Mt(this,t)}}function Ot(t){return function(){Nt(this,t)}}function At(t,e){return function(){(e.apply(this,arguments)?Mt:Nt)(this,t)}}Ct.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 Ft(){this.textContent=""}function Lt(t){return function(){this.textContent=t}}function Rt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function zt(){this.innerHTML=""}function jt(t){return function(){this.innerHTML=t}}function It(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Ut(){this.nextSibling&&this.parentNode.appendChild(this)}function Dt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ht(){return null}function $t(){var t=this.parentNode;t&&t.removeChild(this)}function Wt(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function Bt(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var qt={},Yt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(qt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Vt(t,e,n){return t=Xt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Xt(t,e,n){return function(r){var i=Yt;Yt=r;try{t.call(this,this.__data__,e,n)}finally{Yt=i}}}function Qt(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 Kt(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 Gt(t,e,n){var r=qt.hasOwnProperty(t.type)?Vt:Xt;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 Zt(t,e,n){var r=vt(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 Jt(t,e){return function(){return Zt(this,t,e)}}function te(t,e){return function(){return Zt(this,t,e.apply(this,arguments))}}var ee=[null];function ne(t,e){this._groups=t,this._parents=e}function re(){return new ne([[document.documentElement]],ee)}ne.prototype=re.prototype={constructor:ne,select:function(t){"function"!=typeof t&&(t=et(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 ne(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=rt(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 ne(r,i)},filter:function(t){"function"!=typeof t&&(t=it(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 ne(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?st:ut,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 ne(l,i))._enter=u,l._exit=s,l},enter:function(){return new ne(this._enter||this._groups.map(at),this._parents)},exit:function(){return new ne(this._exit||this._groups.map(at),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 ne(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=ct);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 ne(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=K(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?ht:ft:"function"==typeof e?n.local?yt:mt:n.local?dt:pt)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?gt:"function"==typeof e?bt:_t)(t,e,null==n?"":n)):wt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?xt:"function"==typeof e?Et:kt)(t,e)):this.node()[t]},classed:function(t,e){var n=Tt(t+"");if(arguments.length<2){for(var r=St(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?At:e?Pt:Ot)(n,e))},text:function(t){return arguments.length?this.each(null==t?Ft:("function"==typeof t?Rt:Lt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?zt:("function"==typeof t?It:jt)(t)):this.node().innerHTML},raise:function(){return this.each(Ut)},lower:function(){return this.each(Dt)},append:function(t){var e="function"==typeof t?t:J(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:J(t),r=null==e?Ht:"function"==typeof e?e:et(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each($t)},clone:function(t){return this.select(t?Bt:Wt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Qt(t+""),o=a.length;if(!(arguments.length<2)){for(l=e?Gt:Kt,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?te:Jt)(t,e))}};var ie=re,ae=function(t){return"string"==typeof t?new ne([[document.querySelector(t)]],[document.documentElement]):new ne([[t]],ee)},oe=0;function le(){this._="@"+(++oe).toString(36)}le.prototype=function(){return new le}.prototype={constructor:le,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 ue(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}ue.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var se=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function ce(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function fe(){}var he="\\s*([+-]?\\d+)\\s*",pe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",de="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",me=/^#([0-9a-f]{3,8})$/,ye=new RegExp("^rgb\\("+[he,he,he]+"\\)$"),ve=new RegExp("^rgb\\("+[de,de,de]+"\\)$"),ge=new RegExp("^rgba\\("+[he,he,he,pe]+"\\)$"),_e=new RegExp("^rgba\\("+[de,de,de,pe]+"\\)$"),be=new RegExp("^hsl\\("+[pe,de,de]+"\\)$"),we=new RegExp("^hsla\\("+[pe,de,de,pe]+"\\)$"),xe={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 ke(){return this.rgb().formatHex()}function Ee(){return this.rgb().formatRgb()}function Te(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=me.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Se(e):3===n?new Pe(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Pe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Pe(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=ye.exec(t))?new Pe(e[1],e[2],e[3],1):(e=ve.exec(t))?new Pe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ge.exec(t))?Ce(e[1],e[2],e[3],e[4]):(e=_e.exec(t))?Ce(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=be.exec(t))?Le(e[1],e[2]/100,e[3]/100,1):(e=we.exec(t))?Le(e[1],e[2]/100,e[3]/100,e[4]):xe.hasOwnProperty(t)?Se(xe[t]):"transparent"===t?new Pe(NaN,NaN,NaN,0):null}function Se(t){return new Pe(t>>16&255,t>>8&255,255&t,1)}function Ce(t,e,n,r){return r<=0&&(t=e=n=NaN),new Pe(t,e,n,r)}function Me(t){return t instanceof fe||(t=Te(t)),t?new Pe((t=t.rgb()).r,t.g,t.b,t.opacity):new Pe}function Ne(t,e,n,r){return 1===arguments.length?Me(t):new Pe(t,e,n,null==r?1:r)}function Pe(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Oe(){return"#"+Fe(this.r)+Fe(this.g)+Fe(this.b)}function Ae(){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 Fe(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Le(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new je(t,e,n,r)}function Re(t){if(t instanceof je)return new je(t.h,t.s,t.l,t.opacity);if(t instanceof fe||(t=Te(t)),!t)return new je;if(t instanceof je)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 je(o,l,u,t.opacity)}function ze(t,e,n,r){return 1===arguments.length?Re(t):new je(t,e,n,null==r?1:r)}function je(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ie(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}se(fe,Te,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ke,formatHex:ke,formatHsl:function(){return Re(this).formatHsl()},formatRgb:Ee,toString:Ee}),se(Pe,Ne,ce(fe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Pe(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Pe(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:Oe,formatHex:Oe,formatRgb:Ae,toString:Ae})),se(je,ze,ce(fe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new je(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new je(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 Pe(Ie(t>=240?t-240:t+120,i,r),Ie(t,i,r),Ie(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 De=function(t){return function(){return t}};function He(t,e){return function(n){return t+n*e}}function $e(t,e){var n=e-t;return n?He(t,n>180||n<-180?n-360*Math.round(n/360):n):De(isNaN(t)?e:t)}function We(t){return 1==(t=+t)?Be: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):De(isNaN(e)?n:e)}}function Be(t,e){var n=e-t;return n?He(t,n):De(isNaN(t)?e:t)}var qe=function t(e){var n=We(e);function r(t,e){var r=n((t=Ne(t)).r,(e=Ne(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Be(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 Ye(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=Ne(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+""}}}Ye((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)}})),Ye((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 Ve=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]=an(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}},Xe=function(t,e){var n=new Date;return e-=t=+t,function(r){return n.setTime(t+e*r),n}},Qe=function(t,e){return e-=t=+t,function(n){return t+e*n}},Ke=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]=an(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},Ge=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ze=new RegExp(Ge.source,"g");var Je,tn,en,nn,rn=function(t,e){var n,r,i,a=Ge.lastIndex=Ze.lastIndex=0,o=-1,l=[],u=[];for(t+="",e+="";(n=Ge.exec(t))&&(r=Ze.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:Qe(n,r)})),a=Ze.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("")})},an=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?De(e):("number"===r?Qe:"string"===r?(n=Te(e))?(e=n,qe):rn:e instanceof Te?qe:e instanceof Date?Xe:Array.isArray(e)?Ve:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ke:Qe)(t,e)},on=function(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}},ln=180/Math.PI,un={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},sn=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)*ln,skewX:Math.atan(u)*ln,scaleX:o,scaleY:l}};function cn(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:Qe(t,i)},{i:u-2,x:Qe(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:Qe(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:Qe(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:Qe(t,n)},{i:l-2,x:Qe(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 fn=cn((function(t){return"none"===t?un:(Je||(Je=document.createElement("DIV"),tn=document.documentElement,en=document.defaultView),Je.style.transform=t,t=en.getComputedStyle(tn.appendChild(Je),null).getPropertyValue("transform"),tn.removeChild(Je),t=t.slice(7,-1).split(","),sn(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),hn=cn((function(t){return null==t?un:(nn||(nn=document.createElementNS("http://www.w3.org/2000/svg","g")),nn.setAttribute("transform",t),(t=nn.transform.baseVal.consolidate())?(t=t.matrix,sn(t.a,t.b,t.c,t.d,t.e,t.f)):un)}),", ",")",")");Math.SQRT2;function pn(t){return function(e,n){var r=t((e=ze(e)).h,(n=ze(n)).h),i=Be(e.s,n.s),a=Be(e.l,n.l),o=Be(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+""}}}pn($e),pn(Be);var dn=Math.PI/180,mn=180/Math.PI,yn=.96422,vn=1,gn=.82521,_n=4/29,bn=6/29,wn=3*bn*bn,xn=bn*bn*bn;function kn(t){if(t instanceof Tn)return new Tn(t.l,t.a,t.b,t.opacity);if(t instanceof An)return Fn(t);t instanceof Pe||(t=Me(t));var e,n,r=Nn(t.r),i=Nn(t.g),a=Nn(t.b),o=Sn((.2225045*r+.7168786*i+.0606169*a)/vn);return r===i&&i===a?e=n=o:(e=Sn((.4360747*r+.3850649*i+.1430804*a)/yn),n=Sn((.0139322*r+.0971045*i+.7141733*a)/gn)),new Tn(116*o-16,500*(e-o),200*(o-n),t.opacity)}function En(t,e,n,r){return 1===arguments.length?kn(t):new Tn(t,e,n,null==r?1:r)}function Tn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Sn(t){return t>xn?Math.pow(t,1/3):t/wn+_n}function Cn(t){return t>bn?t*t*t:wn*(t-_n)}function Mn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Nn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Pn(t){if(t instanceof An)return new An(t.h,t.c,t.l,t.opacity);if(t instanceof Tn||(t=kn(t)),0===t.a&&0===t.b)return new An(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*mn;return new An(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function On(t,e,n,r){return 1===arguments.length?Pn(t):new An(t,e,n,null==r?1:r)}function An(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Fn(t){if(isNaN(t.h))return new Tn(t.l,0,0,t.opacity);var e=t.h*dn;return new Tn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function Ln(t){return function(e,n){var r=t((e=On(e)).h,(n=On(n)).h),i=Be(e.c,n.c),a=Be(e.l,n.l),o=Be(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+""}}}se(Tn,En,ce(fe,{brighter:function(t){return new Tn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Tn(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 Pe(Mn(3.1338561*(e=yn*Cn(e))-1.6168667*(t=vn*Cn(t))-.4906146*(n=gn*Cn(n))),Mn(-.9787684*e+1.9161415*t+.033454*n),Mn(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),se(An,On,ce(fe,{brighter:function(t){return new An(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new An(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Fn(this).rgb()}}));Ln($e),Ln(Be);var Rn=-.29227,zn=-.90649,jn=1.97294,In=jn*zn,Un=1.78277*jn,Dn=1.78277*Rn- -.14861*zn;function Hn(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof $n)return new $n(t.h,t.s,t.l,t.opacity);t instanceof Pe||(t=Me(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Dn*r+In*e-Un*n)/(Dn+In-Un),a=r-i,o=(jn*(n-i)-Rn*a)/zn,l=Math.sqrt(o*o+a*a)/(jn*i*(1-i)),u=l?Math.atan2(o,a)*mn-120:NaN;return new $n(u<0?u+360:u,l,i,t.opacity)}(t):new $n(t,e,n,null==r?1:r)}function $n(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Wn(t){return function e(n){function r(e,r){var i=t((e=Hn(e)).h,(r=Hn(r)).h),a=Be(e.s,r.s),o=Be(e.l,r.l),l=Be(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)}se($n,Hn,ce(fe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new $n(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new $n(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*dn,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Pe(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(Rn*r+zn*i)),255*(e+n*(jn*r)),this.opacity)}}));Wn($e),Wn(Be);var Bn,qn,Yn=0,Vn=0,Xn=0,Qn=1e3,Kn=0,Gn=0,Zn=0,Jn="object"==typeof performance&&performance.now?performance:Date,tr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function er(){return Gn||(tr(nr),Gn=Jn.now()+Zn)}function nr(){Gn=0}function rr(){this._call=this._time=this._next=null}function ir(t,e,n){var r=new rr;return r.restart(t,e,n),r}function ar(){Gn=(Kn=Jn.now())+Zn,Yn=Vn=0;try{!function(){er(),++Yn;for(var t,e=Bn;e;)(t=Gn-e._time)>=0&&e._call.call(null,t),e=e._next;--Yn}()}finally{Yn=0,function(){var t,e,n=Bn,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:Bn=e);qn=t,lr(r)}(),Gn=0}}function or(){var t=Jn.now(),e=t-Kn;e>Qn&&(Zn-=e,Kn=t)}function lr(t){Yn||(Vn&&(Vn=clearTimeout(Vn)),t-Gn>24?(t<1/0&&(Vn=setTimeout(ar,t-Jn.now()-Zn)),Xn&&(Xn=clearInterval(Xn))):(Xn||(Kn=Jn.now(),Xn=setInterval(or,Qn)),Yn=1,tr(ar)))}rr.prototype=ir.prototype={constructor:rr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?er():+n)+(null==e?0:+e),this._next||qn===this||(qn?qn._next=this:Bn=this,qn=this),this._call=t,this._time=n,lr()},stop:function(){this._call&&(this._call=null,this._time=1/0,lr())}};var ur=function(t,e,n){var r=new rr;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},sr=V("start","end","cancel","interrupt"),cr=[],fr=0,hr=1,pr=2,dr=3,mr=4,yr=5,vr=6,gr=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!==hr)return l();for(s in i)if((h=i[s]).name===n.name){if(h.state===dr)return ur(a);h.state===mr?(h.state=vr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[s]):+s<e&&(h.state=vr,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[s])}if(ur((function(){n.state===dr&&(n.state=mr,n.timer.restart(o,n.delay,n.time),o(u))})),n.state=pr,n.on.call("start",t,t.__data__,n.index,n.group),n.state===pr){for(n.state=dr,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=yr,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);n.state===yr&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=vr,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=ir((function(t){n.state=hr,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:sr,tween:cr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:fr})};function _r(t,e){var n=wr(t,e);if(n.state>fr)throw new Error("too late; already scheduled");return n}function br(t,e){var n=wr(t,e);if(n.state>dr)throw new Error("too late; already running");return n}function wr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var xr=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>pr&&n.state<yr,n.state=vr,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 kr(t,e){var n,r;return function(){var i=br(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 Er(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=br(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 Tr(t,e,n){var r=t._id;return t.each((function(){var t=br(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return wr(t,r).value[e]}}var Sr=function(t,e){var n;return("number"==typeof e?Qe:e instanceof Te?qe:(n=Te(e))?(e=n,qe):rn)(t,e)};function Cr(t){return function(){this.removeAttribute(t)}}function Mr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Nr(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 Pr(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 Or(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 Ar(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 Fr(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 Lr(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 Rr(t,e){return function(){_r(this,t).delay=+e.apply(this,arguments)}}function zr(t,e){return e=+e,function(){_r(this,t).delay=e}}function jr(t,e){return function(){br(this,t).duration=+e.apply(this,arguments)}}function Ir(t,e){return e=+e,function(){br(this,t).duration=e}}function Ur(t,e){if("function"!=typeof e)throw new Error;return function(){br(this,t).ease=e}}function Dr(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)?_r:br;return function(){var o=a(this,t),l=o.on;l!==r&&(i=(r=l).copy()).on(e,n),o.on=i}}var Hr=ie.prototype.constructor;function $r(t){return function(){this.style.removeProperty(t)}}function Wr(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 Br=0;function qr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Yr(){return++Br}var Vr=ie.prototype;qr.prototype=function(t){return ie().transition(t)}.prototype={constructor:qr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=et(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,gr(f[h],e,n,h,f,wr(l,n)));return new qr(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=rt(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=wr(u,n),m=0,y=p.length;m<y;++m)(h=p[m])&&gr(h,e,n,m,p,d);a.push(p),o.push(u)}return new qr(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=it(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 qr(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 qr(o,this._parents,this._name,this._id)},selection:function(){return new Hr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Yr(),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=wr(o,e);gr(o,t,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new qr(r,this._parents,t,n)},call:Vr.call,nodes:Vr.nodes,node:Vr.node,size:Vr.size,empty:Vr.empty,each:Vr.each,on:function(t,e){var n=this._id;return arguments.length<2?wr(this.node(),n).on.on(t):this.each(Dr(n,t,e))},attr:function(t,e){var n=K(t),r="transform"===n?hn:Sr;return this.attrTween(t,"function"==typeof e?(n.local?Ar:Or)(n,r,Tr(this,"attr."+t,e)):null==e?(n.local?Mr:Cr)(n):(n.local?Pr:Nr)(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=K(t);return this.tween(n,(r.local?Fr:Lr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?fn:Sr;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=wt(this,t),o=(this.style.removeProperty(t),wt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,$r(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=wt(this,t),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(t),u=l=wt(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,l))}}(t,r,Tr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,l="end."+o;return function(){var u=br(this,t),s=u.on,c=null==u.value[o]?a||(a=$r(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=wt(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,Wr(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}}(Tr(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=wr(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?kr:Er)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Rr:zr)(e,t)):wr(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?jr:Ir)(e,t)):wr(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Ur(e,t)):wr(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=br(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 Xr=2*Math.PI,Qr=(function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Xr);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Xr)},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/=Xr);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*Xr)},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/=Xr);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*Xr)},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 Kr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Qr.time=er(),Qr;return n}ie.prototype.interrupt=function(t){return this.each((function(){xr(this,t)}))},ie.prototype.transition=function(t){var e,n;t instanceof qr?(e=t._id,t=t._name):(e=Yr(),(n=Qr).time=er(),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])&&gr(o,t,e,s,l,n||Kr(o,e));return new qr(r,this._parents,t,e)};function Gr(t){return[+t[0],+t[1]]}function Zr(t){return[Gr(t[0]),Gr(t[1])]}["w","e"].map(Jr),["n","s"].map(Jr),["n","w","e","s","nw","ne","sw","se"].map(Jr);function Jr(t){return{type:t}}var ti=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var ei=function(t){return 1===t.length&&(t=function(t){return function(e,n){return ti(t(e),n)}}(t)),{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}}}(ti);ei.right,ei.left;var ni=Array.prototype;ni.slice,ni.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);Math.cos,Math.sin,Math.PI,Math.max;Array.prototype.slice;var ri=Math.PI,ii=2*ri,ai=ii-1e-6;function oi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function li(){return new oi}oi.prototype=li.prototype={constructor:oi,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((ri-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%ii+ii),f>ai?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>=ri)+","+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 ui=li;function si(){}function ci(t,e){var n=new si;if(t instanceof si)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}si.prototype=ci.prototype={constructor:si,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 fi=ci;function hi(){}var pi=fi.prototype;function di(t,e){var n=new hi;if(t instanceof hi)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}hi.prototype=di.prototype={constructor:hi,has:pi.has,add:function(t){return this["$"+(t+="")]=t,this},remove:pi.remove,clear:pi.clear,values:pi.keys,size:pi.size,empty:pi.empty,each:pi.each};var mi=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var yi=function(t){return 1===t.length&&(t=function(t){return function(e,n){return mi(t(e),n)}}(t)),{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}}}(mi);yi.right,yi.left;var vi=Array.prototype;vi.slice,vi.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);Array.prototype.slice;var gi={},_i={},bi=34,wi=10,xi=13;function ki(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+"]"})).join(",")+"}")}function Ei(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 Ti(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Si(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Ti(-e,6):e>9999?"+"+Ti(e,6):Ti(e,4))+"-"+Ti(t.getUTCMonth()+1,2)+"-"+Ti(t.getUTCDate(),2)+(a?"T"+Ti(n,2)+":"+Ti(r,2)+":"+Ti(i,2)+"."+Ti(a,3)+"Z":i?"T"+Ti(n,2)+":"+Ti(r,2)+":"+Ti(i,2)+"Z":r||n?"T"+Ti(n,2)+":"+Ti(r,2)+"Z":"")}var Ci=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 _i;if(s)return s=!1,gi;var e,r,i=o;if(t.charCodeAt(i)===bi){for(;o++<a&&t.charCodeAt(o)!==bi||t.charCodeAt(++o)===bi;);return(e=o)>=a?u=!0:(r=t.charCodeAt(o++))===wi?s=!0:r===xi&&(s=!0,t.charCodeAt(o)===wi&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if((r=t.charCodeAt(e=o++))===wi)s=!0;else if(r===xi)s=!0,t.charCodeAt(o)===wi&&++o;else if(r!==n)continue;return t.slice(i,e)}return u=!0,t.slice(i,a)}for(t.charCodeAt(a-1)===wi&&--a,t.charCodeAt(a-1)===xi&&--a;(r=c())!==_i;){for(var f=[];r!==gi&&r!==_i;)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?Si(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=ki(t);return function(r,i){return e(n(r),i,t)}}(t,e):ki(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=Ei(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Ei(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")}}},Mi=Ci(","),Ni=Mi.parse,Pi=(Mi.parseRows,Mi.format,Mi.formatBody,Mi.formatRows,Ci("\t")),Oi=Pi.parse;Pi.parseRows,Pi.format,Pi.formatBody,Pi.formatRows;function Ai(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var Fi=function(t,e){return fetch(t,e).then(Ai)};function Li(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),Fi(e,n).then((function(e){return t(e,r)}))}}Li(Ni),Li(Oi);function Ri(t){return function(e,n){return Fi(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}Ri("application/xml"),Ri("text/html"),Ri("image/svg+xml");function zi(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 ji=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function Ii(t){return t[0]}function Ui(t){return t[1]}function Di(t,e,n){var r=new Hi(null==e?Ii:e,null==n?Ui:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Hi(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 $i(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Wi=Di.prototype=Hi.prototype;Wi.copy=function(){var t,e,n=new Hi(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=$i(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]=$i(e));return n},Wi.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return zi(this.cover(e,n),e,n,t)},Wi.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)zi(this,o[n],l[n],t[n]);return this},Wi.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},Wi.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Wi.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]]},Wi.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 ji(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 ji(m[3],y,v,o,l),new ji(m[2],i,v,y,l),new ji(m[1],y,a,o,v),new ji(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},Wi.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)},Wi.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Wi.root=function(){return this._root},Wi.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Wi.visit=function(t){var e,n,r,i,a,o,l=[],u=this._root;for(u&&l.push(new ji(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 ji(n,s,c,a,o)),(n=u[2])&&l.push(new ji(n,r,c,s,o)),(n=u[1])&&l.push(new ji(n,s,i,a,c)),(n=u[0])&&l.push(new ji(n,r,i,s,c))}return this},Wi.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new ji(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 ji(a,o,l,c,f)),(a=i[1])&&n.push(new ji(a,c,l,u,f)),(a=i[2])&&n.push(new ji(a,o,f,c,s)),(a=i[3])&&n.push(new ji(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},Wi.x=function(t){return arguments.length?(this._x=t,this):this._x},Wi.y=function(t){return arguments.length?(this._y=t,this):this._y};Math.PI,Math.sqrt(5);var Bi=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)]},qi=function(t){return(t=Bi(Math.abs(t)))?t[1]:NaN},Yi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Vi(t){if(!(e=Yi.exec(t)))throw new Error("invalid format: "+t);var e;return new Xi({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 Xi(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+""}Vi.prototype=Xi.prototype,Xi.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 Qi,Ki,Gi,Zi,Ji=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},ta=function(t,e){var n=Bi(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")},ea={"%":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 ta(100*t,e)},r:ta,s:function(t,e){var n=Bi(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Qi=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")+Bi(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)}},na=function(t){return t},ra=Array.prototype.map,ia=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];Ki=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?na:(e=ra.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?na:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ra.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=Vi(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"):ea[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=ea[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=Ji(t)),E&&0==+t&&(E=!1),h=(E?"("===f?f:s:"-"===f||"("===f?"":f)+h,k=("s"===g?ia[8+Qi/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=Vi(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(qi(e)/3))),i=Math.pow(10,-r),a=ia[8+r/3];return function(t){return n(i*t)+a}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Gi=Ki.format,Zi=Ki.formatPrefix;var aa=function(){return new oa};function oa(){this.reset()}oa.prototype={constructor:oa,reset:function(){this.s=this.t=0},add:function(t){ua(la,t,this.t),ua(this,la.s,this.s),this.s?this.t+=la.t:this.s=la.t},valueOf:function(){return this.s}};var la=new oa;function ua(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var sa=1e-6,ca=1e-12,fa=Math.PI,ha=fa/2,pa=fa/4,da=2*fa,ma=fa/180,ya=Math.abs,va=Math.atan,ga=Math.atan2,_a=Math.cos,ba=(Math.ceil,Math.exp),wa=(Math.floor,Math.log),xa=(Math.pow,Math.sin),ka=Math.sign||function(t){return t>0?1:t<0?-1:0},Ea=Math.sqrt,Ta=Math.tan;function Sa(t){return t>1?0:t<-1?fa:Math.acos(t)}function Ca(t){return t>1?ha:t<-1?-ha:Math.asin(t)}function Ma(){}aa(),aa();function Na(t){var e=t[0],n=t[1],r=_a(n);return[r*_a(e),r*xa(e),xa(n)]}function Pa(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 Oa(t){var e=Ea(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}aa();function Aa(t,e){return[ya(t)>fa?t+Math.round(-t/da)*da:t,e]}Aa.invert=Aa;var Fa=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:Ma,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},La=function(t,e){return ya(t[0]-e[0])<sa&&ya(t[1]-e[1])<sa};function Ra(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 za=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(La(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 Ra(r,t,null,!0)),u.push(n.o=new Ra(r,null,n,!1)),l.push(n=new Ra(o,t,null,!1)),u.push(n.o=new Ra(o,null,n,!0))}})),l.length){for(u.sort(e),ja(l),ja(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 ja(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 Ia=aa();function Ua(t){return ya(t[0])<=fa?t[0]:ka(t[0])*((ya(t[0])+fa)%da-fa)}var Da=function(t,e){var n=Ua(e),r=e[1],i=xa(r),a=[xa(n),-_a(n),0],o=0,l=0;Ia.reset(),1===i?r=ha+sa:-1===i&&(r=-ha-sa);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=Ua(h),d=h[1]/2+pa,m=xa(d),y=_a(d),v=0;v<f;++v,p=_,m=w,y=x,h=g){var g=c[v],_=Ua(g),b=g[1]/2+pa,w=xa(b),x=_a(b),k=_-p,E=k>=0?1:-1,T=E*k,S=T>fa,C=m*w;if(Ia.add(ga(C*E*xa(T),y*x+C*_a(T))),o+=S?k+E*da:k,S^p>=n^_>=n){var M=Pa(Na(h),Na(g));Oa(M);var N=Pa(a,M);Oa(N);var P=(S^k>=0?-1:1)*Ca(N[2]);(r>P||r===P&&(M[0]||M[1]))&&(l+=S^k>=0?1:-1)}}return(o<-sa||o<sa&&Ia<-sa)^1&l},Ha=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var $a=function(t){return 1===t.length&&(t=function(t){return function(e,n){return Ha(t(e),n)}}(t)),{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}}}(Ha);$a.right,$a.left;var Wa=Array.prototype;Wa.slice,Wa.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var Ba=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 qa=function(t,e,n,r){return function(i){var a,o,l,u=e(i),s=Fa(),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=Ba(o);var t=Da(a,r);o.length?(f||(i.polygonStart(),f=!0),za(o,Va,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(Ya))}return h}};function Ya(t){return t.length>1}function Va(t,e){return((t=t.x)[0]<0?t[1]-ha-sa:ha-t[1])-((e=e.x)[0]<0?e[1]-ha-sa:ha-e[1])}qa((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?fa:-fa,u=ya(a-n);ya(u-fa)<sa?(t.point(n,r=(r+o)/2>0?ha:-ha),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(a,r),e=0):i!==l&&u>=fa&&(ya(n-i)<sa&&(n-=i*sa),ya(a-l)<sa&&(a-=l*sa),r=function(t,e,n,r){var i,a,o=xa(t-n);return ya(o)>sa?va((xa(e)*(a=_a(r))*xa(n)-xa(r)*(i=_a(e))*xa(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*ha,r.point(-fa,i),r.point(0,i),r.point(fa,i),r.point(fa,0),r.point(fa,-i),r.point(0,-i),r.point(-fa,-i),r.point(-fa,0),r.point(-fa,i);else if(ya(t[0]-e[0])>sa){var a=t[0]<e[0]?fa:-fa;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-fa,-ha]);aa();aa(),aa();function Xa(t){this._context=t}Xa.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,da)}},result:Ma};aa();function Qa(){this._string=[]}function Ka(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Qa.prototype={_radius:4.5,_circle:Ka(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=Ka(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 Ga(t){return function(e){var n=new Za;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Za(){}Za.prototype={constructor:Za,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()}};_a(30*ma);Ga({point:function(t,e){this.stream.point(t*ma,e*ma)}});function Ja(t){return function(e,n){var r=_a(e),i=_a(n),a=t(r*i);return[a*i*xa(e),a*xa(n)]}}function to(t){return function(e,n){var r=Ea(e*e+n*n),i=t(r),a=xa(i),o=_a(i);return[ga(e*a,r*o),Ca(r&&n*a/r)]}}var eo=Ja((function(t){return Ea(2/(1+t))}));eo.invert=to((function(t){return 2*Ca(t/2)}));var no=Ja((function(t){return(t=Sa(t))&&t/xa(t)}));no.invert=to((function(t){return t}));function ro(t,e){return[t,wa(Ta((ha+e)/2))]}ro.invert=function(t,e){return[t,2*va(ba(e))-ha]};function io(t,e){return[t,e]}io.invert=io;var ao=1.340264,oo=-.081106,lo=893e-6,uo=.003796,so=Ea(3)/2;function co(t,e){var n=Ca(so*xa(e)),r=n*n,i=r*r*r;return[t*_a(n)/(so*(ao+3*oo*r+i*(7*lo+9*uo*r))),n*(ao+oo*r+i*(lo+uo*r))]}co.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*(ao+oo*i+a*(lo+uo*i))-e)/(ao+3*oo*i+a*(7*lo+9*uo*i)))*r)*i*i,!(ya(n)<ca));++o);return[so*t*(ao+3*oo*i+a*(7*lo+9*uo*i))/_a(r),Ca(xa(r)/so)]};function fo(t,e){var n=_a(e),r=_a(t)*n;return[n*xa(t)/r,xa(e)/r]}fo.invert=to(va);function ho(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)))]}ho.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(ya(n)>sa&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};function po(t,e){return[_a(e)*xa(t),xa(e)]}po.invert=to(Ca);function mo(t,e){var n=_a(e),r=1+_a(t)*n;return[n*xa(t)/r,xa(e)/r]}mo.invert=to((function(t){return 2*va(t)}));function yo(t,e){return[wa(Ta((ha+e)/2)),-t]}yo.invert=function(t,e){return[-e,2*va(ba(t))-ha]};function vo(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 go(t,e){var n,r,i,a,o,l=new xo(t),u=+t.value&&(l.value=t.value),s=[l];for(null==e&&(e=_o);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 xo(i[a])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(wo)}function _o(t){return t.children}function bo(t){t.data=t.data.data}function wo(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function xo(t){this.data=t,this.depth=this.height=0,this.parent=null}xo.prototype=go.prototype={constructor:xo,count:function(){return this.eachAfter(vo)},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 go(this).eachBefore(bo)}};Array.prototype.slice;function ko(t){if("function"!=typeof t)throw new Error;return t}function Eo(){return 0}var To=function(t){return function(){return t}};var So=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},Co=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 Mo(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}Mo.prototype=Object.create(xo.prototype);var No=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},Po=(1+Math.sqrt(5))/2;function Oo(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?Co(o,n,r,i,x?r+=s*c/x:a):No(o,n,r,x?n+=u*c/x:i,a),x-=c,_=b}return v}var Ao=function t(e){function n(t,n,r,i,a){Oo(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(Po);(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?Co(l,n,r,i,r+=(a-r)*l.value/p):No(l,n,r,n+=(i-n)*l.value/p,a),p-=l.value}else t._squarify=o=Oo(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n})(Po);var Fo=function(){return Math.random()},Lo=(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}(Fo),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}(Fo)),Ro=(function t(e){function n(){var t=Lo.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Fo),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}(Fo)),zo=(function t(e){function n(t){var n=Ro.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Fo),function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Fo),function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}),jo=function(t){return 1===t.length&&(t=function(t){return function(e,n){return zo(t(e),n)}}(t)),{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 Io=jo(zo),Uo=Io.right,Do=(Io.left,Uo);var Ho=Array.prototype,$o=(Ho.slice,Ho.map,Math.sqrt(50)),Wo=Math.sqrt(10),Bo=Math.sqrt(2),qo=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=Yo(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 Yo(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>=$o?10:a>=Wo?5:a>=Bo?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=$o?10:a>=Wo?5:a>=Bo?2:1)}function Vo(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>=$o?i*=10:a>=Wo?i*=5:a>=Bo&&(i*=2),e<t?-i:i}function Xo(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Qo=Array.prototype,Ko=Qo.map,Go=Qo.slice,Zo={name:"implicit"};function Jo(){var t=fi(),e=[],n=[],r=Zo;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==Zo)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=fi();for(var r,a,o=-1,l=n.length;++o<l;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=Go.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Jo(e,n).unknown(r)},Xo.apply(i,arguments),i}var tl=function(t){return function(){return t}},el=function(t){return+t},nl=[0,1];function rl(t){return t}function il(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:tl(isNaN(e)?NaN:.5)}function al(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 ol(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=il(i,r),a=n(o,a)):(r=il(r,i),a=n(a,o)),function(t){return a(r(t))}}function ll(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]=il(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=Do(t,e,1,r)-1;return a[n](i[n](e))}}function ul(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function sl(){var t,e,n,r,i,a,o=nl,l=nl,u=an,s=rl;function c(){return r=Math.min(o.length,l.length)>2?ll:ol,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),Qe)))(n)))},f.domain=function(t){return arguments.length?(o=Ko.call(t,el),s===rl||(s=al(o)),c()):o.slice()},f.range=function(t){return arguments.length?(l=Go.call(t),c()):l.slice()},f.rangeRound=function(t){return l=Go.call(t),u=on,c()},f.clamp=function(t){return arguments.length?(s=t?al(o):rl,f):s!==rl},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 cl(t,e){return sl()(t,e)}var fl=function(t,e,n,r){var i,a=Vo(t,e,n);switch((r=Vi(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(qi(e)/3)))-qi(Math.abs(t)))}(a,o))||(r.precision=i),Zi(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,qi(e)-qi(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,-qi(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Gi(r)};function hl(t){var e=t.domain;return t.ticks=function(t){var n=e();return qo(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return fl(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=Yo(l,u,n))>0?r=Yo(l=Math.floor(l/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Yo(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 pl(){var t=cl(rl,rl);return t.copy=function(){return ul(t,pl())},Xo.apply(t,arguments),hl(t)}var dl=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 ml(t){return Math.log(t)}function yl(t){return Math.exp(t)}function vl(t){return-Math.log(-t)}function gl(t){return-Math.exp(-t)}function _l(t){return isFinite(t)?+("1e"+t):t<0?0:t}function bl(t){return function(e){return-t(-e)}}function wl(t){var e,n,r=t(ml,yl),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?_l:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=bl(e),n=bl(n),t(vl,gl)):t(ml,yl),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=qo(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=Gi(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(dl(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function xl(){var t=wl(sl()).domain([1,10]);return t.copy=function(){return ul(t,xl()).base(t.base())},Xo.apply(t,arguments),t}var kl=new Date,El=new Date;function Tl(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 Tl((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 kl.setTime(+e),El.setTime(+r),t(kl),t(El),Math.floor(n(kl,El))},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 Sl=Tl((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()}));Sl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Tl((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 Cl=Sl,Ml=(Sl.range,Tl((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()}))),Nl=(Ml.range,6e4),Pl=6048e5;function Ol(t){return Tl((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())*Nl)/Pl}))}var Al=Ol(0),Fl=Ol(1),Ll=Ol(2),Rl=Ol(3),zl=Ol(4),jl=Ol(5),Il=Ol(6),Ul=(Al.range,Fl.range,Ll.range,Rl.range,zl.range,jl.range,Il.range,Tl((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())*Nl)/864e5}),(function(t){return t.getDate()-1}))),Dl=Ul,Hl=(Ul.range,Tl((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*Nl)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()}))),$l=(Hl.range,Tl((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+e*Nl)}),(function(t,e){return(e-t)/Nl}),(function(t){return t.getMinutes()}))),Wl=($l.range,Tl((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()}))),Bl=(Wl.range,Tl((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t})));Bl.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Tl((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Bl:null};Bl.range;function ql(t){return Tl((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)/Pl}))}var Yl=ql(0),Vl=ql(1),Xl=ql(2),Ql=ql(3),Kl=ql(4),Gl=ql(5),Zl=ql(6),Jl=(Yl.range,Vl.range,Xl.range,Ql.range,Kl.range,Gl.range,Zl.range,Tl((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}))),tu=Jl,eu=(Jl.range,Tl((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()})));eu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Tl((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 nu=eu;eu.range;function ru(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 iu(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 au(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}var ou,lu,uu,su={"-":"",_:" ",0:"0"},cu=/^\s*\d+/,fu=/^%/,hu=/[\\^$*+?|[\]().{}]/g;function pu(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 du(t){return t.replace(hu,"\\$&")}function mu(t){return new RegExp("^(?:"+t.map(du).join("|")+")","i")}function yu(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function vu(t,e,n){var r=cu.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function gu(t,e,n){var r=cu.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function _u(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function bu(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function wu(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function xu(t,e,n){var r=cu.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ku(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Eu(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 Tu(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Su(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Cu(t,e,n){var r=cu.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Mu(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Nu(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Pu(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ou(t,e,n){var r=cu.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Au(t,e,n){var r=cu.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Fu(t,e,n){var r=fu.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Lu(t,e,n){var r=cu.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Ru(t,e,n){var r=cu.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function zu(t,e){return pu(t.getDate(),e,2)}function ju(t,e){return pu(t.getHours(),e,2)}function Iu(t,e){return pu(t.getHours()%12||12,e,2)}function Uu(t,e){return pu(1+Dl.count(Cl(t),t),e,3)}function Du(t,e){return pu(t.getMilliseconds(),e,3)}function Hu(t,e){return Du(t,e)+"000"}function $u(t,e){return pu(t.getMonth()+1,e,2)}function Wu(t,e){return pu(t.getMinutes(),e,2)}function Bu(t,e){return pu(t.getSeconds(),e,2)}function qu(t){var e=t.getDay();return 0===e?7:e}function Yu(t,e){return pu(Al.count(Cl(t),t),e,2)}function Vu(t,e){var n=t.getDay();return t=n>=4||0===n?zl(t):zl.ceil(t),pu(zl.count(Cl(t),t)+(4===Cl(t).getDay()),e,2)}function Xu(t){return t.getDay()}function Qu(t,e){return pu(Fl.count(Cl(t),t),e,2)}function Ku(t,e){return pu(t.getFullYear()%100,e,2)}function Gu(t,e){return pu(t.getFullYear()%1e4,e,4)}function Zu(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+pu(e/60|0,"0",2)+pu(e%60,"0",2)}function Ju(t,e){return pu(t.getUTCDate(),e,2)}function ts(t,e){return pu(t.getUTCHours(),e,2)}function es(t,e){return pu(t.getUTCHours()%12||12,e,2)}function ns(t,e){return pu(1+tu.count(nu(t),t),e,3)}function rs(t,e){return pu(t.getUTCMilliseconds(),e,3)}function is(t,e){return rs(t,e)+"000"}function as(t,e){return pu(t.getUTCMonth()+1,e,2)}function os(t,e){return pu(t.getUTCMinutes(),e,2)}function ls(t,e){return pu(t.getUTCSeconds(),e,2)}function us(t){var e=t.getUTCDay();return 0===e?7:e}function ss(t,e){return pu(Yl.count(nu(t),t),e,2)}function cs(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Kl(t):Kl.ceil(t),pu(Kl.count(nu(t),t)+(4===nu(t).getUTCDay()),e,2)}function fs(t){return t.getUTCDay()}function hs(t,e){return pu(Vl.count(nu(t),t),e,2)}function ps(t,e){return pu(t.getUTCFullYear()%100,e,2)}function ds(t,e){return pu(t.getUTCFullYear()%1e4,e,4)}function ms(){return"+0000"}function ys(){return"%"}function vs(t){return+t}function gs(t){return Math.floor(+t/1e3)}!function(t){ou=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=mu(i),c=yu(i),f=mu(a),h=yu(a),p=mu(o),d=yu(o),m=mu(l),y=yu(l),v=mu(u),g=yu(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:zu,e:zu,f:Hu,H:ju,I:Iu,j:Uu,L:Du,m:$u,M:Wu,p:function(t){return i[+(t.getHours()>=12)]},Q:vs,s:gs,S:Bu,u:qu,U:Yu,V:Vu,w:Xu,W:Qu,x:null,X:null,y:Ku,Y:Gu,Z:Zu,"%":ys},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:Ju,e:Ju,f:is,H:ts,I:es,j:ns,L:rs,m:as,M:os,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:vs,s:gs,S:ls,u:us,U:ss,V:cs,w:fs,W:hs,x:null,X:null,y:ps,Y:ds,Z:ms,"%":ys},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:Su,e:Su,f:Au,H:Mu,I:Mu,j:Cu,L:Ou,m:Tu,M:Nu,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:Lu,s:Ru,S:Pu,u:gu,U:_u,V:bu,w:vu,W:wu,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:ku,Y:xu,Z:Eu,"%":Fu};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=su[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=au(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=iu(au(a.y))).getUTCDay(),r=i>4||0===i?Vl.ceil(r):Vl(r),r=tu.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(au(a.y))).getDay(),r=i>4||0===i?Fl.ceil(r):Fl(r),r=Dl.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?iu(au(a.y)).getUTCDay():e(au(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,iu(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 su?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+="",ru);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,iu);return e.toString=function(){return t},e}}}(t),ou.format,ou.parse,lu=ou.utcFormat,uu=ou.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||lu("%Y-%m-%dT%H:%M:%S.%LZ");+new Date("2000-01-01T00:00:00.000Z")||uu("%Y-%m-%dT%H:%M:%S.%LZ");var _s=Tl((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()})),bs=(_s.range,Tl((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()}))),ws=(bs.range,Tl((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*Nl)}),(function(t,e){return(e-t)/Nl}),(function(t){return t.getUTCMinutes()})));ws.range;var xs=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ks=function(t){return function(){return t}},Es=(Math.abs,Math.atan2,Math.cos,Math.max,Math.min,Math.sin,Math.sqrt,1e-12),Ts=Math.PI,Ss=2*Ts;function Cs(t){this._context=t}Cs.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 Ms=function(t){return new Cs(t)};function Ns(t){return t[0]}function Ps(t){return t[1]}var Os=function(){var t=Ns,e=Ps,n=ks(!0),r=null,i=Ms,a=null;function o(o){var l,u,s,c=o.length,f=!1;for(null==r&&(a=i(s=ui())),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:ks(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:ks(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:ks(!!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};Fs(Ms);function As(t){this._curve=t}function Fs(t){function e(e){return new As(t(e))}return e._curve=t,e}As.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 Ls=Math.sin(Ts/10)/Math.sin(7*Ts/10),Rs=(Math.sin(Ss/10),Math.cos(Ss/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12),function(){});function zs(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 js(t){this._context=t}js.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:zs(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:zs(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:Rs,areaEnd:Rs,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:zs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Us(t){this._context=t}Us.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:zs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Ds(t,e){this._basis=new js(t),this._beta=e}Ds.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 js(t):new Ds(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function Hs(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 $s(t,e){this._context=t,this._k=(1-e)/6}$s.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:Hs(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:Hs(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 $s(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Ws(t,e){this._context=t,this._k=(1-e)/6}Ws.prototype={areaStart:Rs,areaEnd:Rs,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:Hs(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 Ws(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Bs(t,e){this._context=t,this._k=(1-e)/6}Bs.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:Hs(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 Bs(t,e)}return n.tension=function(e){return t(+e)},n})(0);function qs(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Es){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>Es){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 Ys(t,e){this._context=t,this._alpha=e}Ys.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:qs(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 Ys(t,e):new $s(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Vs(t,e){this._context=t,this._alpha=e}Vs.prototype={areaStart:Rs,areaEnd:Rs,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:qs(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 Vs(t,e):new Ws(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Xs(t,e){this._context=t,this._alpha=e}Xs.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:qs(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 Xs(t,e):new Bs(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Qs(t){this._context=t}Qs.prototype={areaStart:Rs,areaEnd:Rs,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 Ks(t){return t<0?-1:1}function Gs(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(Ks(a)+Ks(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function Zs(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Js(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 tc(t){this._context=t}function ec(t){this._context=new nc(t)}function nc(t){this._context=t}function rc(t){this._context=t}function ic(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]}tc.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:Js(this,this._t0,Zs(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,Js(this,Zs(this,n=Gs(this,t,e)),n);break;default:Js(this,this._t0,n=Gs(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(ec.prototype=Object.create(tc.prototype)).point=function(t,e){tc.prototype.point.call(this,e,t)},nc.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)}},rc.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=ic(t),i=ic(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 ac(t,e){this._context=t,this._t=e}ac.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 oc(){this._=null}function lc(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function uc(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 sc(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 cc(t){for(;t.L;)t=t.L;return t}oc.prototype={constructor:oc,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=cc(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&&(uc(this,n),n=(t=n).U),n.C=!1,r.C=!0,sc(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(sc(this,n),n=(t=n).U),n.C=!1,r.C=!0,uc(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?cc(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,uc(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,sc(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,uc(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,sc(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,uc(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,sc(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var fc=oc;function hc(t,e,n,r){var i=[null,null],a=zc.push(i)-1;return i.left=t,i.right=e,n&&dc(i,t,e,n),r&&dc(i,e,t,r),Lc[t.index].halfedges.push(a),Lc[e.index].halfedges.push(a),i}function pc(t,e,n){var r=[e,n];return r.left=t,r}function dc(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 mc(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 yc(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 vc(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 gc(t,e){return e[+(e.left!==t.site)]}function _c(t,e){return e[+(e.left===t.site)]}var bc,wc=[];function xc(){lc(this),this.x=this.y=this.arc=this.site=this.cy=null}function kc(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=wc.pop()||new xc;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,_=Rc._;_;)if(v.y<_.y||v.y===_.y&&v.x<=_.x){if(!_.L){g=_.P;break}_=_.L}else{if(!_.R){g=_;break}_=_.R}Rc.insert(g,v),g||(bc=v)}}}}function Ec(t){var e=t.circle;e&&(e.P||(bc=e.N),Rc.remove(e),wc.push(e),lc(e),t.circle=null)}var Tc=[];function Sc(){lc(this),this.edge=this.site=this.circle=null}function Cc(t){var e=Tc.pop()||new Sc;return e.site=t,e}function Mc(t){Ec(t),Fc.remove(t),Tc.push(t),lc(t)}function Nc(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,l=[t];Mc(t);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<jc&&Math.abs(r-u.circle.cy)<jc;)a=u.P,l.unshift(u),Mc(u),u=a;l.unshift(u),Ec(u);for(var s=o;s.circle&&Math.abs(n-s.circle.x)<jc&&Math.abs(r-s.circle.cy)<jc;)o=s.N,l.push(s),Mc(s),s=o;l.push(s),Ec(s);var c,f=l.length;for(c=1;c<f;++c)s=l[c],u=l[c-1],dc(s.edge,u.site,s.site,i);u=l[0],(s=l[f-1]).edge=hc(u.site,s.site,null,i),kc(u),kc(s)}function Pc(t){for(var e,n,r,i,a=t[0],o=t[1],l=Fc._;l;)if((r=Oc(l,o)-a)>jc)l=l.L;else{if(!((i=a-Ac(l,o))>jc)){r>-jc?(e=l.P,n=l):i>-jc?(e=l,n=l.N):e=n=l;break}if(!l.R){e=l;break}l=l.R}!function(t){Lc[t.index]={site:t,halfedges:[]}}(t);var u=Cc(t);if(Fc.insert(e,u),e||n){if(e===n)return Ec(e),n=Cc(e.site),Fc.insert(u,n),u.edge=n.edge=hc(e.site,u.site),kc(e),void kc(n);if(n){Ec(e),Ec(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];dc(n.edge,s,d,b),u.edge=hc(s,t,null,b),n.edge=hc(t,d,null,b),kc(e),kc(n)}else u.edge=hc(e.site,u.site)}}function Oc(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 Ac(t,e){var n=t.N;if(n)return Oc(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Fc,Lc,Rc,zc,jc=1e-6,Ic=1e-12;function Uc(t,e){return e[1]-t[1]||e[0]-t[0]}function Dc(t,e){var n,r,i,a=t.sort(Uc).pop();for(zc=[],Lc=new Array(t.length),Fc=new fc,Rc=new fc;;)if(i=bc,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(Pc(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;Nc(i.arc)}if(function(){for(var t,e,n,r,i=0,a=Lc.length;i<a;++i)if((t=Lc[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]=vc(t,zc[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=zc.length;a--;)yc(i=zc[a],t,e,n,r)&&mc(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>jc||Math.abs(i[0][1]-i[1][1])>jc)||delete zc[a]}(o,l,u,s),function(t,e,n,r){var i,a,o,l,u,s,c,f,h,p,d,m,y=Lc.length,v=!0;for(i=0;i<y;++i)if(a=Lc[i]){for(o=a.site,l=(u=a.halfedges).length;l--;)zc[u[l]]||u.splice(l,1);for(l=0,s=u.length;l<s;)d=(p=_c(a,zc[u[l]]))[0],m=p[1],f=(c=gc(a,zc[u[++l%s]]))[0],h=c[1],(Math.abs(d-f)>jc||Math.abs(m-h)>jc)&&(u.splice(l,0,zc.push(pc(o,p,Math.abs(d-t)<jc&&r-m>jc?[t,Math.abs(f-t)<jc?h:r]:Math.abs(m-r)<jc&&n-d>jc?[Math.abs(h-r)<jc?f:n,r]:Math.abs(d-n)<jc&&m-e>jc?[n,Math.abs(f-n)<jc?h:e]:Math.abs(m-e)<jc&&d-t>jc?[Math.abs(h-e)<jc?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=Lc[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(zc.push(pc(o=v.site,x,k))-1,zc.push(pc(o,k,E))-1,zc.push(pc(o,E,T))-1,zc.push(pc(o,T,x))-1)}}for(i=0;i<y;++i)(a=Lc[i])&&(a.halfedges.length||delete Lc[i])}(o,l,u,s)}this.edges=zc,this.cells=Lc,Fc=Rc=zc=Lc=null}Dc.prototype={constructor:Dc,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return gc(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 Hc(t,e,n){this.k=t,this.x=e,this.y=n}Hc.prototype={constructor:Hc,scale:function(t){return 1===t?this:new Hc(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Hc(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 Hc(1,0,0);Hc.prototype;function $c(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 Wc(t){return 180*Math.atan2(t[1][1]-t[0][1],t[1][0]-t[0][0])/Math.PI}function Bc(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=Wc([e,u]),f=Wc([e,s]);Math.abs(c-f)>r&&(t.splice(a+1,0,s),n=!0)}var i;return n}}var qc=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=$c(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 Yc=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=Bc(f,h,m);return y.a=d,y.b=p,y.predict=m,y.rSquared=$c(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};var Vc=function(t){return t};function Xc(t,...e){return Qc(t,Vc,Vc,e)}function Qc(t,e,n,r){return function t(i,a){if(a>=r.length)return n(i);const o=new Map,l=r[a++];let u=-1;for(const t of i){const e=l(t,++u,i),n=o.get(e);n?n.push(t):o.set(e,[t])}for(const[e,n]of o)o.set(e,t(n,a));return e(o)}(t,0)}var Kc=n(8),Gc=n.n(Kc),Zc=n(3),Jc=n.n(Zc),tf=n(5),ef=n.n(tf),nf=n(11),rf=n(1),af=n.n(rf);function of(t){return(of="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 lf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uf(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){lf(t,e,n[e])}))}return t}function sf(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 cf(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 ff(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 hf=!1;try{hf=!0}catch(t){}function pf(t){return null===t?null:"object"===of(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 df(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?lf({},t,e):{}}function mf(t){var e=t.icon,n=t.mask,r=t.symbol,i=t.className,a=t.title,o=pf(e),l=df("classes",[].concat(cf(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=(lf(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),lf(e,"fa-rotate-".concat(c),void 0!==c),lf(e,"fa-pull-".concat(f),void 0!==f),lf(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)),cf(i.split(" ")))),u=df("transform","string"==typeof t.transform?nf.b.transform(t.transform):t.transform),s=df("mask",pf(n)),c=Object(nf.a)(o,uf({},l,u,s,{symbol:r,title:a}));if(!c)return function(){var t;!hf&&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){mf.defaultProps.hasOwnProperty(e)||(h[e]=t[e])})),yf(f[0],h)}mf.displayName="FontAwesomeIcon",mf.propTypes={border:af.a.bool,className:af.a.string,mask:af.a.oneOfType([af.a.object,af.a.array,af.a.string]),fixedWidth:af.a.bool,inverse:af.a.bool,flip:af.a.oneOf(["horizontal","vertical","both"]),icon:af.a.oneOfType([af.a.object,af.a.array,af.a.string]),listItem:af.a.bool,pull:af.a.oneOf(["right","left"]),pulse:af.a.bool,rotation:af.a.oneOf([90,180,270]),size:af.a.oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:af.a.bool,symbol:af.a.oneOfType([af.a.bool,af.a.string]),title:af.a.string,transform:af.a.oneOfType([af.a.string,af.a.object]),swapOpacity:af.a.bool},mf.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 yf=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=ff(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[ff(e)]=r}return t}),{attrs:{}}),o=r.style,l=void 0===o?{}:o,u=sf(r,["style"]);return a.attrs.style=uf({},a.attrs.style,l),e.apply(void 0,[n.tag,uf({},a.attrs,u)].concat(cf(i)))}.bind(null,i.a.createElement),vf={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"]},gf={prefix:"fas",iconName:"sad-tear",icon:[496,512,[],"f5b4","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zM152 416c-26.5 0-48-21-48-47 0-20 28.5-60.4 41.6-77.8 3.2-4.3 9.6-4.3 12.8 0C171.5 308.6 200 349 200 369c0 26-21.5 47-48 47zm16-176c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm170.2 154.2C315.8 367.4 282.9 352 248 352c-21.2 0-21.2-32 0-32 44.4 0 86.3 19.6 114.7 53.8 13.8 16.4-11.2 36.5-24.5 20.4z"]},_f=function(t){var e=t.activeFile,n=t.handleClose;return 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"},e.file_path),i.a.createElement("h6",{className:"text-muted"},"Additional information"),i.a.createElement("button",{type:"button",className:"close","aria-label":"Close",onClick:n},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(e.details).map((function(t){var e=u()(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,e.history.map((function(t){var e=u()(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))})))))))},bf=function(t){var e=t.state,n=t.dispatch,r=t.activePlot;return 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:e.displayFilenames,className:"form-check-input",type:"checkbox",id:"filenames-check",onChange:function(){n({type:"SET_DISPLAY_FILENAMES",displayFilenames:!e.displayFilenames})}}),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:e.displayRegression,className:"form-check-input",type:"checkbox",id:"regression-check",disabled:r!==Of.SCATTER_PLOT,onChange:function(){n({type:"SET_DISPLAY_REGRESSION",displayRegression:!e.displayRegression})}}),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 ".concat(r===Of.TREE_MAP&&"disabled")},i.a.createElement("small",null,"Regression Type")),i.a.createElement("select",{id:"regression-type",className:"form-control",disabled:r!==Of.SCATTER_PLOT,onChange:function(t){n({type:"SET_REGRESSION_TYPE",regressionType:parseInt(t.currentTarget.value)})}},i.a.createElement("option",{selected:!0,value:"0"},"Power Law"),i.a.createElement("option",{value:"1"},"Linear"))))))},wf=function(t){var e=t.fileClickCallback,n=t.values,a=t.filePrefix,o=t.displayRegression,l=t.regressionType,u=t.displayFilenames,s=t.path,c=t.activeFile,f=Object(r.useRef)(null);return Object(r.useEffect)((function(){Wf(f.current,{values:n,displayRegression:o,regressionType:l,displayFilenames:u,filePrefix:a,path:s,activeFile:c},e)})),i.a.createElement("div",{id:"canvas",ref:f})},xf=function(t){var e=t.fileClickCallback,n=t.values,a=t.filePrefix,o=t.displayRegression,l=t.regressionType,u=t.metricType,s=t.displayFilenames,c=t.path,f=t.activeFile,h=Object(r.useRef)(null);return Object(r.useEffect)((function(){Hf(h.current,{values:n,displayRegression:o,regressionType:l,metricType:u,displayFilenames:s,filePrefix:a,path:c,activeFile:f},e)})),i.a.createElement("div",{id:"canvas",ref:h})},kf=function(t){var e=t.fileClickCallback,n=t.values,a=t.filePrefix,o=t.displayRegression,l=t.regressionType,u=t.metricType,s=t.displayFilenames,c=t.path,f=t.activeFile,h=Object(r.useRef)(null);return Object(r.useEffect)((function(){$f(h.current,{values:n,displayRegression:o,regressionType:l,metricType:u,displayFilenames:s,filePrefix:a,path:c,activeFile:f},e)})),i.a.createElement("div",{id:"canvas",ref:h})},Ef=n(41),Tf=n.n(Ef);function Sf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Cf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Sf(n,!0).forEach((function(e){Tf()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sf(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Mf=function(t,e){var n=t;switch(e.type){case"SET_DISPLAY_REGRESSION":n=Cf({},t,{displayRegression:e.displayRegression});break;case"SET_DISPLAY_FILENAMES":n=Cf({},t,{displayFilenames:e.displayFilenames});break;case"SET_REGRESSION_TYPE":n=Cf({},t,{regressionType:e.regressionType});break;case"SET_METRIC_TYPE":n=Cf({},t,{metricType:e.metricType});break;case"SET_VALUES":n=Cf({},t,{values:e.values});break;case"SET_FILE_PREFIX":n=Cf({},t,{filePrefix:e.filePrefix});break;case"SET_PATH":n=Cf({},t,{path:e.path});break;case"SET_ACTIVE_FILE":n=Cf({},t,{activeFile:e.activeFile})}return n},Nf=0,Pf=1,Of={SCATTER_PLOT:0,TREE_MAP:1},Af=0,Ff=1,Lf=2,Rf={displayRegression:!1,displayFilenames:!1,regressionType:Nf,metricType:Af,values:[],filePrefix:"",path:"",activeFile:{}},zf=function(t){var e=t.type,n=t.finishedLoadingCallback,a=(t.errorCallback,Object(r.useReducer)(Mf,Rf)),o=u()(a,2),l=o[0],s=o[1],c=Object(r.useState)(0),f=u()(c,2),h=f[0],p=f[1],d=Object(r.useState)(!1),m=u()(d,2),y=m[0],v=m[1],g=function(){var t=ef()(Jc.a.mark((function t(){var n;return Jc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("/values?type=".concat(e));case 2:return t.next=4,t.sent.json();case 4:return n=t.sent,t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_=function(){var t=ef()(Jc.a.mark((function t(){var e;return Jc.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)}}();function b(t){s({type:"SET_ACTIVE_FILE",activeFile:t})}Object(r.useEffect)((function(){ef()(Jc.a.mark((function t(){var e,r,i,a;return Jc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([g(),_()]);case 2:e=t.sent,r=u()(e,2),i=r[0],a=r[1],void 0===i.error?(v(!1),s({type:"SET_VALUES",values:i}),a.file_prefix&&s({type:"SET_FILE_PREFIX",filePrefix:a.file_prefix})):v(!0),n();case 8:case"end":return t.stop()}}),t)})))()}),[e]);return i.a.createElement("div",{className:"row pt-4"},i.a.createElement("div",{className:l.activeFile&&0!==Object.keys(l.activeFile).length?"col-8":"col-12"},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-12 col-lg-4"},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(l.filePrefix||""))),i.a.createElement("input",{type:"text",className:"form-control",placeholder:"","aria-label":"","aria-describedby":"path-text",id:"path",value:l.path,onChange:function(t){t.preventDefault(),s({type:"SET_PATH",path:t.target.value})}})))),i.a.createElement("div",{className:"col-6 col-lg-4"},i.a.createElement("label",{htmlFor:"path",className:"text-muted d-block"},i.a.createElement("small",null,"Plot Type")),i.a.createElement("div",{className:"btn-group btn-group-toggle",role:"toolbar","aria-label":"Plot Type"},i.a.createElement("button",{className:"btn btn-secondary ".concat(h===Of.SCATTER_PLOT&&"active"),onClick:function(t){t.preventDefault(),p(Of.SCATTER_PLOT)}},"Scatterplot/Hist"),i.a.createElement("button",{className:"btn btn-secondary ".concat(h===Of.TREE_MAP&&"active"),onClick:function(t){t.preventDefault(),p(Of.TREE_MAP)}},"Treemap"))),i.a.createElement("div",{className:"col-6 col-lg-4"},i.a.createElement("div",{className:"form-group"},i.a.createElement("label",{htmlFor:"metric-type",className:"text-muted"},i.a.createElement("small",null,"Metric")),i.a.createElement("select",{id:"metric-type",className:"form-control",onChange:function(t){t.preventDefault(),s({type:"SET_METRIC_TYPE",metricType:parseInt(t.target.value)})}},i.a.createElement("option",{selected:!0,value:"0"},"Churn * Complexity"),i.a.createElement("option",{value:"1"},"Complexity"),i.a.createElement("option",{value:"2"},"Churn"))))),i.a.createElement("div",{className:"d-flex ".concat(y?"justify-content-center align-items-center":"justify-content-start"),id:"canvas-wrapper"},y?i.a.createElement("div",{className:"text-center error"},i.a.createElement(mf,{icon:gf,size:"6x"}),i.a.createElement("h3",null,"Oh snap!"),"There has been an error loading the churn count."):i.a.createElement(i.a.Fragment,null,h===Of.SCATTER_PLOT?l.metricType===Af?i.a.createElement(wf,Gc()({fileClickCallback:b},l)):i.a.createElement(kf,Gc()({fileClickCallback:b},l)):i.a.createElement(xf,Gc()({fileClickCallback:b},l)))),i.a.createElement(bf,{state:l,dispatch:s,activePlot:h})))),l.activeFile&&Object.keys(l.activeFile).length>0&&i.a.createElement(_f,{activeFile:l.activeFile,handleClose:function(){s({type:"SET_ACTIVE_FILE",activeFile:{}})}}))},jf=function(t,e){switch(t){case Pf:return"y = ".concat(e.a.toFixed(2)," x + ").concat(e.b.toFixed(2));case Nf:default:return"y = ".concat(e.a.toFixed(2)," x ^ ").concat(e.b.toFixed(2))}},If=function(t,e,n){return function(){var t=Ao,e=!1,n=1,r=1,i=[0],a=Eo,o=Eo,l=Eo,u=Eo,s=Eo;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(So),t}function f(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,f=e.x1-n,h=e.y1-n;f<r&&(r=f=(r+f)/2),h<c&&(c=h=(c+h)/2),e.x0=r,e.y0=c,e.x1=f,e.y1=h,e.children&&(n=i[e.depth+1]=a(e)/2,r+=s(e)-n,c+=o(e)-n,(f-=l(e)-n)<r&&(r=f=(r+f)/2),(h-=u(e)-n)<c&&(c=h=(c+h)/2),t(e,r,c,f,h))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=ko(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:To(+t),c):a},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:To(+t),c):o},c.paddingRight=function(t){return arguments.length?(l="function"==typeof t?t:To(+t),c):l},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:To(+t),c):u},c.paddingLeft=function(t){return arguments.length?(s="function"==typeof t?t:To(+t),c):s},c}().tile(Ao).size([e,n]).padding(1).round(!0)(go(t).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})))},Uf=Gi(",d"),Df=function(t){t.append("text").selectAll("tspan").data((function(t){return t.data.name.concat(Uf(t.value))})).join("tspan").attr("x",3).attr("y",(function(t,e,n){return"".concat(.3*(e===n.length-1)+1.1+.9*e,"em")})).attr("fill-opacity",(function(t,e,n){return e===n.length-1?.7:null})).text((function(t){return t}))},Hf=function(t,e){var n=e.values,r=(e.displayRegression,e.regressionType,e.metricType),i=void 0===r?0:r,a=e.displayFilenames,o=void 0!==a&&a,l=e.filePrefix,s=void 0===l?"":l,c=e.path,f=void 0===c?"":c,h=(e.activeFile,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){});t.innerHTML="";var p=600,d=600,m=Jo(xs),y=(n=n.filter((function(t){return t.file_path.startsWith("".concat(s).concat(f))}))).map((function(t){var e;switch(i){case Ff:e=t.y;break;case Lf:e=t.x;break;case Af:default:e=t.y*t.x}return{name:t.file_path.substring(s.length+1),value:e,file_path:t.file_path,details:t.details,history:t.history}})).map((function(t){return{name:t.name.split("/"),value:t.value,file_path:t.file_path,details:t.details,history:t.history}})),v={name:s,children:Array.from(Xc(y,(function(t){return t.name[0]})),(function(t){var e=u()(t,2),n=e[0],r=e[1];return{name:n,children:Array.from(Xc(r,(function(t){return t.name[1]})),(function(t){var e=u()(t,2);return{name:e[0],children:e[1]}}))}}))},g=ae(t).append("svg").attr("viewBox",[0,0,p,d]).style("font-size","10px");if(v.children.length>0){var _=If(v,p,d),b=g.selectAll("g").data(_.leaves()).join("g").attr("transform",(function(t){return"translate(".concat(t.x0,",").concat(t.y0,")")}));b.append("title").text((function(t){return"".concat(t.ancestors().reverse().map((function(t){return t.data.name})).join("/"),"\n").concat(Uf(t.value))})),b.append("rect").attr("fill",(function(t){for(;t.depth>1;)t=t.parent;return m(t.data.name)})).attr("fill-opacity",.6).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).on("click",(function(t){h(t.data)})),o&&Df(b)}},$f=function(t,e){var n=e.values,r=(e.displayRegression,e.regressionType,e.metricType),i=void 0===r?0:r,a=(e.displayFilenames,e.filePrefix),o=void 0===a?"":a,l=e.path,u=void 0===l?"":l;e.activeFile,arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.innerHTML="";var s=600,c=600;n=n.filter((function(t){return t.file_path.startsWith("".concat(o).concat(u))}));var f={top:20,right:30,bottom:30,left:40},h=ae(t).append("svg").attr("viewBox",[0,0,s,c]).style("font-size","10px"),p=n.map((function(t){return i===Ff?t.y:t.x})),m=pl().domain(d(p)).range(["green","red"]),y=pl().domain(d(p)).nice(20).range([f.left,s-f.right]),v=E().domain(y.domain()).thresholds(y.ticks(20))(p),g=pl().domain([0,T(v,(function(t){return t.length}))]).nice().range([c-f.bottom,f.top]),_=function(t){return t.attr("transform","translate(0,".concat(c-f.bottom,")")).call(U(y).tickSizeOuter(0))},b=function(t){return t.attr("transform","translate(".concat(f.left,",0)")).call(D(g))};h.append("g").selectAll("rect").data(v).join("rect").attr("fill",(function(t){return m(t.x0)})).attr("x",(function(t){return y(t.x0)+1})).attr("width",(function(t){return Math.max(0,y(t.x1)-y(t.x0)-1)})).attr("y",(function(t){return g(t.length)})).attr("height",(function(t){return g(0)-g(t.length)})),h.append("g").call(_),h.append("g").call(b)},Wf=function(t,e){var n=e.values,r=e.displayRegression,i=void 0===r||r,a=e.regressionType,o=void 0===a?0:a,l=(e.metricType,e.displayFilenames),u=void 0!==l&&l,s=e.filePrefix,c=void 0===s?"":s,f=e.path,h=void 0===f?"":f,p=(e.activeFile,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){});t.innerHTML="";var m=600,y=600;n=n.filter((function(t){return t.file_path.startsWith("".concat(c).concat(h))}));var v={top:20,right:30,bottom:30,left:40},g=xl().domain(d(n.filter((function(t){return t.y>0})),(function(t){return t.x*t.y}))).range(["green","red"]),_=xl().domain(d(n.filter((function(t){return t.y>0})),(function(t){return t.x*t.y}))).range(["lightgreen","tomato"]),b=pl().domain(d(n,(function(t){return t.x}))).nice().range([v.left,m-v.right]),w=pl().domain(d(n,(function(t){return t.y}))).nice().range([y-v.bottom,v.top]),x=function(t){return t.attr("transform","translate(0,".concat(y-v.bottom,")")).call(U(b)).call((function(t){return t.select(".domain").remove()})).call((function(t){return t.append("text").attr("x",m/2+v.left).attr("y",30).attr("fill","#000").attr("font-size",12).attr("font-weight","bold").attr("text-anchor","end").text("Churn")}))},k=function(t){return t.attr("transform","translate(".concat(v.left,",0)")).call(D(w)).call((function(t){return t.select(".domain").remove()})).call((function(t){return t.append("text").attr("y",-30).attr("x",-y/2).attr("transform","rotate(-90)").attr("fill","#000").attr("font-size",12).attr("text-anchor","start").attr("font-weight","bold").text("Complexity")}))},E=Os().x((function(t){return b(t[0])})).y((function(t){return w(t[1])})),S=ae(t).append("svg").attr("viewBox",[0,0,m,y]),C=S.append("g");if(C.append("g").attr("class","axis").call(x).selectAll(".tick line").classed("baseline",(function(t){return 0===t})),C.append("g").attr("class","axis").call(k).selectAll(".tick line").classed("baseline",(function(t){return 0===t})),C.append("g").attr("stroke-width",1.5).attr("font-family","Red Hat Text").attr("font-size",12).selectAll("g").data(n).join("g").attr("transform",(function(t){return"translate(".concat(b(t.x),",").concat(w(t.y),")")})).call((function(t){return t.append("circle").attr("fill",(function(t){return _(t.x*t.y)})).attr("stroke",(function(t){return g(t.x*t.y)})).attr("style","cursor:pointer").attr("r",4)})).call((function(t){return u?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){p(t)})),i){var M=function(t){switch(t){case Pf:return qc().x((function(t){return t.x})).y((function(t){return t.y})).domain([3,T(n,(function(t){return t.x}))]);case Nf:default:return n=n.filter((function(t){return t.y>0})),Yc().x((function(t){return t.x})).y((function(t){return t.y})).domain([3,T(n,(function(t){return t.x}))])}}(o),N=M(n);C.append("g").attr("font-family","Red Hat Text").attr("font-size",24).call((function(t){return t.append("path").attr("class","regression").datum(M(n)).attr("d",E)})).call((function(t){return t.append("text").attr("dy","60").attr("dx","33%").text("R^2 = ".concat(N.rSquared.toFixed(2)))})).call((function(t){return t.append("text").attr("dy","30").attr("dx","33%").text(jf(o,N))}))}};function Bf(){var t=Object(r.useState)(95),e=u()(t,2),n=e[0],a=e[1],o=Object(r.useState)([]),l=u()(o,2),s=l[0],c=l[1],f=function(){var t=ef()(Jc.a.mark((function t(e){var n;return Jc.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,c(n);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){f(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(),f(n)}},i.a.createElement(mf,{icon:vf})))))),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"},s.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)))}))))))}var qf=n(42),Yf=n.n(qf);var Vf=function(){return(Vf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};var Xf,Qf=function(){var t=Object(r.useState)(0)[1];return Object(r.useCallback)((function(){return t((function(t){return t+1}))}),[])},Kf=function(t){void 0===t&&(t={});var e=Qf(),n=Object(r.useRef)(Vf({},t));return[Object(r.useCallback)((function(){return n.current}),[]),Object(r.useCallback)((function(t){t&&(Object.assign(n.current,t),e())}),[])]},Gf=function(t){Object(r.useEffect)(t,[])},Zf=function(t,e){var n=Object(r.useRef)(!0);Object(r.useEffect)((function(){if(!n.current)return t();n.current=!1}),e)},Jf=(n(43),function(t,e,n){return t=(t=t<=n?t:n)>=e?t:e}),th=!1,eh=[],nh=function(t){eh.push(t),th||1!==eh.length||function t(){th=!0;var e=eh.shift();if(e)return e(t);th=!1}()},rh=function(t,e){var n;Xf=window.requestAnimationFrame((function r(i){i-(n=n||i)>e?t():Xf=window.requestAnimationFrame(r)}))},ih=function(){},ah={isFinished:!1,progress:0,sideEffect:ih},oh=function(){Xf&&window.cancelAnimationFrame(Xf),th=!1,eh=[]},lh=function(t){var e=void 0===t?{}:t,n=e.animationDuration,i=void 0===n?200:n,a=e.incrementDuration,o=void 0===a?800:a,l=e.isAnimating,u=void 0!==l&&l,s=e.minimum,c=void 0===s?.08:s,f=Kf(ah),h=f[0],p=f[1],d=function(t){if(1===(t=Jf(t,c,1)))return oh(),nh((function(e){p({progress:t,sideEffect:function(){return rh(e,i)}})})),void nh((function(){p({isFinished:!0,sideEffect:oh})}));nh((function(e){p({progress:t,sideEffect:function(){return rh(e,i)}})}))},m=function(){var t,e;d((t=h().progress,e=0,t>=0&&t<.2?e=.1:t>=.2&&t<.5?e=.04:t>=.5&&t<.8?e=.02:t>=.8&&t<.99&&(e=.005),Jf(t+e,0,.994)))},y=function(){!function t(){m(),nh((function(e){rh((function(){t(),e()}),o)}))}()},v=Object(r.useRef)(ih);return Object(r.useEffect)((function(){v.current=m})),Gf((function(){return u&&y(),oh})),Zf((function(){h().sideEffect()}),[h().sideEffect]),Zf((function(){u?p({sideEffect:y}):d(1)}),[u]),{animationDuration:i,isFinished:h().isFinished,progress:h().progress}},uh=function(t){var e=t.children,n=Yf()(t,["children"]);return e(lh(n))};var sh=function(t){var e=t.progress,n=t.animationDuration;return r.createElement("div",{className:"progressbar",style:{marginLeft:"".concat(100*(-1+e),"%"),transition:"margin-left ".concat(n,"ms linear")}},r.createElement("div",{className:"shadow"}))};sh.propTypes={animationDuration:af.a.number.isRequired,progress:af.a.number.isRequired};var ch=sh,fh=function(t){var e=t.children,n=t.isFinished,i=t.animationDuration;return r.createElement("div",{style:{opacity:n?0:1,pointerEvents:"none",transition:"opacity ".concat(i,"ms linear")}},e)};fh.propTypes={animationDuration:af.a.number.isRequired,children:af.a.node.isRequired,isFinished:af.a.bool.isRequired};var hh=fh,ph=function(t){var e=t.isAnimating,n=t.key;return i.a.createElement(uh,{isAnimating:e,key:n},(function(t){var e=t.animationDuration,n=t.isFinished,r=t.progress;return i.a.createElement(hh,{isFinished:n,animationDuration:e},i.a.createElement(ch,{progress:r,animationDuration:e}))}))};function dh(){var t=Object(r.useState)("rb"),e=u()(t,2),n=e[0],a=e[1],o=Object(r.useState)(!0),l=u()(o,2),s=l[0],c=l[1];return i.a.createElement(i.a.Fragment,null,i.a.createElement(ph,{isAnimating:s,key:n}),i.a.createElement("nav",{className:"navbar navbar-expand-lg navbar-light bg-light fixed-top"},i.a.createElement("a",{className:"navbar-brand",href:"#"},i.a.createElement("img",{src:"images/attractor_logo.svg",alt:"",width:"36",className:"mr-3"}),"Attractor"),i.a.createElement("ul",{className:"navbar-nav mx-auto"},i.a.createElement("li",{className:"nav-item ".concat("rb"===n?"active":"")},i.a.createElement("a",{className:"nav-link",href:"#",onClick:function(){c(!0),a("rb")}},"Ruby")),i.a.createElement("li",{className:"nav-item ".concat("js"===n?"active":"")},i.a.createElement("a",{className:"nav-link",href:"#",onClick:function(){c(!0),a("js")}},"Javascript")))),i.a.createElement("div",{className:"container"},i.a.createElement(zf,{type:n,finishedLoadingCallback:function(){c(!1)}}),i.a.createElement("div",{className:"row mt-3"},i.a.createElement("div",{className:"col-12"},i.a.createElement(Bf,null)))))}document.addEventListener("DOMContentLoaded",(function(){document.getElementById("react-root")&&o.a.render(i.a.createElement(dh,null),document.getElementById("react-root"))})),window.scatterPlot=Wf}]);
38
+ */Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,h=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,b=r?Symbol.for("react.scope"):60119;function w(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case i:switch(t=t.type){case f:case h:case o:case u:case l:case d:return t;default:switch(t=t&&t.$$typeof){case c:case p:case s:return t;default:return e}}case v:case y:case a:return e}}}function x(t){return w(t)===h}e.typeOf=w,e.AsyncMode=f,e.ConcurrentMode=h,e.ContextConsumer=c,e.ContextProvider=s,e.Element=i,e.ForwardRef=p,e.Fragment=o,e.Lazy=v,e.Memo=y,e.Portal=a,e.Profiler=u,e.StrictMode=l,e.Suspense=d,e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===h||t===u||t===l||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===y||t.$$typeof===s||t.$$typeof===c||t.$$typeof===p||t.$$typeof===g||t.$$typeof===_||t.$$typeof===b)},e.isAsyncMode=function(t){return x(t)||w(t)===f},e.isConcurrentMode=x,e.isContextConsumer=function(t){return w(t)===c},e.isContextProvider=function(t){return w(t)===s},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===i},e.isForwardRef=function(t){return w(t)===p},e.isFragment=function(t){return w(t)===o},e.isLazy=function(t){return w(t)===v},e.isMemo=function(t){return w(t)===y},e.isPortal=function(t){return w(t)===a},e.isProfiler=function(t){return w(t)===u},e.isStrictMode=function(t){return w(t)===l},e.isSuspense=function(t){return w(t)===d}},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n.n(r),a=n(40),o=n.n(a),l=n(2),u=n.n(l),s=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var c,f,h=(1===(c=s).length&&(f=c,c=function(t,e){return s(f(t),e)}),{left:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;c(t[i],e)<0?n=i+1:r=i}return n},right:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;c(t[i],e)>0?r=i:n=i+1}return n}}),p=h.right;var d=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]},m=Array.prototype,y=m.slice,v=(m.map,function(t){return function(){return t}}),g=function(t){return t},_=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a},b=Math.sqrt(50),w=Math.sqrt(10),x=Math.sqrt(2);var k=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},E=function(){var t=g,e=d,n=k;function r(r){var i,a,o=r.length,l=new Array(o);for(i=0;i<o;++i)l[i]=t(r[i],i,r);var u,s,c,f,h,d,m=e(l),y=m[0],v=m[1],g=n(l,y,v);Array.isArray(g)||(u=y,s=v,c=g,f=Math.abs(s-u)/Math.max(0,c),h=Math.pow(10,Math.floor(Math.log(f)/Math.LN10)),(d=f/h)>=b?h*=10:d>=w?h*=5:d>=x&&(h*=2),g=s<u?-h:h,g=_(Math.ceil(y/g)*g,v,g));for(var k=g.length;g[0]<=y;)g.shift(),--k;for(;g[k-1]>v;)g.pop(),--k;var E,T=new Array(k+1);for(i=0;i<=k;++i)(E=T[i]=[]).x0=i>0?g[i-1]:y,E.x1=i<k?g[i]:v;for(i=0;i<o;++i)y<=(a=l[i])&&a<=v&&T[p(g,a,0,k)].push(r[i]);return T}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:v(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:v([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?v(y.call(t)):v(t),r):n},r},T=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};var S=Array.prototype.slice,C=function(t){return t},M=1,N=2,P=3,O=4,A=1e-6;function F(t){return"translate("+(t+.5)+",0)"}function L(t){return"translate(0,"+(t+.5)+")"}function R(t){return function(e){return+t(e)}}function z(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function j(){return!this.__axis}function I(t,e){var n=[],r=null,i=null,a=6,o=6,l=3,u=t===M||t===O?-1:1,s=t===O||t===N?"x":"y",c=t===M||t===P?F:L;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):C:i,d=Math.max(a,0)+l,m=e.range(),y=+m[0]+.5,v=+m[m.length-1]+.5,g=(e.bandwidth?z:R)(e.copy()),_=f.selection?f.selection():f,b=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(h,e).order(),x=w.exit(),k=w.enter().append("g").attr("class","tick"),E=w.select("line"),T=w.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(k),E=E.merge(k.append("line").attr("stroke","currentColor").attr(s+"2",u*a)),T=T.merge(k.append("text").attr("fill","currentColor").attr(s,u*d).attr("dy",t===M?"0em":t===P?"0.71em":"0.32em")),f!==_&&(b=b.transition(f),w=w.transition(f),E=E.transition(f),T=T.transition(f),x=x.transition(f).attr("opacity",A).attr("transform",(function(t){return isFinite(t=g(t))?c(t):this.getAttribute("transform")})),k.attr("opacity",A).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===O||t==N?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))})),E.attr(s+"2",u*a),T.attr(s,u*d).text(p),_.filter(j).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===N?"start":t===O?"end":"middle"),_.each((function(){this.__axis=g}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=S.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:S.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:S.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 I(P,t)}function D(t){return I(O,t)}var H={value:function(){}};function $(){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 W(r)}function W(t){this._=t}function B(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 q(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Y(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=H,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}W.prototype=$.prototype={constructor:W,on:function(t,e){var n,r=this._,i=B(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]=Y(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Y(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=q(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new W(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 V=$,X="http://www.w3.org/1999/xhtml",Q={svg:"http://www.w3.org/2000/svg",xhtml:X,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},K=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Q.hasOwnProperty(e)?{space:Q[e],local:t}:t};function G(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===X&&e.documentElement.namespaceURI===X?e.createElement(t):e.createElementNS(n,t)}}function Z(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var J=function(t){var e=K(t);return(e.local?Z:G)(e)};function tt(){}var et=function(t){return null==t?tt:function(){return this.querySelector(t)}};function nt(){return[]}var rt=function(t){return null==t?nt:function(){return this.querySelectorAll(t)}},it=function(t){return function(){return this.matches(t)}},at=function(t){return new Array(t.length)};function ot(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}ot.prototype={constructor:ot,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 lt="$";function ut(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 ot(t,a[l]);for(;l<u;++l)(o=e[l])&&(i[l]=o)}function st(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=lt+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=lt+o.call(t,a[l],l,a)])?(r[l]=u,u.__data__=a[l],c[s]=null):n[l]=new ot(t,a[l]);for(l=0;l<f;++l)(u=e[l])&&c[p[l]]===u&&(i[l]=u)}function ct(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ft(t){return function(){this.removeAttribute(t)}}function ht(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pt(t,e){return function(){this.setAttribute(t,e)}}function dt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function mt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function yt(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 vt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function gt(t){return function(){this.style.removeProperty(t)}}function _t(t,e,n){return function(){this.style.setProperty(t,e,n)}}function bt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function wt(t,e){return t.style.getPropertyValue(e)||vt(t).getComputedStyle(t,null).getPropertyValue(e)}function xt(t){return function(){delete this[t]}}function kt(t,e){return function(){this[t]=e}}function Et(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Tt(t){return t.trim().split(/^|\s+/)}function St(t){return t.classList||new Ct(t)}function Ct(t){this._node=t,this._names=Tt(t.getAttribute("class")||"")}function Mt(t,e){for(var n=St(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Nt(t,e){for(var n=St(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Pt(t){return function(){Mt(this,t)}}function Ot(t){return function(){Nt(this,t)}}function At(t,e){return function(){(e.apply(this,arguments)?Mt:Nt)(this,t)}}Ct.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 Ft(){this.textContent=""}function Lt(t){return function(){this.textContent=t}}function Rt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function zt(){this.innerHTML=""}function jt(t){return function(){this.innerHTML=t}}function It(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Ut(){this.nextSibling&&this.parentNode.appendChild(this)}function Dt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ht(){return null}function $t(){var t=this.parentNode;t&&t.removeChild(this)}function Wt(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function Bt(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var qt={},Yt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(qt={mouseenter:"mouseover",mouseleave:"mouseout"}));function Vt(t,e,n){return t=Xt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Xt(t,e,n){return function(r){var i=Yt;Yt=r;try{t.call(this,this.__data__,e,n)}finally{Yt=i}}}function Qt(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 Kt(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 Gt(t,e,n){var r=qt.hasOwnProperty(t.type)?Vt:Xt;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 Zt(t,e,n){var r=vt(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 Jt(t,e){return function(){return Zt(this,t,e)}}function te(t,e){return function(){return Zt(this,t,e.apply(this,arguments))}}var ee=[null];function ne(t,e){this._groups=t,this._parents=e}function re(){return new ne([[document.documentElement]],ee)}ne.prototype=re.prototype={constructor:ne,select:function(t){"function"!=typeof t&&(t=et(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 ne(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=rt(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 ne(r,i)},filter:function(t){"function"!=typeof t&&(t=it(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 ne(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?st:ut,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 ne(l,i))._enter=u,l._exit=s,l},enter:function(){return new ne(this._enter||this._groups.map(at),this._parents)},exit:function(){return new ne(this._exit||this._groups.map(at),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 ne(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=ct);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 ne(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=K(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?ht:ft:"function"==typeof e?n.local?yt:mt:n.local?dt:pt)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?gt:"function"==typeof e?bt:_t)(t,e,null==n?"":n)):wt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?xt:"function"==typeof e?Et:kt)(t,e)):this.node()[t]},classed:function(t,e){var n=Tt(t+"");if(arguments.length<2){for(var r=St(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?At:e?Pt:Ot)(n,e))},text:function(t){return arguments.length?this.each(null==t?Ft:("function"==typeof t?Rt:Lt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?zt:("function"==typeof t?It:jt)(t)):this.node().innerHTML},raise:function(){return this.each(Ut)},lower:function(){return this.each(Dt)},append:function(t){var e="function"==typeof t?t:J(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:J(t),r=null==e?Ht:"function"==typeof e?e:et(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each($t)},clone:function(t){return this.select(t?Bt:Wt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Qt(t+""),o=a.length;if(!(arguments.length<2)){for(l=e?Gt:Kt,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?te:Jt)(t,e))}};var ie=re,ae=function(t){return"string"==typeof t?new ne([[document.querySelector(t)]],[document.documentElement]):new ne([[t]],ee)},oe=0;function le(){this._="@"+(++oe).toString(36)}le.prototype=function(){return new le}.prototype={constructor:le,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 ue(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}ue.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var se=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function ce(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function fe(){}var he="\\s*([+-]?\\d+)\\s*",pe="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",de="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",me=/^#([0-9a-f]{3,8})$/,ye=new RegExp("^rgb\\("+[he,he,he]+"\\)$"),ve=new RegExp("^rgb\\("+[de,de,de]+"\\)$"),ge=new RegExp("^rgba\\("+[he,he,he,pe]+"\\)$"),_e=new RegExp("^rgba\\("+[de,de,de,pe]+"\\)$"),be=new RegExp("^hsl\\("+[pe,de,de]+"\\)$"),we=new RegExp("^hsla\\("+[pe,de,de,pe]+"\\)$"),xe={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 ke(){return this.rgb().formatHex()}function Ee(){return this.rgb().formatRgb()}function Te(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=me.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Se(e):3===n?new Pe(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Pe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Pe(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=ye.exec(t))?new Pe(e[1],e[2],e[3],1):(e=ve.exec(t))?new Pe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ge.exec(t))?Ce(e[1],e[2],e[3],e[4]):(e=_e.exec(t))?Ce(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=be.exec(t))?Le(e[1],e[2]/100,e[3]/100,1):(e=we.exec(t))?Le(e[1],e[2]/100,e[3]/100,e[4]):xe.hasOwnProperty(t)?Se(xe[t]):"transparent"===t?new Pe(NaN,NaN,NaN,0):null}function Se(t){return new Pe(t>>16&255,t>>8&255,255&t,1)}function Ce(t,e,n,r){return r<=0&&(t=e=n=NaN),new Pe(t,e,n,r)}function Me(t){return t instanceof fe||(t=Te(t)),t?new Pe((t=t.rgb()).r,t.g,t.b,t.opacity):new Pe}function Ne(t,e,n,r){return 1===arguments.length?Me(t):new Pe(t,e,n,null==r?1:r)}function Pe(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Oe(){return"#"+Fe(this.r)+Fe(this.g)+Fe(this.b)}function Ae(){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 Fe(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Le(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new je(t,e,n,r)}function Re(t){if(t instanceof je)return new je(t.h,t.s,t.l,t.opacity);if(t instanceof fe||(t=Te(t)),!t)return new je;if(t instanceof je)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 je(o,l,u,t.opacity)}function ze(t,e,n,r){return 1===arguments.length?Re(t):new je(t,e,n,null==r?1:r)}function je(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ie(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}se(fe,Te,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ke,formatHex:ke,formatHsl:function(){return Re(this).formatHsl()},formatRgb:Ee,toString:Ee}),se(Pe,Ne,ce(fe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Pe(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Pe(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:Oe,formatHex:Oe,formatRgb:Ae,toString:Ae})),se(je,ze,ce(fe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new je(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new je(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 Pe(Ie(t>=240?t-240:t+120,i,r),Ie(t,i,r),Ie(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 De=function(t){return function(){return t}};function He(t,e){return function(n){return t+n*e}}function $e(t,e){var n=e-t;return n?He(t,n>180||n<-180?n-360*Math.round(n/360):n):De(isNaN(t)?e:t)}function We(t){return 1==(t=+t)?Be: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):De(isNaN(e)?n:e)}}function Be(t,e){var n=e-t;return n?He(t,n):De(isNaN(t)?e:t)}var qe=function t(e){var n=We(e);function r(t,e){var r=n((t=Ne(t)).r,(e=Ne(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Be(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 Ye(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=Ne(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+""}}}Ye((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)}})),Ye((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 Ve=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]=an(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}},Xe=function(t,e){var n=new Date;return e-=t=+t,function(r){return n.setTime(t+e*r),n}},Qe=function(t,e){return e-=t=+t,function(n){return t+e*n}},Ke=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]=an(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},Ge=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ze=new RegExp(Ge.source,"g");var Je,tn,en,nn,rn=function(t,e){var n,r,i,a=Ge.lastIndex=Ze.lastIndex=0,o=-1,l=[],u=[];for(t+="",e+="";(n=Ge.exec(t))&&(r=Ze.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:Qe(n,r)})),a=Ze.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("")})},an=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?De(e):("number"===r?Qe:"string"===r?(n=Te(e))?(e=n,qe):rn:e instanceof Te?qe:e instanceof Date?Xe:Array.isArray(e)?Ve:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ke:Qe)(t,e)},on=function(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}},ln=180/Math.PI,un={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},sn=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)*ln,skewX:Math.atan(u)*ln,scaleX:o,scaleY:l}};function cn(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:Qe(t,i)},{i:u-2,x:Qe(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:Qe(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:Qe(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:Qe(t,n)},{i:l-2,x:Qe(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 fn=cn((function(t){return"none"===t?un:(Je||(Je=document.createElement("DIV"),tn=document.documentElement,en=document.defaultView),Je.style.transform=t,t=en.getComputedStyle(tn.appendChild(Je),null).getPropertyValue("transform"),tn.removeChild(Je),t=t.slice(7,-1).split(","),sn(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),hn=cn((function(t){return null==t?un:(nn||(nn=document.createElementNS("http://www.w3.org/2000/svg","g")),nn.setAttribute("transform",t),(t=nn.transform.baseVal.consolidate())?(t=t.matrix,sn(t.a,t.b,t.c,t.d,t.e,t.f)):un)}),", ",")",")");Math.SQRT2;function pn(t){return function(e,n){var r=t((e=ze(e)).h,(n=ze(n)).h),i=Be(e.s,n.s),a=Be(e.l,n.l),o=Be(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+""}}}pn($e),pn(Be);var dn=Math.PI/180,mn=180/Math.PI,yn=.96422,vn=1,gn=.82521,_n=4/29,bn=6/29,wn=3*bn*bn,xn=bn*bn*bn;function kn(t){if(t instanceof Tn)return new Tn(t.l,t.a,t.b,t.opacity);if(t instanceof An)return Fn(t);t instanceof Pe||(t=Me(t));var e,n,r=Nn(t.r),i=Nn(t.g),a=Nn(t.b),o=Sn((.2225045*r+.7168786*i+.0606169*a)/vn);return r===i&&i===a?e=n=o:(e=Sn((.4360747*r+.3850649*i+.1430804*a)/yn),n=Sn((.0139322*r+.0971045*i+.7141733*a)/gn)),new Tn(116*o-16,500*(e-o),200*(o-n),t.opacity)}function En(t,e,n,r){return 1===arguments.length?kn(t):new Tn(t,e,n,null==r?1:r)}function Tn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Sn(t){return t>xn?Math.pow(t,1/3):t/wn+_n}function Cn(t){return t>bn?t*t*t:wn*(t-_n)}function Mn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Nn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Pn(t){if(t instanceof An)return new An(t.h,t.c,t.l,t.opacity);if(t instanceof Tn||(t=kn(t)),0===t.a&&0===t.b)return new An(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*mn;return new An(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function On(t,e,n,r){return 1===arguments.length?Pn(t):new An(t,e,n,null==r?1:r)}function An(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Fn(t){if(isNaN(t.h))return new Tn(t.l,0,0,t.opacity);var e=t.h*dn;return new Tn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function Ln(t){return function(e,n){var r=t((e=On(e)).h,(n=On(n)).h),i=Be(e.c,n.c),a=Be(e.l,n.l),o=Be(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+""}}}se(Tn,En,ce(fe,{brighter:function(t){return new Tn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Tn(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 Pe(Mn(3.1338561*(e=yn*Cn(e))-1.6168667*(t=vn*Cn(t))-.4906146*(n=gn*Cn(n))),Mn(-.9787684*e+1.9161415*t+.033454*n),Mn(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),se(An,On,ce(fe,{brighter:function(t){return new An(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new An(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Fn(this).rgb()}}));Ln($e),Ln(Be);var Rn=-.29227,zn=-.90649,jn=1.97294,In=jn*zn,Un=1.78277*jn,Dn=1.78277*Rn- -.14861*zn;function Hn(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof $n)return new $n(t.h,t.s,t.l,t.opacity);t instanceof Pe||(t=Me(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Dn*r+In*e-Un*n)/(Dn+In-Un),a=r-i,o=(jn*(n-i)-Rn*a)/zn,l=Math.sqrt(o*o+a*a)/(jn*i*(1-i)),u=l?Math.atan2(o,a)*mn-120:NaN;return new $n(u<0?u+360:u,l,i,t.opacity)}(t):new $n(t,e,n,null==r?1:r)}function $n(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Wn(t){return function e(n){function r(e,r){var i=t((e=Hn(e)).h,(r=Hn(r)).h),a=Be(e.s,r.s),o=Be(e.l,r.l),l=Be(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)}se($n,Hn,ce(fe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new $n(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new $n(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*dn,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Pe(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(Rn*r+zn*i)),255*(e+n*(jn*r)),this.opacity)}}));Wn($e),Wn(Be);var Bn,qn,Yn=0,Vn=0,Xn=0,Qn=1e3,Kn=0,Gn=0,Zn=0,Jn="object"==typeof performance&&performance.now?performance:Date,tr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function er(){return Gn||(tr(nr),Gn=Jn.now()+Zn)}function nr(){Gn=0}function rr(){this._call=this._time=this._next=null}function ir(t,e,n){var r=new rr;return r.restart(t,e,n),r}function ar(){Gn=(Kn=Jn.now())+Zn,Yn=Vn=0;try{!function(){er(),++Yn;for(var t,e=Bn;e;)(t=Gn-e._time)>=0&&e._call.call(null,t),e=e._next;--Yn}()}finally{Yn=0,function(){var t,e,n=Bn,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:Bn=e);qn=t,lr(r)}(),Gn=0}}function or(){var t=Jn.now(),e=t-Kn;e>Qn&&(Zn-=e,Kn=t)}function lr(t){Yn||(Vn&&(Vn=clearTimeout(Vn)),t-Gn>24?(t<1/0&&(Vn=setTimeout(ar,t-Jn.now()-Zn)),Xn&&(Xn=clearInterval(Xn))):(Xn||(Kn=Jn.now(),Xn=setInterval(or,Qn)),Yn=1,tr(ar)))}rr.prototype=ir.prototype={constructor:rr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?er():+n)+(null==e?0:+e),this._next||qn===this||(qn?qn._next=this:Bn=this,qn=this),this._call=t,this._time=n,lr()},stop:function(){this._call&&(this._call=null,this._time=1/0,lr())}};var ur=function(t,e,n){var r=new rr;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},sr=V("start","end","cancel","interrupt"),cr=[],fr=0,hr=1,pr=2,dr=3,mr=4,yr=5,vr=6,gr=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!==hr)return l();for(s in i)if((h=i[s]).name===n.name){if(h.state===dr)return ur(a);h.state===mr?(h.state=vr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[s]):+s<e&&(h.state=vr,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[s])}if(ur((function(){n.state===dr&&(n.state=mr,n.timer.restart(o,n.delay,n.time),o(u))})),n.state=pr,n.on.call("start",t,t.__data__,n.index,n.group),n.state===pr){for(n.state=dr,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=yr,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);n.state===yr&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=vr,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=ir((function(t){n.state=hr,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:sr,tween:cr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:fr})};function _r(t,e){var n=wr(t,e);if(n.state>fr)throw new Error("too late; already scheduled");return n}function br(t,e){var n=wr(t,e);if(n.state>dr)throw new Error("too late; already running");return n}function wr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var xr=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>pr&&n.state<yr,n.state=vr,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 kr(t,e){var n,r;return function(){var i=br(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 Er(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=br(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 Tr(t,e,n){var r=t._id;return t.each((function(){var t=br(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return wr(t,r).value[e]}}var Sr=function(t,e){var n;return("number"==typeof e?Qe:e instanceof Te?qe:(n=Te(e))?(e=n,qe):rn)(t,e)};function Cr(t){return function(){this.removeAttribute(t)}}function Mr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Nr(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 Pr(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 Or(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 Ar(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 Fr(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 Lr(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 Rr(t,e){return function(){_r(this,t).delay=+e.apply(this,arguments)}}function zr(t,e){return e=+e,function(){_r(this,t).delay=e}}function jr(t,e){return function(){br(this,t).duration=+e.apply(this,arguments)}}function Ir(t,e){return e=+e,function(){br(this,t).duration=e}}function Ur(t,e){if("function"!=typeof e)throw new Error;return function(){br(this,t).ease=e}}function Dr(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)?_r:br;return function(){var o=a(this,t),l=o.on;l!==r&&(i=(r=l).copy()).on(e,n),o.on=i}}var Hr=ie.prototype.constructor;function $r(t){return function(){this.style.removeProperty(t)}}function Wr(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 Br=0;function qr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Yr(){return++Br}var Vr=ie.prototype;qr.prototype=function(t){return ie().transition(t)}.prototype={constructor:qr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=et(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,gr(f[h],e,n,h,f,wr(l,n)));return new qr(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=rt(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=wr(u,n),m=0,y=p.length;m<y;++m)(h=p[m])&&gr(h,e,n,m,p,d);a.push(p),o.push(u)}return new qr(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=it(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 qr(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 qr(o,this._parents,this._name,this._id)},selection:function(){return new Hr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Yr(),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=wr(o,e);gr(o,t,n,s,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new qr(r,this._parents,t,n)},call:Vr.call,nodes:Vr.nodes,node:Vr.node,size:Vr.size,empty:Vr.empty,each:Vr.each,on:function(t,e){var n=this._id;return arguments.length<2?wr(this.node(),n).on.on(t):this.each(Dr(n,t,e))},attr:function(t,e){var n=K(t),r="transform"===n?hn:Sr;return this.attrTween(t,"function"==typeof e?(n.local?Ar:Or)(n,r,Tr(this,"attr."+t,e)):null==e?(n.local?Mr:Cr)(n):(n.local?Pr:Nr)(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=K(t);return this.tween(n,(r.local?Fr:Lr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?fn:Sr;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=wt(this,t),o=(this.style.removeProperty(t),wt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,$r(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=wt(this,t),l=n(this),u=l+"";return null==l&&(this.style.removeProperty(t),u=l=wt(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,l))}}(t,r,Tr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,l="end."+o;return function(){var u=br(this,t),s=u.on,c=null==u.value[o]?a||(a=$r(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=wt(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,Wr(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}}(Tr(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=wr(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?kr:Er)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Rr:zr)(e,t)):wr(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?jr:Ir)(e,t)):wr(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Ur(e,t)):wr(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=br(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 Xr=2*Math.PI,Qr=(function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Xr);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Xr)},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/=Xr);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*Xr)},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/=Xr);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*Xr)},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 Kr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Qr.time=er(),Qr;return n}ie.prototype.interrupt=function(t){return this.each((function(){xr(this,t)}))},ie.prototype.transition=function(t){var e,n;t instanceof qr?(e=t._id,t=t._name):(e=Yr(),(n=Qr).time=er(),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])&&gr(o,t,e,s,l,n||Kr(o,e));return new qr(r,this._parents,t,e)};function Gr(t){return[+t[0],+t[1]]}function Zr(t){return[Gr(t[0]),Gr(t[1])]}["w","e"].map(Jr),["n","s"].map(Jr),["n","w","e","s","nw","ne","sw","se"].map(Jr);function Jr(t){return{type:t}}var ti=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var ei=function(t){return 1===t.length&&(t=function(t){return function(e,n){return ti(t(e),n)}}(t)),{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}}}(ti);ei.right,ei.left;var ni=Array.prototype;ni.slice,ni.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);Math.cos,Math.sin,Math.PI,Math.max;Array.prototype.slice;var ri=Math.PI,ii=2*ri,ai=ii-1e-6;function oi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function li(){return new oi}oi.prototype=li.prototype={constructor:oi,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((ri-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%ii+ii),f>ai?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>=ri)+","+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 ui=li;function si(){}function ci(t,e){var n=new si;if(t instanceof si)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}si.prototype=ci.prototype={constructor:si,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 fi=ci;function hi(){}var pi=fi.prototype;function di(t,e){var n=new hi;if(t instanceof hi)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}hi.prototype=di.prototype={constructor:hi,has:pi.has,add:function(t){return this["$"+(t+="")]=t,this},remove:pi.remove,clear:pi.clear,values:pi.keys,size:pi.size,empty:pi.empty,each:pi.each};var mi=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var yi=function(t){return 1===t.length&&(t=function(t){return function(e,n){return mi(t(e),n)}}(t)),{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}}}(mi);yi.right,yi.left;var vi=Array.prototype;vi.slice,vi.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);Array.prototype.slice;var gi={},_i={},bi=34,wi=10,xi=13;function ki(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+"]"})).join(",")+"}")}function Ei(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 Ti(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Si(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Ti(-e,6):e>9999?"+"+Ti(e,6):Ti(e,4))+"-"+Ti(t.getUTCMonth()+1,2)+"-"+Ti(t.getUTCDate(),2)+(a?"T"+Ti(n,2)+":"+Ti(r,2)+":"+Ti(i,2)+"."+Ti(a,3)+"Z":i?"T"+Ti(n,2)+":"+Ti(r,2)+":"+Ti(i,2)+"Z":r||n?"T"+Ti(n,2)+":"+Ti(r,2)+"Z":"")}var Ci=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 _i;if(s)return s=!1,gi;var e,r,i=o;if(t.charCodeAt(i)===bi){for(;o++<a&&t.charCodeAt(o)!==bi||t.charCodeAt(++o)===bi;);return(e=o)>=a?u=!0:(r=t.charCodeAt(o++))===wi?s=!0:r===xi&&(s=!0,t.charCodeAt(o)===wi&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if((r=t.charCodeAt(e=o++))===wi)s=!0;else if(r===xi)s=!0,t.charCodeAt(o)===wi&&++o;else if(r!==n)continue;return t.slice(i,e)}return u=!0,t.slice(i,a)}for(t.charCodeAt(a-1)===wi&&--a,t.charCodeAt(a-1)===xi&&--a;(r=c())!==_i;){for(var f=[];r!==gi&&r!==_i;)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?Si(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=ki(t);return function(r,i){return e(n(r),i,t)}}(t,e):ki(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=Ei(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Ei(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")}}},Mi=Ci(","),Ni=Mi.parse,Pi=(Mi.parseRows,Mi.format,Mi.formatBody,Mi.formatRows,Ci("\t")),Oi=Pi.parse;Pi.parseRows,Pi.format,Pi.formatBody,Pi.formatRows;function Ai(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var Fi=function(t,e){return fetch(t,e).then(Ai)};function Li(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),Fi(e,n).then((function(e){return t(e,r)}))}}Li(Ni),Li(Oi);function Ri(t){return function(e,n){return Fi(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}Ri("application/xml"),Ri("text/html"),Ri("image/svg+xml");function zi(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 ji=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function Ii(t){return t[0]}function Ui(t){return t[1]}function Di(t,e,n){var r=new Hi(null==e?Ii:e,null==n?Ui:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Hi(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 $i(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Wi=Di.prototype=Hi.prototype;Wi.copy=function(){var t,e,n=new Hi(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=$i(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]=$i(e));return n},Wi.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return zi(this.cover(e,n),e,n,t)},Wi.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)zi(this,o[n],l[n],t[n]);return this},Wi.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},Wi.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Wi.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]]},Wi.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 ji(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 ji(m[3],y,v,o,l),new ji(m[2],i,v,y,l),new ji(m[1],y,a,o,v),new ji(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},Wi.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)},Wi.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Wi.root=function(){return this._root},Wi.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Wi.visit=function(t){var e,n,r,i,a,o,l=[],u=this._root;for(u&&l.push(new ji(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 ji(n,s,c,a,o)),(n=u[2])&&l.push(new ji(n,r,c,s,o)),(n=u[1])&&l.push(new ji(n,s,i,a,c)),(n=u[0])&&l.push(new ji(n,r,i,s,c))}return this},Wi.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new ji(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 ji(a,o,l,c,f)),(a=i[1])&&n.push(new ji(a,c,l,u,f)),(a=i[2])&&n.push(new ji(a,o,f,c,s)),(a=i[3])&&n.push(new ji(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},Wi.x=function(t){return arguments.length?(this._x=t,this):this._x},Wi.y=function(t){return arguments.length?(this._y=t,this):this._y};Math.PI,Math.sqrt(5);var Bi=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)]},qi=function(t){return(t=Bi(Math.abs(t)))?t[1]:NaN},Yi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Vi(t){if(!(e=Yi.exec(t)))throw new Error("invalid format: "+t);var e;return new Xi({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 Xi(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+""}Vi.prototype=Xi.prototype,Xi.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 Qi,Ki,Gi,Zi,Ji=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},ta=function(t,e){var n=Bi(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")},ea={"%":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 ta(100*t,e)},r:ta,s:function(t,e){var n=Bi(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Qi=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")+Bi(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)}},na=function(t){return t},ra=Array.prototype.map,ia=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];Ki=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?na:(e=ra.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?na:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ra.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=Vi(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"):ea[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=ea[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=Ji(t)),E&&0==+t&&(E=!1),h=(E?"("===f?f:s:"-"===f||"("===f?"":f)+h,k=("s"===g?ia[8+Qi/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=Vi(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(qi(e)/3))),i=Math.pow(10,-r),a=ia[8+r/3];return function(t){return n(i*t)+a}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Gi=Ki.format,Zi=Ki.formatPrefix;var aa=function(){return new oa};function oa(){this.reset()}oa.prototype={constructor:oa,reset:function(){this.s=this.t=0},add:function(t){ua(la,t,this.t),ua(this,la.s,this.s),this.s?this.t+=la.t:this.s=la.t},valueOf:function(){return this.s}};var la=new oa;function ua(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var sa=1e-6,ca=1e-12,fa=Math.PI,ha=fa/2,pa=fa/4,da=2*fa,ma=fa/180,ya=Math.abs,va=Math.atan,ga=Math.atan2,_a=Math.cos,ba=(Math.ceil,Math.exp),wa=(Math.floor,Math.log),xa=(Math.pow,Math.sin),ka=Math.sign||function(t){return t>0?1:t<0?-1:0},Ea=Math.sqrt,Ta=Math.tan;function Sa(t){return t>1?0:t<-1?fa:Math.acos(t)}function Ca(t){return t>1?ha:t<-1?-ha:Math.asin(t)}function Ma(){}aa(),aa();function Na(t){var e=t[0],n=t[1],r=_a(n);return[r*_a(e),r*xa(e),xa(n)]}function Pa(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 Oa(t){var e=Ea(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}aa();function Aa(t,e){return[ya(t)>fa?t+Math.round(-t/da)*da:t,e]}Aa.invert=Aa;var Fa=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:Ma,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},La=function(t,e){return ya(t[0]-e[0])<sa&&ya(t[1]-e[1])<sa};function Ra(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 za=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(La(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 Ra(r,t,null,!0)),u.push(n.o=new Ra(r,null,n,!1)),l.push(n=new Ra(o,t,null,!1)),u.push(n.o=new Ra(o,null,n,!0))}})),l.length){for(u.sort(e),ja(l),ja(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 ja(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 Ia=aa();function Ua(t){return ya(t[0])<=fa?t[0]:ka(t[0])*((ya(t[0])+fa)%da-fa)}var Da=function(t,e){var n=Ua(e),r=e[1],i=xa(r),a=[xa(n),-_a(n),0],o=0,l=0;Ia.reset(),1===i?r=ha+sa:-1===i&&(r=-ha-sa);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=Ua(h),d=h[1]/2+pa,m=xa(d),y=_a(d),v=0;v<f;++v,p=_,m=w,y=x,h=g){var g=c[v],_=Ua(g),b=g[1]/2+pa,w=xa(b),x=_a(b),k=_-p,E=k>=0?1:-1,T=E*k,S=T>fa,C=m*w;if(Ia.add(ga(C*E*xa(T),y*x+C*_a(T))),o+=S?k+E*da:k,S^p>=n^_>=n){var M=Pa(Na(h),Na(g));Oa(M);var N=Pa(a,M);Oa(N);var P=(S^k>=0?-1:1)*Ca(N[2]);(r>P||r===P&&(M[0]||M[1]))&&(l+=S^k>=0?1:-1)}}return(o<-sa||o<sa&&Ia<-sa)^1&l},Ha=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN};var $a=function(t){return 1===t.length&&(t=function(t){return function(e,n){return Ha(t(e),n)}}(t)),{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}}}(Ha);$a.right,$a.left;var Wa=Array.prototype;Wa.slice,Wa.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var Ba=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 qa=function(t,e,n,r){return function(i){var a,o,l,u=e(i),s=Fa(),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=Ba(o);var t=Da(a,r);o.length?(f||(i.polygonStart(),f=!0),za(o,Va,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(Ya))}return h}};function Ya(t){return t.length>1}function Va(t,e){return((t=t.x)[0]<0?t[1]-ha-sa:ha-t[1])-((e=e.x)[0]<0?e[1]-ha-sa:ha-e[1])}qa((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?fa:-fa,u=ya(a-n);ya(u-fa)<sa?(t.point(n,r=(r+o)/2>0?ha:-ha),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(a,r),e=0):i!==l&&u>=fa&&(ya(n-i)<sa&&(n-=i*sa),ya(a-l)<sa&&(a-=l*sa),r=function(t,e,n,r){var i,a,o=xa(t-n);return ya(o)>sa?va((xa(e)*(a=_a(r))*xa(n)-xa(r)*(i=_a(e))*xa(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*ha,r.point(-fa,i),r.point(0,i),r.point(fa,i),r.point(fa,0),r.point(fa,-i),r.point(0,-i),r.point(-fa,-i),r.point(-fa,0),r.point(-fa,i);else if(ya(t[0]-e[0])>sa){var a=t[0]<e[0]?fa:-fa;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-fa,-ha]);aa();aa(),aa();function Xa(t){this._context=t}Xa.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,da)}},result:Ma};aa();function Qa(){this._string=[]}function Ka(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Qa.prototype={_radius:4.5,_circle:Ka(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=Ka(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 Ga(t){return function(e){var n=new Za;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Za(){}Za.prototype={constructor:Za,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()}};_a(30*ma);Ga({point:function(t,e){this.stream.point(t*ma,e*ma)}});function Ja(t){return function(e,n){var r=_a(e),i=_a(n),a=t(r*i);return[a*i*xa(e),a*xa(n)]}}function to(t){return function(e,n){var r=Ea(e*e+n*n),i=t(r),a=xa(i),o=_a(i);return[ga(e*a,r*o),Ca(r&&n*a/r)]}}var eo=Ja((function(t){return Ea(2/(1+t))}));eo.invert=to((function(t){return 2*Ca(t/2)}));var no=Ja((function(t){return(t=Sa(t))&&t/xa(t)}));no.invert=to((function(t){return t}));function ro(t,e){return[t,wa(Ta((ha+e)/2))]}ro.invert=function(t,e){return[t,2*va(ba(e))-ha]};function io(t,e){return[t,e]}io.invert=io;var ao=1.340264,oo=-.081106,lo=893e-6,uo=.003796,so=Ea(3)/2;function co(t,e){var n=Ca(so*xa(e)),r=n*n,i=r*r*r;return[t*_a(n)/(so*(ao+3*oo*r+i*(7*lo+9*uo*r))),n*(ao+oo*r+i*(lo+uo*r))]}co.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*(ao+oo*i+a*(lo+uo*i))-e)/(ao+3*oo*i+a*(7*lo+9*uo*i)))*r)*i*i,!(ya(n)<ca));++o);return[so*t*(ao+3*oo*i+a*(7*lo+9*uo*i))/_a(r),Ca(xa(r)/so)]};function fo(t,e){var n=_a(e),r=_a(t)*n;return[n*xa(t)/r,xa(e)/r]}fo.invert=to(va);function ho(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)))]}ho.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(ya(n)>sa&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};function po(t,e){return[_a(e)*xa(t),xa(e)]}po.invert=to(Ca);function mo(t,e){var n=_a(e),r=1+_a(t)*n;return[n*xa(t)/r,xa(e)/r]}mo.invert=to((function(t){return 2*va(t)}));function yo(t,e){return[wa(Ta((ha+e)/2)),-t]}yo.invert=function(t,e){return[-e,2*va(ba(t))-ha]};function vo(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 go(t,e){var n,r,i,a,o,l=new xo(t),u=+t.value&&(l.value=t.value),s=[l];for(null==e&&(e=_o);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 xo(i[a])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(wo)}function _o(t){return t.children}function bo(t){t.data=t.data.data}function wo(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function xo(t){this.data=t,this.depth=this.height=0,this.parent=null}xo.prototype=go.prototype={constructor:xo,count:function(){return this.eachAfter(vo)},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 go(this).eachBefore(bo)}};Array.prototype.slice;function ko(t){if("function"!=typeof t)throw new Error;return t}function Eo(){return 0}var To=function(t){return function(){return t}};var So=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},Co=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 Mo(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}Mo.prototype=Object.create(xo.prototype);var No=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},Po=(1+Math.sqrt(5))/2;function Oo(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?Co(o,n,r,i,x?r+=s*c/x:a):No(o,n,r,x?n+=u*c/x:i,a),x-=c,_=b}return v}var Ao=function t(e){function n(t,n,r,i,a){Oo(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(Po);(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?Co(l,n,r,i,r+=(a-r)*l.value/p):No(l,n,r,n+=(i-n)*l.value/p,a),p-=l.value}else t._squarify=o=Oo(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n})(Po);var Fo=function(){return Math.random()},Lo=(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}(Fo),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}(Fo)),Ro=(function t(e){function n(){var t=Lo.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Fo),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}(Fo)),zo=(function t(e){function n(t){var n=Ro.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Fo),function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Fo),function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}),jo=function(t){return 1===t.length&&(t=function(t){return function(e,n){return zo(t(e),n)}}(t)),{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 Io=jo(zo),Uo=Io.right,Do=(Io.left,Uo);var Ho=Array.prototype,$o=(Ho.slice,Ho.map,Math.sqrt(50)),Wo=Math.sqrt(10),Bo=Math.sqrt(2),qo=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=Yo(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 Yo(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>=$o?10:a>=Wo?5:a>=Bo?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=$o?10:a>=Wo?5:a>=Bo?2:1)}function Vo(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>=$o?i*=10:a>=Wo?i*=5:a>=Bo&&(i*=2),e<t?-i:i}function Xo(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Qo=Array.prototype,Ko=Qo.map,Go=Qo.slice,Zo={name:"implicit"};function Jo(){var t=fi(),e=[],n=[],r=Zo;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==Zo)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=fi();for(var r,a,o=-1,l=n.length;++o<l;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=Go.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Jo(e,n).unknown(r)},Xo.apply(i,arguments),i}var tl=function(t){return function(){return t}},el=function(t){return+t},nl=[0,1];function rl(t){return t}function il(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:tl(isNaN(e)?NaN:.5)}function al(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 ol(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=il(i,r),a=n(o,a)):(r=il(r,i),a=n(a,o)),function(t){return a(r(t))}}function ll(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]=il(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=Do(t,e,1,r)-1;return a[n](i[n](e))}}function ul(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function sl(){var t,e,n,r,i,a,o=nl,l=nl,u=an,s=rl;function c(){return r=Math.min(o.length,l.length)>2?ll:ol,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),Qe)))(n)))},f.domain=function(t){return arguments.length?(o=Ko.call(t,el),s===rl||(s=al(o)),c()):o.slice()},f.range=function(t){return arguments.length?(l=Go.call(t),c()):l.slice()},f.rangeRound=function(t){return l=Go.call(t),u=on,c()},f.clamp=function(t){return arguments.length?(s=t?al(o):rl,f):s!==rl},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 cl(t,e){return sl()(t,e)}var fl=function(t,e,n,r){var i,a=Vo(t,e,n);switch((r=Vi(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(qi(e)/3)))-qi(Math.abs(t)))}(a,o))||(r.precision=i),Zi(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,qi(e)-qi(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,-qi(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Gi(r)};function hl(t){var e=t.domain;return t.ticks=function(t){var n=e();return qo(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return fl(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=Yo(l,u,n))>0?r=Yo(l=Math.floor(l/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Yo(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 pl(){var t=cl(rl,rl);return t.copy=function(){return ul(t,pl())},Xo.apply(t,arguments),hl(t)}var dl=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 ml(t){return Math.log(t)}function yl(t){return Math.exp(t)}function vl(t){return-Math.log(-t)}function gl(t){return-Math.exp(-t)}function _l(t){return isFinite(t)?+("1e"+t):t<0?0:t}function bl(t){return function(e){return-t(-e)}}function wl(t){var e,n,r=t(ml,yl),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?_l:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=bl(e),n=bl(n),t(vl,gl)):t(ml,yl),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=qo(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=Gi(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(dl(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function xl(){var t=wl(sl()).domain([1,10]);return t.copy=function(){return ul(t,xl()).base(t.base())},Xo.apply(t,arguments),t}var kl=new Date,El=new Date;function Tl(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 Tl((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 kl.setTime(+e),El.setTime(+r),t(kl),t(El),Math.floor(n(kl,El))},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 Sl=Tl((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()}));Sl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Tl((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 Cl=Sl,Ml=(Sl.range,Tl((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()}))),Nl=(Ml.range,6e4),Pl=6048e5;function Ol(t){return Tl((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())*Nl)/Pl}))}var Al=Ol(0),Fl=Ol(1),Ll=Ol(2),Rl=Ol(3),zl=Ol(4),jl=Ol(5),Il=Ol(6),Ul=(Al.range,Fl.range,Ll.range,Rl.range,zl.range,jl.range,Il.range,Tl((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())*Nl)/864e5}),(function(t){return t.getDate()-1}))),Dl=Ul,Hl=(Ul.range,Tl((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-t.getMinutes()*Nl)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()}))),$l=(Hl.range,Tl((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+e*Nl)}),(function(t,e){return(e-t)/Nl}),(function(t){return t.getMinutes()}))),Wl=($l.range,Tl((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()}))),Bl=(Wl.range,Tl((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t})));Bl.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Tl((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Bl:null};Bl.range;function ql(t){return Tl((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)/Pl}))}var Yl=ql(0),Vl=ql(1),Xl=ql(2),Ql=ql(3),Kl=ql(4),Gl=ql(5),Zl=ql(6),Jl=(Yl.range,Vl.range,Xl.range,Ql.range,Kl.range,Gl.range,Zl.range,Tl((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}))),tu=Jl,eu=(Jl.range,Tl((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()})));eu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Tl((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 nu=eu;eu.range;function ru(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 iu(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 au(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}var ou,lu,uu,su={"-":"",_:" ",0:"0"},cu=/^\s*\d+/,fu=/^%/,hu=/[\\^$*+?|[\]().{}]/g;function pu(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 du(t){return t.replace(hu,"\\$&")}function mu(t){return new RegExp("^(?:"+t.map(du).join("|")+")","i")}function yu(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function vu(t,e,n){var r=cu.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function gu(t,e,n){var r=cu.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function _u(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function bu(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function wu(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function xu(t,e,n){var r=cu.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ku(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Eu(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 Tu(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Su(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Cu(t,e,n){var r=cu.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Mu(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Nu(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Pu(t,e,n){var r=cu.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ou(t,e,n){var r=cu.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Au(t,e,n){var r=cu.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Fu(t,e,n){var r=fu.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Lu(t,e,n){var r=cu.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Ru(t,e,n){var r=cu.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function zu(t,e){return pu(t.getDate(),e,2)}function ju(t,e){return pu(t.getHours(),e,2)}function Iu(t,e){return pu(t.getHours()%12||12,e,2)}function Uu(t,e){return pu(1+Dl.count(Cl(t),t),e,3)}function Du(t,e){return pu(t.getMilliseconds(),e,3)}function Hu(t,e){return Du(t,e)+"000"}function $u(t,e){return pu(t.getMonth()+1,e,2)}function Wu(t,e){return pu(t.getMinutes(),e,2)}function Bu(t,e){return pu(t.getSeconds(),e,2)}function qu(t){var e=t.getDay();return 0===e?7:e}function Yu(t,e){return pu(Al.count(Cl(t),t),e,2)}function Vu(t,e){var n=t.getDay();return t=n>=4||0===n?zl(t):zl.ceil(t),pu(zl.count(Cl(t),t)+(4===Cl(t).getDay()),e,2)}function Xu(t){return t.getDay()}function Qu(t,e){return pu(Fl.count(Cl(t),t),e,2)}function Ku(t,e){return pu(t.getFullYear()%100,e,2)}function Gu(t,e){return pu(t.getFullYear()%1e4,e,4)}function Zu(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+pu(e/60|0,"0",2)+pu(e%60,"0",2)}function Ju(t,e){return pu(t.getUTCDate(),e,2)}function ts(t,e){return pu(t.getUTCHours(),e,2)}function es(t,e){return pu(t.getUTCHours()%12||12,e,2)}function ns(t,e){return pu(1+tu.count(nu(t),t),e,3)}function rs(t,e){return pu(t.getUTCMilliseconds(),e,3)}function is(t,e){return rs(t,e)+"000"}function as(t,e){return pu(t.getUTCMonth()+1,e,2)}function os(t,e){return pu(t.getUTCMinutes(),e,2)}function ls(t,e){return pu(t.getUTCSeconds(),e,2)}function us(t){var e=t.getUTCDay();return 0===e?7:e}function ss(t,e){return pu(Yl.count(nu(t),t),e,2)}function cs(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Kl(t):Kl.ceil(t),pu(Kl.count(nu(t),t)+(4===nu(t).getUTCDay()),e,2)}function fs(t){return t.getUTCDay()}function hs(t,e){return pu(Vl.count(nu(t),t),e,2)}function ps(t,e){return pu(t.getUTCFullYear()%100,e,2)}function ds(t,e){return pu(t.getUTCFullYear()%1e4,e,4)}function ms(){return"+0000"}function ys(){return"%"}function vs(t){return+t}function gs(t){return Math.floor(+t/1e3)}!function(t){ou=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=mu(i),c=yu(i),f=mu(a),h=yu(a),p=mu(o),d=yu(o),m=mu(l),y=yu(l),v=mu(u),g=yu(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:zu,e:zu,f:Hu,H:ju,I:Iu,j:Uu,L:Du,m:$u,M:Wu,p:function(t){return i[+(t.getHours()>=12)]},Q:vs,s:gs,S:Bu,u:qu,U:Yu,V:Vu,w:Xu,W:Qu,x:null,X:null,y:Ku,Y:Gu,Z:Zu,"%":ys},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:Ju,e:Ju,f:is,H:ts,I:es,j:ns,L:rs,m:as,M:os,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:vs,s:gs,S:ls,u:us,U:ss,V:cs,w:fs,W:hs,x:null,X:null,y:ps,Y:ds,Z:ms,"%":ys},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:Su,e:Su,f:Au,H:Mu,I:Mu,j:Cu,L:Ou,m:Tu,M:Nu,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:Lu,s:Ru,S:Pu,u:gu,U:_u,V:bu,w:vu,W:wu,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:ku,Y:xu,Z:Eu,"%":Fu};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=su[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=au(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=iu(au(a.y))).getUTCDay(),r=i>4||0===i?Vl.ceil(r):Vl(r),r=tu.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(au(a.y))).getDay(),r=i>4||0===i?Fl.ceil(r):Fl(r),r=Dl.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?iu(au(a.y)).getUTCDay():e(au(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,iu(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 su?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+="",ru);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,iu);return e.toString=function(){return t},e}}}(t),ou.format,ou.parse,lu=ou.utcFormat,uu=ou.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||lu("%Y-%m-%dT%H:%M:%S.%LZ");+new Date("2000-01-01T00:00:00.000Z")||uu("%Y-%m-%dT%H:%M:%S.%LZ");var _s=Tl((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()})),bs=(_s.range,Tl((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()}))),ws=(bs.range,Tl((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*Nl)}),(function(t,e){return(e-t)/Nl}),(function(t){return t.getUTCMinutes()})));ws.range;var xs=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ks=function(t){return function(){return t}},Es=(Math.abs,Math.atan2,Math.cos,Math.max,Math.min,Math.sin,Math.sqrt,1e-12),Ts=Math.PI,Ss=2*Ts;function Cs(t){this._context=t}Cs.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 Ms=function(t){return new Cs(t)};function Ns(t){return t[0]}function Ps(t){return t[1]}var Os=function(){var t=Ns,e=Ps,n=ks(!0),r=null,i=Ms,a=null;function o(o){var l,u,s,c=o.length,f=!1;for(null==r&&(a=i(s=ui())),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:ks(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:ks(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:ks(!!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};Fs(Ms);function As(t){this._curve=t}function Fs(t){function e(e){return new As(t(e))}return e._curve=t,e}As.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 Ls=Math.sin(Ts/10)/Math.sin(7*Ts/10),Rs=(Math.sin(Ss/10),Math.cos(Ss/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12),function(){});function zs(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 js(t){this._context=t}js.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:zs(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:zs(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:Rs,areaEnd:Rs,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:zs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Us(t){this._context=t}Us.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:zs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Ds(t,e){this._basis=new js(t),this._beta=e}Ds.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 js(t):new Ds(t,e)}return n.beta=function(e){return t(+e)},n})(.85);function Hs(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 $s(t,e){this._context=t,this._k=(1-e)/6}$s.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:Hs(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:Hs(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 $s(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Ws(t,e){this._context=t,this._k=(1-e)/6}Ws.prototype={areaStart:Rs,areaEnd:Rs,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:Hs(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 Ws(t,e)}return n.tension=function(e){return t(+e)},n})(0);function Bs(t,e){this._context=t,this._k=(1-e)/6}Bs.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:Hs(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 Bs(t,e)}return n.tension=function(e){return t(+e)},n})(0);function qs(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Es){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>Es){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 Ys(t,e){this._context=t,this._alpha=e}Ys.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:qs(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 Ys(t,e):new $s(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Vs(t,e){this._context=t,this._alpha=e}Vs.prototype={areaStart:Rs,areaEnd:Rs,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:qs(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 Vs(t,e):new Ws(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Xs(t,e){this._context=t,this._alpha=e}Xs.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:qs(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 Xs(t,e):new Bs(t,0)}return n.alpha=function(e){return t(+e)},n})(.5);function Qs(t){this._context=t}Qs.prototype={areaStart:Rs,areaEnd:Rs,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 Ks(t){return t<0?-1:1}function Gs(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(Ks(a)+Ks(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function Zs(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Js(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 tc(t){this._context=t}function ec(t){this._context=new nc(t)}function nc(t){this._context=t}function rc(t){this._context=t}function ic(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]}tc.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:Js(this,this._t0,Zs(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,Js(this,Zs(this,n=Gs(this,t,e)),n);break;default:Js(this,this._t0,n=Gs(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(ec.prototype=Object.create(tc.prototype)).point=function(t,e){tc.prototype.point.call(this,e,t)},nc.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)}},rc.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=ic(t),i=ic(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 ac(t,e){this._context=t,this._t=e}ac.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 oc(){this._=null}function lc(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function uc(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 sc(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 cc(t){for(;t.L;)t=t.L;return t}oc.prototype={constructor:oc,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=cc(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&&(uc(this,n),n=(t=n).U),n.C=!1,r.C=!0,sc(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(sc(this,n),n=(t=n).U),n.C=!1,r.C=!0,uc(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?cc(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,uc(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,sc(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,uc(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,sc(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,uc(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,sc(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var fc=oc;function hc(t,e,n,r){var i=[null,null],a=zc.push(i)-1;return i.left=t,i.right=e,n&&dc(i,t,e,n),r&&dc(i,e,t,r),Lc[t.index].halfedges.push(a),Lc[e.index].halfedges.push(a),i}function pc(t,e,n){var r=[e,n];return r.left=t,r}function dc(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 mc(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 yc(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 vc(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 gc(t,e){return e[+(e.left!==t.site)]}function _c(t,e){return e[+(e.left===t.site)]}var bc,wc=[];function xc(){lc(this),this.x=this.y=this.arc=this.site=this.cy=null}function kc(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=wc.pop()||new xc;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,_=Rc._;_;)if(v.y<_.y||v.y===_.y&&v.x<=_.x){if(!_.L){g=_.P;break}_=_.L}else{if(!_.R){g=_;break}_=_.R}Rc.insert(g,v),g||(bc=v)}}}}function Ec(t){var e=t.circle;e&&(e.P||(bc=e.N),Rc.remove(e),wc.push(e),lc(e),t.circle=null)}var Tc=[];function Sc(){lc(this),this.edge=this.site=this.circle=null}function Cc(t){var e=Tc.pop()||new Sc;return e.site=t,e}function Mc(t){Ec(t),Fc.remove(t),Tc.push(t),lc(t)}function Nc(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,l=[t];Mc(t);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<jc&&Math.abs(r-u.circle.cy)<jc;)a=u.P,l.unshift(u),Mc(u),u=a;l.unshift(u),Ec(u);for(var s=o;s.circle&&Math.abs(n-s.circle.x)<jc&&Math.abs(r-s.circle.cy)<jc;)o=s.N,l.push(s),Mc(s),s=o;l.push(s),Ec(s);var c,f=l.length;for(c=1;c<f;++c)s=l[c],u=l[c-1],dc(s.edge,u.site,s.site,i);u=l[0],(s=l[f-1]).edge=hc(u.site,s.site,null,i),kc(u),kc(s)}function Pc(t){for(var e,n,r,i,a=t[0],o=t[1],l=Fc._;l;)if((r=Oc(l,o)-a)>jc)l=l.L;else{if(!((i=a-Ac(l,o))>jc)){r>-jc?(e=l.P,n=l):i>-jc?(e=l,n=l.N):e=n=l;break}if(!l.R){e=l;break}l=l.R}!function(t){Lc[t.index]={site:t,halfedges:[]}}(t);var u=Cc(t);if(Fc.insert(e,u),e||n){if(e===n)return Ec(e),n=Cc(e.site),Fc.insert(u,n),u.edge=n.edge=hc(e.site,u.site),kc(e),void kc(n);if(n){Ec(e),Ec(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];dc(n.edge,s,d,b),u.edge=hc(s,t,null,b),n.edge=hc(t,d,null,b),kc(e),kc(n)}else u.edge=hc(e.site,u.site)}}function Oc(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 Ac(t,e){var n=t.N;if(n)return Oc(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Fc,Lc,Rc,zc,jc=1e-6,Ic=1e-12;function Uc(t,e){return e[1]-t[1]||e[0]-t[0]}function Dc(t,e){var n,r,i,a=t.sort(Uc).pop();for(zc=[],Lc=new Array(t.length),Fc=new fc,Rc=new fc;;)if(i=bc,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(Pc(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;Nc(i.arc)}if(function(){for(var t,e,n,r,i=0,a=Lc.length;i<a;++i)if((t=Lc[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]=vc(t,zc[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=zc.length;a--;)yc(i=zc[a],t,e,n,r)&&mc(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>jc||Math.abs(i[0][1]-i[1][1])>jc)||delete zc[a]}(o,l,u,s),function(t,e,n,r){var i,a,o,l,u,s,c,f,h,p,d,m,y=Lc.length,v=!0;for(i=0;i<y;++i)if(a=Lc[i]){for(o=a.site,l=(u=a.halfedges).length;l--;)zc[u[l]]||u.splice(l,1);for(l=0,s=u.length;l<s;)d=(p=_c(a,zc[u[l]]))[0],m=p[1],f=(c=gc(a,zc[u[++l%s]]))[0],h=c[1],(Math.abs(d-f)>jc||Math.abs(m-h)>jc)&&(u.splice(l,0,zc.push(pc(o,p,Math.abs(d-t)<jc&&r-m>jc?[t,Math.abs(f-t)<jc?h:r]:Math.abs(m-r)<jc&&n-d>jc?[Math.abs(h-r)<jc?f:n,r]:Math.abs(d-n)<jc&&m-e>jc?[n,Math.abs(f-n)<jc?h:e]:Math.abs(m-e)<jc&&d-t>jc?[Math.abs(h-e)<jc?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=Lc[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(zc.push(pc(o=v.site,x,k))-1,zc.push(pc(o,k,E))-1,zc.push(pc(o,E,T))-1,zc.push(pc(o,T,x))-1)}}for(i=0;i<y;++i)(a=Lc[i])&&(a.halfedges.length||delete Lc[i])}(o,l,u,s)}this.edges=zc,this.cells=Lc,Fc=Rc=zc=Lc=null}Dc.prototype={constructor:Dc,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return gc(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 Hc(t,e,n){this.k=t,this.x=e,this.y=n}Hc.prototype={constructor:Hc,scale:function(t){return 1===t?this:new Hc(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Hc(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 Hc(1,0,0);Hc.prototype;function $c(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 Wc(t){return 180*Math.atan2(t[1][1]-t[0][1],t[1][0]-t[0][0])/Math.PI}function Bc(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=Wc([e,u]),f=Wc([e,s]);Math.abs(c-f)>r&&(t.splice(a+1,0,s),n=!0)}var i;return n}}var qc=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=$c(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 Yc=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=Bc(f,h,m);return y.a=d,y.b=p,y.predict=m,y.rSquared=$c(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};var Vc=function(t){return t};function Xc(t,...e){return Qc(t,Vc,Vc,e)}function Qc(t,e,n,r){return function t(i,a){if(a>=r.length)return n(i);const o=new Map,l=r[a++];let u=-1;for(const t of i){const e=l(t,++u,i),n=o.get(e);n?n.push(t):o.set(e,[t])}for(const[e,n]of o)o.set(e,t(n,a));return e(o)}(t,0)}var Kc=n(8),Gc=n.n(Kc),Zc=n(3),Jc=n.n(Zc),tf=n(5),ef=n.n(tf),nf=n(11),rf=n(1),af=n.n(rf);function of(t){return(of="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 lf(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uf(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){lf(t,e,n[e])}))}return t}function sf(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 cf(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 ff(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 hf=!1;try{hf=!0}catch(t){}function pf(t){return null===t?null:"object"===of(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 df(t,e){return Array.isArray(e)&&e.length>0||!Array.isArray(e)&&e?lf({},t,e):{}}function mf(t){var e=t.icon,n=t.mask,r=t.symbol,i=t.className,a=t.title,o=pf(e),l=df("classes",[].concat(cf(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=(lf(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),lf(e,"fa-rotate-".concat(c),void 0!==c),lf(e,"fa-pull-".concat(f),void 0!==f),lf(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)),cf(i.split(" ")))),u=df("transform","string"==typeof t.transform?nf.b.transform(t.transform):t.transform),s=df("mask",pf(n)),c=Object(nf.a)(o,uf({},l,u,s,{symbol:r,title:a}));if(!c)return function(){var t;!hf&&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){mf.defaultProps.hasOwnProperty(e)||(h[e]=t[e])})),yf(f[0],h)}mf.displayName="FontAwesomeIcon",mf.propTypes={border:af.a.bool,className:af.a.string,mask:af.a.oneOfType([af.a.object,af.a.array,af.a.string]),fixedWidth:af.a.bool,inverse:af.a.bool,flip:af.a.oneOf(["horizontal","vertical","both"]),icon:af.a.oneOfType([af.a.object,af.a.array,af.a.string]),listItem:af.a.bool,pull:af.a.oneOf(["right","left"]),pulse:af.a.bool,rotation:af.a.oneOf([90,180,270]),size:af.a.oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:af.a.bool,symbol:af.a.oneOfType([af.a.bool,af.a.string]),title:af.a.string,transform:af.a.oneOfType([af.a.string,af.a.object]),swapOpacity:af.a.bool},mf.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 yf=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=ff(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[ff(e)]=r}return t}),{attrs:{}}),o=r.style,l=void 0===o?{}:o,u=sf(r,["style"]);return a.attrs.style=uf({},a.attrs.style,l),e.apply(void 0,[n.tag,uf({},a.attrs,u)].concat(cf(i)))}.bind(null,i.a.createElement),vf={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"]},gf={prefix:"fas",iconName:"sad-tear",icon:[496,512,[],"f5b4","M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 168c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zM152 416c-26.5 0-48-21-48-47 0-20 28.5-60.4 41.6-77.8 3.2-4.3 9.6-4.3 12.8 0C171.5 308.6 200 349 200 369c0 26-21.5 47-48 47zm16-176c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm170.2 154.2C315.8 367.4 282.9 352 248 352c-21.2 0-21.2-32 0-32 44.4 0 86.3 19.6 114.7 53.8 13.8 16.4-11.2 36.5-24.5 20.4z"]},_f=function(t){var e=t.activeFile,n=t.handleClose;return 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"},e.file_path),i.a.createElement("h6",{className:"text-muted"},"Additional information"),i.a.createElement("button",{type:"button",className:"close","aria-label":"Close",onClick:n},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(e.details).map((function(t){var e=u()(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,e.history.map((function(t){var e=u()(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))})))))))},bf=function(t){var e=t.state,n=t.dispatch,r=t.activePlot;return 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:e.displayFilenames,className:"form-check-input",type:"checkbox",id:"filenames-check",onChange:function(){n({type:"SET_DISPLAY_FILENAMES",displayFilenames:!e.displayFilenames})}}),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:e.displayRegression,className:"form-check-input",type:"checkbox",id:"regression-check",disabled:r!==Of.SCATTER_PLOT,onChange:function(){n({type:"SET_DISPLAY_REGRESSION",displayRegression:!e.displayRegression})}}),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 ".concat(r===Of.TREE_MAP&&"disabled")},i.a.createElement("small",null,"Regression Type")),i.a.createElement("select",{id:"regression-type",className:"form-control",disabled:r!==Of.SCATTER_PLOT,onChange:function(t){n({type:"SET_REGRESSION_TYPE",regressionType:parseInt(t.currentTarget.value)})}},i.a.createElement("option",{selected:!0,value:"0"},"Power Law"),i.a.createElement("option",{value:"1"},"Linear"))))))},wf=function(t){var e=t.fileClickCallback,n=t.values,a=t.filePrefix,o=t.displayRegression,l=t.regressionType,u=t.displayFilenames,s=t.path,c=t.activeFile,f=Object(r.useRef)(null);return Object(r.useEffect)((function(){Wf(f.current,{values:n,displayRegression:o,regressionType:l,displayFilenames:u,filePrefix:a,path:s,activeFile:c},e)})),i.a.createElement("div",{id:"canvas",ref:f})},xf=function(t){var e=t.fileClickCallback,n=t.values,a=t.filePrefix,o=t.displayRegression,l=t.regressionType,u=t.metricType,s=t.displayFilenames,c=t.path,f=t.activeFile,h=Object(r.useRef)(null);return Object(r.useEffect)((function(){Hf(h.current,{values:n,displayRegression:o,regressionType:l,metricType:u,displayFilenames:s,filePrefix:a,path:c,activeFile:f},e)})),i.a.createElement("div",{id:"canvas",ref:h})},kf=function(t){var e=t.fileClickCallback,n=t.values,a=t.filePrefix,o=t.displayRegression,l=t.regressionType,u=t.metricType,s=t.displayFilenames,c=t.path,f=t.activeFile,h=Object(r.useRef)(null);return Object(r.useEffect)((function(){$f(h.current,{values:n,displayRegression:o,regressionType:l,metricType:u,displayFilenames:s,filePrefix:a,path:c,activeFile:f},e)})),i.a.createElement("div",{id:"canvas",ref:h})},Ef=n(41),Tf=n.n(Ef);function Sf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Cf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Sf(n,!0).forEach((function(e){Tf()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Sf(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Mf=function(t,e){var n=t;switch(e.type){case"SET_DISPLAY_REGRESSION":n=Cf({},t,{displayRegression:e.displayRegression});break;case"SET_DISPLAY_FILENAMES":n=Cf({},t,{displayFilenames:e.displayFilenames});break;case"SET_REGRESSION_TYPE":n=Cf({},t,{regressionType:e.regressionType});break;case"SET_METRIC_TYPE":n=Cf({},t,{metricType:e.metricType});break;case"SET_VALUES":n=Cf({},t,{values:e.values});break;case"SET_FILE_PREFIX":n=Cf({},t,{filePrefix:e.filePrefix});break;case"SET_PATH":n=Cf({},t,{path:e.path});break;case"SET_ACTIVE_FILE":n=Cf({},t,{activeFile:e.activeFile})}return n},Nf=0,Pf=1,Of={SCATTER_PLOT:0,TREE_MAP:1},Af=0,Ff=1,Lf=2,Rf={displayRegression:!1,displayFilenames:!1,regressionType:Nf,metricType:Af,values:[],filePrefix:"",path:"",activeFile:{}},zf=function(t){var e=t.type,n=t.finishedLoadingCallback,a=(t.errorCallback,Object(r.useReducer)(Mf,Rf)),o=u()(a,2),l=o[0],s=o[1],c=Object(r.useState)(0),f=u()(c,2),h=f[0],p=f[1],d=Object(r.useState)(!1),m=u()(d,2),y=m[0],v=m[1],g=function(){var t=ef()(Jc.a.mark((function t(){var n;return Jc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("/values?type=".concat(e));case 2:return t.next=4,t.sent.json();case 4:return n=t.sent,t.abrupt("return",n);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),_=function(){var t=ef()(Jc.a.mark((function t(){var e;return Jc.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)}}();function b(t){s({type:"SET_ACTIVE_FILE",activeFile:t})}Object(r.useEffect)((function(){ef()(Jc.a.mark((function t(){var e,r,i,a;return Jc.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([g(),_()]);case 2:e=t.sent,r=u()(e,2),i=r[0],a=r[1],void 0===i.error?(v(!1),s({type:"SET_VALUES",values:i}),a.file_prefix&&s({type:"SET_FILE_PREFIX",filePrefix:a.file_prefix})):v(!0),n();case 8:case"end":return t.stop()}}),t)})))()}),[e]);return i.a.createElement("div",{className:"row pt-4"},i.a.createElement("div",{className:l.activeFile&&0!==Object.keys(l.activeFile).length?"col-8":"col-12"},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-12 col-lg-4"},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(l.filePrefix||""))),i.a.createElement("input",{type:"text",className:"form-control",placeholder:"","aria-label":"","aria-describedby":"path-text",id:"path",value:l.path,onChange:function(t){t.preventDefault(),s({type:"SET_PATH",path:t.target.value})}})))),i.a.createElement("div",{className:"col-6 col-lg-4"},i.a.createElement("label",{htmlFor:"path",className:"text-muted d-block"},i.a.createElement("small",null,"Plot Type")),i.a.createElement("div",{className:"btn-group btn-group-toggle",role:"toolbar","aria-label":"Plot Type"},i.a.createElement("button",{className:"btn btn-secondary ".concat(h===Of.SCATTER_PLOT&&"active"),onClick:function(t){t.preventDefault(),p(Of.SCATTER_PLOT)}},"Scatterplot/Hist"),i.a.createElement("button",{className:"btn btn-secondary ".concat(h===Of.TREE_MAP&&"active"),onClick:function(t){t.preventDefault(),p(Of.TREE_MAP)}},"Treemap"))),i.a.createElement("div",{className:"col-6 col-lg-4"},i.a.createElement("div",{className:"form-group"},i.a.createElement("label",{htmlFor:"metric-type",className:"text-muted"},i.a.createElement("small",null,"Metric")),i.a.createElement("select",{id:"metric-type",className:"form-control",onChange:function(t){t.preventDefault(),s({type:"SET_METRIC_TYPE",metricType:parseInt(t.target.value)})}},i.a.createElement("option",{selected:!0,value:"0"},"Churn * Complexity"),i.a.createElement("option",{value:"1"},"Complexity"),i.a.createElement("option",{value:"2"},"Churn"))))),i.a.createElement("div",{className:"d-flex ".concat(y?"justify-content-center align-items-center":"justify-content-start"),id:"canvas-wrapper"},y?i.a.createElement("div",{className:"text-center error"},i.a.createElement(mf,{icon:gf,size:"6x"}),i.a.createElement("h3",null,"Oh snap!"),"There has been an error loading the churn count."):i.a.createElement(i.a.Fragment,null,h===Of.SCATTER_PLOT?l.metricType===Af?i.a.createElement(wf,Gc()({fileClickCallback:b},l)):i.a.createElement(kf,Gc()({fileClickCallback:b},l)):i.a.createElement(xf,Gc()({fileClickCallback:b},l)))),i.a.createElement(bf,{state:l,dispatch:s,activePlot:h})))),l.activeFile&&Object.keys(l.activeFile).length>0&&i.a.createElement(_f,{activeFile:l.activeFile,handleClose:function(){s({type:"SET_ACTIVE_FILE",activeFile:{}})}}))},jf=function(t,e){switch(t){case Pf:return"y = ".concat(e.a.toFixed(2)," x + ").concat(e.b.toFixed(2));case Nf:default:return"y = ".concat(e.a.toFixed(2)," x ^ ").concat(e.b.toFixed(2))}},If=function(t,e,n){return function(){var t=Ao,e=!1,n=1,r=1,i=[0],a=Eo,o=Eo,l=Eo,u=Eo,s=Eo;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(So),t}function f(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,f=e.x1-n,h=e.y1-n;f<r&&(r=f=(r+f)/2),h<c&&(c=h=(c+h)/2),e.x0=r,e.y0=c,e.x1=f,e.y1=h,e.children&&(n=i[e.depth+1]=a(e)/2,r+=s(e)-n,c+=o(e)-n,(f-=l(e)-n)<r&&(r=f=(r+f)/2),(h-=u(e)-n)<c&&(c=h=(c+h)/2),t(e,r,c,f,h))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=ko(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:To(+t),c):a},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:To(+t),c):o},c.paddingRight=function(t){return arguments.length?(l="function"==typeof t?t:To(+t),c):l},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:To(+t),c):u},c.paddingLeft=function(t){return arguments.length?(s="function"==typeof t?t:To(+t),c):s},c}().tile(Ao).size([e,n]).padding(1).round(!0)(go(t).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})))},Uf=Gi(",d"),Df=function(t){t.append("text").selectAll("tspan").data((function(t){return t.data.name.concat(Uf(t.value))})).join("tspan").attr("x",3).attr("y",(function(t,e,n){return"".concat(.3*(e===n.length-1)+1.1+.9*e,"em")})).attr("fill-opacity",(function(t,e,n){return e===n.length-1?.7:null})).text((function(t){return t}))},Hf=function(t,e){var n=e.values,r=(e.displayRegression,e.regressionType,e.metricType),i=void 0===r?0:r,a=e.displayFilenames,o=void 0!==a&&a,l=e.filePrefix,s=void 0===l?"":l,c=e.path,f=void 0===c?"":c,h=(e.activeFile,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){});t.innerHTML="";var p=600,d=600,m=Jo(xs),y=(n=n.filter((function(t){return t.file_path.startsWith("".concat(s).concat(f))}))).map((function(t){var e;switch(i){case Ff:e=t.y;break;case Lf:e=t.x;break;case Af:default:e=t.y*t.x}return{name:t.file_path.substring(s.length+1),value:e,file_path:t.file_path,details:t.details,history:t.history}})).map((function(t){return{name:t.name.split("/"),value:t.value,file_path:t.file_path,details:t.details,history:t.history}})),v={name:s,children:Array.from(Xc(y,(function(t){return t.name[0]})),(function(t){var e=u()(t,2),n=e[0],r=e[1];return{name:n,children:Array.from(Xc(r,(function(t){return t.name[1]})),(function(t){var e=u()(t,2);return{name:e[0],children:e[1]}}))}}))},g=ae(t).append("svg").attr("viewBox",[0,0,p,d]).style("font-size","10px");if(v.children.length>0){var _=If(v,p,d),b=g.selectAll("g").data(_.leaves()).join("g").attr("transform",(function(t){return"translate(".concat(t.x0,",").concat(t.y0,")")}));b.append("title").text((function(t){return"".concat(t.ancestors().reverse().map((function(t){return t.data.name})).join("/"),"\n").concat(Uf(t.value))})),b.append("rect").attr("fill",(function(t){for(;t.depth>1;)t=t.parent;return m(t.data.name)})).attr("fill-opacity",.6).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).on("click",(function(t){h(t.data)})),o&&Df(b)}},$f=function(t,e){var n=e.values,r=(e.displayRegression,e.regressionType,e.metricType),i=void 0===r?0:r,a=(e.displayFilenames,e.filePrefix),o=void 0===a?"":a,l=e.path,u=void 0===l?"":l;e.activeFile,arguments.length>2&&void 0!==arguments[2]&&arguments[2];t.innerHTML="";var s=600,c=600;n=n.filter((function(t){return t.file_path.startsWith("".concat(o).concat(u))}));var f={top:20,right:30,bottom:30,left:40},h=ae(t).append("svg").attr("viewBox",[0,0,s,c]).style("font-size","10px"),p=n.map((function(t){return i===Ff?t.y:t.x})),m=pl().domain(d(p)).range(["green","red"]),y=pl().domain(d(p)).nice(20).range([f.left,s-f.right]),v=E().domain(y.domain()).thresholds(y.ticks(20))(p),g=pl().domain([0,T(v,(function(t){return t.length}))]).nice().range([c-f.bottom,f.top]),_=function(t){return t.attr("transform","translate(0,".concat(c-f.bottom,")")).call(U(y).tickSizeOuter(0))},b=function(t){return t.attr("transform","translate(".concat(f.left,",0)")).call(D(g))};h.append("g").selectAll("rect").data(v).join("rect").attr("fill",(function(t){return m(t.x0)})).attr("x",(function(t){return y(t.x0)+1})).attr("width",(function(t){return Math.max(0,y(t.x1)-y(t.x0)-1)})).attr("y",(function(t){return g(t.length)})).attr("height",(function(t){return g(0)-g(t.length)})),h.append("g").call(_),h.append("g").call(b)},Wf=function(t,e){var n=e.values,r=e.displayRegression,i=void 0===r||r,a=e.regressionType,o=void 0===a?0:a,l=(e.metricType,e.displayFilenames),u=void 0!==l&&l,s=e.filePrefix,c=void 0===s?"":s,f=e.path,h=void 0===f?"":f,p=(e.activeFile,arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){});t.innerHTML="";var m=600,y=600;n=n.filter((function(t){return t.file_path.startsWith("".concat(c).concat(h))}));var v={top:20,right:30,bottom:30,left:40},g=xl().domain(d(n.filter((function(t){return t.y>0})),(function(t){return t.x*t.y}))).range(["green","red"]),_=xl().domain(d(n.filter((function(t){return t.y>0})),(function(t){return t.x*t.y}))).range(["lightgreen","tomato"]),b=pl().domain(d(n,(function(t){return t.x}))).nice().range([v.left,m-v.right]),w=pl().domain(d(n,(function(t){return t.y}))).nice().range([y-v.bottom,v.top]),x=function(t){return t.attr("transform","translate(0,".concat(y-v.bottom,")")).call(U(b)).call((function(t){return t.select(".domain").remove()})).call((function(t){return t.append("text").attr("x",m/2+v.left).attr("y",30).attr("fill","#000").attr("font-size",12).attr("font-weight","bold").attr("text-anchor","end").text("Churn")}))},k=function(t){return t.attr("transform","translate(".concat(v.left,",0)")).call(D(w)).call((function(t){return t.select(".domain").remove()})).call((function(t){return t.append("text").attr("y",-30).attr("x",-y/2).attr("transform","rotate(-90)").attr("fill","#000").attr("font-size",12).attr("text-anchor","start").attr("font-weight","bold").text("Complexity")}))},E=Os().x((function(t){return b(t[0])})).y((function(t){return w(t[1])})),S=ae(t).append("svg").attr("viewBox",[0,0,m,y]),C=S.append("g");if(C.append("g").attr("class","axis").call(x).selectAll(".tick line").classed("baseline",(function(t){return 0===t})),C.append("g").attr("class","axis").call(k).selectAll(".tick line").classed("baseline",(function(t){return 0===t})),C.append("g").attr("stroke-width",1.5).attr("font-family","Red Hat Text").attr("font-size",12).selectAll("g").data(n).join("g").attr("transform",(function(t){return"translate(".concat(b(t.x),",").concat(w(t.y),")")})).call((function(t){return t.append("circle").attr("fill",(function(t){return _(t.x*t.y)})).attr("stroke",(function(t){return g(t.x*t.y)})).attr("style","cursor:pointer").attr("r",4)})).call((function(t){return u?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){p(t)})),i){var M=function(t){switch(t){case Pf:return qc().x((function(t){return t.x})).y((function(t){return t.y})).domain([3,T(n,(function(t){return t.x}))]);case Nf:default:return n=n.filter((function(t){return t.y>0})),Yc().x((function(t){return t.x})).y((function(t){return t.y})).domain([3,T(n,(function(t){return t.x}))])}}(o),N=M(n);C.append("g").attr("font-family","Red Hat Text").attr("font-size",24).call((function(t){return t.append("path").attr("class","regression").datum(M(n)).attr("d",E)})).call((function(t){return t.append("text").attr("dy","60").attr("dx","33%").text("R^2 = ".concat(N.rSquared.toFixed(2)))})).call((function(t){return t.append("text").attr("dy","30").attr("dx","33%").text(jf(o,N))}))}};function Bf(){var t=Object(r.useState)(95),e=u()(t,2),n=e[0],a=e[1],o=Object(r.useState)([]),l=u()(o,2),s=l[0],c=l[1],f=function(){var t=ef()(Jc.a.mark((function t(e){var n;return Jc.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,c(n);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){f(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(),f(n)}},i.a.createElement(mf,{icon:vf})))))),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"},s.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)))}))))))}var qf=n(42),Yf=n.n(qf);var Vf=function(){return(Vf=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};var Xf,Qf=function(){var t=Object(r.useState)(0)[1];return Object(r.useCallback)((function(){return t((function(t){return t+1}))}),[])},Kf=function(t){void 0===t&&(t={});var e=Qf(),n=Object(r.useRef)(Vf({},t));return[Object(r.useCallback)((function(){return n.current}),[]),Object(r.useCallback)((function(t){t&&(Object.assign(n.current,t),e())}),[])]},Gf=function(t){Object(r.useEffect)(t,[])},Zf=function(t,e){var n=Object(r.useRef)(!0);Object(r.useEffect)((function(){if(!n.current)return t();n.current=!1}),e)},Jf=(n(43),function(t,e,n){return t=(t=t<=n?t:n)>=e?t:e}),th=!1,eh=[],nh=function(t){eh.push(t),th||1!==eh.length||function t(){th=!0;var e=eh.shift();if(e)return e(t);th=!1}()},rh=function(t,e){var n;Xf=window.requestAnimationFrame((function r(i){i-(n=n||i)>e?t():Xf=window.requestAnimationFrame(r)}))},ih=function(){},ah={isFinished:!1,progress:0,sideEffect:ih},oh=function(){Xf&&window.cancelAnimationFrame(Xf),th=!1,eh=[]},lh=function(t){var e=void 0===t?{}:t,n=e.animationDuration,i=void 0===n?200:n,a=e.incrementDuration,o=void 0===a?800:a,l=e.isAnimating,u=void 0!==l&&l,s=e.minimum,c=void 0===s?.08:s,f=Kf(ah),h=f[0],p=f[1],d=function(t){if(1===(t=Jf(t,c,1)))return oh(),nh((function(e){p({progress:t,sideEffect:function(){return rh(e,i)}})})),void nh((function(){p({isFinished:!0,sideEffect:oh})}));nh((function(e){p({progress:t,sideEffect:function(){return rh(e,i)}})}))},m=function(){var t,e;d((t=h().progress,e=0,t>=0&&t<.2?e=.1:t>=.2&&t<.5?e=.04:t>=.5&&t<.8?e=.02:t>=.8&&t<.99&&(e=.005),Jf(t+e,0,.994)))},y=function(){!function t(){m(),nh((function(e){rh((function(){t(),e()}),o)}))}()},v=Object(r.useRef)(ih);return Object(r.useEffect)((function(){v.current=m})),Gf((function(){return u&&y(),oh})),Zf((function(){h().sideEffect()}),[h().sideEffect]),Zf((function(){u?p({sideEffect:y}):d(1)}),[u]),{animationDuration:i,isFinished:h().isFinished,progress:h().progress}},uh=function(t){var e=t.children,n=Yf()(t,["children"]);return e(lh(n))};var sh=function(t){var e=t.progress,n=t.animationDuration;return r.createElement("div",{className:"progressbar",style:{marginLeft:"".concat(100*(-1+e),"%"),transition:"margin-left ".concat(n,"ms linear")}},r.createElement("div",{className:"shadow"}))};sh.propTypes={animationDuration:af.a.number.isRequired,progress:af.a.number.isRequired};var ch=sh,fh=function(t){var e=t.children,n=t.isFinished,i=t.animationDuration;return r.createElement("div",{style:{opacity:n?0:1,pointerEvents:"none",transition:"opacity ".concat(i,"ms linear")}},e)};fh.propTypes={animationDuration:af.a.number.isRequired,children:af.a.node.isRequired,isFinished:af.a.bool.isRequired};var hh=fh,ph=function(t){var e=t.isAnimating,n=t.key;return i.a.createElement(uh,{isAnimating:e,key:n},(function(t){var e=t.animationDuration,n=t.isFinished,r=t.progress;return i.a.createElement(hh,{isFinished:n,animationDuration:e},i.a.createElement(ch,{progress:r,animationDuration:e}))}))};function dh(){var t=Object(r.useState)("rb"),e=u()(t,2),n=e[0],a=e[1],o=Object(r.useState)(!0),l=u()(o,2),s=l[0],c=l[1];return i.a.createElement(i.a.Fragment,null,i.a.createElement(ph,{isAnimating:s,key:n}),i.a.createElement("nav",{className:"navbar navbar-expand-lg navbar-light bg-light fixed-top"},i.a.createElement("a",{className:"navbar-brand",href:"#"},i.a.createElement("img",{src:"images/attractor_logo.svg",alt:"",width:"36",className:"mr-3"}),"Attractor"),i.a.createElement("ul",{className:"navbar-nav mx-auto"},Object.entries(window.types).map((function(t){var e=u()(t,2),r=e[0],o=e[1];return i.a.createElement("li",{className:"nav-item ".concat(n===r?"active":"")},i.a.createElement("a",{className:"nav-link",href:"#",onClick:function(){c(!0),a(r)}},o))})))),i.a.createElement("div",{className:"container"},i.a.createElement(zf,{type:n,finishedLoadingCallback:function(){c(!1)}}),i.a.createElement("div",{className:"row mt-3"},i.a.createElement("div",{className:"col-12"},i.a.createElement(Bf,null)))))}document.addEventListener("DOMContentLoaded",(function(){document.getElementById("react-root")&&o.a.render(i.a.createElement(dh,null),document.getElementById("react-root"))})),window.scatterPlot=Wf}]);
@@ -3,9 +3,12 @@
3
3
  <link href="https://fonts.googleapis.com/css?family=Red+Hat+Display|Red+Hat+Text&display=swap" rel="stylesheet">
4
4
  <link href="stylesheets/main.css" rel="stylesheet" />
5
5
  <title>Attractor Output</title>
6
+ <script type="text/javascript">
7
+ window.types = <%= @types.to_json %>
8
+ </script>
6
9
  <script src="javascripts/index.pack.js"></script>
7
10
  <% if @serve_static %>
8
- <script src="javascripts/index.js"></script>
11
+ <script src="javascripts/index<%= ".#{@short_type}" unless @short_type.nil? %>.js"></script>
9
12
  <% end %>
10
13
  </head>
11
14
  <body class="d-flex flex-column h-100">
@@ -15,6 +18,13 @@
15
18
  <img class="mr-3" src="images/attractor_logo.svg" alt="" width="36">
16
19
  Attractor
17
20
  </a>
21
+ <ul class="navbar-nav mx-auto">
22
+ <% @types.each do |short_type, type| %>
23
+ <li class="nav-item <%= "active" if @short_type == short_type %>">
24
+ <a class="nav-link" href="index.<%= short_type %>.html"><%= type %></a>
25
+ </li>
26
+ <% end %>
27
+ </ul>
18
28
  </nav>
19
29
  <div class="container">
20
30
  <div class="row mt-4">
data/lib/attractor.rb CHANGED
@@ -4,6 +4,9 @@ require 'attractor/version'
4
4
  require 'attractor/calculators/base_calculator'
5
5
  require 'attractor/calculators/ruby_calculator'
6
6
  require 'attractor/calculators/js_calculator'
7
+ require 'attractor/detectors/base_detector'
8
+ require 'attractor/detectors/ruby_detector'
9
+ require 'attractor/detectors/js_detector'
7
10
  require 'attractor/reporters/base_reporter'
8
11
  require 'attractor/reporters/console_reporter'
9
12
  require 'attractor/reporters/html_reporter'
@@ -21,7 +24,10 @@ module Attractor
21
24
  when 'rb'
22
25
  { 'rb' => RubyCalculator.new(file_prefix: file_prefix) }
23
26
  else
24
- { 'rb' => RubyCalculator.new(file_prefix: file_prefix), 'js' => JsCalculator.new(file_prefix: file_prefix)}
27
+ {}.tap do |hash|
28
+ hash['rb'] = RubyCalculator.new(file_prefix: file_prefix) if RubyDetector.new.detect
29
+ hash['js'] = JsCalculator.new(file_prefix: file_prefix) if JsDetector.new.detect
30
+ end
25
31
  end
26
32
  end
27
33
 
@@ -7,6 +7,8 @@ require 'attractor/value'
7
7
  module Attractor
8
8
  # calculates churn and complexity
9
9
  class BaseCalculator
10
+ attr_reader :type
11
+
10
12
  def initialize(file_prefix: '', file_extension: 'rb', minimum_churn_count: 3)
11
13
  @file_prefix = file_prefix
12
14
  @file_extension = file_extension
@@ -4,6 +4,7 @@ module Attractor
4
4
  class JsCalculator < BaseCalculator
5
5
  def initialize(file_prefix: '', minimum_churn_count: 3)
6
6
  super(file_prefix: file_prefix, file_extension: '(js|jsx)', minimum_churn_count: minimum_churn_count)
7
+ @type = "JavaScript"
7
8
  end
8
9
 
9
10
  def calculate
@@ -6,6 +6,7 @@ module Attractor
6
6
  class RubyCalculator < BaseCalculator
7
7
  def initialize(file_prefix: '', minimum_churn_count: 3)
8
8
  super(file_prefix: file_prefix, file_extension: 'rb', minimum_churn_count: minimum_churn_count)
9
+ @type = "Ruby"
9
10
  end
10
11
 
11
12
  def calculate
@@ -0,0 +1,7 @@
1
+ module Attractor
2
+ class BaseDetector
3
+ def detect
4
+ raise NotImplementedError
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ module Attractor
2
+ class JsDetector < BaseDetector
3
+ def detect
4
+ package_json_exists?
5
+ end
6
+
7
+ def package_json_exists?
8
+ File.exist? File.expand_path("package.json", Dir.pwd)
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Attractor
2
+ class RubyDetector < BaseDetector
3
+ def detect
4
+ gemfile_exists?
5
+ end
6
+
7
+ def gemfile_exists?
8
+ File.exist? File.expand_path("Gemfile", Dir.pwd)
9
+ end
10
+ end
11
+ end
@@ -10,6 +10,7 @@ module Attractor
10
10
  class BaseReporter
11
11
  extend Forwardable
12
12
  attr_accessor :values, :file_prefix
13
+ attr_reader :types
13
14
  def_delegator :@watcher, :watch
14
15
 
15
16
  def initialize(file_prefix: '', calculators:, open_browser: true)
@@ -33,6 +34,7 @@ module Attractor
33
34
 
34
35
  def report
35
36
  @suggestions = @suggester.suggest
37
+ @types = Hash[@calculators.map { |calc| [calc.first, calc.last.type] }]
36
38
  end
37
39
 
38
40
  def render
@@ -10,12 +10,19 @@ module Attractor
10
10
  puts "file_path#{' ' * 53}complexity churn"
11
11
  puts '-' * 80
12
12
 
13
- puts @values&.map(&:to_s)
13
+ @calculators.each do |calc|
14
+ # e.g. ['js', JsCalculator']
15
+ puts calc.last.type
14
16
 
15
- puts
16
- puts 'Suggestions for refactorings:'
17
- @suggestions&.each { |sug| puts sug.file_path }
18
- puts
17
+ values = calc.last.calculate
18
+ suggester = Suggester.new(values)
19
+
20
+ puts values&.map(&:to_s)
21
+ puts
22
+ puts 'Suggestions for refactorings:'
23
+ suggester.suggest&.each { |sug| puts sug.file_path }
24
+ puts
25
+ end
19
26
  end
20
27
  end
21
28
  end
@@ -16,16 +16,35 @@ module Attractor
16
16
 
17
17
  File.open('./attractor_output/images/attractor_logo.svg', 'w') { |file| file.write(logo) }
18
18
  File.open('./attractor_output/stylesheets/main.css', 'w') { |file| file.write(css) }
19
- File.open('./attractor_output/javascripts/index.js', 'w') { |file| file.write(javascript) }
20
19
  File.open('./attractor_output/javascripts/index.pack.js', 'w') { |file| file.write(javascript_pack) }
21
20
 
22
- File.open('./attractor_output/index.html', 'w') { |file| file.write(render) }
23
- puts "Generated HTML report at #{File.expand_path './attractor_output/index.html'}"
21
+ if @calculators.size > 1
22
+ @calculators.each do |calc|
23
+ @short_type = calc.first
24
+ @values = calc.last.calculate
25
+ suggester = Suggester.new(values)
26
+ @suggestions = suggester.suggest
24
27
 
25
- if @open_browser
26
- Launchy.open(File.expand_path('./attractor_output/index.html'))
27
- puts "Opening browser window..."
28
+ File.open("./attractor_output/javascripts/index.#{@short_type}.js", 'w') { |file| file.write(javascript) }
29
+ File.open("./attractor_output/index.#{@short_type}.html", 'w') { |file| file.write(render) }
30
+ puts "Generated HTML report at #{File.expand_path './attractor_output/'}/index.#{@short_type}.html"
31
+ end
32
+
33
+ if @open_browser
34
+ Launchy.open(File.expand_path("./attractor_output/index.#{@calculators.first.first}.html"))
35
+ puts "Opening browser window..."
36
+ end
37
+ else
38
+ File.open('./attractor_output/javascripts/index.js', 'w') { |file| file.write(javascript) }
39
+ File.open('./attractor_output/index.html', 'w') { |file| file.write(render) }
40
+ puts "Generated HTML report at #{File.expand_path './attractor_output/index.html'}"
41
+
42
+ if @open_browser
43
+ Launchy.open(File.expand_path('./attractor_output/index.html'))
44
+ puts "Opening browser window..."
45
+ end
28
46
  end
47
+
29
48
  end
30
49
 
31
50
  def logo
@@ -17,6 +17,7 @@ module Attractor
17
17
  set :show_exceptions, :after_handler
18
18
 
19
19
  get '/' do
20
+ @types = @reporter.types
20
21
  erb File.read(File.expand_path('../../../app/views/index.html.erb', __dir__))
21
22
  end
22
23
 
@@ -1,3 +1,3 @@
1
1
  module Attractor
2
- VERSION = "1.0.2"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attractor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Rubisch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-14 00:00:00.000000000 Z
11
+ date: 2019-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: churn
@@ -316,6 +316,7 @@ executables:
316
316
  extensions: []
317
317
  extra_rdoc_files: []
318
318
  files:
319
+ - ".all-contributorsrc"
319
320
  - ".babelrc"
320
321
  - ".eslintrc.json"
321
322
  - ".github/workflows/ruby.yml"
@@ -346,6 +347,9 @@ files:
346
347
  - lib/attractor/calculators/js_calculator.rb
347
348
  - lib/attractor/calculators/ruby_calculator.rb
348
349
  - lib/attractor/cli.rb
350
+ - lib/attractor/detectors/base_detector.rb
351
+ - lib/attractor/detectors/js_detector.rb
352
+ - lib/attractor/detectors/ruby_detector.rb
349
353
  - lib/attractor/reporters/.keep
350
354
  - lib/attractor/reporters/base_reporter.rb
351
355
  - lib/attractor/reporters/console_reporter.rb