UNPKG

plotly.js

Version:

The open source javascript graphing library that powers plotly

18 lines 1.11 MB
/** * plotly.js (basic - minified) v3.5.0 * Copyright 2012-2026, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ ( function(root, factory) { if (typeof module === "object" && module.exports) { module.exports = factory(); } else { root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { "use strict";var Plotly=(()=>{var fI=Object.defineProperty,cI=Object.defineProperties;var vI=Object.getOwnPropertyDescriptors;var pb=Object.getOwnPropertySymbols;var hI=Object.prototype.hasOwnProperty,dI=Object.prototype.propertyIsEnumerable;var mb=(e,r,t)=>r in e?fI(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,no=(e,r)=>{for(var t in r||(r={}))hI.call(r,t)&&mb(e,t,r[t]);if(pb)for(var t of pb(r))dI.call(r,t)&&mb(e,t,r[t]);return e},mv=(e,r)=>cI(e,vI(r));var J=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var yv=J(yb=>{"use strict";yb.version="3.5.0"});var bb=J((gb,gv)=>{(function(r,t,a){t[r]=t[r]||a(),typeof gv!="undefined"&&gv.exports&&(gv.exports=t[r])})("Promise",typeof window!="undefined"?window:gb,function(){"use strict";var r,t,a,n=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(w,T,b,M){return Object.defineProperty(w,T,{value:b,writable:!0,configurable:M!==!1})}}catch(_){r=function(T,b,M){return T[b]=M,T}}a=function(){var w,T,b;function M(C,k){this.fn=C,this.self=k,this.next=void 0}return{add:function(k,q){b=new M(k,q),T?T.next=b:w=b,T=b,b=void 0},drain:function(){var k=w;for(w=T=t=void 0;k;)k.fn.call(k.self),k=k.next}}}();function l(_,w){a.add(_,w),t||(t=i(a.drain))}function o(_){var w,T=typeof _;return _!=null&&(T=="object"||T=="function")&&(w=_.then),typeof w=="function"?w:!1}function s(){for(var _=0;_<this.chain.length;_++)u(this,this.state===1?this.chain[_].success:this.chain[_].failure,this.chain[_]);this.chain.length=0}function u(_,w,T){var b,M;try{w===!1?T.reject(_.msg):(w===!0?b=_.msg:b=w.call(void 0,_.msg),b===T.promise?T.reject(TypeError("Promise-chain cycle")):(M=o(b))?M.call(b,T.resolve,T.reject):T.resolve(b))}catch(C){T.reject(C)}}function f(_){var w,T=this;if(!T.triggered){T.triggered=!0,T.def&&(T=T.def);try{(w=o(_))?l(function(){var b=new d(T);try{w.call(_,function(){f.apply(b,arguments)},function(){v.apply(b,arguments)})}catch(M){v.call(b,M)}}):(T.msg=_,T.state=1,T.chain.length>0&&l(s,T))}catch(b){v.call(new d(T),b)}}}function v(_){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=_,w.state=2,w.chain.length>0&&l(s,w))}function h(_,w,T,b){for(var M=0;M<w.length;M++)(function(k){_.resolve(w[k]).then(function(D){T(k,D)},b)})(M)}function d(_){this.def=_,this.triggered=!1}function m(_){this.promise=_,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function y(_){if(typeof _!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var w=new m(this);this.then=function(b,M){var C={success:typeof b=="function"?b:!0,failure:typeof M=="function"?M:!1};return C.promise=new this.constructor(function(q,D){if(typeof q!="function"||typeof D!="function")throw TypeError("Not a function");C.resolve=q,C.reject=D}),w.chain.push(C),w.state!==0&&l(s,w),C.promise},this.catch=function(b){return this.then(void 0,b)};try{_.call(void 0,function(b){f.call(w,b)},function(b){v.call(w,b)})}catch(T){v.call(w,T)}}var g=r({},"constructor",y,!1);return y.prototype=g,r(g,"__NPO__",0,!1),r(y,"resolve",function(w){var T=this;return w&&typeof w=="object"&&w.__NPO__===1?w:new T(function(M,C){if(typeof M!="function"||typeof C!="function")throw TypeError("Not a function");M(w)})}),r(y,"reject",function(w){return new this(function(b,M){if(typeof b!="function"||typeof M!="function")throw TypeError("Not a function");M(w)})}),r(y,"all",function(w){var T=this;return n.call(w)!="[object Array]"?T.reject(TypeError("Not an array")):w.length===0?T.resolve([]):new T(function(M,C){if(typeof M!="function"||typeof C!="function")throw TypeError("Not a function");var k=w.length,q=Array(k),D=0;h(T,w,function(z,F){q[z]=F,++D===k&&M(q)},C)})}),r(y,"race",function(w){var T=this;return n.call(w)!="[object Array]"?T.reject(TypeError("Not an array")):new T(function(M,C){if(typeof M!="function"||typeof C!="function")throw TypeError("Not a function");h(T,w,function(q,D){M(D)},C)})}),y})});var Hr=J((Lie,bv)=>{(function(){var e={version:"3.8.2"},r=[].slice,t=function(c){return r.call(c)},a=self.document;function n(c){return c&&(c.ownerDocument||c.document||c).documentElement}function i(c){return c&&(c.ownerDocument&&c.ownerDocument.defaultView||c.document&&c||c.defaultView)}if(a)try{t(a.documentElement.childNodes)[0].nodeType}catch(c){t=function(p){for(var x=p.length,A=new Array(x);x--;)A[x]=p[x];return A}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(c){var l=this.Element.prototype,o=l.setAttribute,s=l.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;l.setAttribute=function(p,x){o.call(this,p,x+"")},l.setAttributeNS=function(p,x,A){s.call(this,p,x,A+"")},u.setProperty=function(p,x,A){f.call(this,p,x+"",A)}}e.ascending=v;function v(c,p){return c<p?-1:c>p?1:c>=p?0:NaN}e.descending=function(c,p){return p<c?-1:p>c?1:p>=c?0:NaN},e.min=function(c,p){var x=-1,A=c.length,S,L;if(arguments.length===1){for(;++x<A;)if((L=c[x])!=null&&L>=L){S=L;break}for(;++x<A;)(L=c[x])!=null&&S>L&&(S=L)}else{for(;++x<A;)if((L=p.call(c,c[x],x))!=null&&L>=L){S=L;break}for(;++x<A;)(L=p.call(c,c[x],x))!=null&&S>L&&(S=L)}return S},e.max=function(c,p){var x=-1,A=c.length,S,L;if(arguments.length===1){for(;++x<A;)if((L=c[x])!=null&&L>=L){S=L;break}for(;++x<A;)(L=c[x])!=null&&L>S&&(S=L)}else{for(;++x<A;)if((L=p.call(c,c[x],x))!=null&&L>=L){S=L;break}for(;++x<A;)(L=p.call(c,c[x],x))!=null&&L>S&&(S=L)}return S},e.extent=function(c,p){var x=-1,A=c.length,S,L,R;if(arguments.length===1){for(;++x<A;)if((L=c[x])!=null&&L>=L){S=R=L;break}for(;++x<A;)(L=c[x])!=null&&(S>L&&(S=L),R<L&&(R=L))}else{for(;++x<A;)if((L=p.call(c,c[x],x))!=null&&L>=L){S=R=L;break}for(;++x<A;)(L=p.call(c,c[x],x))!=null&&(S>L&&(S=L),R<L&&(R=L))}return[S,R]};function h(c){return c===null?NaN:+c}function d(c){return!isNaN(c)}e.sum=function(c,p){var x=0,A=c.length,S,L=-1;if(arguments.length===1)for(;++L<A;)d(S=+c[L])&&(x+=S);else for(;++L<A;)d(S=+p.call(c,c[L],L))&&(x+=S);return x},e.mean=function(c,p){var x=0,A=c.length,S,L=-1,R=A;if(arguments.length===1)for(;++L<A;)d(S=h(c[L]))?x+=S:--R;else for(;++L<A;)d(S=h(p.call(c,c[L],L)))?x+=S:--R;if(R)return x/R},e.quantile=function(c,p){var x=(c.length-1)*p+1,A=Math.floor(x),S=+c[A-1],L=x-A;return L?S+L*(c[A]-S):S},e.median=function(c,p){var x=[],A=c.length,S,L=-1;if(arguments.length===1)for(;++L<A;)d(S=h(c[L]))&&x.push(S);else for(;++L<A;)d(S=h(p.call(c,c[L],L)))&&x.push(S);if(x.length)return e.quantile(x.sort(v),.5)},e.variance=function(c,p){var x=c.length,A=0,S,L,R=0,E=-1,N=0;if(arguments.length===1)for(;++E<x;)d(S=h(c[E]))&&(L=S-A,A+=L/++N,R+=L*(S-A));else for(;++E<x;)d(S=h(p.call(c,c[E],E)))&&(L=S-A,A+=L/++N,R+=L*(S-A));if(N>1)return R/(N-1)},e.deviation=function(){var c=e.variance.apply(this,arguments);return c&&Math.sqrt(c)};function m(c){return{left:function(p,x,A,S){for(arguments.length<3&&(A=0),arguments.length<4&&(S=p.length);A<S;){var L=A+S>>>1;c(p[L],x)<0?A=L+1:S=L}return A},right:function(p,x,A,S){for(arguments.length<3&&(A=0),arguments.length<4&&(S=p.length);A<S;){var L=A+S>>>1;c(p[L],x)>0?S=L:A=L+1}return A}}}var y=m(v);e.bisectLeft=y.left,e.bisect=e.bisectRight=y.right,e.bisector=function(c){return m(c.length===1?function(p,x){return v(c(p),x)}:c)},e.shuffle=function(c,p,x){(A=arguments.length)<3&&(x=c.length,A<2&&(p=0));for(var A=x-p,S,L;A;)L=Math.random()*A--|0,S=c[A+p],c[A+p]=c[L+p],c[L+p]=S;return c},e.permute=function(c,p){for(var x=p.length,A=new Array(x);x--;)A[x]=c[p[x]];return A},e.pairs=function(c){for(var p=0,x=c.length-1,A,S=c[0],L=new Array(x<0?0:x);p<x;)L[p]=[A=S,S=c[++p]];return L},e.transpose=function(c){if(!(L=c.length))return[];for(var p=-1,x=e.min(c,g),A=new Array(x);++p<x;)for(var S=-1,L,R=A[p]=new Array(L);++S<L;)R[S]=c[S][p];return A};function g(c){return c.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(c){var p=[];for(var x in c)p.push(x);return p},e.values=function(c){var p=[];for(var x in c)p.push(c[x]);return p},e.entries=function(c){var p=[];for(var x in c)p.push({key:x,value:c[x]});return p},e.merge=function(c){for(var p=c.length,x,A=-1,S=0,L,R;++A<p;)S+=c[A].length;for(L=new Array(S);--p>=0;)for(R=c[p],x=R.length;--x>=0;)L[--S]=R[x];return L};var _=Math.abs;e.range=function(c,p,x){if(arguments.length<3&&(x=1,arguments.length<2&&(p=c,c=0)),(p-c)/x===1/0)throw new Error("infinite range");var A=[],S=w(_(x)),L=-1,R;if(c*=S,p*=S,x*=S,x<0)for(;(R=c+x*++L)>p;)A.push(R/S);else for(;(R=c+x*++L)<p;)A.push(R/S);return A};function w(c){for(var p=1;c*p%1;)p*=10;return p}function T(c,p){for(var x in p)Object.defineProperty(c.prototype,x,{value:p[x],enumerable:!1})}e.map=function(c,p){var x=new b;if(c instanceof b)c.forEach(function(E,N){x.set(E,N)});else if(Array.isArray(c)){var A=-1,S=c.length,L;if(arguments.length===1)for(;++A<S;)x.set(A,c[A]);else for(;++A<S;)x.set(p.call(c,L=c[A],A),L)}else for(var R in c)x.set(R,c[R]);return x};function b(){this._=Object.create(null)}var M="__proto__",C="\0";T(b,{has:D,get:function(c){return this._[k(c)]},set:function(c,p){return this._[k(c)]=p},remove:P,keys:z,values:function(){var c=[];for(var p in this._)c.push(this._[p]);return c},entries:function(){var c=[];for(var p in this._)c.push({key:q(p),value:this._[p]});return c},size:F,empty:O,forEach:function(c){for(var p in this._)c.call(this,q(p),this._[p])}});function k(c){return(c+="")===M||c[0]===C?C+c:c}function q(c){return(c+="")[0]===C?c.slice(1):c}function D(c){return k(c)in this._}function P(c){return(c=k(c))in this._&&delete this._[c]}function z(){var c=[];for(var p in this._)c.push(q(p));return c}function F(){var c=0;for(var p in this._)++c;return c}function O(){for(var c in this._)return!1;return!0}e.nest=function(){var c={},p=[],x=[],A,S;function L(E,N,G){if(G>=p.length)return S?S.call(c,N):A?N.sort(A):N;for(var X=-1,j=N.length,ee=p[G++],he,we,te,se=new b,ue;++X<j;)(ue=se.get(he=ee(we=N[X])))?ue.push(we):se.set(he,[we]);return E?(we=E(),te=function(_e,Te){we.set(_e,L(E,Te,G))}):(we={},te=function(_e,Te){we[_e]=L(E,Te,G)}),se.forEach(te),we}function R(E,N){if(N>=p.length)return E;var G=[],X=x[N++];return E.forEach(function(j,ee){G.push({key:j,values:R(ee,N)})}),X?G.sort(function(j,ee){return X(j.key,ee.key)}):G}return c.map=function(E,N){return L(N,E,0)},c.entries=function(E){return R(L(e.map,E,0),0)},c.key=function(E){return p.push(E),c},c.sortKeys=function(E){return x[p.length-1]=E,c},c.sortValues=function(E){return A=E,c},c.rollup=function(E){return S=E,c},c},e.set=function(c){var p=new I;if(c)for(var x=0,A=c.length;x<A;++x)p.add(c[x]);return p};function I(){this._=Object.create(null)}T(I,{has:D,add:function(c){return this._[k(c+="")]=!0,c},remove:P,values:z,size:F,empty:O,forEach:function(c){for(var p in this._)c.call(this,q(p))}}),e.behavior={};function W(c){return c}e.rebind=function(c,p){for(var x=1,A=arguments.length,S;++x<A;)c[S=arguments[x]]=Z(c,p,p[S]);return c};function Z(c,p,x){return function(){var A=x.apply(p,arguments);return A===p?c:A}}function V(c,p){if(p in c)return p;p=p.charAt(0).toUpperCase()+p.slice(1);for(var x=0,A=Y.length;x<A;++x){var S=Y[x]+p;if(S in c)return S}}var Y=["webkit","ms","moz","Moz","o","O"];function H(){}e.dispatch=function(){for(var c=new Q,p=-1,x=arguments.length;++p<x;)c[arguments[p]]=K(c);return c};function Q(){}Q.prototype.on=function(c,p){var x=c.indexOf("."),A="";if(x>=0&&(A=c.slice(x+1),c=c.slice(0,x)),c)return arguments.length<2?this[c].on(A):this[c].on(A,p);if(arguments.length===2){if(p==null)for(c in this)this.hasOwnProperty(c)&&this[c].on(A,null);return this}};function K(c){var p=[],x=new b;function A(){for(var S=p,L=-1,R=S.length,E;++L<R;)(E=S[L].on)&&E.apply(this,arguments);return c}return A.on=function(S,L){var R=x.get(S),E;return arguments.length<2?R&&R.on:(R&&(R.on=null,p=p.slice(0,E=p.indexOf(R)).concat(p.slice(E+1)),x.remove(S)),L&&p.push(x.set(S,{on:L})),c)},A}e.event=null;function ne(){e.event.preventDefault()}function pe(){for(var c=e.event,p;p=c.sourceEvent;)c=p;return c}function ye(c){for(var p=new Q,x=0,A=arguments.length;++x<A;)p[arguments[x]]=K(p);return p.of=function(S,L){return function(R){try{var E=R.sourceEvent=e.event;R.target=c,e.event=R,p[R.type].apply(S,L)}finally{e.event=E}}},p}e.requote=function(c){return c.replace(Se,"\\$&")};var Se=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,re={}.__proto__?function(c,p){c.__proto__=p}:function(c,p){for(var x in p)c[x]=p[x]};function Ce(c){return re(c,ke),c}var de=function(c,p){return p.querySelector(c)},be=function(c,p){return p.querySelectorAll(c)},ge=function(c,p){var x=c.matches||c[V(c,"matchesSelector")];return ge=function(A,S){return x.call(A,S)},ge(c,p)};typeof Sizzle=="function"&&(de=function(c,p){return Sizzle(c,p)[0]||null},be=Sizzle,ge=Sizzle.matchesSelector),e.selection=function(){return e.select(a.documentElement)};var ke=e.selection.prototype=[];ke.select=function(c){var p=[],x,A,S,L;c=B(c);for(var R=-1,E=this.length;++R<E;){p.push(x=[]),x.parentNode=(S=this[R]).parentNode;for(var N=-1,G=S.length;++N<G;)(L=S[N])?(x.push(A=c.call(L,L.__data__,N,R)),A&&"__data__"in L&&(A.__data__=L.__data__)):x.push(null)}return Ce(p)};function B(c){return typeof c=="function"?c:function(){return de(c,this)}}ke.selectAll=function(c){var p=[],x,A;c=$(c);for(var S=-1,L=this.length;++S<L;)for(var R=this[S],E=-1,N=R.length;++E<N;)(A=R[E])&&(p.push(x=t(c.call(A,A.__data__,E,S))),x.parentNode=A);return Ce(p)};function $(c){return typeof c=="function"?c:function(){return be(c,this)}}var U="http://www.w3.org/1999/xhtml",le={svg:"http://www.w3.org/2000/svg",xhtml:U,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};e.ns={prefix:le,qualify:function(c){var p=c.indexOf(":"),x=c;return p>=0&&(x=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),le.hasOwnProperty(x)?{space:le[x],local:c}:c}},ke.attr=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node();return c=e.ns.qualify(c),c.local?x.getAttributeNS(c.space,c.local):x.getAttribute(c)}for(p in c)this.each(ve(p,c[p]));return this}return this.each(ve(c,p))};function ve(c,p){c=e.ns.qualify(c);function x(){this.removeAttribute(c)}function A(){this.removeAttributeNS(c.space,c.local)}function S(){this.setAttribute(c,p)}function L(){this.setAttributeNS(c.space,c.local,p)}function R(){var N=p.apply(this,arguments);N==null?this.removeAttribute(c):this.setAttribute(c,N)}function E(){var N=p.apply(this,arguments);N==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,N)}return p==null?c.local?A:x:typeof p=="function"?c.local?E:R:c.local?L:S}function me(c){return c.trim().replace(/\s+/g," ")}ke.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node(),A=(c=Re(c)).length,S=-1;if(p=x.classList){for(;++S<A;)if(!p.contains(c[S]))return!1}else for(p=x.getAttribute("class");++S<A;)if(!De(c[S]).test(p))return!1;return!0}for(p in c)this.each(Le(p,c[p]));return this}return this.each(Le(c,p))};function De(c){return new RegExp("(?:^|\\s+)"+e.requote(c)+"(?:\\s+|$)","g")}function Re(c){return(c+"").trim().split(/^|\s+/)}function Le(c,p){c=Re(c).map(Fe);var x=c.length;function A(){for(var L=-1;++L<x;)c[L](this,p)}function S(){for(var L=-1,R=p.apply(this,arguments);++L<x;)c[L](this,R)}return typeof p=="function"?S:A}function Fe(c){var p=De(c);return function(x,A){if(S=x.classList)return A?S.add(c):S.remove(c);var S=x.getAttribute("class")||"";A?(p.lastIndex=0,p.test(S)||x.setAttribute("class",me(S+" "+c))):x.setAttribute("class",me(S.replace(p," ")))}}ke.style=function(c,p,x){var A=arguments.length;if(A<3){if(typeof c!="string"){A<2&&(p="");for(x in c)this.each(Oe(x,c[x],p));return this}if(A<2){var S=this.node();return i(S).getComputedStyle(S,null).getPropertyValue(c)}x=""}return this.each(Oe(c,p,x))};function Oe(c,p,x){function A(){this.style.removeProperty(c)}function S(){this.style.setProperty(c,p,x)}function L(){var R=p.apply(this,arguments);R==null?this.style.removeProperty(c):this.style.setProperty(c,R,x)}return p==null?A:typeof p=="function"?L:S}ke.property=function(c,p){if(arguments.length<2){if(typeof c=="string")return this.node()[c];for(p in c)this.each(Ge(p,c[p]));return this}return this.each(Ge(c,p))};function Ge(c,p){function x(){delete this[c]}function A(){this[c]=p}function S(){var L=p.apply(this,arguments);L==null?delete this[c]:this[c]=L}return p==null?x:typeof p=="function"?S:A}ke.text=function(c){return arguments.length?this.each(typeof c=="function"?function(){var p=c.apply(this,arguments);this.textContent=p==null?"":p}:c==null?function(){this.textContent=""}:function(){this.textContent=c}):this.node().textContent},ke.html=function(c){return arguments.length?this.each(typeof c=="function"?function(){var p=c.apply(this,arguments);this.innerHTML=p==null?"":p}:c==null?function(){this.innerHTML=""}:function(){this.innerHTML=c}):this.node().innerHTML},ke.append=function(c){return c=Pe(c),this.select(function(){return this.appendChild(c.apply(this,arguments))})};function Pe(c){function p(){var A=this.ownerDocument,S=this.namespaceURI;return S===U&&A.documentElement.namespaceURI===U?A.createElement(c):A.createElementNS(S,c)}function x(){return this.ownerDocument.createElementNS(c.space,c.local)}return typeof c=="function"?c:(c=e.ns.qualify(c)).local?x:p}ke.insert=function(c,p){return c=Pe(c),p=B(p),this.select(function(){return this.insertBefore(c.apply(this,arguments),p.apply(this,arguments)||null)})},ke.remove=function(){return this.each(Be)};function Be(){var c=this.parentNode;c&&c.removeChild(this)}ke.data=function(c,p){var x=-1,A=this.length,S,L;if(!arguments.length){for(c=new Array(A=(S=this[0]).length);++x<A;)(L=S[x])&&(c[x]=L.__data__);return c}function R(X,j){var ee,he=X.length,we=j.length,te=Math.min(he,we),se=new Array(we),ue=new Array(we),_e=new Array(he),Te,ce;if(p){var Ue=new b,nr=new Array(he),ur;for(ee=-1;++ee<he;)(Te=X[ee])&&(Ue.has(ur=p.call(Te,Te.__data__,ee))?_e[ee]=Te:Ue.set(ur,Te),nr[ee]=ur);for(ee=-1;++ee<we;)(Te=Ue.get(ur=p.call(j,ce=j[ee],ee)))?Te!==!0&&(se[ee]=Te,Te.__data__=ce):ue[ee]=Ve(ce),Ue.set(ur,!0);for(ee=-1;++ee<he;)ee in nr&&Ue.get(nr[ee])!==!0&&(_e[ee]=X[ee])}else{for(ee=-1;++ee<te;)Te=X[ee],ce=j[ee],Te?(Te.__data__=ce,se[ee]=Te):ue[ee]=Ve(ce);for(;ee<we;++ee)ue[ee]=Ve(j[ee]);for(;ee<he;++ee)_e[ee]=X[ee]}ue.update=se,ue.parentNode=se.parentNode=_e.parentNode=X.parentNode,E.push(ue),N.push(se),G.push(_e)}var E=hr([]),N=Ce([]),G=Ce([]);if(typeof c=="function")for(;++x<A;)R(S=this[x],c.call(S,S.parentNode.__data__,x));else for(;++x<A;)R(S=this[x],c);return N.enter=function(){return E},N.exit=function(){return G},N};function Ve(c){return{__data__:c}}ke.datum=function(c){return arguments.length?this.property("__data__",c):this.property("__data__")},ke.filter=function(c){var p=[],x,A,S;typeof c!="function"&&(c=ie(c));for(var L=0,R=this.length;L<R;L++){p.push(x=[]),x.parentNode=(A=this[L]).parentNode;for(var E=0,N=A.length;E<N;E++)(S=A[E])&&c.call(S,S.__data__,E,L)&&x.push(S)}return Ce(p)};function ie(c){return function(){return ge(this,c)}}ke.order=function(){for(var c=-1,p=this.length;++c<p;)for(var x=this[c],A=x.length-1,S=x[A],L;--A>=0;)(L=x[A])&&(S&&S!==L.nextSibling&&S.parentNode.insertBefore(L,S),S=L);return this},ke.sort=function(c){c=xe.apply(this,arguments);for(var p=-1,x=this.length;++p<x;)this[p].sort(c);return this.order()};function xe(c){return arguments.length||(c=v),function(p,x){return p&&x?c(p.__data__,x.__data__):!p-!x}}ke.each=function(c){return Ke(this,function(p,x,A){c.call(p,p.__data__,x,A)})};function Ke(c,p){for(var x=0,A=c.length;x<A;x++)for(var S=c[x],L=0,R=S.length,E;L<R;L++)(E=S[L])&&p(E,L,x);return c}ke.call=function(c){var p=t(arguments);return c.apply(p[0]=this,p),this},ke.empty=function(){return!this.node()},ke.node=function(){for(var c=0,p=this.length;c<p;c++)for(var x=this[c],A=0,S=x.length;A<S;A++){var L=x[A];if(L)return L}return null},ke.size=function(){var c=0;return Ke(this,function(){++c}),c};function hr(c){return re(c,ze),c}var ze=[];e.selection.enter=hr,e.selection.enter.prototype=ze,ze.append=ke.append,ze.empty=ke.empty,ze.node=ke.node,ze.call=ke.call,ze.size=ke.size,ze.select=function(c){for(var p=[],x,A,S,L,R,E=-1,N=this.length;++E<N;){S=(L=this[E]).update,p.push(x=[]),x.parentNode=L.parentNode;for(var G=-1,X=L.length;++G<X;)(R=L[G])?(x.push(S[G]=A=c.call(L.parentNode,R.__data__,G,E)),A.__data__=R.__data__):x.push(null)}return Ce(p)},ze.insert=function(c,p){return arguments.length<2&&(p=Me(this)),ke.insert.call(this,c,p)};function Me(c){var p,x;return function(A,S,L){var R=c[L].update,E=R.length,N;for(L!=x&&(x=L,p=0),S>=p&&(p=S+1);!(N=R[p])&&++p<E;);return N}}e.select=function(c){var p;return typeof c=="string"?(p=[de(c,a)],p.parentNode=a.documentElement):(p=[c],p.parentNode=n(c)),Ce([p])},e.selectAll=function(c){var p;return typeof c=="string"?(p=t(be(c,a)),p.parentNode=a.documentElement):(p=t(c),p.parentNode=null),Ce([p])},ke.on=function(c,p,x){var A=arguments.length;if(A<3){if(typeof c!="string"){A<2&&(p=!1);for(x in c)this.each(Ae(x,c[x],p));return this}if(A<2)return(A=this.node()["__on"+c])&&A._;x=!1}return this.each(Ae(c,p,x))};function Ae(c,p,x){var A="__on"+c,S=c.indexOf("."),L=Je;S>0&&(c=c.slice(0,S));var R=He.get(c);R&&(c=R,L=We);function E(){var X=this[A];X&&(this.removeEventListener(c,X,X.$),delete this[A])}function N(){var X=L(p,t(arguments));E.call(this),this.addEventListener(c,this[A]=X,X.$=x),X._=p}function G(){var X=new RegExp("^__on([^.]+)"+e.requote(c)+"$"),j;for(var ee in this)if(j=ee.match(X)){var he=this[ee];this.removeEventListener(j[1],he,he.$),delete this[ee]}}return S?p?N:E:p?H:G}var He=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});a&&He.forEach(function(c){"on"+c in a&&He.remove(c)});function Je(c,p){return function(x){var A=e.event;e.event=x,p[0]=this.__data__;try{c.apply(this,p)}finally{e.event=A}}}function We(c,p){var x=Je(c,p);return function(A){var S=this,L=A.relatedTarget;(!L||L!==S&&!(L.compareDocumentPosition(S)&8))&&x.call(S,A)}}var Xe,ir=0;function ar(c){var p=".dragsuppress-"+ ++ir,x="click"+p,A=e.select(i(c)).on("touchmove"+p,ne).on("dragstart"+p,ne).on("selectstart"+p,ne);if(Xe==null&&(Xe="onselectstart"in c?!1:V(c.style,"userSelect")),Xe){var S=n(c).style,L=S[Xe];S[Xe]="none"}return function(R){if(A.on(p,null),Xe&&(S[Xe]=L),R){var E=function(){A.on(x,null)};A.on(x,function(){ne(),E()},!0),setTimeout(E,0)}}}e.mouse=function(c){return Ne(c,pe())};var er=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ne(c,p){p.changedTouches&&(p=p.changedTouches[0]);var x=c.ownerSVGElement||c;if(x.createSVGPoint){var A=x.createSVGPoint();if(er<0){var S=i(c);if(S.scrollX||S.scrollY){x=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var L=x[0][0].getScreenCTM();er=!(L.f||L.e),x.remove()}}return er?(A.x=p.pageX,A.y=p.pageY):(A.x=p.clientX,A.y=p.clientY),A=A.matrixTransform(c.getScreenCTM().inverse()),[A.x,A.y]}var R=c.getBoundingClientRect();return[p.clientX-R.left-c.clientLeft,p.clientY-R.top-c.clientTop]}e.touch=function(c,p,x){if(arguments.length<3&&(x=p,p=pe().changedTouches),p){for(var A=0,S=p.length,L;A<S;++A)if((L=p[A]).identifier===x)return Ne(c,L)}},e.behavior.drag=function(){var c=ye(S,"drag","dragstart","dragend"),p=null,x=L(H,e.mouse,i,"mousemove","mouseup"),A=L(ae,e.touch,W,"touchmove","touchend");function S(){this.on("mousedown.drag",x).on("touchstart.drag",A)}function L(R,E,N,G,X){return function(){var j=this,ee=e.event.target.correspondingElement||e.event.target,he=j.parentNode,we=c.of(j,arguments),te=0,se=R(),ue=".drag"+(se==null?"":"-"+se),_e,Te=e.select(N(ee)).on(G+ue,nr).on(X+ue,ur),ce=ar(ee),Ue=E(he,se);p?(_e=p.apply(j,arguments),_e=[_e.x-Ue[0],_e.y-Ue[1]]):_e=[0,0],we({type:"dragstart"});function nr(){var lr=E(he,se),dr,pr;lr&&(dr=lr[0]-Ue[0],pr=lr[1]-Ue[1],te|=dr|pr,Ue=lr,we({type:"drag",x:lr[0]+_e[0],y:lr[1]+_e[1],dx:dr,dy:pr}))}function ur(){E(he,se)&&(Te.on(G+ue,null).on(X+ue,null),ce(te),we({type:"dragend"}))}}}return S.origin=function(R){return arguments.length?(p=R,S):p},e.rebind(S,c,"on")};function ae(){return e.event.changedTouches[0].identifier}e.touches=function(c,p){return arguments.length<2&&(p=pe().touches),p?t(p).map(function(x){var A=Ne(c,x);return A.identifier=x.identifier,A}):[]};var oe=1e-6,qe=oe*oe,Ee=Math.PI,$e=2*Ee,cr=$e-oe,sr=Ee/2,Mr=Ee/180,Ir=180/Ee;function Zr(c){return c>0?1:c<0?-1:0}function lt(c,p,x){return(p[0]-c[0])*(x[1]-c[1])-(p[1]-c[1])*(x[0]-c[0])}function _t(c){return c>1?0:c<-1?Ee:Math.acos(c)}function gt(c){return c>1?sr:c<-1?-sr:Math.asin(c)}function Bt(c){return((c=Math.exp(c))-1/c)/2}function zt(c){return((c=Math.exp(c))+1/c)/2}function Oa(c){return((c=Math.exp(2*c))-1)/(c+1)}function ca(c){return(c=Math.sin(c/2))*c}var aa=Math.SQRT2,Ba=2,na=4;e.interpolateZoom=function(c,p){var x=c[0],A=c[1],S=c[2],L=p[0],R=p[1],E=p[2],N=L-x,G=R-A,X=N*N+G*G,j,ee;if(X<qe)ee=Math.log(E/S)/aa,j=function(_e){return[x+_e*N,A+_e*G,S*Math.exp(aa*_e*ee)]};else{var he=Math.sqrt(X),we=(E*E-S*S+na*X)/(2*S*Ba*he),te=(E*E-S*S-na*X)/(2*E*Ba*he),se=Math.log(Math.sqrt(we*we+1)-we),ue=Math.log(Math.sqrt(te*te+1)-te);ee=(ue-se)/aa,j=function(_e){var Te=_e*ee,ce=zt(se),Ue=S/(Ba*he)*(ce*Oa(aa*Te+se)-Bt(se));return[x+Ue*N,A+Ue*G,S*ce/zt(aa*Te+se)]}}return j.duration=ee*1e3,j},e.behavior.zoom=function(){var c={x:0,y:0,k:1},p,x,A,S=[960,500],L=ia,R=250,E=0,N="mousedown.zoom",G="mousemove.zoom",X="mouseup.zoom",j,ee="touchstart.zoom",he,we=ye(Te,"zoomstart","zoom","zoomend"),te,se,ue,_e;ot||(ot="onwheel"in a?(vr=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in a?(vr=function(){return e.event.wheelDelta},"mousewheel"):(vr=function(){return-e.event.detail},"MozMousePixelScroll"));function Te(rr){rr.on(N,Tr).on(ot+".zoom",Ct).on("dblclick.zoom",et).on(ee,Kr)}Te.event=function(rr){rr.each(function(){var Lr=we.of(this,arguments),qr=c;ro?e.select(this).transition().each("start.zoom",function(){c=this.__chart__||{x:0,y:0,k:1},pr(Lr)}).tween("zoom:zoom",function(){var Qr=S[0],wt=S[1],Ut=x?x[0]:Qr/2,da=x?x[1]:wt/2,Da=e.interpolateZoom([(Ut-c.x)/c.k,(da-c.y)/c.k,Qr/c.k],[(Ut-qr.x)/qr.k,(da-qr.y)/qr.k,Qr/qr.k]);return function(Ua){var Ea=Da(Ua),Za=Qr/Ea[2];this.__chart__=c={x:Ut-Ea[0]*Za,y:da-Ea[1]*Za,k:Za},Cr(Lr)}}).each("interrupt.zoom",function(){mr(Lr)}).each("end.zoom",function(){mr(Lr)}):(this.__chart__=c,pr(Lr),Cr(Lr),mr(Lr))})},Te.translate=function(rr){return arguments.length?(c={x:+rr[0],y:+rr[1],k:c.k},dr(),Te):[c.x,c.y]},Te.scale=function(rr){return arguments.length?(c={x:c.x,y:c.y,k:null},nr(+rr),dr(),Te):c.k},Te.scaleExtent=function(rr){return arguments.length?(L=rr==null?ia:[+rr[0],+rr[1]],Te):L},Te.center=function(rr){return arguments.length?(A=rr&&[+rr[0],+rr[1]],Te):A},Te.size=function(rr){return arguments.length?(S=rr&&[+rr[0],+rr[1]],Te):S},Te.duration=function(rr){return arguments.length?(R=+rr,Te):R},Te.x=function(rr){return arguments.length?(se=rr,te=rr.copy(),c={x:0,y:0,k:1},Te):se},Te.y=function(rr){return arguments.length?(_e=rr,ue=rr.copy(),c={x:0,y:0,k:1},Te):_e};function ce(rr){return[(rr[0]-c.x)/c.k,(rr[1]-c.y)/c.k]}function Ue(rr){return[rr[0]*c.k+c.x,rr[1]*c.k+c.y]}function nr(rr){c.k=Math.max(L[0],Math.min(L[1],rr))}function ur(rr,Lr){Lr=Ue(Lr),c.x+=rr[0]-Lr[0],c.y+=rr[1]-Lr[1]}function lr(rr,Lr,qr,Qr){rr.__chart__={x:c.x,y:c.y,k:c.k},nr(Math.pow(2,Qr)),ur(x=Lr,qr),rr=e.select(rr),R>0&&(rr=rr.transition().duration(R)),rr.call(Te.event)}function dr(){se&&se.domain(te.range().map(function(rr){return(rr-c.x)/c.k}).map(te.invert)),_e&&_e.domain(ue.range().map(function(rr){return(rr-c.y)/c.k}).map(ue.invert))}function pr(rr){E++||rr({type:"zoomstart"})}function Cr(rr){dr(),rr({type:"zoom",scale:c.k,translate:[c.x,c.y]})}function mr(rr){--E||(rr({type:"zoomend"}),x=null)}function Tr(){var rr=this,Lr=we.of(rr,arguments),qr=0,Qr=e.select(i(rr)).on(G,da).on(X,Da),wt=ce(e.mouse(rr)),Ut=ar(rr);vv.call(rr),pr(Lr);function da(){qr=1,ur(e.mouse(rr),wt),Cr(Lr)}function Da(){Qr.on(G,null).on(X,null),Ut(qr),mr(Lr)}}function Kr(){var rr=this,Lr=we.of(rr,arguments),qr={},Qr=0,wt,Ut=".zoom-"+e.event.changedTouches[0].identifier,da="touchmove"+Ut,Da="touchend"+Ut,Ua=[],Ea=e.select(rr),Za=ar(rr);Ja(),pr(Lr),Ea.on(N,null).on(ee,Ja);function Ta(){var Wn=e.touches(rr);return wt=c.k,Wn.forEach(function(pa){pa.identifier in qr&&(qr[pa.identifier]=ce(pa))}),Wn}function Ja(){var Wn=e.event.target;e.select(Wn).on(da,to).on(Da,uI),Ua.push(Wn);for(var pa=e.event.changedTouches,xn=0,mi=pa.length;xn<mi;++xn)qr[pa[xn].identifier]=null;var _n=Ta(),ys=Date.now();if(_n.length===1){if(ys-he<500){var ao=_n[0];lr(rr,ao,qr[ao.identifier],Math.floor(Math.log(c.k)/Math.LN2)+1),ne()}he=ys}else if(_n.length>1){var ao=_n[0],fl=_n[1],pv=ao[0]-fl[0],db=ao[1]-fl[1];Qr=pv*pv+db*db}}function to(){var Wn=e.touches(rr),pa,xn,mi,_n;vv.call(rr);for(var ys=0,ao=Wn.length;ys<ao;++ys,_n=null)if(mi=Wn[ys],_n=qr[mi.identifier]){if(xn)break;pa=mi,xn=_n}if(_n){var fl=(fl=mi[0]-pa[0])*fl+(fl=mi[1]-pa[1])*fl,pv=Qr&&Math.sqrt(fl/Qr);pa=[(pa[0]+mi[0])/2,(pa[1]+mi[1])/2],xn=[(xn[0]+_n[0])/2,(xn[1]+_n[1])/2],nr(pv*wt)}he=null,ur(pa,xn),Cr(Lr)}function uI(){if(e.event.touches.length){for(var Wn=e.event.changedTouches,pa=0,xn=Wn.length;pa<xn;++pa)delete qr[Wn[pa].identifier];for(var mi in qr)return void Ta()}e.selectAll(Ua).on(Ut,null),Ea.on(N,Tr).on(ee,Kr),Za(),mr(Lr)}}function Ct(){var rr=we.of(this,arguments);j?clearTimeout(j):(vv.call(this),p=ce(x=A||e.mouse(this)),pr(rr)),j=setTimeout(function(){j=null,mr(rr)},50),ne(),nr(Math.pow(2,vr()*.002)*c.k),ur(x,p),Cr(rr)}function et(){var rr=e.mouse(this),Lr=Math.log(c.k)/Math.LN2;lr(this,rr,ce(rr),e.event.shiftKey?Math.ceil(Lr)-1:Math.floor(Lr)+1)}return e.rebind(Te,we,"on")};var ia=[0,1/0],vr,ot;e.color=Jr;function Jr(){}Jr.prototype.toString=function(){return this.rgb()+""},e.hsl=nt;function nt(c,p,x){return this instanceof nt?(this.h=+c,this.s=+p,void(this.l=+x)):arguments.length<2?c instanceof nt?new nt(c.h,c.s,c.l):Gr(""+c,$r,nt):new nt(c,p,x)}var la=nt.prototype=new Jr;la.brighter=function(c){return c=Math.pow(.7,arguments.length?c:1),new nt(this.h,this.s,this.l/c)},la.darker=function(c){return c=Math.pow(.7,arguments.length?c:1),new nt(this.h,this.s,c*this.l)},la.rgb=function(){return oa(this.h,this.s,this.l)};function oa(c,p,x){var A,S;c=isNaN(c)?0:(c%=360)<0?c+360:c,p=isNaN(p)||p<0?0:p>1?1:p,x=x<0?0:x>1?1:x,S=x<=.5?x*(1+p):x+p-x*p,A=2*x-S;function L(E){return E>360?E-=360:E<0&&(E+=360),E<60?A+(S-A)*E/60:E<180?S:E<240?A+(S-A)*(240-E)/60:A}function R(E){return Math.round(L(E)*255)}return new qa(R(c+120),R(c),R(c-120))}e.hcl=at;function at(c,p,x){return this instanceof at?(this.h=+c,this.c=+p,void(this.l=+x)):arguments.length<2?c instanceof at?new at(c.h,c.c,c.l):c instanceof Jt?Gc(c.l,c.a,c.b):Gc((c=or((c=e.rgb(c)).r,c.g,c.b)).l,c.a,c.b):new at(c,p,x)}var Xa=at.prototype=new Jr;Xa.brighter=function(c){return new at(this.h,this.c,Math.min(100,this.l+vt*(arguments.length?c:1)))},Xa.darker=function(c){return new at(this.h,this.c,Math.max(0,this.l-vt*(arguments.length?c:1)))},Xa.rgb=function(){return Un(this.h,this.c,this.l).rgb()};function Un(c,p,x){return isNaN(c)&&(c=0),isNaN(p)&&(p=0),new Jt(x,Math.cos(c*=Mr)*p,Math.sin(c)*p)}e.lab=Jt;function Jt(c,p,x){return this instanceof Jt?(this.l=+c,this.a=+p,void(this.b=+x)):arguments.length<2?c instanceof Jt?new Jt(c.l,c.a,c.b):c instanceof at?Un(c.h,c.c,c.l):or((c=qa(c)).r,c.g,c.b):new Jt(c,p,x)}var vt=18,Nt=.95047,Ya=1,Ql=1.08883,sl=Jt.prototype=new Jr;sl.brighter=function(c){return new Jt(Math.min(100,this.l+vt*(arguments.length?c:1)),this.a,this.b)},sl.darker=function(c){return new Jt(Math.max(0,this.l-vt*(arguments.length?c:1)),this.a,this.b)},sl.rgb=function(){return Vc(this.l,this.a,this.b)};function Vc(c,p,x){var A=(c+16)/116,S=A+p/500,L=A-x/200;return S=Ru(S)*Nt,A=Ru(A)*Ya,L=Ru(L)*Ql,new qa(Nu(3.2404542*S-1.5371385*A-.4985314*L),Nu(-.969266*S+1.8760108*A+.041556*L),Nu(.0556434*S-.2040259*A+1.0572252*L))}function Gc(c,p,x){return c>0?new at(Math.atan2(x,p)*Ir,Math.sqrt(p*p+x*x),c):new at(NaN,NaN,c)}function Ru(c){return c>.206893034?c*c*c:(c-4/29)/7.787037}function zu(c){return c>.008856?Math.pow(c,1/3):7.787037*c+4/29}function Nu(c){return Math.round(255*(c<=.00304?12.92*c:1.055*Math.pow(c,1/2.4)-.055))}e.rgb=qa;function qa(c,p,x){return this instanceof qa?(this.r=~~c,this.g=~~p,void(this.b=~~x)):arguments.length<2?c instanceof qa?new qa(c.r,c.g,c.b):Gr(""+c,qa,oa):new qa(c,p,x)}function Wc(c){return new qa(c>>16,c>>8&255,c&255)}function us(c){return Wc(c)+""}var fs=qa.prototype=new Jr;fs.brighter=function(c){c=Math.pow(.7,arguments.length?c:1);var p=this.r,x=this.g,A=this.b,S=30;return!p&&!x&&!A?new qa(S,S,S):(p&&p<S&&(p=S),x&&x<S&&(x=S),A&&A<S&&(A=S),new qa(Math.min(255,p/c),Math.min(255,x/c),Math.min(255,A/c)))},fs.darker=function(c){return c=Math.pow(.7,arguments.length?c:1),new qa(c*this.r,c*this.g,c*this.b)},fs.hsl=function(){return $r(this.r,this.g,this.b)},fs.toString=function(){return"#"+yr(this.r)+yr(this.g)+yr(this.b)};function yr(c){return c<16?"0"+Math.max(0,c).toString(16):Math.min(255,c).toString(16)}function Gr(c,p,x){var A=0,S=0,L=0,R,E,N;if(R=/([a-z]+)\((.*)\)/.exec(c=c.toLowerCase()),R)switch(E=R[2].split(","),R[1]){case"hsl":return x(parseFloat(E[0]),parseFloat(E[1])/100,parseFloat(E[2])/100);case"rgb":return p(st(E[0]),st(E[1]),st(E[2]))}return(N=ha.get(c))?p(N.r,N.g,N.b):(c!=null&&c.charAt(0)==="#"&&!isNaN(N=parseInt(c.slice(1),16))&&(c.length===4?(A=(N&3840)>>4,A=A>>4|A,S=N&240,S=S>>4|S,L=N&15,L=L<<4|L):c.length===7&&(A=(N&16711680)>>16,S=(N&65280)>>8,L=N&255)),p(A,S,L))}function $r(c,p,x){var A=Math.min(c/=255,p/=255,x/=255),S=Math.max(c,p,x),L=S-A,R,E,N=(S+A)/2;return L?(E=N<.5?L/(S+A):L/(2-S-A),c==S?R=(p-x)/L+(p<x?6:0):p==S?R=(x-c)/L+2:R=(c-p)/L+4,R*=60):(R=NaN,E=N>0&&N<1?0:R),new nt(R,E,N)}function or(c,p,x){c=va(c),p=va(p),x=va(x);var A=zu((.4124564*c+.3575761*p+.1804375*x)/Nt),S=zu((.2126729*c+.7151522*p+.072175*x)/Ya),L=zu((.0193339*c+.119192*p+.9503041*x)/Ql);return Jt(116*S-16,500*(A-S),200*(S-L))}function va(c){return(c/=255)<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)}function st(c){var p=parseFloat(c);return c.charAt(c.length-1)==="%"?Math.round(p*2.55):p}var ha=e.map({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});ha.forEach(function(c,p){ha.set(c,Wc(p))});function Rr(c){return typeof c=="function"?c:function(){return c}}e.functor=Rr,e.xhr=Vn(W);function Vn(c){return function(p,x,A){return arguments.length===2&&typeof x=="function"&&(A=x,x=null),$l(p,x,c,A)}}function $l(c,p,x,A){var S={},L=e.dispatch("beforesend","progress","load","error"),R={},E=new XMLHttpRequest,N=null;self.XDomainRequest&&!("withCredentials"in E)&&/^(http(s)?:)?\/\//.test(c)&&(E=new XDomainRequest),"onload"in E?E.onload=E.onerror=G:E.onreadystatechange=function(){E.readyState>3&&G()};function G(){var X=E.status,j;if(!X&&cN(E)||X>=200&&X<300||X===304){try{j=x.call(S,E)}catch(ee){L.error.call(S,ee);return}L.load.call(S,j)}else L.error.call(S,E)}return E.onprogress=function(X){var j=e.event;e.event=X;try{L.progress.call(S,E)}finally{e.event=j}},S.header=function(X,j){return X=(X+"").toLowerCase(),arguments.length<2?R[X]:(j==null?delete R[X]:R[X]=j+"",S)},S.mimeType=function(X){return arguments.length?(p=X==null?null:X+"",S):p},S.responseType=function(X){return arguments.length?(N=X,S):N},S.response=function(X){return x=X,S},["get","post"].forEach(function(X){S[X]=function(){return S.send.apply(S,[X].concat(t(arguments)))}}),S.send=function(X,j,ee){if(arguments.length===2&&typeof j=="function"&&(ee=j,j=null),E.open(X,c,!0),p!=null&&!("accept"in R)&&(R.accept=p+",*/*"),E.setRequestHeader)for(var he in R)E.setRequestHeader(he,R[he]);return p!=null&&E.overrideMimeType&&E.overrideMimeType(p),N!=null&&(E.responseType=N),ee!=null&&S.on("error",ee).on("load",function(we){ee(null,we)}),L.beforesend.call(S,E),E.send(j==null?null:j),S},S.abort=function(){return E.abort(),S},e.rebind(S,L,"on"),A==null?S:S.get(fN(A))}function fN(c){return c.length===1?function(p,x){c(p==null?x:null)}:c}function cN(c){var p=c.responseType;return p&&p!=="text"?c.response:c.responseText}e.dsv=function(c,p){var x=new RegExp('["'+c+` ]`),A=c.charCodeAt(0);function S(G,X,j){arguments.length<3&&(j=X,X=null);var ee=$l(G,p,X==null?L:R(X),j);return ee.row=function(he){return arguments.length?ee.response((X=he)==null?L:R(he)):X},ee}function L(G){return S.parse(G.responseText)}function R(G){return function(X){return S.parse(X.responseText,G)}}S.parse=function(G,X){var j;return S.parseRows(G,function(ee,he){if(j)return j(ee,he-1);var we=function(te){for(var se={},ue=ee.length,_e=0;_e<ue;++_e)se[ee[_e]]=te[_e];return se};j=X?function(te,se){return X(we(te),se)}:we})},S.parseRows=function(G,X){var j={},ee={},he=[],we=G.length,te=0,se=0,ue,_e;function Te(){if(te>=we)return ee;if(_e)return _e=!1,j;var Ue=te;if(G.charCodeAt(Ue)===34){for(var nr=Ue;nr++<we;)if(G.charCodeAt(nr)===34){if(G.charCodeAt(nr+1)!==34)break;++nr}te=nr+2;var ur=G.charCodeAt(nr+1);return ur===13?(_e=!0,G.charCodeAt(nr+2)===10&&++te):ur===10&&(_e=!0),G.slice(Ue+1,nr).replace(/""/g,'"')}for(;te<we;){var ur=G.charCodeAt(te++),lr=1;if(ur===10)_e=!0;else if(ur===13)_e=!0,G.charCodeAt(te)===10&&(++te,++lr);else if(ur!==A)continue;return G.slice(Ue,te-lr)}return G.slice(Ue)}for(;(ue=Te())!==ee;){for(var ce=[];ue!==j&&ue!==ee;)ce.push(ue),ue=Te();X&&(ce=X(ce,se++))==null||he.push(ce)}return he},S.format=function(G){if(Array.isArray(G[0]))return S.formatRows(G);var X=new I,j=[];return G.forEach(function(ee){for(var he in ee)X.has(he)||j.push(X.add(he))}),[j.map(N).join(c)].concat(G.map(function(ee){return j.map(function(he){return N(ee[he])}).join(c)})).join(` `)},S.formatRows=function(G){return G.map(E).join(` `)};function E(G){return G.map(N).join(c)}function N(G){return x.test(G)?'"'+G.replace(/\"/g,'""')+'"':G}return S},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var Xc,Zc,Jc,Kc,e5=this[V(this,"requestAnimationFrame")]||function(c){setTimeout(c,17)};e.timer=function(){Qc.apply(this,arguments)};function Qc(c,p,x){var A=arguments.length;A<2&&(p=0),A<3&&(x=Date.now());var S=x+p,L={c,t:S,n:null};return Zc?Zc.n=L:Xc=L,Zc=L,Jc||(Kc=clearTimeout(Kc),Jc=1,e5(x1)),L}function x1(){var c=r5(),p=t5()-c;p>24?(isFinite(p)&&(clearTimeout(Kc),Kc=setTimeout(x1,p)),Jc=0):(Jc=1,e5(x1))}e.timer.flush=function(){r5(),t5()};function r5(){for(var c=Date.now(),p=Xc;p;)c>=p.t&&p.c(c-p.t)&&(p.c=null),p=p.n;return c}function t5(){for(var c,p=Xc,x=1/0;p;)p.c?(p.t<x&&(x=p.t),p=(c=p).n):p=c?c.n=p.n:Xc=p.n;return Zc=c,x}e.round=function(c,p){return p?Math.round(c*(p=Math.pow(10,p)))/p:Math.round(c)},e.geom={};function cs(c){return c[0]}function Fu(c){return c[1]}e.geom.hull=function(c){var p=cs,x=Fu;if(arguments.length)return A(c);function A(S){if(S.length<3)return[];var L=Rr(p),R=Rr(x),E,N=S.length,G=[],X=[];for(E=0;E<N;E++)G.push([+L.call(this,S[E],E),+R.call(this,S[E],E),E]);for(G.sort(vN),E=0;E<N;E++)X.push([G[E][0],-G[E][1]]);var j=a5(G),ee=a5(X),he=ee[0]===j[0],we=ee[ee.length-1]===j[j.length-1],te=[];for(E=j.length-1;E>=0;--E)te.push(S[G[j[E]][2]]);for(E=+he;E<ee.length-we;++E)te.push(S[G[ee[E]][2]]);return te}return A.x=function(S){return arguments.length?(p=S,A):p},A.y=function(S){return arguments.length?(x=S,A):x},A};function a5(c){for(var p=c.length,x=[0,1],A=2,S=2;S<p;S++){for(;A>1&&lt(c[x[A-2]],c[x[A-1]],c[S])<=0;)--A;x[A++]=S}return x.slice(0,A)}function vN(c,p){return c[0]-p[0]||c[1]-p[1]}e.geom.polygon=function(c){return re(c,$c),c};var $c=e.geom.polygon.prototype=[];$c.area=function(){for(var c=-1,p=this.length,x,A=this[p-1],S=0;++c<p;)x=A,A=this[c],S+=x[1]*A[0]-x[0]*A[1];return S*.5},$c.centroid=function(c){var p=-1,x=this.length,A=0,S=0,L,R=this[x-1],E;for(arguments.length||(c=-1/(6*this.area()));++p<x;)L=R,R=this[p],E=L[0]*R[1]-R[0]*L[1],A+=(L[0]+R[0])*E,S+=(L[1]+R[1])*E;return[A*c,S*c]},$c.clip=function(c){for(var p,x=n5(c),A=-1,S=this.length-n5(this),L,R,E=this[S-1],N,G,X;++A<S;){for(p=c.slice(),c.length=0,N=this[A],G=p[(R=p.length-x)-1],L=-1;++L<R;)X=p[L],_1(X,E,N)?(_1(G,E,N)||c.push(w1(G,X,E,N)),c.push(X)):_1(G,E,N)&&c.push(w1(G,X,E,N)),G=X;x&&c.push(c[0]),E=N}return c};function _1(c,p,x){return(x[0]-p[0])*(c[1]-p[1])<(x[1]-p[1])*(c[0]-p[0])}function w1(c,p,x,A){var S=c[0],L=x[0],R=p[0]-S,E=A[0]-L,N=c[1],G=x[1],X=p[1]-N,j=A[1]-G,ee=(E*(N-G)-j*(S-L))/(j*R-E*X);return[S+ee*R,N+ee*X]}function n5(c){var p=c[0],x=c[c.length-1];return!(p[0]-x[0]||p[1]-x[1])}var vs,jl,hs,i5=[],T1,Iu,l5=[];function hN(){rv(this),this.edge=this.site=this.circle=null}function o5(c){var p=i5.pop()||new hN;return p.site=c,p}function M1(c){ps(c),hs.remove(c),i5.push(c),rv(c)}function dN(c){var p=c.circle,x=p.x,A=p.cy,S={x,y:A},L=c.P,R=c.N,E=[c];M1(c);for(var N=L;N.circle&&_(x-N.circle.x)<oe&&_(A-N.circle.cy)<oe;)L=N.P,E.unshift(N),M1(N),N=L;E.unshift(N),ps(N);for(var G=R;G.circle&&_(x-G.circle.x)<oe&&_(A-G.circle.cy)<oe;)R=G.N,E.push(G),M1(G),G=R;E.push(G),ps(G);var X=E.length,j;for(j=1;j<X;++j)G=E[j],N=E[j-1],jc(G.edge,N.site,G.site,S);N=E[0],G=E[X-1],G.edge=Hu(N.site,G.site,null,S),ds(N),ds(G)}function pN(c){for(var p=c.x,x=c.y,A,S,L,R,E=hs._;E;)if(L=s5(E,x)-p,L>oe)E=E.L;else if(R=p-mN(E,x),R>oe){if(!E.R){A=E;break}E=E.R}else{L>-oe?(A=E.P,S=E):R>-oe?(A=E,S=E.N):A=S=E;break}var N=o5(c);if(hs.insert(A,N),!(!A&&!S)){if(A===S){ps(A),S=o5(A.site),hs.insert(N,S),N.edge=S.edge=Hu(A.site,N.site),ds(A),ds(S);return}if(!S){N.edge=Hu(A.site,N.site);return}ps(A),ps(S);var G=A.site,X=G.x,j=G.y,ee=c.x-X,he=c.y-j,we=S.site,te=we.x-X,se=we.y-j,ue=2*(ee*se-he*te),_e=ee*ee+he*he,Te=te*te+se*se,ce={x:(se*_e-he*Te)/ue+X,y:(ee*Te-te*_e)/ue+j};jc(S.edge,G,we,ce),N.edge=Hu(G,c,null,ce),S.edge=Hu(c,we,null,ce),ds(A),ds(S)}}function s5(c,p){var x=c.site,A=x.x,S=x.y,L=S-p;if(!L)return A;var R=c.P;if(!R)return-1/0;x=R.site;var E=x.x,N=x.y,G=N-p;if(!G)return E;var X=E-A,j=1/L-1/G,ee=X/G;return j?(-ee+Math.sqrt(ee*ee-2*j*(X*X/(-2*G)-N+G/2+S-L/2)))/j+A:(A+E)/2}function mN(c,p){var x=c.N;if(x)return s5(x,p);var A=c.site;return A.y===p?A.x:1/0}function u5(c){this.site=c,this.edges=[]}u5.prototype.prepare=function(){for(var c=this.edges,p=c.length,x;p--;)x=c[p].edge,(!x.b||!x.a)&&c.splice(p,1);return c.sort(f5),c.length};function yN(c){for(var p=c[0][0],x=c[1][0],A=c[0][1],S=c[1][1],L,R,E,N,G=jl,X=G.length,j,ee,he,we,te,se;X--;)if(j=G[X],!(!j||!j.prepare()))for(he=j.edges,we=he.length,ee=0;ee<we;)se=he[ee].end(),E=se.x,N=se.y,te=he[++ee%we].start(),L=te.x,R=te.y,(_(E-L)>oe||_(N-R)>oe)&&(he.splice(ee,0,new ev(wN(j.site,se,_(E-p)<oe&&S-N>oe?{x:p,y:_(L-p)<oe?R:S}:_(N-S)<oe&&x-E>oe?{x:_(R-S)<oe?L:x,y:S}:_(E-x)<oe&&N-A>oe?{x,y:_(L-x)<oe?R:A}:_(N-A)<oe&&E-p>oe?{x:_(R-A)<oe?L:p,y:A}:null),j.site,null)),++we)}function f5(c,p){return p.angle-c.angle}function gN(){rv(this),this.x=this.y=this.arc=this.site=this.cy=null}function ds(c){var p=c.P,x=c.N;if(!(!p||!x)){var A=p.site,S=c.site,L=x.site;if(A!==L){var R=S.x,E=S.y,N=A.x-R,G=A.y-E,X=L.x-R,se=L.y-E,j=2*(N*se-G*X);if(!(j>=-qe)){var ee=N*N+G*G,he=X*X+se*se,we=(se*ee-G*he)/j,te=(N*he-X*ee)/j,se=te+E,ue=l5.pop()||new gN;ue.arc=c,ue.site=S,ue.x=we+R,ue.y=se+Math.sqrt(we*we+te*te),ue.cy=se,c.circle=ue;for(var _e=null,Te=Iu._;Te;)if(ue.y<Te.y||ue.y===Te.y&&ue.x<=Te.x)if(Te.L)Te=Te.L;else{_e=Te.P;break}else if(Te.R)Te=Te.R;else{_e=Te;break}Iu.insert(_e,ue),_e||(T1=ue)}}}}function ps(c){var p=c.circle;p&&(p.P||(T1=p.N),Iu.remove(p),l5.push(p),rv(p),c.circle=null)}function bN(c,p,x,A){return function(S){var L=S.a,R=S.b,E=L.x,N=L.y,G=R.x,X=R.y,j=0,ee=1,he=G-E,we=X-N,te;if(te=c-E,!(!he&&te>0)){if(te/=he,he<0){if(te<j)return;te<ee&&(ee=te)}else if(he>0){if(te>ee)return;te>j&&(j=te)}if(te=x-E,!(!he&&te<0)){if(te/=he,he<0){if(te>ee)return;te>j&&(j=te)}else if(he>0){if(te<j)return;te<ee&&(ee=te)}if(te=p-N,!(!we&&te>0)){if(te/=we,we<0){if(te<j)return;te<ee&&(ee=te)}else if(we>0){if(te>ee)return;te>j&&(j=te)}if(te=A-N,!(!we&&te<0)){if(te/=we,we<0){if(te>ee)return;te>j&&(j=te)}else if(we>0){if(te<j)return;te<ee&&(ee=te)}return j>0&&(S.a={x:E+j*he,y:N+j*we}),ee<1&&(S.b={x:E+ee*he,y:N+ee*we}),S}}}}}}function xN(c){for(var p=vs,x=bN(c[0][0],c[0][1],c[1][0],c[1][1]),A=p.length,S;A--;)S=p[A],(!_N(S,c)||!x(S)||_(S.a.x-S.b.x)<oe&&_(S.a.y-S.b.y)<oe)&&(S.a=S.b=null,p.splice(A,1))}function _N(c,p){var x=c.b;if(x)return!0;var A=c.a,S=p[0][0],L=p[1][0],R=p[0][1],E=p[1][1],N=c.l,G=c.r,X=N.x,j=N.y,ee=G.x,he=G.y,we=(X+ee)/2,te=(j+he)/2,se,ue;if(he===j){if(we<S||we>=L)return;if(X>ee){if(!A)A={x:we,y:R};else if(A.y>=E)return;x={x:we,y:E}}else{if(!A)A={x:we,y:E};else if(A.y<R)return;x={x:we,y:R}}}else if(se=(X-ee)/(he-j),ue=te-se*we,se<-1||se>1)if(X>ee){if(!A)A={x:(R-ue)/se,y:R};else if(A.y>=E)return;x={x:(E-ue)/se,y:E}}else{if(!A)A={x:(E-ue)/se,y:E};else if(A.y<R)return;x={x:(R-ue)/se,y:R}}else if(j<he){if(!A)A={x:S,y:se*S+ue};else if(A.x>=L)return;x={x:L,y:se*L+ue}}else{if(!A)A={x:L,y:se*L+ue};else if(A.x<S)return;x={x:S,y:se*S+ue}}return c.a=A,c.b=x,!0}function c5(c,p){this.l=c,this.r=p,this.a=this.b=null}function Hu(c,p,x,A){var S=new c5(c,p);return vs.push(S),x&&jc(S,c,p,x),A&&jc(S,p,c,A),jl[c.i].edges.push(new ev(S,c,p)),jl[p.i].edges.push(new ev(S,p,c)),S}function wN(c,p,x){var A=new c5(c,null);return A.a=p,A.b=x,vs.push(A),A}function jc(c,p,x,A){!c.a&&!c.b?(c.a=A,c.l=p,c.r=x):c.l===x?c.b=A:c.a=A}function ev(c,p,x){var A=c.a,S=c.b;this.edge=c,this.site=p,this.angle=x?Math.atan2(x.y-p.y,x.x-p.x):c.l===p?Math.atan2(S.x-A.x,A.y-S.y):Math.atan2(A.x-S.x,S.y-A.y)}ev.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}};function A1(){this._=null}function rv(c){c.U=c.C=c.L=c.R=c.P=c.N=null}A1.prototype={insert:function(c,p){var x,A,S;if(c){if(p.P=c,p.N=c.N,c.N&&(c.N.P=p),c.N=p,c.R){for(c=c.R;c.L;)c=c.L;c.L=p}else c.R=p;x=c}else this._?(c=v5(this._),p.P=null,p.N=c,c.P=c.L=p,x=c):(p.P=p.N=null,this._=p,x=null);for(p.L=p.R=null,p.U=x,p.C=!0,c=p;x&&x.C;)A=x.U,x===A.L?(S=A.R,S&&S.C?(x.C=S.C=!1,A.C=!0,c=A):(c===x.R&&(Ou(this,x),c=x,x=c.U),x.C=!1,A.C=!0,Bu(this,A))):(S=A.L,S&&S.C?(x.C=S.C=!1,A.C=!0,c=A):(c===x.L&&(Bu(this,x),c=x,x=c.U),x.C=!1,A.C=!0,Ou(this,A))),x=c.U;this._.C=!1},remove:function(c){c.N&&(c.N.P=c.P),c.P&&(c.P.N=c.N),c.N=c.P=null;var p=c.U,x,A=c.L,S=c.R,L,R;if(A?S?L=v5(S):L=A:L=S,p?p.L===c?p.L=L:p.R=L:this._=L,A&&S?(R=L.C,L.C=c.C,L.L=A,A.U=L,L!==S?(p=L.U,L.U=c.U,c=L.R,p.L=c,L.R=S,S.U=L):(L.U=p,p=L,c=L.R)):(R=c.C,c=L),c&&(c.U=p),!R){if(c&&c.C){c.C=!1;return}do{if(c===this._)break;if(c===p.L){if(x=p.R,x.C&&(x.C=!1,p.C=!0,Ou(this,p),x=p.R),x.L&&x.L.C||x.R&&x.R.C){(!x.R||!x.R.C)&&(x.L.C=!1,x.C=!0,Bu(this,x),x=p.R),x.C=p.C,p.C=x.R.C=!1,Ou(this,p),c=this._;break}}else if(x=p.L,x.C&&(x.C=!1,p.C=!0,Bu(this,p),x=p.L),x.L&&x.L.C||x.R&&x.R.C){(!x.L||!x.L.C)&&(x.R.C=!1,x.C=!0,Ou(this,x),x=p.L),x.C=p.C,p.C=x.L.C=!1,Bu(this,p),c=this._;break}x.C=!0,c=p,p=p.U}while(!c.C);c&&(c.C=!1)}}};function Ou(c,p){var x=p,A=p.R,S=x.U;S?S.L===x?S.L=A:S.R=A:c._=A,A.U=S,x.U=A,x.R=A.L,x.R&&(x.R.U=x),A.L=x}function Bu(c,p){var x=p,A=p.L,S=x.U;S?S.L===x?S.L=A:S.R=A