!function(t){t.color={},t.color.make=function(i,e,o,n){var r={};return r.r=i||0,r.g=e||0,r.b=o||0,r.a=null!=n?n:1,r.add=function(t,i){for(var e=0;e=1?"rgb("+[r.r,r.g,r.b].join(",")+")":"rgba("+[r.r,r.g,r.b,r.a].join(",")+")"},r.normalize=function(){function t(t,i,e){return ie?e:i}return r.r=t(0,parseInt(r.r),255),r.g=t(0,parseInt(r.g),255),r.b=t(0,parseInt(r.b),255),r.a=t(0,r.a,1),r},r.clone=function(){return t.color.make(r.r,r.b,r.g,r.a)},r.normalize()},t.color.extract=function(i,e){var o;do{if(""!=(o=i.css(e).toLowerCase())&&"transparent"!=o)break;i=i.parent()}while(!t.nodeName(i.get(0),"body"));return"rgba(0, 0, 0, 0)"==o&&(o="transparent"),t.color.parse(o)},t.color.parse=function(e){var o,n=t.color.make;if(o=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10));if(o=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),parseFloat(o[4]));if(o=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]));if(o=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]),parseFloat(o[4]));if(o=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))return n(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16));if(o=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e))return n(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16));var r=t.trim(e).toLowerCase();return"transparent"==r?n(255,255,255,0):(o=i[r]||[0,0,0],n(o[0],o[1],o[2]))};var i={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}}(jQuery),function(t){function i(i,e){var o=e.children("."+i)[0];if(null==o&&(o=document.createElement("canvas"),o.className=i,t(o).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(e),!o.getContext)){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");o=window.G_vmlCanvasManager.initElement(o)}this.element=o;var n=this.context=o.getContext("2d"),r=window.devicePixelRatio||1,a=n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1;this.pixelRatio=r/a,this.resize(e.width(),e.height()),this.textContainer=null,this.text={},this._textCache={}}function e(e,n,r,a){function l(t,i){i=[ft].concat(i);for(var e=0;eo&&(o=n))}e<=o&&(e=o+1);var r,a=[],l=K.colors,s=l.length,c=0;for(i=0;i=0?c<.5?-c-.2:0:-c),a[i]=r.scale("rgb",1+c);var h,u=0;for(i=0;i<$.length;++i){if(h=$[i],null==h.color?(h.color=a[u].toString(),++u):"number"==typeof h.color&&(h.color=a[h.color].toString()),null==h.lines.show){var p,m=!0;for(p in h)if(h[p]&&h[p].show){m=!1;break}m&&(h.lines.show=!0)}null==h.lines.zero&&(h.lines.zero=!!h.lines.fill),h.xaxis=d(nt,f(h,"x")),h.yaxis=d(rt,f(h,"y"))}}function m(){function i(t,i,e){it.datamax&&e!=b&&(t.datamax=e)}var e,o,n,r,a,s,c,f,u,d,p,m,x=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,b=Number.MAX_VALUE;for(t.each(h(),function(t,i){i.datamin=x,i.datamax=g,i.used=!1}),e=0;e<$.length;++e)(a=$[e]).datapoints={points:[]},l(ct.processRawData,[a,a.data,a.datapoints]);for(e=0;e<$.length;++e){if(a=$[e],p=a.data,!(m=a.datapoints.format)){if((m=[]).push({x:!0,number:!0,required:!0}),m.push({y:!0,number:!0,required:!0}),a.bars.show||a.lines.show&&a.lines.fill){var v=!!(a.bars.show&&a.bars.zero||a.lines.show&&a.lines.zero);m.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:v}),a.bars.horizontal&&(delete m[m.length-1].y,m[m.length-1].x=!0)}a.datapoints.format=m}if(null==a.datapoints.pointsize){a.datapoints.pointsize=m.length,c=a.datapoints.pointsize,s=a.datapoints.points;var k=a.lines.show&&a.lines.steps;for(a.xaxis.used=a.yaxis.used=!0,o=n=0;o0&&null!=s[n-c]&&s[n-c]!=s[n]&&s[n-c+1]!=s[n+1]){for(r=0;rM&&(M=f)),u.y&&(fC&&(C=f)));if(a.bars.show){var S;switch(a.bars.align){case"left":S=0;break;case"right":S=-a.bars.barWidth;break;case"center":S=-a.bars.barWidth/2;break;default:throw new Error("Invalid bar alignment: "+a.bars.align)}a.bars.horizontal?(T+=S,C+=S+a.bars.barWidth):(w+=S,M+=S+a.bars.barWidth)}i(a.xaxis,w,M),i(a.yaxis,T,C)}t.each(h(),function(t,i){i.datamin==x&&(i.datamin=null),i.datamax==g&&(i.datamax=null)})}function x(t){function i(t){return t}var e,o,n=t.options.transform||i,r=t.options.inverseTransform;"x"==t.direction?(e=t.scale=lt/Math.abs(n(t.max)-n(t.min)),o=Math.min(n(t.max),n(t.min))):(e=t.scale=st/Math.abs(n(t.max)-n(t.min)),e=-e,o=Math.max(n(t.max),n(t.min))),t.p2c=n==i?function(t){return(t-o)*e}:function(t){return(n(t)-o)*e},t.c2p=r?function(t){return r(o+t/e)}:function(t){return o+t/e}}function g(t){var i=t.options,e=t.ticks||[],o=i.labelWidth||0,n=i.labelHeight||0,r=o||"x"==t.direction?Math.floor(Z.width/(e.length||1)):null;legacyStyles=t.direction+"Axis "+t.direction+t.n+"Axis",layer="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+legacyStyles,font=i.font||"flot-tick-label tickLabel";for(var a=0;a=0;--i)b(a[i]);k(),t.each(a,function(t,i){v(i)})}lt=Z.width-at.left-at.right,st=Z.height-at.bottom-at.top,t.each(e,function(t,i){x(i)}),o&&A(),E()}function w(t){var i=t.options,e=+(null!=i.min?i.min:t.datamin),o=+(null!=i.max?i.max:t.datamax),n=o-e;if(0==n){var r=0==o?1:.01;null==i.min&&(e-=r),null!=i.max&&null==i.min||(o+=r)}else{var a=i.autoscaleMargin;null!=a&&(null==i.min&&(e-=n*a)<0&&null!=t.datamin&&t.datamin>=0&&(e=0),null==i.max&&(o+=n*a)>0&&null!=t.datamax&&t.datamax<=0&&(o=0))}t.min=e,t.max=o}function T(i){var e,n=i.options;e="number"==typeof n.ticks&&n.ticks>0?n.ticks:.3*Math.sqrt("x"==i.direction?Z.width:Z.height);var r=(i.max-i.min)/e,a=-Math.floor(Math.log(r)/Math.LN10),l=n.tickDecimals;null!=l&&a>l&&(a=l);var s,c=Math.pow(10,-a),f=r/c;if(f<1.5?s=1:f<3?(s=2,f>2.25&&(null==l||a+1<=l)&&(s=2.5,++a)):s=f<7.5?5:10,s*=c,null!=n.minTickSize&&s0&&(null==n.min&&(i.min=Math.min(i.min,u[0])),null==n.max&&u.length>1&&(i.max=Math.max(i.max,u[u.length-1]))),i.tickGenerator=function(t){var i,e,o=[];for(e=0;e1&&/\..*0$/.test((p[1]-p[0]).toFixed(d))||(i.tickDecimals=d)}}}}function M(i){var e=i.options.ticks,o=[];null==e||"number"==typeof e&&e>0?o=i.tickGenerator(i):e&&(o=t.isFunction(e)?e(i):e);var n,r;for(i.ticks=[],n=0;n1&&(a=l[1])):r=+l,null==a&&(a=i.tickFormatter(r,i)),isNaN(r)||i.ticks.push({v:r,label:a})}}function C(t,i){t.options.autoscaleMargin&&i.length>0&&(null==t.options.min&&(t.min=Math.min(t.min,i[0].v)),null==t.options.max&&i.length>1&&(t.max=Math.max(t.max,i[i.length-1].v)))}function S(){Z.clear(),l(ct.drawBackground,[et]);var t=K.grid;t.show&&t.backgroundColor&&z(),t.show&&!t.aboveData&&I();for(var i=0;i<$.length;++i)l(ct.drawSeries,[et,$[i]]),P($[i]);l(ct.draw,[et]),t.show&&t.aboveData&&I(),Z.render(),_()}function W(t,i){for(var e,o,n,r,a=h(),l=0;ln){var s=o;o=n,n=s}return{from:o,to:n,axis:e}}function z(){et.save(),et.translate(at.left,at.top),et.fillStyle=J(K.grid.backgroundColor,st,0,"rgba(255, 255, 255, 0)"),et.fillRect(0,0,lt,st),et.restore()}function I(){var i,e,o,n;et.save(),et.translate(at.left,at.top);var r=K.grid.markings;if(r)for(t.isFunction(r)&&((e=ft.getAxes()).xmin=e.xaxis.min,e.xmax=e.xaxis.max,e.ymin=e.yaxis.min,e.ymax=e.yaxis.max,r=r(e)),i=0;il.axis.max||s.tos.axis.max||(l.from=Math.max(l.from,l.axis.min),l.to=Math.min(l.to,l.axis.max),s.from=Math.max(s.from,s.axis.min),s.to=Math.min(s.to,s.axis.max),l.from==l.to&&s.from==s.to||(l.from=l.axis.p2c(l.from),l.to=l.axis.p2c(l.to),s.from=s.axis.p2c(s.from),s.to=s.axis.p2c(s.to),l.from==l.to||s.from==s.to?(et.beginPath(),et.strokeStyle=a.color||K.grid.markingsColor,et.lineWidth=a.lineWidth||K.grid.markingsLineWidth,et.moveTo(l.from,s.from),et.lineTo(l.to,s.to),et.stroke()):(et.fillStyle=a.color||K.grid.markingsColor,et.fillRect(l.from,s.to,l.to-l.from,s.from-s.to))))}e=h(),o=K.grid.borderWidth;for(var c=0;cm.max||"full"==g&&("object"==typeof o&&o[m.position]>0||o>0)&&(b==m.min||b==m.max)||("x"==m.direction?(f=m.p2c(b),p="full"==g?-st:g,"top"==m.position&&(p=-p)):(u=m.p2c(b),d="full"==g?-lt:g,"left"==m.position&&(d=-d)),1==et.lineWidth&&("x"==m.direction?f=Math.floor(f)+.5:u=Math.floor(u)+.5),et.moveTo(f,u),et.lineTo(f+d,u+p))}et.stroke()}}o&&(n=K.grid.borderColor,"object"==typeof o||"object"==typeof n?("object"!=typeof o&&(o={top:o,right:o,bottom:o,left:o}),"object"!=typeof n&&(n={top:n,right:n,bottom:n,left:n}),o.top>0&&(et.strokeStyle=n.top,et.lineWidth=o.top,et.beginPath(),et.moveTo(0-o.left,0-o.top/2),et.lineTo(lt,0-o.top/2),et.stroke()),o.right>0&&(et.strokeStyle=n.right,et.lineWidth=o.right,et.beginPath(),et.moveTo(lt+o.right/2,0-o.top),et.lineTo(lt+o.right/2,st),et.stroke()),o.bottom>0&&(et.strokeStyle=n.bottom,et.lineWidth=o.bottom,et.beginPath(),et.moveTo(lt+o.right,st+o.bottom/2),et.lineTo(0,st+o.bottom/2),et.stroke()),o.left>0&&(et.strokeStyle=n.left,et.lineWidth=o.left,et.beginPath(),et.moveTo(0-o.left/2,st+o.bottom),et.lineTo(0-o.left/2,0),et.stroke())):(et.lineWidth=o,et.strokeStyle=K.grid.borderColor,et.strokeRect(-o/2,-o/2,lt+o,st+o))),et.restore()}function A(){t.each(h(),function(t,i){if(i.show&&0!=i.ticks.length){var e,o,n,r,a,l=i.box,s=i.direction+"Axis "+i.direction+i.n+"Axis",c="flot-"+i.direction+"-axis flot-"+i.direction+i.n+"-axis "+s,f=i.options.font||"flot-tick-label tickLabel";Z.removeText(c);for(var h=0;hi.max||("x"==i.direction?(r="center",o=at.left+i.p2c(e.v),"bottom"==i.position?n=l.top+l.padding:(n=l.top+l.height-l.padding,a="bottom")):(a="middle",n=at.top+i.p2c(e.v),"left"==i.position?(o=l.left+l.width-l.padding,r="right"):o=l.left+l.padding),Z.addText(c,o,n,e.label,f,null,null,r,a))}})}function P(t){t.lines.show&&F(t),t.bars.show&&L(t),t.points.show&&N(t)}function F(t){function i(t,i,e,o,n){var r=t.points,a=t.pointsize,l=null,s=null;et.beginPath();for(var c=a;c=d&&h>n.max){if(d>n.max)continue;f=(n.max-h)/(d-h)*(u-f)+f,h=n.max}else if(d>=h&&d>n.max){if(h>n.max)continue;u=(n.max-h)/(d-h)*(u-f)+f,d=n.max}if(f<=u&&f=u&&f>o.max){if(u>o.max)continue;h=(o.max-f)/(u-f)*(d-h)+h,f=o.max}else if(u>=f&&u>o.max){if(f>o.max)continue;d=(o.max-f)/(u-f)*(d-h)+h,u=o.max}f==l&&h==s||et.moveTo(o.p2c(f)+i,n.p2c(h)+e),l=u,s=d,et.lineTo(o.p2c(u)+i,n.p2c(d)+e)}}et.stroke()}et.save(),et.translate(at.left,at.top),et.lineJoin="round";var e=t.lines.lineWidth,o=t.shadowSize;if(e>0&&o>0){et.lineWidth=o,et.strokeStyle="rgba(0,0,0,0.1)";var n=Math.PI/18;i(t.datapoints,Math.sin(n)*(e/2+o/2),Math.cos(n)*(e/2+o/2),t.xaxis,t.yaxis),et.lineWidth=o/2,i(t.datapoints,Math.sin(n)*(e/2+o/4),Math.cos(n)*(e/2+o/4),t.xaxis,t.yaxis)}et.lineWidth=e,et.strokeStyle=t.color;var r=O(t.lines,t.color,0,st);r&&(et.fillStyle=r,function(t,i,e){for(var o=t.points,n=t.pointsize,r=Math.min(Math.max(0,e.min),e.max),a=0,l=!1,s=1,c=0,f=0;!(n>0&&a>o.length+n);){var h=o[(a+=n)-n],u=o[a-n+s],d=o[a],p=o[a+s];if(l){if(n>0&&null!=h&&null==d){f=a,n=-n,s=2;continue}if(n<0&&a==c+n){et.fill(),l=!1,s=1,a=c=f+(n=-n);continue}}if(null!=h&&null!=d){if(h<=d&&h=d&&h>i.max){if(d>i.max)continue;u=(i.max-h)/(d-h)*(p-u)+u,h=i.max}else if(d>=h&&d>i.max){if(h>i.max)continue;p=(i.max-h)/(d-h)*(p-u)+u,d=i.max}if(l||(et.beginPath(),et.moveTo(i.p2c(h),e.p2c(r)),l=!0),u>=e.max&&p>=e.max)et.lineTo(i.p2c(h),e.p2c(e.max)),et.lineTo(i.p2c(d),e.p2c(e.max));else if(u<=e.min&&p<=e.min)et.lineTo(i.p2c(h),e.p2c(e.min)),et.lineTo(i.p2c(d),e.p2c(e.min));else{var m=h,x=d;u<=p&&u=e.min?(h=(e.min-u)/(p-u)*(d-h)+h,u=e.min):p<=u&&p=e.min&&(d=(e.min-u)/(p-u)*(d-h)+h,p=e.min),u>=p&&u>e.max&&p<=e.max?(h=(e.max-u)/(p-u)*(d-h)+h,u=e.max):p>=u&&p>e.max&&u<=e.max&&(d=(e.max-u)/(p-u)*(d-h)+h,p=e.max),h!=m&&et.lineTo(i.p2c(m),e.p2c(u)),et.lineTo(i.p2c(h),e.p2c(u)),et.lineTo(i.p2c(d),e.p2c(p)),d!=x&&(et.lineTo(i.p2c(d),e.p2c(p)),et.lineTo(i.p2c(x),e.p2c(p)))}}}}(t.datapoints,t.xaxis,t.yaxis)),e>0&&i(t.datapoints,0,0,t.xaxis,t.yaxis),et.restore()}function N(t){function i(t,i,e,o,n,r,a,l){for(var s=t.points,c=t.pointsize,f=0;fr.max||ua.max||(et.beginPath(),h=r.p2c(h),u=a.p2c(u)+o,"circle"==l?et.arc(h,u,i,0,n?Math.PI:2*Math.PI,!1):l(et,h,u,i,n),et.closePath(),e&&(et.fillStyle=e,et.fill()),et.stroke())}}et.save(),et.translate(at.left,at.top);var e=t.points.lineWidth,o=t.shadowSize,n=t.points.radius,r=t.points.symbol;if(0==e&&(e=1e-4),e>0&&o>0){var a=o/2;et.lineWidth=a,et.strokeStyle="rgba(0,0,0,0.1)",i(t.datapoints,n,null,a+a/2,!0,t.xaxis,t.yaxis,r),et.strokeStyle="rgba(0,0,0,0.2)",i(t.datapoints,n,null,a/2,!0,t.xaxis,t.yaxis,r)}et.lineWidth=e,et.strokeStyle=t.color,i(t.datapoints,n,O(t.points,t.color),0,!1,t.xaxis,t.yaxis,r),et.restore()}function D(t,i,e,o,n,r,a,l,s,c,f,h){var u,d,p,m,x,g,b,v,k;f?(v=g=b=!0,x=!1,m=i+o,p=i+n,(d=t)<(u=e)&&(k=d,d=u,u=k,x=!0,g=!1)):(x=g=b=!0,v=!1,u=t+o,d=t+n,(m=i)<(p=e)&&(k=m,m=p,p=k,v=!0,b=!1)),dl.max||ms.max||(ul.max&&(d=l.max,g=!1),ps.max&&(m=s.max,b=!1),u=l.p2c(u),p=s.p2c(p),d=l.p2c(d),m=s.p2c(m),a&&(c.beginPath(),c.moveTo(u,p),c.lineTo(u,m),c.lineTo(d,m),c.lineTo(d,p),c.fillStyle=a(p,m),c.fill()),h>0&&(x||g||b||v)&&(c.beginPath(),c.moveTo(u,p+r),x?c.lineTo(u,m+r):c.moveTo(u,m+r),b?c.lineTo(d,m+r):c.moveTo(d,m+r),g?c.lineTo(d,p+r):c.moveTo(d,p+r),v?c.lineTo(u,p+r):c.moveTo(u,p+r),c.stroke()))}function L(t){et.save(),et.translate(at.left,at.top),et.lineWidth=t.bars.lineWidth,et.strokeStyle=t.color;var i;switch(t.bars.align){case"left":i=0;break;case"right":i=-t.bars.barWidth;break;case"center":i=-t.bars.barWidth/2;break;default:throw new Error("Invalid bar alignment: "+t.bars.align)}var e=t.bars.fill?function(i,e){return O(t.bars,t.color,i,e)}:null;!function(i,e,o,n,r,a,l){for(var s=i.points,c=i.pointsize,f=0;f"),n.push(""),a=!0),n.push('
'+f.label+"")}if(a&&n.push(""),0!=n.length){var h=''+n.join("")+"
";if(null!=K.legend.container)t(K.legend.container).html(h);else{var u="",d=K.legend.position,p=K.legend.margin;null==p[0]&&(p=[p,p]),"n"==d.charAt(0)?u+="top:"+(p[1]+at.top)+"px;":"s"==d.charAt(0)&&(u+="bottom:"+(p[1]+at.bottom)+"px;"),"e"==d.charAt(1)?u+="right:"+(p[0]+at.right)+"px;":"w"==d.charAt(1)&&(u+="left:"+(p[0]+at.left)+"px;");var m=t('
'+h.replace('style="','style="position:absolute;'+u+";")+"
").appendTo(e);if(0!=K.legend.backgroundOpacity){var x=K.legend.backgroundColor;null==x&&((x=(x=K.grid.backgroundColor)&&"string"==typeof x?t.color.parse(x):t.color.extract(m,"background-color")).a=1,x=x.toString());var g=m.children();t('
').prependTo(m).css("opacity",K.legend.backgroundOpacity)}}}}}function R(t,i,e){var o,n,r,a=K.grid.mouseActiveRadius,l=a*a+1,s=null;for(o=$.length-1;o>=0;--o)if(e($[o])){var c=$[o],f=c.xaxis,h=c.yaxis,u=c.datapoints.points,d=f.c2p(t),p=h.c2p(i),m=a/f.scale,x=a/h.scale;if(r=c.datapoints.pointsize,f.options.inverseTransform&&(m=Number.MAX_VALUE),h.options.inverseTransform&&(x=Number.MAX_VALUE),c.lines.show||c.points.show)for(n=0;nm||g-d<-m||b-p>x||b-p<-x)){var v=Math.abs(f.p2c(g)-t),k=Math.abs(h.p2c(b)-i),y=v*v+k*k;y=Math.min(M,g)&&p>=b+w&&p<=b+T:d>=g+w&&d<=g+T&&p>=Math.min(M,b)&&p<=Math.max(M,b))&&(s=[o,n/r]))}}}return s?(o=s[0],n=s[1],r=$[o].datapoints.pointsize,{datapoint:$[o].datapoints.points.slice(n*r,(n+1)*r),dataIndex:n,series:$[o],seriesIndex:o}):null}function j(t){K.grid.hoverable&&G("plothover",t,function(t){return 0!=t.hoverable})}function B(t){K.grid.hoverable&&G("plothover",t,function(t){return!1})}function H(t){G("plotclick",t,function(t){return 0!=t.clickable})}function G(t,i,o){var n=it.offset(),r=i.pageX-n.left-at.left,a=i.pageY-n.top-at.top,l=u({left:r,top:a});l.pageX=i.pageX,l.pageY=i.pageY;var s=R(r,a,o);if(s&&(s.pageX=parseInt(s.series.xaxis.p2c(s.datapoint[0])+n.left+at.left,10),s.pageY=parseInt(s.series.yaxis.p2c(s.datapoint[1])+n.top+at.top,10)),K.grid.autoHighlight){for(var c=0;cr.max||na.max)){var s=i.points.radius+i.points.lineWidth/2;ot.lineWidth=s,ot.strokeStyle=l;var c=1.5*s;o=r.p2c(o),n=a.p2c(n),ot.beginPath(),"circle"==i.points.symbol?ot.arc(o,n,c,0,2*Math.PI,!1):i.points.symbol(ot,o,n,c,!1),ot.closePath(),ot.stroke()}}function U(i,e){var o="string"==typeof i.highlightColor?i.highlightColor:t.color.parse(i.color).scale("a",.5).toString(),n=o,r="left"==i.bars.align?0:-i.bars.barWidth/2;ot.lineWidth=i.bars.lineWidth,ot.strokeStyle=o,D(e[0],e[1],e[2]||0,r,r+i.bars.barWidth,0,function(){return n},i.xaxis,i.yaxis,ot,i.bars.horizontal,i.bars.lineWidth)}function J(i,e,o,n){if("string"==typeof i)return i;for(var r=et.createLinearGradient(0,o,0,e),a=0,l=i.colors.length;a").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),e=this.text[i]=t("
").addClass(i).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),e},i.prototype.getTextInfo=function(i,e,o,n,r){var a,l,s,c;if(e=""+e,a="object"==typeof o?o.style+" "+o.variant+" "+o.weight+" "+o.size+"px/"+o.lineHeight+"px "+o.family:o,null==(l=this._textCache[i])&&(l=this._textCache[i]={}),null==(s=l[a])&&(s=l[a]={}),null==(c=s[e])){var f=t("
").html(e).css({position:"absolute","max-width":r,top:-9999}).appendTo(this.getTextLayer(i));"object"==typeof o?f.css({font:a,color:o.color}):"string"==typeof o&&f.addClass(o),c=s[e]={width:f.outerWidth(!0),height:f.outerHeight(!0),element:f,positions:[]},f.detach()}return c},i.prototype.addText=function(t,i,e,o,n,r,a,l,s){var c=this.getTextInfo(t,o,n,r,a),f=c.positions;"center"==l?i-=c.width/2:"right"==l&&(i-=c.width),"middle"==s?e-=c.height/2:"bottom"==s&&(e-=c.height);for(var h,u=0;h=f[u];u++)if(h.x==i&&h.y==e)return void(h.active=!0);h={active:!0,rendered:!1,element:f.length?c.element.clone():c.element,x:i,y:e},f.push(h),h.element.css({top:Math.round(e),left:Math.round(i),"text-align":l})},i.prototype.removeText=function(t,i,e,o,r,a){if(null==o){var l=this._textCache[t];if(null!=l)for(var s in l)if(n.call(l,s)){var c=l[s];for(var f in c)if(n.call(c,f))for(var h=c[f].positions,u=0;d=h[u];u++)d.active=!1}}else for(var d,h=this.getTextInfo(t,o,r,a).positions,u=0;d=h[u];u++)d.x==i&&d.y==e&&(d.active=!1)},t.plot=function(i,o,n){return new e(t(i),o,n,t.plot.plugins)},t.plot.version="0.8.1",t.plot.plugins=[],t.fn.plot=function(i,e){return this.each(function(){t.plot(this,i,e)})}}(jQuery);