plotly.js
Version:
The open source javascript graphing library that powers plotly
18 lines • 1.59 MB
JavaScript
/**
* plotly.js (gl2d - minified) v3.5.0
* Copyright 2012-2026, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
(
function(root, factory) {
if (typeof module === "object" && module.exports) {
module.exports = factory();
} else {
root.moduleName = factory();
}
} (typeof self !== "undefined" ? self : this, () => {
"use strict";var Plotly=(()=>{var jne=Object.create;var B1=Object.defineProperty,Xne=Object.defineProperties,Zne=Object.getOwnPropertyDescriptor,Jne=Object.getOwnPropertyDescriptors,$ne=Object.getOwnPropertyNames,TM=Object.getOwnPropertySymbols,Qne=Object.getPrototypeOf,SM=Object.prototype.hasOwnProperty,Kne=Object.prototype.propertyIsEnumerable;var MM=(e,r,t)=>r in e?B1(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,_h=(e,r)=>{for(var t in r||(r={}))SM.call(r,t)&&MM(e,t,r[t]);if(TM)for(var t of TM(r))Kne.call(r,t)&&MM(e,t,r[t]);return e},Rg=(e,r)=>Xne(e,Jne(r));var qg=(e,r)=>()=>(e&&(r=e(e=0)),r);var N=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),eie=(e,r)=>{for(var t in r)B1(e,t,{get:r[t],enumerable:!0})},EM=(e,r,t,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of $ne(r))!SM.call(e,n)&&n!==t&&B1(e,n,{get:()=>r[n],enumerable:!(a=Zne(r,n))||a.enumerable});return e};var rie=(e,r,t)=>(t=e!=null?jne(Qne(e)):{},EM(r||!e||!e.__esModule?B1(t,"default",{value:e,enumerable:!0}):t,e)),tie=e=>EM(B1({},"__esModule",{value:!0}),e);var Pg=N(kM=>{"use strict";kM.version="3.5.0"});var LM=N((CM,Ng)=>{(function(r,t,a){t[r]=t[r]||a(),typeof Ng!="undefined"&&Ng.exports&&(Ng.exports=t[r])})("Promise",typeof window!="undefined"?window:CM,function(){"use strict";var r,t,a,n=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(T){return setImmediate(T)}:setTimeout;try{Object.defineProperty({},"x",{}),r=function(T,_,x,A){return Object.defineProperty(T,_,{value:x,writable:!0,configurable:A!==!1})}}catch(b){r=function(_,x,A){return _[x]=A,_}}a=function(){var T,_,x;function A(E,M){this.fn=E,this.self=M,this.next=void 0}return{add:function(M,k){x=new A(M,k),_?_.next=x:T=x,_=x,x=void 0},drain:function(){var M=T;for(T=_=t=void 0;M;)M.fn.call(M.self),M=M.next}}}();function o(b,T){a.add(b,T),t||(t=i(a.drain))}function l(b){var T,_=typeof b;return b!=null&&(_=="object"||_=="function")&&(T=b.then),typeof T=="function"?T:!1}function s(){for(var b=0;b<this.chain.length;b++)f(this,this.state===1?this.chain[b].success:this.chain[b].failure,this.chain[b]);this.chain.length=0}function f(b,T,_){var x,A;try{T===!1?_.reject(b.msg):(T===!0?x=b.msg:x=T.call(void 0,b.msg),x===_.promise?_.reject(TypeError("Promise-chain cycle")):(A=l(x))?A.call(x,_.resolve,_.reject):_.resolve(x))}catch(E){_.reject(E)}}function u(b){var T,_=this;if(!_.triggered){_.triggered=!0,_.def&&(_=_.def);try{(T=l(b))?o(function(){var x=new d(_);try{T.call(b,function(){u.apply(x,arguments)},function(){c.apply(x,arguments)})}catch(A){c.call(x,A)}}):(_.msg=b,_.state=1,_.chain.length>0&&o(s,_))}catch(x){c.call(new d(_),x)}}}function c(b){var T=this;T.triggered||(T.triggered=!0,T.def&&(T=T.def),T.msg=b,T.state=2,T.chain.length>0&&o(s,T))}function v(b,T,_,x){for(var A=0;A<T.length;A++)(function(M){b.resolve(T[M]).then(function(F){_(M,F)},x)})(A)}function d(b){this.def=b,this.triggered=!1}function p(b){this.promise=b,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function y(b){if(typeof b!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var T=new p(this);this.then=function(x,A){var E={success:typeof x=="function"?x:!0,failure:typeof A=="function"?A:!1};return E.promise=new this.constructor(function(k,F){if(typeof k!="function"||typeof F!="function")throw TypeError("Not a function");E.resolve=k,E.reject=F}),T.chain.push(E),T.state!==0&&o(s,T),E.promise},this.catch=function(x){return this.then(void 0,x)};try{b.call(void 0,function(x){u.call(T,x)},function(x){c.call(T,x)})}catch(_){c.call(T,_)}}var m=r({},"constructor",y,!1);return y.prototype=m,r(m,"__NPO__",0,!1),r(y,"resolve",function(T){var _=this;return T&&typeof T=="object"&&T.__NPO__===1?T:new _(function(A,E){if(typeof A!="function"||typeof E!="function")throw TypeError("Not a function");A(T)})}),r(y,"reject",function(T){return new this(function(x,A){if(typeof x!="function"||typeof A!="function")throw TypeError("Not a function");A(T)})}),r(y,"all",function(T){var _=this;return n.call(T)!="[object Array]"?_.reject(TypeError("Not an array")):T.length===0?_.resolve([]):new _(function(A,E){if(typeof A!="function"||typeof E!="function")throw TypeError("Not a function");var M=T.length,k=Array(M),F=0;v(_,T,function(O,R){k[O]=R,++F===M&&A(k)},E)})}),r(y,"race",function(T){var _=this;return n.call(T)!="[object Array]"?_.reject(TypeError("Not an array")):new _(function(A,E){if(typeof A!="function"||typeof E!="function")throw TypeError("Not a function");v(_,T,function(k,F){A(F)},E)})}),y})});var ha=N((LEe,Ig)=>{(function(){var e={version:"3.8.2"},r=[].slice,t=function(h){return r.call(h)},a=self.document;function n(h){return h&&(h.ownerDocument||h.document||h).documentElement}function i(h){return h&&(h.ownerDocument&&h.ownerDocument.defaultView||h.document&&h||h.defaultView)}if(a)try{t(a.documentElement.childNodes)[0].nodeType}catch(h){t=function(g){for(var w=g.length,C=new Array(w);w--;)C[w]=g[w];return C}}if(Date.now||(Date.now=function(){return+new Date}),a)try{a.createElement("DIV").style.setProperty("opacity",0,"")}catch(h){var o=this.Element.prototype,l=o.setAttribute,s=o.setAttributeNS,f=this.CSSStyleDeclaration.prototype,u=f.setProperty;o.setAttribute=function(g,w){l.call(this,g,w+"")},o.setAttributeNS=function(g,w,C){s.call(this,g,w,C+"")},f.setProperty=function(g,w,C){u.call(this,g,w+"",C)}}e.ascending=c;function c(h,g){return h<g?-1:h>g?1:h>=g?0:NaN}e.descending=function(h,g){return g<h?-1:g>h?1:g>=h?0:NaN},e.min=function(h,g){var w=-1,C=h.length,L,D;if(arguments.length===1){for(;++w<C;)if((D=h[w])!=null&&D>=D){L=D;break}for(;++w<C;)(D=h[w])!=null&&L>D&&(L=D)}else{for(;++w<C;)if((D=g.call(h,h[w],w))!=null&&D>=D){L=D;break}for(;++w<C;)(D=g.call(h,h[w],w))!=null&&L>D&&(L=D)}return L},e.max=function(h,g){var w=-1,C=h.length,L,D;if(arguments.length===1){for(;++w<C;)if((D=h[w])!=null&&D>=D){L=D;break}for(;++w<C;)(D=h[w])!=null&&D>L&&(L=D)}else{for(;++w<C;)if((D=g.call(h,h[w],w))!=null&&D>=D){L=D;break}for(;++w<C;)(D=g.call(h,h[w],w))!=null&&D>L&&(L=D)}return L},e.extent=function(h,g){var w=-1,C=h.length,L,D,G;if(arguments.length===1){for(;++w<C;)if((D=h[w])!=null&&D>=D){L=G=D;break}for(;++w<C;)(D=h[w])!=null&&(L>D&&(L=D),G<D&&(G=D))}else{for(;++w<C;)if((D=g.call(h,h[w],w))!=null&&D>=D){L=G=D;break}for(;++w<C;)(D=g.call(h,h[w],w))!=null&&(L>D&&(L=D),G<D&&(G=D))}return[L,G]};function v(h){return h===null?NaN:+h}function d(h){return!isNaN(h)}e.sum=function(h,g){var w=0,C=h.length,L,D=-1;if(arguments.length===1)for(;++D<C;)d(L=+h[D])&&(w+=L);else for(;++D<C;)d(L=+g.call(h,h[D],D))&&(w+=L);return w},e.mean=function(h,g){var w=0,C=h.length,L,D=-1,G=C;if(arguments.length===1)for(;++D<C;)d(L=v(h[D]))?w+=L:--G;else for(;++D<C;)d(L=v(g.call(h,h[D],D)))?w+=L:--G;if(G)return w/G},e.quantile=function(h,g){var w=(h.length-1)*g+1,C=Math.floor(w),L=+h[C-1],D=w-C;return D?L+D*(h[C]-L):L},e.median=function(h,g){var w=[],C=h.length,L,D=-1;if(arguments.length===1)for(;++D<C;)d(L=v(h[D]))&&w.push(L);else for(;++D<C;)d(L=v(g.call(h,h[D],D)))&&w.push(L);if(w.length)return e.quantile(w.sort(c),.5)},e.variance=function(h,g){var w=h.length,C=0,L,D,G=0,q=-1,Z=0;if(arguments.length===1)for(;++q<w;)d(L=v(h[q]))&&(D=L-C,C+=D/++Z,G+=D*(L-C));else for(;++q<w;)d(L=v(g.call(h,h[q],q)))&&(D=L-C,C+=D/++Z,G+=D*(L-C));if(Z>1)return G/(Z-1)},e.deviation=function(){var h=e.variance.apply(this,arguments);return h&&Math.sqrt(h)};function p(h){return{left:function(g,w,C,L){for(arguments.length<3&&(C=0),arguments.length<4&&(L=g.length);C<L;){var D=C+L>>>1;h(g[D],w)<0?C=D+1:L=D}return C},right:function(g,w,C,L){for(arguments.length<3&&(C=0),arguments.length<4&&(L=g.length);C<L;){var D=C+L>>>1;h(g[D],w)>0?L=D:C=D+1}return C}}}var y=p(c);e.bisectLeft=y.left,e.bisect=e.bisectRight=y.right,e.bisector=function(h){return p(h.length===1?function(g,w){return c(h(g),w)}:h)},e.shuffle=function(h,g,w){(C=arguments.length)<3&&(w=h.length,C<2&&(g=0));for(var C=w-g,L,D;C;)D=Math.random()*C--|0,L=h[C+g],h[C+g]=h[D+g],h[D+g]=L;return h},e.permute=function(h,g){for(var w=g.length,C=new Array(w);w--;)C[w]=h[g[w]];return C},e.pairs=function(h){for(var g=0,w=h.length-1,C,L=h[0],D=new Array(w<0?0:w);g<w;)D[g]=[C=L,L=h[++g]];return D},e.transpose=function(h){if(!(D=h.length))return[];for(var g=-1,w=e.min(h,m),C=new Array(w);++g<w;)for(var L=-1,D,G=C[g]=new Array(D);++L<D;)G[L]=h[L][g];return C};function m(h){return h.length}e.zip=function(){return e.transpose(arguments)},e.keys=function(h){var g=[];for(var w in h)g.push(w);return g},e.values=function(h){var g=[];for(var w in h)g.push(h[w]);return g},e.entries=function(h){var g=[];for(var w in h)g.push({key:w,value:h[w]});return g},e.merge=function(h){for(var g=h.length,w,C=-1,L=0,D,G;++C<g;)L+=h[C].length;for(D=new Array(L);--g>=0;)for(G=h[g],w=G.length;--w>=0;)D[--L]=G[w];return D};var b=Math.abs;e.range=function(h,g,w){if(arguments.length<3&&(w=1,arguments.length<2&&(g=h,h=0)),(g-h)/w===1/0)throw new Error("infinite range");var C=[],L=T(b(w)),D=-1,G;if(h*=L,g*=L,w*=L,w<0)for(;(G=h+w*++D)>g;)C.push(G/L);else for(;(G=h+w*++D)<g;)C.push(G/L);return C};function T(h){for(var g=1;h*g%1;)g*=10;return g}function _(h,g){for(var w in g)Object.defineProperty(h.prototype,w,{value:g[w],enumerable:!1})}e.map=function(h,g){var w=new x;if(h instanceof x)h.forEach(function(q,Z){w.set(q,Z)});else if(Array.isArray(h)){var C=-1,L=h.length,D;if(arguments.length===1)for(;++C<L;)w.set(C,h[C]);else for(;++C<L;)w.set(g.call(h,D=h[C],C),D)}else for(var G in h)w.set(G,h[G]);return w};function x(){this._=Object.create(null)}var A="__proto__",E="\0";_(x,{has:F,get:function(h){return this._[M(h)]},set:function(h,g){return this._[M(h)]=g},remove:P,keys:O,values:function(){var h=[];for(var g in this._)h.push(this._[g]);return h},entries:function(){var h=[];for(var g in this._)h.push({key:k(g),value:this._[g]});return h},size:R,empty:H,forEach:function(h){for(var g in this._)h.call(this,k(g),this._[g])}});function M(h){return(h+="")===A||h[0]===E?E+h:h}function k(h){return(h+="")[0]===E?h.slice(1):h}function F(h){return M(h)in this._}function P(h){return(h=M(h))in this._&&delete this._[h]}function O(){var h=[];for(var g in this._)h.push(k(g));return h}function R(){var h=0;for(var g in this._)++h;return h}function H(){for(var h in this._)return!1;return!0}e.nest=function(){var h={},g=[],w=[],C,L;function D(q,Z,ie){if(ie>=g.length)return L?L.call(h,Z):C?Z.sort(C):Z;for(var le=-1,ye=Z.length,ge=g[ie++],je,Qe,Me,Fe=new x,Ge;++le<ye;)(Ge=Fe.get(je=ge(Qe=Z[le])))?Ge.push(Qe):Fe.set(je,[Qe]);return q?(Qe=q(),Me=function(er,rr){Qe.set(er,D(q,rr,ie))}):(Qe={},Me=function(er,rr){Qe[er]=D(q,rr,ie)}),Fe.forEach(Me),Qe}function G(q,Z){if(Z>=g.length)return q;var ie=[],le=w[Z++];return q.forEach(function(ye,ge){ie.push({key:ye,values:G(ge,Z)})}),le?ie.sort(function(ye,ge){return le(ye.key,ge.key)}):ie}return h.map=function(q,Z){return D(Z,q,0)},h.entries=function(q){return G(D(e.map,q,0),0)},h.key=function(q){return g.push(q),h},h.sortKeys=function(q){return w[g.length-1]=q,h},h.sortValues=function(q){return C=q,h},h.rollup=function(q){return L=q,h},h},e.set=function(h){var g=new V;if(h)for(var w=0,C=h.length;w<C;++w)g.add(h[w]);return g};function V(){this._=Object.create(null)}_(V,{has:F,add:function(h){return this._[M(h+="")]=!0,h},remove:P,values:O,size:R,empty:H,forEach:function(h){for(var g in this._)h.call(this,k(g))}}),e.behavior={};function ae(h){return h}e.rebind=function(h,g){for(var w=1,C=arguments.length,L;++w<C;)h[L=arguments[w]]=re(h,g,g[L]);return h};function re(h,g,w){return function(){var C=w.apply(g,arguments);return C===g?h:C}}function Q(h,g){if(g in h)return g;g=g.charAt(0).toUpperCase()+g.slice(1);for(var w=0,C=J.length;w<C;++w){var L=J[w]+g;if(L in h)return L}}var J=["webkit","ms","moz","Moz","o","O"];function j(){}e.dispatch=function(){for(var h=new oe,g=-1,w=arguments.length;++g<w;)h[arguments[g]]=se(h);return h};function oe(){}oe.prototype.on=function(h,g){var w=h.indexOf("."),C="";if(w>=0&&(C=h.slice(w+1),h=h.slice(0,w)),h)return arguments.length<2?this[h].on(C):this[h].on(C,g);if(arguments.length===2){if(g==null)for(h in this)this.hasOwnProperty(h)&&this[h].on(C,null);return this}};function se(h){var g=[],w=new x;function C(){for(var L=g,D=-1,G=L.length,q;++D<G;)(q=L[D].on)&&q.apply(this,arguments);return h}return C.on=function(L,D){var G=w.get(L),q;return arguments.length<2?G&&G.on:(G&&(G.on=null,g=g.slice(0,q=g.indexOf(G)).concat(g.slice(q+1)),w.remove(L)),D&&g.push(w.set(L,{on:D})),h)},C}e.event=null;function Le(){e.event.preventDefault()}function Ue(){for(var h=e.event,g;g=h.sourceEvent;)h=g;return h}function Ee(h){for(var g=new oe,w=0,C=arguments.length;++w<C;)g[arguments[w]]=se(g);return g.of=function(L,D){return function(G){try{var q=G.sourceEvent=e.event;G.target=h,e.event=G,g[G.type].apply(L,D)}finally{e.event=q}}},g}e.requote=function(h){return h.replace(Ve,"\\$&")};var Ve=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,we={}.__proto__?function(h,g){h.__proto__=g}:function(h,g){for(var w in g)h[w]=g[w]};function ur(h){return we(h,$e),h}var Oe=function(h,g){return g.querySelector(h)},He=function(h,g){return g.querySelectorAll(h)},vr=function(h,g){var w=h.matches||h[Q(h,"matchesSelector")];return vr=function(C,L){return w.call(C,L)},vr(h,g)};typeof Sizzle=="function"&&(Oe=function(h,g){return Sizzle(h,g)[0]||null},He=Sizzle,vr=Sizzle.matchesSelector),e.selection=function(){return e.select(a.documentElement)};var $e=e.selection.prototype=[];$e.select=function(h){var g=[],w,C,L,D;h=ee(h);for(var G=-1,q=this.length;++G<q;){g.push(w=[]),w.parentNode=(L=this[G]).parentNode;for(var Z=-1,ie=L.length;++Z<ie;)(D=L[Z])?(w.push(C=h.call(D,D.__data__,Z,G)),C&&"__data__"in D&&(C.__data__=D.__data__)):w.push(null)}return ur(g)};function ee(h){return typeof h=="function"?h:function(){return Oe(h,this)}}$e.selectAll=function(h){var g=[],w,C;h=de(h);for(var L=-1,D=this.length;++L<D;)for(var G=this[L],q=-1,Z=G.length;++q<Z;)(C=G[q])&&(g.push(w=t(h.call(C,C.__data__,q,L))),w.parentNode=C);return ur(g)};function de(h){return typeof h=="function"?h:function(){return He(h,this)}}var ne="http://www.w3.org/1999/xhtml",qe={svg:"http://www.w3.org/2000/svg",xhtml:ne,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:qe,qualify:function(h){var g=h.indexOf(":"),w=h;return g>=0&&(w=h.slice(0,g))!=="xmlns"&&(h=h.slice(g+1)),qe.hasOwnProperty(w)?{space:qe[w],local:h}:h}},$e.attr=function(h,g){if(arguments.length<2){if(typeof h=="string"){var w=this.node();return h=e.ns.qualify(h),h.local?w.getAttributeNS(h.space,h.local):w.getAttribute(h)}for(g in h)this.each(Je(g,h[g]));return this}return this.each(Je(h,g))};function Je(h,g){h=e.ns.qualify(h);function w(){this.removeAttribute(h)}function C(){this.removeAttributeNS(h.space,h.local)}function L(){this.setAttribute(h,g)}function D(){this.setAttributeNS(h.space,h.local,g)}function G(){var Z=g.apply(this,arguments);Z==null?this.removeAttribute(h):this.setAttribute(h,Z)}function q(){var Z=g.apply(this,arguments);Z==null?this.removeAttributeNS(h.space,h.local):this.setAttributeNS(h.space,h.local,Z)}return g==null?h.local?C:w:typeof g=="function"?h.local?q:G:h.local?D:L}function Ke(h){return h.trim().replace(/\s+/g," ")}$e.classed=function(h,g){if(arguments.length<2){if(typeof h=="string"){var w=this.node(),C=(h=Er(h)).length,L=-1;if(g=w.classList){for(;++L<C;)if(!g.contains(h[L]))return!1}else for(g=w.getAttribute("class");++L<C;)if(!Sr(h[L]).test(g))return!1;return!0}for(g in h)this.each(br(g,h[g]));return this}return this.each(br(h,g))};function Sr(h){return new RegExp("(?:^|\\s+)"+e.requote(h)+"(?:\\s+|$)","g")}function Er(h){return(h+"").trim().split(/^|\s+/)}function br(h,g){h=Er(h).map(zr);var w=h.length;function C(){for(var D=-1;++D<w;)h[D](this,g)}function L(){for(var D=-1,G=g.apply(this,arguments);++D<w;)h[D](this,G)}return typeof g=="function"?L:C}function zr(h){var g=Sr(h);return function(w,C){if(L=w.classList)return C?L.add(h):L.remove(h);var L=w.getAttribute("class")||"";C?(g.lastIndex=0,g.test(L)||w.setAttribute("class",Ke(L+" "+h))):w.setAttribute("class",Ke(L.replace(g," ")))}}$e.style=function(h,g,w){var C=arguments.length;if(C<3){if(typeof h!="string"){C<2&&(g="");for(w in h)this.each(Vr(w,h[w],g));return this}if(C<2){var L=this.node();return i(L).getComputedStyle(L,null).getPropertyValue(h)}w=""}return this.each(Vr(h,g,w))};function Vr(h,g,w){function C(){this.style.removeProperty(h)}function L(){this.style.setProperty(h,g,w)}function D(){var G=g.apply(this,arguments);G==null?this.style.removeProperty(h):this.style.setProperty(h,G,w)}return g==null?C:typeof g=="function"?D:L}$e.property=function(h,g){if(arguments.length<2){if(typeof h=="string")return this.node()[h];for(g in h)this.each(at(g,h[g]));return this}return this.each(at(h,g))};function at(h,g){function w(){delete this[h]}function C(){this[h]=g}function L(){var D=g.apply(this,arguments);D==null?delete this[h]:this[h]=D}return g==null?w:typeof g=="function"?L:C}$e.text=function(h){return arguments.length?this.each(typeof h=="function"?function(){var g=h.apply(this,arguments);this.textContent=g==null?"":g}:h==null?function(){this.textContent=""}:function(){this.textContent=h}):this.node().textContent},$e.html=function(h){return arguments.length?this.each(typeof h=="function"?function(){var g=h.apply(this,arguments);this.innerHTML=g==null?"":g}:h==null?function(){this.innerHTML=""}:function(){this.innerHTML=h}):this.node().innerHTML},$e.append=function(h){return h=wr(h),this.select(function(){return this.appendChild(h.apply(this,arguments))})};function wr(h){function g(){var C=this.ownerDocument,L=this.namespaceURI;return L===ne&&C.documentElement.namespaceURI===ne?C.createElement(h):C.createElementNS(L,h)}function w(){return this.ownerDocument.createElementNS(h.space,h.local)}return typeof h=="function"?h:(h=e.ns.qualify(h)).local?w:g}$e.insert=function(h,g){return h=wr(h),g=ee(g),this.select(function(){return this.insertBefore(h.apply(this,arguments),g.apply(this,arguments)||null)})},$e.remove=function(){return this.each(Yr)};function Yr(){var h=this.parentNode;h&&h.removeChild(this)}$e.data=function(h,g){var w=-1,C=this.length,L,D;if(!arguments.length){for(h=new Array(C=(L=this[0]).length);++w<C;)(D=L[w])&&(h[w]=D.__data__);return h}function G(le,ye){var ge,je=le.length,Qe=ye.length,Me=Math.min(je,Qe),Fe=new Array(Qe),Ge=new Array(Qe),er=new Array(je),rr,De;if(g){var Fr=new x,Br=new Array(je),nt;for(ge=-1;++ge<je;)(rr=le[ge])&&(Fr.has(nt=g.call(rr,rr.__data__,ge))?er[ge]=rr:Fr.set(nt,rr),Br[ge]=nt);for(ge=-1;++ge<Qe;)(rr=Fr.get(nt=g.call(ye,De=ye[ge],ge)))?rr!==!0&&(Fe[ge]=rr,rr.__data__=De):Ge[ge]=Kr(De),Fr.set(nt,!0);for(ge=-1;++ge<je;)ge in Br&&Fr.get(Br[ge])!==!0&&(er[ge]=le[ge])}else{for(ge=-1;++ge<Me;)rr=le[ge],De=ye[ge],rr?(rr.__data__=De,Fe[ge]=rr):Ge[ge]=Kr(De);for(;ge<Qe;++ge)Ge[ge]=Kr(ye[ge]);for(;ge<je;++ge)er[ge]=le[ge]}Ge.update=Fe,Ge.parentNode=Fe.parentNode=er.parentNode=le.parentNode,q.push(Ge),Z.push(Fe),ie.push(er)}var q=kt([]),Z=ur([]),ie=ur([]);if(typeof h=="function")for(;++w<C;)G(L=this[w],h.call(L,L.parentNode.__data__,w));else for(;++w<C;)G(L=this[w],h);return Z.enter=function(){return q},Z.exit=function(){return ie},Z};function Kr(h){return{__data__:h}}$e.datum=function(h){return arguments.length?this.property("__data__",h):this.property("__data__")},$e.filter=function(h){var g=[],w,C,L;typeof h!="function"&&(h=Pe(h));for(var D=0,G=this.length;D<G;D++){g.push(w=[]),w.parentNode=(C=this[D]).parentNode;for(var q=0,Z=C.length;q<Z;q++)(L=C[q])&&h.call(L,L.__data__,q,D)&&w.push(L)}return ur(g)};function Pe(h){return function(){return vr(this,h)}}$e.order=function(){for(var h=-1,g=this.length;++h<g;)for(var w=this[h],C=w.length-1,L=w[C],D;--C>=0;)(D=w[C])&&(L&&L!==D.nextSibling&&L.parentNode.insertBefore(D,L),L=D);return this},$e.sort=function(h){h=or.apply(this,arguments);for(var g=-1,w=this.length;++g<w;)this[g].sort(h);return this.order()};function or(h){return arguments.length||(h=c),function(g,w){return g&&w?h(g.__data__,w.__data__):!g-!w}}$e.each=function(h){return st(this,function(g,w,C){h.call(g,g.__data__,w,C)})};function st(h,g){for(var w=0,C=h.length;w<C;w++)for(var L=h[w],D=0,G=L.length,q;D<G;D++)(q=L[D])&&g(q,D,w);return h}$e.call=function(h){var g=t(arguments);return h.apply(g[0]=this,g),this},$e.empty=function(){return!this.node()},$e.node=function(){for(var h=0,g=this.length;h<g;h++)for(var w=this[h],C=0,L=w.length;C<L;C++){var D=w[C];if(D)return D}return null},$e.size=function(){var h=0;return st(this,function(){++h}),h};function kt(h){return we(h,Ar),h}var Ar=[];e.selection.enter=kt,e.selection.enter.prototype=Ar,Ar.append=$e.append,Ar.empty=$e.empty,Ar.node=$e.node,Ar.call=$e.call,Ar.size=$e.size,Ar.select=function(h){for(var g=[],w,C,L,D,G,q=-1,Z=this.length;++q<Z;){L=(D=this[q]).update,g.push(w=[]),w.parentNode=D.parentNode;for(var ie=-1,le=D.length;++ie<le;)(G=D[ie])?(w.push(L[ie]=C=h.call(D.parentNode,G.__data__,ie,q)),C.__data__=G.__data__):w.push(null)}return ur(g)},Ar.insert=function(h,g){return arguments.length<2&&(g=ar(this)),$e.insert.call(this,h,g)};function ar(h){var g,w;return function(C,L,D){var G=h[D].update,q=G.length,Z;for(D!=w&&(w=D,g=0),L>=g&&(g=L+1);!(Z=G[g])&&++g<q;);return Z}}e.select=function(h){var g;return typeof h=="string"?(g=[Oe(h,a)],g.parentNode=a.documentElement):(g=[h],g.parentNode=n(h)),ur([g])},e.selectAll=function(h){var g;return typeof h=="string"?(g=t(He(h,a)),g.parentNode=a.documentElement):(g=t(h),g.parentNode=null),ur([g])},$e.on=function(h,g,w){var C=arguments.length;if(C<3){if(typeof h!="string"){C<2&&(g=!1);for(w in h)this.each(fr(w,h[w],g));return this}if(C<2)return(C=this.node()["__on"+h])&&C._;w=!1}return this.each(fr(h,g,w))};function fr(h,g,w){var C="__on"+h,L=h.indexOf("."),D=ot;L>0&&(h=h.slice(0,L));var G=Hr.get(h);G&&(h=G,D=et);function q(){var le=this[C];le&&(this.removeEventListener(h,le,le.$),delete this[C])}function Z(){var le=D(g,t(arguments));q.call(this),this.addEventListener(h,this[C]=le,le.$=w),le._=g}function ie(){var le=new RegExp("^__on([^.]+)"+e.requote(h)+"$"),ye;for(var ge in this)if(ye=ge.match(le)){var je=this[ge];this.removeEventListener(ye[1],je,je.$),delete this[ge]}}return L?g?Z:q:g?j:ie}var Hr=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});a&&Hr.forEach(function(h){"on"+h in a&&Hr.remove(h)});function ot(h,g){return function(w){var C=e.event;e.event=w,g[0]=this.__data__;try{h.apply(this,g)}finally{e.event=C}}}function et(h,g){var w=ot(h,g);return function(C){var L=this,D=C.relatedTarget;(!D||D!==L&&!(D.compareDocumentPosition(L)&8))&&w.call(L,C)}}var rt,xt=0;function Wr(h){var g=".dragsuppress-"+ ++xt,w="click"+g,C=e.select(i(h)).on("touchmove"+g,Le).on("dragstart"+g,Le).on("selectstart"+g,Le);if(rt==null&&(rt="onselectstart"in h?!1:Q(h.style,"userSelect")),rt){var L=n(h).style,D=L[rt];L[rt]="none"}return function(G){if(C.on(g,null),rt&&(L[rt]=D),G){var q=function(){C.on(w,null)};C.on(w,function(){Le(),q()},!0),setTimeout(q,0)}}}e.mouse=function(h){return pr(h,Ue())};var it=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function pr(h,g){g.changedTouches&&(g=g.changedTouches[0]);var w=h.ownerSVGElement||h;if(w.createSVGPoint){var C=w.createSVGPoint();if(it<0){var L=i(h);if(L.scrollX||L.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();it=!(D.f||D.e),w.remove()}}return it?(C.x=g.pageX,C.y=g.pageY):(C.x=g.clientX,C.y=g.clientY),C=C.matrixTransform(h.getScreenCTM().inverse()),[C.x,C.y]}var G=h.getBoundingClientRect();return[g.clientX-G.left-h.clientLeft,g.clientY-G.top-h.clientTop]}e.touch=function(h,g,w){if(arguments.length<3&&(w=g,g=Ue().changedTouches),g){for(var C=0,L=g.length,D;C<L;++C)if((D=g[C]).identifier===w)return pr(h,D)}},e.behavior.drag=function(){var h=Ee(L,"drag","dragstart","dragend"),g=null,w=D(j,e.mouse,i,"mousemove","mouseup"),C=D(Se,e.touch,ae,"touchmove","touchend");function L(){this.on("mousedown.drag",w).on("touchstart.drag",C)}function D(G,q,Z,ie,le){return function(){var ye=this,ge=e.event.target.correspondingElement||e.event.target,je=ye.parentNode,Qe=h.of(ye,arguments),Me=0,Fe=G(),Ge=".drag"+(Fe==null?"":"-"+Fe),er,rr=e.select(Z(ge)).on(ie+Ge,Br).on(le+Ge,nt),De=Wr(ge),Fr=q(je,Fe);g?(er=g.apply(ye,arguments),er=[er.x-Fr[0],er.y-Fr[1]]):er=[0,0],Qe({type:"dragstart"});function Br(){var yt=q(je,Fe),Ct,Lt;yt&&(Ct=yt[0]-Fr[0],Lt=yt[1]-Fr[1],Me|=Ct|Lt,Fr=yt,Qe({type:"drag",x:yt[0]+er[0],y:yt[1]+er[1],dx:Ct,dy:Lt}))}function nt(){q(je,Fe)&&(rr.on(ie+Ge,null).on(le+Ge,null),De(Me),Qe({type:"dragend"}))}}}return L.origin=function(G){return arguments.length?(g=G,L):g},e.rebind(L,h,"on")};function Se(){return e.event.changedTouches[0].identifier}e.touches=function(h,g){return arguments.length<2&&(g=Ue().touches),g?t(g).map(function(w){var C=pr(h,w);return C.identifier=w.identifier,C}):[]};var Ie=1e-6,mr=Ie*Ie,_r=Math.PI,ht=2*_r,Mt=ht-Ie,wt=_r/2,Nt=_r/180,ta=180/_r;function pa(h){return h>0?1:h<0?-1:0}function za(h,g,w){return(g[0]-h[0])*(w[1]-h[1])-(g[1]-h[1])*(w[0]-h[0])}function rn(h){return h>1?0:h<-1?_r:Math.acos(h)}function Wa(h){return h>1?wt:h<-1?-wt:Math.asin(h)}function Cn(h){return((h=Math.exp(h))-1/h)/2}function _n(h){return((h=Math.exp(h))+1/h)/2}function Si(h){return((h=Math.exp(2*h))-1)/(h+1)}function un(h){return(h=Math.sin(h/2))*h}var Bn=Math.SQRT2,Ei=2,Ln=4;e.interpolateZoom=function(h,g){var w=h[0],C=h[1],L=h[2],D=g[0],G=g[1],q=g[2],Z=D-w,ie=G-C,le=Z*Z+ie*ie,ye,ge;if(le<mr)ge=Math.log(q/L)/Bn,ye=function(er){return[w+er*Z,C+er*ie,L*Math.exp(Bn*er*ge)]};else{var je=Math.sqrt(le),Qe=(q*q-L*L+Ln*le)/(2*L*Ei*je),Me=(q*q-L*L-Ln*le)/(2*q*Ei*je),Fe=Math.log(Math.sqrt(Qe*Qe+1)-Qe),Ge=Math.log(Math.sqrt(Me*Me+1)-Me);ge=(Ge-Fe)/Bn,ye=function(er){var rr=er*ge,De=_n(Fe),Fr=L/(Ei*je)*(De*Si(Bn*rr+Fe)-Cn(Fe));return[w+Fr*Z,C+Fr*ie,L*De/_n(Bn*rr+Fe)]}}return ye.duration=ge*1e3,ye},e.behavior.zoom=function(){var h={x:0,y:0,k:1},g,w,C,L=[960,500],D=mn,G=250,q=0,Z="mousedown.zoom",ie="mousemove.zoom",le="mouseup.zoom",ye,ge="touchstart.zoom",je,Qe=Ee(rr,"zoomstart","zoom","zoomend"),Me,Fe,Ge,er;Ia||(Ia="onwheel"in a?(At=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in a?(At=function(){return e.event.wheelDelta},"mousewheel"):(At=function(){return-e.event.detail},"MozMousePixelScroll"));function rr(dt){dt.on(Z,It).on(Ia+".zoom",gn).on("dblclick.zoom",La).on(ge,ya)}rr.event=function(dt){dt.each(function(){var Yt=Qe.of(this,arguments),jt=h;yl?e.select(this).transition().each("start.zoom",function(){h=this.__chart__||{x:0,y:0,k:1},Lt(Yt)}).tween("zoom:zoom",function(){var ua=L[0],ja=L[1],Dn=w?w[0]:ua/2,Qn=w?w[1]:ja/2,Kn=e.interpolateZoom([(Dn-h.x)/h.k,(Qn-h.y)/h.k,ua/h.k],[(Dn-jt.x)/jt.k,(Qn-jt.y)/jt.k,ua/jt.k]);return function(Ri){var S=Kn(Ri),B=ua/S[2];this.__chart__=h={x:Dn-S[0]*B,y:Qn-S[1]*B,k:B},Vt(Yt)}}).each("interrupt.zoom",function(){Rt(Yt)}).each("end.zoom",function(){Rt(Yt)}):(this.__chart__=h,Lt(Yt),Vt(Yt),Rt(Yt))})},rr.translate=function(dt){return arguments.length?(h={x:+dt[0],y:+dt[1],k:h.k},Ct(),rr):[h.x,h.y]},rr.scale=function(dt){return arguments.length?(h={x:h.x,y:h.y,k:null},Br(+dt),Ct(),rr):h.k},rr.scaleExtent=function(dt){return arguments.length?(D=dt==null?mn:[+dt[0],+dt[1]],rr):D},rr.center=function(dt){return arguments.length?(C=dt&&[+dt[0],+dt[1]],rr):C},rr.size=function(dt){return arguments.length?(L=dt&&[+dt[0],+dt[1]],rr):L},rr.duration=function(dt){return arguments.length?(G=+dt,rr):G},rr.x=function(dt){return arguments.length?(Fe=dt,Me=dt.copy(),h={x:0,y:0,k:1},rr):Fe},rr.y=function(dt){return arguments.length?(er=dt,Ge=dt.copy(),h={x:0,y:0,k:1},rr):er};function De(dt){return[(dt[0]-h.x)/h.k,(dt[1]-h.y)/h.k]}function Fr(dt){return[dt[0]*h.k+h.x,dt[1]*h.k+h.y]}function Br(dt){h.k=Math.max(D[0],Math.min(D[1],dt))}function nt(dt,Yt){Yt=Fr(Yt),h.x+=dt[0]-Yt[0],h.y+=dt[1]-Yt[1]}function yt(dt,Yt,jt,ua){dt.__chart__={x:h.x,y:h.y,k:h.k},Br(Math.pow(2,ua)),nt(w=Yt,jt),dt=e.select(dt),G>0&&(dt=dt.transition().duration(G)),dt.call(rr.event)}function Ct(){Fe&&Fe.domain(Me.range().map(function(dt){return(dt-h.x)/h.k}).map(Me.invert)),er&&er.domain(Ge.range().map(function(dt){return(dt-h.y)/h.k}).map(Ge.invert))}function Lt(dt){q++||dt({type:"zoomstart"})}function Vt(dt){Ct(),dt({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function Rt(dt){--q||(dt({type:"zoomend"}),w=null)}function It(){var dt=this,Yt=Qe.of(dt,arguments),jt=0,ua=e.select(i(dt)).on(ie,Qn).on(le,Kn),ja=De(e.mouse(dt)),Dn=Wr(dt);Lc.call(dt),Lt(Yt);function Qn(){jt=1,nt(e.mouse(dt),ja),Vt(Yt)}function Kn(){ua.on(ie,null).on(le,null),Dn(jt),Rt(Yt)}}function ya(){var dt=this,Yt=Qe.of(dt,arguments),jt={},ua=0,ja,Dn=".zoom-"+e.event.changedTouches[0].identifier,Qn="touchmove"+Dn,Kn="touchend"+Dn,Ri=[],S=e.select(dt),B=Wr(dt);he(),Lt(Yt),S.on(Z,null).on(ge,he);function Y(){var _e=e.touches(dt);return ja=h.k,_e.forEach(function(Ye){Ye.identifier in jt&&(jt[Ye.identifier]=De(Ye))}),_e}function he(){var _e=e.event.target;e.select(_e).on(Qn,xe).on(Kn,Ae),Ri.push(_e);for(var Ye=e.event.changedTouches,ir=0,nr=Ye.length;ir<nr;++ir)jt[Ye[ir].identifier]=null;var lr=Y(),Jr=Date.now();if(lr.length===1){if(Jr-je<500){var Rr=lr[0];yt(dt,Rr,jt[Rr.identifier],Math.floor(Math.log(h.k)/Math.LN2)+1),Le()}je=Jr}else if(lr.length>1){var Rr=lr[0],gr=lr[1],Ne=Rr[0]-gr[0],ue=Rr[1]-gr[1];ua=Ne*Ne+ue*ue}}function xe(){var _e=e.touches(dt),Ye,ir,nr,lr;Lc.call(dt);for(var Jr=0,Rr=_e.length;Jr<Rr;++Jr,lr=null)if(nr=_e[Jr],lr=jt[nr.identifier]){if(ir)break;Ye=nr,ir=lr}if(lr){var gr=(gr=nr[0]-Ye[0])*gr+(gr=nr[1]-Ye[1])*gr,Ne=ua&&Math.sqrt(gr/ua);Ye=[(Ye[0]+nr[0])/2,(Ye[1]+nr[1])/2],ir=[(ir[0]+lr[0])/2,(ir[1]+lr[1])/2],Br(Ne*ja)}je=null,nt(Ye,ir),Vt(Yt)}function Ae(){if(e.event.touches.length){for(var _e=e.event.changedTouches,Ye=0,ir=_e.length;Ye<ir;++Ye)delete jt[_e[Ye].identifier];for(var nr in jt)return void Y()}e.selectAll(Ri).on(Dn,null),S.on(Z,It).on(ge,ya),B(),Rt(Yt)}}function gn(){var dt=Qe.of(this,arguments);ye?clearTimeout(ye):(Lc.call(this),g=De(w=C||e.mouse(this)),Lt(dt)),ye=setTimeout(function(){ye=null,Rt(dt)},50),Le(),Br(Math.pow(2,At()*.002)*h.k),nt(w,g),Vt(dt)}function La(){var dt=e.mouse(this),Yt=Math.log(h.k)/Math.LN2;yt(this,dt,De(dt),e.event.shiftKey?Math.ceil(Yt)-1:Math.floor(Yt)+1)}return e.rebind(rr,Qe,"on")};var mn=[0,1/0],At,Ia;e.color=ma;function ma(){}ma.prototype.toString=function(){return this.rgb()+""},e.hsl=Sa;function Sa(h,g,w){return this instanceof Sa?(this.h=+h,this.s=+g,void(this.l=+w)):arguments.length<2?h instanceof Sa?new Sa(h.h,h.s,h.l):$t(""+h,fa,Sa):new Sa(h,g,w)}var yn=Sa.prototype=new ma;yn.brighter=function(h){return h=Math.pow(.7,arguments.length?h:1),new Sa(this.h,this.s,this.l/h)},yn.darker=function(h){return h=Math.pow(.7,arguments.length?h:1),new Sa(this.h,this.s,h*this.l)},yn.rgb=function(){return Fa(this.h,this.s,this.l)};function Fa(h,g,w){var C,L;h=isNaN(h)?0:(h%=360)<0?h+360:h,g=isNaN(g)||g<0?0:g>1?1:g,w=w<0?0:w>1?1:w,L=w<=.5?w*(1+g):w+g-w*g,C=2*w-L;function D(q){return q>360?q-=360:q<0&&(q+=360),q<60?C+(L-C)*q/60:q<180?L:q<240?C+(L-C)*(240-q)/60:C}function G(q){return Math.round(D(q)*255)}return new di(G(h+120),G(h),G(h-120))}e.hcl=va;function va(h,g,w){return this instanceof va?(this.h=+h,this.c=+g,void(this.l=+w)):arguments.length<2?h instanceof va?new va(h.h,h.c,h.l):h instanceof Pn?zo(h.l,h.a,h.b):zo((h=_t((h=e.rgb(h)).r,h.g,h.b)).l,h.a,h.b):new va(h,g,w)}var hi=va.prototype=new ma;hi.brighter=function(h){return new va(this.h,this.c,Math.min(100,this.l+Ya*(arguments.length?h:1)))},hi.darker=function(h){return new va(this.h,this.c,Math.max(0,this.l-Ya*(arguments.length?h:1)))},hi.rgb=function(){return Xi(this.h,this.c,this.l).rgb()};function Xi(h,g,w){return isNaN(h)&&(h=0),isNaN(g)&&(g=0),new Pn(w,Math.cos(h*=Nt)*g,Math.sin(h)*g)}e.lab=Pn;function Pn(h,g,w){return this instanceof Pn?(this.l=+h,this.a=+g,void(this.b=+w)):arguments.length<2?h instanceof Pn?new Pn(h.l,h.a,h.b):h instanceof va?Xi(h.h,h.c,h.l):_t((h=di(h)).r,h.g,h.b):new Pn(h,g,w)}var Ya=18,wn=.95047,ki=1,vs=1.08883,Ll=Pn.prototype=new ma;Ll.brighter=function(h){return new Pn(Math.min(100,this.l+Ya*(arguments.length?h:1)),this.a,this.b)},Ll.darker=function(h){return new Pn(Math.max(0,this.l-Ya*(arguments.length?h:1)),this.a,this.b)},Ll.rgb=function(){return tc(this.l,this.a,this.b)};function tc(h,g,w){var C=(h+16)/116,L=C+g/500,D=C-w/200;return L=$f(L)*wn,C=$f(C)*ki,D=$f(D)*vs,new di(Zi(3.2404542*L-1.5371385*C-.4985314*D),Zi(-.969266*L+1.8760108*C+.041556*D),Zi(.0556434*L-.2040259*C+1.0572252*D))}function zo(h,g,w){return h>0?new va(Math.atan2(w,g)*ta,Math.sqrt(g*g+w*w),h):new va(NaN,NaN,h)}function $f(h){return h>.206893034?h*h*h:(h-4/29)/7.787037}function Qf(h){return h>.008856?Math.pow(h,1/3):7.787037*h+4/29}function Zi(h){return Math.round(255*(h<=.00304?12.92*h:1.055*Math.pow(h,1/2.4)-.055))}e.rgb=di;function di(h,g,w){return this instanceof di?(this.r=~~h,this.g=~~g,void(this.b=~~w)):arguments.length<2?h instanceof di?new di(h.r,h.g,h.b):$t(""+h,di,Fa):new di(h,g,w)}function Bi(h){return new di(h>>16,h>>8&255,h&255)}function Dl(h){return Bi(h)+""}var pi=di.prototype=new ma;pi.brighter=function(h){h=Math.pow(.7,arguments.length?h:1);var g=this.r,w=this.g,C=this.b,L=30;return!g&&!w&&!C?new di(L,L,L):(g&&g<L&&(g=L),w&&w<L&&(w=L),C&&C<L&&(C=L),new di(Math.min(255,g/h),Math.min(255,w/h),Math.min(255,C/h)))},pi.darker=function(h){return h=Math.pow(.7,arguments.length?h:1),new di(h*this.r,h*this.g,h*this.b)},pi.hsl=function(){return fa(this.r,this.g,this.b)},pi.toString=function(){return"#"+Pt(this.r)+Pt(this.g)+Pt(this.b)};function Pt(h){return h<16?"0"+Math.max(0,h).toString(16):Math.min(255,h).toString(16)}function $t(h,g,w){var C=0,L=0,D=0,G,q,Z;if(G=/([a-z]+)\((.*)\)/.exec(h=h.toLowerCase()),G)switch(q=G[2].split(","),G[1]){case"hsl":return w(parseFloat(q[0]),parseFloat(q[1])/100,parseFloat(q[2])/100);case"rgb":return g(Ga(q[0]),Ga(q[1]),Ga(q[2]))}return(Z=Nn.get(h))?g(Z.r,Z.g,Z.b):(h!=null&&h.charAt(0)==="#"&&!isNaN(Z=parseInt(h.slice(1),16))&&(h.length===4?(C=(Z&3840)>>4,C=C>>4|C,L=Z&240,L=L>>4|L,D=Z&15,D=D<<4|D):h.length===7&&(C=(Z&16711680)>>16,L=(Z&65280)>>8,D=Z&255)),g(C,L,D))}function fa(h,g,w){var C=Math.min(h/=255,g/=255,w/=255),L=Math.max(h,g,w),D=L-C,G,q,Z=(L+C)/2;return D?(q=Z<.5?D/(L+C):D/(2-L-C),h==L?G=(g-w)/D+(g<w?6:0):g==L?G=(w-h)/D+2:G=(h-g)/D+4,G*=60):(G=NaN,q=Z>0&&Z<1?0:G),new Sa(G,q,Z)}function _t(h,g,w){h=$n(h),g=$n(g),w=$n(w);var C=Qf((.4124564*h+.3575761*g+.1804375*w)/wn),L=Qf((.2126729*h+.7151522*g+.072175*w)/ki),D=Qf((.0193339*h+.119192*g+.9503041*w)/vs);return Pn(116*L-16,500*(C-L),200*(L-D))}function $n(h){return(h/=255)<=.04045?h/12.92:Math.pow((h+.055)/1.055,2.4)}function Ga(h){var g=parseFloat(h);return h.charAt(h.length-1)==="%"?Math.round(g*2.55):g}var Nn=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});Nn.forEach(function(h,g){Nn.set(h,Bi(g))});function ra(h){return typeof h=="function"?h:function(){return h}}e.functor=ra,e.xhr=To(ae);function To(h){return function(g,w,C){return arguments.length===2&&typeof w=="function"&&(C=w,w=null),ll(g,w,h,C)}}function ll(h,g,w,C){var L={},D=e.dispatch("beforesend","progress","load","error"),G={},q=new XMLHttpRequest,Z=null;self.XDomainRequest&&!("withCredentials"in q)&&/^(http(s)?:)?\/\//.test(h)&&(q=new XDomainRequest),"onload"in q?q.onload=q.onerror=ie:q.onreadystatechange=function(){q.readyState>3&&ie()};function ie(){var le=q.status,ye;if(!le&&t1(q)||le>=200&&le<300||le===304){try{ye=w.call(L,q)}catch(ge){D.error.call(L,ge);return}D.load.call(L,ye)}else D.error.call(L,q)}return q.onprogress=function(le){var ye=e.event;e.event=le;try{D.progress.call(L,q)}finally{e.event=ye}},L.header=function(le,ye){return le=(le+"").toLowerCase(),arguments.length<2?G[le]:(ye==null?delete G[le]:G[le]=ye+"",L)},L.mimeType=function(le){return arguments.length?(g=le==null?null:le+"",L):g},L.responseType=function(le){return arguments.length?(Z=le,L):Z},L.response=function(le){return w=le,L},["get","post"].forEach(function(le){L[le]=function(){return L.send.apply(L,[le].concat(t(arguments)))}}),L.send=function(le,ye,ge){if(arguments.length===2&&typeof ye=="function"&&(ge=ye,ye=null),q.open(le,h,!0),g!=null&&!("accept"in G)&&(G.accept=g+",*/*"),q.setRequestHeader)for(var je in G)q.setRequestHeader(je,G[je]);return g!=null&&q.overrideMimeType&&q.overrideMimeType(g),Z!=null&&(q.responseType=Z),ge!=null&&L.on("error",ge).on("load",function(Qe){ge(null,Qe)}),D.beforesend.call(L,q),q.send(ye==null?null:ye),L},L.abort=function(){return q.abort(),L},e.rebind(L,D,"on"),C==null?L:L.get(Ci(C))}function Ci(h){return h.length===1?function(g,w){h(g==null?w:null)}:h}function t1(h){var g=h.responseType;return g&&g!=="text"?h.response:h.responseText}e.dsv=function(h,g){var w=new RegExp('["'+h+`
]`),C=h.charCodeAt(0);function L(ie,le,ye){arguments.length<3&&(ye=le,le=null);var ge=ll(ie,g,le==null?D:G(le),ye);return ge.row=function(je){return arguments.length?ge.response((le=je)==null?D:G(je)):le},ge}function D(ie){return L.parse(ie.responseText)}function G(ie){return function(le){return L.parse(le.responseText,ie)}}L.parse=function(ie,le){var ye;return L.parseRows(ie,function(ge,je){if(ye)return ye(ge,je-1);var Qe=function(Me){for(var Fe={},Ge=ge.length,er=0;er<Ge;++er)Fe[ge[er]]=Me[er];return Fe};ye=le?function(Me,Fe){return le(Qe(Me),Fe)}:Qe})},L.parseRows=function(ie,le){var ye={},ge={},je=[],Qe=ie.length,Me=0,Fe=0,Ge,er;function rr(){if(Me>=Qe)return ge;if(er)return er=!1,ye;var Fr=Me;if(ie.charCodeAt(Fr)===34){for(var Br=Fr;Br++<Qe;)if(ie.charCodeAt(Br)===34){if(ie.charCodeAt(Br+1)!==34)break;++Br}Me=Br+2;var nt=ie.charCodeAt(Br+1);return nt===13?(er=!0,ie.charCodeAt(Br+2)===10&&++Me):nt===10&&(er=!0),ie.slice(Fr+1,Br).replace(/""/g,'"')}for(;Me<Qe;){var nt=ie.charCodeAt(Me++),yt=1;if(nt===10)er=!0;else if(nt===13)er=!0,ie.charCodeAt(Me)===10&&(++Me,++yt);else if(nt!==C)continue;return ie.slice(Fr,Me-yt)}return ie.slice(Fr)}for(;(Ge=rr())!==ge;){for(var De=[];Ge!==ye&&Ge!==ge;)De.push(Ge),Ge=rr();le&&(De=le(De,Fe++))==null||je.push(De)}return je},L.format=function(ie){if(Array.isArray(ie[0]))return L.formatRows(ie);var le=new V,ye=[];return ie.forEach(function(ge){for(var je in ge)le.has(je)||ye.push(le.add(je))}),[ye.map(Z).join(h)].concat(ie.map(function(ge){return ye.map(function(je){return Z(ge[je])}).join(h)})).join(`
`)},L.formatRows=function(ie){return ie.map(q).join(`
`)};function q(ie){return ie.map(Z).join(h)}function Z(ie){return w.test(ie)?'"'+ie.replace(/\"/g,'""')+'"':ie}return L},e.csv=e.dsv(",","text/csv"),e.tsv=e.dsv(" ","text/tab-separated-values");var An,Fl,Go,mi,nf=this[Q(this,"requestAnimationFrame")]||function(h){setTimeout(h,17)};e.timer=function(){Uo.apply(this,arguments)};function Uo(h,g,w){var C=arguments.length;C<2&&(g=0),C<3&&(w=Date.now());var L=w+g,D={c:h,t:L,n:null};return Fl?Fl.n=D:An=D,Fl=D,Go||(mi=clearTimeout(mi),Go=1,nf(Mo)),D}function Mo(){var h=Rl(),g=ac()-h;g>24?(isFinite(g)&&(clearTimeout(mi),mi=setTimeout(Mo,g)),Go=0):(Go=1,nf(Mo))}e.timer.flush=function(){Rl(),ac()};function Rl(){for(var h=Date.now(),g=An;g;)h>=g.t&&g.c(h-g.t)&&(g.c=null),g=g.n;return h}function ac(){for(var h,g=An,w=1/0;g;)g.c?(g.t<w&&(w=g.t),g=(h=g).n):g=h?h.n=g.n:An=g.n;return Fl=h,w}e.round=function(h,g){return g?Math.round(h*(g=Math.pow(10,g)))/g:Math.round(h)},e.geom={};function Ho(h){return h[0]}function hs(h){return h[1]}e.geom.hull=function(h){var g=Ho,w=hs;if(arguments.length)return C(h);function C(L){if(L.length<3)return[];var D=ra(g),G=ra(w),q,Z=L.length,ie=[],le=[];for(q=0;q<Z;q++)ie.push([+D.call(this,L[q],q),+G.call(this,L[q],q),q]);for(ie.sort(a1),q=0;q<Z;q++)le.push([ie[q][0],-ie[q][1]]);var ye=P0(ie),ge=P0(le),je=ge[0]===ye[0],Qe=ge[ge.length-1]===ye[ye.length-1],Me=[];for(q=ye.length-1;q>=0;--q)Me.push(L[ie[ye[q]][2]]);for(q=+je;q<ge.length-Qe;++q)Me.push(L[ie[ge[q]][2]]);return Me}return C.x=function(L){return arguments.length?(g=L,C):g},C.y=function(L){return arguments.length?(w=L,C):w},C};function P0(h){for(var g=h.length,w=[0,1],C=2,L=2;L<g;L++){for(;C>1&&za(h[w[C-2]],h[w[C-1]],h[L])<=0;)--C;w[C++]=L}return w.slice(0,C)}function a1(h,g){return h[0]-g[0]||h[1]-g[1]}e.geom.polygon=function(h){return we(h,nc),h};var nc=e.geom.polygon.prototype=[];nc.area=function(){for(var h=-1,g=this.length,w,C=this[g-1],L=0;++h<g;)w=C,C=this[h],L+=w[1]*C[0]-w[0]*C[1];return L*.5},nc.centroid=function(h){var g=-1,w=this.length,C=0,L=0,D,G=this[w-1],q;for(arguments.length||(h=-1/(6*this.area()));++g<w;)D=G,G=this[g],q=D[0]*G[1]-G[0]*D[1],C+=(D[0]+G[0])*q,L+=(D[1]+G[1])*q;return[C*h,L*h]},nc.clip=function(h){for(var g,w=ql(h),C=-1,L=this.length-ql(this),D,G,q=this[L-1],Z,ie,le;++C<L;){for(g=h.slice(),h.length=0,Z=this[C],ie=g[(G=g.length-w)-1],D=-1;++D<G;)le=g[D],Bv(le,q,Z)?(Bv(ie,q,Z)||h.push(ds(ie,le,q,Z)),h.push(le)):Bv(ie,q,Z)&&h.push(ds(ie,le,q,Z)),ie=le;w&&h.push(h[0]),q=Z}return h};function Bv(h,g,w){return(w[0]-g[0])*(h[1]-g[1])<(w[1]-g[1])*(h[0]-g[0])}function ds(h,g,w,C){var L=h[0],D=w[0],G=g[0]-L,q=C[0]-D,Z=h[1],ie=w[1],le=g[1]-Z,ye=C[1]-ie,ge=(q*(Z-ie)-ye*(L-D))/(ye*G-q*le);return[L+ge*G,Z+ge*le]}function ql(h){var g=h[0],w=h[h.length-1];return!(g[0]-w[0]||g[1]-w[1])}var Vo,So,yi,of=[],ps,sl,lf=[];function zv(){uf(this),this.edge=this.site=this.circle=null}function ic(h){var g=of.pop()||new zv;return g.site=h,g}function Kf(h){ff(h),yi.remove(h),of.push(h),uf(h)}function Gv(h){var g=h.circle,w=g.x,C=g.cy,L={x:w,y:C},D=h.P,G=h.N,q=[h];Kf(h);for(var Z=D;Z.circle&&b(w-Z.circle.x)<Ie&&b(C-Z.circle.cy)<Ie;)D=Z.P,q.unshift(Z),Kf(Z),Z=D;q.unshift(Z),ff(Z);for(var ie=G;ie.circle&&b(w-ie.circle.x)<Ie&&b(C-ie.circle.cy)<Ie;)G=ie.N,q.push(ie),Kf(ie),ie=G;q.push(ie),ff(ie);var le=q.length,ye;for(ye=1;ye<le;++ye)ie=q[ye],Z=q[ye-1],Pl(ie.edge,Z.site,ie.site,L);Z=q[0],ie=q[le-1],ie.edge=tu(Z.site,ie.site,null,L),zi(Z),zi(ie)}function Uv(h){for(var g=h.x,w=h.y,C,L,D,G,q=yi._;q;)if(D=oc(q,w)-g,D>Ie)q=q.L;else if(G=g-Hv(q,w),G>Ie){if(!q.R){C=q;break}q=q.R}else{D>-Ie?(C=q.P,L=q):G>-Ie?(C=q,L=q.N):C=L=q;break}var Z=ic(h);if(yi.insert(C,Z),!(!C&&!L)){if(C===L){ff(C),L=ic(C.site),yi.insert(Z,L),Z.edge=L.edge=tu(C.site,Z.site),zi(C),zi(L);return}if(!L){Z.edge=tu(C.site,Z.site);return}ff(C),ff(L);var ie=C.site,le=ie.x,ye=ie.y,ge=h.x-le,je=h.y-ye,Qe=L.site,Me=Qe.x-le,Fe=Qe.y-ye,Ge=2*(ge*Fe-je*Me),er=ge*ge+je*je,rr=Me*Me+Fe*Fe,De={x:(Fe*er-je*rr)/Ge+le,y:(ge*rr-Me*er)/Ge+ye};Pl(L.edge,ie,Qe,De),Z.edge=tu(ie,h,null,De),L.edge=tu(h,Qe,null,De),zi(C),zi(L)}}function oc(h,g){var w=h.site,C=w.x,L=w.y,D=L-g;if(!D)return C;var G=h.P;if(!G)return-1/0;w=G.site;var q=w.x,Z=w.y,ie=Z-g;if(!ie)return q;var le=q-C,ye=1/D-1/ie,ge=le/ie;return ye?(-ge+Math.sqrt(ge*ge-2*ye*(le*le/(-2*ie)-Z+ie/2+L-D/2)))/ye+C:(C+q)/2}function Hv(h,g){var w=h.N;if(w)return oc(w,g);var C=h.site;return C.y===g?C.x:1/0}function lc(h){this.site=h,this.edges=[]}lc.prototype.prepare=function(){for(var h=this.edges,g=h.length,w;g--;)w=h[g].edge,(!w.b||!w.a)&&h.splice(g,1);return h.sort(sf),h.length};function Eo(h){for(var g=h[0][0],w=h[1][0],C=h[0][1],L=h[1][1],D,G,q,Z,ie=So,le=ie.length,ye,ge,je,Qe,Me,Fe;le--;)if(ye=ie[le],!(!ye||!ye.prepare()))for(je=ye.edges,Qe=je.length,ge=0;ge<Qe;)Fe=je[ge].end(),q=Fe.x,Z=Fe.y,Me=je[++ge%Qe].start(),D=Me.x,G=Me.y,(b(q-D)>Ie||b(Z-G)>Ie)&&(je.splice(ge,0,new sc(o1(ye.site,Fe,b(q-g)<Ie&&L-Z>Ie?{x:g,y:b(D-g)<Ie?G:L}:b(Z-L)<Ie&&w-q>Ie?{x:b(G-L)<Ie?D:w,y:L}:b(q-w)<Ie&&Z-C>Ie?{x:w,y:b(D-w)<Ie?G:C}:b(Z-C)<Ie&&q-g>Ie?{x:b(G-C)<Ie?D:g,y:C}:null),ye.site,null)),++Qe)}function sf(h,g){return g.angle-h.angle}function eu(){uf(this),this.x=this.y=this.arc=this.site=this.cy=null}function zi(h){var g=h.P,w=h.N;if(!(!g||!w)){var C=g.site,L=h.site,D=w.site;if(C!==D){var G=L.x,q=L.y,Z=C.x-G,ie=C.y-q,le=D.x-G,Fe=D.y-q,ye=2*(Z*Fe-ie*le);if(!(ye>=-mr)){var ge=Z*Z+ie*ie,je=le*le+Fe*Fe,Qe=(Fe*ge-ie*je)/ye,Me=(Z*je-le*ge)/ye,Fe=Me+q,Ge=lf.pop()||new eu;Ge.arc=h,Ge.site=L,Ge.x=Qe+G,Ge.y=Fe+Math.sqrt(Qe*Qe+Me*Me),Ge.cy=Fe,h.circle=Ge;for(var er=null,rr=sl._;rr;)if(Ge.y<rr.y||Ge.y===rr.y&&Ge.x<=rr.x)if(rr.L)rr=rr.L;else{er=rr.P;break}else if(rr.R)rr=rr.R;else{er=rr;break}sl.insert(er,Ge),er||(ps=Ge)}}}}function ff(h){var g=h.circle;g&&(g.P||(ps=g.N),sl.remove(g),lf.push(g),uf(g),h.circle=null)}function n1(h,g,w,C){return function(L){var D=L.a,G=L.b,q=D.x,Z=D.y,ie=G.x,le=G.y,ye=0,ge=1,je=ie-q,Qe=le-Z,Me;if(Me=h-q,!(!je&&Me>0)){if(Me/=je,je<0){if(Me<ye)return;Me<ge&&(ge=Me)}else if(je>0){if(Me>ge)return;Me>ye&&(ye=Me)}if(Me=w-q,!(!je&&Me<0)){if(Me/=je,je<0){if(Me>ge)return;Me>ye&&(ye=Me)}else if(je>0){if(Me<ye)return;Me<ge&&(ge=Me)}if(Me=g-Z,!(!Qe&&Me>0)){if(Me/=Qe,Qe<0){if(Me<ye)return;Me<ge&&(ge=Me)}else if(Qe>0){if(Me>ge)return;Me>ye&&(ye=Me)}if(Me=C-Z,!(!Qe&&Me<0)){if(Me/=Qe,Qe<0){if(Me>ge)return;Me>ye&&(ye=Me)}else if(Qe>0){if(Me<ye)return;Me<ge&&(ge=Me)}return ye>0&&(L.a={x:q+ye*je,y:Z+ye*Qe}),ge<1&&(L.b={x:q+ge*je,y:Z+ge*Qe}),L}}}}}}function i1(h){for(var g=Vo,w=n1(h[0][0],h[0][1],h[1][0],h[1][1]),C=g.length,L;C--;)L=g[C],(!ru(L,h)||!w(L)||b(L.a.x-L.b.x)<Ie&&b(L.a.y-L.b.y)<Ie)&&(L.a=L.b=null,g.splice(C,1))}function ru(h,g){var w=h.b;if(w)return!0;var C=h.a,L=g[0][0],D=g[1][0],G=g[0][1],q=g[1][1],Z=h.l,ie=h.r,le=Z.x,ye=Z.y,ge=ie.x,je=ie.y,Qe=(le+ge)/2,Me=(ye+je)/2,Fe,Ge;if(je===ye){if(Qe<L||Qe>=D)return;if(le>ge){if(!C)C={x:Qe,y:G};else if(C.y>=q)return;w={x:Qe,y:q}}else{if(!C)C={x:Qe,y:q};else if(C.y<G)return;w={x:Qe,y:G}}}else if(Fe=(le-ge)/(je-ye),Ge=Me-Fe*Qe,Fe<-1||Fe>1)if(le>ge){if(!C)C={x:(G-Ge)/Fe,y:G};else if(C.y>=q)return;w={x:(q-Ge)/Fe,y:q}}else{if(!C)C={x:(q-Ge)/Fe,y:q};else if(C.y<G)return;w={x:(G-Ge)/Fe,y:G}}else if(ye<je){if(!C)C={x:L,y:Fe*L+Ge};else if(C.x>=D)return;w={x:D,y:Fe*D+Ge}}else{if(!C)C={x:D,y:Fe*D+Ge};else if(C.x<L)return;w={x:L,y:Fe*L+Ge}}return h.a=C,h.b=w,!0}function N0(h,g){this.l=h,this.r=g,this.a=this.b=null}function tu(h,g,w,C){var L=new N0(h,g);return Vo.push(L),w&&Pl(L,h,g,w),C&&Pl(L,g,h,C),So[h.i].edges.push(new sc(L,h,g)),So[g.i].edges.push(new sc(L,g,h)),L}function o1(h,g,w){var C=new N0(h,null);return C.a=g,C.b=w,Vo.push(C),C}function Pl(h,g,w,C){!h.a&&!h.b?(h.a=C,h.l=g,h.r=w):h.l===w?h.b=C:h.a=C}function sc(h,g,w){var C=h.a,L=h.b;this.edge=h,this.site=g,this.angle=w?Math.atan2(w.y-g.y,w.x-g.x):h.l===g?Math.atan2(L.x-C.x,C.y-L.y):Math.atan2(C.x-L.x,L.y-C.y)}sc.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 ms(){this._=null}function uf(h){h.U=h.C=h.L=h.R=h.P=h.N=null}ms.prototype={insert:function(h,g){var w,C,L;if(h){if(g.P=h,g.N=h.N,h.N&&(h.N.P=g),h.N=g,h.R){for(h=h.R;h.L;)h=h.L;h.L=g}else h.R=g;w=h}else this._?(h=I0(this._),g.P=null,g.N=h,h.P=h.L=g,w=h):(g.P=g.N=null,this._=g,w=null);for(g.L=g.R=null,g.U=w,g.C=!0,h=g;w&&w.C;)C=w.U,w===C.L?(L=C.R,L&&L.C?(w.C=L.C=!1,C.C=!0,h=C):(h===w.R&&(ys(this,w),h=w,w=h.U),w.C=!1,C.C=!0,fl(this,C))):(L=C.L,L&&L.C?(w.C=L.C=!1,C.C=!0,h=C):(h===w.L&&(fl(this,w),h=w,w=h.U),w.C=!1,C.C=!0,ys(this,C)