UNPKG

plotly.js

Version:

The open source javascript graphing library that powers plotly

18 lines 1.24 MB
/** * plotly.js (geo - minified) v3.3.1 * Copyright 2012-2025, 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 VI=Object.defineProperty,WI=Object.defineProperties;var ZI=Object.getOwnPropertyDescriptors;var Y_=Object.getOwnPropertySymbols;var XI=Object.prototype.hasOwnProperty,jI=Object.prototype.propertyIsEnumerable;var G_=(e,r,t)=>r in e?VI(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Xf=(e,r)=>{for(var t in r||(r={}))XI.call(r,t)&&G_(e,t,r[t]);if(Y_)for(var t of Y_(r))jI.call(r,t)&&G_(e,t,r[t]);return e},td=(e,r)=>WI(e,ZI(r));var te=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var nd=te(V_=>{"use strict";V_.version="3.3.1"});var Z_=te((W_,ad)=>{(function(r,t,n){t[r]=t[r]||n(),typeof ad!="undefined"&&ad.exports&&(ad.exports=t[r])})("Promise",typeof window!="undefined"?window:W_,function(){"use strict";var r,t,n,a=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(C){return setImmediate(C)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(C,x,_,A){return Object.defineProperty(C,x,{value:_,writable:!0,configurable:A!==!1})}}catch(b){r=function(x,_,A){return x[_]=A,x}}n=function(){var C,x,_;function A(k,M){this.fn=k,this.self=M,this.next=void 0}return{add:function(M,E){_=new A(M,E),x?x.next=_:C=_,x=_,_=void 0},drain:function(){var M=C;for(C=x=t=void 0;M;)M.fn.call(M.self),M=M.next}}}();function o(b,C){n.add(b,C),t||(t=i(n.drain))}function l(b){var C,x=typeof b;return b!=null&&(x=="object"||x=="function")&&(C=b.then),typeof C=="function"?C:!1}function s(){for(var b=0;b<this.chain.length;b++)u(this,this.state===1?this.chain[b].success:this.chain[b].failure,this.chain[b]);this.chain.length=0}function u(b,C,x){var _,A;try{C===!1?x.reject(b.msg):(C===!0?_=b.msg:_=C.call(void 0,b.msg),_===x.promise?x.reject(TypeError("Promise-chain cycle")):(A=l(_))?A.call(_,x.resolve,x.reject):x.resolve(_))}catch(k){x.reject(k)}}function f(b){var C,x=this;if(!x.triggered){x.triggered=!0,x.def&&(x=x.def);try{(C=l(b))?o(function(){var _=new d(x);try{C.call(b,function(){f.apply(_,arguments)},function(){v.apply(_,arguments)})}catch(A){v.call(_,A)}}):(x.msg=b,x.state=1,x.chain.length>0&&o(s,x))}catch(_){v.call(new d(x),_)}}}function v(b){var C=this;C.triggered||(C.triggered=!0,C.def&&(C=C.def),C.msg=b,C.state=2,C.chain.length>0&&o(s,C))}function h(b,C,x,_){for(var A=0;A<C.length;A++)(function(M){b.resolve(C[M]).then(function(R){x(M,R)},_)})(A)}function d(b){this.def=b,this.triggered=!1}function m(b){this.promise=b,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function p(b){if(typeof b!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var C=new m(this);this.then=function(_,A){var k={success:typeof _=="function"?_:!0,failure:typeof A=="function"?A:!1};return k.promise=new this.constructor(function(E,R){if(typeof E!="function"||typeof R!="function")throw TypeError("Not a function");k.resolve=E,k.reject=R}),C.chain.push(k),C.state!==0&&o(s,C),k.promise},this.catch=function(_){return this.then(void 0,_)};try{b.call(void 0,function(_){f.call(C,_)},function(_){v.call(C,_)})}catch(x){v.call(C,x)}}var y=r({},"constructor",p,!1);return p.prototype=y,r(y,"__NPO__",0,!1),r(p,"resolve",function(C){var x=this;return C&&typeof C=="object"&&C.__NPO__===1?C:new x(function(A,k){if(typeof A!="function"||typeof k!="function")throw TypeError("Not a function");A(C)})}),r(p,"reject",function(C){return new this(function(_,A){if(typeof _!="function"||typeof A!="function")throw TypeError("Not a function");A(C)})}),r(p,"all",function(C){var x=this;return a.call(C)!="[object Array]"?x.reject(TypeError("Not an array")):C.length===0?x.resolve([]):new x(function(A,k){if(typeof A!="function"||typeof k!="function")throw TypeError("Not a function");var M=C.length,E=Array(M),R=0;h(x,C,function(I,W){E[I]=W,++R===M&&A(E)},k)})}),r(p,"race",function(C){var x=this;return a.call(C)!="[object Array]"?x.reject(TypeError("Not an array")):new x(function(A,k){if(typeof A!="function"||typeof k!="function")throw TypeError("Not a function");h(x,C,function(E,R){A(R)},k)})}),p})});var kt=te((tle,id)=>{(function(){var e={version:"3.8.2"},r=[].slice,t=function(c){return r.call(c)},n=self.document;function a(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(n)try{t(n.documentElement.childNodes)[0].nodeType}catch(c){t=function(g){for(var w=g.length,S=new Array(w);w--;)S[w]=g[w];return S}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(c){var o=this.Element.prototype,l=o.setAttribute,s=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;o.setAttribute=function(g,w){l.call(this,g,w+"")},o.setAttributeNS=function(g,w,S){s.call(this,g,w,S+"")},u.setProperty=function(g,w,S){f.call(this,g,w+"",S)}}e.ascending=v;function v(c,g){return c<g?-1:c>g?1:c>=g?0:NaN}e.descending=function(c,g){return g<c?-1:g>c?1:g>=c?0:NaN},e.min=function(c,g){var w=-1,S=c.length,q,D;if(arguments.length===1){for(;++w<S;)if((D=c[w])!=null&&D>=D){q=D;break}for(;++w<S;)(D=c[w])!=null&&q>D&&(q=D)}else{for(;++w<S;)if((D=g.call(c,c[w],w))!=null&&D>=D){q=D;break}for(;++w<S;)(D=g.call(c,c[w],w))!=null&&q>D&&(q=D)}return q},e.max=function(c,g){var w=-1,S=c.length,q,D;if(arguments.length===1){for(;++w<S;)if((D=c[w])!=null&&D>=D){q=D;break}for(;++w<S;)(D=c[w])!=null&&D>q&&(q=D)}else{for(;++w<S;)if((D=g.call(c,c[w],w))!=null&&D>=D){q=D;break}for(;++w<S;)(D=g.call(c,c[w],w))!=null&&D>q&&(q=D)}return q},e.extent=function(c,g){var w=-1,S=c.length,q,D,G;if(arguments.length===1){for(;++w<S;)if((D=c[w])!=null&&D>=D){q=G=D;break}for(;++w<S;)(D=c[w])!=null&&(q>D&&(q=D),G<D&&(G=D))}else{for(;++w<S;)if((D=g.call(c,c[w],w))!=null&&D>=D){q=G=D;break}for(;++w<S;)(D=g.call(c,c[w],w))!=null&&(q>D&&(q=D),G<D&&(G=D))}return[q,G]};function h(c){return c===null?NaN:+c}function d(c){return!isNaN(c)}e.sum=function(c,g){var w=0,S=c.length,q,D=-1;if(arguments.length===1)for(;++D<S;)d(q=+c[D])&&(w+=q);else for(;++D<S;)d(q=+g.call(c,c[D],D))&&(w+=q);return w},e.mean=function(c,g){var w=0,S=c.length,q,D=-1,G=S;if(arguments.length===1)for(;++D<S;)d(q=h(c[D]))?w+=q:--G;else for(;++D<S;)d(q=h(g.call(c,c[D],D)))?w+=q:--G;if(G)return w/G},e.quantile=function(c,g){var w=(c.length-1)*g+1,S=Math.floor(w),q=+c[S-1],D=w-S;return D?q+D*(c[S]-q):q},e.median=function(c,g){var w=[],S=c.length,q,D=-1;if(arguments.length===1)for(;++D<S;)d(q=h(c[D]))&&w.push(q);else for(;++D<S;)d(q=h(g.call(c,c[D],D)))&&w.push(q);if(w.length)return e.quantile(w.sort(v),.5)},e.variance=function(c,g){var w=c.length,S=0,q,D,G=0,N=-1,j=0;if(arguments.length===1)for(;++N<w;)d(q=h(c[N]))&&(D=q-S,S+=D/++j,G+=D*(q-S));else for(;++N<w;)d(q=h(g.call(c,c[N],N)))&&(D=q-S,S+=D/++j,G+=D*(q-S));if(j>1)return G/(j-1)},e.deviation=function(){var c=e.variance.apply(this,arguments);return c&&Math.sqrt(c)};function m(c){return{left:function(g,w,S,q){for(arguments.length<3&&(S=0),arguments.length<4&&(q=g.length);S<q;){var D=S+q>>>1;c(g[D],w)<0?S=D+1:q=D}return S},right:function(g,w,S,q){for(arguments.length<3&&(S=0),arguments.length<4&&(q=g.length);S<q;){var D=S+q>>>1;c(g[D],w)>0?q=D:S=D+1}return S}}}var p=m(v);e.bisectLeft=p.left,e.bisect=e.bisectRight=p.right,e.bisector=function(c){return m(c.length===1?function(g,w){return v(c(g),w)}:c)},e.shuffle=function(c,g,w){(S=arguments.length)<3&&(w=c.length,S<2&&(g=0));for(var S=w-g,q,D;S;)D=Math.random()*S--|0,q=c[S+g],c[S+g]=c[D+g],c[D+g]=q;return c},e.permute=function(c,g){for(var w=g.length,S=new Array(w);w--;)S[w]=c[g[w]];return S},e.pairs=function(c){for(var g=0,w=c.length-1,S,q=c[0],D=new Array(w<0?0:w);g<w;)D[g]=[S=q,q=c[++g]];return D},e.transpose=function(c){if(!(D=c.length))return[];for(var g=-1,w=e.min(c,y),S=new Array(w);++g<w;)for(var q=-1,D,G=S[g]=new Array(D);++q<D;)G[q]=c[q][g];return S};function y(c){return c.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(c){var g=[];for(var w in c)g.push(w);return g},e.values=function(c){var g=[];for(var w in c)g.push(c[w]);return g},e.entries=function(c){var g=[];for(var w in c)g.push({key:w,value:c[w]});return g},e.merge=function(c){for(var g=c.length,w,S=-1,q=0,D,G;++S<g;)q+=c[S].length;for(D=new Array(q);--g>=0;)for(G=c[g],w=G.length;--w>=0;)D[--q]=G[w];return D};var b=Math.abs;e.range=function(c,g,w){if(arguments.length<3&&(w=1,arguments.length<2&&(g=c,c=0)),(g-c)/w===1/0)throw new Error("infinite range");var S=[],q=C(b(w)),D=-1,G;if(c*=q,g*=q,w*=q,w<0)for(;(G=c+w*++D)>g;)S.push(G/q);else for(;(G=c+w*++D)<g;)S.push(G/q);return S};function C(c){for(var g=1;c*g%1;)g*=10;return g}function x(c,g){for(var w in g)Object.defineProperty(c.prototype,w,{value:g[w],enumerable:!1})}e.map=function(c,g){var w=new _;if(c instanceof _)c.forEach(function(N,j){w.set(N,j)});else if(Array.isArray(c)){var S=-1,q=c.length,D;if(arguments.length===1)for(;++S<q;)w.set(S,c[S]);else for(;++S<q;)w.set(g.call(c,D=c[S],S),D)}else for(var G in c)w.set(G,c[G]);return w};function _(){this._=Object.create(null)}var A="__proto__",k="\0";x(_,{has:R,get:function(c){return this._[M(c)]},set:function(c,g){return this._[M(c)]=g},remove:F,keys:I,values:function(){var c=[];for(var g in this._)c.push(this._[g]);return c},entries:function(){var c=[];for(var g in this._)c.push({key:E(g),value:this._[g]});return c},size:W,empty:O,forEach:function(c){for(var g in this._)c.call(this,E(g),this._[g])}});function M(c){return(c+="")===A||c[0]===k?k+c:c}function E(c){return(c+="")[0]===k?c.slice(1):c}function R(c){return M(c)in this._}function F(c){return(c=M(c))in this._&&delete this._[c]}function I(){var c=[];for(var g in this._)c.push(E(g));return c}function W(){var c=0;for(var g in this._)++c;return c}function O(){for(var c in this._)return!1;return!0}e.nest=function(){var c={},g=[],w=[],S,q;function D(N,j,ne){if(ne>=g.length)return q?q.call(c,j):S?j.sort(S):j;for(var ae=-1,ge=j.length,me=g[ne++],Re,Ve,be,Se=new _,De;++ae<ge;)(De=Se.get(Re=me(Ve=j[ae])))?De.push(Ve):Se.set(Re,[Ve]);return N?(Ve=N(),be=function(Ge,We){Ve.set(Ge,D(N,We,ne))}):(Ve={},be=function(Ge,We){Ve[Ge]=D(N,We,ne)}),Se.forEach(be),Ve}function G(N,j){if(j>=g.length)return N;var ne=[],ae=w[j++];return N.forEach(function(ge,me){ne.push({key:ge,values:G(me,j)})}),ae?ne.sort(function(ge,me){return ae(ge.key,me.key)}):ne}return c.map=function(N,j){return D(j,N,0)},c.entries=function(N){return G(D(e.map,N,0),0)},c.key=function(N){return g.push(N),c},c.sortKeys=function(N){return w[g.length-1]=N,c},c.sortValues=function(N){return S=N,c},c.rollup=function(N){return q=N,c},c},e.set=function(c){var g=new Z;if(c)for(var w=0,S=c.length;w<S;++w)g.add(c[w]);return g};function Z(){this._=Object.create(null)}x(Z,{has:R,add:function(c){return this._[M(c+="")]=!0,c},remove:F,values:I,size:W,empty:O,forEach:function(c){for(var g in this._)c.call(this,E(g))}}),e.behavior={};function V(c){return c}e.rebind=function(c,g){for(var w=1,S=arguments.length,q;++w<S;)c[q=arguments[w]]=re(c,g,g[q]);return c};function re(c,g,w){return function(){var S=w.apply(g,arguments);return S===g?c:S}}function ie(c,g){if(g in c)return g;g=g.charAt(0).toUpperCase()+g.slice(1);for(var w=0,S=Q.length;w<S;++w){var q=Q[w]+g;if(q in c)return q}}var Q=["webkit","ms","moz","Moz","o","O"];function ee(){}e.dispatch=function(){for(var c=new se,g=-1,w=arguments.length;++g<w;)c[arguments[g]]=ve(c);return c};function se(){}se.prototype.on=function(c,g){var w=c.indexOf("."),S="";if(w>=0&&(S=c.slice(w+1),c=c.slice(0,w)),c)return arguments.length<2?this[c].on(S):this[c].on(S,g);if(arguments.length===2){if(g==null)for(c in this)this.hasOwnProperty(c)&&this[c].on(S,null);return this}};function ve(c){var g=[],w=new _;function S(){for(var q=g,D=-1,G=q.length,N;++D<G;)(N=q[D].on)&&N.apply(this,arguments);return c}return S.on=function(q,D){var G=w.get(q),N;return arguments.length<2?G&&G.on:(G&&(G.on=null,g=g.slice(0,N=g.indexOf(G)).concat(g.slice(N+1)),w.remove(q)),D&&g.push(w.set(q,{on:D})),c)},S}e.event=null;function Ce(){e.event.preventDefault()}function Ie(){for(var c=e.event,g;g=c.sourceEvent;)c=g;return c}function ze(c){for(var g=new se,w=0,S=arguments.length;++w<S;)g[arguments[w]]=ve(g);return g.of=function(q,D){return function(G){try{var N=G.sourceEvent=e.event;G.target=c,e.event=G,g[G.type].apply(q,D)}finally{e.event=N}}},g}e.requote=function(c){return c.replace(Xe,"\\$&")};var Xe=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Le={}.__proto__?function(c,g){c.__proto__=g}:function(c,g){for(var w in g)c[w]=g[w]};function Qe(c){return Le(c,pe),c}var fe=function(c,g){return g.querySelector(c)},ye=function(c,g){return g.querySelectorAll(c)},Me=function(c,g){var w=c.matches||c[ie(c,"matchesSelector")];return Me=function(S,q){return w.call(S,q)},Me(c,g)};typeof Sizzle=="function"&&(fe=function(c,g){return Sizzle(c,g)[0]||null},ye=Sizzle,Me=Sizzle.matchesSelector),e.selection=function(){return e.select(n.documentElement)};var pe=e.selection.prototype=[];pe.select=function(c){var g=[],w,S,q,D;c=U(c);for(var G=-1,N=this.length;++G<N;){g.push(w=[]),w.parentNode=(q=this[G]).parentNode;for(var j=-1,ne=q.length;++j<ne;)(D=q[j])?(w.push(S=c.call(D,D.__data__,j,G)),S&&"__data__"in D&&(S.__data__=D.__data__)):w.push(null)}return Qe(g)};function U(c){return typeof c=="function"?c:function(){return fe(c,this)}}pe.selectAll=function(c){var g=[],w,S;c=K(c);for(var q=-1,D=this.length;++q<D;)for(var G=this[q],N=-1,j=G.length;++N<j;)(S=G[N])&&(g.push(w=t(c.call(S,S.__data__,N,q))),w.parentNode=S);return Qe(g)};function K(c){return typeof c=="function"?c:function(){return ye(c,this)}}var $="http://www.w3.org/1999/xhtml",ke={svg:"http://www.w3.org/2000/svg",xhtml:$,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:ke,qualify:function(c){var g=c.indexOf(":"),w=c;return g>=0&&(w=c.slice(0,g))!=="xmlns"&&(c=c.slice(g+1)),ke.hasOwnProperty(w)?{space:ke[w],local:c}:c}},pe.attr=function(c,g){if(arguments.length<2){if(typeof c=="string"){var w=this.node();return c=e.ns.qualify(c),c.local?w.getAttributeNS(c.space,c.local):w.getAttribute(c)}for(g in c)this.each(Be(g,c[g]));return this}return this.each(Be(c,g))};function Be(c,g){c=e.ns.qualify(c);function w(){this.removeAttribute(c)}function S(){this.removeAttributeNS(c.space,c.local)}function q(){this.setAttribute(c,g)}function D(){this.setAttributeNS(c.space,c.local,g)}function G(){var j=g.apply(this,arguments);j==null?this.removeAttribute(c):this.setAttribute(c,j)}function N(){var j=g.apply(this,arguments);j==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,j)}return g==null?c.local?S:w:typeof g=="function"?c.local?N:G:c.local?D:q}function Ne(c){return c.trim().replace(/\s+/g," ")}pe.classed=function(c,g){if(arguments.length<2){if(typeof c=="string"){var w=this.node(),S=(c=or(c)).length,q=-1;if(g=w.classList){for(;++q<S;)if(!g.contains(c[q]))return!1}else for(g=w.getAttribute("class");++q<S;)if(!ir(c[q]).test(g))return!1;return!0}for(g in c)this.each(Ye(g,c[g]));return this}return this.each(Ye(c,g))};function ir(c){return new RegExp("(?:^|\\s+)"+e.requote(c)+"(?:\\s+|$)","g")}function or(c){return(c+"").trim().split(/^|\s+/)}function Ye(c,g){c=or(c).map(nr);var w=c.length;function S(){for(var D=-1;++D<w;)c[D](this,g)}function q(){for(var D=-1,G=g.apply(this,arguments);++D<w;)c[D](this,G)}return typeof g=="function"?q:S}function nr(c){var g=ir(c);return function(w,S){if(q=w.classList)return S?q.add(c):q.remove(c);var q=w.getAttribute("class")||"";S?(g.lastIndex=0,g.test(q)||w.setAttribute("class",Ne(q+" "+c))):w.setAttribute("class",Ne(q.replace(g," ")))}}pe.style=function(c,g,w){var S=arguments.length;if(S<3){if(typeof c!="string"){S<2&&(g="");for(w in c)this.each(lr(w,c[w],g));return this}if(S<2){var q=this.node();return i(q).getComputedStyle(q,null).getPropertyValue(c)}w=""}return this.each(lr(c,g,w))};function lr(c,g,w){function S(){this.style.removeProperty(c)}function q(){this.style.setProperty(c,g,w)}function D(){var G=g.apply(this,arguments);G==null?this.style.removeProperty(c):this.style.setProperty(c,G,w)}return g==null?S:typeof g=="function"?D:q}pe.property=function(c,g){if(arguments.length<2){if(typeof c=="string")return this.node()[c];for(g in c)this.each(vr(g,c[g]));return this}return this.each(vr(c,g))};function vr(c,g){function w(){delete this[c]}function S(){this[c]=g}function q(){var D=g.apply(this,arguments);D==null?delete this[c]:this[c]=D}return g==null?w:typeof g=="function"?q:S}pe.text=function(c){return arguments.length?this.each(typeof c=="function"?function(){var g=c.apply(this,arguments);this.textContent=g==null?"":g}:c==null?function(){this.textContent=""}:function(){this.textContent=c}):this.node().textContent},pe.html=function(c){return arguments.length?this.each(typeof c=="function"?function(){var g=c.apply(this,arguments);this.innerHTML=g==null?"":g}:c==null?function(){this.innerHTML=""}:function(){this.innerHTML=c}):this.node().innerHTML},pe.append=function(c){return c=Je(c),this.select(function(){return this.appendChild(c.apply(this,arguments))})};function Je(c){function g(){var S=this.ownerDocument,q=this.namespaceURI;return q===$&&S.documentElement.namespaceURI===$?S.createElement(c):S.createElementNS(q,c)}function w(){return this.ownerDocument.createElementNS(c.space,c.local)}return typeof c=="function"?c:(c=e.ns.qualify(c)).local?w:g}pe.insert=function(c,g){return c=Je(c),g=U(g),this.select(function(){return this.insertBefore(c.apply(this,arguments),g.apply(this,arguments)||null)})},pe.remove=function(){return this.each(dr)};function dr(){var c=this.parentNode;c&&c.removeChild(this)}pe.data=function(c,g){var w=-1,S=this.length,q,D;if(!arguments.length){for(c=new Array(S=(q=this[0]).length);++w<S;)(D=q[w])&&(c[w]=D.__data__);return c}function G(ae,ge){var me,Re=ae.length,Ve=ge.length,be=Math.min(Re,Ve),Se=new Array(Ve),De=new Array(Ve),Ge=new Array(Re),We,Pe;if(g){var _r=new _,Or=new Array(Re),Wr;for(me=-1;++me<Re;)(We=ae[me])&&(_r.has(Wr=g.call(We,We.__data__,me))?Ge[me]=We:_r.set(Wr,We),Or[me]=Wr);for(me=-1;++me<Ve;)(We=_r.get(Wr=g.call(ge,Pe=ge[me],me)))?We!==!0&&(Se[me]=We,We.__data__=Pe):De[me]=gr(Pe),_r.set(Wr,!0);for(me=-1;++me<Re;)me in Or&&_r.get(Or[me])!==!0&&(Ge[me]=ae[me])}else{for(me=-1;++me<be;)We=ae[me],Pe=ge[me],We?(We.__data__=Pe,Se[me]=We):De[me]=gr(Pe);for(;me<Ve;++me)De[me]=gr(ge[me]);for(;me<Re;++me)Ge[me]=ae[me]}De.update=Se,De.parentNode=Se.parentNode=Ge.parentNode=ae.parentNode,N.push(De),j.push(Se),ne.push(Ge)}var N=Ur([]),j=Qe([]),ne=Qe([]);if(typeof c=="function")for(;++w<S;)G(q=this[w],c.call(q,q.parentNode.__data__,w));else for(;++w<S;)G(q=this[w],c);return j.enter=function(){return N},j.exit=function(){return ne},j};function gr(c){return{__data__:c}}pe.datum=function(c){return arguments.length?this.property("__data__",c):this.property("__data__")},pe.filter=function(c){var g=[],w,S,q;typeof c!="function"&&(c=Te(c));for(var D=0,G=this.length;D<G;D++){g.push(w=[]),w.parentNode=(S=this[D]).parentNode;for(var N=0,j=S.length;N<j;N++)(q=S[N])&&c.call(q,q.__data__,N,D)&&w.push(q)}return Qe(g)};function Te(c){return function(){return Me(this,c)}}pe.order=function(){for(var c=-1,g=this.length;++c<g;)for(var w=this[c],S=w.length-1,q=w[S],D;--S>=0;)(D=w[S])&&(q&&q!==D.nextSibling&&q.parentNode.insertBefore(D,q),q=D);return this},pe.sort=function(c){c=Oe.apply(this,arguments);for(var g=-1,w=this.length;++g<w;)this[g].sort(c);return this.order()};function Oe(c){return arguments.length||(c=v),function(g,w){return g&&w?c(g.__data__,w.__data__):!g-!w}}pe.each=function(c){return kr(this,function(g,w,S){c.call(g,g.__data__,w,S)})};function kr(c,g){for(var w=0,S=c.length;w<S;w++)for(var q=c[w],D=0,G=q.length,N;D<G;D++)(N=q[D])&&g(N,D,w);return c}pe.call=function(c){var g=t(arguments);return c.apply(g[0]=this,g),this},pe.empty=function(){return!this.node()},pe.node=function(){for(var c=0,g=this.length;c<g;c++)for(var w=this[c],S=0,q=w.length;S<q;S++){var D=w[S];if(D)return D}return null},pe.size=function(){var c=0;return kr(this,function(){++c}),c};function Ur(c){return Le(c,tr),c}var tr=[];e.selection.enter=Ur,e.selection.enter.prototype=tr,tr.append=pe.append,tr.empty=pe.empty,tr.node=pe.node,tr.call=pe.call,tr.size=pe.size,tr.select=function(c){for(var g=[],w,S,q,D,G,N=-1,j=this.length;++N<j;){q=(D=this[N]).update,g.push(w=[]),w.parentNode=D.parentNode;for(var ne=-1,ae=D.length;++ne<ae;)(G=D[ne])?(w.push(q[ne]=S=c.call(D.parentNode,G.__data__,ne,N)),S.__data__=G.__data__):w.push(null)}return Qe(g)},tr.insert=function(c,g){return arguments.length<2&&(g=Ue(this)),pe.insert.call(this,c,g)};function Ue(c){var g,w;return function(S,q,D){var G=c[D].update,N=G.length,j;for(D!=w&&(w=D,g=0),q>=g&&(g=q+1);!(j=G[g])&&++g<N;);return j}}e.select=function(c){var g;return typeof c=="string"?(g=[fe(c,n)],g.parentNode=n.documentElement):(g=[c],g.parentNode=a(c)),Qe([g])},e.selectAll=function(c){var g;return typeof c=="string"?(g=t(ye(c,n)),g.parentNode=n.documentElement):(g=t(c),g.parentNode=null),Qe([g])},pe.on=function(c,g,w){var S=arguments.length;if(S<3){if(typeof c!="string"){S<2&&(g=!1);for(w in c)this.each(Ze(w,c[w],g));return this}if(S<2)return(S=this.node()["__on"+c])&&S._;w=!1}return this.each(Ze(c,g,w))};function Ze(c,g,w){var S="__on"+c,q=c.indexOf("."),D=Tr;q>0&&(c=c.slice(0,q));var G=mr.get(c);G&&(c=G,D=yr);function N(){var ae=this[S];ae&&(this.removeEventListener(c,ae,ae.$),delete this[S])}function j(){var ae=D(g,t(arguments));N.call(this),this.addEventListener(c,this[S]=ae,ae.$=w),ae._=g}function ne(){var ae=new RegExp("^__on([^.]+)"+e.requote(c)+"$"),ge;for(var me in this)if(ge=me.match(ae)){var Re=this[me];this.removeEventListener(ge[1],Re,Re.$),delete this[me]}}return q?g?j:N:g?ee:ne}var mr=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&mr.forEach(function(c){"on"+c in n&&mr.remove(c)});function Tr(c,g){return function(w){var S=e.event;e.event=w,g[0]=this.__data__;try{c.apply(this,g)}finally{e.event=S}}}function yr(c,g){var w=Tr(c,g);return function(S){var q=this,D=S.relatedTarget;(!D||D!==q&&!(D.compareDocumentPosition(q)&8))&&w.call(q,S)}}var wr,Hr=0;function Sr(c){var g=".dragsuppress-"+ ++Hr,w="click"+g,S=e.select(i(c)).on("touchmove"+g,Ce).on("dragstart"+g,Ce).on("selectstart"+g,Ce);if(wr==null&&(wr="onselectstart"in c?!1:ie(c.style,"userSelect")),wr){var q=a(c).style,D=q[wr];q[wr]="none"}return function(G){if(S.on(g,null),wr&&(q[wr]=D),G){var N=function(){S.on(w,null)};S.on(w,function(){Ce(),N()},!0),setTimeout(N,0)}}}e.mouse=function(c){return ur(c,Ie())};var Dr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function ur(c,g){g.changedTouches&&(g=g.changedTouches[0]);var w=c.ownerSVGElement||c;if(w.createSVGPoint){var S=w.createSVGPoint();if(Dr<0){var q=i(c);if(q.scrollX||q.scrollY){w=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var D=w[0][0].getScreenCTM();Dr=!(D.f||D.e),w.remove()}}return Dr?(S.x=g.pageX,S.y=g.pageY):(S.x=g.clientX,S.y=g.clientY),S=S.matrixTransform(c.getScreenCTM().inverse()),[S.x,S.y]}var G=c.getBoundingClientRect();return[g.clientX-G.left-c.clientLeft,g.clientY-G.top-c.clientTop]}e.touch=function(c,g,w){if(arguments.length<3&&(w=g,g=Ie().changedTouches),g){for(var S=0,q=g.length,D;S<q;++S)if((D=g[S]).identifier===w)return ur(c,D)}},e.behavior.drag=function(){var c=ze(q,"drag","dragstart","dragend"),g=null,w=D(ee,e.mouse,i,"mousemove","mouseup"),S=D(_e,e.touch,V,"touchmove","touchend");function q(){this.on("mousedown.drag",w).on("touchstart.drag",S)}function D(G,N,j,ne,ae){return function(){var ge=this,me=e.event.target.correspondingElement||e.event.target,Re=ge.parentNode,Ve=c.of(ge,arguments),be=0,Se=G(),De=".drag"+(Se==null?"":"-"+Se),Ge,We=e.select(j(me)).on(ne+De,Or).on(ae+De,Wr),Pe=Sr(me),_r=N(Re,Se);g?(Ge=g.apply(ge,arguments),Ge=[Ge.x-_r[0],Ge.y-_r[1]]):Ge=[0,0],Ve({type:"dragstart"});function Or(){var Vr=N(Re,Se),$r,Kr;Vr&&($r=Vr[0]-_r[0],Kr=Vr[1]-_r[1],be|=$r|Kr,_r=Vr,Ve({type:"drag",x:Vr[0]+Ge[0],y:Vr[1]+Ge[1],dx:$r,dy:Kr}))}function Wr(){N(Re,Se)&&(We.on(ne+De,null).on(ae+De,null),Pe(be),Ve({type:"dragend"}))}}}return q.origin=function(G){return arguments.length?(g=G,q):g},e.rebind(q,c,"on")};function _e(){return e.event.changedTouches[0].identifier}e.touches=function(c,g){return arguments.length<2&&(g=Ie().touches),g?t(g).map(function(w){var S=ur(c,w);return S.identifier=w.identifier,S}):[]};var Ae=1e-6,Ke=Ae*Ae,rr=Math.PI,Lr=2*rr,Yr=Lr-Ae,Fr=rr/2,lt=rr/180,xt=180/rr;function Rt(c){return c>0?1:c<0?-1:0}function Kt(c,g,w){return(g[0]-c[0])*(w[1]-c[1])-(g[1]-c[1])*(w[0]-c[0])}function cn(c){return c>1?0:c<-1?rr:Math.acos(c)}function pn(c){return c>1?Fr:c<-1?-Fr:Math.asin(c)}function Mn(c){return((c=Math.exp(c))-1/c)/2}function Xt(c){return((c=Math.exp(c))+1/c)/2}function Qt(c){return((c=Math.exp(2*c))-1)/(c+1)}function en(c){return(c=Math.sin(c/2))*c}var an=Math.SQRT2,jr=2,Ut=4;e.interpolateZoom=function(c,g){var w=c[0],S=c[1],q=c[2],D=g[0],G=g[1],N=g[2],j=D-w,ne=G-S,ae=j*j+ne*ne,ge,me;if(ae<Ke)me=Math.log(N/q)/an,ge=function(Ge){return[w+Ge*j,S+Ge*ne,q*Math.exp(an*Ge*me)]};else{var Re=Math.sqrt(ae),Ve=(N*N-q*q+Ut*ae)/(2*q*jr*Re),be=(N*N-q*q-Ut*ae)/(2*N*jr*Re),Se=Math.log(Math.sqrt(Ve*Ve+1)-Ve),De=Math.log(Math.sqrt(be*be+1)-be);me=(De-Se)/an,ge=function(Ge){var We=Ge*me,Pe=Xt(Se),_r=q/(jr*Re)*(Pe*Qt(an*We+Se)-Mn(Se));return[w+_r*j,S+_r*ne,q*Pe/Xt(an*We+Se)]}}return ge.duration=me*1e3,ge},e.behavior.zoom=function(){var c={x:0,y:0,k:1},g,w,S,q=[960,500],D=Nt,G=250,N=0,j="mousedown.zoom",ne="mousemove.zoom",ae="mouseup.zoom",ge,me="touchstart.zoom",Re,Ve=ze(We,"zoomstart","zoom","zoomend"),be,Se,De,Ge;Tn||(Tn="onwheel"in n?(rn=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in n?(rn=function(){return e.event.wheelDelta},"mousewheel"):(rn=function(){return-e.event.detail},"MozMousePixelScroll"));function We(Rr){Rr.on(j,ht).on(Tn+".zoom",jn).on("dblclick.zoom",sn).on(me,Jt)}We.event=function(Rr){Rr.each(function(){var _t=Ve.of(this,arguments),wt=c;ga?e.select(this).transition().each("start.zoom",function(){c=this.__chart__||{x:0,y:0,k:1},Kr(_t)}).tween("zoom:zoom",function(){var $t=q[0],In=q[1],la=w?w[0]:$t/2,qa=w?w[1]:In/2,ja=e.interpolateZoom([(la-c.x)/c.k,(qa-c.y)/c.k,$t/c.k],[(la-wt.x)/wt.k,(qa-wt.y)/wt.k,$t/wt.k]);return function(ci){var Ja=ja(ci),Si=$t/Ja[2];this.__chart__=c={x:la-Ja[0]*Si,y:qa-Ja[1]*Si,k:Si},bt(_t)}}).each("interrupt.zoom",function(){et(_t)}).each("end.zoom",function(){et(_t)}):(this.__chart__=c,Kr(_t),bt(_t),et(_t))})},We.translate=function(Rr){return arguments.length?(c={x:+Rr[0],y:+Rr[1],k:c.k},$r(),We):[c.x,c.y]},We.scale=function(Rr){return arguments.length?(c={x:c.x,y:c.y,k:null},Or(+Rr),$r(),We):c.k},We.scaleExtent=function(Rr){return arguments.length?(D=Rr==null?Nt:[+Rr[0],+Rr[1]],We):D},We.center=function(Rr){return arguments.length?(S=Rr&&[+Rr[0],+Rr[1]],We):S},We.size=function(Rr){return arguments.length?(q=Rr&&[+Rr[0],+Rr[1]],We):q},We.duration=function(Rr){return arguments.length?(G=+Rr,We):G},We.x=function(Rr){return arguments.length?(Se=Rr,be=Rr.copy(),c={x:0,y:0,k:1},We):Se},We.y=function(Rr){return arguments.length?(Ge=Rr,De=Rr.copy(),c={x:0,y:0,k:1},We):Ge};function Pe(Rr){return[(Rr[0]-c.x)/c.k,(Rr[1]-c.y)/c.k]}function _r(Rr){return[Rr[0]*c.k+c.x,Rr[1]*c.k+c.y]}function Or(Rr){c.k=Math.max(D[0],Math.min(D[1],Rr))}function Wr(Rr,_t){_t=_r(_t),c.x+=Rr[0]-_t[0],c.y+=Rr[1]-_t[1]}function Vr(Rr,_t,wt,$t){Rr.__chart__={x:c.x,y:c.y,k:c.k},Or(Math.pow(2,$t)),Wr(w=_t,wt),Rr=e.select(Rr),G>0&&(Rr=Rr.transition().duration(G)),Rr.call(We.event)}function $r(){Se&&Se.domain(be.range().map(function(Rr){return(Rr-c.x)/c.k}).map(be.invert)),Ge&&Ge.domain(De.range().map(function(Rr){return(Rr-c.y)/c.k}).map(De.invert))}function Kr(Rr){N++||Rr({type:"zoomstart"})}function bt(Rr){$r(),Rr({type:"zoom",scale:c.k,translate:[c.x,c.y]})}function et(Rr){--N||(Rr({type:"zoomend"}),w=null)}function ht(){var Rr=this,_t=Ve.of(Rr,arguments),wt=0,$t=e.select(i(Rr)).on(ne,qa).on(ae,ja),In=Pe(e.mouse(Rr)),la=Sr(Rr);vt.call(Rr),Kr(_t);function qa(){wt=1,Wr(e.mouse(Rr),In),bt(_t)}function ja(){$t.on(ne,null).on(ae,null),la(wt),et(_t)}}function Jt(){var Rr=this,_t=Ve.of(Rr,arguments),wt={},$t=0,In,la=".zoom-"+e.event.changedTouches[0].identifier,qa="touchmove"+la,ja="touchend"+la,ci=[],Ja=e.select(Rr),Si=Sr(Rr);Ci(),Kr(_t),Ja.on(j,null).on(me,Ci);function Fa(){var fl=e.touches(Rr);return In=c.k,fl.forEach(function(Da){Da.identifier in wt&&(wt[Da.identifier]=Pe(Da))}),fl}function Ci(){var fl=e.event.target;e.select(fl).on(qa,Wf).on(ja,GI),ci.push(fl);for(var Da=e.event.changedTouches,mo=0,Jl=Da.length;mo<Jl;++mo)wt[Da[mo].identifier]=null;var yo=Fa(),m0=Date.now();if(yo.length===1){if(m0-Re<500){var Zf=yo[0];Vr(Rr,Zf,wt[Zf.identifier],Math.floor(Math.log(c.k)/Math.LN2)+1),Ce()}Re=m0}else if(yo.length>1){var Zf=yo[0],qu=yo[1],rd=Zf[0]-qu[0],U_=Zf[1]-qu[1];$t=rd*rd+U_*U_}}function Wf(){var fl=e.touches(Rr),Da,mo,Jl,yo;vt.call(Rr);for(var m0=0,Zf=fl.length;m0<Zf;++m0,yo=null)if(Jl=fl[m0],yo=wt[Jl.identifier]){if(mo)break;Da=Jl,mo=yo}if(yo){var qu=(qu=Jl[0]-Da[0])*qu+(qu=Jl[1]-Da[1])*qu,rd=$t&&Math.sqrt(qu/$t);Da=[(Da[0]+Jl[0])/2,(Da[1]+Jl[1])/2],mo=[(mo[0]+yo[0])/2,(mo[1]+yo[1])/2],Or(rd*In)}Re=null,Wr(Da,mo),bt(_t)}function GI(){if(e.event.touches.length){for(var fl=e.event.changedTouches,Da=0,mo=fl.length;Da<mo;++Da)delete wt[fl[Da].identifier];for(var Jl in wt)return void Fa()}e.selectAll(ci).on(la,null),Ja.on(j,ht).on(me,Jt),Si(),et(_t)}}function jn(){var Rr=Ve.of(this,arguments);ge?clearTimeout(ge):(vt.call(this),g=Pe(w=S||e.mouse(this)),Kr(Rr)),ge=setTimeout(function(){ge=null,et(Rr)},50),Ce(),Or(Math.pow(2,rn()*.002)*c.k),Wr(w,g),bt(Rr)}function sn(){var Rr=e.mouse(this),_t=Math.log(c.k)/Math.LN2;Vr(this,Rr,Pe(Rr),e.event.shiftKey?Math.ceil(_t)-1:Math.floor(_t)+1)}return e.rebind(We,Ve,"on")};var Nt=[0,1/0],rn,Tn;e.color=vn;function vn(){}vn.prototype.toString=function(){return this.rgb()+""},e.hsl=Yt;function Yt(c,g,w){return this instanceof Yt?(this.h=+c,this.s=+g,void(this.l=+w)):arguments.length<2?c instanceof Yt?new Yt(c.h,c.s,c.l):St(""+c,It,Yt):new Yt(c,g,w)}var Bn=Yt.prototype=new vn;Bn.brighter=function(c){return c=Math.pow(.7,arguments.length?c:1),new Yt(this.h,this.s,this.l/c)},Bn.darker=function(c){return c=Math.pow(.7,arguments.length?c:1),new Yt(this.h,this.s,c*this.l)},Bn.rgb=function(){return Ga(this.h,this.s,this.l)};function Ga(c,g,w){var S,q;c=isNaN(c)?0:(c%=360)<0?c+360:c,g=isNaN(g)||g<0?0:g>1?1:g,w=w<0?0:w>1?1:w,q=w<=.5?w*(1+g):w+g-w*g,S=2*w-q;function D(N){return N>360?N-=360:N<0&&(N+=360),N<60?S+(q-S)*N/60:N<180?q:N<240?S+(q-S)*(240-N)/60:S}function G(N){return Math.round(D(N)*255)}return new Un(G(c+120),G(c),G(c-120))}e.hcl=kn;function kn(c,g,w){return this instanceof kn?(this.h=+c,this.c=+g,void(this.l=+w)):arguments.length<2?c instanceof kn?new kn(c.h,c.c,c.l):c instanceof hn?Pl(c.l,c.a,c.b):Pl((c=Br((c=e.rgb(c)).r,c.g,c.b)).l,c.a,c.b):new kn(c,g,w)}var Va=kn.prototype=new vn;Va.brighter=function(c){return new kn(this.h,this.c,Math.min(100,this.l+dn*(arguments.length?c:1)))},Va.darker=function(c){return new kn(this.h,this.c,Math.max(0,this.l-dn*(arguments.length?c:1)))},Va.rgb=function(){return ia(this.h,this.c,this.l).rgb()};function ia(c,g,w){return isNaN(c)&&(c=0),isNaN(g)&&(g=0),new hn(w,Math.cos(c*=lt)*g,Math.sin(c)*g)}e.lab=hn;function hn(c,g,w){return this instanceof hn?(this.l=+c,this.a=+g,void(this.b=+w)):arguments.length<2?c instanceof hn?new hn(c.l,c.a,c.b):c instanceof kn?ia(c.h,c.c,c.l):Br((c=Un(c)).r,c.g,c.b):new hn(c,g,w)}var dn=18,On=.95047,gi=1,io=1.08883,mi=hn.prototype=new vn;mi.brighter=function(c){return new hn(Math.min(100,this.l+dn*(arguments.length?c:1)),this.a,this.b)},mi.darker=function(c){return new hn(Math.max(0,this.l-dn*(arguments.length?c:1)),this.a,this.b)},mi.rgb=function(){return ms(this.l,this.a,this.b)};function ms(c,g,w){var S=(c+16)/116,q=S+g/500,D=S-w/200;return q=Oo(q)*On,S=Oo(S)*gi,D=Oo(D)*io,new Un(Uo(3.2404542*q-1.5371385*S-.4985314*D),Uo(-.969266*q+1.8760108*S+.041556*D),Uo(.0556434*q-.2040259*S+1.0572252*D))}function Pl(c,g,w){return c>0?new kn(Math.atan2(w,g)*xt,Math.sqrt(g*g+w*w),c):new kn(NaN,NaN,c)}function Oo(c){return c>.206893034?c*c*c:(c-4/29)/7.787037}function ys(c){return c>.008856?Math.pow(c,1/3):7.787037*c+4/29}function Uo(c){return Math.round(255*(c<=.00304?12.92*c:1.055*Math.pow(c,1/2.4)-.055))}e.rgb=Un;function Un(c,g,w){return this instanceof Un?(this.r=~~c,this.g=~~g,void(this.b=~~w)):arguments.length<2?c instanceof Un?new Un(c.r,c.g,c.b):St(""+c,Un,Ga):new Un(c,g,w)}function yi(c){return new Un(c>>16,c>>8&255,c&255)}function Yo(c){return yi(c)+""}var bi=Un.prototype=new vn;bi.brighter=function(c){c=Math.pow(.7,arguments.length?c:1);var g=this.r,w=this.g,S=this.b,q=30;return!g&&!w&&!S?new Un(q,q,q):(g&&g<q&&(g=q),w&&w<q&&(w=q),S&&S<q&&(S=q),new Un(Math.min(255,g/c),Math.min(255,w/c),Math.min(255,S/c)))},bi.darker=function(c){return c=Math.pow(.7,arguments.length?c:1),new Un(c*this.r,c*this.g,c*this.b)},bi.hsl=function(){return It(this.r,this.g,this.b)},bi.toString=function(){return"#"+Qr(this.r)+Qr(this.g)+Qr(this.b)};function Qr(c){return c<16?"0"+Math.max(0,c).toString(16):Math.min(255,c).toString(16)}function St(c,g,w){var S=0,q=0,D=0,G,N,j;if(G=/([a-z]+)\((.*)\)/.exec(c=c.toLowerCase()),G)switch(N=G[2].split(","),G[1]){case"hsl":return w(parseFloat(N[0]),parseFloat(N[1])/100,parseFloat(N[2])/100);case"rgb":return g(on(N[0]),on(N[1]),on(N[2]))}return(j=Pn.get(c))?g(j.r,j.g,j.b):(c!=null&&c.charAt(0)==="#"&&!isNaN(j=parseInt(c.slice(1),16))&&(c.length===4?(S=(j&3840)>>4,S=S>>4|S,q=j&240,q=q>>4|q,D=j&15,D=D<<4|D):c.length===7&&(S=(j&16711680)>>16,q=(j&65280)>>8,D=j&255)),g(S,q,D))}function It(c,g,w){var S=Math.min(c/=255,g/=255,w/=255),q=Math.max(c,g,w),D=q-S,G,N,j=(q+S)/2;return D?(N=j<.5?D/(q+S):D/(2-q-S),c==q?G=(g-w)/D+(g<w?6:0):g==q?G=(w-c)/D+2:G=(c-g)/D+4,G*=60):(G=NaN,N=j>0&&j<1?0:G),new Yt(G,N,j)}function Br(c,g,w){c=Zn(c),g=Zn(g),w=Zn(w);var S=ys((.4124564*c+.3575761*g+.1804375*w)/On),q=ys((.2126729*c+.7151522*g+.072175*w)/gi),D=ys((.0193339*c+.119192*g+.9503041*w)/io);return hn(116*q-16,500*(S-q),200*(q-D))}function Zn(c){return(c/=255)<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)}function on(c){var g=parseFloat(c);return c.charAt(c.length-1)==="%"?Math.round(g*2.55):g}var Pn=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});Pn.forEach(function(c,g){Pn.set(c,yi(g))});function At(c){return typeof c=="function"?c:function(){return c}}e.functor=At,e.xhr=Wa(V);function Wa(c){return function(g,w,S){return arguments.length===2&&typeof w=="function"&&(S=w,w=null),Go(g,w,c,S)}}function Go(c,g,w,S){var q={},D=e.dispatch("beforesend","progress","load","error"),G={},N=new XMLHttpRequest,j=null;self.XDomainRequest&&!("withCredentials"in N)&&/^(http(s)?:)?\/\//.test(c)&&(N=new XDomainRequest),"onload"in N?N.onload=N.onerror=ne:N.onreadystatechange=function(){N.readyState>3&&ne()};function ne(){var ae=N.status,ge;if(!ae&&cu(N)||ae>=200&&ae<300||ae===304){try{ge=w.call(q,N)}catch(me){D.error.call(q,me);return}D.load.call(q,ge)}else D.error.call(q,N)}return N.onprogress=function(ae){var ge=e.event;e.event=ae;try{D.progress.call(q,N)}finally{e.event=ge}},q.header=function(ae,ge){return ae=(ae+"").toLowerCase(),arguments.length<2?G[ae]:(ge==null?delete G[ae]:G[ae]=ge+"",q)},q.mimeType=function(ae){return arguments.length?(g=ae==null?null:ae+"",q):g},q.responseType=function(ae){return arguments.length?(j=ae,q):j},q.response=function(ae){return w=ae,q},["get","post"].forEach(function(ae){q[ae]=function(){return q.send.apply(q,[ae].concat(t(arguments)))}}),q.send=function(ae,ge,me){if(arguments.length===2&&typeof ge=="function"&&(me=ge,ge=null),N.open(ae,c,!0),g!=null&&!("accept"in G)&&(G.accept=g+",*/*"),N.setRequestHeader)for(var Re in G)N.setRequestHeader(Re,G[Re]);return g!=null&&N.overrideMimeType&&N.overrideMimeType(g),j!=null&&(N.responseType=j),me!=null&&q.on("error",me).on("load",function(Ve){me(null,Ve)}),D.beforesend.call(q,N),N.send(ge==null?null:ge),q},q.abort=function(){return N.abort(),q},e.rebind(q,D,"on"),S==null?q:q.get(xf(S))}function xf(c){return c.length===1?function(g,w){c(g==null?w:null)}:c}function cu(c){var g=c.responseType;return g&&g!=="text"?c.response:c.responseText}e.dsv=function(c,g){var w=new RegExp('["'+c+` ]`),S=c.charCodeAt(0);function q(ne,ae,ge){arguments.length<3&&(ge=ae,ae=null);var me=Go(ne,g,ae==null?D:G(ae),ge);return me.row=function(Re){return arguments.length?me.response((ae=Re)==null?D:G(Re)):ae},me}function D(ne){return q.parse(ne.responseText)}function G(ne){return function(ae){return q.parse(ae.responseText,ne)}}q.parse=function(ne,ae){var ge;return q.parseRows(ne,function(me,Re){if(ge)return ge(me,Re-1);var Ve=function(be){for(var Se={},De=me.length,Ge=0;Ge<De;++Ge)Se[me[Ge]]=be[Ge];return Se};ge=ae?function(be,Se){return ae(Ve(be),Se)}:Ve})},q.parseRows=function(ne,ae){var ge={},me={},Re=[],Ve=ne.length,be=0,Se=0,De,Ge;function We(){if(be>=Ve)return me;if(Ge)return Ge=!1,ge;var _r=be;if(ne.charCodeAt(_r)===34){for(var Or=_r;Or++<Ve;)if(ne.charCodeAt(Or)===34){if(ne.charCodeAt(Or+1)!==34)break;++Or}be=Or+2;var Wr=ne.charCodeAt(Or+1);return Wr===13?(Ge=!0,ne.charCodeAt(Or+2)===10&&++be):Wr===10&&(Ge=!0),ne.slice(_r+1,Or).replace(/""/g,'"')}for(;be<Ve;){var Wr=ne.charCodeAt(be++),Vr=1;if(Wr===10)Ge=!0;else if(Wr===13)Ge=!0,ne.charCodeAt(be)===10&&(++be,++Vr);else if(Wr!==S)continue;return ne.slice(_r,be-Vr)}return ne.slice(_r)}for(;(De=We())!==me;){for(var Pe=[];De!==ge&&De!==me;)Pe.push(De),De=We();ae&&(Pe=ae(Pe,Se++))==null||Re.push(Pe)}return Re},q.format=function(ne){if(Array.isArray(ne[0]))return q.formatRows(ne);var ae=new Z,ge=[];return ne.forEach(function(me){for(var Re in me)ae.has(Re)||ge.push(ae.add(Re))}),[ge.map(j).join(c)].concat(ne.map(function(me){return ge.map(function(Re){return j(me[Re])}).join(c)})).join(` `)},q.formatRows=function(ne){return ne.map(N).join(` `)};function N(ne){return ne.map(j).join(c)}function j(ne){return w.test(ne)?'"'+ne.replace(/\"/g,'""')+'"':ne}return q},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var oo,Vo,Wo,vu,Rl=this[ie(this,"requestAnimationFrame")]||function(c){setTimeout(c,17)};e.timer=function(){zl.apply(this,arguments)};function zl(c,g,w){var S=arguments.length;S<2&&(g=0),S<3&&(w=Date.now());var q=w+g,D={c,t:q,n:null};return Vo?Vo.n=D:oo=D,Vo=D,Wo||(vu=clearTimeout(vu),Wo=1,Rl(_i)),D}function _i(){var c=lo(),g=Zo()-c;g>24?(isFinite(g)&&(clearTimeout(vu),vu=setTimeout(_i,g)),Wo=0):(Wo=1,Rl(_i))}e.timer.flush=function(){lo(),Zo()};function lo(){for(var c=Date.now(),g=oo;g;)c>=g.t&&g.c(c-g.t)&&(g.c=null),g=g.n;return c}function Zo(){for(var c,g=oo,w=1/0;g;)g.c?(g.t<w&&(w=g.t),g=(c=g).n):g=c?c.n=g.n:oo=g.n;return Vo=c,w}e.round=function(c,g){return g?Math.round(c*(g=Math.pow(10,g)))/g:Math.round(c)},e.geom={};function Nl(c){return c[0]}function bs(c){return c[1]}e.geom.hull=function(c){var g=Nl,w=bs;if(arguments.length)return S(c);function S(q){if(q.length<3)return[];var D=At(g),G=At(w),N,j=q.length,ne=[],ae=[];for(N=0;N<j;N++)ne.push([+D.call(this,q[N],N),+G.call(this,q[N],N),N]);for(ne.sort(Xc),N=0;N<j;N++)ae.push([ne[N][0],-ne[N][1]]);var ge=wf(ne),me=wf(ae),Re=me[0]===ge[0],Ve=me[me.length-1]===ge[ge.length-1],be=[];for(N=ge.length-1;N>=0;--N)be.push(q[ne[ge[N]][2]]);for(N=+Re;N<me.length-Ve;++N)be.push(q[ne[me[N]][2]]);return be}return S.x=function(q){return arguments.length?(g=q,S):g},S.y=function(q){return arguments.length?(w=q,S):w},S};function wf(c){for(var g=c.length,w=[0,1],S=2,q=2;q<g;q++){for(;S>1&&Kt(c[w[S-2]],c[w[S-1]],c[q])<=0;)--S;w[S++]=q}return w.slice(0,S)}function Xc(c,g){return c[0]-g[0]||c[1]-g[1]}e.geom.polygon=function(c){return Le(c,_s),c};var _s=e.geom.polygon.prototype=[];_s.area=function(){for(var c=-1,g=this.length,w,S=this[g-1],q=0;++c<g;)w=S,S=this[c],q+=w[1]*S[0]-w[0]*S[1];return q*.5},_s.centroid=function(c){var g=-1,w=this.length,S=0,q=0,D,G=this[w-1],N;for(arguments.length||(c=-1/(6*this.area()));++g<w;)D=G,G=this[g],N=D[0]*G[1]-G[0]*D[1],S+=(D[0]+G[0])*N,q+=(D[1]+G[1])*N;return[S*c,q*c]},_s.clip=function(c){for(var g,w=Xo(c),S=-1,q=this.length-Xo(this),D,G,N=this[q-1],j,ne,ae;++S<q;){for(g=c.slice(),c.length=0,j=this[S],ne=g[(G=g.length-w)-1],D=-1;++D<G;)ae=g[D],xs(ae,N,j)?(xs(ne,N,j)||c.push(ws(ne,ae,N,j)),c.push(ae)):xs(ne,N,j)&&c.push(ws(ne,ae,N,j)),ne=ae;w&&c.push(c[0]),N=j}return c};function xs(c,g,w){return(w[0]-g[0])*(c[1]-g[1])<(w[1]-g[1])*(c[0]-g[0])}function ws(c,g,w,S){var q=c[0],D=w[0],G=g[0]-q,N=S[0]-D,j=c[1],ne=w[1],ae=g[1]-j,ge=S[1]-ne,me=(N*(j-ne)-ge*(q-D))/(ge*G-N*ae);return[q+me*G,j+me*ae]}function Xo(c){var g=c[0],w=c[c.length-1];return!(g[0]-w[0]||g[1]-w[1])}var so,uo,Bi,Mf=[],hu,Fl,Af=[];function jc(){Ko(this),this.edge=this.site=this.circle=null}function Ms(c){var g=Mf.pop()||new jc;return g.site=c,g}function Oi(c){co(c),Bi.remove(c),Mf.push(c),Ko(c)}function As(c){var g=c.circle,w=g.x,S=g.cy,q={x:w,y:S},D=c.P,G=c.N,N=[c];Oi(c);for(var j=D;j.circle&&b(w-j.circle.x)<Ae&&b(S-j.circle.cy)<Ae;)D=j.P,N.unshift(j),Oi(j),j=D;N.unshift(j),co(j);for(var ne=G;ne.circle&&b(w-ne.circle.x)<Ae&&b(S-ne.circle.cy)<Ae;)G=ne.N,N.push(ne),Oi(ne),ne=G;N.push(ne),co(ne);var ae=N.length,ge;for(ge=1;ge<ae;++ge)ne=N[ge],j=N[ge-1],Yi(ne.edge,j.site,ne.site,q);j=N[0],ne=N[ae-1],ne.edge=Hl(j.site,ne.site,null,q),fo(j),fo(ne)}function Jc(c){for(var g=c.x,w=c.y,S,q,D,G,N=Bi._;N;)if(D=Ts(N,w)-g,D>Ae)N=N.L;else if(G=g-Bv(N,w),G>Ae){if(!N.R){S=N;break}N=N.R}else{D>-Ae?(S=N.P,q=N):G>-Ae?(S=N,q=N.N):S=q=N;break}var j=Ms(c);if(Bi.insert(S,j),!(!S&&!q)){if(S===q){co(S),q=Ms(S.site),Bi.insert(j,q),j.edge=q.edge=Hl(S.site,j.site),fo(S),fo(q);return}if(!q){j.edge=Hl(S.site,j.site);return}co(S),co(q);var ne=S.site,ae=ne.x,ge=ne.y,me=c.x-ae,Re=c.y-ge,Ve=q.site,be=Ve.x-ae,Se=Ve.y-ge,De=2*(me*Se-Re*be),Ge=me*me+Re*Re,We=be*be+Se*Se,Pe={x:(Se*Ge-Re*We)/De+ae,y:(me*We-be*Ge)/De+ge};Yi(q.edge,ne,Ve,Pe),j.edge=Hl(ne,c,null,Pe),q.edge=Hl(c,Ve,null,Pe),fo(S),fo(q)}}function Ts(c,g){var w=c.site,S=w.x,q=w.y,D=q-g;if(!D)return S;var G=c.P;if(!G)return-1/0;w=G.site;var N=w.x,j=w.y,ne=j-g;if(!ne)return N;var ae=N-S,ge=1/D-1/ne,me=ae/ne;return ge?(-me+Math.sqrt(me*me-2*ge*(ae*ae/(-2*ne)-j+ne/2+q-D/2)))/ge+S:(S+N)/2}function Bv(c,g){var w=c.N;if(w)return Ts(w,g);var S=c.site;return S.y===g?S.x:1/0}function jo(c){this.site=c,this.edges=[]}jo.prototype.prepare=function(){for(var c=this.edges,g=c.length,w;g--;)w=c[g].edge,(!w.b||!w.a)&&c.splice(g,1);return c.sort(Il),c.length};function Tf(c){for(var g=c[0][0],w=c[1][0],S=c[0][1],q=c[1][1],D,G,N,j,ne=uo,ae=ne.length,ge,me,Re,Ve,be,Se;ae--;)if(ge=ne[ae],!(!ge||!ge.prepare()))for(Re=ge.edges,Ve=Re.length,me=0;me<Ve;)Se=Re[me].end(),N=Se.x,j=Se.y,be=Re[++me%Ve].start(),D=be.x,G=be.y,(b(N-D)>Ae||b(j-G)>Ae)&&(Re.splice(me,0,new Jo(Uv(ge.site,Se,b(N-g)<Ae&&q-j>Ae?{x:g,y:b(D-g)<Ae?G:q}:b(j-q)<Ae&&w-N>Ae?{x:b(G-q)<Ae?D:w,y:q}:b(N-w)<Ae&&j-S>Ae?{x:w,y:b(D-w)<Ae?G:S}:b(j-S)<Ae&&N-g>Ae?{x:b(G-S)<Ae?D:g,y:S}:null),ge.site,null)),++Ve)}function Il(c,g){return g.angle-c.angle}function $c(){Ko(this),this.x=this.y=this.arc=this.site=this.cy=null}function fo(c){var g=c.P,w=c.N;if(!(!g||!w)){var S=g.site,q=c.site,D=w.site;if(S!==D){var G=q.x,N=q.y,j=S.x-G,ne=S.y-N,ae=D.x-G,Se=D.y-N,ge=2*(j*Se-ne*ae);if(!(ge>=-Ke)){var me=j*j+ne*ne,Re=ae*ae+Se*Se,Ve=(Se*me-ne*Re)/ge,be=(j*Re-ae*me)/ge,Se=be+N,De=Af.pop()||new $c;De.arc=c,De.site=q,De.x=Ve+G,De.y=Se+Math.sqrt(Ve*Ve+be*be),De.cy=Se,c.circle=De;for(var Ge=null,We=Fl._;We;)if(De.y<We.y||De.y===We.y&&De.x<=We.x)if(We.L)We=We.L;else{Ge=We.P;break}else if(We.R)We=We.R;else{Ge=We;break}Fl.insert(Ge,De),Ge||(hu=De)}}}}function co(c){var g=c.circle;g&&(g.P||(hu=g.N),Fl.remove(g),Af.push(g),Ko(g),c.circle=null)}function kf(c,g,w,S){return function(q){var D=q.a,G=q.b,N=D.x,j=D.y,ne=G.x,ae=G.y,ge=0,me=1,Re=ne-N,Ve=ae-j,be;if(be=c-N,!(!Re&&be>0)){if(be/=Re,Re<0){if(be<ge)return;be<me&&(me=be)}else if(Re>0){if(be>me)return;be>ge&&(ge=be)}if(be=w-N,!(!Re&&be<0)){if(be/=Re,Re<0){if(be>me)return;be>ge&&(ge=be)}else if(Re>0){if(be<ge)return;be<me&&(me=be)}if(be=g-j,!(!Ve&&be>0)){if(be/=Ve,Ve<0){if(be<ge)return;be<me&&(me=be)}else if(Ve>0){if(be>me)return;be>ge&&(ge=be)}if(be=S-j,!(!Ve&&be<0)){if(be/=Ve,Ve<0){if(be>me)return;be>ge&&(ge=be)}else if(Ve>0){if(be<ge)return;be<me&&(me=be)}return ge>0&&(q.a={x:N+ge*Re,y:j+ge*Ve}),me<1&&(q.b={x:N+me*Re,y:j+me*Ve}),q}}}}}}function xi(c){for(var g=so,w=kf(c[0][0],c[0][1],c[1][0],c[1][1]),S=g.length,q;S--;)q=g[S],(!Ov(q,c)||!w(q)||b(q.a.x-q.b.x)<Ae&&b(q.a.y-q.b.y)<Ae)&&(q.a=q.b=null,g.splice(S,1))}function Ov(c,g){var w=c.b;if(w)return!0;var S=c.a,q=g[0][0],D=g[1][0],G=g[0][1],N=g[1][1],j=c.l,ne=c.r,ae=j.x,ge=j.y,me=ne.x,Re=ne.y,Ve=(ae+me)/2,be=(ge+Re)/2,Se,De;if(Re===ge){if(Ve<q||Ve>=D)return;if(ae>me){if(!S)S={x:Ve,y:G};else if(S.y>=N)return;w={x:Ve,y:N}}else{if(!S)S={x:Ve,y:N};else if(S.y<G)return;w={x:Ve,y:G}}}else if(Se=(ae-me)/(Re-ge),De=be-Se*Ve,Se<-1||Se>1)if(ae>me){if(!S)S={x:(G-De)/Se,y:G};else if(S.y>=N)return;w={x:(N-De)/Se,y:N}}else{if(!S)S={x:(N-De)/Se,y:N};else if(S.y<G)return;w={x:(G-De)/Se,y:G}}else if(ge<Re){if(!S)S={x:q,y:Se*q+De};else if(S.x>=D)return;w={x:D,y:Se*D+De}}else{if(!S)S={x:D,y:Se*D+De};else if(S.x<q)return;w={x:q,y:Se*q+De}}return c.a=S,c.b=w,!0}function Ui(c,g){this.l=c,this.r=g,this.a=this.b=null}function Hl(c,g,w,S){var q=new Ui(c,g);return so.push(q),w&&Yi(q,c,g,w),S&&Yi(q,g,c,S),uo[c.i].edges.push(new Jo(q,c,g)),uo[g.i].edges.push(new Jo(q,g,c)),q}function Uv(c,g,w){var S=new Ui(c,null);return S.a=g,S.b=w,so.push(S),S}function Yi(c,g,w,S){!c.a&&!c.b?(c.a=S,c.l=g,c.r=w):c.l===w?c.b=S:c.a=S}function Jo(c,g,w){var S=c.a,q=c.b;this.edge=c,this.site=g,this.angle=w?Math.atan2(w.y-g.y,w.x-g.x):c.l===g?Math.atan2(q.x-S.x,S.y-q.y):Math.atan2(S.x-q.x,q.y-S.y)}Jo.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 $o(){this._=null}function Ko(c){c.U=c.C=c.L=c.R=c.P=c.N=null}$o.prototype={insert:function(c,g){var w,S,q;if(c){if(g.P=c,g.N=c.N,c.N&&(c.N.P=g),c.N=g,c.R){for(c=c.R;c.L;)c=c.L;c.L=g}else c.R=g;w=c}else this._?(c=du(this._),g.P=null,g.N=c,c.P=c.L=g,w=c):(g.P=g.N=null,this._=g,w=null);for(g.L=g.R=null,g.U=w,g.C=!0,c=g;w&&w.C;)S=w.U,w===S.L?(q=S.R,q&&q.C?(w.C=q.C=!1,S.C=!0,c=S):(c===w.R&&(vo(this,w),c=w,w=c.U),w.C=!1,S.C=!0,ks(this,S))):(q=S.L,q&&q.C?(w.C=q.C=!1,S.C=!0,c=S):(c===w.L&&(ks(this,w),c=w,w=c.U),w.C=!1,S.C=!0,vo(this,S))),w=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 g=c.U,w,S=c.L,q=c.R,D,G;if(S?q?D=du(q):D=S:D=q,g?g.L===c?g.L=D:g.R=D:this._=D,S&&q?(G=D.C,D.C=c.C,D.L=S,S.U=D,D!==q?(g=D.U,D.U=c.U,c=D.R,g.L=c,D.R=q,q.U=D):(D.U=g,g=D,c=D.R)):(G=c.C,c=D),c&&(c.U=g),!G){if(c&&c.C){c.C=!1;return}do{if(c===this._)break;if(c===g.L){if(w=g.R,w.C&&(w.C=!1,g.C=!0,vo(this,g),w=g.R),w.L&&w.L.C||w.R&&w.R.C){(!w.R||!w.R.C)&&(w.L.C=!1,w.C=!0,ks(this,w),w=g.R),w.C=g.C,g.C=w.R.C=!1,vo(this,g),c=this._;break}}els