UNPKG

plotly.js

Version:

The open source javascript graphing library that powers plotly

18 lines 1.69 MB
/** * plotly.js (gl3d - minified) v3.6.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 qB=Object.defineProperty,OB=Object.defineProperties;var BB=Object.getOwnPropertyDescriptors;var pb=Object.getOwnPropertySymbols;var UB=Object.prototype.hasOwnProperty,HB=Object.prototype.propertyIsEnumerable;var gb=(e,r,t)=>r in e?qB(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Cl=(e,r)=>{for(var t in r||(r={}))UB.call(r,t)&&gb(e,t,r[t]);if(pb)for(var t of pb(r))HB.call(r,t)&&gb(e,t,r[t]);return e},Ec=(e,r)=>OB(e,BB(r));var be=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var Lc=be(yb=>{"use strict";yb.version="3.6.0"});var xb=be((mb,Dc)=>{(function(r,t,n){t[r]=t[r]||n(),typeof Dc!="undefined"&&Dc.exports&&(Dc.exports=t[r])})("Promise",typeof window!="undefined"?window:mb,function(){"use strict";var r,t,n,a=Object.prototype.toString,o=typeof setImmediate!="undefined"?function(k){return setImmediate(k)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(k,S,x,M){return Object.defineProperty(k,S,{value:x,writable:!0,configurable:M!==!1})}}catch(m){r=function(S,x,M){return S[x]=M,S}}n=function(){var k,S,x;function M(v,w){this.fn=v,this.self=w,this.next=void 0}return{add:function(w,g){x=new M(w,g),S?S.next=x:k=x,S=x,x=void 0},drain:function(){var w=k;for(k=S=t=void 0;w;)w.fn.call(w.self),w=w.next}}}();function i(m,k){n.add(m,k),t||(t=o(n.drain))}function l(m){var k,S=typeof m;return m!=null&&(S=="object"||S=="function")&&(k=m.then),typeof k=="function"?k:!1}function u(){for(var m=0;m<this.chain.length;m++)s(this,this.state===1?this.chain[m].success:this.chain[m].failure,this.chain[m]);this.chain.length=0}function s(m,k,S){var x,M;try{k===!1?S.reject(m.msg):(k===!0?x=m.msg:x=k.call(void 0,m.msg),x===S.promise?S.reject(TypeError("Promise-chain cycle")):(M=l(x))?M.call(x,S.resolve,S.reject):S.resolve(x))}catch(v){S.reject(v)}}function f(m){var k,S=this;if(!S.triggered){S.triggered=!0,S.def&&(S=S.def);try{(k=l(m))?i(function(){var x=new _(S);try{k.call(m,function(){f.apply(x,arguments)},function(){h.apply(x,arguments)})}catch(M){h.call(x,M)}}):(S.msg=m,S.state=1,S.chain.length>0&&i(u,S))}catch(x){h.call(new _(S),x)}}}function h(m){var k=this;k.triggered||(k.triggered=!0,k.def&&(k=k.def),k.msg=m,k.state=2,k.chain.length>0&&i(u,k))}function p(m,k,S,x){for(var M=0;M<k.length;M++)(function(w){m.resolve(k[w]).then(function(c){S(w,c)},x)})(M)}function _(m){this.def=m,this.triggered=!1}function y(m){this.promise=m,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function b(m){if(typeof m!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var k=new y(this);this.then=function(x,M){var v={success:typeof x=="function"?x:!0,failure:typeof M=="function"?M:!1};return v.promise=new this.constructor(function(g,c){if(typeof g!="function"||typeof c!="function")throw TypeError("Not a function");v.resolve=g,v.reject=c}),k.chain.push(v),k.state!==0&&i(u,k),v.promise},this.catch=function(x){return this.then(void 0,x)};try{m.call(void 0,function(x){f.call(k,x)},function(x){h.call(k,x)})}catch(S){h.call(k,S)}}var T=r({},"constructor",b,!1);return b.prototype=T,r(T,"__NPO__",0,!1),r(b,"resolve",function(k){var S=this;return k&&typeof k=="object"&&k.__NPO__===1?k:new S(function(M,v){if(typeof M!="function"||typeof v!="function")throw TypeError("Not a function");M(k)})}),r(b,"reject",function(k){return new this(function(x,M){if(typeof x!="function"||typeof M!="function")throw TypeError("Not a function");M(k)})}),r(b,"all",function(k){var S=this;return a.call(k)!="[object Array]"?S.reject(TypeError("Not an array")):k.length===0?S.resolve([]):new S(function(M,v){if(typeof M!="function"||typeof v!="function")throw TypeError("Not a function");var w=k.length,g=Array(w),c=0;p(S,k,function(d,D){g[d]=D,++c===w&&M(g)},v)})}),r(b,"race",function(k){var S=this;return a.call(k)!="[object Array]"?S.reject(TypeError("Not an array")):new S(function(M,v){if(typeof M!="function"||typeof v!="function")throw TypeError("Not a function");p(S,k,function(g,c){M(c)},v)})}),b})});var ot=be((vfe,Rc)=>{(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 o(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(z){for(var U=z.length,G=new Array(U);U--;)G[U]=z[U];return G}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(C){var i=this.Element.prototype,l=i.setAttribute,u=i.setAttributeNS,s=this.CSSStyleDeclaration.prototype,f=s.setProperty;i.setAttribute=function(z,U){l.call(this,z,U+"")},i.setAttributeNS=function(z,U,G){u.call(this,z,U,G+"")},s.setProperty=function(z,U,G){f.call(this,z,U+"",G)}}e.ascending=h;function h(C,z){return C<z?-1:C>z?1:C>=z?0:NaN}e.descending=function(C,z){return z<C?-1:z>C?1:z>=C?0:NaN},e.min=function(C,z){var U=-1,G=C.length,W,K;if(arguments.length===1){for(;++U<G;)if((K=C[U])!=null&&K>=K){W=K;break}for(;++U<G;)(K=C[U])!=null&&W>K&&(W=K)}else{for(;++U<G;)if((K=z.call(C,C[U],U))!=null&&K>=K){W=K;break}for(;++U<G;)(K=z.call(C,C[U],U))!=null&&W>K&&(W=K)}return W},e.max=function(C,z){var U=-1,G=C.length,W,K;if(arguments.length===1){for(;++U<G;)if((K=C[U])!=null&&K>=K){W=K;break}for(;++U<G;)(K=C[U])!=null&&K>W&&(W=K)}else{for(;++U<G;)if((K=z.call(C,C[U],U))!=null&&K>=K){W=K;break}for(;++U<G;)(K=z.call(C,C[U],U))!=null&&K>W&&(W=K)}return W},e.extent=function(C,z){var U=-1,G=C.length,W,K,fe;if(arguments.length===1){for(;++U<G;)if((K=C[U])!=null&&K>=K){W=fe=K;break}for(;++U<G;)(K=C[U])!=null&&(W>K&&(W=K),fe<K&&(fe=K))}else{for(;++U<G;)if((K=z.call(C,C[U],U))!=null&&K>=K){W=fe=K;break}for(;++U<G;)(K=z.call(C,C[U],U))!=null&&(W>K&&(W=K),fe<K&&(fe=K))}return[W,fe]};function p(C){return C===null?NaN:+C}function _(C){return!isNaN(C)}e.sum=function(C,z){var U=0,G=C.length,W,K=-1;if(arguments.length===1)for(;++K<G;)_(W=+C[K])&&(U+=W);else for(;++K<G;)_(W=+z.call(C,C[K],K))&&(U+=W);return U},e.mean=function(C,z){var U=0,G=C.length,W,K=-1,fe=G;if(arguments.length===1)for(;++K<G;)_(W=p(C[K]))?U+=W:--fe;else for(;++K<G;)_(W=p(z.call(C,C[K],K)))?U+=W:--fe;if(fe)return U/fe},e.quantile=function(C,z){var U=(C.length-1)*z+1,G=Math.floor(U),W=+C[G-1],K=U-G;return K?W+K*(C[G]-W):W},e.median=function(C,z){var U=[],G=C.length,W,K=-1;if(arguments.length===1)for(;++K<G;)_(W=p(C[K]))&&U.push(W);else for(;++K<G;)_(W=p(z.call(C,C[K],K)))&&U.push(W);if(U.length)return e.quantile(U.sort(h),.5)},e.variance=function(C,z){var U=C.length,G=0,W,K,fe=0,le=-1,he=0;if(arguments.length===1)for(;++le<U;)_(W=p(C[le]))&&(K=W-G,G+=K/++he,fe+=K*(W-G));else for(;++le<U;)_(W=p(z.call(C,C[le],le)))&&(K=W-G,G+=K/++he,fe+=K*(W-G));if(he>1)return fe/(he-1)},e.deviation=function(){var C=e.variance.apply(this,arguments);return C&&Math.sqrt(C)};function y(C){return{left:function(z,U,G,W){for(arguments.length<3&&(G=0),arguments.length<4&&(W=z.length);G<W;){var K=G+W>>>1;C(z[K],U)<0?G=K+1:W=K}return G},right:function(z,U,G,W){for(arguments.length<3&&(G=0),arguments.length<4&&(W=z.length);G<W;){var K=G+W>>>1;C(z[K],U)>0?W=K:G=K+1}return G}}}var b=y(h);e.bisectLeft=b.left,e.bisect=e.bisectRight=b.right,e.bisector=function(C){return y(C.length===1?function(z,U){return h(C(z),U)}:C)},e.shuffle=function(C,z,U){(G=arguments.length)<3&&(U=C.length,G<2&&(z=0));for(var G=U-z,W,K;G;)K=Math.random()*G--|0,W=C[G+z],C[G+z]=C[K+z],C[K+z]=W;return C},e.permute=function(C,z){for(var U=z.length,G=new Array(U);U--;)G[U]=C[z[U]];return G},e.pairs=function(C){for(var z=0,U=C.length-1,G,W=C[0],K=new Array(U<0?0:U);z<U;)K[z]=[G=W,W=C[++z]];return K},e.transpose=function(C){if(!(K=C.length))return[];for(var z=-1,U=e.min(C,T),G=new Array(U);++z<U;)for(var W=-1,K,fe=G[z]=new Array(K);++W<K;)fe[W]=C[W][z];return G};function T(C){return C.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(C){var z=[];for(var U in C)z.push(U);return z},e.values=function(C){var z=[];for(var U in C)z.push(C[U]);return z},e.entries=function(C){var z=[];for(var U in C)z.push({key:U,value:C[U]});return z},e.merge=function(C){for(var z=C.length,U,G=-1,W=0,K,fe;++G<z;)W+=C[G].length;for(K=new Array(W);--z>=0;)for(fe=C[z],U=fe.length;--U>=0;)K[--W]=fe[U];return K};var m=Math.abs;e.range=function(C,z,U){if(arguments.length<3&&(U=1,arguments.length<2&&(z=C,C=0)),(z-C)/U===1/0)throw new Error("infinite range");var G=[],W=k(m(U)),K=-1,fe;if(C*=W,z*=W,U*=W,U<0)for(;(fe=C+U*++K)>z;)G.push(fe/W);else for(;(fe=C+U*++K)<z;)G.push(fe/W);return G};function k(C){for(var z=1;C*z%1;)z*=10;return z}function S(C,z){for(var U in z)Object.defineProperty(C.prototype,U,{value:z[U],enumerable:!1})}e.map=function(C,z){var U=new x;if(C instanceof x)C.forEach(function(le,he){U.set(le,he)});else if(Array.isArray(C)){var G=-1,W=C.length,K;if(arguments.length===1)for(;++G<W;)U.set(G,C[G]);else for(;++G<W;)U.set(z.call(C,K=C[G],G),K)}else for(var fe in C)U.set(fe,C[fe]);return U};function x(){this._=Object.create(null)}var M="__proto__",v="\0";S(x,{has:c,get:function(C){return this._[w(C)]},set:function(C,z){return this._[w(C)]=z},remove:A,keys:d,values:function(){var C=[];for(var z in this._)C.push(this._[z]);return C},entries:function(){var C=[];for(var z in this._)C.push({key:g(z),value:this._[z]});return C},size:D,empty:E,forEach:function(C){for(var z in this._)C.call(this,g(z),this._[z])}});function w(C){return(C+="")===M||C[0]===v?v+C:C}function g(C){return(C+="")[0]===v?C.slice(1):C}function c(C){return w(C)in this._}function A(C){return(C=w(C))in this._&&delete this._[C]}function d(){var C=[];for(var z in this._)C.push(g(z));return C}function D(){var C=0;for(var z in this._)++C;return C}function E(){for(var C in this._)return!1;return!0}e.nest=function(){var C={},z=[],U=[],G,W;function K(le,he,we){if(we>=z.length)return W?W.call(C,he):G?he.sort(G):he;for(var Te=-1,Re=he.length,Pe=z[we++],Ge,Je,Ne,qe=new x,Ue;++Te<Re;)(Ue=qe.get(Ge=Pe(Je=he[Te])))?Ue.push(Je):qe.set(Ge,[Je]);return le?(Je=le(),Ne=function(Ze,Ke){Je.set(Ze,K(le,Ke,we))}):(Je={},Ne=function(Ze,Ke){Je[Ze]=K(le,Ke,we)}),qe.forEach(Ne),Je}function fe(le,he){if(he>=z.length)return le;var we=[],Te=U[he++];return le.forEach(function(Re,Pe){we.push({key:Re,values:fe(Pe,he)})}),Te?we.sort(function(Re,Pe){return Te(Re.key,Pe.key)}):we}return C.map=function(le,he){return K(he,le,0)},C.entries=function(le){return fe(K(e.map,le,0),0)},C.key=function(le){return z.push(le),C},C.sortKeys=function(le){return U[z.length-1]=le,C},C.sortValues=function(le){return G=le,C},C.rollup=function(le){return W=le,C},C},e.set=function(C){var z=new R;if(C)for(var U=0,G=C.length;U<G;++U)z.add(C[U]);return z};function R(){this._=Object.create(null)}S(R,{has:c,add:function(C){return this._[w(C+="")]=!0,C},remove:A,values:d,size:D,empty:E,forEach:function(C){for(var z in this._)C.call(this,g(z))}}),e.behavior={};function N(C){return C}e.rebind=function(C,z){for(var U=1,G=arguments.length,W;++U<G;)C[W=arguments[U]]=I(C,z,z[W]);return C};function I(C,z,U){return function(){var G=U.apply(z,arguments);return G===z?C:G}}function F(C,z){if(z in C)return z;z=z.charAt(0).toUpperCase()+z.slice(1);for(var U=0,G=L.length;U<G;++U){var W=L[U]+z;if(W in C)return W}}var L=["webkit","ms","moz","Moz","o","O"];function P(){}e.dispatch=function(){for(var C=new O,z=-1,U=arguments.length;++z<U;)C[arguments[z]]=B(C);return C};function O(){}O.prototype.on=function(C,z){var U=C.indexOf("."),G="";if(U>=0&&(G=C.slice(U+1),C=C.slice(0,U)),C)return arguments.length<2?this[C].on(G):this[C].on(G,z);if(arguments.length===2){if(z==null)for(C in this)this.hasOwnProperty(C)&&this[C].on(G,null);return this}};function B(C){var z=[],U=new x;function G(){for(var W=z,K=-1,fe=W.length,le;++K<fe;)(le=W[K].on)&&le.apply(this,arguments);return C}return G.on=function(W,K){var fe=U.get(W),le;return arguments.length<2?fe&&fe.on:(fe&&(fe.on=null,z=z.slice(0,le=z.indexOf(fe)).concat(z.slice(le+1)),U.remove(W)),K&&z.push(U.set(W,{on:K})),C)},G}e.event=null;function X(){e.event.preventDefault()}function $(){for(var C=e.event,z;z=C.sourceEvent;)C=z;return C}function ee(C){for(var z=new O,U=0,G=arguments.length;++U<G;)z[arguments[U]]=B(z);return z.of=function(W,K){return function(fe){try{var le=fe.sourceEvent=e.event;fe.target=C,e.event=fe,z[fe.type].apply(W,K)}finally{e.event=le}}},z}e.requote=function(C){return C.replace(Y,"\\$&")};var Y=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,q={}.__proto__?function(C,z){C.__proto__=z}:function(C,z){for(var U in z)C[U]=z[U]};function Q(C){return q(C,j),C}var oe=function(C,z){return z.querySelector(C)},Z=function(C,z){return z.querySelectorAll(C)},se=function(C,z){var U=C.matches||C[F(C,"matchesSelector")];return se=function(G,W){return U.call(G,W)},se(C,z)};typeof Sizzle=="function"&&(oe=function(C,z){return Sizzle(C,z)[0]||null},Z=Sizzle,se=Sizzle.matchesSelector),e.selection=function(){return e.select(n.documentElement)};var j=e.selection.prototype=[];j.select=function(C){var z=[],U,G,W,K;C=V(C);for(var fe=-1,le=this.length;++fe<le;){z.push(U=[]),U.parentNode=(W=this[fe]).parentNode;for(var he=-1,we=W.length;++he<we;)(K=W[he])?(U.push(G=C.call(K,K.__data__,he,fe)),G&&"__data__"in K&&(G.__data__=K.__data__)):U.push(null)}return Q(z)};function V(C){return typeof C=="function"?C:function(){return oe(C,this)}}j.selectAll=function(C){var z=[],U,G;C=re(C);for(var W=-1,K=this.length;++W<K;)for(var fe=this[W],le=-1,he=fe.length;++le<he;)(G=fe[le])&&(z.push(U=t(C.call(G,G.__data__,le,W))),U.parentNode=G);return Q(z)};function re(C){return typeof C=="function"?C:function(){return Z(C,this)}}var H="http://www.w3.org/1999/xhtml",ne={svg:"http://www.w3.org/2000/svg",xhtml:H,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:ne,qualify:function(C){var z=C.indexOf(":"),U=C;return z>=0&&(U=C.slice(0,z))!=="xmlns"&&(C=C.slice(z+1)),ne.hasOwnProperty(U)?{space:ne[U],local:C}:C}},j.attr=function(C,z){if(arguments.length<2){if(typeof C=="string"){var U=this.node();return C=e.ns.qualify(C),C.local?U.getAttributeNS(C.space,C.local):U.getAttribute(C)}for(z in C)this.each(ue(z,C[z]));return this}return this.each(ue(C,z))};function ue(C,z){C=e.ns.qualify(C);function U(){this.removeAttribute(C)}function G(){this.removeAttributeNS(C.space,C.local)}function W(){this.setAttribute(C,z)}function K(){this.setAttributeNS(C.space,C.local,z)}function fe(){var he=z.apply(this,arguments);he==null?this.removeAttribute(C):this.setAttribute(C,he)}function le(){var he=z.apply(this,arguments);he==null?this.removeAttributeNS(C.space,C.local):this.setAttributeNS(C.space,C.local,he)}return z==null?C.local?G:U:typeof z=="function"?C.local?le:fe:C.local?K:W}function ye(C){return C.trim().replace(/\s+/g," ")}j.classed=function(C,z){if(arguments.length<2){if(typeof C=="string"){var U=this.node(),G=(C=Me(C)).length,W=-1;if(z=U.classList){for(;++W<G;)if(!z.contains(C[W]))return!1}else for(z=U.getAttribute("class");++W<G;)if(!ke(C[W]).test(z))return!1;return!0}for(z in C)this.each(ge(z,C[z]));return this}return this.each(ge(C,z))};function ke(C){return new RegExp("(?:^|\\s+)"+e.requote(C)+"(?:\\s+|$)","g")}function Me(C){return(C+"").trim().split(/^|\s+/)}function ge(C,z){C=Me(C).map(Ee);var U=C.length;function G(){for(var K=-1;++K<U;)C[K](this,z)}function W(){for(var K=-1,fe=z.apply(this,arguments);++K<U;)C[K](this,fe)}return typeof z=="function"?W:G}function Ee(C){var z=ke(C);return function(U,G){if(W=U.classList)return G?W.add(C):W.remove(C);var W=U.getAttribute("class")||"";G?(z.lastIndex=0,z.test(W)||U.setAttribute("class",ye(W+" "+C))):U.setAttribute("class",ye(W.replace(z," ")))}}j.style=function(C,z,U){var G=arguments.length;if(G<3){if(typeof C!="string"){G<2&&(z="");for(U in C)this.each(Ce(U,C[U],z));return this}if(G<2){var W=this.node();return o(W).getComputedStyle(W,null).getPropertyValue(C)}U=""}return this.each(Ce(C,z,U))};function Ce(C,z,U){function G(){this.style.removeProperty(C)}function W(){this.style.setProperty(C,z,U)}function K(){var fe=z.apply(this,arguments);fe==null?this.style.removeProperty(C):this.style.setProperty(C,fe,U)}return z==null?G:typeof z=="function"?K:W}j.property=function(C,z){if(arguments.length<2){if(typeof C=="string")return this.node()[C];for(z in C)this.each(Fe(z,C[z]));return this}return this.each(Fe(C,z))};function Fe(C,z){function U(){delete this[C]}function G(){this[C]=z}function W(){var K=z.apply(this,arguments);K==null?delete this[C]:this[C]=K}return z==null?U:typeof z=="function"?W:G}j.text=function(C){return arguments.length?this.each(typeof C=="function"?function(){var z=C.apply(this,arguments);this.textContent=z==null?"":z}:C==null?function(){this.textContent=""}:function(){this.textContent=C}):this.node().textContent},j.html=function(C){return arguments.length?this.each(typeof C=="function"?function(){var z=C.apply(this,arguments);this.innerHTML=z==null?"":z}:C==null?function(){this.innerHTML=""}:function(){this.innerHTML=C}):this.node().innerHTML},j.append=function(C){return C=ie(C),this.select(function(){return this.appendChild(C.apply(this,arguments))})};function ie(C){function z(){var G=this.ownerDocument,W=this.namespaceURI;return W===H&&G.documentElement.namespaceURI===H?G.createElement(C):G.createElementNS(W,C)}function U(){return this.ownerDocument.createElementNS(C.space,C.local)}return typeof C=="function"?C:(C=e.ns.qualify(C)).local?U:z}j.insert=function(C,z){return C=ie(C),z=V(z),this.select(function(){return this.insertBefore(C.apply(this,arguments),z.apply(this,arguments)||null)})},j.remove=function(){return this.each(J)};function J(){var C=this.parentNode;C&&C.removeChild(this)}j.data=function(C,z){var U=-1,G=this.length,W,K;if(!arguments.length){for(C=new Array(G=(W=this[0]).length);++U<G;)(K=W[U])&&(C[U]=K.__data__);return C}function fe(Te,Re){var Pe,Ge=Te.length,Je=Re.length,Ne=Math.min(Ge,Je),qe=new Array(Je),Ue=new Array(Je),Ze=new Array(Ge),Ke,Ve;if(z){var tr=new x,fr=new Array(Ge),dr;for(Pe=-1;++Pe<Ge;)(Ke=Te[Pe])&&(tr.has(dr=z.call(Ke,Ke.__data__,Pe))?Ze[Pe]=Ke:tr.set(dr,Ke),fr[Pe]=dr);for(Pe=-1;++Pe<Je;)(Ke=tr.get(dr=z.call(Re,Ve=Re[Pe],Pe)))?Ke!==!0&&(qe[Pe]=Ke,Ke.__data__=Ve):Ue[Pe]=te(Ve),tr.set(dr,!0);for(Pe=-1;++Pe<Ge;)Pe in fr&&tr.get(fr[Pe])!==!0&&(Ze[Pe]=Te[Pe])}else{for(Pe=-1;++Pe<Ne;)Ke=Te[Pe],Ve=Re[Pe],Ke?(Ke.__data__=Ve,qe[Pe]=Ke):Ue[Pe]=te(Ve);for(;Pe<Je;++Pe)Ue[Pe]=te(Re[Pe]);for(;Pe<Ge;++Pe)Ze[Pe]=Te[Pe]}Ue.update=qe,Ue.parentNode=qe.parentNode=Ze.parentNode=Te.parentNode,le.push(Ue),he.push(qe),we.push(Ze)}var le=ve([]),he=Q([]),we=Q([]);if(typeof C=="function")for(;++U<G;)fe(W=this[U],C.call(W,W.parentNode.__data__,U));else for(;++U<G;)fe(W=this[U],C);return he.enter=function(){return le},he.exit=function(){return we},he};function te(C){return{__data__:C}}j.datum=function(C){return arguments.length?this.property("__data__",C):this.property("__data__")},j.filter=function(C){var z=[],U,G,W;typeof C!="function"&&(C=ae(C));for(var K=0,fe=this.length;K<fe;K++){z.push(U=[]),U.parentNode=(G=this[K]).parentNode;for(var le=0,he=G.length;le<he;le++)(W=G[le])&&C.call(W,W.__data__,le,K)&&U.push(W)}return Q(z)};function ae(C){return function(){return se(this,C)}}j.order=function(){for(var C=-1,z=this.length;++C<z;)for(var U=this[C],G=U.length-1,W=U[G],K;--G>=0;)(K=U[G])&&(W&&W!==K.nextSibling&&W.parentNode.insertBefore(K,W),W=K);return this},j.sort=function(C){C=ce.apply(this,arguments);for(var z=-1,U=this.length;++z<U;)this[z].sort(C);return this.order()};function ce(C){return arguments.length||(C=h),function(z,U){return z&&U?C(z.__data__,U.__data__):!z-!U}}j.each=function(C){return pe(this,function(z,U,G){C.call(z,z.__data__,U,G)})};function pe(C,z){for(var U=0,G=C.length;U<G;U++)for(var W=C[U],K=0,fe=W.length,le;K<fe;K++)(le=W[K])&&z(le,K,U);return C}j.call=function(C){var z=t(arguments);return C.apply(z[0]=this,z),this},j.empty=function(){return!this.node()},j.node=function(){for(var C=0,z=this.length;C<z;C++)for(var U=this[C],G=0,W=U.length;G<W;G++){var K=U[G];if(K)return K}return null},j.size=function(){var C=0;return pe(this,function(){++C}),C};function ve(C){return q(C,xe),C}var xe=[];e.selection.enter=ve,e.selection.enter.prototype=xe,xe.append=j.append,xe.empty=j.empty,xe.node=j.node,xe.call=j.call,xe.size=j.size,xe.select=function(C){for(var z=[],U,G,W,K,fe,le=-1,he=this.length;++le<he;){W=(K=this[le]).update,z.push(U=[]),U.parentNode=K.parentNode;for(var we=-1,Te=K.length;++we<Te;)(fe=K[we])?(U.push(W[we]=G=C.call(K.parentNode,fe.__data__,we,le)),G.__data__=fe.__data__):U.push(null)}return Q(z)},xe.insert=function(C,z){return arguments.length<2&&(z=me(this)),j.insert.call(this,C,z)};function me(C){var z,U;return function(G,W,K){var fe=C[K].update,le=fe.length,he;for(K!=U&&(U=K,z=0),W>=z&&(z=W+1);!(he=fe[z])&&++z<le;);return he}}e.select=function(C){var z;return typeof C=="string"?(z=[oe(C,n)],z.parentNode=n.documentElement):(z=[C],z.parentNode=a(C)),Q([z])},e.selectAll=function(C){var z;return typeof C=="string"?(z=t(Z(C,n)),z.parentNode=n.documentElement):(z=t(C),z.parentNode=null),Q([z])},j.on=function(C,z,U){var G=arguments.length;if(G<3){if(typeof C!="string"){G<2&&(z=!1);for(U in C)this.each(de(U,C[U],z));return this}if(G<2)return(G=this.node()["__on"+C])&&G._;U=!1}return this.each(de(C,z,U))};function de(C,z,U){var G="__on"+C,W=C.indexOf("."),K=Ae;W>0&&(C=C.slice(0,W));var fe=_e.get(C);fe&&(C=fe,K=Ie);function le(){var Te=this[G];Te&&(this.removeEventListener(C,Te,Te.$),delete this[G])}function he(){var Te=K(z,t(arguments));le.call(this),this.addEventListener(C,this[G]=Te,Te.$=U),Te._=z}function we(){var Te=new RegExp("^__on([^.]+)"+e.requote(C)+"$"),Re;for(var Pe in this)if(Re=Pe.match(Te)){var Ge=this[Pe];this.removeEventListener(Re[1],Ge,Ge.$),delete this[Pe]}}return W?z?he:le:z?P:we}var _e=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&_e.forEach(function(C){"on"+C in n&&_e.remove(C)});function Ae(C,z){return function(U){var G=e.event;e.event=U,z[0]=this.__data__;try{C.apply(this,z)}finally{e.event=G}}}function Ie(C,z){var U=Ae(C,z);return function(G){var W=this,K=G.relatedTarget;(!K||K!==W&&!(K.compareDocumentPosition(W)&8))&&U.call(W,G)}}var De,We=0;function Oe(C){var z=".dragsuppress-"+ ++We,U="click"+z,G=e.select(o(C)).on("touchmove"+z,X).on("dragstart"+z,X).on("selectstart"+z,X);if(De==null&&(De="onselectstart"in C?!1:F(C.style,"userSelect")),De){var W=a(C).style,K=W[De];W[De]="none"}return function(fe){if(G.on(z,null),De&&(W[De]=K),fe){var le=function(){G.on(U,null)};G.on(U,function(){X(),le()},!0),setTimeout(le,0)}}}e.mouse=function(C){return Be(C,$())};var ze=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Be(C,z){z.changedTouches&&(z=z.changedTouches[0]);var U=C.ownerSVGElement||C;if(U.createSVGPoint){var G=U.createSVGPoint();if(ze<0){var W=o(C);if(W.scrollX||W.scrollY){U=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var K=U[0][0].getScreenCTM();ze=!(K.f||K.e),U.remove()}}return ze?(G.x=z.pageX,G.y=z.pageY):(G.x=z.clientX,G.y=z.clientY),G=G.matrixTransform(C.getScreenCTM().inverse()),[G.x,G.y]}var fe=C.getBoundingClientRect();return[z.clientX-fe.left-C.clientLeft,z.clientY-fe.top-C.clientTop]}e.touch=function(C,z,U){if(arguments.length<3&&(U=z,z=$().changedTouches),z){for(var G=0,W=z.length,K;G<W;++G)if((K=z[G]).identifier===U)return Be(C,K)}},e.behavior.drag=function(){var C=ee(W,"drag","dragstart","dragend"),z=null,U=K(P,e.mouse,o,"mousemove","mouseup"),G=K(Se,e.touch,N,"touchmove","touchend");function W(){this.on("mousedown.drag",U).on("touchstart.drag",G)}function K(fe,le,he,we,Te){return function(){var Re=this,Pe=e.event.target.correspondingElement||e.event.target,Ge=Re.parentNode,Je=C.of(Re,arguments),Ne=0,qe=fe(),Ue=".drag"+(qe==null?"":"-"+qe),Ze,Ke=e.select(he(Pe)).on(we+Ue,fr).on(Te+Ue,dr),Ve=Oe(Pe),tr=le(Ge,qe);z?(Ze=z.apply(Re,arguments),Ze=[Ze.x-tr[0],Ze.y-tr[1]]):Ze=[0,0],Je({type:"dragstart"});function fr(){var cr=le(Ge,qe),pr,gr;cr&&(pr=cr[0]-tr[0],gr=cr[1]-tr[1],Ne|=pr|gr,tr=cr,Je({type:"drag",x:cr[0]+Ze[0],y:cr[1]+Ze[1],dx:pr,dy:gr}))}function dr(){le(Ge,qe)&&(Ke.on(we+Ue,null).on(Te+Ue,null),Ve(Ne),Je({type:"dragend"}))}}}return W.origin=function(fe){return arguments.length?(z=fe,W):z},e.rebind(W,C,"on")};function Se(){return e.event.changedTouches[0].identifier}e.touches=function(C,z){return arguments.length<2&&(z=$().touches),z?t(z).map(function(U){var G=Be(C,U);return G.identifier=U.identifier,G}):[]};var Le=1e-6,Ye=Le*Le,Xe=Math.PI,$e=2*Xe,Qe=$e-Le,je=Xe/2,ir=Xe/180,yr=180/Xe;function xr(C){return C>0?1:C<0?-1:0}function wr(C,z,U){return(z[0]-C[0])*(U[1]-C[1])-(z[1]-C[1])*(U[0]-C[0])}function $r(C){return C>1?0:C<-1?Xe:Math.acos(C)}function _r(C){return C>1?je:C<-1?-je:Math.asin(C)}function Nr(C){return((C=Math.exp(C))-1/C)/2}function et(C){return((C=Math.exp(C))+1/C)/2}function Sr(C){return((C=Math.exp(2*C))-1)/(C+1)}function qr(C){return(C=Math.sin(C/2))*C}var gt=Math.SQRT2,Hr=2,Zr=4;e.interpolateZoom=function(C,z){var U=C[0],G=C[1],W=C[2],K=z[0],fe=z[1],le=z[2],he=K-U,we=fe-G,Te=he*he+we*we,Re,Pe;if(Te<Ye)Pe=Math.log(le/W)/gt,Re=function(Ze){return[U+Ze*he,G+Ze*we,W*Math.exp(gt*Ze*Pe)]};else{var Ge=Math.sqrt(Te),Je=(le*le-W*W+Zr*Te)/(2*W*Hr*Ge),Ne=(le*le-W*W-Zr*Te)/(2*le*Hr*Ge),qe=Math.log(Math.sqrt(Je*Je+1)-Je),Ue=Math.log(Math.sqrt(Ne*Ne+1)-Ne);Pe=(Ue-qe)/gt,Re=function(Ze){var Ke=Ze*Pe,Ve=et(qe),tr=W/(Hr*Ge)*(Ve*Sr(gt*Ke+qe)-Nr(qe));return[U+tr*he,G+tr*we,W*Ve/et(gt*Ke+qe)]}}return Re.duration=Pe*1e3,Re},e.behavior.zoom=function(){var C={x:0,y:0,k:1},z,U,G,W=[960,500],K=zt,fe=250,le=0,he="mousedown.zoom",we="mousemove.zoom",Te="mouseup.zoom",Re,Pe="touchstart.zoom",Ge,Je=ee(Ke,"zoomstart","zoom","zoomend"),Ne,qe,Ue,Ze;Pr||(Pr="onwheel"in n?(nr=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in n?(nr=function(){return e.event.wheelDelta},"mousewheel"):(nr=function(){return-e.event.detail},"MozMousePixelScroll"));function Ke(sr){sr.on(he,Cr).on(Pr+".zoom",Bt).on("dblclick.zoom",dt).on(Pe,ut)}Ke.event=function(sr){sr.each(function(){var Ir=Je.of(this,arguments),Or=C;Al?e.select(this).transition().each("start.zoom",function(){C=this.__chart__||{x:0,y:0,k:1},gr(Ir)}).tween("zoom:zoom",function(){var ft=W[0],Ft=W[1],rn=U?U[0]:ft/2,wn=U?U[1]:Ft/2,zn=e.interpolateZoom([(rn-C.x)/C.k,(wn-C.y)/C.k,ft/C.k],[(rn-Or.x)/Or.k,(wn-Or.y)/Or.k,ft/Or.k]);return function(Xn){var qn=zn(Xn),ra=ft/qn[2];this.__chart__=C={x:rn-qn[0]*ra,y:wn-qn[1]*ra,k:ra},Fr(Ir)}}).each("interrupt.zoom",function(){mr(Ir)}).each("end.zoom",function(){mr(Ir)}):(this.__chart__=C,gr(Ir),Fr(Ir),mr(Ir))})},Ke.translate=function(sr){return arguments.length?(C={x:+sr[0],y:+sr[1],k:C.k},pr(),Ke):[C.x,C.y]},Ke.scale=function(sr){return arguments.length?(C={x:C.x,y:C.y,k:null},fr(+sr),pr(),Ke):C.k},Ke.scaleExtent=function(sr){return arguments.length?(K=sr==null?zt:[+sr[0],+sr[1]],Ke):K},Ke.center=function(sr){return arguments.length?(G=sr&&[+sr[0],+sr[1]],Ke):G},Ke.size=function(sr){return arguments.length?(W=sr&&[+sr[0],+sr[1]],Ke):W},Ke.duration=function(sr){return arguments.length?(fe=+sr,Ke):fe},Ke.x=function(sr){return arguments.length?(qe=sr,Ne=sr.copy(),C={x:0,y:0,k:1},Ke):qe},Ke.y=function(sr){return arguments.length?(Ze=sr,Ue=sr.copy(),C={x:0,y:0,k:1},Ke):Ze};function Ve(sr){return[(sr[0]-C.x)/C.k,(sr[1]-C.y)/C.k]}function tr(sr){return[sr[0]*C.k+C.x,sr[1]*C.k+C.y]}function fr(sr){C.k=Math.max(K[0],Math.min(K[1],sr))}function dr(sr,Ir){Ir=tr(Ir),C.x+=sr[0]-Ir[0],C.y+=sr[1]-Ir[1]}function cr(sr,Ir,Or,ft){sr.__chart__={x:C.x,y:C.y,k:C.k},fr(Math.pow(2,ft)),dr(U=Ir,Or),sr=e.select(sr),fe>0&&(sr=sr.transition().duration(fe)),sr.call(Ke.event)}function pr(){qe&&qe.domain(Ne.range().map(function(sr){return(sr-C.x)/C.k}).map(Ne.invert)),Ze&&Ze.domain(Ue.range().map(function(sr){return(sr-C.y)/C.k}).map(Ue.invert))}function gr(sr){le++||sr({type:"zoomstart"})}function Fr(sr){pr(),sr({type:"zoom",scale:C.k,translate:[C.x,C.y]})}function mr(sr){--le||(sr({type:"zoomend"}),U=null)}function Cr(){var sr=this,Ir=Je.of(sr,arguments),Or=0,ft=e.select(o(sr)).on(we,wn).on(Te,zn),Ft=Ve(e.mouse(sr)),rn=Oe(sr);Ac.call(sr),gr(Ir);function wn(){Or=1,dr(e.mouse(sr),Ft),Fr(Ir)}function zn(){ft.on(we,null).on(Te,null),rn(Or),mr(Ir)}}function ut(){var sr=this,Ir=Je.of(sr,arguments),Or={},ft=0,Ft,rn=".zoom-"+e.event.changedTouches[0].identifier,wn="touchmove"+rn,zn="touchend"+rn,Xn=[],qn=e.select(sr),ra=Oe(sr);ta(),gr(Ir),qn.on(he,null).on(Pe,ta);function kn(){var Ka=e.touches(sr);return Ft=C.k,Ka.forEach(function(Mn){Mn.identifier in Or&&(Or[Mn.identifier]=Ve(Mn))}),Ka}function ta(){var Ka=e.event.target;e.select(Ka).on(wn,kl).on(zn,zB),Xn.push(Ka);for(var Mn=e.event.changedTouches,Aa=0,ki=Mn.length;Aa<ki;++Aa)Or[Mn[Aa].identifier]=null;var ka=kn(),Ns=Date.now();if(ka.length===1){if(Ns-Ge<500){var Sl=ka[0];cr(sr,Sl,Or[Sl.identifier],Math.floor(Math.log(C.k)/Math.LN2)+1),X()}Ge=Ns}else if(ka.length>1){var Sl=ka[0],Co=ka[1],Cc=Sl[0]-Co[0],db=Sl[1]-Co[1];ft=Cc*Cc+db*db}}function kl(){var Ka=e.touches(sr),Mn,Aa,ki,ka;Ac.call(sr);for(var Ns=0,Sl=Ka.length;Ns<Sl;++Ns,ka=null)if(ki=Ka[Ns],ka=Or[ki.identifier]){if(Aa)break;Mn=ki,Aa=ka}if(ka){var Co=(Co=ki[0]-Mn[0])*Co+(Co=ki[1]-Mn[1])*Co,Cc=ft&&Math.sqrt(Co/ft);Mn=[(Mn[0]+ki[0])/2,(Mn[1]+ki[1])/2],Aa=[(Aa[0]+ka[0])/2,(Aa[1]+ka[1])/2],fr(Cc*Ft)}Ge=null,dr(Mn,Aa),Fr(Ir)}function zB(){if(e.event.touches.length){for(var Ka=e.event.changedTouches,Mn=0,Aa=Ka.length;Mn<Aa;++Mn)delete Or[Ka[Mn].identifier];for(var ki in Or)return void kn()}e.selectAll(Xn).on(rn,null),qn.on(he,Cr).on(Pe,ut),ra(),mr(Ir)}}function Bt(){var sr=Je.of(this,arguments);Re?clearTimeout(Re):(Ac.call(this),z=Ve(U=G||e.mouse(this)),gr(sr)),Re=setTimeout(function(){Re=null,mr(sr)},50),X(),fr(Math.pow(2,nr()*.002)*C.k),dr(U,z),Fr(sr)}function dt(){var sr=e.mouse(this),Ir=Math.log(C.k)/Math.LN2;cr(this,sr,Ve(sr),e.event.shiftKey?Math.ceil(Ir)-1:Math.floor(Ir)+1)}return e.rebind(Ke,Je,"on")};var zt=[0,1/0],nr,Pr;e.color=Kr;function Kr(){}Kr.prototype.toString=function(){return this.rgb()+""},e.hsl=Er;function Er(C,z,U){return this instanceof Er?(this.h=+C,this.s=+z,void(this.l=+U)):arguments.length<2?C instanceof Er?new Er(C.h,C.s,C.l):it(""+C,ct,Er):new Er(C,z,U)}var Qr=Er.prototype=new Kr;Qr.brighter=function(C){return C=Math.pow(.7,arguments.length?C:1),new Er(this.h,this.s,this.l/C)},Qr.darker=function(C){return C=Math.pow(.7,arguments.length?C:1),new Er(this.h,this.s,C*this.l)},Qr.rgb=function(){return Dt(this.h,this.s,this.l)};function Dt(C,z,U){var G,W;C=isNaN(C)?0:(C%=360)<0?C+360:C,z=isNaN(z)||z<0?0:z>1?1:z,U=U<0?0:U>1?1:U,W=U<=.5?U*(1+z):U+z-U*z,G=2*U-W;function K(le){return le>360?le-=360:le<0&&(le+=360),le<60?G+(W-G)*le/60:le<180?W:le<240?G+(W-G)*(240-le)/60:G}function fe(le){return Math.round(K(le)*255)}return new on(fe(C+120),fe(C),fe(C-120))}e.hcl=at;function at(C,z,U){return this instanceof at?(this.h=+C,this.c=+z,void(this.l=+U)):arguments.length<2?C instanceof at?new at(C.h,C.c,C.l):C instanceof Rt?wi(C.l,C.a,C.b):wi((C=hr((C=e.rgb(C)).r,C.g,C.b)).l,C.a,C.b):new at(C,z,U)}var $t=at.prototype=new Kr;$t.brighter=function(C){return new at(this.h,this.c,Math.min(100,this.l+vt*(arguments.length?C:1)))},$t.darker=function(C){return new at(this.h,this.c,Math.max(0,this.l-vt*(arguments.length?C:1)))},$t.rgb=function(){return Zt(this.h,this.c,this.l).rgb()};function Zt(C,z,U){return isNaN(C)&&(C=0),isNaN(z)&&(z=0),new Rt(U,Math.cos(C*=ir)*z,Math.sin(C)*z)}e.lab=Rt;function Rt(C,z,U){return this instanceof Rt?(this.l=+C,this.a=+z,void(this.b=+U)):arguments.length<2?C instanceof Rt?new Rt(C.l,C.a,C.b):C instanceof at?Zt(C.h,C.c,C.l):hr((C=on(C)).r,C.g,C.b):new Rt(C,z,U)}var vt=18,Mt=.95047,jt=1,ea=1.08883,Nn=Rt.prototype=new Kr;Nn.brighter=function(C){return new Rt(Math.min(100,this.l+vt*(arguments.length?C:1)),this.a,this.b)},Nn.darker=function(C){return new Rt(Math.max(0,this.l-vt*(arguments.length?C:1)),this.a,this.b)},Nn.rgb=function(){return Ma(this.l,this.a,this.b)};function Ma(C,z,U){var G=(C+16)/116,W=G+z/500,K=G-U/200;return W=$i(W)*Mt,G=$i(G)*jt,K=$i(K)*ea,new on(eo(3.2404542*W-1.5371385*G-.4985314*K),eo(-.969266*W+1.8760108*G+.041556*K),eo(.0556434*W-.2040259*G+1.0572252*K))}function wi(C,z,U){return C>0?new at(Math.atan2(U,z)*yr,Math.sqrt(z*z+U*U),C):new at(NaN,NaN,C)}function $i(C){return C>.206893034?C*C*C:(C-4/29)/7.787037}function ji(C){return C>.008856?Math.pow(C,1/3):7.787037*C+4/29}function eo(C){return Math.round(255*(C<=.00304?12.92*C:1.055*Math.pow(C,1/2.4)-.055))}e.rgb=on;function on(C,z,U){return this instanceof on?(this.r=~~C,this.g=~~z,void(this.b=~~U)):arguments.length<2?C instanceof on?new on(C.r,C.g,C.b):it(""+C,on,Dt):new on(C,z,U)}function ko(C){return new on(C>>16,C>>8&255,C&255)}function Mi(C){return ko(C)+""}var Ti=on.prototype=new Kr;Ti.brighter=function(C){C=Math.pow(.7,arguments.length?C:1);var z=this.r,U=this.g,G=this.b,W=30;return!z&&!U&&!G?new on(W,W,W):(z&&z<W&&(z=W),U&&U<W&&(U=W),G&&G<W&&(G=W),new on(Math.min(255,z/C),Math.min(255,U/C),Math.min(255,G/C)))},Ti.darker=function(C){return C=Math.pow(.7,arguments.length?C:1),new on(C*this.r,C*this.g,C*this.b)},Ti.hsl=function(){return ct(this.r,this.g,this.b)},Ti.toString=function(){return"#"+br(this.r)+br(this.g)+br(this.b)};function br(C){return C<16?"0"+Math.max(0,C).toString(16):Math.min(255,C).toString(16)}function it(C,z,U){var G=0,W=0,K=0,fe,le,he;if(fe=/([a-z]+)\((.*)\)/.exec(C=C.toLowerCase()),fe)switch(le=fe[2].split(","),fe[1]){case"hsl":return U(parseFloat(le[0]),parseFloat(le[1])/100,parseFloat(le[2])/100);case"rgb":return z(bt(le[0]),bt(le[1]),bt(le[2]))}return(he=_n.get(C))?z(he.r,he.g,he.b):(C!=null&&C.charAt(0)==="#"&&!isNaN(he=parseInt(C.slice(1),16))&&(C.length===4?(G=(he&3840)>>4,G=G>>4|G,W=he&240,W=W>>4|W,K=he&15,K=K<<4|K):C.length===7&&(G=(he&16711680)>>16,W=(he&65280)>>8,K=he&255)),z(G,W,K))}function ct(C,z,U){var G=Math.min(C/=255,z/=255,U/=255),W=Math.max(C,z,U),K=W-G,fe,le,he=(W+G)/2;return K?(le=he<.5?K/(W+G):K/(2-W-G),C==W?fe=(z-U)/K+(z<U?6:0):z==W?fe=(U-C)/K+2:fe=(C-z)/K+4,fe*=60):(fe=NaN,le=he>0&&he<1?0:fe),new Er(fe,le,he)}function hr(C,z,U){C=bn(C),z=bn(z),U=bn(U);var G=ji((.4124564*C+.3575761*z+.1804375*U)/Mt),W=ji((.2126729*C+.7151522*z+.072175*U)/jt),K=ji((.0193339*C+.119192*z+.9503041*U)/ea);return Rt(116*W-16,500*(G-W),200*(W-K))}function bn(C){return(C/=255)<=.04045?C/12.92:Math.pow((C+.055)/1.055,2.4)}function bt(C){var z=parseFloat(C);return C.charAt(C.length-1)==="%"?Math.round(z*2.55):z}var _n=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});_n.forEach(function(C,z){_n.set(C,ko(z))});function Vr(C){return typeof C=="function"?C:function(){return C}}e.functor=Vr,e.xhr=Za(N);function Za(C){return function(z,U,G){return arguments.length===2&&typeof U=="function"&&(G=U,U=null),wl(z,U,C,G)}}function wl(C,z,U,G){var W={},K=e.dispatch("beforesend","progress","load","error"),fe={},le=new XMLHttpRequest,he=null;self.XDomainRequest&&!("withCredentials"in le)&&/^(http(s)?:)?\/\//.test(C)&&(le=new XDomainRequest),"onload"in le?le.onload=le.onerror=we:le.onreadystatechange=function(){le.readyState>3&&we()};function we(){var Te=le.status,Re;if(!Te&&Oq(le)||Te>=200&&Te<300||Te===304){try{Re=U.call(W,le)}catch(Pe){K.error.call(W,Pe);return}K.load.call(W,Re)}else K.error.call(W,le)}return le.onprogress=function(Te){var Re=e.event;e.event=Te;try{K.progress.call(W,le)}finally{e.event=Re}},W.header=function(Te,Re){return Te=(Te+"").toLowerCase(),arguments.length<2?fe[Te]:(Re==null?delete fe[Te]:fe[Te]=Re+"",W)},W.mimeType=function(Te){return arguments.length?(z=Te==null?null:Te+"",W):z},W.responseType=function(Te){return arguments.length?(he=Te,W):he},W.response=function(Te){return U=Te,W},["get","post"].forEach(function(Te){W[Te]=function(){return W.send.apply(W,[Te].concat(t(arguments)))}}),W.send=function(Te,Re,Pe){if(arguments.length===2&&typeof Re=="function"&&(Pe=Re,Re=null),le.open(Te,C,!0),z!=null&&!("accept"in fe)&&(fe.accept=z+",*/*"),le.setRequestHeader)for(var Ge in fe)le.setRequestHeader(Ge,fe[Ge]);return z!=null&&le.overrideMimeType&&le.overrideMimeType(z),he!=null&&(le.responseType=he),Pe!=null&&W.on("error",Pe).on("load",function(Je){Pe(null,Je)}),K.beforesend.call(W,le),le.send(Re==null?null:Re),W},W.abort=function(){return le.abort(),W},e.rebind(W,K,"on"),G==null?W:W.get(qq(G))}function qq(C){return C.length===1?function(z,U){C(z==null?U:null)}:C}function Oq(C){var z=C.responseType;return z&&z!=="text"?C.response:C.responseText}e.dsv=function(C,z){var U=new RegExp('["'+C+` ]`),G=C.charCodeAt(0);function W(we,Te,Re){arguments.length<3&&(Re=Te,Te=null);var Pe=wl(we,z,Te==null?K:fe(Te),Re);return Pe.row=function(Ge){return arguments.length?Pe.response((Te=Ge)==null?K:fe(Ge)):Te},Pe}function K(we){return W.parse(we.responseText)}function fe(we){return function(Te){return W.parse(Te.responseText,we)}}W.parse=function(we,Te){var Re;return W.parseRows(we,function(Pe,Ge){if(Re)return Re(Pe,Ge-1);var Je=function(Ne){for(var qe={},Ue=Pe.length,Ze=0;Ze<Ue;++Ze)qe[Pe[Ze]]=Ne[Ze];return qe};Re=Te?function(Ne,qe){return Te(Je(Ne),qe)}:Je})},W.parseRows=function(we,Te){var Re={},Pe={},Ge=[],Je=we.length,Ne=0,qe=0,Ue,Ze;function Ke(){if(Ne>=Je)return Pe;if(Ze)return Ze=!1,Re;var tr=Ne;if(we.charCodeAt(tr)===34){for(var fr=tr;fr++<Je;)if(we.charCodeAt(fr)===34){if(we.charCodeAt(fr+1)!==34)break;++fr}Ne=fr+2;var dr=we.charCodeAt(fr+1);return dr===13?(Ze=!0,we.charCodeAt(fr+2)===10&&++Ne):dr===10&&(Ze=!0),we.slice(tr+1,fr).replace(/""/g,'"')}for(;Ne<Je;){var dr=we.charCodeAt(Ne++),cr=1;if(dr===10)Ze=!0;else if(dr===13)Ze=!0,we.charCodeAt(Ne)===10&&(++Ne,++cr);else if(dr!==G)continue;return we.slice(tr,Ne-cr)}return we.slice(tr)}for(;(Ue=Ke())!==Pe;){for(var Ve=[];Ue!==Re&&Ue!==Pe;)Ve.push(Ue),Ue=Ke();Te&&(Ve=Te(Ve,qe++))==null||Ge.push(Ve)}return Ge},W.format=function(we){if(Array.isArray(we[0]))return W.formatRows(we);var Te=new R,Re=[];return we.forEach(function(Pe){for(var Ge in Pe)Te.has(Ge)||Re.push(Te.add(Ge))}),[Re.map(he).join(C)].concat(we.map(function(Pe){return Re.map(function(Ge){return he(Pe[Ge])}).join(C)})).join(` `)},W.formatRows=function(we){return we.map(le).join(` `)};function le(we){return we.map(he).join(C)}function he(we){return U.test(we)?'"'+we.replace(/\"/g,'""')+'"':we}return W},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var oc,lc,sc,uc,ex=this[F(this,"requestAnimationFrame")]||function(C){setTimeout(C,17)};e.timer=function(){fc.apply(this,arguments)};function fc(C,z,U){var G=arguments.length;G<2&&(z=0),G<3&&(U=Date.now());var W=U+z,K={c:C,t:W,n:null};return lc?lc.n=K:oc=K,lc=K,sc||(uc=clearTimeout(uc),sc=1,ex(Bd)),K}function Bd(){var C=rx(),z=tx()-C;z>24?(isFinite(z)&&(clearTimeout(uc),uc=setTimeout(Bd,z)),sc=0):(sc=1,ex(Bd))}e.timer.flush=function(){rx(),tx()};function rx(){for(var C=Date.now(),z=oc;z;)C>=z.t&&z.c(C-z.t)&&(z.c=null),z=z.n;return C}function tx(){for(var C,z=oc,U=1/0;z;)z.c?(z.t<U&&(U=z.t),z=(C=z).n):z=C?C.n=z.n:oc=z.n;return lc=C,U}e.round=function(C,z){return z?Math.round(C*(z=Math.pow(10,z)))/z:Math.round(C)},e.geom={};function Ls(C){return C[0]}function tf(C){return C[1]}e.geom.hull=function(C){var z=Ls,U=tf;if(arguments.length)return G(C);function G(W){if(W.length<3)return[];var K=Vr(z),fe=Vr(U),le,he=W.length,we=[],Te=[];for(le=0;le<he;le++)we.push([+K.call(this,W[le],le),+fe.call(this,W[le],le),le]);for(we.sort(Bq),le=0;le<he;le++)Te.push([we[le][0],-we[le][1]]);var Re=nx(we),Pe=nx(Te),Ge=Pe[0]===Re[0],Je=Pe[Pe.length-1]===Re[Re.length-1],Ne=[];for(le=Re.length-1;le>=0;--le)Ne.push(W[we[Re[le]][2]]);for(le=+Ge;le<Pe.length-Je;++le)Ne.push(W[we[Pe[le]][2]]);return Ne}return G.x=function(W){return arguments.length?(z=W,G):z},G.y=function(W){return arguments.length?(U=W,G):U},G};function nx(C){for(var z=C.length,U=[0,1],G=2,W=2;W<z;W++){for(;G>1&&wr(C[U[G-2]],C[U[G-1]],C[W])<=0;)--G;U[G++]=W}return U.slice(0,G)}function Bq(C,z){return C[0]-z[0]||C[1]-z[1]}e.geom.polygon=function(C){return q(C,cc),C};var cc=e.geom.polygon.prototype=[];cc.area=function(){for(var C=-1,z=this.length,U,G=this[z-1],W=0;++C<z;)U=G,G=this[C],W+=U[1]*G[0]-U[0]*G[1];return W*.5},cc.centroid=function(C){var z=-1,U=this.length,G=0,W=0,K,fe=this[U-1],le;for(arguments.length||(C=-1/(6*this.area()));++z<U;)K=fe,fe=this[z],le=K[0]*fe[1]-fe[0]*K[1],G+=(K[0]+fe[0])*le,W+=(K[1]+fe[1])*le;return[G*C,W*C]},cc.clip=function(C){for(var z,U=ax(C),G=-1,W=this.length-ax(this),K,fe,le=this[W-1],he,we,Te;++G<W;){for(z=C.slice(),C.length=0,he=this[G],we=z[(fe=z.length-U)-1],K=-1;++K<fe;)Te=z[K],Ud(Te,le,he)?(Ud(we,le,he)||C.push(Hd(we,Te,le,he)),C.push(Te)):Ud(we,le,he)&&C.push(Hd(we,Te,le,he)),we=Te;U&&C.push(C[0]),le=he}return C};function Ud(C,z,U){return(U[0]-z[0])*(C[1]-z[1])<(U[1]-z[1])*(C[0]-z[0])}function Hd(C,z,U,G){var W=C[0],K=U[0],fe=z[0]-W,le=G[0]-K,he=C[1],we=U[1],Te=z[1]-he,Re=G[1]-we,Pe=(le*(he-we)-Re*(W-K))/(Re*fe-le*Te);return[W+Pe*fe,he+Pe*Te]}function ax(C){var z=C[0],U=C[C.length-1];return!(z[0]-U[0]||z[1]-U[1])}var Ds,Ml,Rs,ix=[],Vd,nf,ox=[];function Uq(){dc(this),this.edge=this.site=this.circle=null}function lx(C){var z=ix.pop()||new Uq;return z.site=C,z}function Gd(C){Fs(C),Rs.remove(C),ix.push(C),dc(C)}function Hq(C){var z=C.circle,U=z.x,G=z.cy,W={x:U,y:G},K=C.P,fe=C.N,le=[C];Gd(C);for(var he=K;he.circle&&m(U-he.circle.x)<Le&&m(G-he.circle.cy)<Le;)K=he.P,le.unshift(he),Gd(he),he=K;le.unshift(he),Fs(he);for(var we=fe;we.circle&&m(U-we.circle.x)<Le&&m(G-we.circle.cy)<Le;)fe=we.N,le.push(we),Gd(we),we=fe;le.push(we),Fs(we);var Te=le.length,Re;for(Re=1;Re<Te;++Re)we=le[Re],he=le[Re-1],hc(we.edge,he.site,we.site,W);he=le[0],we=le[Te-1],we.edge=af(he.site,we.site,null,W),Ps(he),Ps(we)}function Vq(C){for(var z=C.x,U=C.y,G,W,K,fe,le=Rs._;le;)if(K=sx(le,U)-z,K>Le)le=le.L;else if(fe=z-Gq(le,U),fe>Le){if(!le.R){G=le;break}le=le.R}else{K>-Le?(G=le.P,W=le):fe>-Le?(G=le,W=le.N):G=W=le;break}var he=lx(C);if(Rs.insert(G,he),!(!G&&!W)){if(G===W){Fs(G),W=lx(G.site),Rs.insert(he,W),he.edge=W.edge=af(G.site,he.site),Ps(G),Ps(W);return}if(!W){he.edge=af(G.site,he.site);return}Fs(G),Fs(W);var we=G.site,Te=we.x,Re=we.y,Pe=C.x-Te,Ge=C.y-Re,Je=W.site,Ne=Je.x-Te,qe=Je.y-Re,Ue=2*(Pe*qe-Ge*Ne),Ze=Pe*Pe+Ge*Ge,Ke=Ne*Ne+qe*qe,Ve={x:(qe*Ze-Ge*Ke)/Ue+Te,y:(Pe*Ke-Ne*Ze)/Ue+Re};hc(W.edge,we,Je,Ve),he.edge=af(we,C,null,Ve),W.edge=af(C,Je,null,Ve),Ps(G),Ps(W)}}function sx(C,z){var U=C.site,G=U.x,W=U.y,K=W-z;if(!K)return G;var fe=C.P;if(!fe)return-1/0;U=fe.site;var le=U.x,he=U.y,we=he-z;if(!we)return le;var Te=le-G,Re=1/K-1/we,Pe=Te/we;return Re?(-Pe+Math.sqrt(Pe*Pe-2*Re*(Te*Te/(-2*we)-he+we/2+W-K/2)))/Re+G:(G+le)/2}function Gq(C,z){var U=C.N;if(U)return sx(U,z);var G=C.site;return G.y===z?G.x:1/0}function ux(C){this.site=C,this.edges=[]}ux.prototype.prepare=function(){for(var C=this.edges,z=C.length,U;z--;)U=C[z].edge,(!U.b||!U.a)&&C.splice(z,1);return C.sort(fx),C.length};function Yq(C){for(var z=C[0][0],U=C[1][0],G=C[0][1],W=C[1][1],K,fe,le,he,we=Ml,Te=we.length,Re,Pe,Ge,Je,Ne,qe;Te--;)if(Re=we[Te],!(!Re||!Re.prepare()))for(Ge=Re.edges,Je=Ge.length,Pe=0;Pe<Je;)qe=Ge[Pe].end(),le=qe.x,he=qe.y,Ne=Ge[++Pe%Je].start(),K=Ne.x,fe=Ne.y,(m(le-K)>Le||m(he-fe)>Le)&&(Ge.splice(Pe,0,new vc(Kq(Re.site,qe,m(le-z)<Le&&W-he>Le?{x:z,y:m(K-z)<Le?fe:W}:m(he-W)<Le&&U-le>Le?{x:m(fe-W)<Le?K:U,y:W}:m(le-U)<Le&&he-G>Le?{x:U,y:m(K-U)<Le?fe:G}:m(he-G)<Le&&le-z>Le?{x:m(fe-G)<Le?K:z,y:G}:null),Re.site,null)),++Je)}function fx(C,z){return z.angle-C.angle}function Wq(){dc(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ps(C){var z=C.P,U=C.N;if(!(!z||!U)){var G=z.site,W=C.site,K=U.site;if(G!==K){var fe=W.x,le=W.y,he=G.x-fe,we=G.y-le,Te=K.x-fe,qe=K.y-le,Re=2*(he*qe-we*Te);if(!(Re>=-Ye)){var Pe=he*he+we*we,Ge=Te*Te+qe*qe,Je=(qe*Pe-we*Ge)/Re,Ne=(he*Ge-Te*Pe)/Re,qe=Ne+le,Ue=ox.pop()||new Wq;Ue.arc=C,Ue.site=W,Ue.x=Je+fe,Ue.y=qe+Math.sqrt(Je*Je+Ne*Ne),Ue.cy=qe,C.circle=Ue;for(var Ze=null,Ke=nf._;Ke;)if(Ue.y<Ke.y||Ue.y===Ke.y&&Ue.x<=Ke.x)if(Ke.L)Ke=Ke.L;else{Ze=Ke.P;break}else if(Ke.R)Ke=Ke.R;else{Ze=Ke;break}nf.insert(Ze,Ue),Ze||(Vd=Ue)}}}}function Fs(C){var z=C.circle;z&&(z.P||(Vd=z.N),nf.remove(z),ox.push(z),dc(z),C.circle=null)}function Xq(C,z,U,G){return function(W){var K=W.a,fe=W.b,le=K.x,he=K.y,we=fe.x,Te=fe.y,Re=0,Pe=1,Ge=we-le,Je=Te-he,Ne;if(Ne=C-le,!(!Ge&&Ne>0)){if(Ne/=Ge,Ge<0){if(Ne<Re)return;Ne<Pe&&(Pe=Ne)}else if(Ge>0){if(Ne>Pe)return;Ne>Re&&(Re=Ne)}if(Ne=U-le,!(!Ge&&Ne<0)){if(Ne/=Ge,Ge<0){if(Ne>Pe)return;Ne>Re&&(Re=Ne)}else if(Ge>0){if(Ne<Re)return;Ne<Pe&&(Pe=Ne)}if(Ne=z-he,!(!Je&&Ne>0)){if(Ne/=Je,Je<0){if(Ne<Re)return;Ne<Pe&&(Pe=Ne)}else if(Je>0){if(Ne>Pe)return;Ne>Re&&(Re=Ne)}if(Ne=G-he,!(!Je&&Ne<0)){if(Ne/=Je,Je<0){if(Ne>Pe)return;Ne>Re&&(Re=Ne)}else if(Je>0){if(Ne<Re)return;Ne<Pe&&(Pe=Ne)}return Re>0&&(W.a={x:le+Re*Ge,y:he+Re*Je}),Pe<1&&(W.b={x:le+Pe*Ge,y:he+Pe*Je}),W}}}}}}function Zq(C){for(var z=Ds,U=Xq(C[0][0],C[0][1],C[1][0],C[1][1]),G=z.length,W;G--;)W=z[G],(!Jq(W,C)||!U(W)||m(W.a.x-W.b.x)<Le&&m(W.a.y-W.b.y)<Le)&&(W.a=W.b=null,z.splice(G,1))}function Jq(C,z){var U=C.b;if(U)return!0;var G=C.a,W=z[0][0],K=z[1][0],fe=z[0][1],le=z[1][1],he=C.l,we=C.r,Te=he.x,Re=he.y,Pe=we.x,Ge=we.y,Je=(Te+Pe)/2,Ne=(Re+Ge)/2,qe,Ue;if(Ge===Re){if(Je<W||Je>=K)return;if(Te>Pe){if(!G)G={x:Je,y:fe};else if(G.y>=le)return;U={x:Je,y:le}}else{if(!G)G={x:Je,y:le};else if(G.y<fe)return;U={x:Je,y:fe}}}else if(qe=(Te-Pe)/(Ge-Re),Ue=Ne-qe*Je,qe<-1||qe>1)if(Te>Pe){if(!G)G={x:(fe-Ue)/qe,y:fe};else if(G.y>=le)return;U={x:(le-Ue)/qe,y:le}}else{if(!G)G={x:(le-Ue)/qe,y:le};else if(G.y<fe)return;U={x:(fe-Ue)/qe,y:fe}}else if(Re<Ge){if(!G)G={x:W,y:qe*W+Ue};else if(G.x>=K)return;U={x:K,y:qe*K+Ue}}else{if(!G)G={x:K,y:qe*K+Ue};else if(G.x<W)return;U={x:W,y:qe*W+Ue}}return C.a=G,C.b=U,!0}function cx(C,z){this.l=C,this.r=z,this.a=this.b=null}function af(C,z,U,G){var W=new cx(C,z);return Ds.push(W),U&&hc(W,C,z,U),G&&hc(W,z,C,G),Ml[C.i].edges.push(new vc(W,C,z)),Ml[z.i].edges.push(new vc(W,z,C)),W}function Kq(C,z,U){var G=new cx(C,null);return G.a=z,G.b=U,Ds.push(G),G}function hc(C,z,U,G){!C.a&&!C.b?(C.a=G,C.l=z,C.r=U):C.l===U?C.b=G:C.a=G}function vc(C,z,U){var G=C.a,W=C.b;this.edge=C,this.site=z,this.angle=U?Math.atan2(U.y-z.y,U.x-z.x):C.l===z?Math.atan2(W.x-G.x,G.y-W.y):Math.atan2(G.x-W.x,W.y-G.y)}vc.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 Yd(){this._=null}function dc(C){C.U=C.C=C.L=C.R=C.P=C.N=null}Yd.prototype={insert:function(C,z){var U,G,W;if(C){if(z.P=C,z.N=C.N,C.N&&(C.N.P=z),C.N=z,C.R){for(C=C.R;C.L;)C=C.L;C.L=z}else C.R=z;U=C}else this._?(C=hx(this._),z.P=null,z.N=C,C.P=C.L=z,U=C):(z.P=z.N=null,this._=z,U=null);for(z.L=z.R=null,z.U=U,z.C=!0,C=z;U&&U.C;)G=U.U,U===G.L?(W=G.R,W&&W.C?(U.C=W.C=!1,G.C=!0,C=G):(C===U.R&&(of(this,U),C=U,U=C.U),U.C=!1,G.C=!0,lf(this,G))):(W=G.L,W&&W.C?(U.C=W.C=!1,G.C=!0,C=G):(C===U.L&&(lf(this,U),C=U,U=C.U),U.C=!1,G.C=!0,of(this,G))),U=C.U;this._.C=!1},remove:function(C){C.N&&(C.N.P=C.P),C.P&&(