Files
everything2/EveryThing/wwwroot/vendor/libs/flot/flot.js
David Štaleker 03b92525d7 Prvi commit
2023-05-12 09:00:07 +02:00

1 line
119 KiB
JavaScript

!function(e,t){var i=t();if("object"==typeof i){var o=["object"==typeof module&&"object"==typeof module.exports?module.exports:null,"undefined"!=typeof window?window:null,e&&e!==window?e:null];for(var n in i)o[0]&&(o[0][n]=i[n]),o[1]&&"__esModule"!==n&&(o[1][n]=i[n]),o[2]&&(o[2][n]=i[n])}}(this,function(){return function(e){var t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=478)}({478:function(e,t,i){i(479),i(480),i(481),i(482),i(62)},479:function(e,t,o){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a,r,s,l;!function(e){var t=function(t,i){var o=i.getElementsByClassName(t)[0];if(!o&&((o=document.createElement("canvas")).className=t,o.style.direction="ltr",o.style.position="absolute",o.style.left="0px",o.style.top="0px",i.appendChild(o),!o.getContext))throw new Error("Canvas is not available.");this.element=o;var n=this.context=o.getContext("2d");this.pixelRatio=e.plot.browser.getPixelRatio(n);var a=i.getBoundingClientRect();this.resize(a.width,a.height),this.SVGContainer=null,this.SVG={},this._textCache={}};t.prototype.resize=function(e,t){e=e<10?10:e,t=t<10?10:t;var i=this.element,o=this.context,n=this.pixelRatio;this.width!==e&&(i.width=e*n,i.style.width=e+"px",this.width=e),this.height!==t&&(i.height=t*n,i.style.height=t+"px",this.height=t),o.restore(),o.save(),o.scale(n,n)},t.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},t.prototype.render=function(){var e=this._textCache;for(var t in e)if(hasOwnProperty.call(e,t)){var i=this.getSVGLayer(t),o=e[t],n=i.style.display;for(var a in i.style.display="none",o)if(hasOwnProperty.call(o,a)){var r=o[a];for(var s in r)if(hasOwnProperty.call(r,s)){for(var l,c=r[s],u=c.positions,p=0;u[p];p++)if((l=u[p]).active)l.rendered||(i.appendChild(l.element),l.rendered=!0);else if(u.splice(p--,1),l.rendered){for(;l.element.firstChild;)l.element.removeChild(l.element.firstChild);l.element.parentNode.removeChild(l.element)}0===u.length&&(c.measured?c.measured=!1:delete r[s])}}i.style.display=n}},t.prototype.getSVGLayer=function(e){var t,i=this.SVG[e];return i||(this.SVGContainer?t=this.SVGContainer.firstChild:(this.SVGContainer=document.createElement("div"),this.SVGContainer.className="flot-svg",this.SVGContainer.style.position="absolute",this.SVGContainer.style.top="0px",this.SVGContainer.style.left="0px",this.SVGContainer.style.height="100%",this.SVGContainer.style.width="100%",this.SVGContainer.style.pointerEvents="none",this.element.parentNode.appendChild(this.SVGContainer),(t=document.createElementNS("http://www.w3.org/2000/svg","svg")).style.width="100%",t.style.height="100%",this.SVGContainer.appendChild(t)),(i=document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("class",e),i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.bottom="0px",i.style.right="0px",t.appendChild(i),this.SVG[e]=i),i},t.prototype.getTextInfo=function(e,t,o,a,r){var s,l,c,u;t=""+t,s="object"===n(o)?o.style+" "+o.variant+" "+o.weight+" "+o.size+"px/"+o.lineHeight+"px "+o.family:o,null==(l=this._textCache[e])&&(l=this._textCache[e]={}),null==(c=l[s])&&(c=l[s]={});var p=t.replace(/0|1|2|3|4|5|6|7|8|9/g,"0");if(!(u=c[p])){var h=document.createElementNS("http://www.w3.org/2000/svg","text");if(-1!==t.indexOf("<br>"))i(t,h,-9999);else{var d=document.createTextNode(t);h.appendChild(d)}h.style.position="absolute",h.style.maxWidth=r,h.setAttributeNS(null,"x",-9999),h.setAttributeNS(null,"y",-9999),"object"===n(o)?(h.style.font=s,h.style.fill=o.fill):"string"==typeof o&&h.setAttribute("class",o),this.getSVGLayer(e).appendChild(h);var f=h.getBBox();for(u=c[p]={width:f.width,height:f.height,measured:!0,element:h,positions:[]};h.firstChild;)h.removeChild(h.firstChild);h.parentNode.removeChild(h)}return u.measured=!0,u},t.prototype.addText=function(e,t,o,n,a,r,s,l,c,u){var p=this.getTextInfo(e,n,a,r,s),h=p.positions;"center"===l?t-=p.width/2:"right"===l&&(t-=p.width),"middle"===c?o-=p.height/2:"bottom"===c&&(o-=p.height),o+=.75*p.height;for(var d,f=0;h[f];f++){if((d=h[f]).x===t&&d.y===o&&d.text===n)return void(d.active=!0);if(!1===d.active)return d.active=!0,-1!==(d.text=n).indexOf("<br>")?(o-=.25*p.height,i(n,d.element,t)):d.element.textContent=n,d.element.setAttributeNS(null,"x",t),d.element.setAttributeNS(null,"y",o),d.x=t,void(d.y=o)}d={active:!0,rendered:!1,element:h.length?p.element.cloneNode():p.element,text:n,x:t,y:o},h.push(d),-1!==n.indexOf("<br>")?(o-=.25*p.height,i(n,d.element,t)):d.element.textContent=n,d.element.setAttributeNS(null,"x",t),d.element.setAttributeNS(null,"y",o),d.element.style.textAlign=l,u&&u.forEach(function(e){p.element.transform.baseVal.appendItem(e)})};var i=function(e,t,i){var o,n,a,r=e.split("<br>");for(n=0;n<r.length;n++)t.childNodes[n]?o=t.childNodes[n]:(o=document.createElementNS("http://www.w3.org/2000/svg","tspan"),t.appendChild(o)),o.textContent=r[n],a=1*n+"em",o.setAttributeNS(null,"dy",a),o.setAttributeNS(null,"x",i)};t.prototype.removeText=function(e,t,i,o,n,a){var r,s;if(null==o){var l=this._textCache[e];if(null!=l)for(var c in l)if(hasOwnProperty.call(l,c)){var u=l[c];for(var p in u)if(hasOwnProperty.call(u,p)){var h=u[p].positions;h.forEach(function(e){e.active=!1})}}}else(h=(r=this.getTextInfo(e,o,n,a)).positions).forEach(function(e){s=i+.75*r.height,e.x===t&&e.y===s&&e.text===o&&(e.active=!1)})},t.prototype.clearCache=function(){var e=this._textCache;for(var t in e)if(hasOwnProperty.call(e,t))for(var i=this.getSVGLayer(t);i.firstChild;)i.removeChild(i.firstChild);this._textCache={}},window.Flot||(window.Flot={}),window.Flot.Canvas=t}(jQuery),function(e){e.color={},e.color.make=function(t,i,o,n){var a={};return a.r=t||0,a.g=i||0,a.b=o||0,a.a=null!=n?n:1,a.add=function(e,t){for(var i=0;i<e.length;++i)a[e.charAt(i)]+=t;return a.normalize()},a.scale=function(e,t){for(var i=0;i<e.length;++i)a[e.charAt(i)]*=t;return a.normalize()},a.toString=function(){return 1<=a.a?"rgb("+[a.r,a.g,a.b].join(",")+")":"rgba("+[a.r,a.g,a.b,a.a].join(",")+")"},a.normalize=function(){function e(e,t,i){return t<e?e:i<t?i:t}return a.r=e(0,parseInt(a.r),255),a.g=e(0,parseInt(a.g),255),a.b=e(0,parseInt(a.b),255),a.a=e(0,a.a,1),a},a.clone=function(){return e.color.make(a.r,a.b,a.g,a.a)},a.normalize()},e.color.extract=function(t,i){var o;do{if(""!==(o=t.css(i).toLowerCase())&&"transparent"!==o)break;t=t.parent()}while(t.length&&!e.nodeName(t.get(0),"body"));return"rgba(0, 0, 0, 0)"===o&&(o="transparent"),e.color.parse(o)},e.color.parse=function(i){var o,n=e.color.make;if(o=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(i))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(i))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(i))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(i))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(i))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(i))return n(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16));var a=e.trim(i).toLowerCase();return"transparent"===a?n(255,255,255,0):n((o=t[a]||[0,0,0])[0],o[1],o[2])};var t={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(e){var t=window.Flot.Canvas;function i(t){var i,o=[],n=e.plot.saturated.saturate(e.plot.saturated.floorInBase(t.min,t.tickSize)),a=0,r=Number.NaN;for(n===-Number.MAX_VALUE&&(o.push(n),n=e.plot.saturated.floorInBase(t.min+t.tickSize,t.tickSize));i=r,r=e.plot.saturated.multiplyAdd(t.tickSize,a,n),o.push(r),++a,r<t.max&&r!==i;);return o}function o(e,t,i){var o=t.tickDecimals;if(-1!==(""+e).indexOf("e"))return a(e,t,i);0<i&&(t.tickDecimals=i);var n=t.tickDecimals?Math.pow(10,t.tickDecimals):1,r=""+Math.round(e*n)/n;if(null!=t.tickDecimals){var s=r.indexOf("."),l=-1===s?0:r.length-s-1;l<t.tickDecimals&&(r=(l?r:r+".")+(""+n).substr(1,t.tickDecimals-l))}return t.tickDecimals=o,r}function a(e,t,i){var o=(""+e).indexOf("e"),n=parseInt((""+e).substr(o+1)),a=-1!==o?n:0<e?Math.floor(Math.log(e)/Math.LN10):0,s=Math.pow(10,a),l=e/s;if(i){var c=r(e,i);return(e/s).toFixed(c)+"e"+a}return 0<t.tickDecimals?l.toFixed(r(e,t.tickDecimals))+"e"+a:l.toFixed()+"e"+a}function r(e,t){var i=Math.log(Math.abs(e))*Math.LOG10E,o=Math.abs(i+t);return o<=20?Math.floor(o):20}function s(a,r,s,l){var c=[],u={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoScaleMargin:null,autoScale:"exact",windowSize:null,growOnly:null,ticks:null,tickFormatter:null,showTickLabels:"major",labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,showMinorTicks:null,showTicks:null,gridLines:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,offset:{below:0,above:0},boxPosition:{centerX:0,centerY:0}},yaxis:{autoScaleMargin:.02,autoScale:"loose",growOnly:null,position:"left",showTickLabels:"major",offset:{below:0,above:0},boxPosition:{centerX:0,centerY:0}},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:1,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,horizontal:!1,barWidth:.8,fill:!0,fillColor:null,align:"left",zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:1,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:15},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},p=null,h=null,d=null,f=null,m=null,g=[],x=[],v={left:0,right:0,top:0,bottom:0},b=0,y=0,w={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],setupGrid:[],adjustSeriesDataRange:[],setRange:[],drawBackground:[],drawSeries:[],drawAxis:[],draw:[],axisReserveSpace:[],bindEvents:[],drawOverlay:[],resize:[],shutdown:[]},k=this,T={},M=null;k.setData=A,k.setupGrid=F,k.draw=B,k.getPlaceholder=function(){return a},k.getCanvas=function(){return p.element},k.getSurface=function(){return p},k.getEventHolder=function(){return d[0]},k.getPlotOffset=function(){return v},k.width=function(){return b},k.height=function(){return y},k.offset=function(){var e=d.offset();return e.left+=v.left,e.top+=v.top,e},k.getData=function(){return c},k.getAxes=function(){var t={};return e.each(g.concat(x),function(e,i){i&&(t[i.direction+(1!==i.n?i.n:"")+"axis"]=i)}),t},k.getXAxes=function(){return g},k.getYAxes=function(){return x},k.c2p=function(e){var t,i,o={};for(t=0;t<g.length;++t)(i=g[t])&&i.used&&(o["x"+i.n]=i.c2p(e.left));for(t=0;t<x.length;++t)(i=x[t])&&i.used&&(o["y"+i.n]=i.c2p(e.top));return void 0!==o.x1&&(o.x=o.x1),void 0!==o.y1&&(o.y=o.y1),o},k.p2c=function(e){var t,i,o,n={};for(t=0;t<g.length;++t)if((i=g[t])&&i.used&&(null==e[o="x"+i.n]&&1===i.n&&(o="x"),null!=e[o])){n.left=i.p2c(e[o]);break}for(t=0;t<x.length;++t)if((i=x[t])&&i.used&&(null==e[o="y"+i.n]&&1===i.n&&(o="y"),null!=e[o])){n.top=i.p2c(e[o]);break}return n},k.getOptions=function(){return u},k.triggerRedrawOverlay=K,k.pointOffset=function(e){return{left:parseInt(g[O(e,"x")-1].p2c(+e.x)+v.left,10),top:parseInt(x[O(e,"y")-1].p2c(+e.y)+v.top,10)}},k.shutdown=z,k.destroy=function(){z(),a.removeData("plot").empty(),c=[],g=[],x=[],k=w=m=f=d=h=p=u=null},k.resize=function(){var e=a.width(),t=a.height();p.resize(e,t),h.resize(e,t),C(w.resize,[e,t])},k.clearTextCache=function(){p.clearCache(),h.clearCache()},k.autoScaleAxis=R,k.computeRangeForDataSeries=function(e,t,i){for(var o=e.datapoints.points,n=e.datapoints.pointsize,a=e.datapoints.format,r=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,l={xmin:r,ymin:r,xmax:s,ymax:s},c=0;c<o.length;c+=n)if(null!==o[c]&&("function"!=typeof i||i(o[c])))for(var u=0;u<n;++u){var p=o[c+u],h=a[u];null!=h&&("function"!=typeof i||i(p))&&(t||h.computeRange)&&p!==1/0&&p!==-1/0&&(!0===h.x&&(p<l.xmin&&(l.xmin=p),p>l.xmax&&(l.xmax=p)),!0===h.y&&(p<l.ymin&&(l.ymin=p),p>l.ymax&&(l.ymax=p)))}return l},k.adjustSeriesDataRange=function(e,t){if(e.bars.show){var i,o=e.bars.barWidth[1];e.datapoints&&e.datapoints.points&&!o&&function(e){var t=e.datapoints.pointsize,i=Number.MAX_VALUE,o=e.datapoints.points[t]-e.datapoints.points[0]||1;isFinite(o)&&(i=o);for(var n=t;n<e.datapoints.points.length-t;n+=t)(o=Math.abs(e.datapoints.points[t+n]-e.datapoints.points[n]))<i&&isFinite(o)&&(i=o);"number"==typeof e.bars.barWidth?e.bars.barWidth=e.bars.barWidth*i:e.bars.barWidth[0]=e.bars.barWidth[0]*i}(e);var n=e.bars.barWidth[0]||e.bars.barWidth;switch(e.bars.align){case"left":i=0;break;case"right":i=-n;break;default:i=-n/2}e.bars.horizontal?(t.ymin+=i,t.ymax+=i+n):(t.xmin+=i,t.xmax+=i+n)}(e.bars.show&&e.bars.zero||e.lines.show&&e.lines.zero)&&(e.datapoints.pointsize<=2&&(t.ymin=Math.min(0,t.ymin),t.ymax=Math.max(0,t.ymax)));return t},k.findNearbyItem=function(e,t,i,o,n){for(var a,r=null,s=o*o+1,l=c.length-1;0<=l;--l)if(i(l)){var u=c[l];if(!u.datapoints)return;if(u.lines.show||u.points.show){var p=Z(u,e,t,o,s,n);p&&(s=p.distance,r=[l,p.dataIndex])}if(u.bars.show&&!r){var h=J(u,e,t);h&&(r=[l,h])}}if(r){l=r[0],a=r[1];var d=c[l].datapoints.pointsize;return{datapoint:c[l].datapoints.points.slice(a*d,(a+1)*d),dataIndex:a,series:c[l],seriesIndex:l}}return null},k.findNearbyInterpolationPoint=function(e,t,i){var o,n,a,r,s,l,u,p=Number.MAX_VALUE;for(o=0;o<c.length;++o)if(i(o)){var h=c[o].datapoints.points;l=c[o].datapoints.pointsize;var d=h[h.length-l]<h[0]?function(e,t){return t<e}:function(e,t){return e<t};if(!d(e,h[0])){for(n=l;n<h.length&&!d(e,h[n]);n+=l);var f=h[n-l],m=h[n-l+1],g=h[n],x=h[n+1];void 0!==f&&void 0!==g&&void 0!==m&&void 0!==x&&(t=f===g?x:m+(x-m)*(e-f)/(g-f),(a=(r=Math.abs(c[o].xaxis.p2c(g)-e))*r+(s=Math.abs(c[o].yaxis.p2c(x)-t))*s)<p&&(p=a,u=[e,t,o,n]))}}return u?(o=u[2],n=u[3],l=c[o].datapoints.pointsize,f=(h=c[o].datapoints.points)[n-l],m=h[n-l+1],g=h[n],x=h[n+1],{datapoint:[u[0],u[1]],leftPoint:[f,m],rightPoint:[g,x],seriesIndex:o}):null},k.computeValuePrecision=W,k.computeTickSize=Y,k.addEventHandler=function(e,t,i,o){var n=i+e,a=T[n]||[];a.push({event:e,handler:t,eventHolder:i,priority:o}),a.sort(function(e,t){return t.priority-e.priority}),a.forEach(function(e){e.eventHolder.unbind(e.event,e.handler),e.eventHolder.bind(e.event,e.handler)}),T[n]=a},k.hooks=w;var S=e.plot.uiConstants.MINOR_TICKS_COUNT_CONSTANT,P=e.plot.uiConstants.TICK_LENGTH_CONSTANT;function C(e,t){t=[k].concat(t);for(var i=0;i<e.length;++i)e[i].apply(this,t)}function A(t){var i=c;c=function(t){for(var i=[],o=0;o<t.length;++o){var n=e.extend(!0,{},u.series);null!=t[o].data?(n.data=t[o].data,delete t[o].data,e.extend(!0,n,t[o]),t[o].data=n.data):n.data=t[o],i.push(n)}return i}(t),function(){var t,i=c.length,o=-1;for(t=0;t<c.length;++t){var n=c[t].color;null!=n&&(i--,"number"==typeof n&&o<n&&(o=n))}i<=o&&(i=o+1);var a,r=[],s=u.colors,l=s.length,p=0,h=Math.max(0,c.length-i);for(t=0;t<i;t++)a=e.color.parse(s[(h+t)%l]||"#666"),t%l==0&&t&&(p=0<=p?p<.5?-p-.2:0:-p),r[t]=a.scale("rgb",1+p);var d,f=0;for(t=0;t<c.length;++t){if(null==(d=c[t]).color?(d.color=r[f].toString(),++f):"number"==typeof d.color&&(d.color=r[d.color].toString()),null==d.lines.show){var m,v=!0;for(m in d)if(d[m]&&d[m].show){v=!1;break}v&&(d.lines.show=!0)}null==d.lines.zero&&(d.lines.zero=!!d.lines.fill),d.xaxis=N(g,O(d,"x")),d.yaxis=N(x,O(d,"y"))}}(),function(t){var i,o,n,a,r,s,l,u,p,h,d,f,m=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;function x(e,t,i){t<e.datamin&&t!==-1/0&&(e.datamin=t),i>e.datamax&&i!==1/0&&(e.datamax=i)}function v(e,t){return e&&e[t]&&e[t].datapoints&&e[t].datapoints.points?e[t].datapoints.points:[]}for(e.each(L(),function(e,t){!0!==t.options.growOnly?(t.datamin=m,t.datamax=g):(void 0===t.datamin&&(t.datamin=m),void 0===t.datamax&&(t.datamax=g)),t.used=!1}),i=0;i<c.length;++i)(r=c[i]).datapoints={points:[]},0===r.datapoints.points.length&&(r.datapoints.points=v(t,i)),C(w.processRawData,[r,r.data,r.datapoints]);for(i=0;i<c.length;++i){if(d=(r=c[i]).data,!(f=r.datapoints.format)){if((f=[]).push({x:!0,y:!1,number:!0,required:!0,computeRange:"none"!==r.xaxis.options.autoScale,defaultValue:null}),f.push({x:!1,y:!0,number:!0,required:!0,computeRange:"none"!==r.yaxis.options.autoScale,defaultValue:null}),r.stack||r.bars.show||r.lines.show&&r.lines.fill)2<(null!=r.datapoints.pointsize?r.datapoints.pointsize:r.data&&r.data[0]&&r.data[0].length?r.data[0].length:3)&&f.push({x:!1,y:!0,number:!0,required:!1,computeRange:"none"!==r.yaxis.options.autoScale,defaultValue:0});r.datapoints.format=f}if(r.xaxis.used=r.yaxis.used=!0,null==r.datapoints.pointsize){for(r.datapoints.pointsize=f.length,l=r.datapoints.pointsize,s=r.datapoints.points,r.lines.show&&r.lines.steps,o=n=0;o<d.length;++o,n+=l){var b=null==(h=d[o]);if(!b)for(a=0;a<l;++a)u=h[a],(p=f[a])&&(p.number&&null!=u&&(u=+u,isNaN(u)&&(u=null)),null==u&&(p.required&&(b=!0),null!=p.defaultValue&&(u=p.defaultValue))),s[n+a]=u;if(b)for(a=0;a<l;++a)null!=(u=s[n+a])&&(p=f[a]).computeRange&&(p.x&&x(r.xaxis,u,u),p.y&&x(r.yaxis,u,u)),s[n+a]=null}s.length=n}}for(i=0;i<c.length;++i)r=c[i],C(w.processDatapoints,[r,r.datapoints]);for(i=0;i<c.length;++i)if(!(f=(r=c[i]).datapoints.format).every(function(e){return!e.computeRange})){var y=k.adjustSeriesDataRange(r,k.computeRangeForDataSeries(r));C(w.adjustSeriesDataRange,[r,y]),x(r.xaxis,y.xmin,y.xmax),x(r.yaxis,y.ymin,y.ymax)}e.each(L(),function(e,t){t.datamin===m&&(t.datamin=null),t.datamax===g&&(t.datamax=null)})}(i)}function O(e,t){var i=e[t+"axis"];return"object"===n(i)&&(i=i.n),"number"!=typeof i&&(i=1),i}function L(){return g.concat(x).filter(function(e){return e})}function N(t,i){return t[i-1]||(t[i-1]={n:i,direction:t===g?"x":"y",options:e.extend(!0,{},t===g?u.xaxis:u.yaxis)}),t[i-1]}function z(){M&&clearTimeout(M),C(w.shutdown,[d])}function E(t){function i(e){return e}var o,n,a=t.options.transform||i,r=t.options.inverseTransform;n="x"===t.direction?(o=isFinite(a(t.max)-a(t.min))?t.scale=b/Math.abs(a(t.max)-a(t.min)):t.scale=1/Math.abs(e.plot.saturated.delta(a(t.min),a(t.max),b)),Math.min(a(t.max),a(t.min))):(o=-(o=isFinite(a(t.max)-a(t.min))?t.scale=y/Math.abs(a(t.max)-a(t.min)):t.scale=1/Math.abs(e.plot.saturated.delta(a(t.min),a(t.max),y))),Math.max(a(t.max),a(t.min))),t.p2c=a===i?function(e){return isFinite(e-n)?(e-n)*o:(e/4-n/4)*o*4}:function(e){var t=a(e);return isFinite(t-n)?(t-n)*o:(t/4-n/4)*o*4},t.c2p=r?function(e){return r(n+e/o)}:function(e){return n+e/o}}function I(t){C(w.axisReserveSpace,[t]);var i=t.labelWidth,o=t.labelHeight,n=t.options.position,a="x"===t.direction,r=t.options.tickLength,s=t.options.showTicks,l=t.options.showMinorTicks,c=t.options.gridLines,h=u.grid.axisMargin,d=u.grid.labelMargin,f=!0,m=!0,b=!1;e.each(a?g:x,function(e,i){i&&(i.show||i.reserveSpace)&&(i===t?b=!0:i.options.position===n&&(b?m=!1:f=!1))}),m&&(h=0),null==r&&(r=P),null==s&&(s=!0),null==l&&(l=!0),null==c&&(c=!!f),isNaN(+r)||(d+=s?+r:0),a?(o+=d,"bottom"===n?(v.bottom+=o+h,t.box={top:p.height-v.bottom,height:o}):(t.box={top:v.top+h,height:o},v.top+=o+h)):(i+=d,"left"===n?(t.box={left:v.left+h,width:i},v.left+=i+h):(v.right+=i+h,t.box={left:p.width-v.right,width:i})),t.position=n,t.tickLength=r,t.showMinorTicks=l,t.showTicks=s,t.gridLines=c,t.box.padding=d,t.innermost=f}function D(e,t,i){"x"===e.direction?("bottom"===e.position&&i(t.bottom)&&(e.box.top-=Math.ceil(t.bottom)),"top"===e.position&&i(t.top)&&(e.box.top+=Math.ceil(t.top))):("left"===e.position&&i(t.left)&&(e.box.left+=Math.ceil(t.left)),"right"===e.position&&i(t.right)&&(e.box.left-=Math.ceil(t.right)))}function F(t){var a,r,s=L(),l=u.grid.show;for(r in v)v[r]=0;for(r in C(w.processOffset,[v]),v)"object"===n(u.grid.borderWidth)?v[r]+=l?u.grid.borderWidth[r]:0:v[r]+=l?u.grid.borderWidth:0;if(e.each(s,function(i,n){var a,r,s=n.options;n.show=null==s.show?n.used:s.show,n.reserveSpace=null==s.reserveSpace?n.show:s.reserveSpace,r=(a=n).options,a.tickFormatter||("function"==typeof r.tickFormatter?a.tickFormatter=function(){var e=Array.prototype.slice.call(arguments);return""+r.tickFormatter.apply(null,e)}:a.tickFormatter=o),C(w.setRange,[n,t]),function(t,i){var o="number"==typeof t.options.min?t.options.min:t.min,n="number"==typeof t.options.max?t.options.max:t.max,a=t.options.offset;if(i&&(R(t),o=t.autoScaledMin,n=t.autoScaledMax),o=(null!=o?o:-1)+(a.below||0),(n=(null!=n?n:1)+(a.above||0))<o){var r=o;o=n,n=r,t.options.offset={above:0,below:0}}t.min=e.plot.saturated.saturate(o),t.max=e.plot.saturated.saturate(n)}(n,t)}),l){b=p.width-v.left-v.right,y=p.height-v.bottom-v.top;var h=e.grep(s,function(e){return e.show||e.reserveSpace});for(e.each(h,function(t,o){var a,r,s;!function(t){var o,n=t.options;o=X(t.direction,p,n.ticks),t.delta=e.plot.saturated.delta(t.min,t.max,o);var a=k.computeValuePrecision(t.min,t.max,t.direction,o,n.tickDecimals);if(t.tickDecimals=Math.max(0,null!=n.tickDecimals?n.tickDecimals:a),t.tickSize=function(e,t,i,o,n){var a=Y(e,t,"number"==typeof o.ticks&&0<o.ticks?o.ticks:.3*Math.sqrt("x"===i?p.width:p.height),n);return null!=o.minTickSize&&a<o.minTickSize&&(a=o.minTickSize),o.tickSize||a}(t.min,t.max,t.direction,n,n.tickDecimals),t.tickGenerator||("function"==typeof n.tickGenerator?t.tickGenerator=n.tickGenerator:t.tickGenerator=i),null!=n.alignTicksWithAxis){var r=("x"===t.direction?g:x)[n.alignTicksWithAxis-1];if(r&&r.used&&r!==t){var s=t.tickGenerator(t,k);if(0<s.length&&(null==n.min&&(t.min=Math.min(t.min,s[0])),null==n.max&&1<s.length&&(t.max=Math.max(t.max,s[s.length-1]))),t.tickGenerator=function(e){var t,i,o=[];for(i=0;i<r.ticks.length;++i)t=(r.ticks[i].v-r.min)/(r.max-r.min),t=e.min+t*(e.max-e.min),o.push(t);return o},!t.mode&&null==n.tickDecimals){var l=Math.max(0,1-Math.floor(Math.log(t.delta)/Math.LN10)),c=t.tickGenerator(t,k);1<c.length&&/\..*0$/.test((c[1]-c[0]).toFixed(l))||(t.tickDecimals=l)}}}}(o),function(t){var i,o,a=t.options.ticks,r=[];for(null==a||"number"==typeof a&&0<a?r=t.tickGenerator(t,k):a&&(r=e.isFunction(a)?a(t):a),t.ticks=[],i=0;i<r.length;++i){var s=null,l=r[i];"object"===n(l)?(o=+l[0],1<l.length&&(s=l[1])):o=+l,isNaN(o)||t.ticks.push(j(o,s,t,"major"))}}(o),r=(a=o).ticks,"loose"===a.options.autoScale&&0<r.length&&(a.min=Math.min(a.min,r[0].v),a.max=Math.max(a.max,r[r.length-1].v)),E(o),function(e,t){if("endpoints"===e.options.showTickLabels)return!0;if("all"!==e.options.showTickLabels)return"major"!==e.options.showTickLabels&&"none"!==e.options.showTickLabels&&void 0;var i=t.filter(function(t){return t.xaxis===e}),o=i.some(function(e){return!e.bars.show});return 0===i.length||o}(s=o,c)&&(s.ticks.unshift(j(s.min,null,s,"min")),s.ticks.push(j(s.max,null,s,"max"))),function(e){for(var t=e.options,i="none"!==t.showTickLabels&&e.ticks?e.ticks:[],o="major"===t.showTickLabels||"all"===t.showTickLabels,a="endpoints"===t.showTickLabels||"all"===t.showTickLabels,r=t.labelWidth||0,s=t.labelHeight||0,l=e.direction+"Axis "+e.direction+e.n+"Axis",c="flot-"+e.direction+"-axis flot-"+e.direction+e.n+"-axis "+l,u=t.font||"flot-tick-label tickLabel",h=0;h<i.length;++h){var d=i[h],f=d.label;if(d.label&&!(!1===o&&0<h&&h<i.length-1)&&(!1!==a||0!==h&&h!==i.length-1)){"object"===n(d.label)&&(f=d.label.name);var m=p.getTextInfo(c,f,u);r=Math.max(r,m.width),s=Math.max(s,m.height)}}e.labelWidth=t.labelWidth||r,e.labelHeight=t.labelHeight||s}(o)}),a=h.length-1;0<=a;--a)I(h[a]);!function(){var t,i=u.grid.minBorderMargin;if(null==i)for(t=i=0;t<c.length;++t)i=Math.max(i,2*(c[t].points.radius+c[t].points.lineWidth/2));var o,n={},a={left:i,right:i,top:i,bottom:i};for(o in e.each(L(),function(e,t){t.reserveSpace&&t.ticks&&t.ticks.length&&("x"===t.direction?(a.left=Math.max(a.left,t.labelWidth/2),a.right=Math.max(a.right,t.labelWidth/2)):(a.bottom=Math.max(a.bottom,t.labelHeight/2),a.top=Math.max(a.top,t.labelHeight/2)))}),a)n[o]=a[o]-v[o];e.each(g.concat(x),function(e,t){D(t,n,function(e){return 0<e})}),v.left=Math.ceil(Math.max(a.left,v.left)),v.right=Math.ceil(Math.max(a.right,v.right)),v.top=Math.ceil(Math.max(a.top,v.top)),v.bottom=Math.ceil(Math.max(a.bottom,v.bottom))}(),e.each(h,function(e,t){var i;"x"===(i=t).direction?(i.box.left=v.left-i.labelWidth/2,i.box.width=p.width-v.left-v.right+i.labelWidth):(i.box.top=v.top-i.labelHeight/2,i.box.height=p.height-v.bottom-v.top+i.labelHeight)})}if(u.grid.margin){for(r in v){var d=u.grid.margin||0;v[r]+="number"==typeof d?d:d[r]||0}e.each(g.concat(x),function(e,t){D(t,u.grid.margin,function(e){return null!=e})})}b=p.width-v.left-v.right,y=p.height-v.bottom-v.top,e.each(s,function(e,t){E(t)}),l&&e.each(L(),function(e,t){var i,o,n,a,r,s,l,c=t.box,u=t.direction+"Axis "+t.direction+t.n+"Axis",h="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+u,d=t.options.font||"flot-tick-label tickLabel",f={x:NaN,y:NaN,width:NaN,height:NaN},m=[],g=function(e,i){return!e||!e.label||e.v<t.min||e.v>t.max?f:(s=p.getTextInfo(h,e.label,d),"x"===t.direction?(a="center",o=v.left+t.p2c(e.v),"bottom"===t.position?n=c.top+c.padding-t.boxPosition.centerY:(n=c.top+c.height-c.padding+t.boxPosition.centerY,r="bottom")):(r="middle",n=v.top+t.p2c(e.v),"left"===t.position?(o=c.left+c.width-c.padding-t.boxPosition.centerX,a="right"):o=c.left+c.padding+t.boxPosition.centerX),l={x:o-s.width/2-3,y:n-3,width:s.width+6,height:s.height+6},u=l,i.some(function(e){return function(e,t,i,o,n,a,r,s){return(e<=n&&n<=i||n<=e&&e<=r)&&(t<=a&&a<=o||a<=t&&t<=s)}(u.x,u.y,u.x+u.width,u.y+u.height,e.x,e.y,e.x+e.width,e.y+e.height)})?f:(p.addText(h,o,n,e.label,d,null,null,a,r),l));var u};if(p.removeText(h),C(w.drawAxis,[t,p]),t.show)switch(t.options.showTickLabels){case"none":break;case"endpoints":m.push(g(t.ticks[0],m)),m.push(g(t.ticks[t.ticks.length-1],m));break;case"major":for(m.push(g(t.ticks[0],m)),m.push(g(t.ticks[t.ticks.length-1],m)),i=1;i<t.ticks.length-1;++i)m.push(g(t.ticks[i],m));break;case"all":for(m.push(g(t.ticks[0],[])),m.push(g(t.ticks[t.ticks.length-1],m)),i=1;i<t.ticks.length-1;++i)m.push(g(t.ticks[i],m))}}),C(w.setupGrid,[])}function R(t){var i,o=t.options,n=o.min,a=o.max,r=t.datamin,s=t.datamax;switch(o.autoScale){case"none":n=+(null!=o.min?o.min:r),a=+(null!=o.max?o.max:s);break;case"loose":if(null!=r&&null!=s){n=r,a=s,i=e.plot.saturated.saturate(a-n);var l="number"==typeof o.autoScaleMargin?o.autoScaleMargin:.02;n=e.plot.saturated.saturate(n-i*l),a=e.plot.saturated.saturate(a+i*l),n<0&&0<=r&&(n=0)}else n=o.min,a=o.max;break;case"exact":n=null!=r?r:o.min,a=null!=s?s:o.max;break;case"sliding-window":a<s&&(a=s,n=Math.max(s-(o.windowSize||100),n))}var c=function(e,t){var i=void 0===e?null:e,o=void 0===t?null:t;if(0==o-i){var n=0===o?1:.01,a=null;null==i&&(a-=n),null!=o&&null==i||(o+=n),null!=a&&(i=a)}return{min:i,max:o}}(n,a);n=c.min,a=c.max,!0===o.growOnly&&"none"!==o.autoScale&&"sliding-window"!==o.autoScale&&(n=n<r?n:null!==r?r:n,a=s<a?a:null!==s?s:a),t.autoScaledMin=n,t.autoScaledMax=a}function W(t,i,o,n,a){var r=X(o,p,n),s=e.plot.saturated.delta(t,i,r),l=-Math.floor(Math.log(s)/Math.LN10);a&&a<l&&(l=a);var c=s/Math.pow(10,-l);return 2.25<c&&c<3&&l+1<=a&&++l,isFinite(l)?l:0}function Y(t,i,o,n){var a=e.plot.saturated.delta(t,i,o),r=-Math.floor(Math.log(a)/Math.LN10);n&&n<r&&(r=n);var s,l=Math.pow(10,-r),c=a/l;return c<1.5?s=1:c<3?(s=2,2.25<c&&(null==n||r+1<=n)&&(s=2.5)):s=c<7.5?5:10,s*l}function X(e,t,i){return"number"==typeof i&&0<i?i:.3*Math.sqrt("x"===e?t.width:t.height)}function j(e,t,i,o){if(null===t)switch(o){case"min":case"max":var n=(a=e,r=i,s=Math.floor(r.p2c(a)),l="x"===r.direction?s+1:s-1,W(r.c2p(s),r.c2p(l),r.direction,1));isFinite(n),t=i.tickFormatter(e,i,n,k);break;case"major":t=i.tickFormatter(e,i,void 0,k)}var a,r,s,l;return{v:e,label:t}}function B(){p.clear(),C(w.drawBackground,[f]);var e=u.grid;e.show&&e.backgroundColor&&(f.save(),f.translate(v.left,v.top),f.fillStyle=te(u.grid.backgroundColor,y,0,"rgba(255, 255, 255, 0)"),f.fillRect(0,0,b,y),f.restore()),e.show&&!e.aboveData&&U();for(var t=0;t<c.length;++t)C(w.drawSeries,[f,c[t],t,te]),$(c[t]);C(w.draw,[f]),e.show&&e.aboveData&&U(),p.render(),K()}function G(e,t){for(var i,o,n,a,r=L(),s=0;s<r.length;++s)if((i=r[s]).direction===t&&(e[a=t+i.n+"axis"]||1!==i.n||(a=t+"axis"),e[a])){o=e[a].from,n=e[a].to;break}if(e[a]||(i="x"===t?g[0]:x[0],o=e[t+"1"],n=e[t+"2"]),null!=o&&null!=n&&n<o){var l=o;o=n,n=l}return{from:o,to:n,axis:i}}function q(e){var t=e.box,i=0,o=0;return"x"===e.direction?(i=0,o=t.top-v.top+("top"===e.position?t.height:0)):(o=0,i=t.left-v.left+("left"===e.position?t.width:0)+e.boxPosition.centerX),{x:i,y:o}}function H(e,t){return e%2!=0?Math.floor(t)+.5:t}function V(e){f.lineWidth=1;var t=q(e),i=t.x,o=t.y;if(e.show){var n=0,a=0;f.strokeStyle=e.options.color,f.beginPath(),"x"===e.direction?n=b+1:a=y+1,"x"===e.direction?o=H(f.lineWidth,o):i=H(f.lineWidth,i),f.moveTo(i,o),f.lineTo(i+n,o+a),f.stroke()}}function _(e){var t=e.tickLength,i=e.showMinorTicks,o=S,n=q(e),a=n.x,r=n.y,s=0;for(f.strokeStyle=e.options.color,f.beginPath(),s=0;s<e.ticks.length;++s){var l,c=e.ticks[s].v,u=0,p=0,h=0,d=0;if(!isNaN(c)&&c>=e.min&&c<=e.max&&("x"===e.direction?(a=e.p2c(c),p=t,"top"===e.position&&(p=-p)):(r=e.p2c(c),u=t,"left"===e.position&&(u=-u)),"x"===e.direction?a=H(f.lineWidth,a):r=H(f.lineWidth,r),f.moveTo(a,r),f.lineTo(a+u,r+p)),!0===i&&s<e.ticks.length-1){var m=e.ticks[s].v,g=(e.ticks[s+1].v-m)/(o+1);for(l=1;l<=o;l++){if("x"===e.direction){if(d=t/2,a=H(f.lineWidth,e.p2c(m+l*g)),"top"===e.position&&(d=-d),a<0||b<a)continue}else if(h=t/2,r=H(f.lineWidth,e.p2c(m+l*g)),"left"===e.position&&(h=-h),r<0||y<r)continue;f.moveTo(a,r),f.lineTo(a+h,r+d)}}}f.stroke()}function Q(e){var t,i,o;for(f.strokeStyle=u.grid.tickColor,f.beginPath(),t=0;t<e.ticks.length;++t){var a=e.ticks[t].v,r=0,s=0,l=0,c=0;isNaN(a)||a<e.min||a>e.max||(i=a,o=u.grid.borderWidth,(!("object"===n(o)&&0<o[e.position]||0<o)||i!==e.min&&i!==e.max)&&("x"===e.direction?(l=e.p2c(a),s=-(c=y)):(l=0,c=e.p2c(a),r=b),"x"===e.direction?l=H(f.lineWidth,l):c=H(f.lineWidth,c),f.moveTo(l,c),f.lineTo(l+r,c+s)))}f.stroke()}function U(){var t,i,o,a;f.save(),f.translate(v.left,v.top),function(){var t,i,o=u.grid.markings;if(o)for(e.isFunction(o)&&((t=k.getAxes()).xmin=t.xaxis.min,t.xmax=t.xaxis.max,t.ymin=t.yaxis.min,t.ymax=t.yaxis.max,o=o(t)),i=0;i<o.length;++i){var n=o[i],a=G(n,"x"),r=G(n,"y");if(null==a.from&&(a.from=a.axis.min),null==a.to&&(a.to=a.axis.max),null==r.from&&(r.from=r.axis.min),null==r.to&&(r.to=r.axis.max),!(a.to<a.axis.min||a.from>a.axis.max||r.to<r.axis.min||r.from>r.axis.max)){a.from=Math.max(a.from,a.axis.min),a.to=Math.min(a.to,a.axis.max),r.from=Math.max(r.from,r.axis.min),r.to=Math.min(r.to,r.axis.max);var s=a.from===a.to,l=r.from===r.to;if(!s||!l)if(a.from=Math.floor(a.axis.p2c(a.from)),a.to=Math.floor(a.axis.p2c(a.to)),r.from=Math.floor(r.axis.p2c(r.from)),r.to=Math.floor(r.axis.p2c(r.to)),s||l){var c=n.lineWidth||u.grid.markingsLineWidth,p=c%2?.5:0;f.beginPath(),f.strokeStyle=n.color||u.grid.markingsColor,f.lineWidth=c,s?(f.moveTo(a.to+p,r.from),f.lineTo(a.to+p,r.to)):(f.moveTo(a.from,r.to+p),f.lineTo(a.to,r.to+p)),f.stroke()}else f.fillStyle=n.color||u.grid.markingsColor,f.fillRect(a.from,r.to,a.to-a.from,r.from-r.to)}}}(),t=L(),i=u.grid.borderWidth;for(var r=0;r<t.length;++r){var s=t[r];s.show&&(V(s),!0===s.showTicks&&_(s),!0===s.gridLines&&Q(s))}i&&(o=u.grid.borderWidth,a=u.grid.borderColor,"object"===n(o)||"object"===n(a)?("object"!==n(o)&&(o={top:o,right:o,bottom:o,left:o}),"object"!==n(a)&&(a={top:a,right:a,bottom:a,left:a}),0<o.top&&(f.strokeStyle=a.top,f.lineWidth=o.top,f.beginPath(),f.moveTo(0-o.left,0-o.top/2),f.lineTo(b,0-o.top/2),f.stroke()),0<o.right&&(f.strokeStyle=a.right,f.lineWidth=o.right,f.beginPath(),f.moveTo(b+o.right/2,0-o.top),f.lineTo(b+o.right/2,y),f.stroke()),0<o.bottom&&(f.strokeStyle=a.bottom,f.lineWidth=o.bottom,f.beginPath(),f.moveTo(b+o.right,y+o.bottom/2),f.lineTo(0,y+o.bottom/2),f.stroke()),0<o.left&&(f.strokeStyle=a.left,f.lineWidth=o.left,f.beginPath(),f.moveTo(0-o.left/2,y+o.bottom),f.lineTo(0-o.left/2,0),f.stroke())):(f.lineWidth=o,f.strokeStyle=u.grid.borderColor,f.strokeRect(-o/2,-o/2,b+o,y+o))),f.restore()}function $(t){t.lines.show&&e.plot.drawSeries.drawSeriesLines(t,f,v,b,y,k.drawSymbol,te),t.bars.show&&e.plot.drawSeries.drawSeriesBars(t,f,v,b,y,k.drawSymbol,te),t.points.show&&e.plot.drawSeries.drawSeriesPoints(t,f,v,b,y,k.drawSymbol,te)}function Z(e,t,i,o,n,a){var r=e.xaxis.c2p(t),s=e.yaxis.c2p(i),l=o/e.xaxis.scale,c=o/e.yaxis.scale,u=e.datapoints.points,p=e.datapoints.pointsize;e.xaxis.options.inverseTransform&&(l=Number.MAX_VALUE),e.yaxis.options.inverseTransform&&(c=Number.MAX_VALUE);for(var h=null,d=0;d<u.length;d+=p){var f=u[d],m=u[d+1];if(null!=f&&!(l<f-r||f-r<-l||c<m-s||m-s<-c)){var g=Math.abs(e.xaxis.p2c(f)-t),x=Math.abs(e.yaxis.p2c(m)-i),v=a?a(g,x):g*g+x*x;v<n&&(h={dataIndex:d/p,distance:n=v})}}return h}function J(e,t,i){var o,n,a=e.bars.barWidth[0]||e.bars.barWidth,r=e.xaxis.c2p(t),s=e.yaxis.c2p(i),l=e.datapoints.points,c=e.datapoints.pointsize;switch(e.bars.align){case"left":o=0;break;case"right":o=-a;break;default:o=-a/2}n=o+a;for(var u=e.bars.fillTowards||0,p=u>e.yaxis.min?Math.min(e.yaxis.max,u):e.yaxis.min,h=null,d=0;d<l.length;d+=c){var f=l[d],m=l[d+1];null!=f&&(e.bars.horizontal?r<=Math.max(p,f)&&r>=Math.min(p,f)&&m+o<=s&&s<=m+n:f+o<=r&&r<=f+n&&s>=Math.min(p,m)&&s<=Math.max(p,m))&&(h=d/c)}return h}function K(){var e=u.interaction.redrawOverlayInterval;-1!==e?M||(M=setTimeout(function(){ee(k)},e)):ee()}function ee(e){if(M=null,m){h.clear(),C(w.drawOverlay,[m,h]);var t=new CustomEvent("onDrawingDone");e.getEventHolder().dispatchEvent(t)}}function te(t,i,o,n){if("string"==typeof t)return t;for(var a=f.createLinearGradient(0,o,0,i),r=0,s=t.colors.length;r<s;++r){var l=t.colors[r];if("string"!=typeof l){var c=e.color.parse(n);null!=l.brightness&&(c=c.scale("rgb",l.brightness)),null!=l.opacity&&(c.a*=l.opacity),l=c.toString()}a.addColorStop(r/(s-1),l)}return a}!function(){for(var i={Canvas:t},o=0;o<l.length;++o){var n=l[o];n.init(k,i),n.options&&e.extend(!0,u,n.options)}}(),function(){a.css("padding",0).children().filter(function(){return!e(this).hasClass("flot-overlay")&&!e(this).hasClass("flot-base")}).remove(),"static"===a.css("position")&&a.css("position","relative"),p=new t("flot-base",a[0]),h=new t("flot-overlay",a[0]),f=p.context,m=h.context,d=e(h.element).unbind();var i=a.data("plot");i&&(i.shutdown(),h.clear()),a.data("plot",k)}(),function(t){e.extend(!0,u,t),t&&t.colors&&(u.colors=t.colors),null==u.xaxis.color&&(u.xaxis.color=e.color.parse(u.grid.color).scale("a",.22).toString()),null==u.yaxis.color&&(u.yaxis.color=e.color.parse(u.grid.color).scale("a",.22).toString()),null==u.xaxis.tickColor&&(u.xaxis.tickColor=u.grid.tickColor||u.xaxis.color),null==u.yaxis.tickColor&&(u.yaxis.tickColor=u.grid.tickColor||u.yaxis.color),null==u.grid.borderColor&&(u.grid.borderColor=u.grid.color),null==u.grid.tickColor&&(u.grid.tickColor=e.color.parse(u.grid.color).scale("a",.22).toString());var i,o,n,r=a.css("font-size"),s=r?+r.replace("px",""):13,l={style:a.css("font-style"),size:Math.round(.8*s),variant:a.css("font-variant"),weight:a.css("font-weight"),family:a.css("font-family")};for(n=u.xaxes.length||1,i=0;i<n;++i)(o=u.xaxes[i])&&!o.tickColor&&(o.tickColor=o.color),o=e.extend(!0,{},u.xaxis,o),(u.xaxes[i]=o).font&&(o.font=e.extend({},l,o.font),o.font.color||(o.font.color=o.color),o.font.lineHeight||(o.font.lineHeight=Math.round(1.15*o.font.size)));for(n=u.yaxes.length||1,i=0;i<n;++i)(o=u.yaxes[i])&&!o.tickColor&&(o.tickColor=o.color),o=e.extend(!0,{},u.yaxis,o),(u.yaxes[i]=o).font&&(o.font=e.extend({},l,o.font),o.font.color||(o.font.color=o.color),o.font.lineHeight||(o.font.lineHeight=Math.round(1.15*o.font.size)));for(i=0;i<u.xaxes.length;++i)N(g,i+1).options=u.xaxes[i];for(i=0;i<u.yaxes.length;++i)N(x,i+1).options=u.yaxes[i];for(var c in e.each(L(),function(e,t){t.boxPosition=t.options.boxPosition||{centerX:0,centerY:0}}),w)u.hooks[c]&&u.hooks[c].length&&(w[c]=w[c].concat(u.hooks[c]));C(w.processOptions,[u])}(s),A(r),F(!0),B(),C(w.bindEvents,[d])}e.plot=function(t,i,o){return new s(e(t),i,o,e.plot.plugins)},e.plot.version="1.0.3",e.plot.plugins=[],e.fn.plot=function(t,i){return this.each(function(){e.plot(this,t,i)})},e.plot.linearTickGenerator=i,e.plot.defaultTickFormatter=o,e.plot.expRepTickFormatter=a}(jQuery),s=jQuery,l={saturate:function(e){return e===1/0?Number.MAX_VALUE:e===-1/0?-Number.MAX_VALUE:e},delta:function(e,t,i){return(t-e)/i==1/0?t/i-e/i:(t-e)/i},multiply:function(e,t){return l.saturate(e*t)},multiplyAdd:function(e,t,i){if(isFinite(e*t))return l.saturate(e*t+i);for(var o=i,n=0;n<t;n++)o+=e;return l.saturate(o)},floorInBase:function(e,t){return t*Math.floor(e/t)}},s.plot.saturated=l,function(e){var t={getPageXY:function(e){var t=document.documentElement;return{X:e.clientX+(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0),Y:e.clientY+(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}},getPixelRatio:function(e){return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)},isSafari:function(){return/constructor/i.test(window.top.HTMLElement)||"[object SafariRemoteNotification]"===(!window.top.safari||void 0!==window.top.safari&&window.top.safari.pushNotification).toString()},isMobileSafari:function(){return navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&navigator.userAgent.match(/AppleWebKit/)},isOpera:function(){return!!window.opr&&!!opr.addons||!!window.opera||0<=navigator.userAgent.indexOf(" OPR/")},isFirefox:function(){return"undefined"!=typeof InstallTrigger},isIE:function(){return!!document.documentMode},isEdge:function(){return!t.isIE()&&!!window.StyleMedia},isChrome:function(){return!!window.chrome&&!!window.chrome.webstore},isBlink:function(){return(t.isChrome()||t.isOpera())&&!!window.CSS}};e.plot.browser=t}(jQuery),(r=jQuery).plot.drawSeries=new function(){function e(e,t,i,o,n,a,r,s,l,c,u){var p,h,d,f,m=e+o,g=e+n,x=i,v=t,b=!1;p=h=d=!0,c?(b=h=d=!0,p=!1,v=t+o,x=t+n,(g=e)<(m=i)&&(f=g,g=m,m=f,h=!(p=!0))):(p=h=d=!0,b=!1,m=e+o,g=e+n,(v=t)<(x=i)&&(f=v,v=x,x=f,d=!(b=!0))),g<r.min||m>r.max||v<s.min||x>s.max||(m<r.min&&(m=r.min,p=!1),g>r.max&&(g=r.max,h=!1),x<s.min&&(x=s.min,b=!1),v>s.max&&(v=s.max,d=!1),m=r.p2c(m),x=s.p2c(x),g=r.p2c(g),v=s.p2c(v),a&&(l.fillStyle=a(x,v),l.fillRect(m,v,g-m,x-v)),0<u&&(p||h||d||b)&&(l.beginPath(),l.moveTo(m,x),p?l.lineTo(m,v):l.moveTo(m,v),d?l.lineTo(g,v):l.moveTo(g,v),h?l.lineTo(g,x):l.moveTo(g,x),b?l.lineTo(m,x):l.moveTo(m,x),l.stroke()))}function t(e,t,i,o,n){var a=e.fill;if(!a)return null;if(e.fillColor)return n(e.fillColor,i,o,t);var s=r.color.parse(t);return s.a="number"==typeof a?a:.4,s.normalize(),s.toString()}this.drawSeriesLines=function(e,i,o,n,a,r,s){i.save(),i.translate(o.left,o.top),i.lineJoin="round",e.lines.dashes&&i.setLineDash&&i.setLineDash(e.lines.dashes);var l={format:e.datapoints.format,points:e.datapoints.points,pointsize:e.datapoints.pointsize};e.decimate&&(l.points=e.decimate(e,e.xaxis.min,e.xaxis.max,n,e.yaxis.min,e.yaxis.max,a));var c=e.lines.lineWidth;i.lineWidth=c,i.strokeStyle=e.color;var u=t(e.lines,e.color,0,a,s);u&&(i.fillStyle=u,function(e,t,i,o,n,a){for(var r=e.points,s=e.pointsize,l=o>i.min?Math.min(i.max,o):i.min,c=0,u=1,p=!1,h=0,d=0,f=null,m=null;!(0<s&&c>r.length+s);){var g=r[(c+=s)-s],x=r[c-s+u],v=r[c],b=r[c+u];if(-2===s&&(x=b=l),p){if(0<s&&null!=g&&null==v){d=c,s=-s,u=2;continue}if(s<0&&c===h+s){n.fill(),p=!1,c=h=d+(s=-s);continue}}if(null!=g&&null!=v){if(a&&(null!==f&&null!==m?(v=g,b=x,g=f,x=m,m=f=null,c-=s):x!==b&&g!==v&&(f=v,m=b=x)),g<=v&&g<t.min){if(v<t.min)continue;x=(t.min-g)/(v-g)*(b-x)+x,g=t.min}else if(v<=g&&v<t.min){if(g<t.min)continue;b=(t.min-g)/(v-g)*(b-x)+x,v=t.min}if(v<=g&&g>t.max){if(v>t.max)continue;x=(t.max-g)/(v-g)*(b-x)+x,g=t.max}else if(g<=v&&v>t.max){if(g>t.max)continue;b=(t.max-g)/(v-g)*(b-x)+x,v=t.max}if(p||(n.beginPath(),n.moveTo(t.p2c(g),i.p2c(l)),p=!0),x>=i.max&&b>=i.max)n.lineTo(t.p2c(g),i.p2c(i.max)),n.lineTo(t.p2c(v),i.p2c(i.max));else if(x<=i.min&&b<=i.min)n.lineTo(t.p2c(g),i.p2c(i.min)),n.lineTo(t.p2c(v),i.p2c(i.min));else{var y=g,w=v;x<=b&&x<i.min&&b>=i.min?(g=(i.min-x)/(b-x)*(v-g)+g,x=i.min):b<=x&&b<i.min&&x>=i.min&&(v=(i.min-x)/(b-x)*(v-g)+g,b=i.min),b<=x&&x>i.max&&b<=i.max?(g=(i.max-x)/(b-x)*(v-g)+g,x=i.max):x<=b&&b>i.max&&x<=i.max&&(v=(i.max-x)/(b-x)*(v-g)+g,b=i.max),g!==y&&n.lineTo(t.p2c(y),i.p2c(x)),n.lineTo(t.p2c(g),i.p2c(x)),n.lineTo(t.p2c(v),i.p2c(b)),v!==w&&(n.lineTo(t.p2c(v),i.p2c(b)),n.lineTo(t.p2c(w),i.p2c(b)))}}else m=f=null}}(l,e.xaxis,e.yaxis,e.lines.fillTowards||0,i,e.lines.steps)),0<c&&function(e,t,i,o,n,a,r){var s=e.points,l=e.pointsize,c=null,u=null,p=0,h=0,d=0,f=0,m=null,g=null,x=0;for(a.beginPath(),x=l;x<s.length;x+=l)if(p=s[x-l],h=s[x-l+1],d=s[x],f=s[x+1],null!==p&&null!==d){if(r&&(null!==m&&null!==g?(d=p,f=h,p=m,h=g,g=m=null,x-=l):h!==f&&p!==d&&(m=d,g=f=h)),h<=f&&h<n.min){if(f<n.min)continue;p=(n.min-h)/(f-h)*(d-p)+p,h=n.min}else if(f<=h&&f<n.min){if(h<n.min)continue;d=(n.min-h)/(f-h)*(d-p)+p,f=n.min}if(f<=h&&h>n.max){if(f>n.max)continue;p=(n.max-h)/(f-h)*(d-p)+p,h=n.max}else if(h<=f&&f>n.max){if(h>n.max)continue;d=(n.max-h)/(f-h)*(d-p)+p,f=n.max}if(p<=d&&p<o.min){if(d<o.min)continue;h=(o.min-p)/(d-p)*(f-h)+h,p=o.min}else if(d<=p&&d<o.min){if(p<o.min)continue;f=(o.min-p)/(d-p)*(f-h)+h,d=o.min}if(d<=p&&p>o.max){if(d>o.max)continue;h=(o.max-p)/(d-p)*(f-h)+h,p=o.max}else if(p<=d&&d>o.max){if(p>o.max)continue;f=(o.max-p)/(d-p)*(f-h)+h,d=o.max}p===c&&h===u||a.moveTo(o.p2c(p)+0,n.p2c(h)+0),c=d,u=f,a.lineTo(o.p2c(d)+0,n.p2c(f)+0)}else g=m=null;a.stroke()}(l,0,0,e.xaxis,e.yaxis,i,e.lines.steps),i.restore()},this.drawSeriesPoints=function(e,i,o,n,a,r,s){function l(e,t,i,o,n,a){e.moveTo(t+o,i),e.arc(t,i,o,0,n?Math.PI:2*Math.PI,!1)}l.fill=!0,i.save(),i.translate(o.left,o.top);var c={format:e.datapoints.format,points:e.datapoints.points,pointsize:e.datapoints.pointsize};e.decimatePoints&&(c.points=e.decimatePoints(e,e.xaxis.min,e.xaxis.max,n,e.yaxis.min,e.yaxis.max,a));var u,p=e.points.lineWidth,h=e.points.radius,d=e.points.symbol;"circle"===d?u=l:"string"==typeof d&&r&&r[d]?u=r[d]:"function"==typeof r&&(u=r),0===p&&(p=1e-4),i.lineWidth=p,i.fillStyle=t(e.points,e.color,null,null,s),i.strokeStyle=e.color,function(e,t,o,n,a,r,s,l){var c=e.points,u=e.pointsize;i.beginPath();for(var p=0;p<c.length;p+=u){var h=c[p],d=c[p+1];null==h||h<r.min||h>r.max||d<s.min||d>s.max||(h=r.p2c(h),d=s.p2c(d)+0,l(i,h,d,t,!1,!0))}l.fill&&i.fill(),i.stroke()}(c,h,0,0,0,e.xaxis,e.yaxis,u),i.restore()},this.drawSeriesBars=function(i,o,n,a,r,s,l){o.save(),o.translate(n.left,n.top);var c,u={format:i.datapoints.format,points:i.datapoints.points,pointsize:i.datapoints.pointsize};i.decimate&&(u.points=i.decimate(i,i.xaxis.min,i.xaxis.max,a)),o.lineWidth=i.bars.lineWidth,o.strokeStyle=i.color;var p=i.bars.barWidth[0]||i.bars.barWidth;switch(i.bars.align){case"left":c=0;break;case"right":c=-p;break;default:c=-p/2}!function(t,n,a,r,s,l){for(var c=t.points,u=t.pointsize,p=i.bars.fillTowards||0,h=p>l.min?Math.min(l.max,p):l.min,d=0;d<c.length;d+=u)if(null!=c[d]){var f=3===u?c[d+2]:h;e(c[d],c[d+1],f,n,a,r,s,l,o,i.bars.horizontal,i.bars.lineWidth)}}(u,c,c+p,i.bars.fill?function(e,o){return t(i.bars,i.color,e,o,l)}:null,i.xaxis,i.yaxis),o.restore()},this.drawBar=e},function(e){function t(e,t,i,o){if(t.points.errorbars){var n=[{x:!0,number:!0,required:!0},{y:!0,number:!0,required:!0}],a=t.points.errorbars;"x"!==a&&"xy"!==a||(t.points.xerr.asymmetric&&n.push({x:!0,number:!0,required:!0}),n.push({x:!0,number:!0,required:!0})),"y"!==a&&"xy"!==a||(t.points.yerr.asymmetric&&n.push({y:!0,number:!0,required:!0}),n.push({y:!0,number:!0,required:!0})),o.format=n}}function i(e,t){var i=e.datapoints.points,o=null,n=null,a=null,r=null,s=e.points.xerr,l=e.points.yerr,c=e.points.errorbars;"x"===c||"xy"===c?s.asymmetric?(o=i[t+2],n=i[t+3],"xy"===c&&(l.asymmetric?(a=i[t+4],r=i[t+5]):a=i[t+4])):(o=i[t+2],"xy"===c&&(l.asymmetric?(a=i[t+3],r=i[t+4]):a=i[t+3])):"y"===c&&(l.asymmetric?(a=i[t+2],r=i[t+3]):a=i[t+2]),null==n&&(n=o),null==r&&(r=a);var u=[o,n,a,r];return s.show||(u[0]=null,u[1]=null),l.show||(u[2]=null,u[3]=null),u}function o(t,i,o,a,r,s,l,c,u,p,h){a+=p,r+=p,s+=p,"x"===i.err?(o+u<r?n(t,[[r,a],[Math.max(o+u,h[0]),a]]):l=!1,s<o-u?n(t,[[Math.min(o-u,h[1]),a],[s,a]]):c=!1):(r<a-u?n(t,[[o,r],[o,Math.min(a-u,h[0])]]):l=!1,a+u<s?n(t,[[o,Math.max(a+u,h[1])],[o,s]]):c=!1),u=null!=i.radius?i.radius:u,l&&("-"===i.upperCap?"x"===i.err?n(t,[[r,a-u],[r,a+u]]):n(t,[[o-u,r],[o+u,r]]):e.isFunction(i.upperCap)&&("x"===i.err?i.upperCap(t,r,a,u):i.upperCap(t,o,r,u))),c&&("-"===i.lowerCap?"x"===i.err?n(t,[[s,a-u],[s,a+u]]):n(t,[[o-u,s],[o+u,s]]):e.isFunction(i.lowerCap)&&("x"===i.err?i.lowerCap(t,s,a,u):i.lowerCap(t,o,s,u)))}function n(e,t){e.beginPath(),e.moveTo(t[0][0],t[0][1]);for(var i=1;i<t.length;i++)e.lineTo(t[i][0],t[i][1]);e.stroke()}function a(t,n){var a=t.getPlotOffset();n.save(),n.translate(a.left,a.top),e.each(t.getData(),function(e,t){t.points.errorbars&&(t.points.xerr.show||t.points.yerr.show)&&function(e,t,n){var a,r=n.datapoints.points,s=n.datapoints.pointsize,l=[n.xaxis,n.yaxis],c=n.points.radius,u=[n.points.xerr,n.points.yerr],p=!1;l[0].p2c(l[0].max)<l[0].p2c(l[0].min)&&(p=!0,a=u[0].lowerCap,u[0].lowerCap=u[0].upperCap,u[0].upperCap=a);var h=!1;l[1].p2c(l[1].min)<l[1].p2c(l[1].max)&&(h=!0,a=u[1].lowerCap,u[1].lowerCap=u[1].upperCap,u[1].upperCap=a);for(var d=0;d<n.datapoints.points.length;d+=s)for(var f=i(n,d),m=0;m<u.length;m++){var g=[l[m].min,l[m].max];if(f[m*u.length]){var x=r[d],v=r[d+1],b=[x,v][m]+f[m*u.length+1],y=[x,v][m]-f[m*u.length];if("x"===u[m].err&&(v>l[1].max||v<l[1].min||b<l[0].min||y>l[0].max))continue;if("y"===u[m].err&&(x>l[0].max||x<l[0].min||b<l[1].min||y>l[1].max))continue;var w=!0,k=!0;b>g[1]&&(w=!1,b=g[1]),y<g[0]&&(k=!1,y=g[0]),("x"===u[m].err&&p||"y"===u[m].err&&h)&&(a=y,y=b,b=a,a=k,k=w,w=a,a=g[0],g[0]=g[1],g[1]=a),x=l[0].p2c(x),v=l[1].p2c(v),b=l[m].p2c(b),y=l[m].p2c(y),g[0]=l[m].p2c(g[0]),g[1]=l[m].p2c(g[1]);var T=u[m].lineWidth?u[m].lineWidth:n.points.lineWidth,M=null!=n.points.shadowSize?n.points.shadowSize:n.shadowSize;if(0<T&&0<M){var S=M/2;t.lineWidth=S,t.strokeStyle="rgba(0,0,0,0.1)",o(t,u[m],x,v,b,y,w,k,c,S+S/2,g),t.strokeStyle="rgba(0,0,0,0.2)",o(t,u[m],x,v,b,y,w,k,c,S/2,g)}t.strokeStyle=u[m].color?u[m].color:n.color,t.lineWidth=T,o(t,u[m],x,v,b,y,w,k,c,0,g)}}}(0,n,t)}),n.restore()}e.plot.plugins.push({init:function(e){e.hooks.processRawData.push(t),e.hooks.draw.push(a)},options:{series:{points:{errorbars:null,xerr:{err:"x",show:null,asymmetric:null,upperCap:null,lowerCap:null,color:null,radius:null},yerr:{err:"y",show:null,asymmetric:null,upperCap:null,lowerCap:null,color:null,radius:null}}}},name:"errorbars",version:"1.0"})}(jQuery),jQuery.plot.uiConstants={SNAPPING_CONSTANT:20,PANHINT_LENGTH_CONSTANT:10,MINOR_TICKS_COUNT_CONSTANT:4,TICK_LENGTH_CONSTANT:10,ZOOM_DISTANCE_MARGIN:25},function(e){var t=o(Number.MAX_VALUE,10),i=o(Number.MAX_VALUE,4);function o(e,t){for(var i,o,n=Math.floor(Math.log(e)*Math.LOG10E)-1,a=[],r=-n;r<=n;r++){o=Math.pow(10,r);for(var s=1;s<9;s+=t)i=o*s,a.push(i)}return a}var n=function(o,n,r){var s=[],l=-1,c=-1,u=o.getCanvas(),p=t,h=a(n,o),d=n.max;r||(r=.3*Math.sqrt("x"===n.direction?u.width:u.height)),t.some(function(e,t){return h<=e&&(l=t,!0)}),t.some(function(e,t){return d<=e&&(c=t,!0)}),-1===c&&(c=t.length-1),c-l<=r/4&&p.length!==i.length&&(p=i,l*=2,c*=2);var f,m,g,x=null,v=1/r;if(r/4<=c-l){for(var b=c;l<=b;b--)f=p[b],m=(Math.log(f)-Math.log(h))/(Math.log(d)-Math.log(h)),g=f,null===x?x={pixelCoord:m,idealPixelCoord:m}:Math.abs(m-x.pixelCoord)>=v?x={pixelCoord:m,idealPixelCoord:x.idealPixelCoord-v}:g=null,g&&s.push(g);s.reverse()}else{var y=o.computeTickSize(h,d,r),w={min:h,max:d,tickSize:y};s=e.plot.linearTickGenerator(w)}return s},a=function(e,t){var i=e.min,o=e.max;return i<=0&&o<(i=null===e.datamin?e.min=.1:d(t,e))&&(e.max=null!==e.datamax?e.datamax:e.options.max,e.options.offset.below=0,e.options.offset.above=0),i},r=function(t,i,o){var n=0<t?Math.floor(Math.log(t)/Math.LN10):0;if(o)return-4<=n&&n<=7?e.plot.defaultTickFormatter(t,i,o):e.plot.expRepTickFormatter(t,i,o);if(-4<=n&&n<=7){var a=n<0?t.toFixed(-n):t.toFixed(n+2);if(-1!==a.indexOf(".")){for(var r=a.lastIndexOf("0");r===a.length-1;)r=(a=a.slice(0,-1)).lastIndexOf("0");a.indexOf(".")===a.length-1&&(a=a.slice(0,-1))}return a}return e.plot.expRepTickFormatter(t,i)},s=function(e){return e<t[0]&&(e=t[0]),Math.log(e)},l=function(e){return Math.exp(e)},c=function(e){return-e},u=function(e){return-s(e)},p=function(e){return l(-e)};function h(e,t){"log"===t.options.mode&&t.datamin<=0&&(null===t.datamin?t.datamin=.1:t.datamin=d(e,t))}function d(e,t){var i=e.getData().filter(function(e){return e.xaxis===t||e.yaxis===t}).map(function(t){return e.computeRangeForDataSeries(t,null,f)}),o="x"===t.direction?Math.min(.1,i&&i[0]?i[0].xmin:.1):Math.min(.1,i&&i[0]?i[0].ymin:.1);return t.min=o}function f(e){return 0<e}e.plot.plugins.push({init:function(t){t.hooks.processOptions.push(function(t){e.each(t.getAxes(),function(e,i){var o=i.options;"log"===o.mode?(i.tickGenerator=function(e){return n(t,e,11)},"function"!=typeof i.options.tickFormatter&&(i.options.tickFormatter=r),i.options.transform=o.inverted?u:s,i.options.inverseTransform=o.inverted?p:l,i.options.autoScaleMargin=0,t.hooks.setRange.push(h)):o.inverted&&(i.options.transform=c,i.options.inverseTransform=c)})})},options:{xaxis:{}},name:"log",version:"0.1"}),e.plot.logTicksGenerator=n,e.plot.logTickFormatter=r}(jQuery),function(e){var t=function(e,t,i,o,n){var a=o*Math.sqrt(Math.PI)/2;e.rect(t-a,i-a,a+a,a+a)},i=function(e,t,i,o,n){var a=o*Math.sqrt(Math.PI)/2;e.rect(t-a,i-a,a+a,a+a)},o=function(e,t,i,o,n){var a=o*Math.sqrt(Math.PI/2);e.moveTo(t-a,i),e.lineTo(t,i-a),e.lineTo(t+a,i),e.lineTo(t,i+a),e.lineTo(t-a,i),e.lineTo(t,i-a)},n=function(e,t,i,o,n){var a=o*Math.sqrt(2*Math.PI/Math.sin(Math.PI/3)),r=a*Math.sin(Math.PI/3);e.moveTo(t-a/2,i+r/2),e.lineTo(t+a/2,i+r/2),n||(e.lineTo(t,i-r/2),e.lineTo(t-a/2,i+r/2),e.lineTo(t+a/2,i+r/2))},a=function(e,t,i,o,n,a){n||(e.moveTo(t+o,i),e.arc(t,i,o,0,2*Math.PI,!1))},r={square:t,rectangle:i,diamond:o,triangle:n,cross:function(e,t,i,o,n){var a=o*Math.sqrt(Math.PI)/2;e.moveTo(t-a,i-a),e.lineTo(t+a,i+a),e.moveTo(t-a,i+a),e.lineTo(t+a,i-a)},ellipse:a,plus:function(e,t,i,o,n){var a=o*Math.sqrt(Math.PI/2);e.moveTo(t-a,i),e.lineTo(t+a,i),e.moveTo(t,i+a),e.lineTo(t,i-a)}};a.fill=n.fill=o.fill=i.fill=t.fill=!0,e.plot.plugins.push({init:function(e){e.drawSymbol=r},name:"symbols",version:"1.0"})}(jQuery),function(e){function t(e,t,i,o){if(!0===t.flatdata){var n=t.start||0,a="number"==typeof t.step?t.step:1;o.pointsize=2;for(var r=0,s=0;r<i.length;r++,s+=2)o.points[s]=n+r*a,o.points[s+1]=i[r];void 0!==o.points?o.points.length=2*i.length:o.points=[]}}jQuery.plot.plugins.push({init:function(e){e.hooks.processRawData.push(t)},name:"flatdata",version:"0.0.2"})}(),function(e){var t=e.plot.saturated,i=e.plot.browser,o=e.plot.uiConstants.SNAPPING_CONSTANT,n=e.plot.uiConstants.PANHINT_LENGTH_CONSTANT;function a(a,r){var s,l=null,c=!1,u="manual"===r.pan.mode,p="smartLock"===r.pan.mode,h=p||"smart"===r.pan.mode,d="default",f=null,m=null,g={x:0,y:0},x=!1;function v(e,t){var o=Math.abs(e.originalEvent.deltaY)<=1?1+Math.abs(e.originalEvent.deltaY)/50:null;if(x&&T(e),a.getOptions().zoom.active)return e.preventDefault(),function(e,t,o){var n=i.getPageXY(e),r=a.offset();r.left=n.X-r.left,r.top=n.Y-r.top;var s=a.getPlaceholder().offset();s.left=n.X-s.left,s.top=n.Y-s.top;var l=a.getXAxes().concat(a.getYAxes()).filter(function(e){var t=e.box;if(void 0!==t)return s.left>t.left&&s.left<t.left+t.width&&s.top>t.top&&s.top<t.top+t.height});0===l.length&&(l=void 0),t?a.zoomOut({center:r,axes:l,amount:o}):a.zoom({center:r,axes:l,amount:o})}(e,t<0,o),!1}function b(e){c=!0}function y(e){c=!1}function w(e){if(!c||0!==e.button)return!1;x=!0;var t=i.getPageXY(e),o=a.getPlaceholder().offset();o.left=t.X-o.left,o.top=t.Y-o.top,0===(l=a.getXAxes().concat(a.getYAxes()).filter(function(e){var t=e.box;if(void 0!==t)return o.left>t.left&&o.left<t.left+t.width&&o.top>t.top&&o.top<t.top+t.height})).length&&(l=void 0);var n=a.getPlaceholder().css("cursor");n&&(d=n),a.getPlaceholder().css("cursor",a.getOptions().pan.cursor),h?s=a.navigationState(t.X,t.Y):u&&(g.x=t.X,g.y=t.Y)}function k(e){if(x){var t=i.getPageXY(e),o=a.getOptions().pan.frameRate;-1!==o?!m&&o&&(m=setTimeout(function(){h?a.smartPan({x:s.startPageX-t.X,y:s.startPageY-t.Y},s,l,!1,p):u&&(a.pan({left:g.x-t.X,top:g.y-t.Y,axes:l}),g.x=t.X,g.y=t.Y),m=null},1/o*1e3)):h?a.smartPan({x:s.startPageX-t.X,y:s.startPageY-t.Y},s,l,!1,p):u&&(a.pan({left:g.x-t.X,top:g.y-t.Y,axes:l}),g.x=t.X,g.y=t.Y)}}function T(e){if(x){m&&(clearTimeout(m),m=null),x=!1;var t=i.getPageXY(e);a.getPlaceholder().css("cursor",d),h?(a.smartPan({x:s.startPageX-t.X,y:s.startPageY-t.Y},s,l,!1,p),a.smartPan.end()):u&&(a.pan({left:g.x-t.X,top:g.y-t.Y,axes:l}),g.x=0,g.y=0)}}function M(t){if(a.activate(),a.getOptions().recenter.interactive){var i,o=a.getTouchedAxis(t.clientX,t.clientY);a.recenter({axes:o[0]?o:null}),i=o[0]?new e.Event("re-center",{detail:{axisTouched:o[0]}}):new e.Event("re-center",{detail:t}),a.getPlaceholder().trigger(i)}}function S(e){return a.activate(),x&&T(e),!1}a.navigationState=function(e,t){var i=this.getAxes(),o={};return Object.keys(i).forEach(function(e){var t=i[e];o[e]={navigationOffset:{below:t.options.offset.below||0,above:t.options.offset.above||0},axisMin:t.min,axisMax:t.max,diagMode:!1}}),o.startPageX=e||0,o.startPageY=t||0,o},a.activate=function(){var e=a.getOptions();e.pan.active&&e.zoom.active||(e.pan.active=!0,e.zoom.active=!0,a.getPlaceholder().trigger("plotactivated",[a]))},a.zoomOut=function(e){e||(e={}),e.amount||(e.amount=a.getOptions().zoom.amount),e.amount=1/e.amount,a.zoom(e)},a.zoom=function(t){t||(t={});var i=t.center,o=t.amount||a.getOptions().zoom.amount,n=a.width(),r=a.height(),s=t.axes||a.getAxes();i||(i={left:n/2,top:r/2});var l=i.left/n,c=i.top/r,u={x:{min:i.left-l*n/o,max:i.left+(1-l)*n/o},y:{min:i.top-c*r/o,max:i.top+(1-c)*r/o}};for(var p in s)if(s.hasOwnProperty(p)){var h=s[p],d=h.options,f=u[h.direction].min,m=u[h.direction].max,g=h.options.offset;if((d.axisZoom||!t.axes)&&(t.axes||d.plotZoom)){if(f=e.plot.saturated.saturate(h.c2p(f)),(m=e.plot.saturated.saturate(h.c2p(m)))<f){var x=f;f=m,m=x}var v=e.plot.saturated.saturate(g.below-(h.min-f)),b=e.plot.saturated.saturate(g.above-(h.max-m));d.offset={below:v,above:b}}}a.setupGrid(!0),a.draw(),t.preventEvent||a.getPlaceholder().trigger("plotzoom",[a,t])},a.pan=function(i){var o={x:+i.left,y:+i.top};isNaN(o.x)&&(o.x=0),isNaN(o.y)&&(o.y=0),e.each(i.axes||a.getAxes(),function(e,n){var a=n.options,r=o[n.direction];if((a.axisPan||!i.axes)&&(a.plotPan||i.axes)&&0!==r){var s=t.saturate(n.c2p(n.p2c(n.min)+r)-n.c2p(n.p2c(n.min))),l=t.saturate(n.c2p(n.p2c(n.max)+r)-n.c2p(n.p2c(n.max)));isFinite(s)||(s=0),isFinite(l)||(l=0),a.offset={below:t.saturate(s+(a.offset.below||0)),above:t.saturate(l+(a.offset.above||0))}}}),a.setupGrid(!0),a.draw(),i.preventEvent||a.getPlaceholder().trigger("plotpan",[a,i])},a.recenter=function(t){e.each(t.axes||a.getAxes(),function(e,i){t.axes?"x"===this.direction?i.options.offset={below:0}:"y"===this.direction&&(i.options.offset={above:0}):i.options.offset={below:0,above:0}}),a.setupGrid(!0),a.draw()};var P=null,C={x:0,y:0};a.smartPan=function(e,i,n,r,s){var l,c,u,p,h,d,m,g,x,v,b,y,w,k=!!s||(c=e,Math.abs(c.y)<o&&Math.abs(c.x)>=o||Math.abs(c.x)<o&&Math.abs(c.y)>=o),T=a.getAxes();p=e=s?function(e){switch(!P&&Math.max(Math.abs(e.x),Math.abs(e.y))>=o&&(P=Math.abs(e.x)<Math.abs(e.y)?"y":"x"),P){case"x":return{x:e.x,y:0};case"y":return{x:0,y:e.y};default:return{x:0,y:0}}}(e):(u=e,Math.abs(u.x)<o&&Math.abs(u.y)>=o?{x:0,y:u.y}:Math.abs(u.y)<o&&Math.abs(u.x)>=o?{x:u.x,y:0}:u),0<Math.abs(p.x)&&0<Math.abs(p.y)&&(i.diagMode=!0),k&&!0===i.diagMode&&(i.diagMode=!1,h=T,d=i,m=e,Object.keys(h).forEach(function(e){g=h[e],0===m[g.direction]&&(g.options.offset.below=d[e].navigationOffset.below,g.options.offset.above=d[e].navigationOffset.above)})),f=k?{start:{x:i.startPageX-a.offset().left+a.getPlotOffset().left,y:i.startPageY-a.offset().top+a.getPlotOffset().top},end:{x:i.startPageX-e.x-a.offset().left+a.getPlotOffset().left,y:i.startPageY-e.y-a.offset().top+a.getPlotOffset().top}}:{start:{x:i.startPageX-a.offset().left+a.getPlotOffset().left,y:i.startPageY-a.offset().top+a.getPlotOffset().top},end:!1},isNaN(e.x)&&(e.x=0),isNaN(e.y)&&(e.y=0),n&&(T=n),Object.keys(T).forEach(function(i){if(x=T[i],v=x.min,b=x.max,l=x.options,w=e[x.direction],y=C[x.direction],(l.axisPan||!n)&&(n||l.plotPan)&&0!==w){var o=t.saturate(x.c2p(x.p2c(v)-(y-w))-x.c2p(x.p2c(v))),a=t.saturate(x.c2p(x.p2c(b)-(y-w))-x.c2p(x.p2c(b)));isFinite(o)||(o=0),isFinite(a)||(a=0),x.options.offset.below=t.saturate(o+(x.options.offset.below||0)),x.options.offset.above=t.saturate(a+(x.options.offset.above||0))}}),C=e,a.setupGrid(!0),a.draw(),r||a.getPlaceholder().trigger("plotpan",[a,e,n,i])},a.smartPan.end=function(){P=f=null,C={x:0,y:0},a.triggerRedrawOverlay()},a.getTouchedAxis=function(e,t){var i=a.getPlaceholder().offset();return i.left=e-i.left,i.top=t-i.top,a.getXAxes().concat(a.getYAxes()).filter(function(e){var t=e.box;if(void 0!==t)return i.left>t.left&&i.left<t.left+t.width&&i.top>t.top&&i.top<t.top+t.height})},a.hooks.drawOverlay.push(function(e,t){if(f){t.strokeStyle="rgba(96, 160, 208, 0.7)",t.lineWidth=2,t.lineJoin="round";var i,o,a=Math.round(f.start.x),r=Math.round(f.start.y);if(l?"x"===l[0].direction?(o=Math.round(f.start.y),i=Math.round(f.end.x)):"y"===l[0].direction&&(i=Math.round(f.start.x),o=Math.round(f.end.y)):(i=Math.round(f.end.x),o=Math.round(f.end.y)),t.beginPath(),!1===f.end)t.moveTo(a,r-n),t.lineTo(a,r+n),t.moveTo(a+n,r),t.lineTo(a-n,r);else{var s=r===o;t.moveTo(a-(s?0:n),r-(s?n:0)),t.lineTo(a+(s?0:n),r+(s?n:0)),t.moveTo(a,r),t.lineTo(i,o),t.moveTo(i-(s?0:n),o-(s?n:0)),t.lineTo(i+(s?0:n),o+(s?n:0))}t.stroke()}}),a.hooks.bindEvents.push(function(e,t){var i=e.getOptions();i.zoom.interactive&&t.mousewheel(v),i.pan.interactive&&(e.addEventHandler("dragstart",w,t,0),e.addEventHandler("drag",k,t,0),e.addEventHandler("dragend",T,t,0),t.bind("mousedown",b),t.bind("mouseup",y)),t.dblclick(M),t.click(S)}),a.hooks.shutdown.push(function(e,t){t.unbind("mousewheel",v),t.unbind("mousedown",b),t.unbind("mouseup",y),t.unbind("dragstart",w),t.unbind("drag",k),t.unbind("dragend",T),t.unbind("dblclick",M),t.unbind("click",S),m&&clearTimeout(m)})}e.plot.plugins.push({init:function(e){e.hooks.processOptions.push(a)},options:{zoom:{interactive:!1,active:!1,amount:1.5},pan:{interactive:!1,active:!1,cursor:"move",frameRate:60,mode:"smart"},recenter:{interactive:!0},xaxis:{axisZoom:!0,plotZoom:!0,axisPan:!0,plotPan:!0},yaxis:{axisZoom:!0,plotZoom:!0,axisPan:!0,plotPan:!0}},name:"navigate",version:"1.3"})}(jQuery),jQuery.plot.plugins.push({init:function(e){e.hooks.processRawData.push(function(e,t,o,n){null!=t.fillBetween&&(format=n.format,format||(format=[],format.push({x:!0,number:!0,computeRange:"none"!==t.xaxis.options.autoScale,required:!0}),format.push({y:!0,number:!0,computeRange:"none"!==t.yaxis.options.autoScale,required:!0}),void 0!==t.fillBetween&&""!==t.fillBetween&&function(t){var o=e.getData();for(i=0;i<o.length;i++)if(o[i].id===t)return!0;return!1}(t.fillBetween)&&t.fillBetween!==t.id&&format.push({x:!1,y:!0,number:!0,required:!1,computeRange:"none"!==t.yaxis.options.autoScale,defaultValue:0}),n.format=format))}),e.hooks.processDatapoints.push(function(e,t,i){if(null!=t.fillBetween){var o=function(e,t){var i;for(i=0;i<t.length;++i)if(t[i].id===e.fillBetween)return t[i];return"number"==typeof e.fillBetween?e.fillBetween<0||e.fillBetween>=t.length?null:t[e.fillBetween]:null}(t,e.getData());if(o){for(var n,a,r,s,l,c,u,p,h=i.pointsize,d=i.points,f=o.datapoints.pointsize,m=o.datapoints.points,g=[],x=t.lines.show,v=2<h&&i.format[2].y,b=x&&t.lines.steps,y=!0,w=0,k=0;!(w>=d.length);){if(u=g.length,null==d[w]){for(p=0;p<h;++p)g.push(d[w+p]);w+=h}else if(k>=m.length){if(!x)for(p=0;p<h;++p)g.push(d[w+p]);w+=h}else if(null==m[k]){for(p=0;p<h;++p)g.push(null);y=!0,k+=f}else{if(n=d[w],a=d[w+1],s=m[k],l=m[k+1],c=0,n===s){for(p=0;p<h;++p)g.push(d[w+p]);c=l,w+=h,k+=f}else if(s<n){if(x&&0<w&&null!=d[w-h]){for(r=a+(d[w-h+1]-a)*(s-n)/(d[w-h]-n),g.push(s),g.push(r),p=2;p<h;++p)g.push(d[w+p]);c=l}k+=f}else{if(y&&x){w+=h;continue}for(p=0;p<h;++p)g.push(d[w+p]);x&&0<k&&null!=m[k-f]&&(c=l+(m[k-f+1]-l)*(n-s)/(m[k-f]-s)),w+=h}y=!1,u!==g.length&&v&&(g[u+2]=c)}if(b&&u!==g.length&&0<u&&null!==g[u]&&g[u]!==g[u-h]&&g[u+1]!==g[u-h+1]){for(p=0;p<h;++p)g[u+h+p]=g[u+p];g[u+1]=g[u-h+1]}}i.points=g}}})},options:{series:{fillBetween:null}},name:"fillbetween",version:"1.0"}),jQuery.plot.plugins.push({init:function(e){e.hooks.processDatapoints.push(function(e,t,i){if(null!=t.stack&&!1!==t.stack){var o=t.bars.show||t.lines.show&&t.lines.fill,n=2<i.pointsize&&(y?i.format[2].x:i.format[2].y);o&&!n&&function(e,t){for(var i=[],o=0;o<t.points.length;o+=2)i.push(t.points[o]),i.push(t.points[o+1]),i.push(0);t.format.push({x:!1,y:!0,number:!0,required:!1,computeRange:"none"!==e.yaxis.options.autoScale,defaultValue:0}),t.points=i,t.pointsize=3}(t,i);var a=function(e,t){for(var i=null,o=0;o<t.length&&e!==t[o];++o)t[o].stack===e.stack&&(i=t[o]);return i}(t,e.getData());if(a){for(var r,s,l,c,u,p,h,d,f=i.pointsize,m=i.points,g=a.datapoints.pointsize,x=a.datapoints.points,v=[],b=t.lines.show,y=t.bars.horizontal,w=b&&t.lines.steps,k=!0,T=y?1:0,M=y?0:1,S=0,P=0;!(S>=m.length);){if(h=v.length,null==m[S]){for(d=0;d<f;++d)v.push(m[S+d]);S+=f}else if(P>=x.length){if(!b)for(d=0;d<f;++d)v.push(m[S+d]);S+=f}else if(null==x[P]){for(d=0;d<f;++d)v.push(null);k=!0,P+=g}else{if(r=m[S+T],s=m[S+M],c=x[P+T],u=x[P+M],p=0,r===c){for(d=0;d<f;++d)v.push(m[S+d]);v[h+M]+=u,p=u,S+=f,P+=g}else if(c<r){if(b&&0<S&&null!=m[S-f]){for(l=s+(m[S-f+M]-s)*(c-r)/(m[S-f+T]-r),v.push(c),v.push(l+u),d=2;d<f;++d)v.push(m[S+d]);p=u}P+=g}else{if(k&&b){S+=f;continue}for(d=0;d<f;++d)v.push(m[S+d]);b&&0<P&&null!=x[P-g]&&(p=u+(x[P-g+M]-u)*(r-c)/(x[P-g+T]-c)),v[h+M]+=p,S+=f}k=!1,h!==v.length&&o&&(v[h+2]+=p)}if(w&&h!==v.length&&0<h&&null!==v[h]&&v[h]!==v[h-f]&&v[h+1]!==v[h-f+1]){for(d=0;d<f;++d)v[h+f+d]=v[h+d];v[h+1]=v[h-f+1]}}i.points=v}}})},options:{series:{stack:null}},name:"stack",version:"1.2"}),function(e){var t=e.plot.uiConstants.ZOOM_DISTANCE_MARGIN;function i(i,c){var u,p,h,d,f={zoomEnable:!1,prevDistance:null,prevTapTime:0,prevPanPosition:{x:0,y:0},prevTapPosition:{x:0,y:0}},m={prevTouchedAxis:"none",currentTouchedAxis:"none",touchedAxis:null,navigationConstraint:"unconstrained",initialState:null},g=c.pan.interactive&&"manual"===c.pan.touchMode,x="smartLock"===c.pan.touchMode,v=c.pan.interactive&&(x||"smart"===c.pan.touchMode);function b(e,t,n){m.touchedAxis=function(e,t,i,o){if("pinchstart"!==t.type)return"panstart"===t.type?e.getTouchedAxis(t.detail.touches[0].pageX,t.detail.touches[0].pageY):"pinchend"===t.type?e.getTouchedAxis(t.detail.touches[0].pageX,t.detail.touches[0].pageY):o.touchedAxis;var n=e.getTouchedAxis(t.detail.touches[0].pageX,t.detail.touches[0].pageY),a=e.getTouchedAxis(t.detail.touches[1].pageX,t.detail.touches[1].pageY);return n.length===a.length&&n.toString()===a.toString()?n:void 0}(i,e,0,m),o(m)?m.navigationConstraint="unconstrained":m.navigationConstraint="axisConstrained"}u={start:function(e){if(b(e),n(e,"pan",f,m),v){var t=l(e,"pan");m.initialState=i.navigationState(t.x,t.y)}},drag:function(e){if(b(e),v){var t=l(e,"pan");i.smartPan({x:m.initialState.startPageX-t.x,y:m.initialState.startPageY-t.y},m.initialState,m.touchedAxis,!1,x)}else g&&(i.pan({left:-s(e,"pan",f).x,top:-s(e,"pan",f).y,axes:m.touchedAxis}),r(e,"pan",f,m))},end:function(e){var t;b(e),v&&i.smartPan.end(),t=e,f.zoomEnable&&1===t.detail.touches.length&&updateprevPanPosition(e,"pan",f,m)}},p={start:function(e){var t;d&&(clearTimeout(d),d=null),b(e),t=e,f.prevDistance=a(t),n(e,"pinch",f,m)},drag:function(e){d||(d=setTimeout(function(){b(e),i.pan({left:-s(e,"pinch",f).x,top:-s(e,"pinch",f).y,axes:m.touchedAxis}),r(e,"pinch",f,m);var o,n,c,u,p,h,g,x,v=a(e);(f.zoomEnable||Math.abs(v-f.prevDistance)>t)&&(n=e,c=f,u=m,p=(o=i).offset(),h={left:0,top:0},g=a(n)/c.prevDistance,x=a(n),h.left=l(n,"pinch").x-p.left,h.top=l(n,"pinch").y-p.top,o.zoom({center:h,amount:g,axes:u.touchedAxis}),c.prevDistance=x,f.zoomEnable=!0),d=null},1e3/60))},end:function(e){d&&(clearTimeout(d),d=null),b(e),f.prevDistance=null}},h={recenterPlot:function(t){t&&t.detail&&"touchstart"===t.detail.type&&function(t,i,n,a){var r,s,l,c,u;(l=i,c=a,void 0!==(u=(s=t).getTouchedAxis(l.detail.firstTouch.x,l.detail.firstTouch.y))[0]&&(c.prevTouchedAxis=u[0].direction),void 0!==(u=s.getTouchedAxis(l.detail.secondTouch.x,l.detail.secondTouch.y))[0]&&(c.touchedAxis=u,c.currentTouchedAxis=u[0].direction),o(c)&&(c.touchedAxis=null,c.prevTouchedAxis="none",c.currentTouchedAxis="none"),"x"===a.currentTouchedAxis&&"x"===a.prevTouchedAxis||"y"===a.currentTouchedAxis&&"y"===a.prevTouchedAxis||"none"===a.currentTouchedAxis&&"none"===a.prevTouchedAxis)&&(t.recenter({axes:a.touchedAxis}),r=a.touchedAxis?new e.Event("re-center",{detail:{axisTouched:a.touchedAxis}}):new e.Event("re-center",{detail:i}),t.getPlaceholder().trigger(r))}(i,t,0,m)}},!0!==c.pan.enableTouch&&!0!==c.zoom.enableTouch||(i.hooks.bindEvents.push(function(e,t){var i=e.getOptions();i.zoom.interactive&&i.zoom.enableTouch&&(t[0].addEventListener("pinchstart",p.start,!1),t[0].addEventListener("pinchdrag",p.drag,!1),t[0].addEventListener("pinchend",p.end,!1)),i.pan.interactive&&i.pan.enableTouch&&(t[0].addEventListener("panstart",u.start,!1),t[0].addEventListener("pandrag",u.drag,!1),t[0].addEventListener("panend",u.end,!1)),i.recenter.interactive&&i.recenter.enableTouch&&t[0].addEventListener("doubletap",h.recenterPlot,!1)}),i.hooks.shutdown.push(function(e,t){t[0].removeEventListener("panstart",u.start),t[0].removeEventListener("pandrag",u.drag),t[0].removeEventListener("panend",u.end),t[0].removeEventListener("pinchstart",p.start),t[0].removeEventListener("pinchdrag",p.drag),t[0].removeEventListener("pinchend",p.end),t[0].removeEventListener("doubletap",h.recenterPlot)}))}function o(e){return!e.touchedAxis||0===e.touchedAxis.length}function n(e,t,i,o){var n,a=l(e,t);switch(o.navigationConstraint){case"unconstrained":o.touchedAxis=null,i.prevTapPosition={x:i.prevPanPosition.x,y:i.prevPanPosition.y},i.prevPanPosition={x:a.x,y:a.y};break;case"axisConstrained":n=o.touchedAxis[0].direction,o.currentTouchedAxis=n,i.prevTapPosition[n]=i.prevPanPosition[n],i.prevPanPosition[n]=a[n]}}function a(e){var t,i,o,n,a=e.detail.touches[0],r=e.detail.touches[1];return t=a.pageX,i=a.pageY,o=r.pageX,n=r.pageY,Math.sqrt((t-o)*(t-o)+(i-n)*(i-n))}function r(e,t,i,o){var n=l(e,t);switch(o.navigationConstraint){case"unconstrained":i.prevPanPosition.x=n.x,i.prevPanPosition.y=n.y;break;case"axisConstrained":i.prevPanPosition[o.currentTouchedAxis]=n[o.currentTouchedAxis]}}function s(e,t,i){var o=l(e,t);return{x:o.x-i.prevPanPosition.x,y:o.y-i.prevPanPosition.y}}function l(e,t){return"pinch"===t?{x:(e.detail.touches[0].pageX+e.detail.touches[1].pageX)/2,y:(e.detail.touches[0].pageY+e.detail.touches[1].pageY)/2}:{x:e.detail.touches[0].pageX,y:e.detail.touches[0].pageY}}e.plot.plugins.push({init:function(e){e.hooks.processOptions.push(i)},options:{zoom:{enableTouch:!1},pan:{enableTouch:!1,touchMode:"manual"},recenter:{enableTouch:!0}},name:"navigateTouch",version:"0.3"})}(jQuery),function(e){var t=e.plot.browser;function i(e,i){var a=[],r={click:"click",hover:"hover"},s=e.getPlaceholder()[0].lastMouseMoveEvent;e.highlight=m,e.unhighlight=g;var l=function(t){var i=e.getOptions(),o=new CustomEvent("mouseevent");return o.pageX=t.detail.changedTouches[0].pageX,o.pageY=t.detail.changedTouches[0].pageY,o.clientX=t.detail.changedTouches[0].clientX,o.clientY=t.detail.changedTouches[0].clientY,i.grid.hoverable&&c(o,r.hover,30),!1};function c(t,i,o){var n=e.getData();if(void 0!==t&&0<n.length&&void 0!==n[0].xaxis.c2p&&void 0!==n[0].yaxis.c2p){var a=i+"able";f("plot"+i,t,function(e){return!1!==n[e][a]},o)}}function u(t){s=t,c(e.getPlaceholder()[0].lastMouseMoveEvent=t,r.hover)}function p(t){s=void 0,e.getPlaceholder()[0].lastMouseMoveEvent=void 0,f("plothover",t,function(e){return!1})}function h(e){c(e,r.click)}function d(){e.unhighlight(),e.getPlaceholder().trigger("plothovercleanup")}function f(i,o,n,r){var s=e.getOptions(),l=e.offset(),c=t.getPageXY(o),u=c.X-l.left,p=c.Y-l.top,h=e.c2p({left:u,top:p}),d=void 0!==r?r:s.grid.mouseActiveRadius;h.pageX=c.X,h.pageY=c.Y;var f=e.findNearbyItem(u,p,n,d);if(f&&(f.pageX=parseInt(f.series.xaxis.p2c(f.datapoint[0])+l.left,10),f.pageY=parseInt(f.series.yaxis.p2c(f.datapoint[1])+l.top,10)),s.grid.autoHighlight){for(var x=0;x<a.length;++x){var v=a[x];(v.auto!==i||f&&v.series===f.series&&v.point[0]===f.datapoint[0]&&v.point[1]===f.datapoint[1])&&f||g(v.series,v.point)}f&&m(f.series,f.datapoint,i)}e.getPlaceholder().trigger(i,[h,f])}function m(t,i,o){if("number"==typeof t&&(t=e.getData()[t]),"number"==typeof i){var n=t.datapoints.pointsize;i=t.datapoints.points.slice(n*i,n*(i+1))}var r=x(t,i);-1===r?(a.push({series:t,point:i,auto:o}),e.triggerRedrawOverlay()):o||(a[r].auto=!1)}function g(t,i){if(null==t&&null==i)return a=[],void e.triggerRedrawOverlay();if("number"==typeof t&&(t=e.getData()[t]),"number"==typeof i){var o=t.datapoints.pointsize;i=t.datapoints.points.slice(o*i,o*(i+1))}var n=x(t,i);-1!==n&&(a.splice(n,1),e.triggerRedrawOverlay())}function x(e,t){for(var i=0;i<a.length;++i){var o=a[i];if(o.series===e&&o.point[0]===t[0]&&o.point[1]===t[1])return i}return-1}(i.grid.hoverable||i.grid.clickable)&&(e.hooks.bindEvents.push(function(e,t){var o=e.getOptions();(o.grid.hoverable||o.grid.clickable)&&(t[0].addEventListener("touchevent",d,!1),t[0].addEventListener("tap",l,!1)),i.grid.clickable&&t.click(h),i.grid.hoverable&&(t.mousemove(u),t.bind("mouseleave",p))}),e.hooks.shutdown.push(function(e,t){t[0].removeEventListener("tap",l),t[0].removeEventListener("touchevent",d),t.unbind("mousemove",u),t.unbind("mouseleave",p),t.unbind("click",h),a=[]}),e.hooks.drawOverlay.push(function(e,t,i){var r,s,l=e.getPlotOffset();for(t.save(),t.translate(l.left,l.top),r=0;r<a.length;++r)(s=a[r]).series.bars.show?n(s.series,s.point,t):o(s.series,s.point,t,e);t.restore()}),e.hooks.processRawData.push(function(){d(),c(s,r.hover)}))}function o(t,i,o,n){var a=i[0],r=i[1],s=t.xaxis,l=t.yaxis,c="string"==typeof t.highlightColor?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString();if(!(a<s.min||a>s.max||r<l.min||r>l.max)){var u=t.points.radius+t.points.lineWidth/2;o.lineWidth=u,o.strokeStyle=c;var p=1.5*u;a=s.p2c(a),r=l.p2c(r),o.beginPath();var h=t.points.symbol;"circle"===h?o.arc(a,r,p,0,2*Math.PI,!1):"string"==typeof h&&n.drawSymbol&&n.drawSymbol[h]&&n.drawSymbol[h](o,a,r,p,!1),o.closePath(),o.stroke()}}function n(t,i,o){var n,a="string"==typeof t.highlightColor?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString(),r=a,s=t.bars.barWidth[0]||t.bars.barWidth;switch(t.bars.align){case"left":n=0;break;case"right":n=-s;break;default:n=-s/2}o.lineWidth=t.bars.lineWidth,o.strokeStyle=a;var l=t.bars.fillTowards||0,c=l>t.yaxis.min?Math.min(t.yaxis.max,l):t.yaxis.min;e.plot.drawSeries.drawBar(i[0],i[1],i[2]||c,n,n+s,function(){return r},t.xaxis,t.yaxis,o,t.bars.horizontal,t.bars.lineWidth)}e.plot.plugins.push({init:function(e){e.hooks.processOptions.push(i)},options:{grid:{hoverable:!1,clickable:!1}},name:"hover",version:"0.1"})}(jQuery),function(e){function t(e,t){var i,o={twoTouches:!1,currentTapStart:{x:0,y:0},currentTapEnd:{x:0,y:0},prevTap:{x:0,y:0},currentTap:{x:0,y:0},interceptedLongTap:!1,isUnsupportedGesture:!1,prevTapTime:null,tapStartTime:null,longTapTriggerId:null},n=20,a=500;function r(t){var r=e.getOptions();(r.pan.active||r.zoom.active)&&(3<=t.touches.length?o.isUnsupportedGesture=!0:o.isUnsupportedGesture=!1,i.dispatchEvent(new CustomEvent("touchevent",{detail:t})),x(t)?s(t,"pinch"):(s(t,"pan"),g(t)||(function(e){var t=(new Date).getTime(),i=t-o.prevTapTime;return 0<=i&&i<a&&m(o.prevTap.x,o.prevTap.y,o.currentTap.x,o.currentTap.y)<n?(e.firstTouch=o.prevTap,e.secondTouch=o.currentTap,!0):(o.prevTapTime=t,!1)}(t)&&s(t,"doubleTap"),s(t,"tap"),s(t,"longTap"))))}function s(e,t){switch(t){case"pan":l[e.type](e);break;case"pinch":c[e.type](e);break;case"doubleTap":u.onDoubleTap(e);break;case"longTap":p[e.type](e);break;case"tap":h[e.type](e)}}var l={touchstart:function(e){var t;o.prevTap={x:o.currentTap.x,y:o.currentTap.y},d(e),t=e,o.tapStartTime=(new Date).getTime(),o.interceptedLongTap=!1,o.currentTapStart={x:t.touches[0].pageX,y:t.touches[0].pageY},o.currentTapEnd={x:t.touches[0].pageX,y:t.touches[0].pageY},i.dispatchEvent(new CustomEvent("panstart",{detail:e}))},touchmove:function(e){var t;f(e),d(e),t=e,o.currentTapEnd={x:t.touches[0].pageX,y:t.touches[0].pageY},o.isUnsupportedGesture||i.dispatchEvent(new CustomEvent("pandrag",{detail:e}))},touchend:function(e){var t;f(e),g(e)?(i.dispatchEvent(new CustomEvent("pinchend",{detail:e})),i.dispatchEvent(new CustomEvent("panstart",{detail:e}))):(t=e).touches&&0===t.touches.length&&i.dispatchEvent(new CustomEvent("panend",{detail:e}))}},c={touchstart:function(e){i.dispatchEvent(new CustomEvent("pinchstart",{detail:e}))},touchmove:function(e){f(e),o.twoTouches=x(e),o.isUnsupportedGesture||i.dispatchEvent(new CustomEvent("pinchdrag",{detail:e}))},touchend:function(e){f(e)}},u={onDoubleTap:function(e){f(e),i.dispatchEvent(new CustomEvent("doubletap",{detail:e}))}},p={touchstart:function(e){p.waitForLongTap(e)},touchmove:function(e){},touchend:function(e){o.longTapTriggerId&&(clearTimeout(o.longTapTriggerId),o.longTapTriggerId=null)},isLongTap:function(e){return 1500<=(new Date).getTime()-o.tapStartTime&&!o.interceptedLongTap&&m(o.currentTapStart.x,o.currentTapStart.y,o.currentTapEnd.x,o.currentTapEnd.y)<20&&(o.interceptedLongTap=!0)},waitForLongTap:function(e){o.longTapTriggerId||(o.longTapTriggerId=setTimeout(function(){p.isLongTap(e)&&i.dispatchEvent(new CustomEvent("longtap",{detail:e})),o.longTapTriggerId=null},1500))}},h={touchstart:function(e){o.tapStartTime=(new Date).getTime()},touchmove:function(e){},touchend:function(e){h.isTap(e)&&(i.dispatchEvent(new CustomEvent("tap",{detail:e})),f(e))},isTap:function(e){return(new Date).getTime()-o.tapStartTime<=125&&m(o.currentTapStart.x,o.currentTapStart.y,o.currentTapEnd.x,o.currentTapEnd.y)<20}};function d(e){o.currentTap={x:e.touches[0].pageX,y:e.touches[0].pageY}}function f(t){o.isUnsupportedGesture||(t.preventDefault(),e.getOptions().propagateSupportedGesture||t.stopPropagation())}function m(e,t,i,o){return Math.sqrt((e-i)*(e-i)+(t-o)*(t-o))}function g(e){return o.twoTouches&&1===e.touches.length}function x(t){return!!(t.touches&&2<=t.touches.length&&t.touches[0].target===e.getEventHolder()&&t.touches[1].target===e.getEventHolder())}(!0===t.pan.enableTouch||t.zoom.enableTouch)&&(e.hooks.bindEvents.push(function(e,t){i=t[0],t[0].addEventListener("touchstart",r,!1),t[0].addEventListener("touchmove",r,!1),t[0].addEventListener("touchend",r,!1)}),e.hooks.shutdown.push(function(e,t){t[0].removeEventListener("touchstart",r),t[0].removeEventListener("touchmove",r),t[0].removeEventListener("touchend",r),o.longTapTriggerId&&(clearTimeout(o.longTapTriggerId),o.longTapTriggerId=null)}))}jQuery.plot.plugins.push({init:function(e){e.hooks.processOptions.push(t)},options:{propagateSupportedGesture:!1},name:"navigateTouch",version:"0.3"})}(),function(e){var t=e.plot.saturated.floorInBase,i=function(e,t){var i=new e(t),o=i.setTime.bind(i);return i.update=function(e){o(e),e=Math.round(1e3*e)/1e3;var t=(this.microEpoch=e)/1e3;this.microseconds=1e6*(t-Math.floor(t))},i.getTime=function(){return this.microEpoch},i.setTime=function(e){this.update(e)},i.getMicroseconds=function(){return this.microseconds},i.setMicroseconds=function(e){var t=1e3*Math.floor(this.microEpoch/1e3)+e/1e3;this.update(t)},i.setUTCMicroseconds=function(e){this.setMicroseconds(e)},i.getUTCMicroseconds=function(){return this.getMicroseconds()},i.microseconds=null,i.microEpoch=null,i.update(t),i};function o(e,t,i,o){if("function"==typeof e.strftime)return e.strftime(t);var n,a=function(e,t){return t=""+(null==t?"0":t),1==(e=""+e).length?t+e:e},r=function(e,t){if(t<6&&0<t){var i=Math.pow(10,t-6);e=("00000"+(e=Math.round(Math.round(e*i)/i))).slice(-6,-(6-t))}else e=("00000"+(e=Math.round(e))).slice(-6);return e},s=[],l=!1,c=e.getHours(),u=c<12;i||(i=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),o||(o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),n=12<c?c-12:0==c?12:c;for(var p=-1,h=0;h<t.length;++h){var d=t.charAt(h);if(!isNaN(Number(d))&&0<Number(d))p=Number(d);else if(l){switch(d){case"a":d=""+o[e.getDay()];break;case"b":d=""+i[e.getMonth()];break;case"d":d=a(e.getDate());break;case"e":d=a(e.getDate()," ");break;case"h":case"H":d=a(c);break;case"I":d=a(n);break;case"l":d=a(n," ");break;case"m":d=a(e.getMonth()+1);break;case"M":d=a(e.getMinutes());break;case"q":d=""+(Math.floor(e.getMonth()/3)+1);break;case"S":d=a(e.getSeconds());break;case"s":d=""+r(e.getMicroseconds(),p);break;case"y":d=a(e.getFullYear()%100);break;case"Y":d=""+e.getFullYear();break;case"p":d=u?"am":"pm";break;case"P":d=u?"AM":"PM";break;case"w":d=""+e.getDay()}s.push(d),l=!1}else"%"==d?l=!0:s.push(d)}return s.join("")}function n(e){function t(e,t,i,o){e[t]=function(){return i[o].apply(i,arguments)}}var i={date:e};void 0!==e.strftime&&t(i,"strftime",e,"strftime"),t(i,"getTime",e,"getTime"),t(i,"setTime",e,"setTime");for(var o=["Date","Day","FullYear","Hours","Minutes","Month","Seconds","Milliseconds","Microseconds"],n=0;n<o.length;n++)t(i,"get"+o[n],e,"getUTC"+o[n]),t(i,"set"+o[n],e,"setUTC"+o[n]);return i}function a(e,t){var o=864e13;if(t&&"seconds"===t.timeBase?e*=1e3:"microseconds"===t.timeBase&&(e/=1e3),o<e?e=o:e<-o&&(e=-o),"browser"===t.timezone)return i(Date,e);if(t.timezone&&"utc"!==t.timezone){if("undefined"==typeof timezoneJS||void 0===timezoneJS.Date)return n(i(Date,e));var a=i(timezoneJS.Date,e);return a.setTimezone(t.timezone),a.setTime(e),a}return n(i(Date,e))}var r={microsecond:1e-6,millisecond:.001,second:1,minute:60,hour:3600,day:86400,month:2592e3,quarter:7776e3,year:525949.2*60},s={microsecond:.001,millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,quarter:7776e6,year:525949.2*60*1e3},l={microsecond:1,millisecond:1e3,second:1e6,minute:6e7,hour:36e8,day:864e8,month:2592e9,quarter:7776e9,year:525949.2*60*1e6},c=[[1,"microsecond"],[2,"microsecond"],[5,"microsecond"],[10,"microsecond"],[25,"microsecond"],[50,"microsecond"],[100,"microsecond"],[250,"microsecond"],[500,"microsecond"],[1,"millisecond"],[2,"millisecond"],[5,"millisecond"],[10,"millisecond"],[25,"millisecond"],[50,"millisecond"],[100,"millisecond"],[250,"millisecond"],[500,"millisecond"],[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"]],u=c.concat([[3,"month"],[6,"month"],[1,"year"]]),p=c.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);function h(e){var i,o=e.options,n=[],c=a(e.min,o),h=0,d=o.tickSize&&"quarter"===o.tickSize[1]||o.minTickSize&&"quarter"===o.minTickSize[1]?p:u;i="seconds"===o.timeBase?r:"microseconds"===o.timeBase?l:s,null!==o.minTickSize&&void 0!==o.minTickSize&&(h="number"==typeof o.tickSize?o.tickSize:o.minTickSize[0]*i[o.minTickSize[1]]);for(var f=0;f<d.length-1&&!(e.delta<(d[f][0]*i[d[f][1]]+d[f+1][0]*i[d[f+1][1]])/2&&d[f][0]*i[d[f][1]]>=h);++f);var m=d[f][0],g=d[f][1];if("year"===g){if(null!==o.minTickSize&&void 0!==o.minTickSize&&"year"===o.minTickSize[1])m=Math.floor(o.minTickSize[0]);else{var x=Math.pow(10,Math.floor(Math.log(e.delta/i.year)/Math.LN10)),v=e.delta/i.year/x;m=v<1.5?1:v<3?2:v<7.5?5:10,m*=x}m<1&&(m=1)}e.tickSize=o.tickSize||[m,g];var b=e.tickSize[0],y=b*i[g=e.tickSize[1]];"microsecond"===g?c.setMicroseconds(t(c.getMicroseconds(),b)):"millisecond"===g?c.setMilliseconds(t(c.getMilliseconds(),b)):"second"===g?c.setSeconds(t(c.getSeconds(),b)):"minute"===g?c.setMinutes(t(c.getMinutes(),b)):"hour"===g?c.setHours(t(c.getHours(),b)):"month"===g?c.setMonth(t(c.getMonth(),b)):"quarter"===g?c.setMonth(3*t(c.getMonth()/3,b)):"year"===g&&c.setFullYear(t(c.getFullYear(),b)),y>=i.millisecond&&(y>=i.second?c.setMicroseconds(0):c.setMicroseconds(1e3*c.getMilliseconds())),y>=i.minute&&c.setSeconds(0),y>=i.hour&&c.setMinutes(0),y>=i.day&&c.setHours(0),y>=4*i.day&&c.setDate(1),y>=2*i.month&&c.setMonth(t(c.getMonth(),3)),y>=2*i.quarter&&c.setMonth(t(c.getMonth(),6)),y>=i.year&&c.setMonth(0);var w,k,T=0,M=Number.NaN;do{if(k=M,w=c.getTime(),M=o&&"seconds"===o.timeBase?w/1e3:o&&"microseconds"===o.timeBase?1e3*w:w,n.push(M),"month"===g||"quarter"===g)if(b<1){c.setDate(1);var S=c.getTime();c.setMonth(c.getMonth()+("quarter"===g?3:1));var P=c.getTime();c.setTime(M+T*i.hour+(P-S)*b),T=c.getHours(),c.setHours(0)}else c.setMonth(c.getMonth()+b*("quarter"===g?3:1));else"year"===g?c.setFullYear(c.getFullYear()+b):"seconds"===o.timeBase?c.setTime(1e3*(M+y)):"microseconds"===o.timeBase?c.setTime((M+y)/1e3):c.setTime(M+y)}while(M<e.max&&M!==k);return n}e.plot.plugins.push({init:function(t){t.hooks.processOptions.push(function(t){e.each(t.getAxes(),function(e,t){var i=t.options;"time"===i.mode&&(t.tickGenerator=h,t.tickFormatter=function(e,t){var n=a(e,t.options);if(null!=i.timeformat)return o(n,i.timeformat,i.monthNames,i.dayNames);var c,u=t.options.tickSize&&"quarter"==t.options.tickSize[1]||t.options.minTickSize&&"quarter"==t.options.minTickSize[1];c="seconds"===i.timeBase?r:"microseconds"===i.timeBase?l:s;var p,h,d=t.tickSize[0]*c[t.tickSize[1]],f=t.max-t.min,m=i.twelveHourClock?" %p":"",g=i.twelveHourClock?"%I":"%H";if(p="seconds"===i.timeBase?1:"microseconds"===i.timeBase?1e6:1e3,d<c.second){var x=-Math.floor(Math.log10(d/p));-1<String(d).indexOf("25")&&x++,h="%S.%"+x+"s"}else h=d<c.minute?g+":%M:%S"+m:d<c.day?f<2*c.day?g+":%M"+m:"%b %d "+g+":%M"+m:d<c.month?"%b %d":u&&d<c.quarter||!u&&d<c.year?f<c.year?"%b":"%b %Y":u&&d<c.year?f<c.year?"Q%q":"Q%q %Y":"%Y";return o(n,h,i.monthNames,i.dayNames)})})})},options:{xaxis:{timezone:null,timeformat:null,twelveHourClock:!1,monthNames:null,timeBase:"seconds"},yaxis:{timeBase:"seconds"}},name:"time",version:"1.0"}),e.plot.formatDate=o,e.plot.dateGenerator=a,e.plot.dateTickGenerator=h,e.plot.makeUtcWrapper=n}(jQuery),function(e){function t(e,t,i,o,n,a){this.axisName=e,this.position=t,this.padding=i,this.placeholder=o,this.axisLabel=n,this.surface=a,this.width=0,this.height=0,this.elem=null}t.prototype.calculateSize=function(){var e=this.axisName+"Label",t=e+"Layer",i=e+" axisLabels",o=this.surface.getTextInfo(t,this.axisLabel,i);this.labelWidth=o.width,this.labelHeight=o.height,"left"===this.position||"right"===this.position?(this.width=this.labelHeight+this.padding,this.height=0):(this.width=0,this.height=this.labelHeight+this.padding)},t.prototype.transforms=function(e,t,i,o){var n,a,r=[];if(0===t&&0===i||((n=o.createSVGTransform()).setTranslate(t,i),r.push(n)),0!==e){a=o.createSVGTransform();var s=Math.round(this.labelWidth/2);a.setRotate(e,s,0),r.push(a)}return r},t.prototype.calculateOffsets=function(e){var t={x:0,y:0,degrees:0};return"bottom"===this.position?(t.x=e.left+e.width/2-this.labelWidth/2,t.y=e.top+e.height-this.labelHeight):"top"===this.position?(t.x=e.left+e.width/2-this.labelWidth/2,t.y=e.top):"left"===this.position?(t.degrees=-90,t.x=e.left-this.labelWidth/2,t.y=e.height/2+e.top):"right"===this.position&&(t.degrees=90,t.x=e.left+e.width-this.labelWidth/2,t.y=e.height/2+e.top),t.x=Math.round(t.x),t.y=Math.round(t.y),t},t.prototype.cleanup=function(){var e=this.axisName+"Label",t=e+"Layer",i=e+" axisLabels";this.surface.removeText(t,0,0,this.axisLabel,i)},t.prototype.draw=function(e){var t=this.axisName+"Label",i=t+"Layer",o=t+" axisLabels",n=this.calculateOffsets(e),a={position:"absolute",bottom:"",right:"",display:"inline-block","white-space":"nowrap"},r=this.surface.getSVGLayer(i),s=this.transforms(n.degrees,n.x,n.y,r.parentNode);this.surface.addText(i,0,0,this.axisLabel,o,void 0,void 0,void 0,void 0,s),this.surface.render(),Object.keys(a).forEach(function(e){r.style[e]=a[e]})},e.plot.plugins.push({init:function(i){i.hooks.processOptions.push(function(i,o){if(o.axisLabels.show){var n={};i.hooks.axisReserveSpace.push(function(e,i){var o=i.options,a=i.direction+i.n;if(i.labelHeight+=i.boxPosition.centerY,i.labelWidth+=i.boxPosition.centerX,o&&o.axisLabel&&i.show){var r=void 0===o.axisLabelPadding?2:o.axisLabelPadding,s=n[a];s||(s=new t(a,o.position,r,e.getPlaceholder()[0],o.axisLabel,e.getSurface()),n[a]=s),s.calculateSize(),i.labelHeight+=s.height,i.labelWidth+=s.width}}),i.hooks.draw.push(function(t,i){e.each(t.getAxes(),function(e,t){var i=t.options;if(i&&i.axisLabel&&t.show){var o=t.direction+t.n;n[o].draw(t.box)}})}),i.hooks.shutdown.push(function(e,t){for(var i in n)n[i].cleanup()})}})},options:{axisLabels:{show:!0}},name:"axisLabels",version:"3.0"})}(jQuery),(a=jQuery).plot.plugins.push({init:function(e){var t={first:{x:-1,y:-1},second:{x:-1,y:-1},show:!1,currentMode:"xy",active:!1},i=a.plot.uiConstants.SNAPPING_CONSTANT,o={},n=null;function r(i){t.active&&(d(i),e.getPlaceholder().trigger("plotselecting",[l()]))}function s(i){1===i.which&&(document.body.focus(),void 0!==document.onselectstart&&null==o.onselectstart&&(o.onselectstart=document.onselectstart,document.onselectstart=function(){return!1}),void 0!==document.ondrag&&null==o.ondrag&&(o.ondrag=document.ondrag,document.ondrag=function(){return!1}),h(t.first,i),t.active=!0,n=function(i){var a;a=i,n=null,void 0!==document.onselectstart&&(document.onselectstart=o.onselectstart),void 0!==document.ondrag&&(document.ondrag=o.ondrag),t.active=!1,d(a),g()?c():(e.getPlaceholder().trigger("plotunselected",[]),e.getPlaceholder().trigger("plotselecting",[null]))},a(document).one("mouseup",n))}function l(){if(!g())return null;if(!t.show)return null;var i={},o={x:t.first.x,y:t.first.y},n={x:t.second.x,y:t.second.y};return"x"===p(e)&&(o.y=0,n.y=e.height()),"y"===p(e)&&(o.x=0,n.x=e.width()),a.each(e.getAxes(),function(e,t){if(t.used){var a=t.c2p(o[t.direction]),r=t.c2p(n[t.direction]);i[e]={from:Math.min(a,r),to:Math.max(a,r)}}}),i}function c(){var t=l();e.getPlaceholder().trigger("plotselected",[t]),t.xaxis&&t.yaxis&&e.getPlaceholder().trigger("selected",[{x1:t.xaxis.from,y1:t.yaxis.from,x2:t.xaxis.to,y2:t.yaxis.to}])}function u(e,t,i){return t<e?e:i<t?i:t}function p(e){var i=e.getOptions();return"smart"===i.selection.mode?t.currentMode:i.selection.mode}function h(o,n){var a=e.getPlaceholder().offset(),r=e.getPlotOffset();o.x=u(0,n.pageX-a.left-r.left,e.width()),o.y=u(0,n.pageY-a.top-r.top,e.height()),o!==t.first&&function(e){if(t.first){var o={x:e.x-t.first.x,y:e.y-t.first.y};Math.abs(o.x)<i?t.currentMode="y":Math.abs(o.y)<i?t.currentMode="x":t.currentMode="xy"}}(o),"y"===p(e)&&(o.x=o===t.first?0:e.width()),"x"===p(e)&&(o.y=o===t.first?0:e.height())}function d(i){null!=i.pageX&&(h(t.second,i),g()?(t.show=!0,e.triggerRedrawOverlay()):f(!0))}function f(i){t.show&&(t.show=!1,t.currentMode="",e.triggerRedrawOverlay(),i||e.getPlaceholder().trigger("plotunselected",[]))}function m(t,i){var o,n,a,r,s=e.getAxes();for(var l in s)if((o=s[l]).direction===i&&(t[r=i+o.n+"axis"]||1!==o.n||(r=i+"axis"),t[r])){n=t[r].from,a=t[r].to;break}if(t[r]||(o="x"===i?e.getXAxes()[0]:e.getYAxes()[0],n=t[i+"1"],a=t[i+"2"]),null!=n&&null!=a&&a<n){var c=n;n=a,a=c}return{from:n,to:a,axis:o}}function g(){var i=e.getOptions().selection.minSize;return Math.abs(t.second.x-t.first.x)>=i&&Math.abs(t.second.y-t.first.y)>=i}e.clearSelection=f,e.setSelection=function(i,o){var n;"y"===p(e)?(t.first.x=0,t.second.x=e.width()):(n=m(i,"x"),t.first.x=n.axis.p2c(n.from),t.second.x=n.axis.p2c(n.to)),"x"===p(e)?(t.first.y=0,t.second.y=e.height()):(n=m(i,"y"),t.first.y=n.axis.p2c(n.from),t.second.y=n.axis.p2c(n.to)),t.show=!0,e.triggerRedrawOverlay(),!o&&g()&&c()},e.getSelection=l,e.hooks.bindEvents.push(function(e,t){null!=e.getOptions().selection.mode&&(t.mousemove(r),t.mousedown(s))}),e.hooks.drawOverlay.push(function(e,i){if(t.show&&g()){var o=e.getPlotOffset(),n=e.getOptions();i.save(),i.translate(o.left,o.top);var r=a.color.parse(n.selection.color);i.strokeStyle=r.scale("a",1).toString(),i.lineWidth=1,i.lineJoin=n.selection.shape,i.fillStyle=r.scale("a",.4).toString();var s=Math.min(t.first.x,t.second.x)+.5,l=s,c=Math.min(t.first.y,t.second.y)+.5,u=c,h=Math.abs(t.second.x-t.first.x)-1,d=Math.abs(t.second.y-t.first.y)-1;"x"===p(e)&&(d+=c,c=0),"y"===p(e)&&(h+=s,s=0),i.fillRect(0,0,e.width(),e.height()),i.clearRect(s,c,h,d),f=i,m=s,x=c,v=h,b=d,y=l,w=u,k=p(e),T=Math.max(0,Math.min(15,v/2-2,b/2-2)),f.fillStyle="#ffffff","xy"===k&&(f.beginPath(),f.moveTo(m,x+T),f.lineTo(m-3,x+T),f.lineTo(m-3,x-3),f.lineTo(m+T,x-3),f.lineTo(m+T,x),f.lineTo(m,x),f.closePath(),f.moveTo(m,x+b-T),f.lineTo(m-3,x+b-T),f.lineTo(m-3,x+b+3),f.lineTo(m+T,x+b+3),f.lineTo(m+T,x+b),f.lineTo(m,x+b),f.closePath(),f.moveTo(m+v,x+T),f.lineTo(m+v+3,x+T),f.lineTo(m+v+3,x-3),f.lineTo(m+v-T,x-3),f.lineTo(m+v-T,x),f.lineTo(m+v,x),f.closePath(),f.moveTo(m+v,x+b-T),f.lineTo(m+v+3,x+b-T),f.lineTo(m+v+3,x+b+3),f.lineTo(m+v-T,x+b+3),f.lineTo(m+v-T,x+b),f.lineTo(m+v,x+b),f.closePath(),f.stroke(),f.fill()),m=y,x=w,"x"===k&&(f.beginPath(),f.moveTo(m,x+15),f.lineTo(m,x-15),f.lineTo(m-3,x-15),f.lineTo(m-3,x+15),f.closePath(),f.moveTo(m+v,x+15),f.lineTo(m+v,x-15),f.lineTo(m+v+3,x-15),f.lineTo(m+v+3,x+15),f.closePath(),f.stroke(),f.fill()),"y"===k&&(f.beginPath(),f.moveTo(m-15,x),f.lineTo(m+15,x),f.lineTo(m+15,x-3),f.lineTo(m-15,x-3),f.closePath(),f.moveTo(m-15,x+b),f.lineTo(m+15,x+b),f.lineTo(m+15,x+b+3),f.lineTo(m-15,x+b+3),f.closePath(),f.stroke(),f.fill()),i.restore()}var f,m,x,v,b,y,w,k,T}),e.hooks.shutdown.push(function(e,t){t.unbind("mousemove",r),t.unbind("mousedown",s),n&&a(document).unbind("mouseup",n)})},options:{selection:{mode:null,color:"#888888",shape:"round",minSize:5}},name:"selection",version:"1.1"}),function(e){var t=-100,i=0,o=-1,n=-2,a=1,r=e.plot.browser,s=r.getPixelRatio;function l(e,t){var l=e.filter(c);a=s(t.getContext("2d"));var f,m=l.map(function(e){var t,i,o=new Image;return new Promise((i=e,(t=o).sourceDescription='<info className="'+i.className+'" tagName="'+i.tagName+'" id="'+i.id+'">',t.sourceComponent=i,function(e,o){var n,a,s,l,c,d,f,m,g,x,v,b;t.onload=function(i){t.successfullyLoaded=!0,e(t)},t.onabort=function(i){t.successfullyLoaded=!1,console.log("Can't generate temp image from "+t.sourceDescription+". It is possible that it is missing some properties or its content is not supported by this browser. Source component:",t.sourceComponent),e(t)},t.onerror=function(i){t.successfullyLoaded=!1,console.log("Can't generate temp image from "+t.sourceDescription+". It is possible that it is missing some properties or its content is not supported by this browser. Source component:",t.sourceComponent),e(t)},a=t,"CANVAS"===(n=i).tagName&&(s=n,a.src=s.toDataURL("image/png")),"svg"===n.tagName&&(l=n,c=a,r.isSafari()||r.isMobileSafari()?(d=l,f=c,x=h(x=p(u(document),d)),g=function(e){for(var t="",i=new Uint8Array(e),o=0;o<i.length;o+=16384){t+=String.fromCharCode.apply(null,i.subarray(o,o+16384))}return t}(new(TextEncoder||TextEncoderLite)("utf-8").encode(x)),m="data:image/svg+xml;base64,"+btoa(g),f.src=m):function(e,t){var i=p(u(document),e);i=h(i);var o=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),n=(self.URL||self.webkitURL||self).createObjectURL(o);t.src=n}(l,c)),a.srcImgTagName=n.tagName,v=n,(b=a).genLeft=v.getBoundingClientRect().left,b.genTop=v.getBoundingClientRect().top,"CANVAS"===v.tagName&&(b.genRight=b.genLeft+v.width,b.genBottom=b.genTop+v.height),"svg"===v.tagName&&(b.genRight=v.getBoundingClientRect().right,b.genBottom=v.getBoundingClientRect().bottom)}))});return Promise.all(m).then((f=t,function(e){return function(e,t){var r=function(e,t){var r,s=i;if(0===e.length)s=o;else{var l=e[0].genLeft,c=e[0].genTop,u=e[0].genRight,p=e[0].genBottom,h=0;for(h=1;h<e.length;h++)l>e[h].genLeft&&(l=e[h].genLeft),c>e[h].genTop&&(c=e[h].genTop);for(h=1;h<e.length;h++)u<e[h].genRight&&(u=e[h].genRight),p<e[h].genBottom&&(p=e[h].genBottom);if(u-l<=0||p-c<=0)s=n;else{for(t.width=Math.round(u-l),t.height=Math.round(p-c),h=0;h<e.length;h++)e[h].xCompOffset=e[h].genLeft-l,e[h].yCompOffset=e[h].genTop-c;r=t,void 0!==e.find(function(e){return"svg"===e.srcImgTagName})&&a<1&&(r.width=r.width*a,r.height=r.height*a)}}return s}(e,t);if(r===i)for(var s=t.getContext("2d"),l=0;l<e.length;l++)!0===e[l].successfullyLoaded&&s.drawImage(e[l],e[l].xCompOffset*a,e[l].yCompOffset*a);return r}(e,f)}),d)}function c(e){var t=!0,i=!0;return null==e?i=!1:"CANVAS"===e.tagName&&(e.getBoundingClientRect().right!==e.getBoundingClientRect().left&&e.getBoundingClientRect().bottom!==e.getBoundingClientRect().top||(t=!1)),i&&t&&"visible"===window.getComputedStyle(e).visibility}function u(e){for(var t=e.styleSheets,i=[],o=0;o<t.length;o++)for(var n=t[o].cssRules||[],a=0;a<n.length;a++){var r=n[a];i.push(r.cssText)}return i}function p(e,t){return['<svg class="snapshot '+t.classList+'" width="'+t.width.baseVal.value*a+'" height="'+t.height.baseVal.value*a+'" viewBox="0 0 '+t.width.baseVal.value+" "+t.height.baseVal.value+'" xmlns="http://www.w3.org/2000/svg">',"<style>","/* <![CDATA[ */",e.join("\n"),"/* ]]> */","</style>",t.innerHTML,"</svg>"].join("\n")}function h(e){var t="";return e.match(/^<svg[^>]+xmlns="http:\/\/www\.w3\.org\/2000\/svg"/)||(t=e.replace(/^<svg/,'<svg xmlns="http://www.w3.org/2000/svg"')),e.match(/^<svg[^>]+"http:\/\/www\.w3\.org\/1999\/xlink"/)||(t=e.replace(/^<svg/,'<svg xmlns:xlink="http://www.w3.org/1999/xlink"')),'<?xml version="1.0" standalone="no"?>\r\n'+t}function d(){return t}e.plot.composeImages=l,e.plot.plugins.push({init:function(e){e.composeImages=l},name:"composeImages",version:"1.0"})}(jQuery),function(e){function t(e){var t="",i=e.name,o=e.xPos,n=e.yPos,a=e.fillColor,r=e.strokeColor,s=e.strokeWidth;switch(i){case"circle":t='<use xlink:href="#circle" class="legendIcon" x="'+o+'" y="'+n+'" fill="'+a+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>';break;case"diamond":t='<use xlink:href="#diamond" class="legendIcon" x="'+o+'" y="'+n+'" fill="'+a+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>';break;case"cross":t='<use xlink:href="#cross" class="legendIcon" x="'+o+'" y="'+n+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>';break;case"rectangle":t='<use xlink:href="#rectangle" class="legendIcon" x="'+o+'" y="'+n+'" fill="'+a+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>';break;case"plus":t='<use xlink:href="#plus" class="legendIcon" x="'+o+'" y="'+n+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>';break;case"bar":t='<use xlink:href="#bars" class="legendIcon" x="'+o+'" y="'+n+'" fill="'+a+'" width="1.5em" height="1.5em"/>';break;case"area":t='<use xlink:href="#area" class="legendIcon" x="'+o+'" y="'+n+'" fill="'+a+'" width="1.5em" height="1.5em"/>';break;case"line":t='<use xlink:href="#line" class="legendIcon" x="'+o+'" y="'+n+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>';break;default:t='<use xlink:href="#circle" class="legendIcon" x="'+o+'" y="'+n+'" fill="'+a+'" stroke="'+r+'" stroke-width="'+s+'" width="1.5em" height="1.5em"/>'}return t}function i(e,t){for(var i in e)if(e.hasOwnProperty(i)&&e[i]!==t[i])return!0;return!1}e.plot.plugins.push({init:function(o){o.hooks.setupGrid.push(function(o){var n=o.getOptions(),a=o.getData(),r=n.legend.labelFormatter,s=n.legend.legendEntries,l=n.legend.plotOffset,c=function(t,i,o){var n=i,a=t.map(function(e,t){return{label:(n?n(e.label,e):e.label)||"Plot "+(t+1),color:e.color,options:{lines:e.lines,points:e.points,bars:e.bars}}});if(o)if(e.isFunction(o))a.sort(o);else if("reverse"===o)a.reverse();else{var r="descending"!==o;a.sort(function(e,t){return e.label===t.label?0:e.label<t.label!==r?1:-1})}return a}(a,r,n.legend.sorted),u=o.getPlotOffset();(function(e,t){if(!e||!t)return!0;if(e.length!==t.length)return!0;var o,n,a;for(o=0;o<t.length;o++){if(n=t[o],a=e[o],n.label!==a.label)return!0;if(n.color!==a.color)return!0;if(i(n.options.lines,a.options.lines))return!0;if(i(n.options.points,a.options.points))return!0;if(i(n.options.bars,a.options.bars))return!0}return!1}(s,c)||i(l,u))&&function(i,o,n,a){if(null!=o.legend.container?e(o.legend.container).html(""):n.find(".legend").remove(),o.legend.show){var r,s,l,c=o.legend.legendEntries=a,u=o.legend.plotOffset=i.getPlotOffset(),p=[],h=0,d=0,f="",m=o.legend.position,g=o.legend.margin,x={name:"",label:"",xPos:"",yPos:""};p[d++]='<svg class="legendLayer" style="width:inherit;height:inherit;">',p[d++]='<rect class="background" width="100%" height="100%"/>',p[d++]='<defs><symbol id="line" fill="none" viewBox="-5 -5 25 25"><polyline points="0,15 5,5 10,10 15,0"/></symbol><symbol id="area" stroke-width="1" viewBox="-5 -5 25 25"><polyline points="0,15 5,5 10,10 15,0, 15,15, 0,15"/></symbol><symbol id="bars" stroke-width="1" viewBox="-5 -5 25 25"><polyline points="1.5,15.5 1.5,12.5, 4.5,12.5 4.5,15.5 6.5,15.5 6.5,3.5, 9.5,3.5 9.5,15.5 11.5,15.5 11.5,7.5 14.5,7.5 14.5,15.5 1.5,15.5"/></symbol><symbol id="circle" viewBox="-5 -5 25 25"><circle cx="0" cy="15" r="2.5"/><circle cx="5" cy="5" r="2.5"/><circle cx="10" cy="10" r="2.5"/><circle cx="15" cy="0" r="2.5"/></symbol><symbol id="rectangle" viewBox="-5 -5 25 25"><rect x="-2.1" y="12.9" width="4.2" height="4.2"/><rect x="2.9" y="2.9" width="4.2" height="4.2"/><rect x="7.9" y="7.9" width="4.2" height="4.2"/><rect x="12.9" y="-2.1" width="4.2" height="4.2"/></symbol><symbol id="diamond" viewBox="-5 -5 25 25"><path d="M-3,15 L0,12 L3,15, L0,18 Z"/><path d="M2,5 L5,2 L8,5, L5,8 Z"/><path d="M7,10 L10,7 L13,10, L10,13 Z"/><path d="M12,0 L15,-3 L18,0, L15,3 Z"/></symbol><symbol id="cross" fill="none" viewBox="-5 -5 25 25"><path d="M-2.1,12.9 L2.1,17.1, M2.1,12.9 L-2.1,17.1 Z"/><path d="M2.9,2.9 L7.1,7.1 M7.1,2.9 L2.9,7.1 Z"/><path d="M7.9,7.9 L12.1,12.1 M12.1,7.9 L7.9,12.1 Z"/><path d="M12.9,-2.1 L17.1,2.1 M17.1,-2.1 L12.9,2.1 Z"/></symbol><symbol id="plus" fill="none" viewBox="-5 -5 25 25"><path d="M0,12 L0,18, M-3,15 L3,15 Z"/><path d="M5,2 L5,8 M2,5 L8,5 Z"/><path d="M10,7 L10,13 M7,10 L13,10 Z"/><path d="M15,-3 L15,3 M12,0 L18,0 Z"/></symbol></defs>';for(var v=0;v<c.length;++v)r=c[v],l="",x.label=r.label,x.xPos="0em",x.yPos=1.5*v+"em",r.options.lines.show&&r.options.lines.fill&&(x.name="area",x.fillColor=r.color,l+=t(x)),r.options.bars.show&&(x.name="bar",x.fillColor=r.color,l+=t(x)),r.options.lines.show&&!r.options.lines.fill&&(x.name="line",x.strokeColor=r.color,x.strokeWidth=r.options.lines.lineWidth,l+=t(x)),r.options.points.show&&(x.name=r.options.points.symbol,x.strokeColor=r.color,x.fillColor=r.options.points.fillColor,x.strokeWidth=r.options.points.lineWidth,l+=t(x)),h=h<x.label.length?x.label.length:h,s='<text x="'+x.xPos+'" y="'+x.yPos+'" text-anchor="start"><tspan dx="2em" dy="1.2em">'+x.label+"</tspan></text>",p[d++]="<g>"+l+s+"</g>";p[d++]="</svg>",null==g[0]&&(g=[g,g]),"n"===m.charAt(0)?f+="top:"+(g[1]+u.top)+"px;":"s"===m.charAt(0)&&(f+="bottom:"+(g[1]+u.bottom)+"px;"),"e"===m.charAt(1)?f+="right:"+(g[0]+u.right)+"px;":"w"===m.charAt(1)&&(f+="left:"+(g[0]+u.left)+"px;");var b,y=3+h/2,w=1.6*c.length;o.legend.container?(b=e(p.join("")).appendTo(o.legend.container)[0],o.legend.container.style.width=y+"em",o.legend.container.style.height=w+"em"):((b=e('<div class="legend" style="position:absolute;'+f+'">'+p.join("")+"</div>").appendTo(n)).css("width",y+"em"),b.css("height",w+"em"),b.css("pointerEvents","none"))}}(o,n,o.getPlaceholder(),c)})},options:{legend:{show:!1,labelFormatter:null,container:null,position:"ne",margin:5,sorted:null}},name:"legend",version:"1.0"})}(jQuery)},480:function(e,t){!function(e){var t=10,i=.95;var o={series:{pie:{show:!1,radius:"auto",innerRadius:0,startAngle:1.5,tilt:1,shadow:{left:5,top:15,alpha:.02},offset:{top:0,left:"auto"},stroke:{color:"#fff",width:1},label:{show:"auto",formatter:function(e,t){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+t.color+";'>"+e+"<br/>"+Math.round(t.percent)+"%</div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:.5}}}};e.plot.plugins.push({init:function(o){var n=null,a=null,r=null,s=null,l=null,c=null,u=!1,p=null,h=[];function d(t,i,o){u||(u=!0,n=t.getCanvas(),a=e(n).parent(),r=t.getOptions(),t.setData(function(t){var i,o,n=0,a=0,s=0,l=r.series.pie.combine.color,c=[];for(i=0;i<t.length;++i)o=t[i].data,e.isArray(o)&&1===o.length&&(o=o[0]),e.isArray(o)?!isNaN(parseFloat(o[1]))&&isFinite(o[1])?o[1]=+o[1]:o[1]=0:o=!isNaN(parseFloat(o))&&isFinite(o)?[1,+o]:[1,0],t[i].data=[o];for(i=0;i<t.length;++i)n+=t[i].data[0][1];for(i=0;i<t.length;++i)(o=t[i].data[0][1])/n<=r.series.pie.combine.threshold&&(a+=o,s++,l||(l=t[i].color));for(i=0;i<t.length;++i)o=t[i].data[0][1],(s<2||o/n>r.series.pie.combine.threshold)&&c.push(e.extend(t[i],{data:[[1,o]],color:t[i].color,label:t[i].label,angle:o*Math.PI*2/n,percent:o/(n/100)}));return s>1&&c.push({data:[[1,a]],color:l,label:r.series.pie.combine.label,angle:a*Math.PI*2/n,percent:a/(n/100)}),c}(t.getData())))}function f(o,n){if(a){var h=o.getPlaceholder().width(),d=o.getPlaceholder().height(),f=a.children().filter(".legend").children().width()||0;p=n,u=!1,s=Math.min(h,d/r.series.pie.tilt)/2,c=d/2+r.series.pie.offset.top,l=h/2,"auto"===r.series.pie.offset.left?(r.legend.position.match("w")?l+=f/2:l-=f/2,l<s?l=s:l>h-s&&(l=h-s)):l+=r.series.pie.offset.left;var g=o.getData(),x=0;do{x>0&&(s*=i),x+=1,v(),r.series.pie.tilt<=.8&&b()}while(!y()&&x<t);x>=t&&(v(),a.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>")),o.setSeries&&o.insertLegend&&(o.setSeries(g),o.insertLegend())}function v(){p.clearRect(0,0,h,d),a.children().filter(".pieLabel, .pieLabelBackground").remove()}function b(){var e=r.series.pie.shadow.left,t=r.series.pie.shadow.top,i=r.series.pie.shadow.alpha,o=r.series.pie.radius>1?r.series.pie.radius:s*r.series.pie.radius;if(!(o>=h/2-e||o*r.series.pie.tilt>=d/2-t||o<=10)){p.save(),p.translate(e,t),p.globalAlpha=i,p.fillStyle="#000",p.translate(l,c),p.scale(1,r.series.pie.tilt);for(var n=1;n<=10;n++)p.beginPath(),p.arc(0,0,o,0,2*Math.PI,!1),p.fill(),o-=n;p.restore()}}function y(){var t,i=Math.PI*r.series.pie.startAngle,o=r.series.pie.radius>1?r.series.pie.radius:s*r.series.pie.radius;p.save(),p.translate(l,c),p.scale(1,r.series.pie.tilt),p.save();var n=i;for(t=0;t<g.length;++t)g[t].startAngle=n,u(g[t].angle,g[t].color,!0);if(p.restore(),r.series.pie.stroke.width>0){for(p.save(),p.lineWidth=r.series.pie.stroke.width,n=i,t=0;t<g.length;++t)u(g[t].angle,r.series.pie.stroke.color,!1);p.restore()}return m(p),p.restore(),!r.series.pie.label.show||function(){for(var t=i,o=r.series.pie.label.radius>1?r.series.pie.label.radius:s*r.series.pie.label.radius,n=0;n<g.length;++n){if(g[n].percent>=100*r.series.pie.label.threshold&&!u(g[n],t,n))return!1;t+=g[n].angle}return!0;function u(t,i,n){if(0===t.data[0][1])return!0;var s,u=r.legend.labelFormatter,p=r.series.pie.label.formatter;s=u?u(t.label,t):t.label,p&&(s=p(s,t));var f=(i+t.angle+i)/2,m=l+Math.round(Math.cos(f)*o),g=c+Math.round(Math.sin(f)*o)*r.series.pie.tilt,x="<span class='pieLabel' id='pieLabel"+n+"' style='position:absolute;top:"+g+"px;left:"+m+"px;'>"+s+"</span>";a.append(x);var v=a.children("#pieLabel"+n),b=g-v.height()/2,y=m-v.width()/2;if(v.css("top",b),v.css("left",y),0-b>0||0-y>0||d-(b+v.height())<0||h-(y+v.width())<0)return!1;if(0!==r.series.pie.label.background.opacity){var w=r.series.pie.label.background.color;null==w&&(w=t.color);var k="top:"+b+"px;left:"+y+"px;";e("<div class='pieLabelBackground' style='position:absolute;width:"+v.width()+"px;height:"+v.height()+"px;"+k+"background-color:"+w+";'></div>").css("opacity",r.series.pie.label.background.opacity).insertBefore(v)}return!0}}();function u(e,t,i){e<=0||isNaN(e)||(i?p.fillStyle=t:(p.strokeStyle=t,p.lineJoin="round"),p.beginPath(),Math.abs(e-2*Math.PI)>1e-9&&p.moveTo(0,0),p.arc(0,0,o,n,n+e/2,!1),p.arc(0,0,o,n+e/2,n+e,!1),p.closePath(),n+=e,i?p.fill():p.stroke())}}}function m(e){if(r.series.pie.innerRadius>0){e.save();var t=r.series.pie.innerRadius>1?r.series.pie.innerRadius:s*r.series.pie.innerRadius;e.globalCompositeOperation="destination-out",e.beginPath(),e.fillStyle=r.series.pie.stroke.color,e.arc(0,0,t,0,2*Math.PI,!1),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.strokeStyle=r.series.pie.stroke.color,e.arc(0,0,t,0,2*Math.PI,!1),e.stroke(),e.closePath(),e.restore()}}function g(e,t){for(var i=!1,o=-1,n=e.length,a=n-1;++o<n;a=o)(e[o][1]<=t[1]&&t[1]<e[a][1]||e[a][1]<=t[1]&&t[1]<e[o][1])&&t[0]<(e[a][0]-e[o][0])*(t[1]-e[o][1])/(e[a][1]-e[o][1])+e[o][0]&&(i=!i);return i}function x(e){b("plothover",e)}function v(e){b("plotclick",e)}function b(e,t){var i=o.offset(),n=function(e,t){for(var i,n,a=o.getData(),r=o.getOptions(),u=r.series.pie.radius>1?r.series.pie.radius:s*r.series.pie.radius,h=0;h<a.length;++h){var d=a[h];if(d.pie.show){if(p.save(),p.beginPath(),p.moveTo(0,0),p.arc(0,0,u,d.startAngle,d.startAngle+d.angle/2,!1),p.arc(0,0,u,d.startAngle+d.angle/2,d.startAngle+d.angle,!1),p.closePath(),i=e-l,n=t-c,p.isPointInPath){if(p.isPointInPath(e-l,t-c))return p.restore(),{datapoint:[d.percent,d.data],dataIndex:0,series:d,seriesIndex:h}}else if(g([[0,0],[u*Math.cos(d.startAngle),u*Math.sin(d.startAngle)],[u*Math.cos(d.startAngle+d.angle/4),u*Math.sin(d.startAngle+d.angle/4)],[u*Math.cos(d.startAngle+d.angle/2),u*Math.sin(d.startAngle+d.angle/2)],[u*Math.cos(d.startAngle+d.angle/1.5),u*Math.sin(d.startAngle+d.angle/1.5)],[u*Math.cos(d.startAngle+d.angle),u*Math.sin(d.startAngle+d.angle)]],[i,n]))return p.restore(),{datapoint:[d.percent,d.data],dataIndex:0,series:d,seriesIndex:h};p.restore()}}return null}(parseInt(t.pageX-i.left),parseInt(t.pageY-i.top));if(r.grid.autoHighlight)for(var u=0;u<h.length;++u){var d=h[u];d.auto!==e||n&&d.series===n.series||y(d.series)}n&&function(e,t){var i=w(e);-1===i?(h.push({series:e,auto:t}),o.triggerRedrawOverlay()):t||(h[i].auto=!1)}(n.series,e);var f={pageX:t.pageX,pageY:t.pageY};a.trigger(e,[f,n])}function y(e){null==e&&(h=[],o.triggerRedrawOverlay());var t=w(e);-1!==t&&(h.splice(t,1),o.triggerRedrawOverlay())}function w(e){for(var t=0;t<h.length;++t)if(h[t].series===e)return t;return-1}o.hooks.processOptions.push(function(e,t){t.series.pie.show&&(t.grid.show=!1,"auto"===t.series.pie.label.show&&(t.legend.show?t.series.pie.label.show=!1:t.series.pie.label.show=!0),"auto"===t.series.pie.radius&&(t.series.pie.label.show?t.series.pie.radius=.75:t.series.pie.radius=1),t.series.pie.tilt>1?t.series.pie.tilt=1:t.series.pie.tilt<0&&(t.series.pie.tilt=0))}),o.hooks.bindEvents.push(function(e,t){var i=e.getOptions();i.series.pie.show&&(i.grid.hoverable&&t.unbind("mousemove").mousemove(x),i.grid.clickable&&t.unbind("click").click(v))}),o.hooks.processDatapoints.push(function(e,t,i,o){e.getOptions().series.pie.show&&d(e)}),o.hooks.drawOverlay.push(function(e,t){e.getOptions().series.pie.show&&function(e,t){var i=e.getOptions(),o=i.series.pie.radius>1?i.series.pie.radius:s*i.series.pie.radius;t.save(),t.translate(l,c),t.scale(1,i.series.pie.tilt);for(var n=0;n<h.length;++n)a(h[n].series);function a(e){e.angle<=0||isNaN(e.angle)||(t.fillStyle="rgba(255, 255, 255, "+i.series.pie.highlight.opacity+")",t.beginPath(),Math.abs(e.angle-2*Math.PI)>1e-9&&t.moveTo(0,0),t.arc(0,0,o,e.startAngle,e.startAngle+e.angle/2,!1),t.arc(0,0,o,e.startAngle+e.angle/2,e.startAngle+e.angle,!1),t.closePath(),t.fill())}m(t),t.restore()}(e,t)}),o.hooks.draw.push(function(e,t){e.getOptions().series.pie.show&&f(e,t)})},options:o,name:"pie",version:"1.1"})}(jQuery)},481:function(e,t){!function(e){function t(e,t,i,o){var n="categories"===t.xaxis.options.mode,a="categories"===t.yaxis.options.mode;if(n||a){var r=o.format;if(!r){var s=t;if((r=[]).push({x:!0,number:!0,required:!0,computeRange:!0}),r.push({y:!0,number:!0,required:!0,computeRange:!0}),s.bars.show||s.lines.show&&s.lines.fill){var l=!!(s.bars.show&&s.bars.zero||s.lines.show&&s.lines.zero);r.push({y:!0,number:!0,required:!1,defaultValue:0,computeRange:l}),s.bars.horizontal&&(delete r[r.length-1].y,r[r.length-1].x=!0)}o.format=r}for(var c=0;c<r.length;++c)r[c].x&&n&&(r[c].number=!1),r[c].y&&a&&(r[c].number=!1,r[c].computeRange=!1)}}function i(e){var t=[];for(var i in e.categories){var o=e.categories[i];o>=e.min&&o<=e.max&&t.push([o,i])}return t.sort(function(e,t){return e[0]-t[0]}),t}function o(t,o,n){if("categories"===t[o].options.mode){if(!t[o].categories){var a={},r=t[o].options.categories||{};if(e.isArray(r))for(var s=0;s<r.length;++s)a[r[s]]=s;else for(var l in r)a[l]=r[l];t[o].categories=a}t[o].options.ticks||(t[o].options.ticks=i),function(e,t,i){for(var o=e.points,n=e.pointsize,a=e.format,r=t.charAt(0),s=function(e){var t=-1;for(var i in e)e[i]>t&&(t=e[i]);return t+1}(i),l=0;l<o.length;l+=n)if(null!=o[l])for(var c=0;c<n;++c){var u=o[l+c];null!=u&&a[c][r]&&(u in i||(i[u]=s,++s),o[l+c]=i[u])}}(n,o,t[o].categories)}}function n(e,t,i){o(t,"xaxis",i),o(t,"yaxis",i)}e.plot.plugins.push({init:function(e){e.hooks.processRawData.push(t),e.hooks.processDatapoints.push(n)},options:{xaxis:{categories:null},yaxis:{categories:null}},name:"categories",version:"1.0"})}(jQuery)},482:function(e,t){!function(e,t,i){var o,n=[],a=e.resize=e.extend(e.resize,{}),r=!1,s="setTimeout",l="resize",c=l+"-special-event",u="pendingDelay",p="activeDelay",h="throttleWindow";function d(i){!0===r&&(r=i||1);for(var s=n.length-1;s>=0;s--){var p=e(n[s]);if(p[0]==t||p.is(":visible")){var h=p.width(),f=p.height(),m=p.data(c);!m||h===m.w&&f===m.h||(p.trigger(l,[m.w=h,m.h=f]),r=i||!0)}else(m=p.data(c)).w=0,m.h=0}null!==o&&(r&&(null==i||i-r<1e3)?o=t.requestAnimationFrame(d):(o=setTimeout(d,a[u]),r=!1))}a[u]=200,a[p]=20,a[h]=!0,e.event.special[l]={setup:function(){if(!a[h]&&this[s])return!1;var t=e(this);n.push(this),t.data(c,{w:t.width(),h:t.height()}),1===n.length&&(o=i,d())},teardown:function(){if(!a[h]&&this[s])return!1;for(var t=e(this),i=n.length-1;i>=0;i--)if(n[i]==this){n.splice(i,1);break}t.removeData(c),n.length||(r?cancelAnimationFrame(o):clearTimeout(o),o=null)},add:function(t){if(!a[h]&&this[s])return!1;var o;function n(t,n,a){var r=e(this),s=r.data(c)||{};s.w=n!==i?n:r.width(),s.h=a!==i?a:r.height(),o.apply(this,arguments)}if(e.isFunction(t))return o=t,n;o=t.handler,t.handler=n}},t.requestAnimationFrame||(t.requestAnimationFrame=t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e,i){return t.setTimeout(function(){e((new Date).getTime())},a[p])}),t.cancelAnimationFrame||(t.cancelAnimationFrame=t.webkitCancelRequestAnimationFrame||t.mozCancelRequestAnimationFrame||t.oCancelRequestAnimationFrame||t.msCancelRequestAnimationFrame||clearTimeout)}(jQuery,window),function(e){jQuery.plot.plugins.push({init:function(e){function t(){var t=e.getPlaceholder();0!==t.width()&&0!==t.height()&&(e.resize(),e.setupGrid(),e.draw())}e.hooks.bindEvents.push(function(e,i){e.getPlaceholder().resize(t)}),e.hooks.shutdown.push(function(e,i){e.getPlaceholder().unbind("resize",t)})},options:{},name:"resize",version:"1.0"})}()},62:function(e,t){!function(e){var t={tooltip:{show:!1,cssClass:"flotTip",content:"%s | X: %x | Y: %y",xDateFormat:null,yDateFormat:null,monthNames:null,dayNames:null,shifts:{x:10,y:20},defaultTheme:!0,snap:!0,lines:!1,clickTips:!1,onHover:function(e,t){},$compat:!1}};t.tooltipOpts=t.tooltip;var i=function(e){this.tipPosition={x:0,y:0},this.init(e)};i.prototype.init=function(t){var i=this,o=e.plot.plugins.length;if(this.plotPlugins=[],o)for(var n=0;n<o;n++)this.plotPlugins.push(e.plot.plugins[n].name);function a(e){var i={};i.x=e.pageX,i.y=e.pageY,t.setTooltipPosition(i)}function r(o,n,a){i.clickmode?(e(t.getPlaceholder()).bind("plothover",s),t.hideTooltip(),i.clickmode=!1):(s(o,n,a),i.getDomElement().is(":visible")&&(e(t.getPlaceholder()).unbind("plothover",s),i.clickmode=!0))}function s(o,n,a){var r=function(e,t,i,o){return Math.sqrt((i-e)*(i-e)+(o-t)*(o-t))};if(a)t.showTooltip(a,i.tooltipOptions.snap?a:n);else if(i.plotOptions.series.lines.show&&!0===i.tooltipOptions.lines){var s=i.plotOptions.grid.mouseActiveRadius,l={distance:s+1},c=n;e.each(t.getData(),function(e,o){for(var a=0,s=-1,u=1;u<o.data.length;u++)o.data[u-1][0]<=n.x&&o.data[u][0]>=n.x&&(a=u-1,s=u);if(-1!==s){var p={x:o.data[a][0],y:o.data[a][1]},h={x:o.data[s][0],y:o.data[s][1]},d=function(e,t,i,o,n,a,s){if(!s||(s=function(e,t,i,o,n,a){if(void 0!==i)return{x:i,y:t};if(void 0!==o)return{x:e,y:o};var r,s=-1/((a-o)/(n-i));return{x:r=(n*(e*s-t+o)+i*(e*-s+t-a))/(s*(n-i)+o-a),y:s*r-s*e+t}}(e,t,i,o,n,a)).x>=Math.min(i,n)&&s.x<=Math.max(i,n)&&s.y>=Math.min(o,a)&&s.y<=Math.max(o,a)){var l=o-a,c=n-i,u=i*a-o*n;return Math.abs(l*e+c*t+u)/Math.sqrt(l*l+c*c)}var p=r(e,t,i,o),h=r(e,t,n,a);return p>h?h:p}(o.xaxis.p2c(n.x),o.yaxis.p2c(n.y),o.xaxis.p2c(p.x),o.yaxis.p2c(p.y),o.xaxis.p2c(h.x),o.yaxis.p2c(h.y),!1);if(d<l.distance){var f=r(p.x,p.y,n.x,n.y)<r(n.x,n.y,h.x,h.y)?a:s,m=(o.datapoints.pointsize,[n.x,p.y+(h.y-p.y)*((n.x-p.x)/(h.x-p.x))]);l={distance:d,item:{datapoint:m,dataIndex:f,series:o,seriesIndex:e}},i.tooltipOptions.snap&&(c={pageX:o.xaxis.p2c(m[0]),pageY:o.yaxis.p2c(m[1])})}}else t.hideTooltip()}),l.distance<s+1?t.showTooltip(l.item,c):t.hideTooltip()}else t.hideTooltip()}t.hooks.bindEvents.push(function(t,o){if(i.plotOptions=t.getOptions(),"boolean"==typeof i.plotOptions.tooltip&&(i.plotOptions.tooltipOpts.show=i.plotOptions.tooltip,i.plotOptions.tooltip=i.plotOptions.tooltipOpts,delete i.plotOptions.tooltipOpts),!1!==i.plotOptions.tooltip.show&&void 0!==i.plotOptions.tooltip.show){i.tooltipOptions=i.plotOptions.tooltip,i.tooltipOptions.$compat?(i.wfunc="width",i.hfunc="height"):(i.wfunc="innerWidth",i.hfunc="innerHeight");i.getDomElement();e(t.getPlaceholder()).bind("plothover",s),i.tooltipOptions.clickTips&&e(t.getPlaceholder()).bind("plotclick",r),i.clickmode=!1,e(o).bind("mousemove",a)}}),t.hooks.shutdown.push(function(t,i){e(t.getPlaceholder()).unbind("plothover",s),e(t.getPlaceholder()).unbind("plotclick",r),t.removeTooltip(),e(i).unbind("mousemove",a)}),t.setTooltipPosition=function(t){var o=i.getDomElement(),n=o.outerWidth()+i.tooltipOptions.shifts.x,a=o.outerHeight()+i.tooltipOptions.shifts.y;t.x-e(window).scrollLeft()>e(window)[i.wfunc]()-n&&(t.x-=n,t.x=Math.max(t.x,0)),t.y-e(window).scrollTop()>e(window)[i.hfunc]()-a&&(t.y-=a),isNaN(t.x)?i.tipPosition.x=i.tipPosition.xPrev:(i.tipPosition.x=t.x,i.tipPosition.xPrev=t.x),isNaN(t.y)?i.tipPosition.y=i.tipPosition.yPrev:(i.tipPosition.y=t.y,i.tipPosition.yPrev=t.y)},t.showTooltip=function(e,o,n){var a=i.getDomElement(),r=i.stringFormat(i.tooltipOptions.content,e);""!==r&&(a.html(r),t.setTooltipPosition({x:i.tipPosition.x,y:i.tipPosition.y}),a.css({left:i.tipPosition.x+i.tooltipOptions.shifts.x,top:i.tipPosition.y+i.tooltipOptions.shifts.y}).show(),"function"==typeof i.tooltipOptions.onHover&&i.tooltipOptions.onHover(e,a))},t.hideTooltip=function(){i.getDomElement().hide().html("")},t.removeTooltip=function(){i.getDomElement().remove()}},i.prototype.getDomElement=function(){var t=e("<div>");return this.tooltipOptions&&this.tooltipOptions.cssClass&&0===(t=e("."+this.tooltipOptions.cssClass)).length&&((t=e("<div />").addClass(this.tooltipOptions.cssClass)).appendTo("body").hide().css({position:"absolute"}),this.tooltipOptions.defaultTheme&&t.css({background:"#fff","z-index":"1040",padding:"0.4em 0.6em","border-radius":"0.5em","font-size":"0.8em",border:"1px solid #111",display:"none","white-space":"nowrap"})),t},i.prototype.stringFormat=function(e,t){var i,o,n,a,r,s=/%s/,l=/%c/,c=/%lx/,u=/%ly/,p=/%x\.{0,1}(\d{0,})/,h=/%y\.{0,1}(\d{0,})/;if(void 0!==t.series.threshold?(i=t.datapoint[0],o=t.datapoint[1],n=t.datapoint[2]):void 0!==t.series.curvedLines?(i=t.datapoint[0],o=t.datapoint[1]):void 0!==t.series.lines&&t.series.lines.steps?(i=t.series.datapoints.points[2*t.dataIndex],o=t.series.datapoints.points[2*t.dataIndex+1],n=""):(i=t.series.data[t.dataIndex][0],o=t.series.data[t.dataIndex][1],n=t.series.data[t.dataIndex][2]),null===t.series.label&&t.series.originSeries&&(t.series.label=t.series.originSeries.label),"function"==typeof e&&(e=e(t.series.label,i,o,t)),"boolean"==typeof e&&!e)return"";if(n&&(e=e.replace("%ct",n)),void 0!==t.series.percent?a=t.series.percent:void 0!==t.series.percents&&(a=t.series.percents[t.dataIndex]),"number"==typeof a&&(e=this.adjustValPrecision(/%p\.{0,1}(\d{0,})/,e,a)),t.series.hasOwnProperty("pie")&&void 0!==t.series.data[0][1]&&(r=t.series.data[0][1]),"number"==typeof r&&(e=e.replace("%n",r)),e=void 0!==t.series.label?e.replace(s,t.series.label):e.replace(s,""),e=void 0!==t.series.color?e.replace(l,t.series.color):e.replace(l,""),e=this.hasAxisLabel("xaxis",t)?e.replace(c,t.series.xaxis.options.axisLabel):e.replace(c,""),e=this.hasAxisLabel("yaxis",t)?e.replace(u,t.series.yaxis.options.axisLabel):e.replace(u,""),this.isTimeMode("xaxis",t)&&this.isXDateFormat(t)&&(e=e.replace(p,this.timestampToDate(i,this.tooltipOptions.xDateFormat,t.series.xaxis.options))),this.isTimeMode("yaxis",t)&&this.isYDateFormat(t)&&(e=e.replace(h,this.timestampToDate(o,this.tooltipOptions.yDateFormat,t.series.yaxis.options))),"number"==typeof i&&(e=this.adjustValPrecision(p,e,i)),"number"==typeof o&&(e=this.adjustValPrecision(h,e,o)),void 0!==t.series.xaxis.ticks){var d;d=this.hasRotatedXAxisTicks(t)?"rotatedTicks":"ticks";var f=t.dataIndex+t.seriesIndex;for(var m in t.series.xaxis[d]){if(t.series.xaxis[d].hasOwnProperty(f)&&!this.isTimeMode("xaxis",t))(this.isCategoriesMode("xaxis",t)?t.series.xaxis[d][f].label:t.series.xaxis[d][f].v)===i&&(e=e.replace(p,t.series.xaxis[d][f].label.replace(/\$/g,"$$$$")))}}if(void 0!==t.series.yaxis.ticks)for(var g in t.series.yaxis.ticks){if(t.series.yaxis.ticks.hasOwnProperty(g))(this.isCategoriesMode("yaxis",t)?t.series.yaxis.ticks[g].label:t.series.yaxis.ticks[g].v)===o&&(e=e.replace(h,t.series.yaxis.ticks[g].label.replace(/\$/g,"$$$$")))}return void 0!==t.series.xaxis.tickFormatter&&(e=e.replace("%x",t.series.xaxis.tickFormatter(i,t.series.xaxis).replace(/\$/g,"$$"))),void 0!==t.series.yaxis.tickFormatter&&(e=e.replace("%y",t.series.yaxis.tickFormatter(o,t.series.yaxis).replace(/\$/g,"$$"))),e},i.prototype.isTimeMode=function(e,t){return void 0!==t.series[e].options.mode&&"time"===t.series[e].options.mode},i.prototype.isXDateFormat=function(e){return void 0!==this.tooltipOptions.xDateFormat&&null!==this.tooltipOptions.xDateFormat},i.prototype.isYDateFormat=function(e){return void 0!==this.tooltipOptions.yDateFormat&&null!==this.tooltipOptions.yDateFormat},i.prototype.isCategoriesMode=function(e,t){return void 0!==t.series[e].options.mode&&"categories"===t.series[e].options.mode},i.prototype.timestampToDate=function(t,i,o){var n=e.plot.dateGenerator(t,o);return e.plot.formatDate(n,i,this.tooltipOptions.monthNames,this.tooltipOptions.dayNames)},i.prototype.adjustValPrecision=function(e,t,i){var o;return null!==t.match(e)&&""!==RegExp.$1&&(o=RegExp.$1,i=i.toFixed(o),t=t.replace(e,i)),t},i.prototype.hasAxisLabel=function(t,i){return-1!==e.inArray("axisLabels",this.plotPlugins)&&void 0!==i.series[t].options.axisLabel&&i.series[t].options.axisLabel.length>0},i.prototype.hasRotatedXAxisTicks=function(t){return-1!==e.inArray("tickRotor",this.plotPlugins)&&void 0!==t.series.xaxis.rotatedTicks};e.plot.plugins.push({init:function(e){new i(e)},options:t,name:"tooltip",version:"0.8.5"})}(jQuery)}})});