Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

d3

Package Overview
Dependencies
Maintainers
1
Versions
273
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3 - npm Package Compare versions

Comparing version 2.3.2 to 2.3.3

4

d3.min.js

@@ -1,2 +0,2 @@

(function(){function dw(a,b,c){function i(a,b){var c=a.__domain||(a.__domain=a.domain()),d=a.range().map(function(a){return(a-b)/h});a.domain(c).domain(d.map(a.invert))}var d=Math.pow(2,(dh[2]=a)-c[2]),e=dh[0]=b[0]-d*c[0],f=dh[1]=b[1]-d*c[1],g=d3.event,h=Math.pow(2,a);d3.event={scale:h,translate:[e,f],transform:function(a,b){a&&i(a,e),b&&i(b,f)}};try{di.apply(dk,dl)}finally{d3.event=g}g.preventDefault()}function dv(){dn&&dj===d3.event.target&&(d3.event.stopPropagation(),d3.event.preventDefault(),dn=!1,dj=null)}function du(){dd&&(dm&&dj===d3.event.target&&(dn=!0),dt(),dd=null)}function dt(){de=null,dd&&(dm=!0,dw(dh[2],d3.svg.mouse(dk),dd))}function ds(){var a=d3.svg.touches(dk);switch(a.length){case 1:var b=a[0];dw(dh[2],b,df[b.identifier]);break;case 2:var c=a[0],d=a[1],e=[(c[0]+d[0])/2,(c[1]+d[1])/2],f=df[c.identifier],g=df[d.identifier],h=[(f[0]+g[0])/2,(f[1]+g[1])/2,f[2]];dw(Math.log(d3.event.scale)/Math.LN2+f[2],e,h)}}function dr(){var a=d3.svg.touches(dk),b=-1,c=a.length,d;while(++b<c)df[(d=a[b]).identifier]=dp(d);return a}function dq(){dc||(dc=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var a=d3.event,b;try{dc.scrollTop=1e3,dc.dispatchEvent(a),b=1e3-dc.scrollTop}catch(c){b=a.wheelDelta||-a.detail*5}return b*.005}function dp(a){return[a[0]-dh[0],a[1]-dh[1],dh[2]]}function db(){d3.event.stopPropagation(),d3.event.preventDefault()}function da(){cX&&cS===d3.event.target&&(db(),cX=!1,cS=null)}function c_(){!cT||(cY("dragend"),cT=null,cW&&cS===d3.event.target&&(cX=!0,db()))}function c$(){if(!!cT){var a=cT.parentNode;if(!a)return c_();cY("drag"),db()}}function cZ(a){return d3.event.touches?d3.svg.touches(a)[0]:d3.svg.mouse(a)}function cY(a){var b=d3.event,c=cT.parentNode,d=0,e=0;c&&(c=cZ(c),d=c[0]-cV[0],e=c[1]-cV[1],cV=c,cW|=d|e);try{d3.event={dx:d,dy:e},cR[a].dispatch.apply(cT,cU)}finally{d3.event=b}b.preventDefault()}function cQ(a,b,c){e=[];if(c&&b.length>1){var d=bu(a.domain()),e,f=-1,g=b.length,h=(b[1]-b[0])/++c,i,j;while(++f<g)for(i=c;--i>0;)(j=+b[f]-i*h)>=d[0]&&e.push(j);for(--f,i=0;++i<c&&(j=+b[f]+i*h)<d[1];)e.push(j)}return e}function cP(a,b){a.attr("transform",function(a){return"translate(0,"+b(a)+")"})}function cO(a,b){a.attr("transform",function(a){return"translate("+b(a)+",0)"})}function cK(){return"circle"}function cJ(){return 64}function cI(a,b){var c=(a.ownerSVGElement||a).createSVGPoint();if(cH<0&&(window.scrollX||window.scrollY)){var d=d3.select(document.body).append("svg:svg").style("position","absolute").style("top",0).style("left",0),e=d[0][0].getScreenCTM();cH=!e.f&&!e.e,d.remove()}cH?(c.x=b.pageX,c.y=b.pageY):(c.x=b.clientX,c.y=b.clientY),c=c.matrixTransform(a.getScreenCTM().inverse());return[c.x,c.y]}function cG(a){return function(){var b=a.apply(this,arguments),c=b[0],d=b[1]+bS;return[c*Math.cos(d),c*Math.sin(d)]}}function cF(a){return[a.x,a.y]}function cE(a){return a.endAngle}function cD(a){return a.startAngle}function cC(a){return a.radius}function cB(a){return a.target}function cA(a){return a.source}function cz(a){return function(b,c){return a[c][1]}}function cy(a){return function(b,c){return a[c][0]}}function cx(a){function i(f){if(f.length<1)return null;var i=bZ(this,f,b,d),j=bZ(this,f,b===c?cy(i):c,d===e?cz(i):e);return"M"+g(a(j),h)+"L"+g(a(i.reverse()),h)+"Z"}var b=b$,c=b$,d=0,e=b_,f="linear",g=ca[f],h=.7;i.x=function(a){if(!arguments.length)return c;b=c=a;return i},i.x0=function(a){if(!arguments.length)return b;b=a;return i},i.x1=function(a){if(!arguments.length)return c;c=a;return i},i.y=function(a){if(!arguments.length)return e;d=e=a;return i},i.y0=function(a){if(!arguments.length)return d;d=a;return i},i.y1=function(a){if(!arguments.length)return e;e=a;return i},i.interpolate=function(a){if(!arguments.length)return f;g=ca[f=a];return i},i.tension=function(a){if(!arguments.length)return h;h=a;return i};return i}function cw(a){var b,c=-1,d=a.length,e,f;while(++c<d)b=a[c],e=b[0],f=b[1]+bS,b[0]=e*Math.cos(f),b[1]=e*Math.sin(f);return a}function cv(a){return a.length<3?cb(a):a[0]+ch(a,cu(a))}function cu(a){var b=[],c,d,e,f,g=ct(a),h=-1,i=a.length-1;while(++h<i)c=cs(a[h],a[h+1]),Math.abs(c)<1e-6?g[h]=g[h+1]=0:(d=g[h]/c,e=g[h+1]/c,f=d*d+e*e,f>9&&(f=c*3/Math.sqrt(f),g[h]=f*d,g[h+1]=f*e));h=-1;while(++h<=i)f=(a[Math.min(i,h+1)][0]-a[Math.max(0,h-1)][0])/(6*(1+g[h]*g[h])),b.push([f||0,g[h]*f||0]);return b}function ct(a){var b=0,c=a.length-1,d=[],e=a[0],f=a[1],g=d[0]=cs(e,f);while(++b<c)d[b]=g+(g=cs(e=f,f=a[b+1]));d[b]=g;return d}function cs(a,b){return(b[1]-a[1])/(b[0]-a[0])}function cr(a,b,c){a.push("C",cn(co,b),",",cn(co,c),",",cn(cp,b),",",cn(cp,c),",",cn(cq,b),",",cn(cq,c))}function cn(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function cm(a,b){var c=a.length-1,d=a[0][0],e=a[0][1],f=a[c][0]-d,g=a[c][1]-e,h=-1,i,j;while(++h<=c)i=a[h],j=h/c,i[0]=b*i[0]+(1-b)*(d+j*f),i[1]=b*i[1]+(1-b)*(e+j*g);return cj(a)}function cl(a){var b,c=-1,d=a.length,e=d+4,f,g=[],h=[];while(++c<4)f=a[c%d],g.push(f[0]),h.push(f[1]);b=[cn(cq,g),",",cn(cq,h)],--c;while(++c<e)f=a[c%d],g.shift(),g.push(f[0]),h.shift(),h.push(f[1]),cr(b,g,h);return b.join("")}function ck(a){if(a.length<4)return cb(a);var b=[],c=-1,d=a.length,e,f=[0],g=[0];while(++c<3)e=a[c],f.push(e[0]),g.push(e[1]);b.push(cn(cq,f)+","+cn(cq,g)),--c;while(++c<d)e=a[c],f.shift(),f.push(e[0]),g.shift(),g.push(e[1]),cr(b,f,g);return b.join("")}function cj(a){if(a.length<3)return cb(a);var b=1,c=a.length,d=a[0],e=d[0],f=d[1],g=[e,e,e,(d=a[1])[0]],h=[f,f,f,d[1]],i=[e,",",f];cr(i,g,h);while(++b<c)d=a[b],g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),cr(i,g,h);b=-1;while(++b<2)g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),cr(i,g,h);return i.join("")}function ci(a,b){var c=[],d=(1-b)/2,e,f=a[0],g=a[1],h=1,i=a.length;while(++h<i)e=f,f=g,g=a[h],c.push([d*(g[0]-e[0]),d*(g[1]-e[1])]);return c}function ch(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return cb(a);var c=a.length!=b.length,d="",e=a[0],f=a[1],g=b[0],h=g,i=1;c&&(d+="Q"+(f[0]-g[0]*2/3)+","+(f[1]-g[1]*2/3)+","+f[0]+","+f[1],e=a[1],i=2);if(b.length>1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j<b.length;j++,i++)f=a[i],h=b[j],d+="S"+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1]}if(c){var k=a[i];d+="Q"+(f[0]+h[0]*2/3)+","+(f[1]+h[1]*2/3)+","+k[0]+","+k[1]}return d}function cg(a,b,c){return a.length<3?cb(a):a[0]+ch(a,ci(a,b))}function cf(a,b){return a.length<3?cb(a):a[0]+ch((a.push(a[0]),a),ci([a[a.length-2]].concat(a,[a[1]]),b))}function ce(a,b){return a.length<4?cb(a):a[1]+ch(a.slice(1,a.length-1),ci(a,b))}function cd(a){var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];while(++b<c)e.push("H",(d=a[b])[0],"V",d[1]);return e.join("")}function cc(a){var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];while(++b<c)e.push("V",(d=a[b])[1],"H",d[0]);return e.join("")}function cb(a){var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];while(++b<c)e.push("L",(d=a[b])[0],",",d[1]);return e.join("")}function b_(a){return a[1]}function b$(a){return a[0]}function bZ(a,b,c,d){var e=[],f=-1,g=b.length,h=typeof c=="function",i=typeof d=="function",j;if(h&&i)while(++f<g)e.push([c.call(a,j=b[f],f),d.call(a,j,f)]);else if(h)while(++f<g)e.push([c.call(a,b[f],f),d]);else if(i)while(++f<g)e.push([c,d.call(a,b[f],f)]);else while(++f<g)e.push([c,d]);return e}function bY(a){function g(d){return d.length<1?null:"M"+e(a(bZ(this,d,b,c)),f)}var b=b$,c=b_,d="linear",e=ca[d],f=.7;g.x=function(a){if(!arguments.length)return b;b=a;return g},g.y=function(a){if(!arguments.length)return c;c=a;return g},g.interpolate=function(a){if(!arguments.length)return d;e=ca[d=a];return g},g.tension=function(a){if(!arguments.length)return f;f=a;return g};return g}function bX(a){return a.endAngle}function bW(a){return a.startAngle}function bV(a){return a.outerRadius}function bU(a){return a.innerRadius}function bR(a,b,c){function g(){d=c.length/(b-a),e=c.length-1;return f}function f(b){return c[Math.max(0,Math.min(e,Math.floor(d*(b-a))))]}var d,e;f.domain=function(c){if(!arguments.length)return[a,b];a=+c[0],b=+c[c.length-1];return g()},f.range=function(a){if(!arguments.length)return c;c=a;return g()},f.copy=function(){return bR(a,b,c)};return g()}function bQ(a,b){function e(a){return isNaN(a=+a)?NaN:b[d3.bisect(c,a)]}function d(){var d=0,f=a.length,g=b.length;c=[];while(++d<g)c[d-1]=d3.quantile(a,d/g);return e}var c;e.domain=function(b){if(!arguments.length)return a;a=b.filter(function(a){return!isNaN(a)}).sort(d3.ascending);return d()},e.range=function(a){if(!arguments.length)return b;b=a;return d()},e.quantiles=function(){return c},e.copy=function(){return bQ(a,b)};return d()}function bL(a,b){function f(b){return d[((c[b]||(c[b]=a.push(b)))-1)%d.length]}var c,d,e;f.domain=function(d){if(!arguments.length)return a;a=[],c={};var e=-1,g=d.length,h;while(++e<g)c[h=d[e]]||(c[h]=a.push(h));return f[b.t](b.x,b.p)},f.range=function(a){if(!arguments.length)return d;d=a,e=0,b={t:"range",x:a};return f},f.rangePoints=function(c,g){arguments.length<2&&(g=0);var h=c[0],i=c[1],j=(i-h)/(a.length-1+g);d=a.length<2?[(h+i)/2]:d3.range(h+j*g/2,i+j/2,j),e=0,b={t:"rangePoints",x:c,p:g};return f},f.rangeBands=function(c,g){arguments.length<2&&(g=0);var h=c[0],i=c[1],j=(i-h)/(a.length+g);d=d3.range(h+j*g,i,j),e=j*(1-g),b={t:"rangeBands",x:c,p:g};return f},f.rangeRoundBands=function(c,g){arguments.length<2&&(g=0);var h=c[0],i=c[1],j=Math.floor((i-h)/(a.length+g)),k=i-h-(a.length-g)*j;d=d3.range(h+Math.round(k/2),i,j),e=Math.round(j*(1-g)),b={t:"rangeRoundBands",x:c,p:g};return f},f.rangeBand=function(){return e},f.copy=function(){return bL(a,b)};return f.domain(a)}function bK(a){return function(b){return b<0?-Math.pow(-b,a):Math.pow(b,a)}}function bJ(a,b){function e(b){return a(c(b))}var c=bK(b),d=bK(1/b);e.invert=function(b){return d(a.invert(b))},e.domain=function(b){if(!arguments.length)return a.domain().map(d);a.domain(b.map(c));return e},e.ticks=function(a){return bB(e.domain(),a)},e.tickFormat=function(a){return bC(e.domain(),a)},e.nice=function(){return e.domain(bv(e.domain(),bz))},e.exponent=function(a){if(!arguments.length)return b;var f=e.domain();c=bK(b=a),d=bK(1/b);return e.domain(f)},e.copy=function(){return bJ(a.copy(),b)};return by(e,a)}function bI(a){return-Math.log(-a)/Math.LN10}function bH(a){return Math.log(a)/Math.LN10}function bF(a,b){function d(c){return a(b(c))}var c=b.pow;d.invert=function(b){return c(a.invert(b))},d.domain=function(e){if(!arguments.length)return a.domain().map(c);b=e[0]<0?bI:bH,c=b.pow,a.domain(e.map(b));return d},d.nice=function(){a.domain(bv(a.domain(),bw));return d},d.ticks=function(){var d=bu(a.domain()),e=[];if(d.every(isFinite)){var f=Math.floor(d[0]),g=Math.ceil(d[1]),h=Math.round(c(d[0])),i=Math.round(c(d[1]));if(b===bI){e.push(c(f));for(;f++<g;)for(var j=9;j>0;j--)e.push(c(f)*j)}else{for(;f<g;f++)for(var j=1;j<10;j++)e.push(c(f)*j);e.push(c(f))}for(f=0;e[f]<h;f++);for(g=e.length;e[g-1]>i;g--);e=e.slice(f,g)}return e},d.tickFormat=function(a,e){arguments.length<2&&(e=bG);if(arguments.length<1)return e;var f=a/d.ticks().length,g=b===bI?(h=-1e-15,Math.floor):(h=1e-15,Math.ceil),h;return function(a){return a/c(g(b(a)+h))<f?e(a):""}},d.copy=function(){return bF(a.copy(),b)};return by(d,a)}function bE(a,b,c,d){var e=[],f=[],g=0,h=a.length;while(++g<h)e.push(c(a[g-1],a[g])),f.push(d(b[g-1],b[g]));return function(b){var c=d3.bisect(a,b,1,a.length-1)-1;return f[c](e[c](b))}}function bD(a,b,c,d){var e=c(a[0],a[1]),f=d(b[0],b[1]);return function(a){return f(e(a))}}function bC(a,b){return d3.format(",."+Math.max(0,-Math.floor(Math.log(bA(a,b)[2])/Math.LN10+.01))+"f")}function bB(a,b){return d3.range.apply(d3,bA(a,b))}function bA(a,b){var c=bu(a),d=c[1]-c[0],e=Math.pow(10,Math.floor(Math.log(d/b)/Math.LN10)),f=b/d*e;f<=.15?e*=10:f<=.35?e*=5:f<=.75&&(e*=2),c[0]=Math.ceil(c[0]/e)*e,c[1]=Math.floor(c[1]/e)*e+e*.5,c[2]=e;return c}function bz(a){a=Math.pow(10,Math.round(Math.log(a)/Math.LN10)-1);return{floor:function(b){return Math.floor(b/a)*a},ceil:function(b){return Math.ceil(b/a)*a}}}function by(a,b){a.range=d3.rebind(a,b.range),a.rangeRound=d3.rebind(a,b.rangeRound),a.interpolate=d3.rebind(a,b.interpolate),a.clamp=d3.rebind(a,b.clamp);return a}function bx(a,b,c,d){function h(a){return e(a)}function g(){var g=a.length==2?bD:bE,i=d?L:K;e=g(a,b,i,c),f=g(b,a,i,d3.interpolate);return h}var e,f;h.invert=function(a){return f(a)},h.domain=function(b){if(!arguments.length)return a;a=b.map(Number);return g()},h.range=function(a){if(!arguments.length)return b;b=a;return g()},h.rangeRound=function(a){return h.range(a).interpolate(d3.interpolateRound)},h.clamp=function(a){if(!arguments.length)return d;d=a;return g()},h.interpolate=function(a){if(!arguments.length)return c;c=a;return g()},h.ticks=function(b){return bB(a,b)},h.tickFormat=function(b){return bC(a,b)},h.nice=function(){bv(a,bz);return g()},h.copy=function(){return bx(a,b,c,d)};return g()}function bw(){return Math}function bv(a,b){var c=0,d=a.length-1,e=a[c],f=a[d],g;f<e&&(g=c,c=d,d=g,g=e,e=f,f=g),b=b(f-e),a[c]=b.floor(e),a[d]=b.ceil(f);return a}function bu(a){var b=a[0],c=a[a.length-1];return b<c?[b,c]:[c,b]}function bt(){}function br(){var a=null,b=bn,c=Infinity;while(b)b.flush?b=a?a.next=b.next:bn=b.next:(c=Math.min(c,b.then+b.delay),b=(a=b).next);return c}function bq(){var a,b=Date.now(),c=bn;while(c)a=b-c.then,a>=c.delay&&(c.flush=c.callback(a)),c=c.next;var d=br()-b;d>24?(isFinite(d)&&(clearTimeout(bp),bp=setTimeout(bq,d)),bo=0):(bo=1,bs(bq))}function bm(a){for(var b=0,c=this.length;b<c;b++)for(var d=this[b],e=0,f=d.length;e<f;e++){var g=d[e];g&&a.call(g=g.node,g.__data__,e,b)}return this}function bh(a){return typeof a=="function"?function(b,c,d){var e=a.call(this,b,c)+"";return d!=e&&d3.interpolate(d,e)}:(a=a+"",function(b,c,d){return d!=a&&d3.interpolate(d,a)})}function bg(a,b){h(a,bi);var c={},d=d3.dispatch("start","end"),e=bl,f=Date.now();a.id=b,a.tween=function(b,d){if(arguments.length<2)return c[b];d==null?delete c[b]:c[b]=d;return a},a.ease=function(b){if(!arguments.length)return e;e=typeof b=="function"?b:d3.ease.apply(d3,arguments);return a},a.each=function(b,c){if(arguments.length<2)return bm.call(a,b);d[b].add(c);return a},d3.timer(function(g){a.each(function(h,i,j){function r(){--o.count||delete l.__transition__;return 1}function q(a){if(o.active!==b)return r();var c=(a-m)/n,f=e(c),g=k.length;while(g>0)k[--g].call(l,f);if(c>=1){r(),bk=b,d.end.dispatch.call(l,h,i),bk=0;return 1}}function p(a){if(o.active>b)return r();o.active=b;for(var e in c)(e=c[e].call(l,h,i))&&k.push(e);d.start.dispatch.call(l,h,i),q(a)||d3.timer(q,0,f);return 1}var k=[],l=this,m=a[j][i].delay,n=a[j][i].duration,o=l.__transition__||(l.__transition__={active:0,count:0});++o.count,m<=g?p(g):d3.timer(p,m,f)});return 1},0,f);return a}function be(a){arguments.length||(a=d3.ascending);return function(b,c){return a(b&&b.__data__,c&&c.__data__)}}function bc(a){h(a,bd);return a}function bb(a){return{__data__:a}}function ba(a){return function(){return Z(a,this)}}function _(a){return function(){return Y(a,this)}}function X(a){h(a,$);return a}function W(a,b,c){function g(a){return Math.round(f(a)*255)}function f(a){a>360?a-=360:a<0&&(a+=360);return a<60?d+(e-d)*a/60:a<180?e:a<240?d+(e-d)*(240-a)/60:d}var d,e;a=a%360,a<0&&(a+=360),b=b<0?0:b>1?1:b,c=c<0?0:c>1?1:c,e=c<=.5?c*(1+b):c+b-c*b,d=2*c-e;return M(g(a+120),g(a),g(a-120))}function V(a,b,c){this.h=a,this.s=b,this.l=c}function U(a,b,c){return new V(a,b,c)}function R(a){var b=parseFloat(a);return a.charAt(a.length-1)==="%"?Math.round(b*2.55):b}function Q(a,b,c){var d=Math.min(a/=255,b/=255,c/=255),e=Math.max(a,b,c),f=e-d,g,h,i=(e+d)/2;f?(h=i<.5?f/(e+d):f/(2-e-d),a==e?g=(b-c)/f+(b<c?6:0):b==e?g=(c-a)/f+2:g=(a-b)/f+4,g*=60):h=g=0;return U(g,h,i)}function P(a,b,c){var d=0,e=0,f=0,g,h,i;g=/([a-z]+)\((.*)\)/i.exec(a);if(g){h=g[2].split(",");switch(g[1]){case"hsl":return c(parseFloat(h[0]),parseFloat(h[1])/100,parseFloat(h[2])/100);case"rgb":return b(R(h[0]),R(h[1]),R(h[2]))}}if(i=S[a])return b(i.r,i.g,i.b);a!=null&&a.charAt(0)==="#"&&(a.length===4?(d=a.charAt(1),d+=d,e=a.charAt(2),e+=e,f=a.charAt(3),f+=f):a.length===7&&(d=a.substring(1,3),e=a.substring(3,5),f=a.substring(5,7)),d=parseInt(d,16),e=parseInt(e,16),f=parseInt(f,16));return b(d,e,f)}function O(a){return a<16?"0"+a.toString(16):a.toString(16)}function N(a,b,c){this.r=a,this.g=b,this.b=c}function M(a,b,c){return new N(a,b,c)}function L(a,b){b=b-(a=+a)?1/(b-a):0;return function(c){return Math.max(0,Math.min(1,(c-a)*b))}}function K(a,b){b=b-(a=+a)?1/(b-a):0;return function(c){return(c-a)*b}}function J(a){return a in I||/\bcolor\b/.test(a)?d3.interpolateRgb:d3.interpolate}function G(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function F(a){a||(a=1.70158);return function(b){return b*b*((a+1)*b-a)}}function E(a,b){var c;arguments.length<2&&(b=.45),arguments.length<1?(a=1,c=b/4):c=b/(2*Math.PI)*Math.asin(1/a);return function(d){return 1+a*Math.pow(2,10*-d)*Math.sin((d-c)*2*Math.PI/b)}}function D(a){return 1-Math.sqrt(1-a*a)}function C(a){return Math.pow(2,10*(a-1))}function B(a){return 1-Math.cos(a*Math.PI/2)}function A(a){return function(b){return Math.pow(b,a)}}function z(a){return a}function y(a){return function(b){return.5*(b<.5?a(2*b):2-a(2-2*b))}}function x(a){return function(b){return 1-a(1-b)}}function w(a){return function(b){return b<=0?0:b>=1?1:a(b)}}function r(a){var b=a.lastIndexOf("."),c=b>=0?a.substring(b):(b=a.length,""),d=[];while(b>0)d.push(a.substring(b-=3,b+3));return d.reverse().join(",")+c}function q(a){return a+""}function n(a){var b={},c=[];b.add=function(a){for(var d=0;d<c.length;d++)if(c[d].listener==a)return b;c.push({listener:a,on:!0});return b},b.remove=function(a){for(var d=0;d<c.length;d++){var e=c[d];if(e.listener==a){e.on=!1,c=c.slice(0,d).concat(c.slice(d+1));break}}return b},b.dispatch=function(){var a=c;for(var b=0,d=a.length;b<d;b++){var e=a[b];e.on&&e.listener.apply(this,arguments)}};return b}function l(a){return a.replace(/(^\s+)|(\s+$)/g,"").replace(/\s+/g," ")}function k(a){return a==null}function j(a){return a.length}function i(){return this}function f(a){return Array.prototype.slice.call(a)}function e(a){var b=-1,c=a.length,d=[];while(++b<c)d.push(a[b]);return d}Date.now||(Date.now=function(){return+(new Date)});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(a){var b=CSSStyleDeclaration.prototype,c=b.setProperty;b.setProperty=function(a,b,d){c.call(this,a,b+"",d)}}d3={version:"2.3.2"};var d=f;try{d(document.documentElement.childNodes)[0].nodeType}catch(g){d=e}var h=[].__proto__?function(a,b){a.__proto__=b}:function(a,b){for(var c in b)a[c]=b[c]};d3.functor=function(a){return typeof a=="function"?a:function(){return a}},d3.rebind=function(a,b){return function(){var c=b.apply(a,arguments);return arguments.length?a:c}},d3.ascending=function(a,b){return a<b?-1:a>b?1:a>=b?0:NaN},d3.descending=function(a,b){return b<a?-1:b>a?1:b>=a?0:NaN},d3.min=function(a,b){var c=-1,d=a.length,e,f;if(arguments.length===1){while(++c<d&&((e=a[c])==null||e!=e))e=undefined;while(++c<d)(f=a[c])!=null&&e>f&&(e=f)}else{while(++c<d&&((e=b.call(a,a[c],c))==null||e!=e))e=undefined;while(++c<d)(f=b.call(a,a[c],c))!=null&&e>f&&(e=f)}return e},d3.max=function(a,b){var c=-1,d=a.length,e,f;if(arguments.length===1){while(++c<d&&((e=a[c])==null||e!=e))e=undefined;while(++c<d)(f=a[c])!=null&&f>e&&(e=f)}else{while(++c<d&&((e=b.call(a,a[c],c))==null||e!=e))e=undefined;while(++c<d)(f=b.call(a,a[c],c))!=null&&f>e&&(e=f)}return e},d3.sum=function(a,b){var c=0,d=a.length,e,f=-1;if(arguments.length===1)while(++f<d)isNaN(e=+a[f])||(c+=e);else while(++f<d)isNaN(e=+b.call(a,a[f],f))||(c+=e);return c},d3.quantile=function(a,b){var c=(a.length-1)*b+1,d=Math.floor(c),e=a[d-1],f=c-d;return f?e+f*(a[d]-e):e},d3.zip=function(){if(!(e=arguments.length))return[];for(var a=-1,b=d3.min(arguments,j),c=Array(b);++a<b;)for(var d=-1,e,f=c[a]=Array(e);++d<e;)f[d]=arguments[d][a];return c},d3.bisectLeft=function(a,b,c,d){arguments.length<3&&(c=0),arguments.length<4&&(d=a.length);while(c<d){var e=c+d>>1;a[e]<b?c=e+1:d=e}return c},d3.bisect=d3.bisectRight=function(a,b,c,d){arguments.length<3&&(c=0),arguments.length<4&&(d=a.length);while(c<d){var e=c+d>>1;b<a[e]?d=e:c=e+1}return c},d3.first=function(a,b){var c=0,d=a.length,e=a[0],f;arguments.length===1&&(b=d3.ascending);while(++c<d)b.call(a,e,f=a[c])>0&&(e=f);return e},d3.last=function(a,b){var c=0,d=a.length,e=a[0],f;arguments.length===1&&(b=d3.ascending);while(++c<d)b.call(a,e,f=a[c])<=0&&(e=f);return e},d3.nest=function(){function g(a,d){if(d>=b.length)return a;var e=[],f=c[d++],h;for(h in a)e.push({key:h,values:g(a[h],d)});f&&e.sort(function(a,b){return f(a.key,b.key)});return e}function f(c,g){if(g>=b.length)return e?e.call(a,c):d?c.sort(d):c;var h=-1,i=c.length,j=b[g++],k,l,m={};while(++h<i)(k=j(l=c[h]))in m?m[k].push(l):m[k]=[l];for(k in m)m[k]=f(m[k],g);return m}var a={},b=[],c=[],d,e;a.map=function(a){return f(a,0)},a.entries=function(a){return g(f(a,0),0)},a.key=function(c){b.push(c);return a},a.sortKeys=function(d){c[b.length-1]=d;return a},a.sortValues=function(b){d=b;return a},a.rollup=function(b){e=b;return a};return a},d3.keys=function(a){var b=[];for(var c in a)b.push(c);return b},d3.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},d3.entries=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b},d3.permute=function(a,b){var c=[],d=-1,e=b.length;while(++d<e)c[d]=a[b[d]];return c},d3.merge=function(a){return Array.prototype.concat.apply([],a)},d3.split=function(a,b){var c=[],d=[],e,f=-1,g=a.length;arguments.length<2&&(b=k);while(++f<g)b.call(d,e=a[f],f)?d=[]:(d.length||c.push(d),d.push(e));return c},d3.range=function(a,b,c){arguments.length<3&&(c=1,arguments.length<2&&(b=a,a=0));if((b-a)/c==Infinity)throw new Error("infinite range");var d=[],e=-1,f;if(c<0)while((f=a+c*++e)>b)d.push(f);else while((f=a+c*++e)<b)d.push(f);return d},d3.requote=function(a){return a.replace(m,"\\$&")};var m=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(a,b){return b?Math.round(a*Math.pow(10,b))*Math.pow(10,-b):Math.round(a)},d3.xhr=function(a,b,c){var d=new XMLHttpRequest;arguments.length<3?c=b:b&&d.overrideMimeType&&d.overrideMimeType(b),d.open("GET",a,!0),d.onreadystatechange=function(){d.readyState===4&&c(d.status<300?d:null)},d.send(null)},d3.text=function(a,b,c){function d(a){c(a&&a.responseText)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.json=function(a,b){d3.text(a,"application/json",function(a){b(a?JSON.parse(a):null)})},d3.html=function(a,b){d3.text(a,"text/html",function(a){if(a!=null){var c=document.createRange();c.selectNode(document.body),a=c.createContextualFragment(a)}b(a)})},d3.xml=function(a,b,c){function d(a){c(a&&a.responseXML)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.ns={prefix:{svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},qualify:function(a){var b=a.indexOf(":");return b<0?a:{space:d3.ns.prefix[a.substring(0,b)],local:a.substring(b+1)}}},d3.dispatch=function(a){var b={},c;for(var d=0,e=arguments.length;d<e;d++)c=arguments[d],b[c]=n(c);return b},d3.format=function(a){var b=o.exec(a),c=b[1]||" ",d=b[3]||"",e=b[5],f=+b[6],g=b[7],h=b[8],i=b[9],j=!1,k=!1;h&&(h=h.substring(1)),e&&(c="0",g&&(f-=Math.floor((f-1)/4)));switch(i){case"n":g=!0,i="g";break;case"%":j=!0,i="f";break;case"p":j=!0,i="r";break;case"d":k=!0,h="0"}i=p[i]||q;return function(a){var b=j?a*100:+a,l=b<0&&(b=-b)?"−":d;if(k&&b%1)return"";a=i(b,h);if(e){var m=a.length+l.length;m<f&&(a=Array(f-m+1).join(c)+a),g&&(a=r(a)),a=l+a}else{g&&(a=r(a)),a=l+a;var m=a.length;m<f&&(a=Array(f-m+1).join(c)+a)}j&&(a+="%");return a}};var o=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,p={g:function(a,b){return a.toPrecision(b)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},r:function(a,b){var c=a?1+Math.floor(1e-15+Math.log(a)/Math.LN10):1;return d3.round(a,b-c).toFixed(Math.max(0,Math.min(20,b-c)))}},s=A(2),t=A(3),u={linear:function(){return z},poly:A,quad:function(){return s},cubic:function(){return t},sin:function(){return B},exp:function(){return C},circle:function(){return D},elastic:E,back:F,bounce:function(){return G}},v={"in":function(a){return a},out:x,"in-out":y,"out-in":function(a){return y(x(a))}};d3.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.substring(0,b):a,d=b>=0?a.substring(b+1):"in";return w(v[d](u[c].apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.interpolate=function(a,b){var c=d3.interpolators.length,d;while(--c>=0&&!(d=d3.interpolators[c](a,b)));return d},d3.interpolateNumber=function(a,b){b-=a;return function(c){return a+b*c}},d3.interpolateRound=function(a,b){b-=a;return function(c){return Math.round(a+b*c)}},d3.interpolateString=function(a,b){var c,d,e,f=0,g=0,h=[],i=[],j,k;H.lastIndex=0;for(d=0;c=H.exec(b);++d)c.index&&h.push(b.substring(f,g=c.index)),i.push({i:h.length,x:c[0]}),h.push(null),f=H.lastIndex;f<b.length&&h.push(b.substring(f));for(d=0,j=i.length;(c=H.exec(a))&&d<j;++d){k=i[d];if(k.x==c[0]){if(k.i)if(h[k.i+1]==null){h[k.i-1]+=k.x,h.splice(k.i,1);for(e=d+1;e<j;++e)i[e].i--}else{h[k.i-1]+=k.x+h[k.i+1],h.splice(k.i,2);for(e=d+1;e<j;++e)i[e].i-=2}else if(h[k.i+1]==null)h[k.i]=k.x;else{h[k.i]=k.x+h[k.i+1],h.splice(k.i+1,1);for(e=d+1;e<j;++e)i[e].i--}i.splice(d,1),j--,d--}else k.x=d3.interpolateNumber(parseFloat(c[0]),parseFloat(k.x))}while(d<j)k=i.pop(),h[k.i+1]==null?h[k.i]=k.x:(h[k.i]=k.x+h[k.i+1],h.splice(k.i+1,1)),j--;return h.length===1?h[0]==null?i[0].x:function(){return b}:function(a){for(d=0;d<j;++d)h[(k=i[d]).i]=k.x(a);return h.join("")}},d3.interpolateRgb=function(a,b){a=d3.rgb(a),b=d3.rgb(b);var c=a.r,d=a.g,e=a.b,f=b.r-c,g=b.g-d,h=b.b-e;return function(a){return"rgb("+Math.round(c+f*a)+","+Math.round(d+g*a)+","+Math.round(e+h*a)+")"}},d3.interpolateHsl=function(a,b){a=d3.hsl(a),b=d3.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return function(a){return W(c+f*a,d+g*a,e+h*a).toString()}},d3.interpolateArray=function(a,b){var c=[],d=[],e=a.length,f=b.length,g=Math.min(a.length,b.length),h;for(h=0;h<g;++h)c.push(d3.interpolate(a[h],b[h]));for(;h<e;++h)d[h]=a[h];for(;h<f;++h)d[h]=b[h];return function(a){for(h=0;h<g;++h)d[h]=c[h](a);return d}},d3.interpolateObject=function(a,b){var c={},d={},e;for(e in a)e in b?c[e]=J(e)(a[e],b[e]):d[e]=a[e];for(e in b)e in a||(d[e]=b[e]);return function(a){for(e in c)d[e]=c[e](a);return d}};var H=/[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g,I={background:1,fill:1,stroke:1};d3.interpolators=[d3.interpolateObject,function(a,b){return b instanceof Array&&d3.interpolateArray(a,b)},function(a,b){return typeof b=="string"&&d3.interpolateString(String(a),b)},function(a,b){return(typeof b=="string"?b in S||/^(#|rgb\(|hsl\()/.test(b):b instanceof N||b instanceof V)&&d3.interpolateRgb(String(a),b)},function(a,b){return typeof b=="number"&&d3.interpolateNumber(+a,b)}],d3.rgb=function(a,b,c){return arguments.length===1?P(""+a,M,W):M(~~a,~~b,~~c)},N.prototype.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);var b=this.r,c=this.g,d=this.b,e=30;if(!b&&!c&&!d)return M(e,e,e);b&&b<e&&(b=e),c&&c<e&&(c=e),d&&d<e&&(d=e);return M(Math.min(255,Math.floor(b/a)),Math.min(255,Math.floor(c/a)),Math.min(255,Math.floor(d/a)))},N.prototype.darker=function(a){a=Math.pow(.7,arguments.length?a:1);return M(Math.max(0,Math.floor(a*this.r)),Math.max(0,Math.floor(a*this.g)),Math.max(0,Math.floor(a*this.b)))},N.prototype.hsl=function(){return Q(this.r,this.g,this.b)},N.prototype.toString=function(){return"#"+O(this.r)+O(this.g)+O(this.b)};var S={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};for(var T in S)S[T]=P(S[T],M,W);d3.hsl=function(a,b,c){return arguments.length===1?P(""+a,Q,U):U(+a,+b,+c)},V.prototype.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);return U(this.h,this.s,this.l/a)},V.prototype.darker=function(a){a=Math.pow(.7,arguments.length?a:1);return U(this.h,this.s,a*this.l)},V.prototype.rgb=function(){return W(this.h,this.s,this.l)},V.prototype.toString=function(){return"hsl("+this.h+","+this.s*100+"%,"+this.l*100+"%)"};var Y=function(a,b){return b.querySelector(a)},Z=function(a,b){return b.querySelectorAll(a)};typeof Sizzle=="function"&&(Y=function(a,b){return Sizzle(a,b)[0]},Z=function(a,b){return Sizzle.uniqueSort(Sizzle(a,b))});var $=[];d3.selection=function(){return bf},d3.selection.prototype=$,$.select=function(a){var b=[],c,d,e,f;typeof a!="function"&&(a=_(a));for(var g=-1,h=this.length;++g<h;){b.push(c=[]),c.parentNode=(e=this[g]).parentNode;for(var i=-1,j=e.length;++i<j;)(f=e[i])?(c.push(d=a.call(f,f.__data__,i)),d&&"__data__"in f&&(d.__data__=f.__data__)):c.push(null)}return X(b)},$.selectAll=function(a){var b=[],c,e;typeof a!="function"&&(a=ba(a));for(var f=-1,g=this.length;++f<g;)for(var h=this[f],i=-1,j=h.length;++i<j;)if(e=h[i])b.push(c=d(a.call(e,e.__data__,i))),c.parentNode=e;return X(b)},$.attr=function(a,b){function i(){var c=b.apply(this,arguments);c==null?this.removeAttributeNS(a.space,a.local):this.setAttributeNS(a.space,a.local,c)}function h(){var c=b.apply(this,arguments);c==null?this.removeAttribute(a):this.setAttribute(a,c)}function g(){this.setAttributeNS(a.space,a.local,b)}function f(){this.setAttribute(a,b)}function e(){this.removeAttributeNS(a.space,a.local)}function d(){this.removeAttribute(a)}a=d3.ns.qualify(a);if(arguments.length<2){var c=this.node();return a.local?c.getAttributeNS(a.space,a.local):c.getAttribute(a)}return this.each(b==null?a.local?e:d:typeof b=="function"?a.local?i:h:a.local?g:f)},$.classed=function(a,b){function h(){(b.apply(this,arguments)?f:g).call(this)}function g(){if(b=this
.classList)return b.remove(a);var b=this.className,d=b.baseVal!=null,e=d?b.baseVal:b;e=l(e.replace(c," ")),d?b.baseVal=e:this.className=e}function f(){if(b=this.classList)return b.add(a);var b=this.className,d=b.baseVal!=null,e=d?b.baseVal:b;c.lastIndex=0,c.test(e)||(e=l(e+" "+a),d?b.baseVal=e:this.className=e)}var c=new RegExp("(^|\\s+)"+d3.requote(a)+"(\\s+|$)","g");if(arguments.length<2){var d=this.node();if(e=d.classList)return e.contains(a);var e=d.className;c.lastIndex=0;return c.test(e.baseVal!=null?e.baseVal:e)}return this.each(typeof b=="function"?h:b?f:g)},$.style=function(a,b,c){function f(){var d=b.apply(this,arguments);d==null?this.style.removeProperty(a):this.style.setProperty(a,d,c)}function e(){this.style.setProperty(a,b,c)}function d(){this.style.removeProperty(a)}arguments.length<3&&(c="");return arguments.length<2?window.getComputedStyle(this.node(),null).getPropertyValue(a):this.each(b==null?d:typeof b=="function"?f:e)},$.property=function(a,b){function e(){var c=b.apply(this,arguments);c==null?delete this[a]:this[a]=c}function d(){this[a]=b}function c(){delete this[a]}return arguments.length<2?this.node()[a]:this.each(b==null?c:typeof b=="function"?e:d)},$.text=function(a){return arguments.length<1?this.node().textContent:this.each(typeof a=="function"?function(){this.textContent=a.apply(this,arguments)}:function(){this.textContent=a})},$.html=function(a){return arguments.length<1?this.node().innerHTML:this.each(typeof a=="function"?function(){this.innerHTML=a.apply(this,arguments)}:function(){this.innerHTML=a})},$.append=function(a){function c(){return this.appendChild(document.createElementNS(a.space,a.local))}function b(){return this.appendChild(document.createElement(a))}a=d3.ns.qualify(a);return this.select(a.local?c:b)},$.insert=function(a,b){function d(){return this.insertBefore(document.createElementNS(a.space,a.local),Y(b,this))}function c(){return this.insertBefore(document.createElement(a),Y(b,this))}a=d3.ns.qualify(a);return this.select(a.local?d:c)},$.remove=function(){return this.each(function(){var a=this.parentNode;a&&a.removeChild(this)})},$.data=function(a,b){function f(a,f){var g,h=a.length,i=f.length,j=Math.min(h,i),k=Math.max(h,i),l=[],m=[],n=[],o,p;if(b){var q={},r=[],s,t=f.length;for(g=-1;++g<h;)s=b.call(o=a[g],o.__data__,g),s in q?n[t++]=o:q[s]=o,r.push(s);for(g=-1;++g<i;)o=q[s=b.call(f,p=f[g],g)],o?(o.__data__=p,l[g]=o,m[g]=n[g]=null):(m[g]=bb(p),l[g]=n[g]=null),delete q[s];for(g=-1;++g<h;)r[g]in q&&(n[g]=a[g])}else{for(g=-1;++g<j;)o=a[g],p=f[g],o?(o.__data__=p,l[g]=o,m[g]=n[g]=null):(m[g]=bb(p),l[g]=n[g]=null);for(;g<i;++g)m[g]=bb(f[g]),l[g]=n[g]=null;for(;g<k;++g)n[g]=a[g],m[g]=l[g]=null}m.update=l,m.parentNode=l.parentNode=n.parentNode=a.parentNode,c.push(m),d.push(l),e.push(n)}var c=[],d=[],e=[],g=-1,h=this.length,i;if(typeof a=="function")while(++g<h)f(i=this[g],a.call(i,i.parentNode.__data__,g));else while(++g<h)f(i=this[g],a);var j=X(d);j.enter=function(){return bc(c)},j.exit=function(){return X(e)};return j};var bd=[];bd.append=$.append,bd.insert=$.insert,bd.empty=$.empty,bd.select=function(a){var b=[],c,d,e,f,g;for(var h=-1,i=this.length;++h<i;){e=(f=this[h]).update,b.push(c=[]),c.parentNode=f.parentNode;for(var j=-1,k=f.length;++j<k;)(g=f[j])?(c.push(e[j]=d=a.call(f.parentNode,g.__data__,j)),d.__data__=g.__data__):c.push(null)}return X(b)},$.filter=function(a){var b=[],c,d,e;for(var f=0,g=this.length;f<g;f++){b.push(c=[]),c.parentNode=(d=this[f]).parentNode;for(var h=0,i=d.length;h<i;h++)(e=d[h])&&a.call(e,e.__data__,h)&&c.push(e)}return X(b)},$.map=function(a){return this.each(function(){this.__data__=a.apply(this,arguments)})},$.sort=function(a){a=be.apply(this,arguments);for(var b=0,c=this.length;b<c;b++)for(var d=this[b].sort(a),e=1,f=d.length,g=d[0];e<f;e++){var h=d[e];h&&(g&&g.parentNode.insertBefore(h,g.nextSibling),g=h)}return this},$.on=function(a,b,c){arguments.length<3&&(c=!1);var d="__on"+a,e=a.indexOf(".");e>0&&(a=a.substring(0,e));return arguments.length<2?(e=this.node()[d])&&e._:this.each(function(e,f){function h(a){var c=d3.event;d3.event=a;try{b.call(g,g.__data__,f)}finally{d3.event=c}}var g=this;g[d]&&g.removeEventListener(a,g[d],c),b&&g.addEventListener(a,g[d]=h,c),h._=b})},$.each=function(a){for(var b=-1,c=this.length;++b<c;)for(var d=this[b],e=-1,f=d.length;++e<f;){var g=d[e];g&&a.call(g,g.__data__,e,b)}return this},$.call=function(a){a.apply(this,(arguments[0]=this,arguments));return this},$.empty=function(){return!this.node()},$.node=function(a){for(var b=0,c=this.length;b<c;b++)for(var d=this[b],e=0,f=d.length;e<f;e++){var g=d[e];if(g)return g}return null},$.transition=function(){var a=[],b,c;for(var d=-1,e=this.length;++d<e;){a.push(b=[]);for(var f=this[d],g=-1,h=f.length;++g<h;)b.push((c=f[g])?{node:c,delay:0,duration:250}:null)}return bg(a,bk||++bj)};var bf=X([[document]]);bf[0].parentNode=document.documentElement,d3.select=function(a){return typeof a=="string"?bf.select(a):X([[a]])},d3.selectAll=function(a){return typeof a=="string"?bf.selectAll(a):X([d(a)])};var bi=[],bj=0,bk=0,bl=d3.ease("cubic-in-out");bi.call=$.call,d3.transition=function(){return bf.transition()},d3.transition.prototype=bi,bi.select=function(a){var b=[],c,d,e;typeof a!="function"&&(a=_(a));for(var f=-1,g=this.length;++f<g;){b.push(c=[]);for(var h=this[f],i=-1,j=h.length;++i<j;)(e=h[i])&&(d=a.call(e.node,e.node.__data__,i))?("__data__"in e.node&&(d.__data__=e.node.__data__),c.push({node:d,delay:e.delay,duration:e.duration})):c.push(null)}return bg(b,this.id).ease(this.ease())},bi.selectAll=function(a){var b=[],c,d,e;typeof a!="function"&&(a=ba(a));for(var f=-1,g=this.length;++f<g;)for(var h=this[f],i=-1,j=h.length;++i<j;)if(e=h[i]){d=a.call(e.node,e.node.__data__,i),b.push(c=[]);for(var k=-1,l=d.length;++k<l;)c.push({node:d[k],delay:e.delay,duration:e.duration})}return bg(b,this.id).ease(this.ease())},bi.attr=function(a,b){return this.attrTween(a,bh(b))},bi.attrTween=function(a,b){function d(c,d){var e=b.call(this,c,d,this.getAttributeNS(a.space,a.local));return e&&function(b){this.setAttributeNS(a.space,a.local,e(b))}}function c(c,d){var e=b.call(this,c,d,this.getAttribute(a));return e&&function(b){this.setAttribute(a,e(b))}}a=d3.ns.qualify(a);return this.tween("attr."+a,a.local?d:c)},bi.style=function(a,b,c){arguments.length<3&&(c="");return this.styleTween(a,bh(b),c)},bi.styleTween=function(a,b,c){arguments.length<3&&(c="");return this.tween("style."+a,function(d,e){var f=b.call(this,d,e,window.getComputedStyle(this,null).getPropertyValue(a));return f&&function(b){this.style.setProperty(a,f(b),c)}})},bi.text=function(a){return this.tween("text",function(b,c){this.textContent=typeof a=="function"?a.call(this,b,c):a})},bi.remove=function(){return this.each("end",function(){var a;!this.__transition__&&(a=this.parentNode)&&a.removeChild(this)})},bi.delay=function(a){var b=this;return b.each(typeof a=="function"?function(c,d,e){b[e][d].delay=+a.apply(this,arguments)}:(a=+a,function(c,d,e){b[e][d].delay=a}))},bi.duration=function(a){var b=this;return b.each(typeof a=="function"?function(c,d,e){b[e][d].duration=+a.apply(this,arguments)}:(a=+a,function(c,d,e){b[e][d].duration=a}))},bi.transition=function(){return this.select(i)};var bn=null,bo,bp;d3.timer=function(a,b,c){var d=!1,e,f=bn;if(arguments.length<3){if(arguments.length<2)b=0;else if(!isFinite(b))return;c=Date.now()}while(f){if(f.callback===a){f.then=c,f.delay=b,d=!0;break}e=f,f=f.next}d||(bn={callback:a,then:c,delay:b,next:bn}),bo||(bp=clearTimeout(bp),bo=1,bs(bq))},d3.timer.flush=function(){var a,b=Date.now(),c=bn;while(c)a=b-c.then,c.delay||(c.flush=c.callback(a)),c=c.next;br()};var bs=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,17)};d3.scale={},d3.scale.linear=function(){return bx([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return bF(d3.scale.linear(),bH)};var bG=d3.format("e");bH.pow=function(a){return Math.pow(10,a)},bI.pow=function(a){return-Math.pow(10,-a)},d3.scale.pow=function(){return bJ(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return bL([],{t:"range",x:[]})},d3.scale.category10=function(){return d3.scale.ordinal().range(bM)},d3.scale.category20=function(){return d3.scale.ordinal().range(bN)},d3.scale.category20b=function(){return d3.scale.ordinal().range(bO)},d3.scale.category20c=function(){return d3.scale.ordinal().range(bP)};var bM=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],bN=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],bO=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],bP=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return bQ([],[])},d3.scale.quantize=function(){return bR(0,1,[0,1])},d3.svg={},d3.svg.arc=function(){function e(){var e=a.apply(this,arguments),f=b.apply(this,arguments),g=c.apply(this,arguments)+bS,h=d.apply(this,arguments)+bS,i=(h<g&&(i=g,g=h,h=i),h-g),j=i<Math.PI?"0":"1",k=Math.cos(g),l=Math.sin(g),m=Math.cos(h),n=Math.sin(h);return i>=bT?e?"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+ -f+"A"+f+","+f+" 0 1,1 0,"+f+"M0,"+e+"A"+e+","+e+" 0 1,0 0,"+ -e+"A"+e+","+e+" 0 1,0 0,"+e+"Z":"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+ -f+"A"+f+","+f+" 0 1,1 0,"+f+"Z":e?"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L"+e*m+","+e*n+"A"+e+","+e+" 0 "+j+",0 "+e*k+","+e*l+"Z":"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L0,0"+"Z"}var a=bU,b=bV,c=bW,d=bX;e.innerRadius=function(b){if(!arguments.length)return a;a=d3.functor(b);return e},e.outerRadius=function(a){if(!arguments.length)return b;b=d3.functor(a);return e},e.startAngle=function(a){if(!arguments.length)return c;c=d3.functor(a);return e},e.endAngle=function(a){if(!arguments.length)return d;d=d3.functor(a);return e},e.centroid=function(){var e=(a.apply(this,arguments)+b.apply(this,arguments))/2,f=(c.apply(this,arguments)+d.apply(this,arguments))/2+bS;return[Math.cos(f)*e,Math.sin(f)*e]};return e};var bS=-Math.PI/2,bT=2*Math.PI-1e-6;d3.svg.line=function(){return bY(Object)};var ca={linear:cb,"step-before":cc,"step-after":cd,basis:cj,"basis-open":ck,"basis-closed":cl,bundle:cm,cardinal:cg,"cardinal-open":ce,"cardinal-closed":cf,monotone:cv},co=[0,2/3,1/3,0],cp=[0,1/3,2/3,0],cq=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var a=bY(cw);a.radius=a.x,delete a.x,a.angle=a.y,delete a.y;return a},d3.svg.area=function(){return cx(Object)},d3.svg.area.radial=function(){var a=cx(cw);a.radius=a.x,delete a.x,a.innerRadius=a.x0,delete a.x0,a.outerRadius=a.x1,delete a.x1,a.angle=a.y,delete a.y,a.startAngle=a.y0,delete a.y0,a.endAngle=a.y1,delete a.y1;return a},d3.svg.chord=function(){function j(a,b,c,d){return"Q 0,0 "+d}function i(a,b){return"A"+a+","+a+" 0 0,1 "+b}function h(a,b){return a.a0==b.a0&&a.a1==b.a1}function g(a,b,f,g){var h=b.call(a,f,g),i=c.call(a,h,g),j=d.call(a,h,g)+bS,k=e.call(a,h,g)+bS;return{r:i,a0:j,a1:k,p0:[i*Math.cos(j),i*Math.sin(j)],p1:[i*Math.cos(k),i*Math.sin(k)]}}function f(c,d){var e=g(this,a,c,d),f=g(this,b,c,d);return"M"+e.p0+i(e.r,e.p1)+(h(e,f)?j(e.r,e.p1,e.r,e.p0):j(e.r,e.p1,f.r,f.p0)+i(f.r,f.p1)+j(f.r,f.p1,e.r,e.p0))+"Z"}var a=cA,b=cB,c=cC,d=bW,e=bX;f.radius=function(a){if(!arguments.length)return c;c=d3.functor(a);return f},f.source=function(b){if(!arguments.length)return a;a=d3.functor(b);return f},f.target=function(a){if(!arguments.length)return b;b=d3.functor(a);return f},f.startAngle=function(a){if(!arguments.length)return d;d=d3.functor(a);return f},f.endAngle=function(a){if(!arguments.length)return e;e=d3.functor(a);return f};return f},d3.svg.diagonal=function(){function d(d,e){var f=a.call(this,d,e),g=b.call(this,d,e),h=(f.y+g.y)/2,i=[f,{x:f.x,y:h},{x:g.x,y:h},g];i=i.map(c);return"M"+i[0]+"C"+i[1]+" "+i[2]+" "+i[3]}var a=cA,b=cB,c=cF;d.source=function(b){if(!arguments.length)return a;a=d3.functor(b);return d},d.target=function(a){if(!arguments.length)return b;b=d3.functor(a);return d},d.projection=function(a){if(!arguments.length)return c;c=a;return d};return d},d3.svg.diagonal.radial=function(){var a=d3.svg.diagonal(),b=cF,c=a.projection;a.projection=function(a){return arguments.length?c(cG(b=a)):b};return a},d3.svg.mouse=function(a){return cI(a,d3.event)};var cH=/WebKit/.test(navigator.userAgent)?-1:0;d3.svg.touches=function(a){var b=d3.event.touches;return b?d(b).map(function(b){var c=cI(a,b);c.identifier=b.identifier;return c}):[]},d3.svg.symbol=function(){function c(c,d){return(cL[a.call(this,c,d)]||cL.circle)(b.call(this,c,d))}var a=cK,b=cJ;c.type=function(b){if(!arguments.length)return a;a=d3.functor(b);return c},c.size=function(a){if(!arguments.length)return b;b=d3.functor(a);return c};return c};var cL={circle:function(a){var b=Math.sqrt(a/Math.PI);return"M0,"+b+"A"+b+","+b+" 0 1,1 0,"+ -b+"A"+b+","+b+" 0 1,1 0,"+b+"Z"},cross:function(a){var b=Math.sqrt(a/5)/2;return"M"+ -3*b+","+ -b+"H"+ -b+"V"+ -3*b+"H"+b+"V"+ -b+"H"+3*b+"V"+b+"H"+b+"V"+3*b+"H"+ -b+"V"+b+"H"+ -3*b+"Z"},diamond:function(a){var b=Math.sqrt(a/(2*cN)),c=b*cN;return"M0,"+ -b+"L"+c+",0"+" 0,"+b+" "+ -c+",0"+"Z"},square:function(a){var b=Math.sqrt(a)/2;return"M"+ -b+","+ -b+"L"+b+","+ -b+" "+b+","+b+" "+ -b+","+b+"Z"},"triangle-down":function(a){var b=Math.sqrt(a/cM),c=b*cM/2;return"M0,"+c+"L"+b+","+ -c+" "+ -b+","+ -c+"Z"},"triangle-up":function(a){var b=Math.sqrt(a/cM),c=b*cM/2;return"M0,"+ -c+"L"+b+","+c+" "+ -b+","+c+"Z"}};d3.svg.symbolTypes=d3.keys(cL);var cM=Math.sqrt(3),cN=Math.tan(30*Math.PI/180);d3.svg.axis=function(){function j(j){j.each(function(k,l,m){function F(a){return j.delay?a.transition().delay(j[m][l].delay).duration(j[m][l].duration).ease(j.ease()):a}var n=d3.select(this),o=a.ticks.apply(a,g),p=h==null?a.tickFormat.apply(a,g):h,q=cQ(a,o,i),r=n.selectAll(".minor").data(q,String),s=r.enter().insert("svg:line","g").attr("class","tick minor").style("opacity",1e-6),t=F(r.exit()).style("opacity",1e-6).remove(),u=F(r).style("opacity",1),v=n.selectAll("g").data(o,String),w=v.enter().insert("svg:g","path").style("opacity",1e-6),x=F(v.exit()).style("opacity",1e-6).remove(),y=F(v).style("opacity",1),z,A=bu(a.range()),B=n.selectAll(".domain").data([0]),C=B.enter().append("svg:path").attr("class","domain"),D=F(B),E=this.__chart__||a;this.__chart__=a.copy(),w.append("svg:line").attr("class","tick"),w.append("svg:text"),y.select("text").text(p);switch(b){case"bottom":z=cO,u.attr("y2",d),w.select("text").attr("dy",".71em").attr("text-anchor","middle"),y.select("line").attr("y2",c),y.select("text").attr("y",Math.max(c,0)+f),D.attr("d","M"+A[0]+","+e+"V0H"+A[1]+"V"+e);break;case"top":z=cO,u.attr("y2",-d),w.select("text").attr("text-anchor","middle"),y.select("line").attr("y2",-c),y.select("text").attr("y",-(Math.max(c,0)+f)),D.attr("d","M"+A[0]+","+ -e+"V0H"+A[1]+"V"+ -e);break;case"left":z=cP,u.attr("x2",-d),w.select("text").attr("dy",".32em").attr("text-anchor","end"),y.select("line").attr("x2",-c),y.select("text").attr("x",-(Math.max(c,0)+f)),D.attr("d","M"+ -e+","+A[0]+"H0V"+A[1]+"H"+ -e);break;case"right":z=cP,u.attr("x2",d),w.select("text").attr("dy",".32em"),y.select("line").attr("x2",c),y.select("text").attr("x",Math.max(c,0)+f),D.attr("d","M"+e+","+A[0]+"H0V"+A[1]+"H"+e)}w.call(z,E),y.call(z,a),x.call(z,a),s.call(z,E),u.call(z,a),t.call(z,a)})}var a=d3.scale.linear(),b="bottom",c=6,d=6,e=6,f=3,g=[10],h,i=0;j.scale=function(b){if(!arguments.length)return a;a=b;return j},j.orient=function(a){if(!arguments.length)return b;b=a;return j},j.ticks=function(){if(!arguments.length)return g;g=arguments;return j},j.tickFormat=function(a){if(!arguments.length)return h;h=a;return j},j.tickSize=function(a,b,f){if(!arguments.length)return c;var g=arguments.length-1;c=+a,d=g>1?+b:c,e=g>0?+arguments[g]:c;return j},j.tickPadding=function(a){if(!arguments.length)return f;f=+a;return j},j.tickSubdivide=function(a){if(!arguments.length)return i;i=+a;return j};return j},d3.behavior={},d3.behavior.drag=function(){function d(){c.apply(this,arguments),cY("dragstart")}function c(){cR=a,cS=d3.event.target,cV=cZ((cT=this).parentNode),cW=0,cU=arguments}function b(){this.on("mousedown.drag",d).on("touchstart.drag",d),d3.select(window).on("mousemove.drag",c$).on("touchmove.drag",c$).on("mouseup.drag",c_,!0).on("touchend.drag",c_,!0).on("click.drag",da,!0)}var a=d3.dispatch("drag","dragstart","dragend");b.on=function(c,d){a[c].add(d);return b};return b};var cR,cS,cT,cU,cV,cW,cX;d3.behavior.zoom=function(){function h(){d.apply(this,arguments);var b=dr(),c,e=Date.now();b.length===1&&e-dg<300&&dw(1+Math.floor(a[2]),c=b[0],df[c.identifier]),dg=e}function g(){d.apply(this,arguments);var b=d3.svg.mouse(dk);dw(d3.event.shiftKey?Math.ceil(a[2]-1):Math.floor(a[2]+1),b,dp(b))}function f(){d.apply(this,arguments),de||(de=dp(d3.svg.mouse(dk))),dw(dq()+a[2],d3.svg.mouse(dk),de)}function e(){d.apply(this,arguments),dd=dp(d3.svg.mouse(dk)),dm=!1,d3.event.preventDefault(),window.focus()}function d(){dh=a,di=b.zoom.dispatch,dj=d3.event.target,dk=this,dl=arguments}function c(){this.on("mousedown.zoom",e).on("mousewheel.zoom",f).on("DOMMouseScroll.zoom",f).on("dblclick.zoom",g).on("touchstart.zoom",h),d3.select(window).on("mousemove.zoom",dt).on("mouseup.zoom",du).on("touchmove.zoom",ds).on("touchend.zoom",dr).on("click.zoom",dv,!0)}var a=[0,0,0],b=d3.dispatch("zoom");c.on=function(a,d){b[a].add(d);return c};return c};var dc,dd,de,df={},dg=0,dh,di,dj,dk,dl,dm,dn})()
(function(){function dA(a,b,c){function i(a,b){var c=a.__domain||(a.__domain=a.domain()),d=a.range().map(function(a){return(a-b)/h});a.domain(c).domain(d.map(a.invert))}var d=Math.pow(2,(dl[2]=a)-c[2]),e=dl[0]=b[0]-d*c[0],f=dl[1]=b[1]-d*c[1],g=d3.event,h=Math.pow(2,a);d3.event={scale:h,translate:[e,f],transform:function(a,b){a&&i(a,e),b&&i(b,f)}};try{dm.apply(dp,dq)}finally{d3.event=g}g.preventDefault()}function dz(){ds&&dn===d3.event.target&&(d3.event.stopPropagation(),d3.event.preventDefault(),ds=!1,dn=null)}function dy(){dh&&(dr&&dn===d3.event.target&&(ds=!0),dx(),dh=null)}function dx(){di=null,dh&&(dr=!0,dA(dl[2],d3.svg.mouse(dp),dh))}function dw(){var a=d3.svg.touches(dp);switch(a.length){case 1:var b=a[0];dA(dl[2],b,dj[b.identifier]);break;case 2:var c=a[0],d=a[1],e=[(c[0]+d[0])/2,(c[1]+d[1])/2],f=dj[c.identifier],g=dj[d.identifier],h=[(f[0]+g[0])/2,(f[1]+g[1])/2,f[2]];dA(Math.log(d3.event.scale)/Math.LN2+f[2],e,h)}}function dv(){var a=d3.svg.touches(dp),b=-1,c=a.length,d;while(++b<c)dj[(d=a[b]).identifier]=dt(d);return a}function du(){dg||(dg=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var a=d3.event,b;try{dg.scrollTop=1e3,dg.dispatchEvent(a),b=1e3-dg.scrollTop}catch(c){b=a.wheelDelta||-a.detail*5}return b*.005}function dt(a){return[a[0]-dl[0],a[1]-dl[1],dl[2]]}function df(){d3.event.stopPropagation(),d3.event.preventDefault()}function de(){c_&&cW===d3.event.target&&(df(),c_=!1,cW=null)}function dd(){!cX||(da("dragend"),cX=null,c$&&cW===d3.event.target&&(c_=!0,df()))}function dc(){if(!!cX){var a=cX.parentNode;if(!a)return dd();da("drag"),df()}}function db(a){return d3.event.touches?d3.svg.touches(a)[0]:d3.svg.mouse(a)}function da(a){var b=d3.event,c=cX.parentNode,d=0,e=0;c&&(c=db(c),d=c[0]-cZ[0],e=c[1]-cZ[1],cZ=c,c$|=d|e);try{d3.event={dx:d,dy:e},cV[a].dispatch.apply(cX,cY)}finally{d3.event=b}b.preventDefault()}function cU(a,b,c){e=[];if(c&&b.length>1){var d=by(a.domain()),e,f=-1,g=b.length,h=(b[1]-b[0])/++c,i,j;while(++f<g)for(i=c;--i>0;)(j=+b[f]-i*h)>=d[0]&&e.push(j);for(--f,i=0;++i<c&&(j=+b[f]+i*h)<d[1];)e.push(j)}return e}function cT(a,b){a.attr("transform",function(a){return"translate(0,"+b(a)+")"})}function cS(a,b){a.attr("transform",function(a){return"translate("+b(a)+",0)"})}function cO(){return"circle"}function cN(){return 64}function cM(a,b){var c=(a.ownerSVGElement||a).createSVGPoint();if(cL<0&&(window.scrollX||window.scrollY)){var d=d3.select(document.body).append("svg:svg").style("position","absolute").style("top",0).style("left",0),e=d[0][0].getScreenCTM();cL=!e.f&&!e.e,d.remove()}cL?(c.x=b.pageX,c.y=b.pageY):(c.x=b.clientX,c.y=b.clientY),c=c.matrixTransform(a.getScreenCTM().inverse());return[c.x,c.y]}function cK(a){return function(){var b=a.apply(this,arguments),c=b[0],d=b[1]+bW;return[c*Math.cos(d),c*Math.sin(d)]}}function cJ(a){return[a.x,a.y]}function cI(a){return a.endAngle}function cH(a){return a.startAngle}function cG(a){return a.radius}function cF(a){return a.target}function cE(a){return a.source}function cD(a){return function(b,c){return a[c][1]}}function cC(a){return function(b,c){return a[c][0]}}function cB(a){function j(f){if(f.length<1)return null;var j=cb(this,f,b,d),k=cb(this,f,b===c?cC(j):c,d===e?cD(j):e);return"M"+g(a(k),i)+"L"+h(a(j.reverse()),i)+"Z"}var b=cc,c=cc,d=0,e=cd,f,g,h,i=.7;j.x=function(a){if(!arguments.length)return c;b=c=a;return j},j.x0=function(a){if(!arguments.length)return b;b=a;return j},j.x1=function(a){if(!arguments.length)return c;c=a;return j},j.y=function(a){if(!arguments.length)return e;d=e=a;return j},j.y0=function(a){if(!arguments.length)return d;d=a;return j},j.y1=function(a){if(!arguments.length)return e;e=a;return j},j.interpolate=function(a){if(!arguments.length)return f;g=ce[f=a],h=g.reverse||g;return j},j.tension=function(a){if(!arguments.length)return i;i=a;return j};return j.interpolate("linear")}function cA(a){var b,c=-1,d=a.length,e,f;while(++c<d)b=a[c],e=b[0],f=b[1]+bW,b[0]=e*Math.cos(f),b[1]=e*Math.sin(f);return a}function cz(a){return a.length<3?cf(a):a[0]+cl(a,cy(a))}function cy(a){var b=[],c,d,e,f,g=cx(a),h=-1,i=a.length-1;while(++h<i)c=cw(a[h],a[h+1]),Math.abs(c)<1e-6?g[h]=g[h+1]=0:(d=g[h]/c,e=g[h+1]/c,f=d*d+e*e,f>9&&(f=c*3/Math.sqrt(f),g[h]=f*d,g[h+1]=f*e));h=-1;while(++h<=i)f=(a[Math.min(i,h+1)][0]-a[Math.max(0,h-1)][0])/(6*(1+g[h]*g[h])),b.push([f||0,g[h]*f||0]);return b}function cx(a){var b=0,c=a.length-1,d=[],e=a[0],f=a[1],g=d[0]=cw(e,f);while(++b<c)d[b]=g+(g=cw(e=f,f=a[b+1]));d[b]=g;return d}function cw(a,b){return(b[1]-a[1])/(b[0]-a[0])}function cv(a,b,c){a.push("C",cr(cs,b),",",cr(cs,c),",",cr(ct,b),",",cr(ct,c),",",cr(cu,b),",",cr(cu,c))}function cr(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function cq(a,b){var c=a.length-1,d=a[0][0],e=a[0][1],f=a[c][0]-d,g=a[c][1]-e,h=-1,i,j;while(++h<=c)i=a[h],j=h/c,i[0]=b*i[0]+(1-b)*(d+j*f),i[1]=b*i[1]+(1-b)*(e+j*g);return cn(a)}function cp(a){var b,c=-1,d=a.length,e=d+4,f,g=[],h=[];while(++c<4)f=a[c%d],g.push(f[0]),h.push(f[1]);b=[cr(cu,g),",",cr(cu,h)],--c;while(++c<e)f=a[c%d],g.shift(),g.push(f[0]),h.shift(),h.push(f[1]),cv(b,g,h);return b.join("")}function co(a){if(a.length<4)return cf(a);var b=[],c=-1,d=a.length,e,f=[0],g=[0];while(++c<3)e=a[c],f.push(e[0]),g.push(e[1]);b.push(cr(cu,f)+","+cr(cu,g)),--c;while(++c<d)e=a[c],f.shift(),f.push(e[0]),g.shift(),g.push(e[1]),cv(b,f,g);return b.join("")}function cn(a){if(a.length<3)return cf(a);var b=1,c=a.length,d=a[0],e=d[0],f=d[1],g=[e,e,e,(d=a[1])[0]],h=[f,f,f,d[1]],i=[e,",",f];cv(i,g,h);while(++b<c)d=a[b],g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),cv(i,g,h);b=-1;while(++b<2)g.shift(),g.push(d[0]),h.shift(),h.push(d[1]),cv(i,g,h);return i.join("")}function cm(a,b){var c=[],d=(1-b)/2,e,f=a[0],g=a[1],h=1,i=a.length;while(++h<i)e=f,f=g,g=a[h],c.push([d*(g[0]-e[0]),d*(g[1]-e[1])]);return c}function cl(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return cf(a);var c=a.length!=b.length,d="",e=a[0],f=a[1],g=b[0],h=g,i=1;c&&(d+="Q"+(f[0]-g[0]*2/3)+","+(f[1]-g[1]*2/3)+","+f[0]+","+f[1],e=a[1],i=2);if(b.length>1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j<b.length;j++,i++)f=a[i],h=b[j],d+="S"+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1]}if(c){var k=a[i];d+="Q"+(f[0]+h[0]*2/3)+","+(f[1]+h[1]*2/3)+","+k[0]+","+k[1]}return d}function ck(a,b,c){return a.length<3?cf(a):a[0]+cl(a,cm(a,b))}function cj(a,b){return a.length<3?cf(a):a[0]+cl((a.push(a[0]),a),cm([a[a.length-2]].concat(a,[a[1]]),b))}function ci(a,b){return a.length<4?cf(a):a[1]+cl(a.slice(1,a.length-1),cm(a,b))}function ch(a){var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];while(++b<c)e.push("H",(d=a[b])[0],"V",d[1]);return e.join("")}function cg(a){var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];while(++b<c)e.push("V",(d=a[b])[1],"H",d[0]);return e.join("")}function cf(a){var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];while(++b<c)e.push("L",(d=a[b])[0],",",d[1]);return e.join("")}function cd(a){return a[1]}function cc(a){return a[0]}function cb(a,b,c,d){var e=[],f=-1,g=b.length,h=typeof c=="function",i=typeof d=="function",j;if(h&&i)while(++f<g)e.push([c.call(a,j=b[f],f),d.call(a,j,f)]);else if(h)while(++f<g)e.push([c.call(a,b[f],f),d]);else if(i)while(++f<g)e.push([c,d.call(a,b[f],f)]);else while(++f<g)e.push([c,d]);return e}function ca(a){function g(d){return d.length<1?null:"M"+e(a(cb(this,d,b,c)),f)}var b=cc,c=cd,d="linear",e=ce[d],f=.7;g.x=function(a){if(!arguments.length)return b;b=a;return g},g.y=function(a){if(!arguments.length)return c;c=a;return g},g.interpolate=function(a){if(!arguments.length)return d;e=ce[d=a];return g},g.tension=function(a){if(!arguments.length)return f;f=a;return g};return g}function b_(a){return a.endAngle}function b$(a){return a.startAngle}function bZ(a){return a.outerRadius}function bY(a){return a.innerRadius}function bV(a,b,c){function g(){d=c.length/(b-a),e=c.length-1;return f}function f(b){return c[Math.max(0,Math.min(e,Math.floor(d*(b-a))))]}var d,e;f.domain=function(c){if(!arguments.length)return[a,b];a=+c[0],b=+c[c.length-1];return g()},f.range=function(a){if(!arguments.length)return c;c=a;return g()},f.copy=function(){return bV(a,b,c)};return g()}function bU(a,b){function e(a){return isNaN(a=+a)?NaN:b[d3.bisect(c,a)]}function d(){var d=0,f=a.length,g=b.length;c=[];while(++d<g)c[d-1]=d3.quantile(a,d/g);return e}var c;e.domain=function(b){if(!arguments.length)return a;a=b.filter(function(a){return!isNaN(a)}).sort(d3.ascending);return d()},e.range=function(a){if(!arguments.length)return b;b=a;return d()},e.quantiles=function(){return c},e.copy=function(){return bU(a,b)};return d()}function bP(a,b){function f(b){return d[((c[b]||(c[b]=a.push(b)))-1)%d.length]}var c,d,e;f.domain=function(d){if(!arguments.length)return a;a=[],c={};var e=-1,g=d.length,h;while(++e<g)c[h=d[e]]||(c[h]=a.push(h));return f[b.t](b.x,b.p)},f.range=function(a){if(!arguments.length)return d;d=a,e=0,b={t:"range",x:a};return f},f.rangePoints=function(c,g){arguments.length<2&&(g=0);var h=c[0],i=c[1],j=(i-h)/(a.length-1+g);d=a.length<2?[(h+i)/2]:d3.range(h+j*g/2,i+j/2,j),e=0,b={t:"rangePoints",x:c,p:g};return f},f.rangeBands=function(c,g){arguments.length<2&&(g=0);var h=c[0],i=c[1],j=(i-h)/(a.length+g);d=d3.range(h+j*g,i,j),e=j*(1-g),b={t:"rangeBands",x:c,p:g};return f},f.rangeRoundBands=function(c,g){arguments.length<2&&(g=0);var h=c[0],i=c[1],j=Math.floor((i-h)/(a.length+g)),k=i-h-(a.length-g)*j;d=d3.range(h+Math.round(k/2),i,j),e=Math.round(j*(1-g)),b={t:"rangeRoundBands",x:c,p:g};return f},f.rangeBand=function(){return e},f.copy=function(){return bP(a,b)};return f.domain(a)}function bO(a){return function(b){return b<0?-Math.pow(-b,a):Math.pow(b,a)}}function bN(a,b){function e(b){return a(c(b))}var c=bO(b),d=bO(1/b);e.invert=function(b){return d(a.invert(b))},e.domain=function(b){if(!arguments.length)return a.domain().map(d);a.domain(b.map(c));return e},e.ticks=function(a){return bF(e.domain(),a)},e.tickFormat=function(a){return bG(e.domain(),a)},e.nice=function(){return e.domain(bz(e.domain(),bD))},e.exponent=function(a){if(!arguments.length)return b;var f=e.domain();c=bO(b=a),d=bO(1/b);return e.domain(f)},e.copy=function(){return bN(a.copy(),b)};return bC(e,a)}function bM(a){return-Math.log(-a)/Math.LN10}function bL(a){return Math.log(a)/Math.LN10}function bJ(a,b){function d(c){return a(b(c))}var c=b.pow;d.invert=function(b){return c(a.invert(b))},d.domain=function(e){if(!arguments.length)return a.domain().map(c);b=e[0]<0?bM:bL,c=b.pow,a.domain(e.map(b));return d},d.nice=function(){a.domain(bz(a.domain(),bA));return d},d.ticks=function(){var d=by(a.domain()),e=[];if(d.every(isFinite)){var f=Math.floor(d[0]),g=Math.ceil(d[1]),h=Math.round(c(d[0])),i=Math.round(c(d[1]));if(b===bM){e.push(c(f));for(;f++<g;)for(var j=9;j>0;j--)e.push(c(f)*j)}else{for(;f<g;f++)for(var j=1;j<10;j++)e.push(c(f)*j);e.push(c(f))}for(f=0;e[f]<h;f++);for(g=e.length;e[g-1]>i;g--);e=e.slice(f,g)}return e},d.tickFormat=function(a,e){arguments.length<2&&(e=bK);if(arguments.length<1)return e;var f=a/d.ticks().length,g=b===bM?(h=-1e-15,Math.floor):(h=1e-15,Math.ceil),h;return function(a){return a/c(g(b(a)+h))<f?e(a):""}},d.copy=function(){return bJ(a.copy(),b)};return bC(d,a)}function bI(a,b,c,d){var e=[],f=[],g=0,h=a.length;while(++g<h)e.push(c(a[g-1],a[g])),f.push(d(b[g-1],b[g]));return function(b){var c=d3.bisect(a,b,1,a.length-1)-1;return f[c](e[c](b))}}function bH(a,b,c,d){var e=c(a[0],a[1]),f=d(b[0],b[1]);return function(a){return f(e(a))}}function bG(a,b){return d3.format(",."+Math.max(0,-Math.floor(Math.log(bE(a,b)[2])/Math.LN10+.01))+"f")}function bF(a,b){return d3.range.apply(d3,bE(a,b))}function bE(a,b){var c=by(a),d=c[1]-c[0],e=Math.pow(10,Math.floor(Math.log(d/b)/Math.LN10)),f=b/d*e;f<=.15?e*=10:f<=.35?e*=5:f<=.75&&(e*=2),c[0]=Math.ceil(c[0]/e)*e,c[1]=Math.floor(c[1]/e)*e+e*.5,c[2]=e;return c}function bD(a){a=Math.pow(10,Math.round(Math.log(a)/Math.LN10)-1);return{floor:function(b){return Math.floor(b/a)*a},ceil:function(b){return Math.ceil(b/a)*a}}}function bC(a,b){a.range=d3.rebind(a,b.range),a.rangeRound=d3.rebind(a,b.rangeRound),a.interpolate=d3.rebind(a,b.interpolate),a.clamp=d3.rebind(a,b.clamp);return a}function bB(a,b,c,d){function h(a){return e(a)}function g(){var g=a.length==2?bH:bI,i=d?L:K;e=g(a,b,i,c),f=g(b,a,i,d3.interpolate);return h}var e,f;h.invert=function(a){return f(a)},h.domain=function(b){if(!arguments.length)return a;a=b.map(Number);return g()},h.range=function(a){if(!arguments.length)return b;b=a;return g()},h.rangeRound=function(a){return h.range(a).interpolate(d3.interpolateRound)},h.clamp=function(a){if(!arguments.length)return d;d=a;return g()},h.interpolate=function(a){if(!arguments.length)return c;c=a;return g()},h.ticks=function(b){return bF(a,b)},h.tickFormat=function(b){return bG(a,b)},h.nice=function(){bz(a,bD);return g()},h.copy=function(){return bB(a,b,c,d)};return g()}function bA(){return Math}function bz(a,b){var c=0,d=a.length-1,e=a[c],f=a[d],g;f<e&&(g=c,c=d,d=g,g=e,e=f,f=g),b=b(f-e),a[c]=b.floor(e),a[d]=b.ceil(f);return a}function by(a){var b=a[0],c=a[a.length-1];return b<c?[b,c]:[c,b]}function bx(){}function bv(){var a=null,b=br,c=Infinity;while(b)b.flush?b=a?a.next=b.next:br=b.next:(c=Math.min(c,b.then+b.delay),b=(a=b).next);return c}function bu(){var a,b=Date.now(),c=br;while(c)a=b-c.then,a>=c.delay&&(c.flush=c.callback(a)),c=c.next;var d=bv()-b;d>24?(isFinite(d)&&(clearTimeout(bt),bt=setTimeout(bu,d)),bs=0):(bs=1,bw(bu))}function bq(a){for(var b=0,c=this.length;b<c;b++)for(var d=this[b],e=0,f=d.length;e<f;e++){var g=d[e];g&&a.call(g=g.node,g.__data__,e,b)}return this}function bl(a){function c(b,c,d){return d!=a&&d3.interpolate(d,a)}function b(b,c,d){var e=a.call(this,b,c);return e==null?d!=""&&bj:d!=e&&d3.interpolate(d,e)}return typeof a=="function"?b:a==null?bk:(a+="",c)}function bk(a,b,c){return c!=""&&bj}function bi(a,b){h(a,bm);var c={},d=d3.dispatch("start","end"),e=bp,f=Date.now();a.id=b,a.tween=function(b,d){if(arguments.length<2)return c[b];d==null?delete c[b]:c[b]=d;return a},a.ease=function(b){if(!arguments.length)return e;e=typeof b=="function"?b:d3.ease.apply(d3,arguments);return a},a.each=function(b,c){if(arguments.length<2)return bq.call(a,b);d[b].add(c);return a},d3.timer(function(g){a.each(function(h,i,j){function r(){--o.count||delete l.__transition__;return 1}function q(a){if(o.active!==b)return r();var c=(a-m)/n,f=e(c),g=k.length;while(g>0)k[--g].call(l,f);if(c>=1){r(),bo=b,d.end.dispatch.call(l,h,i),bo=0;return 1}}function p(a){if(o.active>b)return r();o.active=b;for(var e in c)(e=c[e].call(l,h,i))&&k.push(e);d.start.dispatch.call(l,h,i),q(a)||d3.timer(q,0,f);return 1}var k=[],l=this,m=a[j][i].delay,n=a[j][i].duration,o=l.__transition__||(l.__transition__={active:0,count:0});++o.count,m<=g?p(g):d3.timer(p,m,f)});return 1},0,f);return a}function bg(a){arguments.length||(a=d3.ascending);return function(b,c){return a(b&&b.__data__,c&&c.__data__)}}function be(a){h(a,bf);return a}function bd(a){return{__data__:a}}function bc(a,b){function h(){(b.apply(this,arguments)?f:g).call(this)}function g(){if(b=this.classList)return b.remove(a);var b=this.className,d=b.baseVal!=null,e=d?b.baseVal:b;e=l(e.replace(c," ")),d?b.baseVal=e:this.className=e}function f(){if(b=this.classList)return b.add(a);var b=this.className,d=b.baseVal!=null,e=d?b.baseVal:b;c.lastIndex=0,c.test(e)||(e=l(e+" "+a),d?b.baseVal=e:this.className=e)}var c=new RegExp("(^|\\s+)"+d3.requote(a)+"(\\s+|$)","g");if(arguments.length<2){var d=this.node();if(e=d.classList)return e.contains(a);var e=d.className;c.lastIndex=0;return c.test(e.baseVal!=null?e.baseVal:e)}return this.each(typeof b=="function"?h:b?f:g)}function ba(a){return function(){return Z(a,this)}}function _(a){return function(){return Y(a,this)}}function X(a){h(a,$);return a}function W(a,b,c){function g(a){return Math.round(f(a)*255)}function f(a){a>360?a-=360:a<0&&(a+=360);return a<60?d+(e-d)*a/60:a<180?e:a<240?d+(e-d)*(240-a)/60:d}var d,e;a=a%360,a<0&&(a+=360),b=b<0?0:b>1?1:b,c=c<0?0:c>1?1:c,e=c<=.5?c*(1+b):c+b-c*b,d=2*c-e;return M(g(a+120),g(a),g(a-120))}function V(a,b,c){this.h=a,this.s=b,this.l=c}function U(a,b,c){return new V(a,b,c)}function R(a){var b=parseFloat(a);return a.charAt(a.length-1)==="%"?Math.round(b*2.55):b}function Q(a,b,c){var d=Math.min(a/=255,b/=255,c/=255),e=Math.max(a,b,c),f=e-d,g,h,i=(e+d)/2;f?(h=i<.5?f/(e+d):f/(2-e-d),a==e?g=(b-c)/f+(b<c?6:0):b==e?g=(c-a)/f+2:g=(a-b)/f+4,g*=60):h=g=0;return U(g,h,i)}function P(a,b,c){var d=0,e=0,f=0,g,h,i;g=/([a-z]+)\((.*)\)/i.exec(a);if(g){h=g[2].split(",");switch(g[1]){case"hsl":return c(parseFloat(h[0]),parseFloat(h[1])/100,parseFloat(h[2])/100);case"rgb":return b(R(h[0]),R(h[1]),R(h[2]))}}if(i=S[a])return b(i.r,i.g,i.b);a!=null&&a.charAt(0)==="#"&&(a.length===4?(d=a.charAt(1),d+=d,e=a.charAt(2),e+=e,f=a.charAt(3),f+=f):a.length===7&&(d=a.substring(1,3),e=a.substring(3,5),f=a.substring(5,7)),d=parseInt(d,16),e=parseInt(e,16),f=parseInt(f,16));return b(d,e,f)}function O(a){return a<16?"0"+Math.max(0,a).toString(16):Math.min(255,a).toString(16)}function N(a,b,c){this.r=a,this.g=b,this.b=c}function M(a,b,c){return new N(a,b,c)}function L(a,b){b=b-(a=+a)?1/(b-a):0;return function(c){return Math.max(0,Math.min(1,(c-a)*b))}}function K(a,b){b=b-(a=+a)?1/(b-a):0;return function(c){return(c-a)*b}}function J(a){return a in I||/\bcolor\b/.test(a)?d3.interpolateRgb:d3.interpolate}function G(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function F(a){a||(a=1.70158);return function(b){return b*b*((a+1)*b-a)}}function E(a,b){var c;arguments.length<2&&(b=.45),arguments.length<1?(a=1,c=b/4):c=b/(2*Math.PI)*Math.asin(1/a);return function(d){return 1+a*Math.pow(2,10*-d)*Math.sin((d-c)*2*Math.PI/b)}}function D(a){return 1-Math.sqrt(1-a*a)}function C(a){return Math.pow(2,10*(a-1))}function B(a){return 1-Math.cos(a*Math.PI/2)}function A(a){return function(b){return Math.pow(b,a)}}function z(a){return a}function y(a){return function(b){return.5*(b<.5?a(2*b):2-a(2-2*b))}}function x(a){return function(b){return 1-a(1-b)}}function w(a){return function(b){return b<=0?0:b>=1?1:a(b)}}function r(a){var b=a.lastIndexOf("."),c=b>=0?a.substring(b):(b=a.length,""),d=[];while(b>0)d.push(a.substring(b-=3,b+3));return d.reverse().join(",")+c}function q(a){return a+""}function n(a){var b={},c=[];b.add=function(a){for(var d=0;d<c.length;d++)if(c[d].listener==a)return b;c.push({listener:a,on:!0});return b},b.remove=function(a){for(var d=0;d<c.length;d++){var e=c[d];if(e.listener==a){e.on=!1,c=c.slice(0,d).concat(c.slice(d+1));break}}return b},b.dispatch=function(){var a=c;for(var b=0,d=a.length;b<d;b++){var e=a[b];e.on&&e.listener.apply(this,arguments)}};return b}function l(a){return a.replace(/(^\s+)|(\s+$)/g,"").replace(/\s+/g," ")}function k(a){return a==null}function j(a){return a.length}function i(){return this}function f(a){return Array.prototype.slice.call(a)}function e(a){var b=-1,c=a.length,d=[];while(++b<c)d.push(a[b]);return d}Date.now||(Date.now=function(){return+(new Date)});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(a){var b=CSSStyleDeclaration.prototype,c=b.setProperty;b.setProperty=function(a,b,d){c.call(this,a,b+"",d)}}d3={version:"2.3.3"};var d=f;try{d(document.documentElement.childNodes)[0].nodeType}catch(g){d=e}var h=[].__proto__?function(a,b){a.__proto__=b}:function(a,b){for(var c in b)a[c]=b[c]};d3.functor=function(a){return typeof a=="function"?a:function(){return a}},d3.rebind=function(a,b){return function(){var c=b.apply(a,arguments);return arguments.length?a:c}},d3.ascending=function(a,b){return a<b?-1:a>b?1:a>=b?0:NaN},d3.descending=function(a,b){return b<a?-1:b>a?1:b>=a?0:NaN},d3.min=function(a,b){var c=-1,d=a.length,e,f;if(arguments.length===1){while(++c<d&&((e=a[c])==null||e!=e))e=undefined;while(++c<d)(f=a[c])!=null&&e>f&&(e=f)}else{while(++c<d&&((e=b.call(a,a[c],c))==null||e!=e))e=undefined;while(++c<d)(f=b.call(a,a[c],c))!=null&&e>f&&(e=f)}return e},d3.max=function(a,b){var c=-1,d=a.length,e,f;if(arguments.length===1){while(++c<d&&((e=a[c])==null||e!=e))e=undefined;while(++c<d)(f=a[c])!=null&&f>e&&(e=f)}else{while(++c<d&&((e=b.call(a,a[c],c))==null||e!=e))e=undefined;while(++c<d)(f=b.call(a,a[c],c))!=null&&f>e&&(e=f)}return e},d3.sum=function(a,b){var c=0,d=a.length,e,f=-1;if(arguments.length===1)while(++f<d)isNaN(e=+a[f])||(c+=e);else while(++f<d)isNaN(e=+b.call(a,a[f],f))||(c+=e);return c},d3.quantile=function(a,b){var c=(a.length-1)*b+1,d=Math.floor(c),e=a[d-1],f=c-d;return f?e+f*(a[d]-e):e},d3.zip=function(){if(!(e=arguments.length))return[];for(var a=-1,b=d3.min(arguments,j),c=Array(b);++a<b;)for(var d=-1,e,f=c[a]=Array(e);++d<e;)f[d]=arguments[d][a];return c},d3.bisectLeft=function(a,b,c,d){arguments.length<3&&(c=0),arguments.length<4&&(d=a.length);while(c<d){var e=c+d>>1;a[e]<b?c=e+1:d=e}return c},d3.bisect=d3.bisectRight=function(a,b,c,d){arguments.length<3&&(c=0),arguments.length<4&&(d=a.length);while(c<d){var e=c+d>>1;b<a[e]?d=e:c=e+1}return c},d3.first=function(a,b){var c=0,d=a.length,e=a[0],f;arguments.length===1&&(b=d3.ascending);while(++c<d)b.call(a,e,f=a[c])>0&&(e=f);return e},d3.last=function(a,b){var c=0,d=a.length,e=a[0],f;arguments.length===1&&(b=d3.ascending);while(++c<d)b.call(a,e,f=a[c])<=0&&(e=f);return e},d3.nest=function(){function g(a,d){if(d>=b.length)return a;var e=[],f=c[d++],h;for(h in a)e.push({key:h,values:g(a[h],d)});f&&e.sort(function(a,b){return f(a.key,b.key)});return e}function f(c,g){if(g>=b.length)return e?e.call(a,c):d?c.sort(d):c;var h=-1,i=c.length,j=b[g++],k,l,m={};while(++h<i)(k=j(l=c[h]))in m?m[k].push(l):m[k]=[l];for(k in m)m[k]=f(m[k],g);return m}var a={},b=[],c=[],d,e;a.map=function(a){return f(a,0)},a.entries=function(a){return g(f(a,0),0)},a.key=function(c){b.push(c);return a},a.sortKeys=function(d){c[b.length-1]=d;return a},a.sortValues=function(b){d=b;return a},a.rollup=function(b){e=b;return a};return a},d3.keys=function(a){var b=[];for(var c in a)b.push(c);return b},d3.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},d3.entries=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b},d3.permute=function(a,b){var c=[],d=-1,e=b.length;while(++d<e)c[d]=a[b[d]];return c},d3.merge=function(a){return Array.prototype.concat.apply([],a)},d3.split=function(a,b){var c=[],d=[],e,f=-1,g=a.length;arguments.length<2&&(b=k);while(++f<g)b.call(d,e=a[f],f)?d=[]:(d.length||c.push(d),d.push(e));return c},d3.range=function(a,b,c){arguments.length<3&&(c=1,arguments.length<2&&(b=a,a=0));if((b-a)/c==Infinity)throw new Error("infinite range");var d=[],e=-1,f;if(c<0)while((f=a+c*++e)>b)d.push(f);else while((f=a+c*++e)<b)d.push(f);return d},d3.requote=function(a){return a.replace(m,"\\$&")};var m=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(a,b){return b?Math.round(a*Math.pow(10,b))*Math.pow(10,-b):Math.round(a)},d3.xhr=function(a,b,c){var d=new XMLHttpRequest;arguments.length<3?c=b:b&&d.overrideMimeType&&d.overrideMimeType(b),d.open("GET",a,!0),d.onreadystatechange=function(){d.readyState===4&&c(d.status<300?d:null)},d.send(null)},d3.text=function(a,b,c){function d(a){c(a&&a.responseText)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.json=function(a,b){d3.text(a,"application/json",function(a){b(a?JSON.parse(a):null)})},d3.html=function(a,b){d3.text(a,"text/html",function(a){if(a!=null){var c=document.createRange();c.selectNode(document.body),a=c.createContextualFragment(a)}b(a)})},d3.xml=function(a,b,c){function d(a){c(a&&a.responseXML)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.ns={prefix:{svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},qualify:function(a){var b=a.indexOf(":");return b<0?a:{space:d3.ns.prefix[a.substring(0,b)],local:a.substring(b+1)}}},d3.dispatch=function(a){var b={},c;for(var d=0,e=arguments.length;d<e;d++)c=arguments[d],b[c]=n(c);return b},d3.format=function(a){var b=o.exec(a),c=b[1]||" ",d=b[3]||"",e=b[5],f=+b[6],g=b[7],h=b[8],i=b[9],j=!1,k=!1;h&&(h=h.substring(1)),e&&(c="0",g&&(f-=Math.floor((f-1)/4)));switch(i){case"n":g=!0,i="g";break;case"%":j=!0,i="f";break;case"p":j=!0,i="r";break;case"d":k=!0,h="0"}i=p[i]||q;return function(a){var b=j?a*100:+a,l=b<0&&(b=-b)?"−":d;if(k&&b%1)return"";a=i(b,h);if(e){var m=a.length+l.length;m<f&&(a=Array(f-m+1).join(c)+a),g&&(a=r(a)),a=l+a}else{g&&(a=r(a)),a=l+a;var m=a.length;m<f&&(a=Array(f-m+1).join(c)+a)}j&&(a+="%");return a}};var o=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,p={g:function(a,b){return a.toPrecision(b)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},r:function(a,b){var c=a?1+Math.floor(1e-15+Math.log(a)/Math.LN10):1;return d3.round(a,b-c).toFixed(Math.max(0,Math.min(20,b-c)))}},s=A(2),t=A(3),u={linear:function(){return z},poly:A,quad:function(){return s},cubic:function(){return t},sin:function(){return B},exp:function(){return C},circle:function(){return D},elastic:E,back:F,bounce:function(){return G}},v={"in":function(a){return a},out:x,"in-out":y,"out-in":function(a){return y(x(a))}};d3.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.substring(0,b):a,d=b>=0?a.substring(b+1):"in";return w(v[d](u[c].apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.interpolate=function(a,b){var c=d3.interpolators.length,d;while(--c>=0&&!(d=d3.interpolators[c](a,b)));return d},d3.interpolateNumber=function(a,b){b-=a;return function(c){return a+b*c}},d3.interpolateRound=function(a,b){b-=a;return function(c){return Math.round(a+b*c)}},d3.interpolateString=function(a,b){var c,d,e,f=0,g=0,h=[],i=[],j,k;H.lastIndex=0;for(d=0;c=H.exec(b);++d)c.index&&h.push(b.substring(f,g=c.index)),i.push({i:h.length,x:c[0]}),h.push(null),f=H.lastIndex;f<b.length&&h.push(b.substring(f));for(d=0,j=i.length;(c=H.exec(a))&&d<j;++d){k=i[d];if(k.x==c[0]){if(k.i)if(h[k.i+1]==null){h[k.i-1]+=k.x,h.splice(k.i,1);for(e=d+1;e<j;++e)i[e].i--}else{h[k.i-1]+=k.x+h[k.i+1],h.splice(k.i,2);for(e=d+1;e<j;++e)i[e].i-=2}else if(h[k.i+1]==null)h[k.i]=k.x;else{h[k.i]=k.x+h[k.i+1],h.splice(k.i+1,1);for(e=d+1;e<j;++e)i[e].i--}i.splice(d,1),j--,d--}else k.x=d3.interpolateNumber(parseFloat(c[0]),parseFloat(k.x))}while(d<j)k=i.pop(),h[k.i+1]==null?h[k.i]=k.x:(h[k.i]=k.x+h[k.i+1],h.splice(k.i+1,1)),j--;return h.length===1?h[0]==null?i[0].x:function(){return b}:function(a){for(d=0;d<j;++d)h[(k=i[d]).i]=k.x(a);return h.join("")}},d3.interpolateRgb=function(a,b){a=d3.rgb(a),b=d3.rgb(b);var c=a.r,d=a.g,e=a.b,f=b.r-c,g=b.g-d,h=b.b-e;return function(a){return"#"+O(Math.round(c+f*a))+O(Math.round(d+g*a))+O(Math.round(e+h*a))}},d3.interpolateHsl=function(a,b){a=d3.hsl(a),b=d3.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return function(a){return W(c+f*a,d+g*a,e+h*a).toString()}},d3.interpolateArray=function(a,b){var c=[],d=[],e=a.length,f=b.length,g=Math.min(a.length,b.length),h;for(h=0;h<g;++h)c.push(d3.interpolate(a[h],b[h]));for(;h<e;++h)d[h]=a[h];for(;h<f;++h)d[h]=b[h];return function(a){for(h=0;h<g;++h)d[h]=c[h](a);return d}},d3.interpolateObject=function(a,b){var c={},d={},e;for(e in a)e in b?c[e]=J(e)(a[e],b[e]):d[e]=a[e];for(e in b)e in a||(d[e]=b[e]);return function(a){for(e in c)d[e]=c[e](a);return d}};var H=/[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g,I={background:1,fill:1,stroke:1};d3.interpolators=[d3.interpolateObject,function(a,b){return b instanceof Array&&d3.interpolateArray(a,b)},function(a,b){return typeof b=="string"&&d3.interpolateString(String(a),b)},function(a,b){return(typeof b=="string"?b in S||/^(#|rgb\(|hsl\()/.test(b):b instanceof N||b instanceof V)&&d3.interpolateRgb(String(a),b)},function(a,b){return typeof b=="number"&&d3.interpolateNumber(+a,b)}],d3.rgb=function(a,b,c){return arguments.length===1?a instanceof N?M(a.r,a.g,a.b):P(""+a,M,W):M(~~a,~~b,~~c)},N.prototype.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);var b=this.r,c=this.g,d=this.b,e=30;if(!b&&!c&&!d)return M(e,e,e);b&&b<e&&(b=e),c&&c<e&&(c=e),d&&d<e&&(d=e);return M(Math.min(255,Math.floor(b/a)),Math.min(255,Math.floor(c/a)),Math.min(255,Math.floor(d/a)))},N.prototype.darker=function(a){a=Math.pow(.7,arguments.length?a:1);return M(Math.floor(a*this.r),Math.floor(a*this.g),Math.floor(a*this.b))},N.prototype.hsl=function(){return Q(this.r,this.g,this.b)},N.prototype.toString=function(){return"#"+O(this.r)+O(this.g)+O(this.b)};var S={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};for(var T in S)S[T]=P(S[T],M,W);d3.hsl=function(a,b,c){return arguments.length===1?a instanceof V?U(a.h,a.s,a.l):P(""+a,Q,U):U(+a,+b,+c)},V.prototype.brighter=function(a){a=Math.pow(.7,arguments.length?a:1);return U(this.h,this.s,this.l/a)},V.prototype.darker=function(a){a=Math.pow(.7,arguments.length?a:1);return U(this.h,this.s,a*this.l)},V.prototype.rgb=function(){return W(this.h,this.s,this.l)},V.prototype.toString=function(){return this.rgb().toString()};var Y=function(a,b){return b.querySelector(a)},Z=function(a,b){return b.querySelectorAll(a)};typeof Sizzle=="function"&&(Y=function(a,b){return Sizzle(a,b)[0]},Z=function(a,b){return Sizzle.uniqueSort(Sizzle(a,b))});var $=[];d3.selection=function(){return bh},d3.selection.prototype=$,$.select=function(a){var b=[],c,d,e,f;typeof a!="function"&&(a=_(a));for(var g=-1,h=this.length;++g<h;){b.push(c=[]),c.parentNode=(e=this[g]).parentNode;for(var i=-1,j=e.length;++i<j;)(f=e[i])?(c.push(d=a.call(f,f.__data__,i)),d&&"__data__"in f&&(d.__data__=f.__data__)):c.push(null)}return X(b)},$.selectAll=function(a){var b=[],c,e;typeof a!="function"&&(a=ba(a));for(var f=-1,g=this.length;++f<g;)for(var h=this[f],i=-1,j=h.length;++i<j;)if(e=h[i])b.push(c=d(a.call(e,e.__data__
,i))),c.parentNode=e;return X(b)},$.attr=function(a,b){function i(){var c=b.apply(this,arguments);c==null?this.removeAttributeNS(a.space,a.local):this.setAttributeNS(a.space,a.local,c)}function h(){var c=b.apply(this,arguments);c==null?this.removeAttribute(a):this.setAttribute(a,c)}function g(){this.setAttributeNS(a.space,a.local,b)}function f(){this.setAttribute(a,b)}function e(){this.removeAttributeNS(a.space,a.local)}function d(){this.removeAttribute(a)}a=d3.ns.qualify(a);if(arguments.length<2){var c=this.node();return a.local?c.getAttributeNS(a.space,a.local):c.getAttribute(a)}return this.each(b==null?a.local?e:d:typeof b=="function"?a.local?i:h:a.local?g:f)},$.classed=function(a,b){var c=a.split(bb),d=c.length,e=-1;if(arguments.length>1){while(++e<d)bc.call(this,c[e],b);return this}while(++e<d)if(!bc.call(this,c[e]))return!1;return!0};var bb=/\s+/g;$.style=function(a,b,c){function f(){var d=b.apply(this,arguments);d==null?this.style.removeProperty(a):this.style.setProperty(a,d,c)}function e(){this.style.setProperty(a,b,c)}function d(){this.style.removeProperty(a)}arguments.length<3&&(c="");return arguments.length<2?window.getComputedStyle(this.node(),null).getPropertyValue(a):this.each(b==null?d:typeof b=="function"?f:e)},$.property=function(a,b){function e(){var c=b.apply(this,arguments);c==null?delete this[a]:this[a]=c}function d(){this[a]=b}function c(){delete this[a]}return arguments.length<2?this.node()[a]:this.each(b==null?c:typeof b=="function"?e:d)},$.text=function(a){return arguments.length<1?this.node().textContent:this.each(typeof a=="function"?function(){this.textContent=a.apply(this,arguments)}:function(){this.textContent=a})},$.html=function(a){return arguments.length<1?this.node().innerHTML:this.each(typeof a=="function"?function(){this.innerHTML=a.apply(this,arguments)}:function(){this.innerHTML=a})},$.append=function(a){function c(){return this.appendChild(document.createElementNS(a.space,a.local))}function b(){return this.appendChild(document.createElement(a))}a=d3.ns.qualify(a);return this.select(a.local?c:b)},$.insert=function(a,b){function d(){return this.insertBefore(document.createElementNS(a.space,a.local),Y(b,this))}function c(){return this.insertBefore(document.createElement(a),Y(b,this))}a=d3.ns.qualify(a);return this.select(a.local?d:c)},$.remove=function(){return this.each(function(){var a=this.parentNode;a&&a.removeChild(this)})},$.data=function(a,b){function f(a,f){var g,h=a.length,i=f.length,j=Math.min(h,i),k=Math.max(h,i),l=[],m=[],n=[],o,p;if(b){var q={},r=[],s,t=f.length;for(g=-1;++g<h;)s=b.call(o=a[g],o.__data__,g),s in q?n[t++]=o:q[s]=o,r.push(s);for(g=-1;++g<i;)o=q[s=b.call(f,p=f[g],g)],o?(o.__data__=p,l[g]=o,m[g]=n[g]=null):(m[g]=bd(p),l[g]=n[g]=null),delete q[s];for(g=-1;++g<h;)r[g]in q&&(n[g]=a[g])}else{for(g=-1;++g<j;)o=a[g],p=f[g],o?(o.__data__=p,l[g]=o,m[g]=n[g]=null):(m[g]=bd(p),l[g]=n[g]=null);for(;g<i;++g)m[g]=bd(f[g]),l[g]=n[g]=null;for(;g<k;++g)n[g]=a[g],m[g]=l[g]=null}m.update=l,m.parentNode=l.parentNode=n.parentNode=a.parentNode,c.push(m),d.push(l),e.push(n)}var c=[],d=[],e=[],g=-1,h=this.length,i;if(typeof a=="function")while(++g<h)f(i=this[g],a.call(i,i.parentNode.__data__,g));else while(++g<h)f(i=this[g],a);var j=X(d);j.enter=function(){return be(c)},j.exit=function(){return X(e)};return j};var bf=[];bf.append=$.append,bf.insert=$.insert,bf.empty=$.empty,bf.select=function(a){var b=[],c,d,e,f,g;for(var h=-1,i=this.length;++h<i;){e=(f=this[h]).update,b.push(c=[]),c.parentNode=f.parentNode;for(var j=-1,k=f.length;++j<k;)(g=f[j])?(c.push(e[j]=d=a.call(f.parentNode,g.__data__,j)),d.__data__=g.__data__):c.push(null)}return X(b)},$.filter=function(a){var b=[],c,d,e;for(var f=0,g=this.length;f<g;f++){b.push(c=[]),c.parentNode=(d=this[f]).parentNode;for(var h=0,i=d.length;h<i;h++)(e=d[h])&&a.call(e,e.__data__,h)&&c.push(e)}return X(b)},$.map=function(a){return this.each(function(){this.__data__=a.apply(this,arguments)})},$.sort=function(a){a=bg.apply(this,arguments);for(var b=0,c=this.length;b<c;b++)for(var d=this[b].sort(a),e=1,f=d.length,g=d[0];e<f;e++){var h=d[e];h&&(g&&g.parentNode.insertBefore(h,g.nextSibling),g=h)}return this},$.on=function(a,b,c){arguments.length<3&&(c=!1);var d="__on"+a,e=a.indexOf(".");e>0&&(a=a.substring(0,e));return arguments.length<2?(e=this.node()[d])&&e._:this.each(function(e,f){function h(a){var c=d3.event;d3.event=a;try{b.call(g,g.__data__,f)}finally{d3.event=c}}var g=this;g[d]&&g.removeEventListener(a,g[d],c),b&&g.addEventListener(a,g[d]=h,c),h._=b})},$.each=function(a){for(var b=-1,c=this.length;++b<c;)for(var d=this[b],e=-1,f=d.length;++e<f;){var g=d[e];g&&a.call(g,g.__data__,e,b)}return this},$.call=function(a){a.apply(this,(arguments[0]=this,arguments));return this},$.empty=function(){return!this.node()},$.node=function(a){for(var b=0,c=this.length;b<c;b++)for(var d=this[b],e=0,f=d.length;e<f;e++){var g=d[e];if(g)return g}return null},$.transition=function(){var a=[],b,c;for(var d=-1,e=this.length;++d<e;){a.push(b=[]);for(var f=this[d],g=-1,h=f.length;++g<h;)b.push((c=f[g])?{node:c,delay:0,duration:250}:null)}return bi(a,bo||++bn)};var bh=X([[document]]);bh[0].parentNode=document.documentElement,d3.select=function(a){return typeof a=="string"?bh.select(a):X([[a]])},d3.selectAll=function(a){return typeof a=="string"?bh.selectAll(a):X([d(a)])};var bj={},bm=[],bn=0,bo=0,bp=d3.ease("cubic-in-out");bm.call=$.call,d3.transition=function(){return bh.transition()},d3.transition.prototype=bm,bm.select=function(a){var b=[],c,d,e;typeof a!="function"&&(a=_(a));for(var f=-1,g=this.length;++f<g;){b.push(c=[]);for(var h=this[f],i=-1,j=h.length;++i<j;)(e=h[i])&&(d=a.call(e.node,e.node.__data__,i))?("__data__"in e.node&&(d.__data__=e.node.__data__),c.push({node:d,delay:e.delay,duration:e.duration})):c.push(null)}return bi(b,this.id).ease(this.ease())},bm.selectAll=function(a){var b=[],c,d,e;typeof a!="function"&&(a=ba(a));for(var f=-1,g=this.length;++f<g;)for(var h=this[f],i=-1,j=h.length;++i<j;)if(e=h[i]){d=a.call(e.node,e.node.__data__,i),b.push(c=[]);for(var k=-1,l=d.length;++k<l;)c.push({node:d[k],delay:e.delay,duration:e.duration})}return bi(b,this.id).ease(this.ease())},bm.attr=function(a,b){return this.attrTween(a,bl(b))},bm.attrTween=function(a,b){function e(a,d){var e=b.call(this,a,d,this.getAttributeNS(c.space,c.local));return e===bj?(this.removeAttributeNS(c.space,c.local),null):e&&function(a){this.setAttributeNS(c.space,c.local,e(a))}}function d(a,d){var e=b.call(this,a,d,this.getAttribute(c));return e===bj?(this.removeAttribute(c),null):e&&function(a){this.setAttribute(c,e(a))}}var c=d3.ns.qualify(a);return this.tween("attr."+a,c.local?e:d)},bm.style=function(a,b,c){arguments.length<3&&(c="");return this.styleTween(a,bl(b),c)},bm.styleTween=function(a,b,c){arguments.length<3&&(c="");return this.tween("style."+a,function(d,e){var f=b.call(this,d,e,window.getComputedStyle(this,null).getPropertyValue(a));return f===bj?(this.style.removeProperty(a),null):f&&function(b){this.style.setProperty(a,f(b),c)}})},bm.text=function(a){return this.tween("text",function(b,c){this.textContent=typeof a=="function"?a.call(this,b,c):a})},bm.remove=function(){return this.each("end",function(){var a;!this.__transition__&&(a=this.parentNode)&&a.removeChild(this)})},bm.delay=function(a){var b=this;return b.each(typeof a=="function"?function(c,d,e){b[e][d].delay=+a.apply(this,arguments)}:(a=+a,function(c,d,e){b[e][d].delay=a}))},bm.duration=function(a){var b=this;return b.each(typeof a=="function"?function(c,d,e){b[e][d].duration=+a.apply(this,arguments)}:(a=+a,function(c,d,e){b[e][d].duration=a}))},bm.transition=function(){return this.select(i)};var br=null,bs,bt;d3.timer=function(a,b,c){var d=!1,e,f=br;if(arguments.length<3){if(arguments.length<2)b=0;else if(!isFinite(b))return;c=Date.now()}while(f){if(f.callback===a){f.then=c,f.delay=b,d=!0;break}e=f,f=f.next}d||(br={callback:a,then:c,delay:b,next:br}),bs||(bt=clearTimeout(bt),bs=1,bw(bu))},d3.timer.flush=function(){var a,b=Date.now(),c=br;while(c)a=b-c.then,c.delay||(c.flush=c.callback(a)),c=c.next;bv()};var bw=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,17)};d3.scale={},d3.scale.linear=function(){return bB([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return bJ(d3.scale.linear(),bL)};var bK=d3.format("e");bL.pow=function(a){return Math.pow(10,a)},bM.pow=function(a){return-Math.pow(10,-a)},d3.scale.pow=function(){return bN(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return bP([],{t:"range",x:[]})},d3.scale.category10=function(){return d3.scale.ordinal().range(bQ)},d3.scale.category20=function(){return d3.scale.ordinal().range(bR)},d3.scale.category20b=function(){return d3.scale.ordinal().range(bS)},d3.scale.category20c=function(){return d3.scale.ordinal().range(bT)};var bQ=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],bR=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],bS=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],bT=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return bU([],[])},d3.scale.quantize=function(){return bV(0,1,[0,1])},d3.svg={},d3.svg.arc=function(){function e(){var e=a.apply(this,arguments),f=b.apply(this,arguments),g=c.apply(this,arguments)+bW,h=d.apply(this,arguments)+bW,i=(h<g&&(i=g,g=h,h=i),h-g),j=i<Math.PI?"0":"1",k=Math.cos(g),l=Math.sin(g),m=Math.cos(h),n=Math.sin(h);return i>=bX?e?"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+ -f+"A"+f+","+f+" 0 1,1 0,"+f+"M0,"+e+"A"+e+","+e+" 0 1,0 0,"+ -e+"A"+e+","+e+" 0 1,0 0,"+e+"Z":"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+ -f+"A"+f+","+f+" 0 1,1 0,"+f+"Z":e?"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L"+e*m+","+e*n+"A"+e+","+e+" 0 "+j+",0 "+e*k+","+e*l+"Z":"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L0,0"+"Z"}var a=bY,b=bZ,c=b$,d=b_;e.innerRadius=function(b){if(!arguments.length)return a;a=d3.functor(b);return e},e.outerRadius=function(a){if(!arguments.length)return b;b=d3.functor(a);return e},e.startAngle=function(a){if(!arguments.length)return c;c=d3.functor(a);return e},e.endAngle=function(a){if(!arguments.length)return d;d=d3.functor(a);return e},e.centroid=function(){var e=(a.apply(this,arguments)+b.apply(this,arguments))/2,f=(c.apply(this,arguments)+d.apply(this,arguments))/2+bW;return[Math.cos(f)*e,Math.sin(f)*e]};return e};var bW=-Math.PI/2,bX=2*Math.PI-1e-6;d3.svg.line=function(){return ca(Object)};var ce={linear:cf,"step-before":cg,"step-after":ch,basis:cn,"basis-open":co,"basis-closed":cp,bundle:cq,cardinal:ck,"cardinal-open":ci,"cardinal-closed":cj,monotone:cz},cs=[0,2/3,1/3,0],ct=[0,1/3,2/3,0],cu=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var a=ca(cA);a.radius=a.x,delete a.x,a.angle=a.y,delete a.y;return a},cg.reverse=ch,ch.reverse=cg,d3.svg.area=function(){return cB(Object)},d3.svg.area.radial=function(){var a=cB(cA);a.radius=a.x,delete a.x,a.innerRadius=a.x0,delete a.x0,a.outerRadius=a.x1,delete a.x1,a.angle=a.y,delete a.y,a.startAngle=a.y0,delete a.y0,a.endAngle=a.y1,delete a.y1;return a},d3.svg.chord=function(){function j(a,b,c,d){return"Q 0,0 "+d}function i(a,b){return"A"+a+","+a+" 0 0,1 "+b}function h(a,b){return a.a0==b.a0&&a.a1==b.a1}function g(a,b,f,g){var h=b.call(a,f,g),i=c.call(a,h,g),j=d.call(a,h,g)+bW,k=e.call(a,h,g)+bW;return{r:i,a0:j,a1:k,p0:[i*Math.cos(j),i*Math.sin(j)],p1:[i*Math.cos(k),i*Math.sin(k)]}}function f(c,d){var e=g(this,a,c,d),f=g(this,b,c,d);return"M"+e.p0+i(e.r,e.p1)+(h(e,f)?j(e.r,e.p1,e.r,e.p0):j(e.r,e.p1,f.r,f.p0)+i(f.r,f.p1)+j(f.r,f.p1,e.r,e.p0))+"Z"}var a=cE,b=cF,c=cG,d=b$,e=b_;f.radius=function(a){if(!arguments.length)return c;c=d3.functor(a);return f},f.source=function(b){if(!arguments.length)return a;a=d3.functor(b);return f},f.target=function(a){if(!arguments.length)return b;b=d3.functor(a);return f},f.startAngle=function(a){if(!arguments.length)return d;d=d3.functor(a);return f},f.endAngle=function(a){if(!arguments.length)return e;e=d3.functor(a);return f};return f},d3.svg.diagonal=function(){function d(d,e){var f=a.call(this,d,e),g=b.call(this,d,e),h=(f.y+g.y)/2,i=[f,{x:f.x,y:h},{x:g.x,y:h},g];i=i.map(c);return"M"+i[0]+"C"+i[1]+" "+i[2]+" "+i[3]}var a=cE,b=cF,c=cJ;d.source=function(b){if(!arguments.length)return a;a=d3.functor(b);return d},d.target=function(a){if(!arguments.length)return b;b=d3.functor(a);return d},d.projection=function(a){if(!arguments.length)return c;c=a;return d};return d},d3.svg.diagonal.radial=function(){var a=d3.svg.diagonal(),b=cJ,c=a.projection;a.projection=function(a){return arguments.length?c(cK(b=a)):b};return a},d3.svg.mouse=function(a){return cM(a,d3.event)};var cL=/WebKit/.test(navigator.userAgent)?-1:0;d3.svg.touches=function(a){var b=d3.event.touches;return b?d(b).map(function(b){var c=cM(a,b);c.identifier=b.identifier;return c}):[]},d3.svg.symbol=function(){function c(c,d){return(cP[a.call(this,c,d)]||cP.circle)(b.call(this,c,d))}var a=cO,b=cN;c.type=function(b){if(!arguments.length)return a;a=d3.functor(b);return c},c.size=function(a){if(!arguments.length)return b;b=d3.functor(a);return c};return c};var cP={circle:function(a){var b=Math.sqrt(a/Math.PI);return"M0,"+b+"A"+b+","+b+" 0 1,1 0,"+ -b+"A"+b+","+b+" 0 1,1 0,"+b+"Z"},cross:function(a){var b=Math.sqrt(a/5)/2;return"M"+ -3*b+","+ -b+"H"+ -b+"V"+ -3*b+"H"+b+"V"+ -b+"H"+3*b+"V"+b+"H"+b+"V"+3*b+"H"+ -b+"V"+b+"H"+ -3*b+"Z"},diamond:function(a){var b=Math.sqrt(a/(2*cR)),c=b*cR;return"M0,"+ -b+"L"+c+",0"+" 0,"+b+" "+ -c+",0"+"Z"},square:function(a){var b=Math.sqrt(a)/2;return"M"+ -b+","+ -b+"L"+b+","+ -b+" "+b+","+b+" "+ -b+","+b+"Z"},"triangle-down":function(a){var b=Math.sqrt(a/cQ),c=b*cQ/2;return"M0,"+c+"L"+b+","+ -c+" "+ -b+","+ -c+"Z"},"triangle-up":function(a){var b=Math.sqrt(a/cQ),c=b*cQ/2;return"M0,"+ -c+"L"+b+","+c+" "+ -b+","+c+"Z"}};d3.svg.symbolTypes=d3.keys(cP);var cQ=Math.sqrt(3),cR=Math.tan(30*Math.PI/180);d3.svg.axis=function(){function j(j){j.each(function(k,l,m){function F(a){return j.delay?a.transition().delay(j[m][l].delay).duration(j[m][l].duration).ease(j.ease()):a}var n=d3.select(this),o=a.ticks.apply(a,g),p=h==null?a.tickFormat.apply(a,g):h,q=cU(a,o,i),r=n.selectAll(".minor").data(q,String),s=r.enter().insert("svg:line","g").attr("class","tick minor").style("opacity",1e-6),t=F(r.exit()).style("opacity",1e-6).remove(),u=F(r).style("opacity",1),v=n.selectAll("g").data(o,String),w=v.enter().insert("svg:g","path").style("opacity",1e-6),x=F(v.exit()).style("opacity",1e-6).remove(),y=F(v).style("opacity",1),z,A=by(a.range()),B=n.selectAll(".domain").data([0]),C=B.enter().append("svg:path").attr("class","domain"),D=F(B),E=this.__chart__||a;this.__chart__=a.copy(),w.append("svg:line").attr("class","tick"),w.append("svg:text"),y.select("text").text(p);switch(b){case"bottom":z=cS,u.attr("y2",d),w.select("text").attr("dy",".71em").attr("text-anchor","middle"),y.select("line").attr("y2",c),y.select("text").attr("y",Math.max(c,0)+f),D.attr("d","M"+A[0]+","+e+"V0H"+A[1]+"V"+e);break;case"top":z=cS,u.attr("y2",-d),w.select("text").attr("text-anchor","middle"),y.select("line").attr("y2",-c),y.select("text").attr("y",-(Math.max(c,0)+f)),D.attr("d","M"+A[0]+","+ -e+"V0H"+A[1]+"V"+ -e);break;case"left":z=cT,u.attr("x2",-d),w.select("text").attr("dy",".32em").attr("text-anchor","end"),y.select("line").attr("x2",-c),y.select("text").attr("x",-(Math.max(c,0)+f)),D.attr("d","M"+ -e+","+A[0]+"H0V"+A[1]+"H"+ -e);break;case"right":z=cT,u.attr("x2",d),w.select("text").attr("dy",".32em"),y.select("line").attr("x2",c),y.select("text").attr("x",Math.max(c,0)+f),D.attr("d","M"+e+","+A[0]+"H0V"+A[1]+"H"+e)}w.call(z,E),y.call(z,a),x.call(z,a),s.call(z,E),u.call(z,a),t.call(z,a)})}var a=d3.scale.linear(),b="bottom",c=6,d=6,e=6,f=3,g=[10],h,i=0;j.scale=function(b){if(!arguments.length)return a;a=b;return j},j.orient=function(a){if(!arguments.length)return b;b=a;return j},j.ticks=function(){if(!arguments.length)return g;g=arguments;return j},j.tickFormat=function(a){if(!arguments.length)return h;h=a;return j},j.tickSize=function(a,b,f){if(!arguments.length)return c;var g=arguments.length-1;c=+a,d=g>1?+b:c,e=g>0?+arguments[g]:c;return j},j.tickPadding=function(a){if(!arguments.length)return f;f=+a;return j},j.tickSubdivide=function(a){if(!arguments.length)return i;i=+a;return j};return j},d3.behavior={},d3.behavior.drag=function(){function d(){c.apply(this,arguments),da("dragstart")}function c(){cV=a,cW=d3.event.target,cZ=db((cX=this).parentNode),c$=0,cY=arguments}function b(){this.on("mousedown.drag",d).on("touchstart.drag",d),d3.select(window).on("mousemove.drag",dc).on("touchmove.drag",dc).on("mouseup.drag",dd,!0).on("touchend.drag",dd,!0).on("click.drag",de,!0)}var a=d3.dispatch("drag","dragstart","dragend");b.on=function(c,d){a[c].add(d);return b};return b};var cV,cW,cX,cY,cZ,c$,c_;d3.behavior.zoom=function(){function h(){d.apply(this,arguments);var b=dv(),c,e=Date.now();b.length===1&&e-dk<300&&dA(1+Math.floor(a[2]),c=b[0],dj[c.identifier]),dk=e}function g(){d.apply(this,arguments);var b=d3.svg.mouse(dp);dA(d3.event.shiftKey?Math.ceil(a[2]-1):Math.floor(a[2]+1),b,dt(b))}function f(){d.apply(this,arguments),di||(di=dt(d3.svg.mouse(dp))),dA(du()+a[2],d3.svg.mouse(dp),di)}function e(){d.apply(this,arguments),dh=dt(d3.svg.mouse(dp)),dr=!1,d3.event.preventDefault(),window.focus()}function d(){dl=a,dm=b.zoom.dispatch,dn=d3.event.target,dp=this,dq=arguments}function c(){this.on("mousedown.zoom",e).on("mousewheel.zoom",f).on("DOMMouseScroll.zoom",f).on("dblclick.zoom",g).on("touchstart.zoom",h),d3.select(window).on("mousemove.zoom",dx).on("mouseup.zoom",dy).on("touchmove.zoom",dw).on("touchend.zoom",dv).on("click.zoom",dz,!0)}var a=[0,0,0],b=d3.dispatch("zoom");c.on=function(a,d){b[a].add(d);return c};return c};var dg,dh,di,dj={},dk=0,dl,dm,dn,dp,dq,dr,ds})()
{
"name": "d3",
"version": "2.3.2",
"version": "2.3.3",
"description": "A small, free JavaScript library for manipulating documents based on data.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,1 +0,1 @@

d3 = {version: "2.3.2"}; // semver
d3 = {version: "2.3.3"}; // semver
d3.hsl = function(h, s, l) {
return arguments.length === 1
? d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl)
? (h instanceof d3_Hsl ? d3_hsl(h.h, h.s, h.l)
: d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl))
: d3_hsl(+h, +s, +l);

@@ -32,3 +33,3 @@ };

