(function(){d3.behavior={};d3.behavior.zoom=function(){function a(){this.on("mousedown",t).on("mousewheel",n).on("DOMMouseScroll",n).on("dblclick",n);d3.select(window).on("mousemove",q).on("mouseup",u)}function t(e,f){c={x0:g-d3.event.clientX,y0:h-d3.event.clientY,target:this,data:e,index:f};d3.event.preventDefault();window.focus()}function q(){a=null;if(c){g=d3.event.clientX+c.x0;h=d3.event.clientY+c.y0;r.call(c.target,c.data,c.index)}}function u(){if(c){q();c=null}}function n(e,f){var b=d3.event; if(!a){var i=d3.svg.mouse(this.nearestViewportElement||this);a={x0:g,y0:h,z0:j,x1:g-i[0],y1:h-i[1]}}if(b.type=="dblclick")j=b.shiftKey?Math.ceil(j-1):Math.floor(j+1);else{i=(b.wheelDelta/120||-b.detail)*0.1;if(o<0){var l=Date.now(),k=l-s;if(k>9&&Math.abs(b.wheelDelta)/k>=50)o=1;s=l}if(o==1)i*=0.03;j+=i}b=Math.pow(2,j-a.z0)-1;g=a.x0+a.x1*b;h=a.y0+a.y1*b;r.call(this,e,f)}function r(e,f){function b(d,m){var v=d.__domain||(d.__domain=d.domain());range=d.range().map(function(w){return(w-m)/l});d.domain(v).domain(range.map(d.invert))} var i=d3.event,l=Math.pow(2,j);d3.event={scale:l,translate:[g,h],transform:function(d,m){d&&b(d,g);m&&b(m,h)}};try{for(var k=0,x=p.length;k