d3_Hsl.prototype.toString = function() {
return "hsl(" + this.h + "," + this.s * 100 + "%," + this.l * 100 + "%)";
return this.rgb().toString();
};

@@ -35,0 +36,0 @@

@@ -105,6 +105,6 @@ d3.interpolate = function(a, b) {

return function(t) {
return "rgb(" + Math.round(ar + br * t)
+ "," + Math.round(ag + bg * t)
+ "," + Math.round(ab + bb * t)
+ ")";
return "#"
+ d3_rgb_hex(Math.round(ar + br * t))
+ d3_rgb_hex(Math.round(ag + bg * t))
+ d3_rgb_hex(Math.round(ab + bb * t));
};

@@ -111,0 +111,0 @@ };

d3.rgb = function(r, g, b) {
return arguments.length === 1
? d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb)
? (r instanceof d3_Rgb ? d3_rgb(r.r, r.g, r.b)
: d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb))
: d3_rgb(~~r, ~~g, ~~b);

@@ -28,5 +29,5 @@ };

return d3_rgb(
Math.min(255, Math.floor(r / k)),
Math.min(255, Math.floor(g / k)),
Math.min(255, Math.floor(b / k)));
Math.min(255, Math.floor(r / k)),
Math.min(255, Math.floor(g / k)),
Math.min(255, Math.floor(b / k)));
};

@@ -37,5 +38,5 @@

return d3_rgb(
Math.max(0, Math.floor(k * this.r)),
Math.max(0, Math.floor(k * this.g)),
Math.max(0, Math.floor(k * this.b)));
Math.floor(k * this.r),
Math.floor(k * this.g),
Math.floor(k * this.b));
};

@@ -52,3 +53,5 @@

function d3_rgb_hex(v) {
return v < 0x10 ? "0" + v.toString(16) : v.toString(16);
return v < 0x10
? "0" + Math.max(0, v).toString(16)
: Math.min(255, v).toString(16);
}

@@ -55,0 +58,0 @@

d3_selectionPrototype.classed = function(name, value) {
var names = name.split(d3_selection_classedWhitespace),
n = names.length,
i = -1;
if (arguments.length > 1) {
while (++i < n) d3_selection_classed.call(this, names[i], value);
return this;
} else {
while (++i < n) if (!d3_selection_classed.call(this, names[i])) return false;
return true;
}
};
var d3_selection_classedWhitespace = /\s+/g;
function d3_selection_classed(name, value) {
var re = new RegExp("(^|\\s+)" + d3.requote(name) + "(\\s+|$)", "g");

@@ -46,2 +61,2 @@

: classedRemove);
};
}

@@ -5,10 +5,10 @@ d3_transitionPrototype.attr = function(name, value) {

d3_transitionPrototype.attrTween = function(name, tween) {
name = d3.ns.qualify(name);
d3_transitionPrototype.attrTween = function(nameNS, tween) {
var name = d3.ns.qualify(nameNS);
function attrTween(d, i) {
var f = tween.call(this, d, i, this.getAttribute(name));
return f && function(t) {
this.setAttribute(name, f(t));
};
return f === d3_transitionRemove
? (this.removeAttribute(name), null)
: f && function(t) { this.setAttribute(name, f(t)); };
}

@@ -18,8 +18,8 @@

var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));
return f && function(t) {
this.setAttributeNS(name.space, name.local, f(t));
};
return f === d3_transitionRemove
? (this.removeAttributeNS(name.space, name.local), null)
: f && function(t) { this.setAttributeNS(name.space, name.local, f(t)); };
}
return this.tween("attr." + name, name.local ? attrTweenNS : attrTween);
return this.tween("attr." + nameNS, name.local ? attrTweenNS : attrTween);
};

@@ -10,6 +10,6 @@ d3_transitionPrototype.style = function(name, value, priority) {

var f = tween.call(this, d, i, window.getComputedStyle(this, null).getPropertyValue(name));
return f && function(t) {
this.style.setProperty(name, f(t), priority);
};
return f === d3_transitionRemove
? (this.style.removeProperty(name), null)
: f && function(t) { this.style.setProperty(name, f(t), priority); };
});
};

@@ -88,6 +88,24 @@ function d3_transition(groups, id) {

var d3_transitionRemove = {};
function d3_transitionNull(d, i, a) {
return a != "" && d3_transitionRemove;
}
function d3_transitionTween(b) {
return typeof b === "function"
? function(d, i, a) { var v = b.call(this, d, i) + ""; return a != v && d3.interpolate(a, v); }
: (b = b + "", function(d, i, a) { return a != b && d3.interpolate(a, b); });
function transitionFunction(d, i, a) {
var v = b.call(this, d, i);
return v == null
? a != "" && d3_transitionRemove
: a != v && d3.interpolate(a, v);
}
function transitionString(d, i, a) {
return a != b && d3.interpolate(a, b);
}
return typeof b === "function" ? transitionFunction
: b == null ? d3_transitionNull
: (b += "", transitionString);
}

@@ -94,0 +112,0 @@

@@ -6,4 +6,5 @@ function d3_svg_area(projection) {

y1 = d3_svg_lineY,
interpolate = "linear",
interpolator = d3_svg_lineInterpolators[interpolate],
interpolate,
i0,
i1,
tension = .7;

@@ -15,4 +16,4 @@

points1 = d3_svg_linePoints(this, d, x0 === x1 ? d3_svg_areaX(points0) : x1, y0 === y1 ? d3_svg_areaY(points0) : y1);
return "M" + interpolator(projection(points1), tension)
+ "L" + interpolator(projection(points0.reverse()), tension)
return "M" + i0(projection(points1), tension)
+ "L" + i1(projection(points0.reverse()), tension)
+ "Z";

@@ -59,3 +60,4 @@ }

if (!arguments.length) return interpolate;
interpolator = d3_svg_lineInterpolators[interpolate = x];
i0 = d3_svg_lineInterpolators[interpolate = x];
i1 = i0.reverse || i0;
return area;

@@ -70,5 +72,8 @@ };

return area;
return area.interpolate("linear");
}
d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;
d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;
d3.svg.area = function() {

@@ -75,0 +80,0 @@ return d3_svg_area(Object);

@@ -35,3 +35,3 @@ require("../env");

color.l += .1;
assert.equal(color + "", "hsl(181,60%,70%)");
assert.equal(color + "", "#85dfe0");
},

@@ -76,10 +76,5 @@ "parses hexadecimal shorthand format (e.g., \"#abc\")": function(hsl) {

},
"string coercion returns HSL format": function(hsl) {
var re = /^hsl\([0-9]+(.[0-9]+)?,[0-9.]+%,[0-9.]+%\)$/;
assert.match(hsl("#abcdef"), re);
assert.match(hsl("moccasin"), re);
assert.strictEqual(hsl("hsl(60, 100%, 20%)") + "", "hsl(60,100%,20%)");
assert.match(hsl("rgb(12, 34, 56))"), re);
assert.match(hsl(d3.rgb(12, 34, 56)), re);
assert.strictEqual(hsl(d3.hsl(60, 1, .2)) + "", "hsl(60,100%,20%)");
"string coercion returns RGB format": function(hsl) {
assert.strictEqual(hsl("hsl(60, 100%, 20%)") + "", "#666600");
assert.strictEqual(hsl(d3.hsl(60, 1, .2)) + "", "#666600");
}

@@ -86,0 +81,0 @@ }

@@ -18,3 +18,3 @@ require("../env");

"interpolates colors": function(interpolate) {
assert.equal(interpolate("#abcdef", "#fedcba")(.4), "rgb(204,211,218)");
assert.equal(interpolate("#abcdef", "#fedcba")(.4), "#ccd3da");
},

@@ -87,18 +87,18 @@ "interpolates strings": function(interpolate) {

"parses string input": function(interpolate) {
assert.equal(interpolate("steelblue", "#f00")(.2), "rgb(107,104,144)");
assert.equal(interpolate("steelblue", "#f00")(.6), "rgb(181,52,72)");
assert.equal(interpolate("steelblue", "#f00")(.2), "#6b6890");
assert.equal(interpolate("steelblue", "#f00")(.6), "#b53448");
},
"parses d3.rgb input": function(interpolate) {
assert.equal(interpolate(d3.rgb("steelblue"), "#f00")(.2), "rgb(107,104,144)");
assert.equal(interpolate("steelblue", d3.rgb(255, 0, 0))(.6), "rgb(181,52,72)");
assert.equal(interpolate(d3.rgb("steelblue"), "#f00")(.2), "#6b6890");
assert.equal(interpolate("steelblue", d3.rgb(255, 0, 0))(.6), "#b53448");
},
"parses d3.hsl input": function(interpolate) {
assert.equal(interpolate(d3.hsl("steelblue"), "#f00")(.2), "rgb(107,104,144)");
assert.equal(interpolate("steelblue", d3.hsl(0, 1, .5))(.6), "rgb(181,52,72)");
assert.equal(interpolate(d3.hsl("steelblue"), "#f00")(.2), "#6b6890");
assert.equal(interpolate("steelblue", d3.hsl(0, 1, .5))(.6), "#b53448");
},
"interpolates in RGB color space": function(interpolate) {
assert.equal(interpolate("steelblue", "#f00")(.2), "rgb(107,104,144)");
assert.equal(interpolate("steelblue", "#f00")(.2), "#6b6890");
},
"outputs an RGB string": function(interpolate) {
assert.equal(interpolate("steelblue", "#f00")(.2), "rgb(107,104,144)");
assert.equal(interpolate("steelblue", "#f00")(.2), "#6b6890");
}

@@ -167,6 +167,6 @@ }

"interpolates color properties as rgb": function(interpolate) {
assert.deepEqual(interpolate({background: "red"}, {background: "green"})(.5), {background: "rgb(128,64,0)"});
assert.deepEqual(interpolate({fill: "red"}, {fill: "green"})(.5), {fill: "rgb(128,64,0)"});
assert.deepEqual(interpolate({stroke: "red"}, {stroke: "green"})(.5), {stroke: "rgb(128,64,0)"});
assert.deepEqual(interpolate({color: "red"}, {color: "green"})(.5), {color: "rgb(128,64,0)"});
assert.deepEqual(interpolate({background: "red"}, {background: "green"})(.5), {background: "#804000"});
assert.deepEqual(interpolate({fill: "red"}, {fill: "green"})(.5), {fill: "#804000"});
assert.deepEqual(interpolate({stroke: "red"}, {stroke: "green"})(.5), {stroke: "#804000"});
assert.deepEqual(interpolate({color: "red"}, {color: "green"})(.5), {color: "#804000"});
},

@@ -173,0 +173,0 @@ "interpolates nested objects and arrays": function(interpolate) {

@@ -94,4 +94,4 @@ require("../env");

div.attr("bgcolor", d3.interpolateRgb("brown", "steelblue"));
assert.equal(div[0][0].getAttribute("bgcolor"), "rgb(165,42,42)");
assert.equal(div[0][1].getAttribute("bgcolor"), "rgb(70,130,180)");
assert.equal(div[0][0].getAttribute("bgcolor"), "#a52a2a");
assert.equal(div[0][1].getAttribute("bgcolor"), "#4682b4");
},

@@ -98,0 +98,0 @@ "sets an attribute as a function of index": function(div) {

@@ -86,2 +86,21 @@ require("../env");

assert.isTrue(body.classed("foo", true) === body);
},
"adds missing classes as true": function(body) {
body.attr("class", null);
body.classed("foo bar", true);
assert.equal(document.body.className, "foo bar");
},
"gets existing classes": function(body) {
body.attr("class", " foo\tbar baz");
assert.isTrue(body.classed("foo"));
assert.isTrue(body.classed("foo bar"));
assert.isTrue(body.classed("bar baz"));
assert.isTrue(body.classed("foo bar baz"));
},
"does not get missing classes": function(body) {
body.attr("class", " foo\tbar baz");
assert.isFalse(body.classed("foob"));
assert.isFalse(body.classed("foob bar"));
assert.isFalse(body.classed("bar baz blah"));
assert.isFalse(body.classed("foo bar baz moo"));
}

@@ -88,0 +107,0 @@ }

@@ -61,4 +61,4 @@ require("../env");

div.property("bgcolor", d3.interpolateRgb("brown", "steelblue"));
assert.equal(div[0][0].bgcolor, "rgb(165,42,42)");
assert.equal(div[0][1].bgcolor, "rgb(70,130,180)");
assert.equal(div[0][0].bgcolor, "#a52a2a");
assert.equal(div[0][1].bgcolor, "#4682b4");
},

@@ -65,0 +65,0 @@ "gets a property value": function(div) {

@@ -65,4 +65,4 @@ require("../env");

div.style("background-color", d3.interpolateRgb("orange", "yellow"));
assert.equal(div[0][0].style["background-color"], "rgb(255,165,0)");
assert.equal(div[0][1].style["background-color"], "rgb(255,255,0)");
assert.equal(div[0][0].style["background-color"], "#ffa500");
assert.equal(div[0][1].style["background-color"], "#ffff00");
},

@@ -69,0 +69,0 @@ "gets a property value": function(div) {

@@ -11,9 +11,18 @@ require("../env");

var s = d3.select("body").append("div")
.attr("display", "none")
.attr("font-size", "20px")
.attr("width", 20)
.attr("color", "red");
.attr("color", "red")
.attr("xlink:type", "simple")
.attr("xlink:href", "http://mbostock.github.com/d3/");
var t = s.transition()
.attr("display", null)
.attr("font-size", function() { return null; })
.attr("display", null)
.attr("width", 100)
.attr("width", 200)
.attr("color", function() { return "green"; })
.attr("xlink:href", null)
.attr("xlink:type", function() { return null; })
.each("end", function() { cb(null, {selection: s, transition: t}); });

@@ -32,4 +41,16 @@ },

"sets an attribute as a function": function(result) {
assert.equal(result.selection.attr("color"), "rgb(0,128,0)");
assert.equal(result.selection.attr("color"), "#008000");
},
"removes an attribute using a constant null": function(result) {
assert.equal(result.selection.attr("display"), "");
},
"removes an attribute using a function null": function(result) {
assert.equal(result.selection.attr("font-size"), "");
},
"removes a namespaced attribute using a constant null": function(result) {
assert.equal(result.selection.attr("xlink:href"), "");
},
"removes a namespaced attribute using a function null": function(result) {
assert.equal(result.selection.attr("xlink:type"), "");
}
};

@@ -12,5 +12,10 @@ require("../env");

.style("background-color", "white")
.style("color", "red");
.style("color", "red")
.style("display", "none")
.style("font-size", "20px");
var t = s.transition()
.style("display", null)
.style("font-size", function() { return null; })
.style("display", null)
.style("background-color", "green")

@@ -26,9 +31,9 @@ .style("background-color", "red")

"the last style operator takes precedence": function(result) {
assert.equal(result.selection.style("background-color"), "rgb(255,0,0)");
assert.equal(result.selection.style("background-color"), "#ff0000");
},
"sets a property as a string": function(result) {
assert.equal(result.selection.style("background-color"), "rgb(255,0,0)");
assert.equal(result.selection.style("background-color"), "#ff0000");
},
"sets a property as a function": function(result) {
assert.equal(result.selection.style("color"), "rgb(0,128,0)");
assert.equal(result.selection.style("color"), "#008000");
},

@@ -39,3 +44,9 @@ "observes the specified priority": function(result) {

assert.equal(style.getPropertyPriority("color"), "important");
},
"removes a property using a constant null": function(result) {
assert.equal(result.selection.style("display"), "");
},
"removes a property using a function null": function(result) {
assert.equal(result.selection.style("font-size"), "");
}
};

@@ -65,3 +65,3 @@ require("../env");

"uses the returned tweener": function(result) {
assert.equal(result.selection[0][1].textContent, "hsl(230,50%,100%)");
assert.equal(result.selection[0][1].textContent, "#ffffff");
},

@@ -68,0 +68,0 @@ "does nothing if the tweener is falsey": function(result) {

@@ -29,3 +29,3 @@ var assert = require("assert");

if (Math.abs(actual.h - h) > 1e-6 || Math.abs(actual.s - s) > 1e-6 || Math.abs(actual.l - l) > 1e-6) {
assert.fail(actual+"", "hsl(" + h + "," + (s * 100) + "%," + (l * 100) + "%)", message || "expected {expected}, got {actual}", null, assert.hslEqual);
assert.fail("hsl(" + actual.h + "," + (actual.s * 100) + "%," + (actual.l * 100) + "%)", "hsl(" + h + "," + (s * 100) + "%," + (l * 100) + "%)", message || "expected {expected}, got {actual}", null, assert.hslEqual);
}

@@ -32,0 +32,0 @@ };

@@ -42,11 +42,11 @@ require("../env");

var x = linear().domain([-10, 0, 100]).range(["red", "white", "green"]);
assert.equal(x(-5), "rgb(255,128,128)");
assert.equal(x(50), "rgb(128,192,128)");
assert.equal(x(75), "rgb(64,160,64)");
assert.equal(x(-5), "#ff8080");
assert.equal(x(50), "#80c080");
assert.equal(x(75), "#40a040");
},
"an empty domain maps to the range start": function(linear) {
var x = linear().domain([0, 0]).range(["red", "green"]);
assert.equal(x(0), "rgb(255,0,0)");
assert.equal(x(-1), "rgb(255,0,0)");
assert.equal(x(1), "rgb(255,0,0)");
assert.equal(x(0), "#ff0000");
assert.equal(x(-1), "#ff0000");
assert.equal(x(1), "#ff0000");
}

@@ -68,17 +68,17 @@ },

var x = linear().range(["red", "blue"]);
assert.equal(x(.5), "rgb(128,0,128)");
assert.equal(x(.5), "#800080");
var x = linear().range(["#ff0000", "#0000ff"]);
assert.equal(x(.5), "rgb(128,0,128)");
assert.equal(x(.5), "#800080");
var x = linear().range(["#f00", "#00f"]);
assert.equal(x(.5), "rgb(128,0,128)");
assert.equal(x(.5), "#800080");
var x = linear().range([d3.rgb(255,0,0), d3.hsl(240,1,.5)]);
assert.equal(x(.5), "rgb(128,0,128)");
assert.equal(x(.5), "#800080");
var x = linear().range(["hsl(0,100%,50%)", "hsl(240,100%,50%)"]);
assert.equal(x(.5), "rgb(128,0,128)");
assert.equal(x(.5), "#800080");
},
"can specify range values as arrays or objects": function(linear) {
var x = linear().range([{color: "red"}, {color: "blue"}]);
assert.deepEqual(x(.5), {color: "rgb(128,0,128)"});
assert.deepEqual(x(.5), {color: "#800080"});
var x = linear().range([["red"], ["blue"]]);
assert.deepEqual(x(.5), ["rgb(128,0,128)"]);
assert.deepEqual(x(.5), ["#800080"]);
}

@@ -91,3 +91,3 @@ },

assert.equal(x.interpolate(), d3.interpolate);
assert.equal(x(.5), "rgb(128,0,128)");
assert.equal(x(.5), "#800080");
},

@@ -224,3 +224,3 @@ "can specify a custom interpolator": function(linear) {

assert.equal(x(0.5), "#00ff00");
assert.equal(y(0.5), "rgb(128,0,128)");
assert.equal(y(0.5), "#800080");
assert.equal(y.interpolate(), d3.interpolate);

@@ -227,0 +227,0 @@ },

@@ -51,5 +51,5 @@ require("../env");

var x = log().domain([.1, 1, 100]).range(["red", "white", "green"]);
assert.equal(x(.5), "rgb(255,178,178)");
assert.equal(x(50), "rgb(38,147,38)");
assert.equal(x(75), "rgb(16,136,16)");
assert.equal(x(.5), "#ffb2b2");
assert.equal(x(50), "#269326");
assert.equal(x(75), "#108810");
}

@@ -71,17 +71,17 @@ },

var x = log().range(["red", "blue"]);
assert.equal(x(5), "rgb(77,0,178)");
assert.equal(x(5), "#4d00b2");
var x = log().range(["#ff0000", "#0000ff"]);
assert.equal(x(5), "rgb(77,0,178)");
assert.equal(x(5), "#4d00b2");
var x = log().range(["#f00", "#00f"]);
assert.equal(x(5), "rgb(77,0,178)");
assert.equal(x(5), "#4d00b2");
var x = log().range([d3.rgb(255,0,0), d3.hsl(240,1,.5)]);
assert.equal(x(5), "rgb(77,0,178)");
assert.equal(x(5), "#4d00b2");
var x = log().range(["hsl(0,100%,50%)", "hsl(240,100%,50%)"]);
assert.equal(x(5), "rgb(77,0,178)");
assert.equal(x(5), "#4d00b2");
},
"can specify range values as arrays or objects": function(log) {
var x = log().range([{color: "red"}, {color: "blue"}]);
assert.deepEqual(x(5), {color: "rgb(77,0,178)"});
assert.deepEqual(x(5), {color: "#4d00b2"});
var x = log().range([["red"], ["blue"]]);
assert.deepEqual(x(5), ["rgb(77,0,178)"]);
assert.deepEqual(x(5), ["#4d00b2"]);
}

@@ -94,3 +94,3 @@ },

assert.equal(x.interpolate(), d3.interpolate);
assert.equal(x(5), "rgb(77,0,178)");
assert.equal(x(5), "#4d00b2");
},

@@ -238,3 +238,3 @@ "can specify a custom interpolator": function(log) {

assert.equal(x(5), "#00ffcb");
assert.equal(y(5), "rgb(77,0,178)");
assert.equal(y(5), "#4d00b2");
assert.equal(y.interpolate(), d3.interpolate);

@@ -241,0 +241,0 @@ },

@@ -42,5 +42,5 @@ require("../env");

var x = pow().domain([-10, 0, 100]).range(["red", "white", "green"]);
assert.equal(x(-5), "rgb(255,128,128)");
assert.equal(x(50), "rgb(128,192,128)");
assert.equal(x(75), "rgb(64,160,64)");
assert.equal(x(-5), "#ff8080");
assert.equal(x(50), "#80c080");
assert.equal(x(75), "#40a040");
}

@@ -70,17 +70,17 @@ },

var x = pow().range(["red", "blue"]);
assert.equal(x(.5), "rgb(128,0,128)");
assert.equal(x(.5), "#800080");
var x = pow().range(["#ff0000", "#0000ff"]);
assert.equal(x(.5), "rgb(128,0,128)");
assert.equal(x(.5), "#800080");
var x = pow().range(["#f00", "#00f"]);
assert.equal(x(.5), "rgb(128,0,128)");
assert.equal(x(.5), "#800080");
var x = pow().range([d3.rgb(255,0,0), d3.hsl(240,1,.5)]);
assert.equal(x(.5), "rgb(128,0,128)");
assert.equal(x(.5), "#800080");
var x = pow().range(["hsl(0,100%,50%)", "hsl(240,100%,50%)"]);
assert.equal(x(.5), "rgb(128,0,128)");
assert.equal(x(.5), "#800080");
},
"can specify range values as arrays or objects": function(pow) {
var x = pow().range([{color: "red"}, {color: "blue"}]);
assert.deepEqual(x(.5), {color: "rgb(128,0,128)"});
assert.deepEqual(x(.5), {color: "#800080"});
var x = pow().range([["red"], ["blue"]]);
assert.deepEqual(x(.5), ["rgb(128,0,128)"]);
assert.deepEqual(x(.5), ["#800080"]);
}

@@ -129,3 +129,3 @@ },

assert.equal(x.interpolate(), d3.interpolate);
assert.equal(x(.5), "rgb(128,0,128)");
assert.equal(x(.5), "#800080");
},

@@ -244,3 +244,3 @@ "can specify a custom interpolator": function(pow) {

assert.equal(x(0.5), "#00ff00");
assert.equal(y(0.5), "rgb(128,0,128)");
assert.equal(y(0.5), "#800080");
assert.equal(y.interpolate(), d3.interpolate);

@@ -247,0 +247,0 @@ },

@@ -42,5 +42,5 @@ require("../env");

var x = sqrt().domain([-10, 0, 100]).range(["red", "white", "green"]);
assert.equal(x(-5), "rgb(255,75,75)");
assert.equal(x(50), "rgb(75,165,75)");
assert.equal(x(75), "rgb(34,145,34)");
assert.equal(x(-5), "#ff4b4b");
assert.equal(x(50), "#4ba54b");
assert.equal(x(75), "#229122");
}

@@ -70,17 +70,17 @@ },

var x = sqrt().range(["red", "blue"]);
assert.equal(x(.25), "rgb(128,0,128)");
assert.equal(x(.25), "#800080");
var x = sqrt().range(["#ff0000", "#0000ff"]);
assert.equal(x(.25), "rgb(128,0,128)");
assert.equal(x(.25), "#800080");
var x = sqrt().range(["#f00", "#00f"]);
assert.equal(x(.25), "rgb(128,0,128)");
assert.equal(x(.25), "#800080");
var x = sqrt().range([d3.rgb(255,0,0), d3.hsl(240,1,.5)]);
assert.equal(x(.25), "rgb(128,0,128)");
assert.equal(x(.25), "#800080");
var x = sqrt().range(["hsl(0,100%,50%)", "hsl(240,100%,50%)"]);
assert.equal(x(.25), "rgb(128,0,128)");
assert.equal(x(.25), "#800080");
},
"can specify range values as arrays or objects": function(sqrt) {
var x = sqrt().range([{color: "red"}, {color: "blue"}]);
assert.deepEqual(x(.25), {color: "rgb(128,0,128)"});
assert.deepEqual(x(.25), {color: "#800080"});
var x = sqrt().range([["red"], ["blue"]]);
assert.deepEqual(x(.25), ["rgb(128,0,128)"]);
assert.deepEqual(x(.25), ["#800080"]);
}

@@ -126,3 +126,3 @@ },

assert.equal(x.interpolate(), d3.interpolate);
assert.equal(x(.5), "rgb(75,0,180)");
assert.equal(x(.5), "#4b00b4");
},

@@ -241,3 +241,3 @@ "can specify a custom interpolator": function(sqrt) {

assert.equal(x(0.5), "#00ffd3");
assert.equal(y(0.5), "rgb(75,0,180)");
assert.equal(y(0.5), "#4b00b4");
assert.equal(y.interpolate(), d3.interpolate);

@@ -244,0 +244,0 @@ },

@@ -139,3 +139,3 @@ require("../env");

var a = area().interpolate("step-before");
assert.pathEqual(a([[0, 0], [1, 1]]), "M0,0V-0.540302H0.841471L0,-1V0H0Z");
assert.pathEqual(a([[0, 0], [1, 1]]), "M0,0V-0.540302H0.841471L0,-1H0V0Z");
assert.equal(a.interpolate(), "step-before");

@@ -142,0 +142,0 @@ },

@@ -139,3 +139,3 @@ require("../env");

var a = area().interpolate("step-before");
assert.pathEqual(a([[0, 0], [1, 1]]), "M0,0V1H1L1,0V0H0Z");
assert.pathEqual(a([[0, 0], [1, 1]]), "M0,0V1H1L1,0H0V0Z");
assert.equal(a.interpolate(), "step-before");

@@ -161,4 +161,4 @@ },

"interpolate(step)": {
"supports step-before interpolation": testInterpolation("step-before"),
"supports step-after interpolation": testInterpolation("step-after")
"supports step-before interpolation": testInterpolation("step-before", "step-after"),
"supports step-after interpolation": testInterpolation("step-after", "step-before")
},

@@ -183,8 +183,9 @@

// An area is just two lines, with one reversed.
function testInterpolation(interpolate) {
function testInterpolation(i0, i1) {
if (arguments.length < 2) i1 = i0;
return function(area) {
var a = area().interpolate(interpolate),
var a = area().interpolate(i0),
d = [[0, 0], [1, 1], [2, 0], [3, 1], [4, 0]],
l0 = d3.svg.line().interpolate(interpolate).x(a.x0()).y(a.y0()),
l1 = d3.svg.line().interpolate(interpolate).x(a.x1()).y(a.y1());
l0 = d3.svg.line().interpolate(i1).x(a.x0()).y(a.y0()),
l1 = d3.svg.line().interpolate(i0).x(a.x1()).y(a.y1());
assert.pathEqual(a(d), l1(d) + "L" + l0(d.reverse()).substring(1) + "Z");

@@ -191,0 +192,0 @@ };

@@ -45,3 +45,3 @@ require("../env");

assert.equal(x(local(2009, 6, 1)), "#04ff00");
assert.equal(y(local(2009, 6, 1)), "rgb(129,0,126)");
assert.equal(y(local(2009, 6, 1)), "#81007e");
assert.equal(y.interpolate(), d3.interpolate);

@@ -48,0 +48,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc