Flot upgrade to 4.2.1 (with modifications!)
authorThierry Florac <tflorac@ulthar.net>
Fri, 11 Dec 2020 11:45:23 +0100
changeset 26 f695c11dcd2d
parent 25 41732eb0701a
child 27 4c9ed825719d
Flot upgrade to 4.2.1 (with modifications!)
src/myams/resources/js/ext/flot/jquery.canvaswrapper.js
src/myams/resources/js/ext/flot/jquery.canvaswrapper.min.js
src/myams/resources/js/ext/flot/jquery.flot.drawSeries.js
src/myams/resources/js/ext/flot/jquery.flot.fillbetween.js
src/myams/resources/js/ext/flot/jquery.flot.fillbetween.min.js
src/myams/resources/js/ext/flot/jquery.flot.hover.js
src/myams/resources/js/ext/flot/jquery.flot.hover.min.js
src/myams/resources/js/ext/flot/jquery.flot.js
src/myams/resources/js/ext/flot/jquery.flot.legend.js
src/myams/resources/js/ext/flot/jquery.flot.legend.min.js
src/myams/resources/js/ext/flot/jquery.flot.logaxis.js
src/myams/resources/js/ext/flot/jquery.flot.min.js
src/myams/resources/js/ext/flot/jquery.flot.navigate.js
src/myams/resources/js/ext/flot/jquery.flot.navigate.min.js
src/myams/resources/js/ext/flot/jquery.flot.pie.js
src/myams/resources/js/ext/flot/jquery.flot.pie.min.js
src/myams/resources/js/ext/flot/jquery.flot.resize.js
src/myams/resources/js/ext/flot/jquery.flot.resize.min.js
src/myams/resources/js/ext/flot/jquery.flot.selection.js
src/myams/resources/js/ext/flot/jquery.flot.selection.min.js
src/myams/resources/js/ext/flot/jquery.flot.stack.js
src/myams/resources/js/ext/flot/jquery.flot.stack.min.js
src/myams/resources/js/ext/flot/jquery.flot.time.js
src/myams/resources/js/ext/flot/jquery.flot.time.min.js
src/myams/resources/js/ext/flot/jquery.flot.touchNavigate.js
--- a/src/myams/resources/js/ext/flot/jquery.canvaswrapper.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.canvaswrapper.js	Fri Dec 11 11:45:23 2020 +0100
@@ -386,7 +386,6 @@
 
         y += 0.75 * info.height;
 
-
         // Determine whether this text already exists at this position.
         // If so, mark it for inclusion in the next render pass.
 
@@ -447,7 +446,7 @@
         position.element.style.textAlign = halign;
         // update the transforms
         updateTransforms(position.element, transforms);
-   };
+    };
 
     var addTspanElements = function(text, element, x) {
         var lines = text.split('<br>'),
@@ -461,7 +460,7 @@
                 tspan = element.childNodes[i];
             }
             tspan.textContent = lines[i];
-            offset = i * 1 + 'em';
+            offset = (i === 0 ? 0 : 1) + 'em';
             tspan.setAttributeNS(null, 'dy', offset);
             tspan.setAttributeNS(null, 'x', x);
         }
--- a/src/myams/resources/js/ext/flot/jquery.canvaswrapper.min.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.canvaswrapper.min.js	Fri Dec 11 11:45:23 2020 +0100
@@ -1,1 +1,1 @@
-!function(t){var e=function(e,i){var n=i.getElementsByClassName(e)[0];if(!n&&((n=document.createElement("canvas")).className=e,n.style.direction="ltr",n.style.position="absolute",n.style.left="0px",n.style.top="0px",i.appendChild(n),!n.getContext))throw new Error("Canvas is not available.");this.element=n;var r=this.context=n.getContext("2d");this.pixelRatio=t.plot.browser.getPixelRatio(r);var l=t(i).width(),o=t(i).height();this.resize(l,o),this.SVGContainer=null,this.SVG={},this._textCache={}};function i(t,e){t.transform.baseVal.clear(),e&&e.forEach((function(e){t.transform.baseVal.appendItem(e)}))}e.prototype.resize=function(t,e){t=t<10?10:t,e=e<10?10:e;var i=this.element,n=this.context,r=this.pixelRatio;this.width!==t&&(i.width=t*r,i.style.width=t+"px",this.width=t),this.height!==e&&(i.height=e*r,i.style.height=e+"px",this.height=e),n.restore(),n.save(),n.scale(r,r)},e.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},e.prototype.render=function(){var t=this._textCache;for(var e in t)if(hasOwnProperty.call(t,e)){var i=this.getSVGLayer(e),n=t[e],r=i.style.display;for(var l in i.style.display="none",n)if(hasOwnProperty.call(n,l)){var o=n[l];for(var s in o)if(hasOwnProperty.call(o,s)){for(var a,h=o[s],d=h.positions,p=0;d[p];p++)if((a=d[p]).active)a.rendered||(i.appendChild(a.element),a.rendered=!0);else if(d.splice(p--,1),a.rendered){for(;a.element.firstChild;)a.element.removeChild(a.element.firstChild);a.element.parentNode.removeChild(a.element)}0===d.length&&(h.measured?h.measured=!1:delete o[s])}}i.style.display=r}},e.prototype.getSVGLayer=function(t){var e,i=this.SVG[t];i||(this.SVGContainer?e=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),(e=document.createElementNS("http://www.w3.org/2000/svg","svg")).style.width="100%",e.style.height="100%",this.SVGContainer.appendChild(e)),(i=document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("class",t),i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.bottom="0px",i.style.right="0px",e.appendChild(i),this.SVG[t]=i);return i},e.prototype.getTextInfo=function(t,e,i,r,l){var o,s,a,h;e=""+e,o="object"==typeof i?i.style+" "+i.variant+" "+i.weight+" "+i.size+"px/"+i.lineHeight+"px "+i.family:i,null==(s=this._textCache[t])&&(s=this._textCache[t]={}),null==(a=s[o])&&(a=s[o]={});var d=function(t){return t.replace(/0|1|2|3|4|5|6|7|8|9/g,"0")}(e);if(!(h=a[d])){var p=document.createElementNS("http://www.w3.org/2000/svg","text");if(-1!==e.indexOf("<br>"))n(e,p,-9999);else{var c=document.createTextNode(e);p.appendChild(c)}p.style.position="absolute",p.style.maxWidth=l,p.setAttributeNS(null,"x",-9999),p.setAttributeNS(null,"y",-9999),"object"==typeof i?(p.style.font=o,p.style.fill=i.fill):"string"==typeof i&&p.setAttribute("class",i),this.getSVGLayer(t).appendChild(p);var f=p.getBBox();for(h=a[d]={width:f.width,height:f.height,measured:!0,element:p,positions:[]};p.firstChild;)p.removeChild(p.firstChild);p.parentNode.removeChild(p)}return h.measured=!0,h},e.prototype.addText=function(t,e,r,l,o,s,a,h,d,p){var c=this.getTextInfo(t,l,o,s,a),f=c.positions;"center"===h?e-=c.width/2:"right"===h&&(e-=c.width),"middle"===d?r-=c.height/2:"bottom"===d&&(r-=c.height),r+=.75*c.height;for(var y,m=0;f[m];m++){if((y=f[m]).x===e&&y.y===r&&y.text===l)return y.active=!0,void i(y.element,p);if(!1===y.active)return y.active=!0,y.text=l,-1!==l.indexOf("<br>")?(r-=.25*c.height,n(l,y.element,e)):y.element.textContent=l,y.element.setAttributeNS(null,"x",e),y.element.setAttributeNS(null,"y",r),y.x=e,y.y=r,void i(y.element,p)}y={active:!0,rendered:!1,element:f.length?c.element.cloneNode():c.element,text:l,x:e,y:r},f.push(y),-1!==l.indexOf("<br>")?(r-=.25*c.height,n(l,y.element,e)):y.element.textContent=l,y.element.setAttributeNS(null,"x",e),y.element.setAttributeNS(null,"y",r),y.element.style.textAlign=h,i(y.element,p)};var n=function(t,e,i){var n,r,l,o=t.split("<br>");for(r=0;r<o.length;r++)e.childNodes[r]?n=e.childNodes[r]:(n=document.createElementNS("http://www.w3.org/2000/svg","tspan"),e.appendChild(n)),n.textContent=o[r],l=1*r+"em",n.setAttributeNS(null,"dy",l),n.setAttributeNS(null,"x",i)};e.prototype.removeText=function(t,e,i,n,r,l){var o,s;if(null==n){var a=this._textCache[t];if(null!=a)for(var h in a)if(hasOwnProperty.call(a,h)){var d=a[h];for(var p in d)if(hasOwnProperty.call(d,p)){var c=d[p].positions;c.forEach((function(t){t.active=!1}))}}}else(c=(o=this.getTextInfo(t,n,r,l)).positions).forEach((function(t){s=i+.75*o.height,t.x===e&&t.y===s&&t.text===n&&(t.active=!1)}))},e.prototype.clearCache=function(){var t=this._textCache;for(var e in t)if(hasOwnProperty.call(t,e))for(var i=this.getSVGLayer(e);i.firstChild;)i.removeChild(i.firstChild);this._textCache={}},window.Flot||(window.Flot={}),window.Flot.Canvas=e}(jQuery);
+!function(t){var e=function(e,i){var n=i.getElementsByClassName(e)[0];if(!n&&((n=document.createElement("canvas")).className=e,n.style.direction="ltr",n.style.position="absolute",n.style.left="0px",n.style.top="0px",i.appendChild(n),!n.getContext))throw new Error("Canvas is not available.");this.element=n;var r=this.context=n.getContext("2d");this.pixelRatio=t.plot.browser.getPixelRatio(r);var l=t(i).width(),o=t(i).height();this.resize(l,o),this.SVGContainer=null,this.SVG={},this._textCache={}};function i(t,e){t.transform.baseVal.clear(),e&&e.forEach((function(e){t.transform.baseVal.appendItem(e)}))}e.prototype.resize=function(t,e){t=t<10?10:t,e=e<10?10:e;var i=this.element,n=this.context,r=this.pixelRatio;this.width!==t&&(i.width=t*r,i.style.width=t+"px",this.width=t),this.height!==e&&(i.height=e*r,i.style.height=e+"px",this.height=e),n.restore(),n.save(),n.scale(r,r)},e.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},e.prototype.render=function(){var t=this._textCache;for(var e in t)if(hasOwnProperty.call(t,e)){var i=this.getSVGLayer(e),n=t[e],r=i.style.display;for(var l in i.style.display="none",n)if(hasOwnProperty.call(n,l)){var o=n[l];for(var s in o)if(hasOwnProperty.call(o,s)){for(var a,h=o[s],d=h.positions,p=0;d[p];p++)if((a=d[p]).active)a.rendered||(i.appendChild(a.element),a.rendered=!0);else if(d.splice(p--,1),a.rendered){for(;a.element.firstChild;)a.element.removeChild(a.element.firstChild);a.element.parentNode.removeChild(a.element)}0===d.length&&(h.measured?h.measured=!1:delete o[s])}}i.style.display=r}},e.prototype.getSVGLayer=function(t){var e,i=this.SVG[t];i||(this.SVGContainer?e=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),(e=document.createElementNS("http://www.w3.org/2000/svg","svg")).style.width="100%",e.style.height="100%",this.SVGContainer.appendChild(e)),(i=document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("class",t),i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.bottom="0px",i.style.right="0px",e.appendChild(i),this.SVG[t]=i);return i},e.prototype.getTextInfo=function(t,e,i,r,l){var o,s,a,h;e=""+e,o="object"==typeof i?i.style+" "+i.variant+" "+i.weight+" "+i.size+"px/"+i.lineHeight+"px "+i.family:i,null==(s=this._textCache[t])&&(s=this._textCache[t]={}),null==(a=s[o])&&(a=s[o]={});var d=function(t){return t.replace(/0|1|2|3|4|5|6|7|8|9/g,"0")}(e);if(!(h=a[d])){var p=document.createElementNS("http://www.w3.org/2000/svg","text");if(-1!==e.indexOf("<br>"))n(e,p,-9999);else{var c=document.createTextNode(e);p.appendChild(c)}p.style.position="absolute",p.style.maxWidth=l,p.setAttributeNS(null,"x",-9999),p.setAttributeNS(null,"y",-9999),"object"==typeof i?(p.style.font=o,p.style.fill=i.fill):"string"==typeof i&&p.setAttribute("class",i),this.getSVGLayer(t).appendChild(p);var f=p.getBBox();for(h=a[d]={width:f.width,height:f.height,measured:!0,element:p,positions:[]};p.firstChild;)p.removeChild(p.firstChild);p.parentNode.removeChild(p)}return h.measured=!0,h},e.prototype.addText=function(t,e,r,l,o,s,a,h,d,p){var c=this.getTextInfo(t,l,o,s,a),f=c.positions;"center"===h?e-=c.width/2:"right"===h&&(e-=c.width),"middle"===d?r-=c.height/2:"bottom"===d&&(r-=c.height),r+=.75*c.height;for(var y,m=0;f[m];m++){if((y=f[m]).x===e&&y.y===r&&y.text===l)return y.active=!0,void i(y.element,p);if(!1===y.active)return y.active=!0,y.text=l,-1!==l.indexOf("<br>")?(r-=.25*c.height,n(l,y.element,e)):y.element.textContent=l,y.element.setAttributeNS(null,"x",e),y.element.setAttributeNS(null,"y",r),y.x=e,y.y=r,void i(y.element,p)}y={active:!0,rendered:!1,element:f.length?c.element.cloneNode():c.element,text:l,x:e,y:r},f.push(y),-1!==l.indexOf("<br>")?(r-=.25*c.height,n(l,y.element,e)):y.element.textContent=l,y.element.setAttributeNS(null,"x",e),y.element.setAttributeNS(null,"y",r),y.element.style.textAlign=h,i(y.element,p)};var n=function(t,e,i){var n,r,l,o=t.split("<br>");for(r=0;r<o.length;r++)e.childNodes[r]?n=e.childNodes[r]:(n=document.createElementNS("http://www.w3.org/2000/svg","tspan"),e.appendChild(n)),n.textContent=o[r],l=(0===r?0:1)+"em",n.setAttributeNS(null,"dy",l),n.setAttributeNS(null,"x",i)};e.prototype.removeText=function(t,e,i,n,r,l){var o,s;if(null==n){var a=this._textCache[t];if(null!=a)for(var h in a)if(hasOwnProperty.call(a,h)){var d=a[h];for(var p in d)if(hasOwnProperty.call(d,p)){var c=d[p].positions;c.forEach((function(t){t.active=!1}))}}}else(c=(o=this.getTextInfo(t,n,r,l)).positions).forEach((function(t){s=i+.75*o.height,t.x===e&&t.y===s&&t.text===n&&(t.active=!1)}))},e.prototype.clearCache=function(){var t=this._textCache;for(var e in t)if(hasOwnProperty.call(t,e))for(var i=this.getSVGLayer(e);i.firstChild;)i.removeChild(i.firstChild);this._textCache={}},window.Flot||(window.Flot={}),window.Flot.Canvas=e}(jQuery);
--- a/src/myams/resources/js/ext/flot/jquery.flot.drawSeries.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.drawSeries.js	Fri Dec 11 11:45:23 2020 +0100
@@ -42,7 +42,7 @@
                     continue;
                 }
 
-                if(steps){
+                if (steps) {
                     if (mx !== null && my !== null) {
                         // if middle point exists, transfer p2 -> p1 and p1 -> mp
                         x2 = x1;
@@ -202,7 +202,7 @@
                     continue;
                 }
 
-                if(steps){
+                if (steps) {
                     if (mx !== null && my !== null) {
                         // if middle point exists, transfer p2 -> p1 and p1 -> mp
                         x2 = x1;
@@ -482,8 +482,7 @@
                     drawLeft = true;
                     drawRight = false;
                 }
-            }
-            else {
+            } else {
                 drawLeft = drawRight = drawTop = true;
                 drawBottom = false;
                 left = x + barLeft;
@@ -587,7 +586,7 @@
                 var points = datapoints.points,
                     ps = datapoints.pointsize,
                     fillTowards = series.bars.fillTowards || 0,
-                    calculatedBottom = fillTowards > axisy.min ? Math.min(axisy.max, fillTowards) : axisy.min;
+                    defaultBottom = fillTowards > axisy.min ? Math.min(axisy.max, fillTowards) : axisy.min;
 
                 for (var i = 0; i < points.length; i += ps) {
                     if (points[i] == null) {
@@ -595,7 +594,7 @@
                     }
 
                     // Use third point as bottom if pointsize is 3
-                    var bottom = ps === 3 ? points[i + 2] : calculatedBottom;
+                    var bottom = ps === 3 ? points[i + 2] : defaultBottom;
                     drawBar(points[i], points[i + 1], bottom, barLeft, barRight, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth);
                 }
             }
--- a/src/myams/resources/js/ext/flot/jquery.flot.fillbetween.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.fillbetween.js	Fri Dec 11 11:45:23 2020 +0100
@@ -32,7 +32,7 @@
 (function ($) {
     var options = {
         series: {
-            fillBetween: null    // or number
+            fillBetween: null // or number
         }
     };
 
@@ -60,11 +60,11 @@
             if (s.fillBetween == null) {
                 return;
             }
-            
-            format = datapoints.format;
+
+            var format = datapoints.format;
             var plotHasId = function(id) {
                 var plotData = plot.getData();
-                for (i = 0; i < plotData.length; i++) {
+                for (var i = 0; i < plotData.length; i++) {
                     if (plotData[i].id === id) {
                         return true;
                     }
@@ -76,17 +76,17 @@
             if (!format) {
                 format = [];
 
-                format.push({ 
-                    x: true, 
-                    number: true, 
+                format.push({
+                    x: true,
+                    number: true,
                     computeRange: s.xaxis.options.autoScale !== 'none',
-                    required: true 
+                    required: true
                 });
-                format.push({ 
-                    y: true, 
-                    number: true, 
+                format.push({
+                    y: true,
+                    number: true,
                     computeRange: s.yaxis.options.autoScale !== 'none',
-                    required: true 
+                    required: true
                 });
 
                 if (s.fillBetween !== undefined && s.fillBetween !== '' && plotHasId(s.fillBetween) && s.fillBetween !== s.id) {
--- a/src/myams/resources/js/ext/flot/jquery.flot.fillbetween.min.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.fillbetween.min.js	Fri Dec 11 11:45:23 2020 +0100
@@ -1,1 +1,1 @@
-jQuery.plot.plugins.push({init:function(e){e.hooks.processRawData.push((function(e,n,t,l){null!=n.fillBetween&&(format=l.format,format||(format=[],format.push({x:!0,number:!0,computeRange:"none"!==n.xaxis.options.autoScale,required:!0}),format.push({y:!0,number:!0,computeRange:"none"!==n.yaxis.options.autoScale,required:!0}),void 0!==n.fillBetween&&""!==n.fillBetween&&function(n){var t=e.getData();for(i=0;i<t.length;i++)if(t[i].id===n)return!0;return!1}(n.fillBetween)&&n.fillBetween!==n.id&&format.push({x:!1,y:!0,number:!0,required:!1,computeRange:"none"!==n.yaxis.options.autoScale,defaultValue:0}),l.format=format))})),e.hooks.processDatapoints.push((function(e,n,t){if(null!=n.fillBetween){var l=function(e,n){var t;for(t=0;t<n.length;++t)if(n[t].id===e.fillBetween)return n[t];return"number"==typeof e.fillBetween?e.fillBetween<0||e.fillBetween>=n.length?null:n[e.fillBetween]:null}(n,e.getData());if(l){for(var i,o,f,u,s,r,a,p,h=t.pointsize,m=t.points,w=l.datapoints.pointsize,c=l.datapoints.points,g=[],B=n.lines.show,d=h>2&&t.format[2].y,y=B&&n.lines.steps,v=!0,x=0,b=0;!(x>=m.length);){if(a=g.length,null==m[x]){for(p=0;p<h;++p)g.push(m[x+p]);x+=h}else if(b>=c.length){if(!B)for(p=0;p<h;++p)g.push(m[x+p]);x+=h}else if(null==c[b]){for(p=0;p<h;++p)g.push(null);v=!0,b+=w}else{if(i=m[x],o=m[x+1],u=c[b],s=c[b+1],r=0,i===u){for(p=0;p<h;++p)g.push(m[x+p]);r=s,x+=h,b+=w}else if(i>u){if(B&&x>0&&null!=m[x-h]){for(f=o+(m[x-h+1]-o)*(u-i)/(m[x-h]-i),g.push(u),g.push(f),p=2;p<h;++p)g.push(m[x+p]);r=s}b+=w}else{if(v&&B){x+=h;continue}for(p=0;p<h;++p)g.push(m[x+p]);B&&b>0&&null!=c[b-w]&&(r=s+(c[b-w+1]-s)*(i-u)/(c[b-w]-u)),x+=h}v=!1,a!==g.length&&d&&(g[a+2]=r)}if(y&&a!==g.length&&a>0&&null!==g[a]&&g[a]!==g[a-h]&&g[a+1]!==g[a-h+1]){for(p=0;p<h;++p)g[a+h+p]=g[a+p];g[a+1]=g[a-h+1]}}t.points=g}}}))},options:{series:{fillBetween:null}},name:"fillbetween",version:"1.0"});
+jQuery.plot.plugins.push({init:function(e){e.hooks.processRawData.push((function(e,n,l,t){if(null!=n.fillBetween){var i=t.format;i||((i=[]).push({x:!0,number:!0,computeRange:"none"!==n.xaxis.options.autoScale,required:!0}),i.push({y:!0,number:!0,computeRange:"none"!==n.yaxis.options.autoScale,required:!0}),void 0!==n.fillBetween&&""!==n.fillBetween&&function(n){for(var l=e.getData(),t=0;t<l.length;t++)if(l[t].id===n)return!0;return!1}(n.fillBetween)&&n.fillBetween!==n.id&&i.push({x:!1,y:!0,number:!0,required:!1,computeRange:"none"!==n.yaxis.options.autoScale,defaultValue:0}),t.format=i)}})),e.hooks.processDatapoints.push((function(e,n,l){if(null!=n.fillBetween){var t=function(e,n){var l;for(l=0;l<n.length;++l)if(n[l].id===e.fillBetween)return n[l];return"number"==typeof e.fillBetween?e.fillBetween<0||e.fillBetween>=n.length?null:n[e.fillBetween]:null}(n,e.getData());if(t){for(var i,o,u,s,f,r,a,p,h=l.pointsize,w=l.points,c=t.datapoints.pointsize,g=t.datapoints.points,B=[],m=n.lines.show,d=h>2&&l.format[2].y,v=m&&n.lines.steps,y=!0,x=0,b=0;!(x>=w.length);){if(a=B.length,null==w[x]){for(p=0;p<h;++p)B.push(w[x+p]);x+=h}else if(b>=g.length){if(!m)for(p=0;p<h;++p)B.push(w[x+p]);x+=h}else if(null==g[b]){for(p=0;p<h;++p)B.push(null);y=!0,b+=c}else{if(i=w[x],o=w[x+1],s=g[b],f=g[b+1],r=0,i===s){for(p=0;p<h;++p)B.push(w[x+p]);r=f,x+=h,b+=c}else if(i>s){if(m&&x>0&&null!=w[x-h]){for(u=o+(w[x-h+1]-o)*(s-i)/(w[x-h]-i),B.push(s),B.push(u),p=2;p<h;++p)B.push(w[x+p]);r=f}b+=c}else{if(y&&m){x+=h;continue}for(p=0;p<h;++p)B.push(w[x+p]);m&&b>0&&null!=g[b-c]&&(r=f+(g[b-c+1]-f)*(i-s)/(g[b-c]-s)),x+=h}y=!1,a!==B.length&&d&&(B[a+2]=r)}if(v&&a!==B.length&&a>0&&null!==B[a]&&B[a]!==B[a-h]&&B[a+1]!==B[a-h+1]){for(p=0;p<h;++p)B[a+h+p]=B[a+p];B[a+1]=B[a-h+1]}}l.points=B}}}))},options:{series:{fillBetween:null}},name:"fillbetween",version:"1.0"});
--- a/src/myams/resources/js/ext/flot/jquery.flot.hover.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.hover.js	Fri Dec 11 11:45:23 2020 +0100
@@ -79,7 +79,6 @@
             highlights = [];
         }
 
-
         function generatePlothoverEvent(e) {
             var o = plot.getOptions(),
                 newEvent = new CustomEvent('mouseevent');
@@ -98,10 +97,10 @@
 
         function doTriggerClickHoverEvent(event, eventType, searchDistance) {
             var series = plot.getData();
-            if (event !== undefined
-                && series.length > 0
-                && series[0].xaxis.c2p !== undefined
-                && series[0].yaxis.c2p !== undefined) {
+            if (event !== undefined &&
+                series.length > 0 &&
+                series[0].xaxis.c2p !== undefined &&
+                series[0].yaxis.c2p !== undefined) {
                 var eventToTrigger = "plot" + eventType;
                 var seriesFlag = eventType + "able";
                 triggerClickHoverEvent(eventToTrigger, event,
@@ -152,17 +151,27 @@
             pos.pageX = page.X;
             pos.pageY = page.Y;
 
-            var item = plot.findNearbyItem(canvasX, canvasY, seriesFilter, distance);
+            var items = plot.findNearbyItems(canvasX, canvasY, seriesFilter, distance);
+            var item = items[0];
+
+            for (let i = 1; i < items.length; ++i) {
+                if (item.distance === undefined ||
+                    items[i].distance < item.distance) {
+                    item = items[i];
+                }
+            }
 
             if (item) {
                 // fill in mouse pos for any listeners out there
                 item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left, 10);
                 item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top, 10);
+            } else {
+                item = null;
             }
 
             if (options.grid.autoHighlight) {
                 // clear auto-highlights
-                for (var i = 0; i < highlights.length; ++i) {
+                for (let i = 0; i < highlights.length; ++i) {
                     var h = highlights[i];
                     if ((h.auto === eventname &&
                         !(item && h.series === item.series &&
@@ -177,7 +186,7 @@
                 }
             }
 
-            plot.getPlaceholder().trigger(eventname, [pos, item]);
+            plot.getPlaceholder().trigger(eventname, [pos, item, items]);
         }
 
         function highlight(s, point, auto) {
--- a/src/myams/resources/js/ext/flot/jquery.flot.hover.min.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.hover.min.js	Fri Dec 11 11:45:23 2020 +0100
@@ -1,1 +1,1 @@
-!function(e){"use strict";var t=e.plot.browser,i={click:"click",hover:"hover"};e.plot.plugins.push({init:function(o){var r,a=[];function n(e){var t=o.getOptions(),r=new CustomEvent("mouseevent");return r.pageX=e.detail.changedTouches[0].pageX,r.pageY=e.detail.changedTouches[0].pageY,r.clientX=e.detail.changedTouches[0].clientX,r.clientY=e.detail.changedTouches[0].clientY,t.grid.hoverable&&s(r,i.hover,30),!1}function s(e,t,i){var r=o.getData();if(void 0!==e&&r.length>0&&void 0!==r[0].xaxis.c2p&&void 0!==r[0].yaxis.c2p){var a=t+"able";u("plot"+t,e,(function(e){return!1!==r[e][a]}),i)}}function l(e){r=e,o.getPlaceholder()[0].lastMouseMoveEvent=e,s(e,i.hover)}function c(e){r=void 0,o.getPlaceholder()[0].lastMouseMoveEvent=void 0,u("plothover",e,(function(e){return!1}))}function h(e){s(e,i.click)}function p(){o.unhighlight(),o.getPlaceholder().trigger("plothovercleanup")}function u(e,i,r,n){var s=o.getOptions(),l=o.offset(),c=t.getPageXY(i),h=c.X-l.left,p=c.Y-l.top,u=o.c2p({left:h,top:p}),v=void 0!==n?n:s.grid.mouseActiveRadius;u.pageX=c.X,u.pageY=c.Y;var f=o.findNearbyItem(h,p,r,v);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 b=0;b<a.length;++b){var m=a[b];(m.auto!==e||f&&m.series===f.series&&m.point[0]===f.datapoint[0]&&m.point[1]===f.datapoint[1])&&f||d(m.series,m.point)}f&&g(f.series,f.datapoint,e)}o.getPlaceholder().trigger(e,[u,f])}function g(e,t,i){if("number"==typeof e&&(e=o.getData()[e]),"number"==typeof t){var r=e.datapoints.pointsize;t=e.datapoints.points.slice(r*t,r*(t+1))}var n=v(e,t);-1===n?(a.push({series:e,point:t,auto:i}),o.triggerRedrawOverlay()):i||(a[n].auto=!1)}function d(e,t){if(null==e&&null==t)return a=[],void o.triggerRedrawOverlay();if("number"==typeof e&&(e=o.getData()[e]),"number"==typeof t){var i=e.datapoints.pointsize;t=e.datapoints.points.slice(i*t,i*(t+1))}var r=v(e,t);-1!==r&&(a.splice(r,1),o.triggerRedrawOverlay())}function v(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}function f(){p(),s(r,i.hover)}function b(){s(r,i.hover)}function m(e,t,i){var o,r,n=e.getPlotOffset();for(t.save(),t.translate(n.left,n.top),o=0;o<a.length;++o)(r=a[o]).series.bars.show?k(r.series,r.point,t):y(r.series,r.point,t,e);t.restore()}function y(t,i,o,r){var a=i[0],n=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||n<l.min||n>l.max)){var h=t.points.radius+t.points.lineWidth/2;o.lineWidth=h,o.strokeStyle=c;var p=1.5*h;a=s.p2c(a),n=l.p2c(n),o.beginPath();var u=t.points.symbol;"circle"===u?o.arc(a,n,p,0,2*Math.PI,!1):"string"==typeof u&&r.drawSymbol&&r.drawSymbol[u]&&r.drawSymbol[u](o,a,n,p,!1),o.closePath(),o.stroke()}}function k(t,i,o){var r,a="string"==typeof t.highlightColor?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString(),n=a,s=t.bars.barWidth[0]||t.bars.barWidth;switch(t.bars.align){case"left":r=0;break;case"right":r=-s;break;default:r=-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,r,r+s,(function(){return n}),t.xaxis,t.yaxis,o,t.bars.horizontal,t.bars.lineWidth)}o.hooks.bindEvents.push((function(e,t){var i=e.getOptions();(i.grid.hoverable||i.grid.clickable)&&(t[0].addEventListener("touchevent",p,!1),t[0].addEventListener("tap",n,!1)),i.grid.clickable&&t.bind("click",h),i.grid.hoverable&&(t.bind("mousemove",l),t.bind("mouseleave",c))})),o.hooks.shutdown.push((function(e,t){t[0].removeEventListener("tap",n),t[0].removeEventListener("touchevent",p),t.unbind("mousemove",l),t.unbind("mouseleave",c),t.unbind("click",h),a=[]})),o.hooks.processOptions.push((function(e,t){e.highlight=g,e.unhighlight=d,(t.grid.hoverable||t.grid.clickable)&&(e.hooks.drawOverlay.push(m),e.hooks.processDatapoints.push(f),e.hooks.setupGrid.push(b)),r=e.getPlaceholder()[0].lastMouseMoveEvent}))},options:{grid:{hoverable:!1,clickable:!1}},name:"hover",version:"0.1"})}(jQuery);
+!function(e){"use strict";var t=e.plot.browser,i={click:"click",hover:"hover"};e.plot.plugins.push({init:function(o){var r,a=[];function n(e){var t=o.getOptions(),r=new CustomEvent("mouseevent");return r.pageX=e.detail.changedTouches[0].pageX,r.pageY=e.detail.changedTouches[0].pageY,r.clientX=e.detail.changedTouches[0].clientX,r.clientY=e.detail.changedTouches[0].clientY,t.grid.hoverable&&s(r,i.hover,30),!1}function s(e,t,i){var r=o.getData();if(void 0!==e&&r.length>0&&void 0!==r[0].xaxis.c2p&&void 0!==r[0].yaxis.c2p){var a=t+"able";u("plot"+t,e,(function(e){return!1!==r[e][a]}),i)}}function l(e){r=e,o.getPlaceholder()[0].lastMouseMoveEvent=e,s(e,i.hover)}function c(e){r=void 0,o.getPlaceholder()[0].lastMouseMoveEvent=void 0,u("plothover",e,(function(e){return!1}))}function h(e){s(e,i.click)}function p(){o.unhighlight(),o.getPlaceholder().trigger("plothovercleanup")}function u(e,i,r,n){var s=o.getOptions(),l=o.offset(),c=t.getPageXY(i),h=c.X-l.left,p=c.Y-l.top,u=o.c2p({left:h,top:p}),v=void 0!==n?n:s.grid.mouseActiveRadius;u.pageX=c.X,u.pageY=c.Y;var f=o.findNearbyItems(h,p,r,v),b=f[0];for(let e=1;e<f.length;++e)(void 0===b.distance||f[e].distance<b.distance)&&(b=f[e]);if(b?(b.pageX=parseInt(b.series.xaxis.p2c(b.datapoint[0])+l.left,10),b.pageY=parseInt(b.series.yaxis.p2c(b.datapoint[1])+l.top,10)):b=null,s.grid.autoHighlight){for(let t=0;t<a.length;++t){var m=a[t];(m.auto!==e||b&&m.series===b.series&&m.point[0]===b.datapoint[0]&&m.point[1]===b.datapoint[1])&&b||g(m.series,m.point)}b&&d(b.series,b.datapoint,e)}o.getPlaceholder().trigger(e,[u,b,f])}function d(e,t,i){if("number"==typeof e&&(e=o.getData()[e]),"number"==typeof t){var r=e.datapoints.pointsize;t=e.datapoints.points.slice(r*t,r*(t+1))}var n=v(e,t);-1===n?(a.push({series:e,point:t,auto:i}),o.triggerRedrawOverlay()):i||(a[n].auto=!1)}function g(e,t){if(null==e&&null==t)return a=[],void o.triggerRedrawOverlay();if("number"==typeof e&&(e=o.getData()[e]),"number"==typeof t){var i=e.datapoints.pointsize;t=e.datapoints.points.slice(i*t,i*(t+1))}var r=v(e,t);-1!==r&&(a.splice(r,1),o.triggerRedrawOverlay())}function v(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}function f(){p(),s(r,i.hover)}function b(){s(r,i.hover)}function m(e,t,i){var o,r,n=e.getPlotOffset();for(t.save(),t.translate(n.left,n.top),o=0;o<a.length;++o)(r=a[o]).series.bars.show?k(r.series,r.point,t):y(r.series,r.point,t,e);t.restore()}function y(t,i,o,r){var a=i[0],n=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||n<l.min||n>l.max)){var h=t.points.radius+t.points.lineWidth/2;o.lineWidth=h,o.strokeStyle=c;var p=1.5*h;a=s.p2c(a),n=l.p2c(n),o.beginPath();var u=t.points.symbol;"circle"===u?o.arc(a,n,p,0,2*Math.PI,!1):"string"==typeof u&&r.drawSymbol&&r.drawSymbol[u]&&r.drawSymbol[u](o,a,n,p,!1),o.closePath(),o.stroke()}}function k(t,i,o){var r,a="string"==typeof t.highlightColor?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString(),n=a,s=t.bars.barWidth[0]||t.bars.barWidth;switch(t.bars.align){case"left":r=0;break;case"right":r=-s;break;default:r=-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,r,r+s,(function(){return n}),t.xaxis,t.yaxis,o,t.bars.horizontal,t.bars.lineWidth)}o.hooks.bindEvents.push((function(e,t){var i=e.getOptions();(i.grid.hoverable||i.grid.clickable)&&(t[0].addEventListener("touchevent",p,!1),t[0].addEventListener("tap",n,!1)),i.grid.clickable&&t.bind("click",h),i.grid.hoverable&&(t.bind("mousemove",l),t.bind("mouseleave",c))})),o.hooks.shutdown.push((function(e,t){t[0].removeEventListener("tap",n),t[0].removeEventListener("touchevent",p),t.unbind("mousemove",l),t.unbind("mouseleave",c),t.unbind("click",h),a=[]})),o.hooks.processOptions.push((function(e,t){e.highlight=d,e.unhighlight=g,(t.grid.hoverable||t.grid.clickable)&&(e.hooks.drawOverlay.push(m),e.hooks.processDatapoints.push(f),e.hooks.setupGrid.push(b)),r=e.getPlaceholder()[0].lastMouseMoveEvent}))},options:{grid:{hoverable:!1,clickable:!1}},name:"hover",version:"0.1"})}(jQuery);
--- a/src/myams/resources/js/ext/flot/jquery.flot.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.js	Fri Dec 11 11:45:23 2020 +0100
@@ -234,6 +234,7 @@
                 drawSeries: [],
                 drawAxis: [],
                 draw: [],
+                findNearbyItems: [],
                 axisReserveSpace: [],
                 bindEvents: [],
                 drawOverlay: [],
@@ -345,6 +346,7 @@
         plot.computeRangeForDataSeries = computeRangeForDataSeries;
         plot.adjustSeriesDataRange = adjustSeriesDataRange;
         plot.findNearbyItem = findNearbyItem;
+        plot.findNearbyItems = findNearbyItems;
         plot.findNearbyInterpolationPoint = findNearbyInterpolationPoint;
         plot.computeValuePrecision = computeValuePrecision;
         plot.computeTickSize = computeTickSize;
@@ -845,8 +847,6 @@
                 ps = s.datapoints.pointsize;
                 points = s.datapoints.points;
 
-                var insertSteps = s.lines.show && s.lines.steps;
-
                 for (j = k = 0; j < data.length; ++j, k += ps) {
                     p = data[j];
 
@@ -978,8 +978,8 @@
             var eventList = eventManager[key] || [];
 
             eventList.push({"event": event, "handler": handler, "eventHolder": eventHolder, "priority": priority});
-            eventList.sort((a, b) => b.priority - a.priority );
-            eventList.forEach( eventData => {
+            eventList.sort((a, b) => b.priority - a.priority);
+            eventList.forEach(eventData => {
                 eventData.eventHolder.unbind(eventData.event, eventData.handler);
                 eventData.eventHolder.bind(eventData.event, eventData.handler);
             });
@@ -1761,7 +1761,7 @@
             }
             if (axis.options.showTickLabels === 'all') {
                 var associatedSeries = series.filter(function(s) {
-                        return s.xaxis === axis;
+                        return s.bars.horizontal ? s.yaxis === axis : s.xaxis === axis;
                     }),
                     notAllBarSeries = associatedSeries.some(function(s) {
                         return !s.bars.show;
@@ -2435,8 +2435,7 @@
                 if (series.bars.horizontal) {
                     range.ymin += delta;
                     range.ymax += delta + barWidth;
-                }
-                else {
+                } else {
                     range.xmin += delta;
                     range.xmax += delta + barWidth;
                 }
@@ -2465,7 +2464,7 @@
             }
 
             var start = series.bars.horizontal ? 1 : 0;
-            for (var j = start; j < series.datapoints.points.length; j += pointsize) {
+            for (let j = start; j < series.datapoints.points.length; j += pointsize) {
                 if (isFinite(series.datapoints.points[j]) && series.datapoints.points[j] !== null) {
                     xValues.push(series.datapoints.points[j]);
                 }
@@ -2475,10 +2474,10 @@
                 return self.indexOf(value) === index;
             }
 
-            xValues = xValues.filter( onlyUnique );
-            xValues.sort(function(a, b){return a - b});
-
-            for (var j = 1; j < xValues.length; j++) {
+            xValues = xValues.filter(onlyUnique);
+            xValues.sort(function(a, b) { return a - b });
+
+            for (let j = 1; j < xValues.length; j++) {
                 var distance = Math.abs(xValues[j] - xValues[j - 1]);
                 if (distance < minDistance && isFinite(distance)) {
                     minDistance = distance;
@@ -2492,55 +2491,85 @@
             }
         }
 
-        // returns the data item the mouse is over/ the cursor is closest to, or null if none is found
+        function findNearbyItems(mouseX, mouseY, seriesFilter, radius, computeDistance) {
+            var items = findItems(mouseX, mouseY, seriesFilter, radius, computeDistance);
+            for (var i = 0; i < series.length; ++i) {
+                if (seriesFilter(i)) {
+                    executeHooks(hooks.findNearbyItems, [mouseX, mouseY, series, i, radius, computeDistance, items]);
+                }
+            }
+
+            return items.sort((a, b) => {
+                if (b.distance === undefined) {
+                    return -1;
+                } else if (a.distance === undefined && b.distance !== undefined) {
+                    return 1;
+                }
+
+                return a.distance - b.distance;
+            });
+        }
+
         function findNearbyItem(mouseX, mouseY, seriesFilter, radius, computeDistance) {
-            var i, j,
-                item = null,
+            var items = findNearbyItems(mouseX, mouseY, seriesFilter, radius, computeDistance);
+            return items[0] !== undefined ? items[0] : null;
+        }
+
+        // returns the data item the mouse is over/ the cursor is closest to, or null if none is found
+        function findItems(mouseX, mouseY, seriesFilter, radius, computeDistance) {
+            var i, foundItems = [],
+                items = [],
                 smallestDistance = radius * radius + 1;
 
-            for (var i = series.length - 1; i >= 0; --i) {
+            for (i = series.length - 1; i >= 0; --i) {
                 if (!seriesFilter(i)) continue;
 
                 var s = series[i];
                 if (!s.datapoints) return;
 
+                var foundPoint = false;
                 if (s.lines.show || s.points.show) {
-                    var found = findNearbyPoint(s, mouseX, mouseY, radius, smallestDistance, computeDistance);
+                    var found = findNearbyPoint(s, mouseX, mouseY, radius, computeDistance);
                     if (found) {
-                        smallestDistance = found.distance;
-                        item = [i, found.dataIndex];
+                        items.push({ seriesIndex: i, dataIndex: found.dataIndex, distance: found.distance });
+                        foundPoint = true;
                     }
                 }
 
-                if (s.bars.show && !item) { // no other point can be nearby
+                if (s.bars.show && !foundPoint) { // no other point can be nearby
                     var foundIndex = findNearbyBar(s, mouseX, mouseY);
-                    if (foundIndex >= 0) item = [i, foundIndex];
+                    if (foundIndex >= 0) {
+                        items.push({ seriesIndex: i, dataIndex: foundIndex, distance: smallestDistance });
+                    }
                 }
             }
 
-            if (item) {
-                i = item[0];
-                j = item[1];
-                var ps = series[i].datapoints.pointsize;
-
-                return {
-                    datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps),
-                    dataIndex: j,
-                    series: series[i],
-                    seriesIndex: i
-                };
+            for (i = 0; i < items.length; i++) {
+                var seriesIndex = items[i].seriesIndex;
+                var dataIndex = items[i].dataIndex;
+                var itemDistance = items[i].distance;
+                var ps = series[seriesIndex].datapoints.pointsize;
+
+                foundItems.push({
+                    datapoint: series[seriesIndex].datapoints.points.slice(dataIndex * ps, (dataIndex + 1) * ps),
+                    dataIndex: dataIndex,
+                    series: series[seriesIndex],
+                    seriesIndex: seriesIndex,
+                    distance: Math.sqrt(itemDistance)
+                });
             }
 
-            return null;
+            return foundItems;
         }
 
-        function findNearbyPoint (series, mouseX, mouseY, maxDistance, smallestDistance, computeDistance) {
+        function findNearbyPoint (series, mouseX, mouseY, maxDistance, computeDistance) {
             var mx = series.xaxis.c2p(mouseX),
                 my = series.yaxis.c2p(mouseY),
                 maxx = maxDistance / series.xaxis.scale,
                 maxy = maxDistance / series.yaxis.scale,
                 points = series.datapoints.points,
-                ps = series.datapoints.pointsize;
+                ps = series.datapoints.pointsize,
+                smallestDistance = Number.POSITIVE_INFINITY;
 
             // with inverse transforms, we can't use the maxx/maxy
             // optimization, sadly
@@ -2604,21 +2633,24 @@
             barRight = barLeft + barWidth;
 
             var fillTowards = series.bars.fillTowards || 0;
-            var bottom = fillTowards > series.yaxis.min ? Math.min(series.yaxis.max, fillTowards) : series.yaxis.min;
+            var defaultBottom = fillTowards > series.yaxis.min ? Math.min(series.yaxis.max, fillTowards) : series.yaxis.min;
 
             var foundIndex = -1;
             for (var j = 0; j < points.length; j += ps) {
                 var x = points[j], y = points[j + 1];
-                if (x == null)
+                if (x == null) {
                     continue;
-
+                }
+
+                var bottom = ps === 3 ? points[j + 2] : defaultBottom;
                 // for a bar graph, the cursor must be inside the bar
-                if (series.bars.horizontal ?
-                    (mx <= Math.max(bottom, x) && mx >= Math.min(bottom, x) &&
-                        my >= y + barLeft && my <= y + barRight) :
-                    (mx >= x + barLeft && mx <= x + barRight &&
-                        my >= Math.min(bottom, y) && my <= Math.max(bottom, y)))
-                        foundIndex = j / ps;
+                if (series.bars.horizontal
+                    ? (mx <= Math.max(bottom, x) && mx >= Math.min(bottom, x) &&
+                        my >= y + barLeft && my <= y + barRight)
+                    : (mx >= x + barLeft && mx <= x + barRight &&
+                        my >= Math.min(bottom, y) && my <= Math.max(bottom, y))) {
+                    foundIndex = j / ps;
+                }
             }
 
             return foundIndex;
--- a/src/myams/resources/js/ext/flot/jquery.flot.legend.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.legend.js	Fri Dec 11 11:45:23 2020 +0100
@@ -52,7 +52,7 @@
         var columnWidths = [];
         var style = window.getComputedStyle(document.querySelector('body'));
         for (i = 0; i < entries.length; ++i) {
-            var columnIndex = i % options.legend.noColumns;
+            let columnIndex = i % options.legend.noColumns;
             entry = entries[i];
             shape.label = entry.label;
             var info = plot.getSurface().getTextInfo('', shape.label, {
@@ -78,7 +78,7 @@
 
         // Generate html for icons and labels from a list of entries
         for (i = 0; i < entries.length; ++i) {
-            var columnIndex = i % options.legend.noColumns;
+            let columnIndex = i % options.legend.noColumns;
             entry = entries[i];
             iconHtml = '';
             shape.label = entry.label;
@@ -95,26 +95,32 @@
                 iconHtml += getEntryIconHtml(shape);
             }
             // bars
-            if (entry.options.bars.show) {
+            else if (entry.options.bars.show) {
                 shape.name = 'bar';
                 shape.fillColor = entry.color;
                 iconHtml += getEntryIconHtml(shape);
             }
             // lines
-            if (entry.options.lines.show && !entry.options.lines.fill) {
+            else if (entry.options.lines.show && !entry.options.lines.fill) {
                 shape.name = 'line';
                 shape.strokeColor = entry.color;
                 shape.strokeWidth = entry.options.lines.lineWidth;
                 iconHtml += getEntryIconHtml(shape);
             }
             // points
-            if (entry.options.points.show) {
+            else if (entry.options.points.show) {
                 shape.name = entry.options.points.symbol;
                 shape.strokeColor = entry.color;
                 shape.fillColor = entry.options.points.fillColor;
                 shape.strokeWidth = entry.options.points.lineWidth;
                 iconHtml += getEntryIconHtml(shape);
             }
+            // default
+            else {
+                shape.name = 'pie';
+                shape.fillColor = entry.color;
+                iconHtml += getEntryIconHtml(shape);
+            }
 
             labelHtml = '<text x="' + shape.xPos + '" y="' + shape.yPos + '" text-anchor="start"><tspan dx="2em" dy="1.2em">' + shape.label + '</tspan></text>'
             html[j++] = '<g>' + iconHtml + labelHtml + '</g>';
@@ -176,6 +182,16 @@
                     'width="1.5em" height="1.5em"' +
                     '/>';
                 break;
+            case 'pie':
+                html = '<use xlink:href="#pie" class="legendIcon" ' +
+                    'x="' + x + '" ' +
+                    'y="' + y + '" ' +
+                    'fill="' + fill + '" ' +
+                    'stroke="' + stroke + '" ' +
+                    'stroke-width="' + width + '" ' +
+                    'width="1.5em" height="1.5em"' +
+                    '/>';
+                break;
             case 'diamond':
                 html = '<use xlink:href="#diamond" class="legendIcon" ' +
                     'x="' + x + '" ' +
@@ -276,6 +292,10 @@
                 '<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="pie" viewBox="-5 -5 25 25">' +
+                '<circle cx="10" cy="10" r="10"/>' +
+            '</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"/>' +
--- a/src/myams/resources/js/ext/flot/jquery.flot.legend.min.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.legend.min.js	Fri Dec 11 11:45:23 2020 +0100
@@ -1,1 +1,1 @@
-!function(e){function t(e){var t="",o=e.name,l=e.xPos,n=e.yPos,i=e.fillColor,s=e.strokeColor,r=e.strokeWidth;switch(o){case"circle":t='<use xlink:href="#circle" class="legendIcon" x="'+l+'" y="'+n+'" fill="'+i+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>';break;case"diamond":t='<use xlink:href="#diamond" class="legendIcon" x="'+l+'" y="'+n+'" fill="'+i+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>';break;case"cross":t='<use xlink:href="#cross" class="legendIcon" x="'+l+'" y="'+n+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>';break;case"rectangle":t='<use xlink:href="#rectangle" class="legendIcon" x="'+l+'" y="'+n+'" fill="'+i+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>';break;case"plus":t='<use xlink:href="#plus" class="legendIcon" x="'+l+'" y="'+n+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>';break;case"bar":t='<use xlink:href="#bars" class="legendIcon" x="'+l+'" y="'+n+'" fill="'+i+'" width="1.5em" height="1.5em"/>';break;case"area":t='<use xlink:href="#area" class="legendIcon" x="'+l+'" y="'+n+'" fill="'+i+'" width="1.5em" height="1.5em"/>';break;case"line":t='<use xlink:href="#line" class="legendIcon" x="'+l+'" y="'+n+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>';break;default:t='<use xlink:href="#circle" class="legendIcon" x="'+l+'" y="'+n+'" fill="'+i+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>'}return t}var o='<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>';function l(e,t){for(var o in e)if(e.hasOwnProperty(o)&&e[o]!==t[o])return!0;return!1}e.plot.plugins.push({init:function(n){n.hooks.setupGrid.push((function(n){var i=n.getOptions(),s=n.getData(),r=i.legend.labelFormatter,a=i.legend.legendEntries,h=i.legend.plotOffset,d=function(t,o,l){var n=o,i=t.reduce((function(e,t,o){var l=n?n(t.label,t):t.label;if(!t.hasOwnProperty("label")||l){var i={label:l||"Plot "+(o+1),color:t.color,options:{lines:t.lines,points:t.points,bars:t.bars}};e.push(i)}return e}),[]);if(l)if(e.isFunction(l))i.sort(l);else if("reverse"===l)i.reverse();else{var s="descending"!==l;i.sort((function(e,t){return e.label===t.label?0:e.label<t.label!==s?1:-1}))}return i}(s,r,i.legend.sorted),c=n.getPlotOffset();(function(e,t){if(!e||!t)return!0;if(e.length!==t.length)return!0;var o,n,i;for(o=0;o<t.length;o++){if(n=t[o],i=e[o],n.label!==i.label)return!0;if(n.color!==i.color)return!0;if(l(n.options.lines,i.options.lines))return!0;if(l(n.options.points,i.options.points))return!0;if(l(n.options.bars,i.options.bars))return!0}return!1}(a,d)||l(h,c))&&function(l,n,i,s){if(null!=n.legend.container?e(n.legend.container).html(""):i.find(".legend").remove(),n.legend.show){var r,a,h,d,c=n.legend.legendEntries=s,g=n.legend.plotOffset=l.getPlotOffset(),p=[],f=0,m="",u=n.legend.position,b=n.legend.margin,y={name:"",label:"",xPos:"",yPos:""};p[f++]='<svg class="legendLayer" style="width:inherit;height:inherit;">',p[f++]='<rect class="background" width="100%" height="100%"/>',p[f++]=o;var x=0,w=[],k=window.getComputedStyle(document.querySelector("body"));for(d=0;d<c.length;++d){var v=d%n.legend.noColumns;r=c[d],y.label=r.label;var L=l.getSurface().getTextInfo("",y.label,{style:k.fontStyle,variant:k.fontVariant,weight:k.fontWeight,size:parseInt(k.fontSize),lineHeight:parseInt(k.lineHeight),family:k.fontFamily}).width;w[v]?L>w[v]&&(w[v]=L+48):w[v]=L+48}for(d=0;d<c.length;++d){v=d%n.legend.noColumns;r=c[d],h="",y.label=r.label,y.xPos=x+3+"px",x+=w[v],(d+1)%n.legend.noColumns==0&&(x=0),y.yPos=1.5*Math.floor(d/n.legend.noColumns)+"em",r.options.lines.show&&r.options.lines.fill&&(y.name="area",y.fillColor=r.color,h+=t(y)),r.options.bars.show&&(y.name="bar",y.fillColor=r.color,h+=t(y)),r.options.lines.show&&!r.options.lines.fill&&(y.name="line",y.strokeColor=r.color,y.strokeWidth=r.options.lines.lineWidth,h+=t(y)),r.options.points.show&&(y.name=r.options.points.symbol,y.strokeColor=r.color,y.fillColor=r.options.points.fillColor,y.strokeWidth=r.options.points.lineWidth,h+=t(y)),a='<text x="'+y.xPos+'" y="'+y.yPos+'" text-anchor="start"><tspan dx="2em" dy="1.2em">'+y.label+"</tspan></text>",p[f++]="<g>"+h+a+"</g>"}p[f++]="</svg>",null==b[0]&&(b=[b,b]),"n"===u.charAt(0)?m+="top:"+(b[1]+g.top)+"px;":"s"===u.charAt(0)&&(m+="bottom:"+(b[1]+g.bottom)+"px;"),"e"===u.charAt(1)?m+="right:"+(b[0]+g.right)+"px;":"w"===u.charAt(1)&&(m+="left:"+(b[0]+g.left)+"px;");var M=6;for(d=0;d<w.length;++d)M+=w[d];var C,P=1.6*Math.ceil(c.length/n.legend.noColumns);n.legend.container?(C=e(p.join("")).appendTo(n.legend.container)[0],n.legend.container.style.width=M+"px",n.legend.container.style.height=P+"em"):((C=e('<div class="legend" style="position:absolute;'+m+'">'+p.join("")+"</div>").appendTo(i)).css("width",M+"px"),C.css("height",P+"em"),C.css("pointerEvents","none"))}}(n,i,n.getPlaceholder(),d)}))},options:{legend:{show:!1,noColumns:1,labelFormatter:null,container:null,position:"ne",margin:5,sorted:null}},name:"legend",version:"1.0"})}(jQuery);
+!function(e){function l(e){var l="",t=e.name,o=e.xPos,n=e.yPos,i=e.fillColor,s=e.strokeColor,r=e.strokeWidth;switch(t){case"circle":l='<use xlink:href="#circle" class="legendIcon" x="'+o+'" y="'+n+'" fill="'+i+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>';break;case"pie":l='<use xlink:href="#pie" class="legendIcon" x="'+o+'" y="'+n+'" fill="'+i+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>';break;case"diamond":l='<use xlink:href="#diamond" class="legendIcon" x="'+o+'" y="'+n+'" fill="'+i+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>';break;case"cross":l='<use xlink:href="#cross" class="legendIcon" x="'+o+'" y="'+n+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>';break;case"rectangle":l='<use xlink:href="#rectangle" class="legendIcon" x="'+o+'" y="'+n+'" fill="'+i+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>';break;case"plus":l='<use xlink:href="#plus" class="legendIcon" x="'+o+'" y="'+n+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>';break;case"bar":l='<use xlink:href="#bars" class="legendIcon" x="'+o+'" y="'+n+'" fill="'+i+'" width="1.5em" height="1.5em"/>';break;case"area":l='<use xlink:href="#area" class="legendIcon" x="'+o+'" y="'+n+'" fill="'+i+'" width="1.5em" height="1.5em"/>';break;case"line":l='<use xlink:href="#line" class="legendIcon" x="'+o+'" y="'+n+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>';break;default:l='<use xlink:href="#circle" class="legendIcon" x="'+o+'" y="'+n+'" fill="'+i+'" stroke="'+s+'" stroke-width="'+r+'" width="1.5em" height="1.5em"/>'}return l}var t='<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="pie" viewBox="-5 -5 25 25"><circle cx="10" cy="10" r="10"/></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>';function o(e,l){for(var t in e)if(e.hasOwnProperty(t)&&e[t]!==l[t])return!0;return!1}e.plot.plugins.push({init:function(n){n.hooks.setupGrid.push((function(n){var i=n.getOptions(),s=n.getData(),r=i.legend.labelFormatter,a=i.legend.legendEntries,h=i.legend.plotOffset,d=function(l,t,o){var n=t,i=l.reduce((function(e,l,t){var o=n?n(l.label,l):l.label;if(!l.hasOwnProperty("label")||o){var i={label:o||"Plot "+(t+1),color:l.color,options:{lines:l.lines,points:l.points,bars:l.bars}};e.push(i)}return e}),[]);if(o)if(e.isFunction(o))i.sort(o);else if("reverse"===o)i.reverse();else{var s="descending"!==o;i.sort((function(e,l){return e.label===l.label?0:e.label<l.label!==s?1:-1}))}return i}(s,r,i.legend.sorted),c=n.getPlotOffset();(function(e,l){if(!e||!l)return!0;if(e.length!==l.length)return!0;var t,n,i;for(t=0;t<l.length;t++){if(n=l[t],i=e[t],n.label!==i.label)return!0;if(n.color!==i.color)return!0;if(o(n.options.lines,i.options.lines))return!0;if(o(n.options.points,i.options.points))return!0;if(o(n.options.bars,i.options.bars))return!0}return!1}(a,d)||o(h,c))&&function(o,n,i,s){if(null!=n.legend.container?e(n.legend.container).html(""):i.find(".legend").remove(),n.legend.show){var r,a,h,d,c=n.legend.legendEntries=s,g=n.legend.plotOffset=o.getPlotOffset(),p=[],f=0,m="",u=n.legend.position,y=n.legend.margin,b={name:"",label:"",xPos:"",yPos:""};p[f++]='<svg class="legendLayer" style="width:inherit;height:inherit;">',p[f++]='<rect class="background" width="100%" height="100%"/>',p[f++]=t;var x=0,w=[],k=window.getComputedStyle(document.querySelector("body"));for(d=0;d<c.length;++d){let e=d%n.legend.noColumns;r=c[d],b.label=r.label;var v=o.getSurface().getTextInfo("",b.label,{style:k.fontStyle,variant:k.fontVariant,weight:k.fontWeight,size:parseInt(k.fontSize),lineHeight:parseInt(k.lineHeight),family:k.fontFamily}).width;w[e]?v>w[e]&&(w[e]=v+48):w[e]=v+48}for(d=0;d<c.length;++d){let e=d%n.legend.noColumns;r=c[d],h="",b.label=r.label,b.xPos=x+3+"px",x+=w[e],(d+1)%n.legend.noColumns==0&&(x=0),b.yPos=1.5*Math.floor(d/n.legend.noColumns)+"em",r.options.lines.show&&r.options.lines.fill?(b.name="area",b.fillColor=r.color,h+=l(b)):r.options.bars.show?(b.name="bar",b.fillColor=r.color,h+=l(b)):r.options.lines.show&&!r.options.lines.fill?(b.name="line",b.strokeColor=r.color,b.strokeWidth=r.options.lines.lineWidth,h+=l(b)):r.options.points.show?(b.name=r.options.points.symbol,b.strokeColor=r.color,b.fillColor=r.options.points.fillColor,b.strokeWidth=r.options.points.lineWidth,h+=l(b)):(b.name="pie",b.fillColor=r.color,h+=l(b)),a='<text x="'+b.xPos+'" y="'+b.yPos+'" text-anchor="start"><tspan dx="2em" dy="1.2em">'+b.label+"</tspan></text>",p[f++]="<g>"+h+a+"</g>"}p[f++]="</svg>",null==y[0]&&(y=[y,y]),"n"===u.charAt(0)?m+="top:"+(y[1]+g.top)+"px;":"s"===u.charAt(0)&&(m+="bottom:"+(y[1]+g.bottom)+"px;"),"e"===u.charAt(1)?m+="right:"+(y[0]+g.right)+"px;":"w"===u.charAt(1)&&(m+="left:"+(y[0]+g.left)+"px;");var L=6;for(d=0;d<w.length;++d)L+=w[d];var M,C=1.6*Math.ceil(c.length/n.legend.noColumns);n.legend.container?(M=e(p.join("")).appendTo(n.legend.container)[0],n.legend.container.style.width=L+"px",n.legend.container.style.height=C+"em"):((M=e('<div class="legend" style="position:absolute;'+m+'">'+p.join("")+"</div>").appendTo(i)).css("width",L+"px"),M.css("height",C+"em"),M.css("pointerEvents","none"))}}(n,i,n.getPlaceholder(),d)}))},options:{legend:{show:!1,noColumns:1,labelFormatter:null,container:null,position:"ne",margin:5,sorted:null}},name:"legend",version:"1.0"})}(jQuery);
--- a/src/myams/resources/js/ext/flot/jquery.flot.logaxis.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.logaxis.js	Fri Dec 11 11:45:23 2020 +0100
@@ -249,9 +249,9 @@
                 .map(function(series) {
                     return plot.computeRangeForDataSeries(series, null, isValid);
                 }),
-            min = axis.direction === 'x' 
-            ? Math.min(0.1, range && range[0] ? range[0].xmin : 0.1) 
-            : Math.min(0.1, range && range[0] ? range[0].ymin : 0.1);
+            min = axis.direction === 'x'
+                ? Math.min(0.1, range && range[0] ? range[0].xmin : 0.1)
+                : Math.min(0.1, range && range[0] ? range[0].ymin : 0.1);
 
         axis.min = min;
 
--- a/src/myams/resources/js/ext/flot/jquery.flot.min.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.min.js	Fri Dec 11 11:45:23 2020 +0100
@@ -1,1 +1,1 @@
-!function(t){"use strict";var i=window.Flot.Canvas;function o(i){var o,n=[],e=t.plot.saturated.saturate(t.plot.saturated.floorInBase(i.min,i.tickSize)),a=0,r=Number.NaN;e===-Number.MAX_VALUE&&(n.push(e),e=t.plot.saturated.floorInBase(i.min+i.tickSize,i.tickSize));do{o=r,r=t.plot.saturated.multiplyAdd(i.tickSize,a,e),n.push(r),++a}while(r<i.max&&r!==o);return n}function n(t,i,o){var n=i.tickDecimals;if(-1!==(""+t).indexOf("e"))return e(t,i,o);o>0&&(i.tickDecimals=o);var a=i.tickDecimals?parseFloat("1e"+i.tickDecimals):1,r=""+Math.round(t*a)/a;if(null!=i.tickDecimals){var l=r.indexOf("."),s=-1===l?0:r.length-l-1;if(s<i.tickDecimals)r=(s?r:r+".")+(""+a).substr(1,i.tickDecimals-s)}return i.tickDecimals=n,r}function e(t,i,o){var n=(""+t).indexOf("e"),e=parseInt((""+t).substr(n+1)),r=-1!==n?e:t>0?Math.floor(Math.log(t)/Math.LN10):0,l=parseFloat("1e"+r),s=t/l;if(o){var c=a(t,o);return(t/l).toFixed(c)+"e"+r}return i.tickDecimals>0?s.toFixed(a(t,i.tickDecimals))+"e"+r:s.toFixed()+"e"+r}function a(t,i){var o=Math.log(Math.abs(t))*Math.LOG10E,n=Math.abs(o+i);return n<=20?Math.floor(n):20}function r(e,a,r,l){var s=[],c={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:{}},u=null,f=null,h=null,d=null,p=null,m=[],x=[],g={left:0,right:0,top:0,bottom:0},b=0,v=0,k={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],setupGrid:[],adjustSeriesDataRange:[],setRange:[],drawBackground:[],drawSeries:[],drawAxis:[],draw:[],axisReserveSpace:[],bindEvents:[],drawOverlay:[],resize:[],shutdown:[]},y=this,w={},M=null;y.setData=W,y.setupGrid=P,y.draw=G,y.getPlaceholder=function(){return e},y.getCanvas=function(){return u.element},y.getSurface=function(){return u},y.getEventHolder=function(){return h[0]},y.getPlotOffset=function(){return g},y.width=function(){return b},y.height=function(){return v},y.offset=function(){var t=h.offset();return t.left+=g.left,t.top+=g.top,t},y.getData=function(){return s},y.getAxes=function(){var i={};return t.each(m.concat(x),(function(t,o){o&&(i[o.direction+(1!==o.n?o.n:"")+"axis"]=o)})),i},y.getXAxes=function(){return m},y.getYAxes=function(){return x},y.c2p=function(t){var i,o,n={};for(i=0;i<m.length;++i)(o=m[i])&&o.used&&(n["x"+o.n]=o.c2p(t.left));for(i=0;i<x.length;++i)(o=x[i])&&o.used&&(n["y"+o.n]=o.c2p(t.top));void 0!==n.x1&&(n.x=n.x1);void 0!==n.y1&&(n.y=n.y1);return n},y.p2c=function(t){var i,o,n,e={};for(i=0;i<m.length;++i)if((o=m[i])&&o.used&&(n="x"+o.n,null==t[n]&&1===o.n&&(n="x"),null!=t[n])){e.left=o.p2c(t[n]);break}for(i=0;i<x.length;++i)if((o=x[i])&&o.used&&(n="y"+o.n,null==t[n]&&1===o.n&&(n="y"),null!=t[n])){e.top=o.p2c(t[n]);break}return e},y.getOptions=function(){return c},y.triggerRedrawOverlay=J,y.pointOffset=function(t){return{left:parseInt(m[C(t,"x")-1].p2c(+t.x)+g.left,10),top:parseInt(x[C(t,"y")-1].p2c(+t.y)+g.top,10)}},y.shutdown=L,y.destroy=function(){L(),e.removeData("plot").empty(),s=[],c=null,u=null,f=null,h=null,d=null,p=null,m=[],x=[],k=null,y=null},y.resize=function(){var t=e.width(),i=e.height();u.resize(t,i),f.resize(t,i),N(k.resize,[t,i])},y.clearTextCache=function(){u.clearCache(),f.clearCache()},y.autoScaleAxis=O,y.computeRangeForDataSeries=function(t,i,o){for(var n=t.datapoints.points,e=t.datapoints.pointsize,a=t.datapoints.format,r=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,s={xmin:r,ymin:r,xmax:l,ymax:l},c=0;c<n.length;c+=e)if(null!==n[c]&&("function"!=typeof o||o(n[c])))for(var u=0;u<e;++u){var f=n[c+u],h=a[u];null!=h&&(("function"!=typeof o||o(f))&&(i||h.computeRange)&&f!==1/0&&f!==-1/0&&(!0===h.x&&(f<s.xmin&&(s.xmin=f),f>s.xmax&&(s.xmax=f)),!0===h.y&&(f<s.ymin&&(s.ymin=f),f>s.ymax&&(s.ymax=f))))}return s},y.adjustSeriesDataRange=function(t,i){if(t.bars.show){var o,n=t.bars.barWidth[1];t.datapoints&&t.datapoints.points&&!n&&function(t){var i=[],o=t.datapoints.pointsize,n=Number.MAX_VALUE;t.datapoints.points.length<=o&&(n=1);for(var e=t.bars.horizontal?1:0;e<t.datapoints.points.length;e+=o)isFinite(t.datapoints.points[e])&&null!==t.datapoints.points[e]&&i.push(t.datapoints.points[e]);(i=i.filter((function(t,i,o){return o.indexOf(t)===i}))).sort((function(t,i){return t-i}));for(e=1;e<i.length;e++){var a=Math.abs(i[e]-i[e-1]);a<n&&isFinite(a)&&(n=a)}"number"==typeof t.bars.barWidth?t.bars.barWidth=t.bars.barWidth*n:t.bars.barWidth[0]=t.bars.barWidth[0]*n}(t);var e=t.bars.barWidth[0]||t.bars.barWidth;switch(t.bars.align){case"left":o=0;break;case"right":o=-e;break;default:o=-e/2}t.bars.horizontal?(i.ymin+=o,i.ymax+=o+e):(i.xmin+=o,i.xmax+=o+e)}if(t.bars.show&&t.bars.zero||t.lines.show&&t.lines.zero){t.datapoints.pointsize<=2&&(i.ymin=Math.min(0,i.ymin),i.ymax=Math.max(0,i.ymax))}return i},y.findNearbyItem=function(t,i,o,n,e){for(var a,r=null,l=n*n+1,c=s.length-1;c>=0;--c)if(o(c)){var u=s[c];if(!u.datapoints)return;if(u.lines.show||u.points.show){var f=Q(u,t,i,n,l,e);f&&(l=f.distance,r=[c,f.dataIndex])}if(u.bars.show&&!r){var h=$(u,t,i);h>=0&&(r=[c,h])}}if(r){c=r[0],a=r[1];var d=s[c].datapoints.pointsize;return{datapoint:s[c].datapoints.points.slice(a*d,(a+1)*d),dataIndex:a,series:s[c],seriesIndex:c}}return null},y.findNearbyInterpolationPoint=function(t,i,o){var n,e,a,r,l,c,u,f=Number.MAX_VALUE;for(n=0;n<s.length;++n){if(!o(n))continue;var h=s[n].datapoints.points;c=s[n].datapoints.pointsize;const g=h[h.length-c]<h[0]?function(t,i){return t>i}:function(t,i){return i>t};if(!g(t,h[0])){for(e=c;e<h.length&&!g(t,h[e]);e+=c);var d=h[e-c],p=h[e-c+1],m=h[e],x=h[e+1];void 0!==d&&void 0!==m&&void 0!==p&&void 0!==x&&(i=d===m?x:p+(x-p)*(t-d)/(m-d),r=Math.abs(s[n].xaxis.p2c(m)-t),l=Math.abs(s[n].yaxis.p2c(x)-i),(a=r*r+l*l)<f&&(f=a,u=[t,i,n,e]))}}if(u)return n=u[2],e=u[3],c=s[n].datapoints.pointsize,h=s[n].datapoints.points,d=h[e-c],p=h[e-c+1],m=h[e],x=h[e+1],{datapoint:[u[0],u[1]],leftPoint:[d,p],rightPoint:[m,x],seriesIndex:n};return null},y.computeValuePrecision=R,y.computeTickSize=j,y.addEventHandler=function(t,i,o,n){var e=o+t,a=w[e]||[];a.push({event:t,handler:i,eventHolder:o,priority:n}),a.sort((t,i)=>i.priority-t.priority),a.forEach(t=>{t.eventHolder.unbind(t.event,t.handler),t.eventHolder.bind(t.event,t.handler)}),w[e]=a},y.hooks=k;var S=t.plot.uiConstants.MINOR_TICKS_COUNT_CONSTANT,T=t.plot.uiConstants.TICK_LENGTH_CONSTANT;function N(t,i){i=[y].concat(i);for(var o=0;o<t.length;++o)t[o].apply(this,i)}function W(i){var o=s;s=function(i){for(var o=[],n=0;n<i.length;++n){var e=t.extend(!0,{},c.series);null!=i[n].data?(e.data=i[n].data,delete i[n].data,t.extend(!0,e,i[n]),i[n].data=e.data):e.data=i[n],o.push(e)}return o}(i),function(){var i,o=s.length,n=-1;for(i=0;i<s.length;++i){var e=s[i].color;null!=e&&(o--,"number"==typeof e&&e>n&&(n=e))}o<=n&&(o=n+1);var a,r=[],l=c.colors,u=l.length,f=0,h=Math.max(0,s.length-o);for(i=0;i<o;i++)a=t.color.parse(l[(h+i)%u]||"#666"),i%u==0&&i&&(f=f>=0?f<.5?-f-.2:0:-f),r[i]=a.scale("rgb",1+f);var d,p=0;for(i=0;i<s.length;++i){if(null==(d=s[i]).color?(d.color=r[p].toString(),++p):"number"==typeof d.color&&(d.color=r[d.color].toString()),null==d.lines.show){var g,b=!0;for(g in d)if(d[g]&&d[g].show){b=!1;break}b&&(d.lines.show=!0)}null==d.lines.zero&&(d.lines.zero=!!d.lines.fill),d.xaxis=I(m,C(d,"x")),d.yaxis=I(x,C(d,"y"))}}(),function(i){var o,n,e,a,r,l,c,u,f,h,d,p,m=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;function g(t,i,o){i<t.datamin&&i!==-1/0&&(t.datamin=i),o>t.datamax&&o!==1/0&&(t.datamax=o)}function b(t,i){return t&&t[i]&&t[i].datapoints&&t[i].datapoints.points?t[i].datapoints.points:[]}for(t.each(z(),(function(t,i){!0!==i.options.growOnly?(i.datamin=m,i.datamax=x):(void 0===i.datamin&&(i.datamin=m),void 0===i.datamax&&(i.datamax=x)),i.used=!1})),o=0;o<s.length;++o)(r=s[o]).datapoints={points:[]},0===r.datapoints.points.length&&(r.datapoints.points=b(i,o)),N(k.processRawData,[r,r.data,r.datapoints]);for(o=0;o<s.length;++o){if(r=s[o],d=r.data,!(p=r.datapoints.format)){if((p=[]).push({x:!0,y:!1,number:!0,required:!0,computeRange:"none"!==r.xaxis.options.autoScale,defaultValue:null}),p.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)(null!=r.datapoints.pointsize?r.datapoints.pointsize:r.data&&r.data[0]&&r.data[0].length?r.data[0].length:3)>2&&p.push({x:!1,y:!0,number:!0,required:!1,computeRange:"none"!==r.yaxis.options.autoScale,defaultValue:0});r.datapoints.format=p}if(r.xaxis.used=r.yaxis.used=!0,null==r.datapoints.pointsize){r.datapoints.pointsize=p.length,c=r.datapoints.pointsize,l=r.datapoints.points;r.lines.show&&r.lines.steps;for(n=e=0;n<d.length;++n,e+=c){var v=null==(h=d[n]);if(!v)for(a=0;a<c;++a)u=h[a],(f=p[a])&&(f.number&&null!=u&&(u=+u,isNaN(u)&&(u=null)),null==u&&(f.required&&(v=!0),null!=f.defaultValue&&(u=f.defaultValue))),l[e+a]=u;if(v)for(a=0;a<c;++a)null!=(u=l[e+a])&&(f=p[a]).computeRange&&(f.x&&g(r.xaxis,u,u),f.y&&g(r.yaxis,u,u)),l[e+a]=null}l.length=e}}for(o=0;o<s.length;++o)r=s[o],N(k.processDatapoints,[r,r.datapoints]);for(o=0;o<s.length;++o)if(r=s[o],!(p=r.datapoints.format).every((function(t){return!t.computeRange}))){var w=y.adjustSeriesDataRange(r,y.computeRangeForDataSeries(r));N(k.adjustSeriesDataRange,[r,w]),g(r.xaxis,w.xmin,w.xmax),g(r.yaxis,w.ymin,w.ymax)}t.each(z(),(function(t,i){i.datamin===m&&(i.datamin=null),i.datamax===x&&(i.datamax=null)}))}(o)}function C(t,i){var o=t[i+"axis"];return"object"==typeof o&&(o=o.n),"number"!=typeof o&&(o=1),o}function z(){return m.concat(x).filter((function(t){return t}))}function I(i,o){return i[o-1]||(i[o-1]={n:o,direction:i===m?"x":"y",options:t.extend(!0,{},i===m?c.xaxis:c.yaxis)}),i[o-1]}function L(){M&&clearTimeout(M),N(k.shutdown,[h])}function D(i){function o(t){return t}var n,e,a=i.options.transform||o,r=i.options.inverseTransform;"x"===i.direction?(n=isFinite(a(i.max)-a(i.min))?i.scale=b/Math.abs(a(i.max)-a(i.min)):i.scale=1/Math.abs(t.plot.saturated.delta(a(i.min),a(i.max),b)),e=Math.min(a(i.max),a(i.min))):(n=-(n=isFinite(a(i.max)-a(i.min))?i.scale=v/Math.abs(a(i.max)-a(i.min)):i.scale=1/Math.abs(t.plot.saturated.delta(a(i.min),a(i.max),v))),e=Math.max(a(i.max),a(i.min))),i.p2c=a===o?function(t){return isFinite(t-e)?(t-e)*n:(t/4-e/4)*n*4}:function(t){var i=a(t);return isFinite(i-e)?(i-e)*n:(i/4-e/4)*n*4},i.c2p=r?function(t){return r(e+t/n)}:function(t){return e+t/n}}function F(i){N(k.axisReserveSpace,[i]);var o=i.labelWidth,n=i.labelHeight,e=i.options.position,a="x"===i.direction,r=i.options.tickLength,l=i.options.showTicks,s=i.options.showMinorTicks,f=i.options.gridLines,h=c.grid.axisMargin,d=c.grid.labelMargin,p=!0,b=!0,v=!1;t.each(a?m:x,(function(t,o){o&&(o.show||o.reserveSpace)&&(o===i?v=!0:o.options.position===e&&(v?b=!1:p=!1))})),b&&(h=0),null==r&&(r=T),null==l&&(l=!0),null==s&&(s=!0),null==f&&(f=!!p),isNaN(+r)||(d+=l?+r:0),a?(n+=d,"bottom"===e?(g.bottom+=n+h,i.box={top:u.height-g.bottom,height:n}):(i.box={top:g.top+h,height:n},g.top+=n+h)):(o+=d,"left"===e?(i.box={left:g.left+h,width:o},g.left+=o+h):(g.right+=o+h,i.box={left:u.width-g.right,width:o})),i.position=e,i.tickLength=r,i.showMinorTicks=s,i.showTicks=l,i.gridLines=f,i.box.padding=d,i.innermost=p}function A(t,i,o){"x"===t.direction?("bottom"===t.position&&o(i.bottom)&&(t.box.top-=Math.ceil(i.bottom)),"top"===t.position&&o(i.top)&&(t.box.top+=Math.ceil(i.top))):("left"===t.position&&o(i.left)&&(t.box.left+=Math.ceil(i.left)),"right"===t.position&&o(i.right)&&(t.box.left-=Math.ceil(i.right)))}function P(i){var e,a,r=z(),l=c.grid.show;for(a in g)g[a]=0;for(a in N(k.processOffset,[g]),g)"object"==typeof c.grid.borderWidth?g[a]+=l?c.grid.borderWidth[a]:0:g[a]+=l?c.grid.borderWidth:0;if(t.each(r,(function(o,e){var a=e.options;e.show=null==a.show?e.used:a.show,e.reserveSpace=null==a.reserveSpace?e.show:a.reserveSpace,function(t){var i=t.options;t.tickFormatter||("function"==typeof i.tickFormatter?t.tickFormatter=function(){var t=Array.prototype.slice.call(arguments);return""+i.tickFormatter.apply(null,t)}:t.tickFormatter=n)}(e),N(k.setRange,[e,i]),function(i,o){var n="number"==typeof i.options.min?i.options.min:i.min,e="number"==typeof i.options.max?i.options.max:i.max,a=i.options.offset;o&&(O(i),n=i.autoScaledMin,e=i.autoScaledMax);if(n=(null!=n?n:-1)+(a.below||0),e=(null!=e?e:1)+(a.above||0),n>e){var r=n;n=e,e=r,i.options.offset={above:0,below:0}}i.min=t.plot.saturated.saturate(n),i.max=t.plot.saturated.saturate(e)}(e,i)})),l){b=u.width-g.left-g.right,v=u.height-g.bottom-g.top;var f=t.grep(r,(function(t){return t.show||t.reserveSpace}));for(t.each(f,(function(i,n){!function(i){var n,e=i.options;n=E(i.direction,u,e.ticks),i.delta=t.plot.saturated.delta(i.min,i.max,n);var a=y.computeValuePrecision(i.min,i.max,i.direction,n,e.tickDecimals);i.tickDecimals=Math.max(0,null!=e.tickDecimals?e.tickDecimals:a),i.tickSize=function(t,i,o,n,e){var a;a="number"==typeof n.ticks&&n.ticks>0?n.ticks:.3*Math.sqrt("x"===o?u.width:u.height);var r=j(t,i,a,e);null!=n.minTickSize&&r<n.minTickSize&&(r=n.minTickSize);return n.tickSize||r}(i.min,i.max,i.direction,e,e.tickDecimals),i.tickGenerator||("function"==typeof e.tickGenerator?i.tickGenerator=e.tickGenerator:i.tickGenerator=o);if(null!=e.alignTicksWithAxis){var r=("x"===i.direction?m:x)[e.alignTicksWithAxis-1];if(r&&r.used&&r!==i){var l=i.tickGenerator(i,y);if(l.length>0&&(null==e.min&&(i.min=Math.min(i.min,l[0])),null==e.max&&l.length>1&&(i.max=Math.max(i.max,l[l.length-1]))),i.tickGenerator=function(t){var i,o,n=[];for(o=0;o<r.ticks.length;++o)i=(r.ticks[o].v-r.min)/(r.max-r.min),i=t.min+i*(t.max-t.min),n.push(i);return n},!i.mode&&null==e.tickDecimals){var s=Math.max(0,1-Math.floor(Math.log(i.delta)/Math.LN10)),c=i.tickGenerator(i,y);c.length>1&&/\..*0$/.test((c[1]-c[0]).toFixed(s))||(i.tickDecimals=s)}}}}(n),function(i){var o,n,e=i.options.ticks,a=[];null==e||"number"==typeof e&&e>0?a=i.tickGenerator(i,y):e&&(a=t.isFunction(e)?e(i):e);for(i.ticks=[],o=0;o<a.length;++o){var r=null,l=a[o];"object"==typeof l?(n=+l[0],l.length>1&&(r=l[1])):n=+l,isNaN(n)||i.ticks.push(H(n,r,i,"major"))}}(n),function(t,i,o){"loose"===t.options.autoScale&&i.length>0&&function(t){return t.some(t=>t.datapoints.points.length>0)}(o)&&(t.min=Math.min(t.min,i[0].v),t.max=Math.max(t.max,i[i.length-1].v))}(n,n.ticks,s),D(n),function(t,i){(function(t,i){if("endpoints"===t.options.showTickLabels)return!0;if("all"===t.options.showTickLabels){var o=i.filter((function(i){return i.xaxis===t})),n=o.some((function(t){return!t.bars.show}));return 0===o.length||n}if("major"===t.options.showTickLabels||"none"===t.options.showTickLabels)return!1})(t,i)&&(t.ticks.unshift(H(t.min,null,t,"min")),t.ticks.push(H(t.max,null,t,"max")))}(n,s),function(t){for(var i=t.options,o="none"!==i.showTickLabels&&t.ticks?t.ticks:[],n="major"===i.showTickLabels||"all"===i.showTickLabels,e="endpoints"===i.showTickLabels||"all"===i.showTickLabels,a=i.labelWidth||0,r=i.labelHeight||0,l=t.direction+"Axis "+t.direction+t.n+"Axis",s="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+l,c=i.font||"flot-tick-label tickLabel",f=0;f<o.length;++f){var h=o[f],d=h.label;if(h.label&&!(!1===n&&f>0&&f<o.length-1)&&(!1!==e||0!==f&&f!==o.length-1)){"object"==typeof h.label&&(d=h.label.name);var p=u.getTextInfo(s,d,c);a=Math.max(a,p.width),r=Math.max(r,p.height)}}t.labelWidth=i.labelWidth||a,t.labelHeight=i.labelHeight||r}(n)})),e=f.length-1;e>=0;--e)F(f[e]);!function(){var i,o=c.grid.minBorderMargin;if(null==o)for(o=0,i=0;i<s.length;++i)o=Math.max(o,2*(s[i].points.radius+s[i].points.lineWidth/2));var n,e={},a={left:o,right:o,top:o,bottom:o};for(n in t.each(z(),(function(t,i){i.reserveSpace&&i.ticks&&i.ticks.length&&("x"===i.direction?(a.left=Math.max(a.left,i.labelWidth/2),a.right=Math.max(a.right,i.labelWidth/2)):(a.bottom=Math.max(a.bottom,i.labelHeight/2),a.top=Math.max(a.top,i.labelHeight/2)))})),a)e[n]=a[n]-g[n];t.each(m.concat(x),(function(t,i){A(i,e,(function(t){return t>0}))})),g.left=Math.ceil(Math.max(a.left,g.left)),g.right=Math.ceil(Math.max(a.right,g.right)),g.top=Math.ceil(Math.max(a.top,g.top)),g.bottom=Math.ceil(Math.max(a.bottom,g.bottom))}(),t.each(f,(function(t,i){!function(t){"x"===t.direction?(t.box.left=g.left-t.labelWidth/2,t.box.width=u.width-g.left-g.right+t.labelWidth):(t.box.top=g.top-t.labelHeight/2,t.box.height=u.height-g.bottom-g.top+t.labelHeight)}(i)}))}if(c.grid.margin){for(a in g){var h=c.grid.margin||0;g[a]+="number"==typeof h?h:h[a]||0}t.each(m.concat(x),(function(t,i){A(i,c.grid.margin,(function(t){return null!=t}))}))}b=u.width-g.left-g.right,v=u.height-g.bottom-g.top,t.each(r,(function(t,i){D(i)})),l&&t.each(z(),(function(t,i){var o,n,e,a,r,l,s,c=i.box,f=i.direction+"Axis "+i.direction+i.n+"Axis",h="flot-"+i.direction+"-axis flot-"+i.direction+i.n+"-axis "+f,d=i.options.font||"flot-tick-label tickLabel",p={x:NaN,y:NaN,width:NaN,height:NaN},m=[],x=function(t,o){return!t||!t.label||t.v<i.min||t.v>i.max?p:(l=u.getTextInfo(h,t.label,d),"x"===i.direction?(a="center",n=g.left+i.p2c(t.v),"bottom"===i.position?e=c.top+c.padding-i.boxPosition.centerY:(e=c.top+c.height-c.padding+i.boxPosition.centerY,r="bottom"),s={x:n-l.width/2-3,y:e-3,width:l.width+6,height:l.height+6}):(r="middle",e=g.top+i.p2c(t.v),"left"===i.position?(n=c.left+c.width-c.padding-i.boxPosition.centerX,a="right"):n=c.left+c.padding+i.boxPosition.centerX,s={x:n-l.width/2-3,y:e-3,width:l.width+6,height:l.height+6}),function(t,i){return i.some((function(i){return o=t.x,n=t.y,e=t.x+t.width,a=t.y+t.height,r=i.x,l=i.y,s=i.x+i.width,c=i.y+i.height,(o<=r&&r<=e||r<=o&&o<=s)&&(n<=l&&l<=a||l<=n&&n<=c);var o,n,e,a,r,l,s,c}))}(s,o)?p:(u.addText(h,n,e,t.label,d,null,null,a,r),s))};if(u.removeText(h),N(k.drawAxis,[i,u]),i.show)switch(i.options.showTickLabels){case"none":break;case"endpoints":m.push(x(i.ticks[0],m)),m.push(x(i.ticks[i.ticks.length-1],m));break;case"major":for(m.push(x(i.ticks[0],m)),m.push(x(i.ticks[i.ticks.length-1],m)),o=1;o<i.ticks.length-1;++o)m.push(x(i.ticks[o],m));break;case"all":for(m.push(x(i.ticks[0],[])),m.push(x(i.ticks[i.ticks.length-1],m)),o=1;o<i.ticks.length-1;++o)m.push(x(i.ticks[o],m))}})),N(k.setupGrid,[])}function O(i){var o,n=i.options,e=n.min,a=n.max,r=i.datamin,l=i.datamax;switch(n.autoScale){case"none":e=+(null!=n.min?n.min:r),a=+(null!=n.max?n.max:l);break;case"loose":if(null!=r&&null!=l){e=r,a=l,o=t.plot.saturated.saturate(a-e);var s="number"==typeof n.autoScaleMargin?n.autoScaleMargin:.02;e=t.plot.saturated.saturate(e-o*s),a=t.plot.saturated.saturate(a+o*s),e<0&&r>=0&&(e=0)}else e=n.min,a=n.max;break;case"exact":e=null!=r?r:n.min,a=null!=l?l:n.max;break;case"sliding-window":l>a&&(a=l,e=Math.max(l-(n.windowSize||100),e))}var c=function(t,i){var o=void 0===t?null:t,n=void 0===i?null:i;if(0===n-o){var e=0===n?1:.01,a=null;null==o&&(a-=e),null!=n&&null==o||(n+=e),null!=a&&(o=a)}return{min:o,max:n}}(e,a);e=c.min,a=c.max,!0===n.growOnly&&"none"!==n.autoScale&&"sliding-window"!==n.autoScale&&(e=e<r?e:null!==r?r:e,a=a>l?a:null!==l?l:a),i.autoScaledMin=e,i.autoScaledMax=a}function R(i,o,n,e,a){var r=E(n,u,e),l=t.plot.saturated.delta(i,o,r),s=-Math.floor(Math.log(l)/Math.LN10);a&&s>a&&(s=a);var c=l/parseFloat("1e"+-s);return c>2.25&&c<3&&s+1<=a&&++s,isFinite(s)?s:0}function j(i,o,n,e){var a=t.plot.saturated.delta(i,o,n),r=-Math.floor(Math.log(a)/Math.LN10);e&&r>e&&(r=e);var l,s=parseFloat("1e"+-r),c=a/s;return c<1.5?l=1:c<3?(l=2,c>2.25&&(null==e||r+1<=e)&&(l=2.5)):l=c<7.5?5:10,l*=s}function E(t,i,o){return"number"==typeof o&&o>0?o:.3*Math.sqrt("x"===t?i.width:i.height)}function H(t,i,o,n){if(null===i)switch(n){case"min":case"max":var e=function(t,i){var o=Math.floor(i.p2c(t)),n="x"===i.direction?o+1:o-1,e=i.c2p(o),a=i.c2p(n);return R(e,a,i.direction,1)}(t,o);isFinite(e),i=o.tickFormatter(t,o,e,y);break;case"major":i=o.tickFormatter(t,o,void 0,y)}return{v:t,label:i}}function G(){u.clear(),N(k.drawBackground,[d]);var t=c.grid;t.show&&t.backgroundColor&&(d.save(),d.translate(g.left,g.top),d.fillStyle=tt(c.grid.backgroundColor,v,0,"rgba(255, 255, 255, 0)"),d.fillRect(0,0,b,v),d.restore()),t.show&&!t.aboveData&&U();for(var i=0;i<s.length;++i)N(k.drawSeries,[d,s[i],i,tt]),K(s[i]);N(k.draw,[d]),t.show&&t.aboveData&&U(),u.render(),J()}function V(t,i){for(var o,n,e,a,r=z(),l=0;l<r.length;++l)if((o=r[l]).direction===i&&(t[a=i+o.n+"axis"]||1!==o.n||(a=i+"axis"),t[a])){n=t[a].from,e=t[a].to;break}if(t[a]||(o="x"===i?m[0]:x[0],n=t[i+"1"],e=t[i+"2"]),null!=n&&null!=e&&n>e){var s=n;n=e,e=s}return{from:n,to:e,axis:o}}function _(t){var i=t.box,o=0,n=0;return"x"===t.direction?(o=0,n=i.top-g.top+("top"===t.position?i.height:0)):(n=0,o=i.left-g.left+("left"===t.position?i.width:0)+t.boxPosition.centerX),{x:o,y:n}}function X(t,i){return t%2!=0?Math.floor(i)+.5:i}function Y(t){d.lineWidth=1;var i=_(t),o=i.x,n=i.y;if(t.show){var e=0,a=0;d.strokeStyle=t.options.color,d.beginPath(),"x"===t.direction?e=b+1:a=v+1,"x"===t.direction?n=X(d.lineWidth,n):o=X(d.lineWidth,o),d.moveTo(o,n),d.lineTo(o+e,n+a),d.stroke()}}function B(t){var i=t.tickLength,o=t.showMinorTicks,n=S,e=_(t),a=e.x,r=e.y,l=0;for(d.strokeStyle=t.options.color,d.beginPath(),l=0;l<t.ticks.length;++l){var s,c=t.ticks[l].v,u=0,f=0,h=0,p=0;if(!isNaN(c)&&c>=t.min&&c<=t.max&&("x"===t.direction?(a=t.p2c(c),f=i,"top"===t.position&&(f=-f)):(r=t.p2c(c),u=i,"left"===t.position&&(u=-u)),"x"===t.direction?a=X(d.lineWidth,a):r=X(d.lineWidth,r),d.moveTo(a,r),d.lineTo(a+u,r+f)),!0===o&&l<t.ticks.length-1){var m=t.ticks[l].v,x=(t.ticks[l+1].v-m)/(n+1);for(s=1;s<=n;s++){if("x"===t.direction){if(p=i/2,a=X(d.lineWidth,t.p2c(m+s*x)),"top"===t.position&&(p=-p),a<0||a>b)continue}else if(h=i/2,r=X(d.lineWidth,t.p2c(m+s*x)),"left"===t.position&&(h=-h),r<0||r>v)continue;d.moveTo(a,r),d.lineTo(a+h,r+p)}}}d.stroke()}function q(t){var i,o,n;for(d.strokeStyle=c.grid.tickColor,d.beginPath(),i=0;i<t.ticks.length;++i){var e=t.ticks[i].v,a=0,r=0,l=0,s=0;isNaN(e)||e<t.min||e>t.max||(o=e,n=void 0,(!("object"==typeof(n=c.grid.borderWidth)&&n[t.position]>0||n>0)||o!==t.min&&o!==t.max)&&("x"===t.direction?(l=t.p2c(e),s=v,r=-v):(l=0,s=t.p2c(e),a=b),"x"===t.direction?l=X(d.lineWidth,l):s=X(d.lineWidth,s),d.moveTo(l,s),d.lineTo(l+a,s+r)))}d.stroke()}function U(){var i,o;d.save(),d.translate(g.left,g.top),function(){var i,o,n=c.grid.markings;if(n)for(t.isFunction(n)&&((i=y.getAxes()).xmin=i.xaxis.min,i.xmax=i.xaxis.max,i.ymin=i.yaxis.min,i.ymax=i.yaxis.max,n=n(i)),o=0;o<n.length;++o){var e=n[o],a=V(e,"x"),r=V(e,"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 l=a.from===a.to,s=r.from===r.to;if(!l||!s)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)),l||s){var u=e.lineWidth||c.grid.markingsLineWidth,f=u%2?.5:0;d.beginPath(),d.strokeStyle=e.color||c.grid.markingsColor,d.lineWidth=u,l?(d.moveTo(a.to+f,r.from),d.lineTo(a.to+f,r.to)):(d.moveTo(a.from,r.to+f),d.lineTo(a.to,r.to+f)),d.stroke()}else d.fillStyle=e.color||c.grid.markingsColor,d.fillRect(a.from,r.to,a.to-a.from,r.from-r.to)}}}(),i=z(),o=c.grid.borderWidth;for(var n=0;n<i.length;++n){var e=i[n];e.show&&(Y(e),!0===e.showTicks&&B(e),!0===e.gridLines&&q(e))}o&&function(){var t=c.grid.borderWidth,i=c.grid.borderColor;"object"==typeof t||"object"==typeof i?("object"!=typeof t&&(t={top:t,right:t,bottom:t,left:t}),"object"!=typeof i&&(i={top:i,right:i,bottom:i,left:i}),t.top>0&&(d.strokeStyle=i.top,d.lineWidth=t.top,d.beginPath(),d.moveTo(0-t.left,0-t.top/2),d.lineTo(b,0-t.top/2),d.stroke()),t.right>0&&(d.strokeStyle=i.right,d.lineWidth=t.right,d.beginPath(),d.moveTo(b+t.right/2,0-t.top),d.lineTo(b+t.right/2,v),d.stroke()),t.bottom>0&&(d.strokeStyle=i.bottom,d.lineWidth=t.bottom,d.beginPath(),d.moveTo(b+t.right,v+t.bottom/2),d.lineTo(0,v+t.bottom/2),d.stroke()),t.left>0&&(d.strokeStyle=i.left,d.lineWidth=t.left,d.beginPath(),d.moveTo(0-t.left/2,v+t.bottom),d.lineTo(0-t.left/2,0),d.stroke())):(d.lineWidth=t,d.strokeStyle=c.grid.borderColor,d.strokeRect(-t/2,-t/2,b+t,v+t))}(),d.restore()}function K(i){i.lines.show&&t.plot.drawSeries.drawSeriesLines(i,d,g,b,v,y.drawSymbol,tt),i.bars.show&&t.plot.drawSeries.drawSeriesBars(i,d,g,b,v,y.drawSymbol,tt),i.points.show&&t.plot.drawSeries.drawSeriesPoints(i,d,g,b,v,y.drawSymbol,tt)}function Q(t,i,o,n,e,a){var r=t.xaxis.c2p(i),l=t.yaxis.c2p(o),s=n/t.xaxis.scale,c=n/t.yaxis.scale,u=t.datapoints.points,f=t.datapoints.pointsize;t.xaxis.options.inverseTransform&&(s=Number.MAX_VALUE),t.yaxis.options.inverseTransform&&(c=Number.MAX_VALUE);for(var h=null,d=0;d<u.length;d+=f){var p=u[d],m=u[d+1];if(null!=p&&!(p-r>s||p-r<-s||m-l>c||m-l<-c)){var x=Math.abs(t.xaxis.p2c(p)-i),g=Math.abs(t.yaxis.p2c(m)-o),b=a?a(x,g):x*x+g*g;b<e&&(e=b,h={dataIndex:d/f,distance:b})}}return h}function $(t,i,o){var n,e,a=t.bars.barWidth[0]||t.bars.barWidth,r=t.xaxis.c2p(i),l=t.yaxis.c2p(o),s=t.datapoints.points,c=t.datapoints.pointsize;switch(t.bars.align){case"left":n=0;break;case"right":n=-a;break;default:n=-a/2}e=n+a;for(var u=t.bars.fillTowards||0,f=u>t.yaxis.min?Math.min(t.yaxis.max,u):t.yaxis.min,h=-1,d=0;d<s.length;d+=c){var p=s[d],m=s[d+1];null!=p&&((t.bars.horizontal?r<=Math.max(f,p)&&r>=Math.min(f,p)&&l>=m+n&&l<=m+e:r>=p+n&&r<=p+e&&l>=Math.min(f,m)&&l<=Math.max(f,m))&&(h=d/c))}return h}function J(){var t=c.interaction.redrawOverlayInterval;-1!==t?M||(M=setTimeout((function(){Z(y)}),t)):Z()}function Z(t){if(M=null,p){f.clear(),N(k.drawOverlay,[p,f]);var i=new CustomEvent("onDrawingDone");t.getEventHolder().dispatchEvent(i),t.getPlaceholder().trigger("drawingdone")}}function tt(i,o,n,e){if("string"==typeof i)return i;for(var a=d.createLinearGradient(0,n,0,o),r=0,l=i.colors.length;r<l;++r){var s=i.colors[r];if("string"!=typeof s){var c=t.color.parse(e);null!=s.brightness&&(c=c.scale("rgb",s.brightness)),null!=s.opacity&&(c.a*=s.opacity),s=c.toString()}a.addColorStop(r/(l-1),s)}return a}!function(){for(var o={Canvas:i},n=0;n<l.length;++n){var e=l[n];e.init(y,o),e.options&&t.extend(!0,c,e.options)}}(),function(){e.css("padding",0).children().filter((function(){return!t(this).hasClass("flot-overlay")&&!t(this).hasClass("flot-base")})).remove(),"static"===e.css("position")&&e.css("position","relative");u=new i("flot-base",e[0]),f=new i("flot-overlay",e[0]),d=u.context,p=f.context,h=t(f.element).unbind();var o=e.data("plot");o&&(o.shutdown(),f.clear());e.data("plot",y)}(),function(i){t.extend(!0,c,i),i&&i.colors&&(c.colors=i.colors);null==c.xaxis.color&&(c.xaxis.color=t.color.parse(c.grid.color).scale("a",.22).toString());null==c.yaxis.color&&(c.yaxis.color=t.color.parse(c.grid.color).scale("a",.22).toString());null==c.xaxis.tickColor&&(c.xaxis.tickColor=c.grid.tickColor||c.xaxis.color);null==c.yaxis.tickColor&&(c.yaxis.tickColor=c.grid.tickColor||c.yaxis.color);null==c.grid.borderColor&&(c.grid.borderColor=c.grid.color);null==c.grid.tickColor&&(c.grid.tickColor=t.color.parse(c.grid.color).scale("a",.22).toString());var o,n,a,r=e.css("font-size"),l=r?+r.replace("px",""):13,s={style:e.css("font-style"),size:Math.round(.8*l),variant:e.css("font-variant"),weight:e.css("font-weight"),family:e.css("font-family")};for(a=c.xaxes.length||1,o=0;o<a;++o)(n=c.xaxes[o])&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},c.xaxis,n),c.xaxes[o]=n,n.font&&(n.font=t.extend({},s,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(a=c.yaxes.length||1,o=0;o<a;++o)(n=c.yaxes[o])&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},c.yaxis,n),c.yaxes[o]=n,n.font&&(n.font=t.extend({},s,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(o=0;o<c.xaxes.length;++o)I(m,o+1).options=c.xaxes[o];for(o=0;o<c.yaxes.length;++o)I(x,o+1).options=c.yaxes[o];for(var u in t.each(z(),(function(t,i){i.boxPosition=i.options.boxPosition||{centerX:0,centerY:0}})),k)c.hooks[u]&&c.hooks[u].length&&(k[u]=k[u].concat(c.hooks[u]));N(k.processOptions,[c])}(r),W(a),P(!0),G(),N(k.bindEvents,[h])}t.plot=function(i,o,n){return new r(t(i),o,n,t.plot.plugins)},t.plot.version="3.0.0",t.plot.plugins=[],t.fn.plot=function(i,o){return this.each((function(){t.plot(this,i,o)}))},t.plot.linearTickGenerator=o,t.plot.defaultTickFormatter=n,t.plot.expRepTickFormatter=e}(jQuery);
+!function(t){"use strict";var i=window.Flot.Canvas;function o(i){var o,n=[],e=t.plot.saturated.saturate(t.plot.saturated.floorInBase(i.min,i.tickSize)),a=0,r=Number.NaN;e===-Number.MAX_VALUE&&(n.push(e),e=t.plot.saturated.floorInBase(i.min+i.tickSize,i.tickSize));do{o=r,r=t.plot.saturated.multiplyAdd(i.tickSize,a,e),n.push(r),++a}while(r<i.max&&r!==o);return n}function n(t,i,o){var n=i.tickDecimals;if(-1!==(""+t).indexOf("e"))return e(t,i,o);o>0&&(i.tickDecimals=o);var a=i.tickDecimals?parseFloat("1e"+i.tickDecimals):1,r=""+Math.round(t*a)/a;if(null!=i.tickDecimals){var l=r.indexOf("."),s=-1===l?0:r.length-l-1;if(s<i.tickDecimals)r=(s?r:r+".")+(""+a).substr(1,i.tickDecimals-s)}return i.tickDecimals=n,r}function e(t,i,o){var n=(""+t).indexOf("e"),e=parseInt((""+t).substr(n+1)),r=-1!==n?e:t>0?Math.floor(Math.log(t)/Math.LN10):0,l=parseFloat("1e"+r),s=t/l;if(o){var c=a(t,o);return(t/l).toFixed(c)+"e"+r}return i.tickDecimals>0?s.toFixed(a(t,i.tickDecimals))+"e"+r:s.toFixed()+"e"+r}function a(t,i){var o=Math.log(Math.abs(t))*Math.LOG10E,n=Math.abs(o+i);return n<=20?Math.floor(n):20}function r(e,a,r,l){var s=[],c={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:{}},u=null,f=null,h=null,d=null,p=null,m=[],x=[],g={left:0,right:0,top:0,bottom:0},b=0,v=0,k={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],setupGrid:[],adjustSeriesDataRange:[],setRange:[],drawBackground:[],drawSeries:[],drawAxis:[],draw:[],findNearbyItems:[],axisReserveSpace:[],bindEvents:[],drawOverlay:[],resize:[],shutdown:[]},y=this,w={},M=null;y.setData=W,y.setupGrid=P,y.draw=G,y.getPlaceholder=function(){return e},y.getCanvas=function(){return u.element},y.getSurface=function(){return u},y.getEventHolder=function(){return h[0]},y.getPlotOffset=function(){return g},y.width=function(){return b},y.height=function(){return v},y.offset=function(){var t=h.offset();return t.left+=g.left,t.top+=g.top,t},y.getData=function(){return s},y.getAxes=function(){var i={};return t.each(m.concat(x),(function(t,o){o&&(i[o.direction+(1!==o.n?o.n:"")+"axis"]=o)})),i},y.getXAxes=function(){return m},y.getYAxes=function(){return x},y.c2p=function(t){var i,o,n={};for(i=0;i<m.length;++i)(o=m[i])&&o.used&&(n["x"+o.n]=o.c2p(t.left));for(i=0;i<x.length;++i)(o=x[i])&&o.used&&(n["y"+o.n]=o.c2p(t.top));void 0!==n.x1&&(n.x=n.x1);void 0!==n.y1&&(n.y=n.y1);return n},y.p2c=function(t){var i,o,n,e={};for(i=0;i<m.length;++i)if((o=m[i])&&o.used&&(n="x"+o.n,null==t[n]&&1===o.n&&(n="x"),null!=t[n])){e.left=o.p2c(t[n]);break}for(i=0;i<x.length;++i)if((o=x[i])&&o.used&&(n="y"+o.n,null==t[n]&&1===o.n&&(n="y"),null!=t[n])){e.top=o.p2c(t[n]);break}return e},y.getOptions=function(){return c},y.triggerRedrawOverlay=Z,y.pointOffset=function(t){return{left:parseInt(m[I(t,"x")-1].p2c(+t.x)+g.left,10),top:parseInt(x[I(t,"y")-1].p2c(+t.y)+g.top,10)}},y.shutdown=L,y.destroy=function(){L(),e.removeData("plot").empty(),s=[],c=null,u=null,f=null,h=null,d=null,p=null,m=[],x=[],k=null,y=null},y.resize=function(){var t=e.width(),i=e.height();u.resize(t,i),f.resize(t,i),N(k.resize,[t,i])},y.clearTextCache=function(){u.clearCache(),f.clearCache()},y.autoScaleAxis=O,y.computeRangeForDataSeries=function(t,i,o){for(var n=t.datapoints.points,e=t.datapoints.pointsize,a=t.datapoints.format,r=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,s={xmin:r,ymin:r,xmax:l,ymax:l},c=0;c<n.length;c+=e)if(null!==n[c]&&("function"!=typeof o||o(n[c])))for(var u=0;u<e;++u){var f=n[c+u],h=a[u];null!=h&&(("function"!=typeof o||o(f))&&(i||h.computeRange)&&f!==1/0&&f!==-1/0&&(!0===h.x&&(f<s.xmin&&(s.xmin=f),f>s.xmax&&(s.xmax=f)),!0===h.y&&(f<s.ymin&&(s.ymin=f),f>s.ymax&&(s.ymax=f))))}return s},y.adjustSeriesDataRange=function(t,i){if(t.bars.show){var o,n=t.bars.barWidth[1];t.datapoints&&t.datapoints.points&&!n&&function(t){var i=[],o=t.datapoints.pointsize,n=Number.MAX_VALUE;t.datapoints.points.length<=o&&(n=1);for(let n=t.bars.horizontal?1:0;n<t.datapoints.points.length;n+=o)isFinite(t.datapoints.points[n])&&null!==t.datapoints.points[n]&&i.push(t.datapoints.points[n]);(i=i.filter((function(t,i,o){return o.indexOf(t)===i}))).sort((function(t,i){return t-i}));for(let t=1;t<i.length;t++){var e=Math.abs(i[t]-i[t-1]);e<n&&isFinite(e)&&(n=e)}"number"==typeof t.bars.barWidth?t.bars.barWidth=t.bars.barWidth*n:t.bars.barWidth[0]=t.bars.barWidth[0]*n}(t);var e=t.bars.barWidth[0]||t.bars.barWidth;switch(t.bars.align){case"left":o=0;break;case"right":o=-e;break;default:o=-e/2}t.bars.horizontal?(i.ymin+=o,i.ymax+=o+e):(i.xmin+=o,i.xmax+=o+e)}if(t.bars.show&&t.bars.zero||t.lines.show&&t.lines.zero){t.datapoints.pointsize<=2&&(i.ymin=Math.min(0,i.ymin),i.ymax=Math.max(0,i.ymax))}return i},y.findNearbyItem=function(t,i,o,n,e){var a=Q(t,i,o,n,e);return void 0!==a[0]?a[0]:null},y.findNearbyItems=Q,y.findNearbyInterpolationPoint=function(t,i,o){var n,e,a,r,l,c,u,f=Number.MAX_VALUE;for(n=0;n<s.length;++n){if(!o(n))continue;var h=s[n].datapoints.points;c=s[n].datapoints.pointsize;const g=h[h.length-c]<h[0]?function(t,i){return t>i}:function(t,i){return i>t};if(!g(t,h[0])){for(e=c;e<h.length&&!g(t,h[e]);e+=c);var d=h[e-c],p=h[e-c+1],m=h[e],x=h[e+1];void 0!==d&&void 0!==m&&void 0!==p&&void 0!==x&&(i=d===m?x:p+(x-p)*(t-d)/(m-d),r=Math.abs(s[n].xaxis.p2c(m)-t),l=Math.abs(s[n].yaxis.p2c(x)-i),(a=r*r+l*l)<f&&(f=a,u=[t,i,n,e]))}}if(u)return n=u[2],e=u[3],c=s[n].datapoints.pointsize,h=s[n].datapoints.points,d=h[e-c],p=h[e-c+1],m=h[e],x=h[e+1],{datapoint:[u[0],u[1]],leftPoint:[d,p],rightPoint:[m,x],seriesIndex:n};return null},y.computeValuePrecision=R,y.computeTickSize=E,y.addEventHandler=function(t,i,o,n){var e=o+t,a=w[e]||[];a.push({event:t,handler:i,eventHolder:o,priority:n}),a.sort((t,i)=>i.priority-t.priority),a.forEach(t=>{t.eventHolder.unbind(t.event,t.handler),t.eventHolder.bind(t.event,t.handler)}),w[e]=a},y.hooks=k;var S=t.plot.uiConstants.MINOR_TICKS_COUNT_CONSTANT,T=t.plot.uiConstants.TICK_LENGTH_CONSTANT;function N(t,i){i=[y].concat(i);for(var o=0;o<t.length;++o)t[o].apply(this,i)}function W(i){var o=s;s=function(i){for(var o=[],n=0;n<i.length;++n){var e=t.extend(!0,{},c.series);null!=i[n].data?(e.data=i[n].data,delete i[n].data,t.extend(!0,e,i[n]),i[n].data=e.data):e.data=i[n],o.push(e)}return o}(i),function(){var i,o=s.length,n=-1;for(i=0;i<s.length;++i){var e=s[i].color;null!=e&&(o--,"number"==typeof e&&e>n&&(n=e))}o<=n&&(o=n+1);var a,r=[],l=c.colors,u=l.length,f=0,h=Math.max(0,s.length-o);for(i=0;i<o;i++)a=t.color.parse(l[(h+i)%u]||"#666"),i%u==0&&i&&(f=f>=0?f<.5?-f-.2:0:-f),r[i]=a.scale("rgb",1+f);var d,p=0;for(i=0;i<s.length;++i){if(null==(d=s[i]).color?(d.color=r[p].toString(),++p):"number"==typeof d.color&&(d.color=r[d.color].toString()),null==d.lines.show){var g,b=!0;for(g in d)if(d[g]&&d[g].show){b=!1;break}b&&(d.lines.show=!0)}null==d.lines.zero&&(d.lines.zero=!!d.lines.fill),d.xaxis=C(m,I(d,"x")),d.yaxis=C(x,I(d,"y"))}}(),function(i){var o,n,e,a,r,l,c,u,f,h,d,p,m=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;function g(t,i,o){i<t.datamin&&i!==-1/0&&(t.datamin=i),o>t.datamax&&o!==1/0&&(t.datamax=o)}function b(t,i){return t&&t[i]&&t[i].datapoints&&t[i].datapoints.points?t[i].datapoints.points:[]}for(t.each(z(),(function(t,i){!0!==i.options.growOnly?(i.datamin=m,i.datamax=x):(void 0===i.datamin&&(i.datamin=m),void 0===i.datamax&&(i.datamax=x)),i.used=!1})),o=0;o<s.length;++o)(r=s[o]).datapoints={points:[]},0===r.datapoints.points.length&&(r.datapoints.points=b(i,o)),N(k.processRawData,[r,r.data,r.datapoints]);for(o=0;o<s.length;++o){if(r=s[o],d=r.data,!(p=r.datapoints.format)){if((p=[]).push({x:!0,y:!1,number:!0,required:!0,computeRange:"none"!==r.xaxis.options.autoScale,defaultValue:null}),p.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)(null!=r.datapoints.pointsize?r.datapoints.pointsize:r.data&&r.data[0]&&r.data[0].length?r.data[0].length:3)>2&&p.push({x:!1,y:!0,number:!0,required:!1,computeRange:"none"!==r.yaxis.options.autoScale,defaultValue:0});r.datapoints.format=p}if(r.xaxis.used=r.yaxis.used=!0,null==r.datapoints.pointsize){for(r.datapoints.pointsize=p.length,c=r.datapoints.pointsize,l=r.datapoints.points,n=e=0;n<d.length;++n,e+=c){var v=null==(h=d[n]);if(!v)for(a=0;a<c;++a)u=h[a],(f=p[a])&&(f.number&&null!=u&&(u=+u,isNaN(u)&&(u=null)),null==u&&(f.required&&(v=!0),null!=f.defaultValue&&(u=f.defaultValue))),l[e+a]=u;if(v)for(a=0;a<c;++a)null!=(u=l[e+a])&&(f=p[a]).computeRange&&(f.x&&g(r.xaxis,u,u),f.y&&g(r.yaxis,u,u)),l[e+a]=null}l.length=e}}for(o=0;o<s.length;++o)r=s[o],N(k.processDatapoints,[r,r.datapoints]);for(o=0;o<s.length;++o)if(r=s[o],!(p=r.datapoints.format).every((function(t){return!t.computeRange}))){var w=y.adjustSeriesDataRange(r,y.computeRangeForDataSeries(r));N(k.adjustSeriesDataRange,[r,w]),g(r.xaxis,w.xmin,w.xmax),g(r.yaxis,w.ymin,w.ymax)}t.each(z(),(function(t,i){i.datamin===m&&(i.datamin=null),i.datamax===x&&(i.datamax=null)}))}(o)}function I(t,i){var o=t[i+"axis"];return"object"==typeof o&&(o=o.n),"number"!=typeof o&&(o=1),o}function z(){return m.concat(x).filter((function(t){return t}))}function C(i,o){return i[o-1]||(i[o-1]={n:o,direction:i===m?"x":"y",options:t.extend(!0,{},i===m?c.xaxis:c.yaxis)}),i[o-1]}function L(){M&&clearTimeout(M),N(k.shutdown,[h])}function D(i){function o(t){return t}var n,e,a=i.options.transform||o,r=i.options.inverseTransform;"x"===i.direction?(n=isFinite(a(i.max)-a(i.min))?i.scale=b/Math.abs(a(i.max)-a(i.min)):i.scale=1/Math.abs(t.plot.saturated.delta(a(i.min),a(i.max),b)),e=Math.min(a(i.max),a(i.min))):(n=-(n=isFinite(a(i.max)-a(i.min))?i.scale=v/Math.abs(a(i.max)-a(i.min)):i.scale=1/Math.abs(t.plot.saturated.delta(a(i.min),a(i.max),v))),e=Math.max(a(i.max),a(i.min))),i.p2c=a===o?function(t){return isFinite(t-e)?(t-e)*n:(t/4-e/4)*n*4}:function(t){var i=a(t);return isFinite(i-e)?(i-e)*n:(i/4-e/4)*n*4},i.c2p=r?function(t){return r(e+t/n)}:function(t){return e+t/n}}function F(i){N(k.axisReserveSpace,[i]);var o=i.labelWidth,n=i.labelHeight,e=i.options.position,a="x"===i.direction,r=i.options.tickLength,l=i.options.showTicks,s=i.options.showMinorTicks,f=i.options.gridLines,h=c.grid.axisMargin,d=c.grid.labelMargin,p=!0,b=!0,v=!1;t.each(a?m:x,(function(t,o){o&&(o.show||o.reserveSpace)&&(o===i?v=!0:o.options.position===e&&(v?b=!1:p=!1))})),b&&(h=0),null==r&&(r=T),null==l&&(l=!0),null==s&&(s=!0),null==f&&(f=!!p),isNaN(+r)||(d+=l?+r:0),a?(n+=d,"bottom"===e?(g.bottom+=n+h,i.box={top:u.height-g.bottom,height:n}):(i.box={top:g.top+h,height:n},g.top+=n+h)):(o+=d,"left"===e?(i.box={left:g.left+h,width:o},g.left+=o+h):(g.right+=o+h,i.box={left:u.width-g.right,width:o})),i.position=e,i.tickLength=r,i.showMinorTicks=s,i.showTicks=l,i.gridLines=f,i.box.padding=d,i.innermost=p}function A(t,i,o){"x"===t.direction?("bottom"===t.position&&o(i.bottom)&&(t.box.top-=Math.ceil(i.bottom)),"top"===t.position&&o(i.top)&&(t.box.top+=Math.ceil(i.top))):("left"===t.position&&o(i.left)&&(t.box.left+=Math.ceil(i.left)),"right"===t.position&&o(i.right)&&(t.box.left-=Math.ceil(i.right)))}function P(i){var e,a,r=z(),l=c.grid.show;for(a in g)g[a]=0;for(a in N(k.processOffset,[g]),g)"object"==typeof c.grid.borderWidth?g[a]+=l?c.grid.borderWidth[a]:0:g[a]+=l?c.grid.borderWidth:0;if(t.each(r,(function(o,e){var a=e.options;e.show=null==a.show?e.used:a.show,e.reserveSpace=null==a.reserveSpace?e.show:a.reserveSpace,function(t){var i=t.options;t.tickFormatter||("function"==typeof i.tickFormatter?t.tickFormatter=function(){var t=Array.prototype.slice.call(arguments);return""+i.tickFormatter.apply(null,t)}:t.tickFormatter=n)}(e),N(k.setRange,[e,i]),function(i,o){var n="number"==typeof i.options.min?i.options.min:i.min,e="number"==typeof i.options.max?i.options.max:i.max,a=i.options.offset;o&&(O(i),n=i.autoScaledMin,e=i.autoScaledMax);if(n=(null!=n?n:-1)+(a.below||0),e=(null!=e?e:1)+(a.above||0),n>e){var r=n;n=e,e=r,i.options.offset={above:0,below:0}}i.min=t.plot.saturated.saturate(n),i.max=t.plot.saturated.saturate(e)}(e,i)})),l){b=u.width-g.left-g.right,v=u.height-g.bottom-g.top;var f=t.grep(r,(function(t){return t.show||t.reserveSpace}));for(t.each(f,(function(i,n){!function(i){var n,e=i.options;n=j(i.direction,u,e.ticks),i.delta=t.plot.saturated.delta(i.min,i.max,n);var a=y.computeValuePrecision(i.min,i.max,i.direction,n,e.tickDecimals);i.tickDecimals=Math.max(0,null!=e.tickDecimals?e.tickDecimals:a),i.tickSize=function(t,i,o,n,e){var a;a="number"==typeof n.ticks&&n.ticks>0?n.ticks:.3*Math.sqrt("x"===o?u.width:u.height);var r=E(t,i,a,e);null!=n.minTickSize&&r<n.minTickSize&&(r=n.minTickSize);return n.tickSize||r}(i.min,i.max,i.direction,e,e.tickDecimals),i.tickGenerator||("function"==typeof e.tickGenerator?i.tickGenerator=e.tickGenerator:i.tickGenerator=o);if(null!=e.alignTicksWithAxis){var r=("x"===i.direction?m:x)[e.alignTicksWithAxis-1];if(r&&r.used&&r!==i){var l=i.tickGenerator(i,y);if(l.length>0&&(null==e.min&&(i.min=Math.min(i.min,l[0])),null==e.max&&l.length>1&&(i.max=Math.max(i.max,l[l.length-1]))),i.tickGenerator=function(t){var i,o,n=[];for(o=0;o<r.ticks.length;++o)i=(r.ticks[o].v-r.min)/(r.max-r.min),i=t.min+i*(t.max-t.min),n.push(i);return n},!i.mode&&null==e.tickDecimals){var s=Math.max(0,1-Math.floor(Math.log(i.delta)/Math.LN10)),c=i.tickGenerator(i,y);c.length>1&&/\..*0$/.test((c[1]-c[0]).toFixed(s))||(i.tickDecimals=s)}}}}(n),function(i){var o,n,e=i.options.ticks,a=[];null==e||"number"==typeof e&&e>0?a=i.tickGenerator(i,y):e&&(a=t.isFunction(e)?e(i):e);for(i.ticks=[],o=0;o<a.length;++o){var r=null,l=a[o];"object"==typeof l?(n=+l[0],l.length>1&&(r=l[1])):n=+l,isNaN(n)||i.ticks.push(H(n,r,i,"major"))}}(n),function(t,i,o){"loose"===t.options.autoScale&&i.length>0&&function(t){return t.some(t=>t.datapoints.points.length>0)}(o)&&(t.min=Math.min(t.min,i[0].v),t.max=Math.max(t.max,i[i.length-1].v))}(n,n.ticks,s),D(n),function(t,i){(function(t,i){if("endpoints"===t.options.showTickLabels)return!0;if("all"===t.options.showTickLabels){var o=i.filter((function(i){return i.bars.horizontal?i.yaxis===t:i.xaxis===t})),n=o.some((function(t){return!t.bars.show}));return 0===o.length||n}if("major"===t.options.showTickLabels||"none"===t.options.showTickLabels)return!1})(t,i)&&(t.ticks.unshift(H(t.min,null,t,"min")),t.ticks.push(H(t.max,null,t,"max")))}(n,s),function(t){for(var i=t.options,o="none"!==i.showTickLabels&&t.ticks?t.ticks:[],n="major"===i.showTickLabels||"all"===i.showTickLabels,e="endpoints"===i.showTickLabels||"all"===i.showTickLabels,a=i.labelWidth||0,r=i.labelHeight||0,l=t.direction+"Axis "+t.direction+t.n+"Axis",s="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+l,c=i.font||"flot-tick-label tickLabel",f=0;f<o.length;++f){var h=o[f],d=h.label;if(h.label&&!(!1===n&&f>0&&f<o.length-1)&&(!1!==e||0!==f&&f!==o.length-1)){"object"==typeof h.label&&(d=h.label.name);var p=u.getTextInfo(s,d,c);a=Math.max(a,p.width),r=Math.max(r,p.height)}}t.labelWidth=i.labelWidth||a,t.labelHeight=i.labelHeight||r}(n)})),e=f.length-1;e>=0;--e)F(f[e]);!function(){var i,o=c.grid.minBorderMargin;if(null==o)for(o=0,i=0;i<s.length;++i)o=Math.max(o,2*(s[i].points.radius+s[i].points.lineWidth/2));var n,e={},a={left:o,right:o,top:o,bottom:o};for(n in t.each(z(),(function(t,i){i.reserveSpace&&i.ticks&&i.ticks.length&&("x"===i.direction?(a.left=Math.max(a.left,i.labelWidth/2),a.right=Math.max(a.right,i.labelWidth/2)):(a.bottom=Math.max(a.bottom,i.labelHeight/2),a.top=Math.max(a.top,i.labelHeight/2)))})),a)e[n]=a[n]-g[n];t.each(m.concat(x),(function(t,i){A(i,e,(function(t){return t>0}))})),g.left=Math.ceil(Math.max(a.left,g.left)),g.right=Math.ceil(Math.max(a.right,g.right)),g.top=Math.ceil(Math.max(a.top,g.top)),g.bottom=Math.ceil(Math.max(a.bottom,g.bottom))}(),t.each(f,(function(t,i){!function(t){"x"===t.direction?(t.box.left=g.left-t.labelWidth/2,t.box.width=u.width-g.left-g.right+t.labelWidth):(t.box.top=g.top-t.labelHeight/2,t.box.height=u.height-g.bottom-g.top+t.labelHeight)}(i)}))}if(c.grid.margin){for(a in g){var h=c.grid.margin||0;g[a]+="number"==typeof h?h:h[a]||0}t.each(m.concat(x),(function(t,i){A(i,c.grid.margin,(function(t){return null!=t}))}))}b=u.width-g.left-g.right,v=u.height-g.bottom-g.top,t.each(r,(function(t,i){D(i)})),l&&t.each(z(),(function(t,i){var o,n,e,a,r,l,s,c=i.box,f=i.direction+"Axis "+i.direction+i.n+"Axis",h="flot-"+i.direction+"-axis flot-"+i.direction+i.n+"-axis "+f,d=i.options.font||"flot-tick-label tickLabel",p={x:NaN,y:NaN,width:NaN,height:NaN},m=[],x=function(t,o){return!t||!t.label||t.v<i.min||t.v>i.max?p:(l=u.getTextInfo(h,t.label,d),"x"===i.direction?(a="center",n=g.left+i.p2c(t.v),"bottom"===i.position?e=c.top+c.padding-i.boxPosition.centerY:(e=c.top+c.height-c.padding+i.boxPosition.centerY,r="bottom"),s={x:n-l.width/2-3,y:e-3,width:l.width+6,height:l.height+6}):(r="middle",e=g.top+i.p2c(t.v),"left"===i.position?(n=c.left+c.width-c.padding-i.boxPosition.centerX,a="right"):n=c.left+c.padding+i.boxPosition.centerX,s={x:n-l.width/2-3,y:e-3,width:l.width+6,height:l.height+6}),function(t,i){return i.some((function(i){return o=t.x,n=t.y,e=t.x+t.width,a=t.y+t.height,r=i.x,l=i.y,s=i.x+i.width,c=i.y+i.height,(o<=r&&r<=e||r<=o&&o<=s)&&(n<=l&&l<=a||l<=n&&n<=c);var o,n,e,a,r,l,s,c}))}(s,o)?p:(u.addText(h,n,e,t.label,d,null,null,a,r),s))};if(u.removeText(h),N(k.drawAxis,[i,u]),i.show)switch(i.options.showTickLabels){case"none":break;case"endpoints":m.push(x(i.ticks[0],m)),m.push(x(i.ticks[i.ticks.length-1],m));break;case"major":for(m.push(x(i.ticks[0],m)),m.push(x(i.ticks[i.ticks.length-1],m)),o=1;o<i.ticks.length-1;++o)m.push(x(i.ticks[o],m));break;case"all":for(m.push(x(i.ticks[0],[])),m.push(x(i.ticks[i.ticks.length-1],m)),o=1;o<i.ticks.length-1;++o)m.push(x(i.ticks[o],m))}})),N(k.setupGrid,[])}function O(i){var o,n=i.options,e=n.min,a=n.max,r=i.datamin,l=i.datamax;switch(n.autoScale){case"none":e=+(null!=n.min?n.min:r),a=+(null!=n.max?n.max:l);break;case"loose":if(null!=r&&null!=l){e=r,a=l,o=t.plot.saturated.saturate(a-e);var s="number"==typeof n.autoScaleMargin?n.autoScaleMargin:.02;e=t.plot.saturated.saturate(e-o*s),a=t.plot.saturated.saturate(a+o*s),e<0&&r>=0&&(e=0)}else e=n.min,a=n.max;break;case"exact":e=null!=r?r:n.min,a=null!=l?l:n.max;break;case"sliding-window":l>a&&(a=l,e=Math.max(l-(n.windowSize||100),e))}var c=function(t,i){var o=void 0===t?null:t,n=void 0===i?null:i;if(0===n-o){var e=0===n?1:.01,a=null;null==o&&(a-=e),null!=n&&null==o||(n+=e),null!=a&&(o=a)}return{min:o,max:n}}(e,a);e=c.min,a=c.max,!0===n.growOnly&&"none"!==n.autoScale&&"sliding-window"!==n.autoScale&&(e=e<r?e:null!==r?r:e,a=a>l?a:null!==l?l:a),i.autoScaledMin=e,i.autoScaledMax=a}function R(i,o,n,e,a){var r=j(n,u,e),l=t.plot.saturated.delta(i,o,r),s=-Math.floor(Math.log(l)/Math.LN10);a&&s>a&&(s=a);var c=l/parseFloat("1e"+-s);return c>2.25&&c<3&&s+1<=a&&++s,isFinite(s)?s:0}function E(i,o,n,e){var a=t.plot.saturated.delta(i,o,n),r=-Math.floor(Math.log(a)/Math.LN10);e&&r>e&&(r=e);var l,s=parseFloat("1e"+-r),c=a/s;return c<1.5?l=1:c<3?(l=2,c>2.25&&(null==e||r+1<=e)&&(l=2.5)):l=c<7.5?5:10,l*=s}function j(t,i,o){return"number"==typeof o&&o>0?o:.3*Math.sqrt("x"===t?i.width:i.height)}function H(t,i,o,n){if(null===i)switch(n){case"min":case"max":var e=function(t,i){var o=Math.floor(i.p2c(t)),n="x"===i.direction?o+1:o-1,e=i.c2p(o),a=i.c2p(n);return R(e,a,i.direction,1)}(t,o);isFinite(e),i=o.tickFormatter(t,o,e,y);break;case"major":i=o.tickFormatter(t,o,void 0,y)}return{v:t,label:i}}function G(){u.clear(),N(k.drawBackground,[d]);var t=c.grid;t.show&&t.backgroundColor&&(d.save(),d.translate(g.left,g.top),d.fillStyle=it(c.grid.backgroundColor,v,0,"rgba(255, 255, 255, 0)"),d.fillRect(0,0,b,v),d.restore()),t.show&&!t.aboveData&&U();for(var i=0;i<s.length;++i)N(k.drawSeries,[d,s[i],i,it]),K(s[i]);N(k.draw,[d]),t.show&&t.aboveData&&U(),u.render(),Z()}function V(t,i){for(var o,n,e,a,r=z(),l=0;l<r.length;++l)if((o=r[l]).direction===i&&(t[a=i+o.n+"axis"]||1!==o.n||(a=i+"axis"),t[a])){n=t[a].from,e=t[a].to;break}if(t[a]||(o="x"===i?m[0]:x[0],n=t[i+"1"],e=t[i+"2"]),null!=n&&null!=e&&n>e){var s=n;n=e,e=s}return{from:n,to:e,axis:o}}function _(t){var i=t.box,o=0,n=0;return"x"===t.direction?(o=0,n=i.top-g.top+("top"===t.position?i.height:0)):(n=0,o=i.left-g.left+("left"===t.position?i.width:0)+t.boxPosition.centerX),{x:o,y:n}}function X(t,i){return t%2!=0?Math.floor(i)+.5:i}function Y(t){d.lineWidth=1;var i=_(t),o=i.x,n=i.y;if(t.show){var e=0,a=0;d.strokeStyle=t.options.color,d.beginPath(),"x"===t.direction?e=b+1:a=v+1,"x"===t.direction?n=X(d.lineWidth,n):o=X(d.lineWidth,o),d.moveTo(o,n),d.lineTo(o+e,n+a),d.stroke()}}function q(t){var i=t.tickLength,o=t.showMinorTicks,n=S,e=_(t),a=e.x,r=e.y,l=0;for(d.strokeStyle=t.options.color,d.beginPath(),l=0;l<t.ticks.length;++l){var s,c=t.ticks[l].v,u=0,f=0,h=0,p=0;if(!isNaN(c)&&c>=t.min&&c<=t.max&&("x"===t.direction?(a=t.p2c(c),f=i,"top"===t.position&&(f=-f)):(r=t.p2c(c),u=i,"left"===t.position&&(u=-u)),"x"===t.direction?a=X(d.lineWidth,a):r=X(d.lineWidth,r),d.moveTo(a,r),d.lineTo(a+u,r+f)),!0===o&&l<t.ticks.length-1){var m=t.ticks[l].v,x=(t.ticks[l+1].v-m)/(n+1);for(s=1;s<=n;s++){if("x"===t.direction){if(p=i/2,a=X(d.lineWidth,t.p2c(m+s*x)),"top"===t.position&&(p=-p),a<0||a>b)continue}else if(h=i/2,r=X(d.lineWidth,t.p2c(m+s*x)),"left"===t.position&&(h=-h),r<0||r>v)continue;d.moveTo(a,r),d.lineTo(a+h,r+p)}}}d.stroke()}function B(t){var i,o,n;for(d.strokeStyle=c.grid.tickColor,d.beginPath(),i=0;i<t.ticks.length;++i){var e=t.ticks[i].v,a=0,r=0,l=0,s=0;isNaN(e)||e<t.min||e>t.max||(o=e,n=void 0,(!("object"==typeof(n=c.grid.borderWidth)&&n[t.position]>0||n>0)||o!==t.min&&o!==t.max)&&("x"===t.direction?(l=t.p2c(e),s=v,r=-v):(l=0,s=t.p2c(e),a=b),"x"===t.direction?l=X(d.lineWidth,l):s=X(d.lineWidth,s),d.moveTo(l,s),d.lineTo(l+a,s+r)))}d.stroke()}function U(){var i,o;d.save(),d.translate(g.left,g.top),function(){var i,o,n=c.grid.markings;if(n)for(t.isFunction(n)&&((i=y.getAxes()).xmin=i.xaxis.min,i.xmax=i.xaxis.max,i.ymin=i.yaxis.min,i.ymax=i.yaxis.max,n=n(i)),o=0;o<n.length;++o){var e=n[o],a=V(e,"x"),r=V(e,"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 l=a.from===a.to,s=r.from===r.to;if(!l||!s)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)),l||s){var u=e.lineWidth||c.grid.markingsLineWidth,f=u%2?.5:0;d.beginPath(),d.strokeStyle=e.color||c.grid.markingsColor,d.lineWidth=u,l?(d.moveTo(a.to+f,r.from),d.lineTo(a.to+f,r.to)):(d.moveTo(a.from,r.to+f),d.lineTo(a.to,r.to+f)),d.stroke()}else d.fillStyle=e.color||c.grid.markingsColor,d.fillRect(a.from,r.to,a.to-a.from,r.from-r.to)}}}(),i=z(),o=c.grid.borderWidth;for(var n=0;n<i.length;++n){var e=i[n];e.show&&(Y(e),!0===e.showTicks&&q(e),!0===e.gridLines&&B(e))}o&&function(){var t=c.grid.borderWidth,i=c.grid.borderColor;"object"==typeof t||"object"==typeof i?("object"!=typeof t&&(t={top:t,right:t,bottom:t,left:t}),"object"!=typeof i&&(i={top:i,right:i,bottom:i,left:i}),t.top>0&&(d.strokeStyle=i.top,d.lineWidth=t.top,d.beginPath(),d.moveTo(0-t.left,0-t.top/2),d.lineTo(b,0-t.top/2),d.stroke()),t.right>0&&(d.strokeStyle=i.right,d.lineWidth=t.right,d.beginPath(),d.moveTo(b+t.right/2,0-t.top),d.lineTo(b+t.right/2,v),d.stroke()),t.bottom>0&&(d.strokeStyle=i.bottom,d.lineWidth=t.bottom,d.beginPath(),d.moveTo(b+t.right,v+t.bottom/2),d.lineTo(0,v+t.bottom/2),d.stroke()),t.left>0&&(d.strokeStyle=i.left,d.lineWidth=t.left,d.beginPath(),d.moveTo(0-t.left/2,v+t.bottom),d.lineTo(0-t.left/2,0),d.stroke())):(d.lineWidth=t,d.strokeStyle=c.grid.borderColor,d.strokeRect(-t/2,-t/2,b+t,v+t))}(),d.restore()}function K(i){i.lines.show&&t.plot.drawSeries.drawSeriesLines(i,d,g,b,v,y.drawSymbol,it),i.bars.show&&t.plot.drawSeries.drawSeriesBars(i,d,g,b,v,y.drawSymbol,it),i.points.show&&t.plot.drawSeries.drawSeriesPoints(i,d,g,b,v,y.drawSymbol,it)}function Q(t,i,o,n,e){for(var a=function(t,i,o,n,e){var a,r=[],l=[],c=n*n+1;for(a=s.length-1;a>=0;--a)if(o(a)){var u=s[a];if(!u.datapoints)return;var f=!1;if(u.lines.show||u.points.show){var h=$(u,t,i,n,e);h&&(l.push({seriesIndex:a,dataIndex:h.dataIndex,distance:h.distance}),f=!0)}if(u.bars.show&&!f){var d=J(u,t,i);d>=0&&l.push({seriesIndex:a,dataIndex:d,distance:c})}}for(a=0;a<l.length;a++){var p=l[a].seriesIndex,m=l[a].dataIndex,x=l[a].distance,g=s[p].datapoints.pointsize;r.push({datapoint:s[p].datapoints.points.slice(m*g,(m+1)*g),dataIndex:m,series:s[p],seriesIndex:p,distance:Math.sqrt(x)})}return r}(t,i,o,n,e),r=0;r<s.length;++r)o(r)&&N(k.findNearbyItems,[t,i,s,r,n,e,a]);return a.sort((t,i)=>void 0===i.distance?-1:void 0===t.distance&&void 0!==i.distance?1:t.distance-i.distance)}function $(t,i,o,n,e){var a=t.xaxis.c2p(i),r=t.yaxis.c2p(o),l=n/t.xaxis.scale,s=n/t.yaxis.scale,c=t.datapoints.points,u=t.datapoints.pointsize,f=Number.POSITIVE_INFINITY;t.xaxis.options.inverseTransform&&(l=Number.MAX_VALUE),t.yaxis.options.inverseTransform&&(s=Number.MAX_VALUE);for(var h=null,d=0;d<c.length;d+=u){var p=c[d],m=c[d+1];if(null!=p&&!(p-a>l||p-a<-l||m-r>s||m-r<-s)){var x=Math.abs(t.xaxis.p2c(p)-i),g=Math.abs(t.yaxis.p2c(m)-o),b=e?e(x,g):x*x+g*g;b<f&&(f=b,h={dataIndex:d/u,distance:b})}}return h}function J(t,i,o){var n,e,a=t.bars.barWidth[0]||t.bars.barWidth,r=t.xaxis.c2p(i),l=t.yaxis.c2p(o),s=t.datapoints.points,c=t.datapoints.pointsize;switch(t.bars.align){case"left":n=0;break;case"right":n=-a;break;default:n=-a/2}e=n+a;for(var u=t.bars.fillTowards||0,f=u>t.yaxis.min?Math.min(t.yaxis.max,u):t.yaxis.min,h=-1,d=0;d<s.length;d+=c){var p=s[d],m=s[d+1];if(null!=p){var x=3===c?s[d+2]:f;(t.bars.horizontal?r<=Math.max(x,p)&&r>=Math.min(x,p)&&l>=m+n&&l<=m+e:r>=p+n&&r<=p+e&&l>=Math.min(x,m)&&l<=Math.max(x,m))&&(h=d/c)}}return h}function Z(){var t=c.interaction.redrawOverlayInterval;-1!==t?M||(M=setTimeout((function(){tt(y)}),t)):tt()}function tt(t){if(M=null,p){f.clear(),N(k.drawOverlay,[p,f]);var i=new CustomEvent("onDrawingDone");t.getEventHolder().dispatchEvent(i),t.getPlaceholder().trigger("drawingdone")}}function it(i,o,n,e){if("string"==typeof i)return i;for(var a=d.createLinearGradient(0,n,0,o),r=0,l=i.colors.length;r<l;++r){var s=i.colors[r];if("string"!=typeof s){var c=t.color.parse(e);null!=s.brightness&&(c=c.scale("rgb",s.brightness)),null!=s.opacity&&(c.a*=s.opacity),s=c.toString()}a.addColorStop(r/(l-1),s)}return a}!function(){for(var o={Canvas:i},n=0;n<l.length;++n){var e=l[n];e.init(y,o),e.options&&t.extend(!0,c,e.options)}}(),function(){e.css("padding",0).children().filter((function(){return!t(this).hasClass("flot-overlay")&&!t(this).hasClass("flot-base")})).remove(),"static"===e.css("position")&&e.css("position","relative");u=new i("flot-base",e[0]),f=new i("flot-overlay",e[0]),d=u.context,p=f.context,h=t(f.element).unbind();var o=e.data("plot");o&&(o.shutdown(),f.clear());e.data("plot",y)}(),function(i){t.extend(!0,c,i),i&&i.colors&&(c.colors=i.colors);null==c.xaxis.color&&(c.xaxis.color=t.color.parse(c.grid.color).scale("a",.22).toString());null==c.yaxis.color&&(c.yaxis.color=t.color.parse(c.grid.color).scale("a",.22).toString());null==c.xaxis.tickColor&&(c.xaxis.tickColor=c.grid.tickColor||c.xaxis.color);null==c.yaxis.tickColor&&(c.yaxis.tickColor=c.grid.tickColor||c.yaxis.color);null==c.grid.borderColor&&(c.grid.borderColor=c.grid.color);null==c.grid.tickColor&&(c.grid.tickColor=t.color.parse(c.grid.color).scale("a",.22).toString());var o,n,a,r=e.css("font-size"),l=r?+r.replace("px",""):13,s={style:e.css("font-style"),size:Math.round(.8*l),variant:e.css("font-variant"),weight:e.css("font-weight"),family:e.css("font-family")};for(a=c.xaxes.length||1,o=0;o<a;++o)(n=c.xaxes[o])&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},c.xaxis,n),c.xaxes[o]=n,n.font&&(n.font=t.extend({},s,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(a=c.yaxes.length||1,o=0;o<a;++o)(n=c.yaxes[o])&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},c.yaxis,n),c.yaxes[o]=n,n.font&&(n.font=t.extend({},s,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(o=0;o<c.xaxes.length;++o)C(m,o+1).options=c.xaxes[o];for(o=0;o<c.yaxes.length;++o)C(x,o+1).options=c.yaxes[o];for(var u in t.each(z(),(function(t,i){i.boxPosition=i.options.boxPosition||{centerX:0,centerY:0}})),k)c.hooks[u]&&c.hooks[u].length&&(k[u]=k[u].concat(c.hooks[u]));N(k.processOptions,[c])}(r),W(a),P(!0),G(),N(k.bindEvents,[h])}t.plot=function(i,o,n){return new r(t(i),o,n,t.plot.plugins)},t.plot.version="3.0.0",t.plot.plugins=[],t.fn.plot=function(i,o){return this.each((function(){t.plot(this,i,o)}))},t.plot.linearTickGenerator=o,t.plot.defaultTickFormatter=n,t.plot.expRepTickFormatter=e}(jQuery);
--- a/src/myams/resources/js/ext/flot/jquery.flot.navigate.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.navigate.js	Fri Dec 11 11:45:23 2020 +0100
@@ -38,7 +38,9 @@
         axisZoom: true, //zoom axis when mouse over it is allowed
         plotZoom: true, //zoom axis is allowed for plot zoom
         axisPan: true, //pan axis when mouse over it is allowed
-        plotPan: true //pan axis is allowed for plot pan
+        plotPan: true, //pan axis is allowed for plot pan
+        panRange: [undefined, undefined], // no limit on pan range, or [min, max] in axis units
+        zoomRange: [undefined, undefined], // no limit on zoom range, or [closest zoom, furthest zoom] in axis units
     }
 
     yaxis: {
@@ -46,6 +48,8 @@
         plotZoom: true, //zoom axis is allowed for plot zoom
         axisPan: true, //pan axis when mouse over it is allowed
         plotPan: true //pan axis is allowed for plot pan
+        panRange: [undefined, undefined], // no limit on pan range, or [min, max] in axis units
+        zoomRange: [undefined, undefined], // no limit on zoom range, or [closest zoom, furthest zoom] in axis units
     }
 ```
 **interactive** enables the built-in drag/click behaviour. If you enable
@@ -124,13 +128,17 @@
             axisZoom: true, //zoom axis when mouse over it is allowed
             plotZoom: true, //zoom axis is allowed for plot zoom
             axisPan: true, //pan axis when mouse over it is allowed
-            plotPan: true //pan axis is allowed for plot pan
+            plotPan: true, //pan axis is allowed for plot pan
+            panRange: [undefined, undefined], // no limit on pan range, or [min, max] in axis units
+            zoomRange: [undefined, undefined] // no limit on zoom range, or [closest zoom, furthest zoom] in axis units
         },
         yaxis: {
             axisZoom: true,
             plotZoom: true,
             axisPan: true,
-            plotPan: true
+            plotPan: true,
+            panRange: [undefined, undefined], // no limit on pan range, or [min, max] in axis units
+            zoomRange: [undefined, undefined] // no limit on zoom range, or [closest zoom, furthest zoom] in axis units
         }
     };
 
@@ -282,10 +290,10 @@
                 prevDragPosition.y = page.Y;
             }
         }
-        
+
         function onDrag(e) {
-            if (!isPanAction) { 
-                return; 
+            if (!isPanAction) {
+                return;
             }
 
             var page = browser.getPageXY(e);
@@ -332,8 +340,8 @@
         }
 
         function onDragEnd(e) {
-            if (!isPanAction) { 
-                return; 
+            if (!isPanAction) {
+                return;
             }
 
             if (panTimeout) {
@@ -490,6 +498,18 @@
                     max = tmp;
                 }
 
+                // test for zoom limits zoomRange: [min,max]
+                if (opts.zoomRange) {
+                    // zoomed in too far
+                    if (max - min < opts.zoomRange[0]) {
+                        continue;
+                    }
+                    // zoomed out to far
+                    if (max - min > opts.zoomRange[1]) {
+                        continue;
+                    }
+                }
+
                 var offsetBelow = $.plot.saturated.saturate(navigationOffset.below - (axis.min - min));
                 var offsetAbove = $.plot.saturated.saturate(navigationOffset.above - (axis.max - max));
                 opts.offset = { below: offsetBelow, above: offsetAbove };
@@ -521,6 +541,14 @@
                     return;
                 }
 
+                // calc min delta (revealing left edge of plot)
+                var minD = axis.p2c(opts.panRange[0]) - axis.p2c(axis.min);
+                // calc max delta (revealing right edge of plot)
+                var maxD = axis.p2c(opts.panRange[1]) - axis.p2c(axis.max);
+                // limit delta to min or max if enabled
+                if (opts.panRange[0] !== undefined && d >= maxD) d = maxD;
+                if (opts.panRange[1] !== undefined && d <= minD) d = minD;
+
                 if (d !== 0) {
                     var navigationOffsetBelow = saturated.saturate(axis.c2p(axis.p2c(axis.min) + d) - axis.c2p(axis.p2c(axis.min))),
                         navigationOffsetAbove = saturated.saturate(axis.c2p(axis.p2c(axis.max) + d) - axis.c2p(axis.p2c(axis.max)));
@@ -675,6 +703,14 @@
                     return;
                 }
 
+                // calc min delta (revealing left edge of plot)
+                var minD = p + axis.p2c(opts.panRange[0]) - axis.p2c(axisMin);
+                // calc max delta (revealing right edge of plot)
+                var maxD = p + axis.p2c(opts.panRange[1]) - axis.p2c(axisMax);
+                // limit delta to min or max if enabled
+                if (opts.panRange[0] !== undefined && d >= maxD) d = maxD;
+                if (opts.panRange[1] !== undefined && d <= minD) d = minD;
+
                 if (d !== 0) {
                     var navigationOffsetBelow = saturated.saturate(axis.c2p(axis.p2c(axisMin) - (p - d)) - axis.c2p(axis.p2c(axisMin))),
                         navigationOffsetAbove = saturated.saturate(axis.c2p(axis.p2c(axisMax) - (p - d)) - axis.c2p(axis.p2c(axisMax)));
--- a/src/myams/resources/js/ext/flot/jquery.flot.navigate.min.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.navigate.min.js	Fri Dec 11 11:45:23 2020 +0100
@@ -1,1 +1,1 @@
-!function(t){"use strict";var e=t.plot.saturated,a=t.plot.browser,o=t.plot.uiConstants.SNAPPING_CONSTANT,n=t.plot.uiConstants.PANHINT_LENGTH_CONSTANT;function i(i,r){var s=null,f=!1,l="manual"===r.pan.mode,u="smartLock"===r.pan.mode,c=u||"smart"===r.pan.mode;var p,d="default",g=null,x=null,v={x:0,y:0},m=!1;function h(t,e){var o=Math.abs(t.originalEvent.deltaY)<=1?1+Math.abs(t.originalEvent.deltaY)/50:null;if(m&&M(t),i.getOptions().zoom.active)return t.preventDefault(),function(t,e,o){var n=a.getPageXY(t),r=i.offset();r.left=n.X-r.left,r.top=n.Y-r.top;var s=i.getPlaceholder().offset();s.left=n.X-s.left,s.top=n.Y-s.top;var f=i.getXAxes().concat(i.getYAxes()).filter((function(t){var e=t.box;if(void 0!==e)return s.left>e.left&&s.left<e.left+e.width&&s.top>e.top&&s.top<e.top+e.height}));0===f.length&&(f=void 0),e?i.zoomOut({center:r,axes:f,amount:o}):i.zoom({center:r,axes:f,amount:o})}(t,e<0,o),!1}function b(t){f=!0}function y(t){f=!1}function P(t){if(!f||!function(t){return 0===t.button}(t))return!1;m=!0;var e=a.getPageXY(t),o=i.getPlaceholder().offset();o.left=e.X-o.left,o.top=e.Y-o.top,0===(s=i.getXAxes().concat(i.getYAxes()).filter((function(t){var e=t.box;if(void 0!==e)return o.left>e.left&&o.left<e.left+e.width&&o.top>e.top&&o.top<e.top+e.height}))).length&&(s=void 0);var n=i.getPlaceholder().css("cursor");n&&(d=n),i.getPlaceholder().css("cursor",i.getOptions().pan.cursor),c?p=i.navigationState(e.X,e.Y):l&&(v.x=e.X,v.y=e.Y)}function w(t){if(m){var e=a.getPageXY(t),o=i.getOptions().pan.frameRate;-1!==o?!x&&o&&(x=setTimeout((function(){c?i.smartPan({x:p.startPageX-e.X,y:p.startPageY-e.Y},p,s,!1,u):l&&(i.pan({left:v.x-e.X,top:v.y-e.Y,axes:s}),v.x=e.X,v.y=e.Y),x=null}),1/o*1e3)):c?i.smartPan({x:p.startPageX-e.X,y:p.startPageY-e.Y},p,s,!1,u):l&&(i.pan({left:v.x-e.X,top:v.y-e.Y,axes:s}),v.x=e.X,v.y=e.Y)}}function M(t){if(m){x&&(clearTimeout(x),x=null),m=!1;var e=a.getPageXY(t);i.getPlaceholder().css("cursor",d),c?(i.smartPan({x:p.startPageX-e.X,y:p.startPageY-e.Y},p,s,!1,u),i.smartPan.end()):l&&(i.pan({left:v.x-e.X,top:v.y-e.Y,axes:s}),v.x=0,v.y=0)}}function Y(e){if(i.activate(),i.getOptions().recenter.interactive){var a,o=i.getTouchedAxis(e.clientX,e.clientY);i.recenter({axes:o[0]?o:null}),a=o[0]?new t.Event("re-center",{detail:{axisTouched:o[0]}}):new t.Event("re-center",{detail:e}),i.getPlaceholder().trigger(a)}}function O(t){return i.activate(),m&&M(t),!1}i.navigationState=function(t,e){var a=this.getAxes(),o={};return Object.keys(a).forEach((function(t){var e=a[t];o[t]={navigationOffset:{below:e.options.offset.below||0,above:e.options.offset.above||0},axisMin:e.min,axisMax:e.max,diagMode:!1}})),o.startPageX=t||0,o.startPageY=e||0,o},i.activate=function(){var t=i.getOptions();t.pan.active&&t.zoom.active||(t.pan.active=!0,t.zoom.active=!0,i.getPlaceholder().trigger("plotactivated",[i]))},i.zoomOut=function(t){t||(t={}),t.amount||(t.amount=i.getOptions().zoom.amount),t.amount=1/t.amount,i.zoom(t)},i.zoom=function(e){e||(e={});var a=e.center,o=e.amount||i.getOptions().zoom.amount,n=i.width(),r=i.height(),s=e.axes||i.getAxes();a||(a={left:n/2,top:r/2});var f=a.left/n,l=a.top/r,u={x:{min:a.left-f*n/o,max:a.left+(1-f)*n/o},y:{min:a.top-l*r/o,max:a.top+(1-l)*r/o}};for(var c in s)if(s.hasOwnProperty(c)){var p=s[c],d=p.options,g=u[p.direction].min,x=u[p.direction].max,v=p.options.offset;if((d.axisZoom||!e.axes)&&(e.axes||d.plotZoom)){if((g=t.plot.saturated.saturate(p.c2p(g)))>(x=t.plot.saturated.saturate(p.c2p(x)))){var m=g;g=x,x=m}var h=t.plot.saturated.saturate(v.below-(p.min-g)),b=t.plot.saturated.saturate(v.above-(p.max-x));d.offset={below:h,above:b}}}i.setupGrid(!0),i.draw(),e.preventEvent||i.getPlaceholder().trigger("plotzoom",[i,e])},i.pan=function(a){var o={x:+a.left,y:+a.top};isNaN(o.x)&&(o.x=0),isNaN(o.y)&&(o.y=0),t.each(a.axes||i.getAxes(),(function(t,n){var i=n.options,r=o[n.direction];if((i.axisPan||!a.axes)&&(i.plotPan||a.axes)&&0!==r){var s=e.saturate(n.c2p(n.p2c(n.min)+r)-n.c2p(n.p2c(n.min))),f=e.saturate(n.c2p(n.p2c(n.max)+r)-n.c2p(n.p2c(n.max)));isFinite(s)||(s=0),isFinite(f)||(f=0),i.offset={below:e.saturate(s+(i.offset.below||0)),above:e.saturate(f+(i.offset.above||0))}}})),i.setupGrid(!0),i.draw(),a.preventEvent||i.getPlaceholder().trigger("plotpan",[i,a])},i.recenter=function(e){t.each(e.axes||i.getAxes(),(function(t,a){e.axes?"x"===this.direction?a.options.offset={below:0}:"y"===this.direction&&(a.options.offset={above:0}):a.options.offset={below:0,above:0}})),i.setupGrid(!0),i.draw()};var X=null,T={x:0,y:0};i.smartPan=function(t,a,n,r,s){var f,l,u,c,p,d,x=!!s||function(t){return Math.abs(t.y)<o&&Math.abs(t.x)>=o||Math.abs(t.x)<o&&Math.abs(t.y)>=o}(t),v=i.getAxes();(function(t){return Math.abs(t.x)>0&&Math.abs(t.y)>0})(t=s?function(t){switch(!X&&Math.max(Math.abs(t.x),Math.abs(t.y))>=o&&(X=Math.abs(t.x)<Math.abs(t.y)?"y":"x"),X){case"x":return{x:t.x,y:0};case"y":return{x:0,y:t.y};default:return{x:0,y:0}}}(t):function(t){return Math.abs(t.x)<o&&Math.abs(t.y)>=o?{x:0,y:t.y}:Math.abs(t.y)<o&&Math.abs(t.x)>=o?{x:t.x,y:0}:t}(t))&&(a.diagMode=!0),x&&!0===a.diagMode&&(a.diagMode=!1,function(t,e,a){var o;Object.keys(t).forEach((function(n){o=t[n],0===a[o.direction]&&(o.options.offset.below=e[n].navigationOffset.below,o.options.offset.above=e[n].navigationOffset.above)}))}(v,a,t)),g=x?{start:{x:a.startPageX-i.offset().left+i.getPlotOffset().left,y:a.startPageY-i.offset().top+i.getPlotOffset().top},end:{x:a.startPageX-t.x-i.offset().left+i.getPlotOffset().left,y:a.startPageY-t.y-i.offset().top+i.getPlotOffset().top}}:{start:{x:a.startPageX-i.offset().left+i.getPlotOffset().left,y:a.startPageY-i.offset().top+i.getPlotOffset().top},end:!1},isNaN(t.x)&&(t.x=0),isNaN(t.y)&&(t.y=0),n&&(v=n),Object.keys(v).forEach((function(a){if(l=v[a],u=l.min,c=l.max,f=l.options,d=t[l.direction],p=T[l.direction],(f.axisPan||!n)&&(n||f.plotPan)&&0!==d){var o=e.saturate(l.c2p(l.p2c(u)-(p-d))-l.c2p(l.p2c(u))),i=e.saturate(l.c2p(l.p2c(c)-(p-d))-l.c2p(l.p2c(c)));isFinite(o)||(o=0),isFinite(i)||(i=0),l.options.offset.below=e.saturate(o+(l.options.offset.below||0)),l.options.offset.above=e.saturate(i+(l.options.offset.above||0))}})),T=t,i.setupGrid(!0),i.draw(),r||i.getPlaceholder().trigger("plotpan",[i,t,n,a])},i.smartPan.end=function(){g=null,X=null,T={x:0,y:0},i.triggerRedrawOverlay()},i.getTouchedAxis=function(t,e){var a=i.getPlaceholder().offset();return a.left=t-a.left,a.top=e-a.top,i.getXAxes().concat(i.getYAxes()).filter((function(t){var e=t.box;if(void 0!==e)return a.left>e.left&&a.left<e.left+e.width&&a.top>e.top&&a.top<e.top+e.height}))},i.hooks.drawOverlay.push((function(t,e){if(g){e.strokeStyle="rgba(96, 160, 208, 0.7)",e.lineWidth=2,e.lineJoin="round";var a,o,i=Math.round(g.start.x),r=Math.round(g.start.y);if(s?"x"===s[0].direction?(o=Math.round(g.start.y),a=Math.round(g.end.x)):"y"===s[0].direction&&(a=Math.round(g.start.x),o=Math.round(g.end.y)):(a=Math.round(g.end.x),o=Math.round(g.end.y)),e.beginPath(),!1===g.end)e.moveTo(i,r-n),e.lineTo(i,r+n),e.moveTo(i+n,r),e.lineTo(i-n,r);else{var f=r===o;e.moveTo(i-(f?0:n),r-(f?n:0)),e.lineTo(i+(f?0:n),r+(f?n:0)),e.moveTo(i,r),e.lineTo(a,o),e.moveTo(a-(f?0:n),o-(f?n:0)),e.lineTo(a+(f?0:n),o+(f?n:0))}e.stroke()}})),i.hooks.bindEvents.push((function(t,e){var a=t.getOptions();a.zoom.interactive&&e.mousewheel(h),a.pan.interactive&&(t.addEventHandler("dragstart",P,e,0),t.addEventHandler("drag",w,e,0),t.addEventHandler("dragend",M,e,0),e.bind("mousedown",b),e.bind("mouseup",y)),e.dblclick(Y),e.click(O)})),i.hooks.shutdown.push((function(t,e){e.unbind("mousewheel",h),e.unbind("mousedown",b),e.unbind("mouseup",y),e.unbind("dragstart",P),e.unbind("drag",w),e.unbind("dragend",M),e.unbind("dblclick",Y),e.unbind("click",O),x&&clearTimeout(x)}))}t.plot.plugins.push({init:function(t){t.hooks.processOptions.push(i)},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);
+!function(t){"use strict";var e={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,panRange:[void 0,void 0],zoomRange:[void 0,void 0]},yaxis:{axisZoom:!0,plotZoom:!0,axisPan:!0,plotPan:!0,panRange:[void 0,void 0],zoomRange:[void 0,void 0]}},a=t.plot.saturated,o=t.plot.browser,n=t.plot.uiConstants.SNAPPING_CONSTANT,i=t.plot.uiConstants.PANHINT_LENGTH_CONSTANT;function r(e,r){var s=null,f=!1,c="manual"===r.pan.mode,l="smartLock"===r.pan.mode,u=l||"smart"===r.pan.mode;var p,d="default",g=null,v=null,x={x:0,y:0},m=!1;function h(t,a){var n=Math.abs(t.originalEvent.deltaY)<=1?1+Math.abs(t.originalEvent.deltaY)/50:null;if(m&&M(t),e.getOptions().zoom.active)return t.preventDefault(),function(t,a,n){var i=o.getPageXY(t),r=e.offset();r.left=i.X-r.left,r.top=i.Y-r.top;var s=e.getPlaceholder().offset();s.left=i.X-s.left,s.top=i.Y-s.top;var f=e.getXAxes().concat(e.getYAxes()).filter((function(t){var e=t.box;if(void 0!==e)return s.left>e.left&&s.left<e.left+e.width&&s.top>e.top&&s.top<e.top+e.height}));0===f.length&&(f=void 0),a?e.zoomOut({center:r,axes:f,amount:n}):e.zoom({center:r,axes:f,amount:n})}(t,a<0,n),!1}function b(t){f=!0}function y(t){f=!1}function P(t){if(!f||!function(t){return 0===t.button}(t))return!1;m=!0;var a=o.getPageXY(t),n=e.getPlaceholder().offset();n.left=a.X-n.left,n.top=a.Y-n.top,0===(s=e.getXAxes().concat(e.getYAxes()).filter((function(t){var e=t.box;if(void 0!==e)return n.left>e.left&&n.left<e.left+e.width&&n.top>e.top&&n.top<e.top+e.height}))).length&&(s=void 0);var i=e.getPlaceholder().css("cursor");i&&(d=i),e.getPlaceholder().css("cursor",e.getOptions().pan.cursor),u?p=e.navigationState(a.X,a.Y):c&&(x.x=a.X,x.y=a.Y)}function w(t){if(m){var a=o.getPageXY(t),n=e.getOptions().pan.frameRate;-1!==n?!v&&n&&(v=setTimeout((function(){u?e.smartPan({x:p.startPageX-a.X,y:p.startPageY-a.Y},p,s,!1,l):c&&(e.pan({left:x.x-a.X,top:x.y-a.Y,axes:s}),x.x=a.X,x.y=a.Y),v=null}),1/n*1e3)):u?e.smartPan({x:p.startPageX-a.X,y:p.startPageY-a.Y},p,s,!1,l):c&&(e.pan({left:x.x-a.X,top:x.y-a.Y,axes:s}),x.x=a.X,x.y=a.Y)}}function M(t){if(m){v&&(clearTimeout(v),v=null),m=!1;var a=o.getPageXY(t);e.getPlaceholder().css("cursor",d),u?(e.smartPan({x:p.startPageX-a.X,y:p.startPageY-a.Y},p,s,!1,l),e.smartPan.end()):c&&(e.pan({left:x.x-a.X,top:x.y-a.Y,axes:s}),x.x=0,x.y=0)}}function Y(a){if(e.activate(),e.getOptions().recenter.interactive){var o,n=e.getTouchedAxis(a.clientX,a.clientY);e.recenter({axes:n[0]?n:null}),o=n[0]?new t.Event("re-center",{detail:{axisTouched:n[0]}}):new t.Event("re-center",{detail:a}),e.getPlaceholder().trigger(o)}}function O(t){return e.activate(),m&&M(t),!1}e.navigationState=function(t,e){var a=this.getAxes(),o={};return Object.keys(a).forEach((function(t){var e=a[t];o[t]={navigationOffset:{below:e.options.offset.below||0,above:e.options.offset.above||0},axisMin:e.min,axisMax:e.max,diagMode:!1}})),o.startPageX=t||0,o.startPageY=e||0,o},e.activate=function(){var t=e.getOptions();t.pan.active&&t.zoom.active||(t.pan.active=!0,t.zoom.active=!0,e.getPlaceholder().trigger("plotactivated",[e]))},e.zoomOut=function(t){t||(t={}),t.amount||(t.amount=e.getOptions().zoom.amount),t.amount=1/t.amount,e.zoom(t)},e.zoom=function(a){a||(a={});var o=a.center,n=a.amount||e.getOptions().zoom.amount,i=e.width(),r=e.height(),s=a.axes||e.getAxes();o||(o={left:i/2,top:r/2});var f=o.left/i,c=o.top/r,l={x:{min:o.left-f*i/n,max:o.left+(1-f)*i/n},y:{min:o.top-c*r/n,max:o.top+(1-c)*r/n}};for(var u in s)if(s.hasOwnProperty(u)){var p=s[u],d=p.options,g=l[p.direction].min,v=l[p.direction].max,x=p.options.offset;if((d.axisZoom||!a.axes)&&(a.axes||d.plotZoom)){if((g=t.plot.saturated.saturate(p.c2p(g)))>(v=t.plot.saturated.saturate(p.c2p(v)))){var m=g;g=v,v=m}if(d.zoomRange){if(v-g<d.zoomRange[0])continue;if(v-g>d.zoomRange[1])continue}var h=t.plot.saturated.saturate(x.below-(p.min-g)),b=t.plot.saturated.saturate(x.above-(p.max-v));d.offset={below:h,above:b}}}e.setupGrid(!0),e.draw(),a.preventEvent||e.getPlaceholder().trigger("plotzoom",[e,a])},e.pan=function(o){var n={x:+o.left,y:+o.top};isNaN(n.x)&&(n.x=0),isNaN(n.y)&&(n.y=0),t.each(o.axes||e.getAxes(),(function(t,e){var i=e.options,r=n[e.direction];if((i.axisPan||!o.axes)&&(i.plotPan||o.axes)){var s=e.p2c(i.panRange[0])-e.p2c(e.min),f=e.p2c(i.panRange[1])-e.p2c(e.max);if(void 0!==i.panRange[0]&&r>=f&&(r=f),void 0!==i.panRange[1]&&r<=s&&(r=s),0!==r){var c=a.saturate(e.c2p(e.p2c(e.min)+r)-e.c2p(e.p2c(e.min))),l=a.saturate(e.c2p(e.p2c(e.max)+r)-e.c2p(e.p2c(e.max)));isFinite(c)||(c=0),isFinite(l)||(l=0),i.offset={below:a.saturate(c+(i.offset.below||0)),above:a.saturate(l+(i.offset.above||0))}}}})),e.setupGrid(!0),e.draw(),o.preventEvent||e.getPlaceholder().trigger("plotpan",[e,o])},e.recenter=function(a){t.each(a.axes||e.getAxes(),(function(t,e){a.axes?"x"===this.direction?e.options.offset={below:0}:"y"===this.direction&&(e.options.offset={above:0}):e.options.offset={below:0,above:0}})),e.setupGrid(!0),e.draw()};var X=null,T={x:0,y:0};e.smartPan=function(t,o,i,r,s){var f,c,l,u,p,d,v=!!s||function(t){return Math.abs(t.y)<n&&Math.abs(t.x)>=n||Math.abs(t.x)<n&&Math.abs(t.y)>=n}(t),x=e.getAxes();(function(t){return Math.abs(t.x)>0&&Math.abs(t.y)>0})(t=s?function(t){switch(!X&&Math.max(Math.abs(t.x),Math.abs(t.y))>=n&&(X=Math.abs(t.x)<Math.abs(t.y)?"y":"x"),X){case"x":return{x:t.x,y:0};case"y":return{x:0,y:t.y};default:return{x:0,y:0}}}(t):function(t){return Math.abs(t.x)<n&&Math.abs(t.y)>=n?{x:0,y:t.y}:Math.abs(t.y)<n&&Math.abs(t.x)>=n?{x:t.x,y:0}:t}(t))&&(o.diagMode=!0),v&&!0===o.diagMode&&(o.diagMode=!1,function(t,e,a){var o;Object.keys(t).forEach((function(n){o=t[n],0===a[o.direction]&&(o.options.offset.below=e[n].navigationOffset.below,o.options.offset.above=e[n].navigationOffset.above)}))}(x,o,t)),g=v?{start:{x:o.startPageX-e.offset().left+e.getPlotOffset().left,y:o.startPageY-e.offset().top+e.getPlotOffset().top},end:{x:o.startPageX-t.x-e.offset().left+e.getPlotOffset().left,y:o.startPageY-t.y-e.offset().top+e.getPlotOffset().top}}:{start:{x:o.startPageX-e.offset().left+e.getPlotOffset().left,y:o.startPageY-e.offset().top+e.getPlotOffset().top},end:!1},isNaN(t.x)&&(t.x=0),isNaN(t.y)&&(t.y=0),i&&(x=i),Object.keys(x).forEach((function(e){if(c=x[e],l=c.min,u=c.max,f=c.options,d=t[c.direction],p=T[c.direction],(f.axisPan||!i)&&(i||f.plotPan)){var o=p+c.p2c(f.panRange[0])-c.p2c(l),n=p+c.p2c(f.panRange[1])-c.p2c(u);if(void 0!==f.panRange[0]&&d>=n&&(d=n),void 0!==f.panRange[1]&&d<=o&&(d=o),0!==d){var r=a.saturate(c.c2p(c.p2c(l)-(p-d))-c.c2p(c.p2c(l))),s=a.saturate(c.c2p(c.p2c(u)-(p-d))-c.c2p(c.p2c(u)));isFinite(r)||(r=0),isFinite(s)||(s=0),c.options.offset.below=a.saturate(r+(c.options.offset.below||0)),c.options.offset.above=a.saturate(s+(c.options.offset.above||0))}}})),T=t,e.setupGrid(!0),e.draw(),r||e.getPlaceholder().trigger("plotpan",[e,t,i,o])},e.smartPan.end=function(){g=null,X=null,T={x:0,y:0},e.triggerRedrawOverlay()},e.getTouchedAxis=function(t,a){var o=e.getPlaceholder().offset();return o.left=t-o.left,o.top=a-o.top,e.getXAxes().concat(e.getYAxes()).filter((function(t){var e=t.box;if(void 0!==e)return o.left>e.left&&o.left<e.left+e.width&&o.top>e.top&&o.top<e.top+e.height}))},e.hooks.drawOverlay.push((function(t,e){if(g){e.strokeStyle="rgba(96, 160, 208, 0.7)",e.lineWidth=2,e.lineJoin="round";var a,o,n=Math.round(g.start.x),r=Math.round(g.start.y);if(s?"x"===s[0].direction?(o=Math.round(g.start.y),a=Math.round(g.end.x)):"y"===s[0].direction&&(a=Math.round(g.start.x),o=Math.round(g.end.y)):(a=Math.round(g.end.x),o=Math.round(g.end.y)),e.beginPath(),!1===g.end)e.moveTo(n,r-i),e.lineTo(n,r+i),e.moveTo(n+i,r),e.lineTo(n-i,r);else{var f=r===o;e.moveTo(n-(f?0:i),r-(f?i:0)),e.lineTo(n+(f?0:i),r+(f?i:0)),e.moveTo(n,r),e.lineTo(a,o),e.moveTo(a-(f?0:i),o-(f?i:0)),e.lineTo(a+(f?0:i),o+(f?i:0))}e.stroke()}})),e.hooks.bindEvents.push((function(t,e){var a=t.getOptions();a.zoom.interactive&&e.mousewheel(h),a.pan.interactive&&(t.addEventHandler("dragstart",P,e,0),t.addEventHandler("drag",w,e,0),t.addEventHandler("dragend",M,e,0),e.bind("mousedown",b),e.bind("mouseup",y)),e.dblclick(Y),e.click(O)})),e.hooks.shutdown.push((function(t,e){e.unbind("mousewheel",h),e.unbind("mousedown",b),e.unbind("mouseup",y),e.unbind("dragstart",P),e.unbind("drag",w),e.unbind("dragend",M),e.unbind("dblclick",Y),e.unbind("click",O),v&&clearTimeout(v)}))}t.plot.plugins.push({init:function(t){t.hooks.processOptions.push(r)},options:e,name:"navigate",version:"1.3"})}(jQuery);
--- a/src/myams/resources/js/ext/flot/jquery.flot.pie.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.pie.js	Fri Dec 11 11:45:23 2020 +0100
@@ -119,6 +119,7 @@
             if (options.series.pie.show) {
                 if (options.grid.hoverable) {
                     eventHolder.unbind("mousemove").mousemove(onMouseMove);
+                    eventHolder.bind("mouseleave", onMouseMove);
                 }
                 if (options.grid.clickable) {
                     eventHolder.unbind("click").click(onClick);
@@ -126,6 +127,13 @@
             }
         });
 
+        plot.hooks.shutdown.push(function (plot, eventHolder) {
+            eventHolder.unbind("mousemove", onMouseMove);
+            eventHolder.unbind("mouseleave", onMouseMove);
+            eventHolder.unbind("click", onClick);
+            highlights = [];
+        });
+
         plot.hooks.processDatapoints.push(function(plot, series, data, datapoints) {
             var options = plot.getOptions();
             if (options.series.pie.show) {
--- a/src/myams/resources/js/ext/flot/jquery.flot.pie.min.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.pie.min.js	Fri Dec 11 11:45:23 2020 +0100
@@ -1,1 +1,1 @@
-!function(e){var i=10,s=.95;var t={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,i){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+i.color+";'>"+e+"<br/>"+Math.round(i.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(t){var r=null,a=null,l=null,n=null,o=null,p=null,h=!1,g=null,c=[];function u(i,s,t){h||(h=!0,r=i.getCanvas(),a=e(r).parent(),l=i.getOptions(),i.setData(function(i){var s,t,r=0,a=0,n=0,o=l.series.pie.combine.color,p=[];for(s=0;s<i.length;++s)t=i[s].data,e.isArray(t)&&1===t.length&&(t=t[0]),e.isArray(t)?!isNaN(parseFloat(t[1]))&&isFinite(t[1])?t[1]=+t[1]:t[1]=0:t=!isNaN(parseFloat(t))&&isFinite(t)?[1,+t]:[1,0],i[s].data=[t];for(s=0;s<i.length;++s)r+=i[s].data[0][1];for(s=0;s<i.length;++s)(t=i[s].data[0][1])/r<=l.series.pie.combine.threshold&&(a+=t,n++,o||(o=i[s].color));for(s=0;s<i.length;++s)t=i[s].data[0][1],(n<2||t/r>l.series.pie.combine.threshold)&&p.push(e.extend(i[s],{data:[[1,t]],color:i[s].color,label:i[s].label,angle:t*Math.PI*2/r,percent:t/(r/100)}));n>1&&p.push({data:[[1,a]],color:o,label:l.series.pie.combine.label,angle:a*Math.PI*2/r,percent:a/(r/100)});return p}(i.getData())))}function d(t,r){if(a){var c=t.getPlaceholder().width(),u=t.getPlaceholder().height(),d=a.children().filter(".legend").children().width()||0;g=r,h=!1,n=Math.min(c,u/l.series.pie.tilt)/2,p=u/2+l.series.pie.offset.top,o=c/2,"auto"===l.series.pie.offset.left?(l.legend.position.match("w")?o+=d/2:o-=d/2,o<n?o=n:o>c-n&&(o=c-n)):o+=l.series.pie.offset.left;var v=t.getData(),b=0;do{b>0&&(n*=s),b+=1,w(),l.series.pie.tilt<=.8&&k()}while(!M()&&b<i);b>=i&&(w(),a.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>")),t.setSeries&&t.insertLegend&&(t.setSeries(v),t.insertLegend())}function w(){g.clearRect(0,0,c,u),a.children().filter(".pieLabel, .pieLabelBackground").remove()}function k(){var e=l.series.pie.shadow.left,i=l.series.pie.shadow.top,s=l.series.pie.shadow.alpha,t=l.series.pie.radius>1?l.series.pie.radius:n*l.series.pie.radius;if(!(t>=c/2-e||t*l.series.pie.tilt>=u/2-i||t<=10)){g.save(),g.translate(e,i),g.globalAlpha=s,g.fillStyle="#000",g.translate(o,p),g.scale(1,l.series.pie.tilt);for(var r=1;r<=10;r++)g.beginPath(),g.arc(0,0,t,0,2*Math.PI,!1),g.fill(),t-=r;g.restore()}}function M(){var i,s=Math.PI*l.series.pie.startAngle,t=l.series.pie.radius>1?l.series.pie.radius:n*l.series.pie.radius;g.save(),g.translate(o,p),g.scale(1,l.series.pie.tilt),g.save();var r=s;for(i=0;i<v.length;++i)v[i].startAngle=r,h(v[i].angle,v[i].color,!0);if(g.restore(),l.series.pie.stroke.width>0){for(g.save(),g.lineWidth=l.series.pie.stroke.width,r=s,i=0;i<v.length;++i)h(v[i].angle,l.series.pie.stroke.color,!1);g.restore()}return f(g),g.restore(),!l.series.pie.label.show||function(){for(var i=s,t=l.series.pie.label.radius>1?l.series.pie.label.radius:n*l.series.pie.label.radius,r=0;r<v.length;++r){if(v[r].percent>=100*l.series.pie.label.threshold&&!h(v[r],i,r))return!1;i+=v[r].angle}return!0;function h(i,s,r){if(0===i.data[0][1])return!0;var n,h=l.legend.labelFormatter,g=l.series.pie.label.formatter;n=h?h(i.label,i):i.label,g&&(n=g(n,i));var d=(s+i.angle+s)/2,f=o+Math.round(Math.cos(d)*t),v=p+Math.round(Math.sin(d)*t)*l.series.pie.tilt,b="<span class='pieLabel' id='pieLabel"+r+"' style='position:absolute;top:"+v+"px;left:"+f+"px;'>"+n+"</span>";a.append(b);var w=a.children("#pieLabel"+r),k=v-w.height()/2,M=f-w.width()/2;if(w.css("top",k),w.css("left",M),0-k>0||0-M>0||u-(k+w.height())<0||c-(M+w.width())<0)return!1;if(0!==l.series.pie.label.background.opacity){var P=l.series.pie.label.background.color;null==P&&(P=i.color);var A="top:"+k+"px;left:"+M+"px;";e("<div class='pieLabelBackground' style='position:absolute;width:"+w.width()+"px;height:"+w.height()+"px;"+A+"background-color:"+P+";'></div>").css("opacity",l.series.pie.label.background.opacity).insertBefore(w)}return!0}}();function h(e,i,s){e<=0||isNaN(e)||(s?g.fillStyle=i:(g.strokeStyle=i,g.lineJoin="round"),g.beginPath(),Math.abs(e-2*Math.PI)>1e-9&&g.moveTo(0,0),g.arc(0,0,t,r,r+e/2,!1),g.arc(0,0,t,r+e/2,r+e,!1),g.closePath(),r+=e,s?g.fill():g.stroke())}}}function f(e){if(l.series.pie.innerRadius>0){e.save();var i=l.series.pie.innerRadius>1?l.series.pie.innerRadius:n*l.series.pie.innerRadius;e.globalCompositeOperation="destination-out",e.beginPath(),e.fillStyle=l.series.pie.stroke.color,e.arc(0,0,i,0,2*Math.PI,!1),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.strokeStyle=l.series.pie.stroke.color,e.arc(0,0,i,0,2*Math.PI,!1),e.stroke(),e.closePath(),e.restore()}}function v(e,i){for(var s=!1,t=-1,r=e.length,a=r-1;++t<r;a=t)(e[t][1]<=i[1]&&i[1]<e[a][1]||e[a][1]<=i[1]&&i[1]<e[t][1])&&i[0]<(e[a][0]-e[t][0])*(i[1]-e[t][1])/(e[a][1]-e[t][1])+e[t][0]&&(s=!s);return s}function b(e){k("plothover",e)}function w(e){k("plotclick",e)}function k(e,i){var s=t.offset(),r=function(e,i){for(var s,r,a=t.getData(),l=t.getOptions(),h=l.series.pie.radius>1?l.series.pie.radius:n*l.series.pie.radius,c=0;c<a.length;++c){var u=a[c];if(u.pie.show){if(g.save(),g.beginPath(),g.moveTo(0,0),g.arc(0,0,h,u.startAngle,u.startAngle+u.angle/2,!1),g.arc(0,0,h,u.startAngle+u.angle/2,u.startAngle+u.angle,!1),g.closePath(),s=e-o,r=i-p,g.isPointInPath){if(g.isPointInPath(e-o,i-p))return g.restore(),{datapoint:[u.percent,u.data],dataIndex:0,series:u,seriesIndex:c}}else if(v([[0,0],[h*Math.cos(u.startAngle),h*Math.sin(u.startAngle)],[h*Math.cos(u.startAngle+u.angle/4),h*Math.sin(u.startAngle+u.angle/4)],[h*Math.cos(u.startAngle+u.angle/2),h*Math.sin(u.startAngle+u.angle/2)],[h*Math.cos(u.startAngle+u.angle/1.5),h*Math.sin(u.startAngle+u.angle/1.5)],[h*Math.cos(u.startAngle+u.angle),h*Math.sin(u.startAngle+u.angle)]],[s,r]))return g.restore(),{datapoint:[u.percent,u.data],dataIndex:0,series:u,seriesIndex:c};g.restore()}}return null}(parseInt(i.pageX-s.left),parseInt(i.pageY-s.top));if(l.grid.autoHighlight)for(var h=0;h<c.length;++h){var u=c[h];u.auto!==e||r&&u.series===r.series||M(u.series)}r&&function(e,i){var s=P(e);-1===s?(c.push({series:e,auto:i}),t.triggerRedrawOverlay()):i||(c[s].auto=!1)}(r.series,e);var d={pageX:i.pageX,pageY:i.pageY};a.trigger(e,[d,r])}function M(e){null==e&&(c=[],t.triggerRedrawOverlay());var i=P(e);-1!==i&&(c.splice(i,1),t.triggerRedrawOverlay())}function P(e){for(var i=0;i<c.length;++i){if(c[i].series===e)return i}return-1}t.hooks.processOptions.push((function(e,i){i.series.pie.show&&(i.grid.show=!1,"auto"===i.series.pie.label.show&&(i.legend.show?i.series.pie.label.show=!1:i.series.pie.label.show=!0),"auto"===i.series.pie.radius&&(i.series.pie.label.show?i.series.pie.radius=.75:i.series.pie.radius=1),i.series.pie.tilt>1?i.series.pie.tilt=1:i.series.pie.tilt<0&&(i.series.pie.tilt=0))})),t.hooks.bindEvents.push((function(e,i){var s=e.getOptions();s.series.pie.show&&(s.grid.hoverable&&i.unbind("mousemove").mousemove(b),s.grid.clickable&&i.unbind("click").click(w))})),t.hooks.processDatapoints.push((function(e,i,s,t){e.getOptions().series.pie.show&&u(e,i,s)})),t.hooks.drawOverlay.push((function(e,i){e.getOptions().series.pie.show&&function(e,i){var s=e.getOptions(),t=s.series.pie.radius>1?s.series.pie.radius:n*s.series.pie.radius;i.save(),i.translate(o,p),i.scale(1,s.series.pie.tilt);for(var r=0;r<c.length;++r)a(c[r].series);function a(e){e.angle<=0||isNaN(e.angle)||(i.fillStyle="rgba(255, 255, 255, "+s.series.pie.highlight.opacity+")",i.beginPath(),Math.abs(e.angle-2*Math.PI)>1e-9&&i.moveTo(0,0),i.arc(0,0,t,e.startAngle,e.startAngle+e.angle/2,!1),i.arc(0,0,t,e.startAngle+e.angle/2,e.startAngle+e.angle,!1),i.closePath(),i.fill())}f(i),i.restore()}(e,i)})),t.hooks.draw.push((function(e,i){e.getOptions().series.pie.show&&d(e,i)}))},options:t,name:"pie",version:"1.1"})}(jQuery);
+!function(e){var i=10,s=.95;var t={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,i){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+i.color+";'>"+e+"<br/>"+Math.round(i.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(t){var r=null,a=null,l=null,n=null,o=null,p=null,h=!1,u=null,c=[];function g(i,s,t){h||(h=!0,r=i.getCanvas(),a=e(r).parent(),l=i.getOptions(),i.setData(function(i){var s,t,r=0,a=0,n=0,o=l.series.pie.combine.color,p=[];for(s=0;s<i.length;++s)t=i[s].data,e.isArray(t)&&1===t.length&&(t=t[0]),e.isArray(t)?!isNaN(parseFloat(t[1]))&&isFinite(t[1])?t[1]=+t[1]:t[1]=0:t=!isNaN(parseFloat(t))&&isFinite(t)?[1,+t]:[1,0],i[s].data=[t];for(s=0;s<i.length;++s)r+=i[s].data[0][1];for(s=0;s<i.length;++s)(t=i[s].data[0][1])/r<=l.series.pie.combine.threshold&&(a+=t,n++,o||(o=i[s].color));for(s=0;s<i.length;++s)t=i[s].data[0][1],(n<2||t/r>l.series.pie.combine.threshold)&&p.push(e.extend(i[s],{data:[[1,t]],color:i[s].color,label:i[s].label,angle:t*Math.PI*2/r,percent:t/(r/100)}));n>1&&p.push({data:[[1,a]],color:o,label:l.series.pie.combine.label,angle:a*Math.PI*2/r,percent:a/(r/100)});return p}(i.getData())))}function d(t,r){if(a){var c=t.getPlaceholder().width(),g=t.getPlaceholder().height(),d=a.children().filter(".legend").children().width()||0;u=r,h=!1,n=Math.min(c,g/l.series.pie.tilt)/2,p=g/2+l.series.pie.offset.top,o=c/2,"auto"===l.series.pie.offset.left?(l.legend.position.match("w")?o+=d/2:o-=d/2,o<n?o=n:o>c-n&&(o=c-n)):o+=l.series.pie.offset.left;var v=t.getData(),b=0;do{b>0&&(n*=s),b+=1,w(),l.series.pie.tilt<=.8&&k()}while(!M()&&b<i);b>=i&&(w(),a.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>")),t.setSeries&&t.insertLegend&&(t.setSeries(v),t.insertLegend())}function w(){u.clearRect(0,0,c,g),a.children().filter(".pieLabel, .pieLabelBackground").remove()}function k(){var e=l.series.pie.shadow.left,i=l.series.pie.shadow.top,s=l.series.pie.shadow.alpha,t=l.series.pie.radius>1?l.series.pie.radius:n*l.series.pie.radius;if(!(t>=c/2-e||t*l.series.pie.tilt>=g/2-i||t<=10)){u.save(),u.translate(e,i),u.globalAlpha=s,u.fillStyle="#000",u.translate(o,p),u.scale(1,l.series.pie.tilt);for(var r=1;r<=10;r++)u.beginPath(),u.arc(0,0,t,0,2*Math.PI,!1),u.fill(),t-=r;u.restore()}}function M(){var i,s=Math.PI*l.series.pie.startAngle,t=l.series.pie.radius>1?l.series.pie.radius:n*l.series.pie.radius;u.save(),u.translate(o,p),u.scale(1,l.series.pie.tilt),u.save();var r=s;for(i=0;i<v.length;++i)v[i].startAngle=r,h(v[i].angle,v[i].color,!0);if(u.restore(),l.series.pie.stroke.width>0){for(u.save(),u.lineWidth=l.series.pie.stroke.width,r=s,i=0;i<v.length;++i)h(v[i].angle,l.series.pie.stroke.color,!1);u.restore()}return f(u),u.restore(),!l.series.pie.label.show||function(){for(var i=s,t=l.series.pie.label.radius>1?l.series.pie.label.radius:n*l.series.pie.label.radius,r=0;r<v.length;++r){if(v[r].percent>=100*l.series.pie.label.threshold&&!h(v[r],i,r))return!1;i+=v[r].angle}return!0;function h(i,s,r){if(0===i.data[0][1])return!0;var n,h=l.legend.labelFormatter,u=l.series.pie.label.formatter;n=h?h(i.label,i):i.label,u&&(n=u(n,i));var d=(s+i.angle+s)/2,f=o+Math.round(Math.cos(d)*t),v=p+Math.round(Math.sin(d)*t)*l.series.pie.tilt,b="<span class='pieLabel' id='pieLabel"+r+"' style='position:absolute;top:"+v+"px;left:"+f+"px;'>"+n+"</span>";a.append(b);var w=a.children("#pieLabel"+r),k=v-w.height()/2,M=f-w.width()/2;if(w.css("top",k),w.css("left",M),0-k>0||0-M>0||g-(k+w.height())<0||c-(M+w.width())<0)return!1;if(0!==l.series.pie.label.background.opacity){var m=l.series.pie.label.background.color;null==m&&(m=i.color);var P="top:"+k+"px;left:"+M+"px;";e("<div class='pieLabelBackground' style='position:absolute;width:"+w.width()+"px;height:"+w.height()+"px;"+P+"background-color:"+m+";'></div>").css("opacity",l.series.pie.label.background.opacity).insertBefore(w)}return!0}}();function h(e,i,s){e<=0||isNaN(e)||(s?u.fillStyle=i:(u.strokeStyle=i,u.lineJoin="round"),u.beginPath(),Math.abs(e-2*Math.PI)>1e-9&&u.moveTo(0,0),u.arc(0,0,t,r,r+e/2,!1),u.arc(0,0,t,r+e/2,r+e,!1),u.closePath(),r+=e,s?u.fill():u.stroke())}}}function f(e){if(l.series.pie.innerRadius>0){e.save();var i=l.series.pie.innerRadius>1?l.series.pie.innerRadius:n*l.series.pie.innerRadius;e.globalCompositeOperation="destination-out",e.beginPath(),e.fillStyle=l.series.pie.stroke.color,e.arc(0,0,i,0,2*Math.PI,!1),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.strokeStyle=l.series.pie.stroke.color,e.arc(0,0,i,0,2*Math.PI,!1),e.stroke(),e.closePath(),e.restore()}}function v(e,i){for(var s=!1,t=-1,r=e.length,a=r-1;++t<r;a=t)(e[t][1]<=i[1]&&i[1]<e[a][1]||e[a][1]<=i[1]&&i[1]<e[t][1])&&i[0]<(e[a][0]-e[t][0])*(i[1]-e[t][1])/(e[a][1]-e[t][1])+e[t][0]&&(s=!s);return s}function b(e){k("plothover",e)}function w(e){k("plotclick",e)}function k(e,i){var s=t.offset(),r=function(e,i){for(var s,r,a=t.getData(),l=t.getOptions(),h=l.series.pie.radius>1?l.series.pie.radius:n*l.series.pie.radius,c=0;c<a.length;++c){var g=a[c];if(g.pie.show){if(u.save(),u.beginPath(),u.moveTo(0,0),u.arc(0,0,h,g.startAngle,g.startAngle+g.angle/2,!1),u.arc(0,0,h,g.startAngle+g.angle/2,g.startAngle+g.angle,!1),u.closePath(),s=e-o,r=i-p,u.isPointInPath){if(u.isPointInPath(e-o,i-p))return u.restore(),{datapoint:[g.percent,g.data],dataIndex:0,series:g,seriesIndex:c}}else if(v([[0,0],[h*Math.cos(g.startAngle),h*Math.sin(g.startAngle)],[h*Math.cos(g.startAngle+g.angle/4),h*Math.sin(g.startAngle+g.angle/4)],[h*Math.cos(g.startAngle+g.angle/2),h*Math.sin(g.startAngle+g.angle/2)],[h*Math.cos(g.startAngle+g.angle/1.5),h*Math.sin(g.startAngle+g.angle/1.5)],[h*Math.cos(g.startAngle+g.angle),h*Math.sin(g.startAngle+g.angle)]],[s,r]))return u.restore(),{datapoint:[g.percent,g.data],dataIndex:0,series:g,seriesIndex:c};u.restore()}}return null}(parseInt(i.pageX-s.left),parseInt(i.pageY-s.top));if(l.grid.autoHighlight)for(var h=0;h<c.length;++h){var g=c[h];g.auto!==e||r&&g.series===r.series||M(g.series)}r&&function(e,i){var s=m(e);-1===s?(c.push({series:e,auto:i}),t.triggerRedrawOverlay()):i||(c[s].auto=!1)}(r.series,e);var d={pageX:i.pageX,pageY:i.pageY};a.trigger(e,[d,r])}function M(e){null==e&&(c=[],t.triggerRedrawOverlay());var i=m(e);-1!==i&&(c.splice(i,1),t.triggerRedrawOverlay())}function m(e){for(var i=0;i<c.length;++i){if(c[i].series===e)return i}return-1}t.hooks.processOptions.push((function(e,i){i.series.pie.show&&(i.grid.show=!1,"auto"===i.series.pie.label.show&&(i.legend.show?i.series.pie.label.show=!1:i.series.pie.label.show=!0),"auto"===i.series.pie.radius&&(i.series.pie.label.show?i.series.pie.radius=.75:i.series.pie.radius=1),i.series.pie.tilt>1?i.series.pie.tilt=1:i.series.pie.tilt<0&&(i.series.pie.tilt=0))})),t.hooks.bindEvents.push((function(e,i){var s=e.getOptions();s.series.pie.show&&(s.grid.hoverable&&(i.unbind("mousemove").mousemove(b),i.bind("mouseleave",b)),s.grid.clickable&&i.unbind("click").click(w))})),t.hooks.shutdown.push((function(e,i){i.unbind("mousemove",b),i.unbind("mouseleave",b),i.unbind("click",w),c=[]})),t.hooks.processDatapoints.push((function(e,i,s,t){e.getOptions().series.pie.show&&g(e,i,s)})),t.hooks.drawOverlay.push((function(e,i){e.getOptions().series.pie.show&&function(e,i){var s=e.getOptions(),t=s.series.pie.radius>1?s.series.pie.radius:n*s.series.pie.radius;i.save(),i.translate(o,p),i.scale(1,s.series.pie.tilt);for(var r=0;r<c.length;++r)a(c[r].series);function a(e){e.angle<=0||isNaN(e.angle)||(i.fillStyle="rgba(255, 255, 255, "+s.series.pie.highlight.opacity+")",i.beginPath(),Math.abs(e.angle-2*Math.PI)>1e-9&&i.moveTo(0,0),i.arc(0,0,t,e.startAngle,e.startAngle+e.angle/2,!1),i.arc(0,0,t,e.startAngle+e.angle/2,e.startAngle+e.angle,!1),i.closePath(),i.fill())}f(i),i.restore()}(e,i)})),t.hooks.draw.push((function(e,i){e.getOptions().series.pie.show&&d(e,i)}))},options:t,name:"pie",version:"1.1"})}(jQuery);
--- a/src/myams/resources/js/ext/flot/jquery.flot.resize.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.resize.js	Fri Dec 11 11:45:23 2020 +0100
@@ -20,7 +20,7 @@
  * Dual licensed under the MIT and GPL licenses.
  * http://benalman.com/about/license/
  */
-(function($,e,t){"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay",f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:function(){if(!n[f]&&this[s]){return false}var e=$(this);i.push(this);e.data(m,{w:e.width(),h:e.height()});if(i.length===1){a=t;h()}},teardown:function(){if(!n[f]&&this[s]){return false}var e=$(this);for(var t=i.length-1;t>=0;t--){if(i[t]==this){i.splice(t,1);break}}e.removeData(m);if(!i.length){if(r){cancelAnimationFrame(a)}else{clearTimeout(a)}a=null}},add:function(e){if(!n[f]&&this[s]){return false}var i;function a(e,n,a){var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a!==t?a:r.height();i.apply(this,arguments)}if($.isFunction(e)){i=e;return a}else{i=e.handler;e.handler=a}}};function h(t){if(r===true){r=t||1}for(var s=i.length-1;s>=0;s--){var l=$(i[s]);if(l[0]==e||l.is(":visible")){var f=l.width(),c=l.height(),d=l.data(m);if(d&&(f!==d.w||c!==d.h)){l.trigger(u,[d.w=f,d.h=c]);r=t||true}}else{d=l.data(m);d.w=0;d.h=0}}if(a!==null){if(r&&(t==null||t-r<1e3)){a=e.requestAnimationFrame(h)}else{a=setTimeout(h,n[o]);r=false}}}if(!e.requestAnimationFrame){e.requestAnimationFrame=function(){return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t,i){return e.setTimeout(function(){t((new Date).getTime())},n[l])}}()}if(!e.cancelAnimationFrame){e.cancelAnimationFrame=function(){return e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,this);
+(function($,e,t){"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay",f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:function(){if(!n[f]&&this[s]){return false}var e=$(this);i.push(this);e.data(m,{w:e.width(),h:e.height()});if(i.length===1){a=t;h()}},teardown:function(){if(!n[f]&&this[s]){return false}var e=$(this);for(var t=i.length-1;t>=0;t--){if(i[t]==this){i.splice(t,1);break}}e.removeData(m);if(!i.length){if(r){cancelAnimationFrame(a)}else{clearTimeout(a)}a=null}},add:function(e){if(!n[f]&&this[s]){return false}var i;function a(e,n,a){var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a!==t?a:r.height();i.apply(this,arguments)}if($.isFunction(e)){i=e;return a}else{i=e.handler;e.handler=a}}};function h(t){if(r===true){r=t||1}for(var s=i.length-1;s>=0;s--){var l=$(i[s]);if(l[0]==e||l.is(":visible")){var f=l.width(),c=l.height(),d=l.data(m);if(d&&(f!==d.w||c!==d.h)){l.trigger(u,[d.w=f,d.h=c]);r=t||true}}else{d=l.data(m);d.w=0;d.h=0}}if(a!==null){if(r&&(t==null||t-r<1e3)){a=e.requestAnimationFrame(h)}else{a=setTimeout(h,n[o]);r=false}}}if(!e.requestAnimationFrame){e.requestAnimationFrame=function(){return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t,i){return e.setTimeout(function(){t((new Date).getTime())},n[l])}}()}if(!e.cancelAnimationFrame){e.cancelAnimationFrame=function(){return e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,window);
 
 /* eslint-enable */
 (function ($) {
--- a/src/myams/resources/js/ext/flot/jquery.flot.resize.min.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.resize.min.js	Fri Dec 11 11:45:23 2020 +0100
@@ -1,1 +1,1 @@
-!function(e,t,i){var n,a=[],r=e.resize=e.extend(e.resize,{}),o=!1,s="setTimeout",u="resize",h=u+"-special-event",m="pendingDelay",l="activeDelay",c="throttleWindow";function d(i){!0===o&&(o=i||1);for(var s=a.length-1;s>=0;s--){var l=e(a[s]);if(l[0]==t||l.is(":visible")){var c=l.width(),f=l.height(),g=l.data(h);!g||c===g.w&&f===g.h||(l.trigger(u,[g.w=c,g.h=f]),o=i||!0)}else(g=l.data(h)).w=0,g.h=0}null!==n&&(o&&(null==i||i-o<1e3)?n=t.requestAnimationFrame(d):(n=setTimeout(d,r[m]),o=!1))}r[m]=200,r[l]=20,r[c]=!0,e.event.special[u]={setup:function(){if(!r[c]&&this[s])return!1;var t=e(this);a.push(this),t.data(h,{w:t.width(),h:t.height()}),1===a.length&&(n=i,d())},teardown:function(){if(!r[c]&&this[s])return!1;for(var t=e(this),i=a.length-1;i>=0;i--)if(a[i]==this){a.splice(i,1);break}t.removeData(h),a.length||(o?cancelAnimationFrame(n):clearTimeout(n),n=null)},add:function(t){if(!r[c]&&this[s])return!1;var n;function a(t,a,r){var o=e(this),s=o.data(h)||{};s.w=a!==i?a:o.width(),s.h=r!==i?r:o.height(),n.apply(this,arguments)}if(e.isFunction(t))return n=t,a;n=t.handler,t.handler=a}},t.requestAnimationFrame||(t.requestAnimationFrame=t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e,i){return t.setTimeout((function(){e((new Date).getTime())}),r[l])}),t.cancelAnimationFrame||(t.cancelAnimationFrame=t.webkitCancelRequestAnimationFrame||t.mozCancelRequestAnimationFrame||t.oCancelRequestAnimationFrame||t.msCancelRequestAnimationFrame||clearTimeout)}(jQuery,this),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"});
+!function(e,t,i){var n,a=[],r=e.resize=e.extend(e.resize,{}),o=!1,s="setTimeout",u="resize",h=u+"-special-event",m="pendingDelay",l="activeDelay",c="throttleWindow";function d(i){!0===o&&(o=i||1);for(var s=a.length-1;s>=0;s--){var l=e(a[s]);if(l[0]==t||l.is(":visible")){var c=l.width(),f=l.height(),w=l.data(h);!w||c===w.w&&f===w.h||(l.trigger(u,[w.w=c,w.h=f]),o=i||!0)}else(w=l.data(h)).w=0,w.h=0}null!==n&&(o&&(null==i||i-o<1e3)?n=t.requestAnimationFrame(d):(n=setTimeout(d,r[m]),o=!1))}r[m]=200,r[l]=20,r[c]=!0,e.event.special[u]={setup:function(){if(!r[c]&&this[s])return!1;var t=e(this);a.push(this),t.data(h,{w:t.width(),h:t.height()}),1===a.length&&(n=i,d())},teardown:function(){if(!r[c]&&this[s])return!1;for(var t=e(this),i=a.length-1;i>=0;i--)if(a[i]==this){a.splice(i,1);break}t.removeData(h),a.length||(o?cancelAnimationFrame(n):clearTimeout(n),n=null)},add:function(t){if(!r[c]&&this[s])return!1;var n;function a(t,a,r){var o=e(this),s=o.data(h)||{};s.w=a!==i?a:o.width(),s.h=r!==i?r:o.height(),n.apply(this,arguments)}if(e.isFunction(t))return n=t,a;n=t.handler,t.handler=a}},t.requestAnimationFrame||(t.requestAnimationFrame=t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e,i){return t.setTimeout((function(){e((new Date).getTime())}),r[l])}),t.cancelAnimationFrame||(t.cancelAnimationFrame=t.webkitCancelRequestAnimationFrame||t.mozCancelRequestAnimationFrame||t.oCancelRequestAnimationFrame||t.msCancelRequestAnimationFrame||clearTimeout)}(jQuery,window),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"});
--- a/src/myams/resources/js/ext/flot/jquery.flot.selection.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.selection.js	Fri Dec 11 11:45:23 2020 +0100
@@ -10,6 +10,7 @@
     color: color,
     shape: "round" or "miter" or "bevel",
     visualization: "fill" or "focus",
+    displaySelectionDecorations: true or false,
     minSize: number of pixels
 }
 
@@ -26,6 +27,10 @@
 the selected area clear. The option "fill" highlights (i.e., fills) the
 selected area with a colored highlight.
 
+There are optional selection decorations (handles) that are rendered with the
+"focus" visualization option. The selection decoration is rendered by default
+but can be turned off by setting displaySelectionDecorations to false.
+
 "minSize" is the minimum size a selection can be in pixels. This value can
 be customized to determine the smallest size a selection can be and still
 have the selection rectangle be displayed. When customizing this value, the
@@ -104,9 +109,7 @@
         // make this plugin much slimmer.
         var savedhandlers = {};
 
-        var mouseUpHandler = null;
-
-        function onMouseMove(e) {
+        function onDrag(e) {
             if (selection.active) {
                 updateSelection(e);
 
@@ -114,7 +117,7 @@
             }
         }
 
-        function onMouseDown(e) {
+        function onDragStart(e) {
             var o = plot.getOptions();
             // only accept left-click
             if (e.which !== 1 || o.selection.mode === null) return;
@@ -138,17 +141,9 @@
             setSelectionPos(selection.first, e);
 
             selection.active = true;
-
-            // this is a bit silly, but we have to use a closure to be
-            // able to whack the same handler again
-            mouseUpHandler = function (e) { onMouseUp(e); };
-
-            $(document).one("mouseup", mouseUpHandler);
         }
 
-        function onMouseUp(e) {
-            mouseUpHandler = null;
-
+        function onDragEnd(e) {
             // revert drag stuff for old-school browsers
             if (document.onselectstart !== undefined) {
                 document.onselectstart = savedhandlers.onselectstart;
@@ -360,8 +355,9 @@
         plot.hooks.bindEvents.push(function(plot, eventHolder) {
             var o = plot.getOptions();
             if (o.selection.mode != null) {
-                eventHolder.mousemove(onMouseMove);
-                eventHolder.mousedown(onMouseDown);
+                plot.addEventHandler("dragstart", onDragStart, eventHolder, 0);
+                plot.addEventHandler("drag", onDrag, eventHolder, 0);
+                plot.addEventHandler("dragend", onDragEnd, eventHolder, 0);
             }
         });
 
@@ -459,6 +455,7 @@
 
                 var c = $.color.parse(o.selection.color);
                 var visualization = o.selection.visualization;
+                var displaySelectionDecorations = o.selection.displaySelectionDecorations;
 
                 var scalingFactor = 1;
 
@@ -495,7 +492,10 @@
                 } else {
                     ctx.fillRect(0, 0, plot.width(), plot.height());
                     ctx.clearRect(x, y, w, h);
-                    drawSelectionDecorations(ctx, x, y, w, h, oX, oY, selectionDirection(plot));
+
+                    if (displaySelectionDecorations) {
+                        drawSelectionDecorations(ctx, x, y, w, h, oX, oY, selectionDirection(plot));
+                    }
                 }
 
                 ctx.restore();
@@ -503,12 +503,9 @@
         });
 
         plot.hooks.shutdown.push(function (plot, eventHolder) {
-            eventHolder.unbind("mousemove", onMouseMove);
-            eventHolder.unbind("mousedown", onMouseDown);
-
-            if (mouseUpHandler) {
-                $(document).unbind("mouseup", mouseUpHandler);
-            }
+            eventHolder.unbind("dragstart", onDragStart);
+            eventHolder.unbind("drag", onDrag);
+            eventHolder.unbind("dragend", onDragEnd);
         });
     }
 
@@ -518,6 +515,7 @@
             selection: {
                 mode: null, // one of null, "x", "y" or "xy"
                 visualization: "focus", // "focus" or "fill"
+                displaySelectionDecorations: true, // true or false (currently only relevant for the focus visualization)
                 color: "#888888",
                 shape: "round", // one of "round", "miter", or "bevel"
                 minSize: 5 // minimum number of pixels
--- a/src/myams/resources/js/ext/flot/jquery.flot.selection.min.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.selection.min.js	Fri Dec 11 11:45:23 2020 +0100
@@ -1,1 +1,1 @@
-!function(e){e.plot.plugins.push({init:function(o){var t={first:{x:-1,y:-1},second:{x:-1,y:-1},show:!1,currentMode:"xy",active:!1},n=e.plot.uiConstants.SNAPPING_CONSTANT,i={},l=null;function s(e){t.active&&(h(e),o.getPlaceholder().trigger("plotselecting",[c()]))}function r(n){var s=o.getOptions();1===n.which&&null!==s.selection.mode&&(t.currentMode="xy",document.body.focus(),void 0!==document.onselectstart&&null==i.onselectstart&&(i.onselectstart=document.onselectstart,document.onselectstart=function(){return!1}),void 0!==document.ondrag&&null==i.ondrag&&(i.ondrag=document.ondrag,document.ondrag=function(){return!1}),f(t.first,n),t.active=!0,l=function(e){!function(e){l=null,void 0!==document.onselectstart&&(document.onselectstart=i.onselectstart);void 0!==document.ondrag&&(document.ondrag=i.ondrag);t.active=!1,h(e),m()?a():(o.getPlaceholder().trigger("plotunselected",[]),o.getPlaceholder().trigger("plotselecting",[null]))}(e)},e(document).one("mouseup",l))}function c(){if(!m())return null;if(!t.show)return null;var n={},i={x:t.first.x,y:t.first.y},l={x:t.second.x,y:t.second.y};return"x"===d(o)&&(i.y=0,l.y=o.height()),"y"===d(o)&&(i.x=0,l.x=o.width()),e.each(o.getAxes(),(function(e,o){if(o.used){var t=o.c2p(i[o.direction]),s=o.c2p(l[o.direction]);n[e]={from:Math.min(t,s),to:Math.max(t,s)}}})),n}function a(){var e=c();o.getPlaceholder().trigger("plotselected",[e]),e.xaxis&&e.yaxis&&o.getPlaceholder().trigger("selected",[{x1:e.xaxis.from,y1:e.yaxis.from,x2:e.xaxis.to,y2:e.yaxis.to}])}function u(e,o,t){return o<e?e:o>t?t:o}function d(e){var o=e.getOptions();return"smart"===o.selection.mode?t.currentMode:o.selection.mode}function f(e,i){var l=o.getPlaceholder().offset(),s=o.getPlotOffset();e.x=u(0,i.pageX-l.left-s.left,o.width()),e.y=u(0,i.pageY-l.top-s.top,o.height()),e!==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)<n?t.currentMode="y":Math.abs(o.y)<n?t.currentMode="x":t.currentMode="xy"}}(e),"y"===d(o)&&(e.x=e===t.first?0:o.width()),"x"===d(o)&&(e.y=e===t.first?0:o.height())}function h(e){null!=e.pageX&&(f(t.second,e),m()?(t.show=!0,o.triggerRedrawOverlay()):g(!0))}function g(e){t.show&&(t.show=!1,t.currentMode="",o.triggerRedrawOverlay(),e||o.getPlaceholder().trigger("plotunselected",[]))}function x(e,t){var n,i,l,s,r=o.getAxes();for(var c in r)if((n=r[c]).direction===t&&(e[s=t+n.n+"axis"]||1!==n.n||(s=t+"axis"),e[s])){i=e[s].from,l=e[s].to;break}if(e[s]||(n="x"===t?o.getXAxes()[0]:o.getYAxes()[0],i=e[t+"1"],l=e[t+"2"]),null!=i&&null!=l&&i>l){var a=i;i=l,l=a}return{from:i,to:l,axis:n}}function m(){var e=o.getOptions().selection.minSize;return Math.abs(t.second.x-t.first.x)>=e&&Math.abs(t.second.y-t.first.y)>=e}o.clearSelection=g,o.setSelection=function(e,n){var i;"y"===d(o)?(t.first.x=0,t.second.x=o.width()):(i=x(e,"x"),t.first.x=i.axis.p2c(i.from),t.second.x=i.axis.p2c(i.to)),"x"===d(o)?(t.first.y=0,t.second.y=o.height()):(i=x(e,"y"),t.first.y=i.axis.p2c(i.from),t.second.y=i.axis.p2c(i.to)),t.show=!0,o.triggerRedrawOverlay(),!n&&m()&&a()},o.getSelection=c,o.hooks.bindEvents.push((function(e,o){null!=e.getOptions().selection.mode&&(o.mousemove(s),o.mousedown(r))})),o.hooks.drawOverlay.push((function(o,n){if(t.show&&m()){var i=o.getPlotOffset(),l=o.getOptions();n.save(),n.translate(i.left,i.top);var s=e.color.parse(l.selection.color),r=l.selection.visualization,c=1;"fill"===r&&(c=.8),n.strokeStyle=s.scale("a",c).toString(),n.lineWidth=1,n.lineJoin=l.selection.shape,n.fillStyle=s.scale("a",.4).toString();var a=Math.min(t.first.x,t.second.x)+.5,u=a,f=Math.min(t.first.y,t.second.y)+.5,h=f,g=Math.abs(t.second.x-t.first.x)-1,x=Math.abs(t.second.y-t.first.y)-1;"x"===d(o)&&(x+=f,f=0),"y"===d(o)&&(g+=a,a=0),"fill"===r?(n.fillRect(a,f,g,x),n.strokeRect(a,f,g,x)):(n.fillRect(0,0,o.width(),o.height()),n.clearRect(a,f,g,x),function(e,o,t,n,i,l,s,r){var c=Math.max(0,Math.min(15,n/2-2,i/2-2));e.fillStyle="#ffffff","xy"===r&&(e.beginPath(),e.moveTo(o,t+c),e.lineTo(o-3,t+c),e.lineTo(o-3,t-3),e.lineTo(o+c,t-3),e.lineTo(o+c,t),e.lineTo(o,t),e.closePath(),e.moveTo(o,t+i-c),e.lineTo(o-3,t+i-c),e.lineTo(o-3,t+i+3),e.lineTo(o+c,t+i+3),e.lineTo(o+c,t+i),e.lineTo(o,t+i),e.closePath(),e.moveTo(o+n,t+c),e.lineTo(o+n+3,t+c),e.lineTo(o+n+3,t-3),e.lineTo(o+n-c,t-3),e.lineTo(o+n-c,t),e.lineTo(o+n,t),e.closePath(),e.moveTo(o+n,t+i-c),e.lineTo(o+n+3,t+i-c),e.lineTo(o+n+3,t+i+3),e.lineTo(o+n-c,t+i+3),e.lineTo(o+n-c,t+i),e.lineTo(o+n,t+i),e.closePath(),e.stroke(),e.fill()),o=l,t=s,"x"===r&&(e.beginPath(),e.moveTo(o,t+15),e.lineTo(o,t-15),e.lineTo(o-3,t-15),e.lineTo(o-3,t+15),e.closePath(),e.moveTo(o+n,t+15),e.lineTo(o+n,t-15),e.lineTo(o+n+3,t-15),e.lineTo(o+n+3,t+15),e.closePath(),e.stroke(),e.fill()),"y"===r&&(e.beginPath(),e.moveTo(o-15,t),e.lineTo(o+15,t),e.lineTo(o+15,t-3),e.lineTo(o-15,t-3),e.closePath(),e.moveTo(o-15,t+i),e.lineTo(o+15,t+i),e.lineTo(o+15,t+i+3),e.lineTo(o-15,t+i+3),e.closePath(),e.stroke(),e.fill())}(n,a,f,g,x,u,h,d(o))),n.restore()}})),o.hooks.shutdown.push((function(o,t){t.unbind("mousemove",s),t.unbind("mousedown",r),l&&e(document).unbind("mouseup",l)}))},options:{selection:{mode:null,visualization:"focus",color:"#888888",shape:"round",minSize:5}},name:"selection",version:"1.1"})}(jQuery);
+!function(e){e.plot.plugins.push({init:function(t){var o={first:{x:-1,y:-1},second:{x:-1,y:-1},show:!1,currentMode:"xy",active:!1},n=e.plot.uiConstants.SNAPPING_CONSTANT,i={};function r(e){o.active&&(g(e),t.getPlaceholder().trigger("plotselecting",[a()]))}function l(e){var n=t.getOptions();1===e.which&&null!==n.selection.mode&&(o.currentMode="xy",document.body.focus(),void 0!==document.onselectstart&&null==i.onselectstart&&(i.onselectstart=document.onselectstart,document.onselectstart=function(){return!1}),void 0!==document.ondrag&&null==i.ondrag&&(i.ondrag=document.ondrag,document.ondrag=function(){return!1}),u(o.first,e),o.active=!0)}function s(e){return void 0!==document.onselectstart&&(document.onselectstart=i.onselectstart),void 0!==document.ondrag&&(document.ondrag=i.ondrag),o.active=!1,g(e),y()?c():(t.getPlaceholder().trigger("plotunselected",[]),t.getPlaceholder().trigger("plotselecting",[null])),!1}function a(){if(!y())return null;if(!o.show)return null;var n={},i={x:o.first.x,y:o.first.y},r={x:o.second.x,y:o.second.y};return"x"===f(t)&&(i.y=0,r.y=t.height()),"y"===f(t)&&(i.x=0,r.x=t.width()),e.each(t.getAxes(),(function(e,t){if(t.used){var o=t.c2p(i[t.direction]),l=t.c2p(r[t.direction]);n[e]={from:Math.min(o,l),to:Math.max(o,l)}}})),n}function c(){var e=a();t.getPlaceholder().trigger("plotselected",[e]),e.xaxis&&e.yaxis&&t.getPlaceholder().trigger("selected",[{x1:e.xaxis.from,y1:e.yaxis.from,x2:e.xaxis.to,y2:e.yaxis.to}])}function d(e,t,o){return t<e?e:t>o?o:t}function f(e){var t=e.getOptions();return"smart"===t.selection.mode?o.currentMode:t.selection.mode}function u(e,i){var r=t.getPlaceholder().offset(),l=t.getPlotOffset();e.x=d(0,i.pageX-r.left-l.left,t.width()),e.y=d(0,i.pageY-r.top-l.top,t.height()),e!==o.first&&function(e){if(o.first){var t={x:e.x-o.first.x,y:e.y-o.first.y};Math.abs(t.x)<n?o.currentMode="y":Math.abs(t.y)<n?o.currentMode="x":o.currentMode="xy"}}(e),"y"===f(t)&&(e.x=e===o.first?0:t.width()),"x"===f(t)&&(e.y=e===o.first?0:t.height())}function g(e){null!=e.pageX&&(u(o.second,e),y()?(o.show=!0,t.triggerRedrawOverlay()):h(!0))}function h(e){o.show&&(o.show=!1,o.currentMode="",t.triggerRedrawOverlay(),e||t.getPlaceholder().trigger("plotunselected",[]))}function x(e,o){var n,i,r,l,s=t.getAxes();for(var a in s)if((n=s[a]).direction===o&&(e[l=o+n.n+"axis"]||1!==n.n||(l=o+"axis"),e[l])){i=e[l].from,r=e[l].to;break}if(e[l]||(n="x"===o?t.getXAxes()[0]:t.getYAxes()[0],i=e[o+"1"],r=e[o+"2"]),null!=i&&null!=r&&i>r){var c=i;i=r,r=c}return{from:i,to:r,axis:n}}function y(){var e=t.getOptions().selection.minSize;return Math.abs(o.second.x-o.first.x)>=e&&Math.abs(o.second.y-o.first.y)>=e}t.clearSelection=h,t.setSelection=function(e,n){var i;"y"===f(t)?(o.first.x=0,o.second.x=t.width()):(i=x(e,"x"),o.first.x=i.axis.p2c(i.from),o.second.x=i.axis.p2c(i.to)),"x"===f(t)?(o.first.y=0,o.second.y=t.height()):(i=x(e,"y"),o.first.y=i.axis.p2c(i.from),o.second.y=i.axis.p2c(i.to)),o.show=!0,t.triggerRedrawOverlay(),!n&&y()&&c()},t.getSelection=a,t.hooks.bindEvents.push((function(e,t){null!=e.getOptions().selection.mode&&(e.addEventHandler("dragstart",l,t,0),e.addEventHandler("drag",r,t,0),e.addEventHandler("dragend",s,t,0))})),t.hooks.drawOverlay.push((function(t,n){if(o.show&&y()){var i=t.getPlotOffset(),r=t.getOptions();n.save(),n.translate(i.left,i.top);var l=e.color.parse(r.selection.color),s=r.selection.visualization,a=r.selection.displaySelectionDecorations,c=1;"fill"===s&&(c=.8),n.strokeStyle=l.scale("a",c).toString(),n.lineWidth=1,n.lineJoin=r.selection.shape,n.fillStyle=l.scale("a",.4).toString();var d=Math.min(o.first.x,o.second.x)+.5,u=d,g=Math.min(o.first.y,o.second.y)+.5,h=g,x=Math.abs(o.second.x-o.first.x)-1,v=Math.abs(o.second.y-o.first.y)-1;"x"===f(t)&&(v+=g,g=0),"y"===f(t)&&(x+=d,d=0),"fill"===s?(n.fillRect(d,g,x,v),n.strokeRect(d,g,x,v)):(n.fillRect(0,0,t.width(),t.height()),n.clearRect(d,g,x,v),a&&function(e,t,o,n,i,r,l,s){var a=Math.max(0,Math.min(15,n/2-2,i/2-2));e.fillStyle="#ffffff","xy"===s&&(e.beginPath(),e.moveTo(t,o+a),e.lineTo(t-3,o+a),e.lineTo(t-3,o-3),e.lineTo(t+a,o-3),e.lineTo(t+a,o),e.lineTo(t,o),e.closePath(),e.moveTo(t,o+i-a),e.lineTo(t-3,o+i-a),e.lineTo(t-3,o+i+3),e.lineTo(t+a,o+i+3),e.lineTo(t+a,o+i),e.lineTo(t,o+i),e.closePath(),e.moveTo(t+n,o+a),e.lineTo(t+n+3,o+a),e.lineTo(t+n+3,o-3),e.lineTo(t+n-a,o-3),e.lineTo(t+n-a,o),e.lineTo(t+n,o),e.closePath(),e.moveTo(t+n,o+i-a),e.lineTo(t+n+3,o+i-a),e.lineTo(t+n+3,o+i+3),e.lineTo(t+n-a,o+i+3),e.lineTo(t+n-a,o+i),e.lineTo(t+n,o+i),e.closePath(),e.stroke(),e.fill()),t=r,o=l,"x"===s&&(e.beginPath(),e.moveTo(t,o+15),e.lineTo(t,o-15),e.lineTo(t-3,o-15),e.lineTo(t-3,o+15),e.closePath(),e.moveTo(t+n,o+15),e.lineTo(t+n,o-15),e.lineTo(t+n+3,o-15),e.lineTo(t+n+3,o+15),e.closePath(),e.stroke(),e.fill()),"y"===s&&(e.beginPath(),e.moveTo(t-15,o),e.lineTo(t+15,o),e.lineTo(t+15,o-3),e.lineTo(t-15,o-3),e.closePath(),e.moveTo(t-15,o+i),e.lineTo(t+15,o+i),e.lineTo(t+15,o+i+3),e.lineTo(t-15,o+i+3),e.closePath(),e.stroke(),e.fill())}(n,d,g,x,v,u,h,f(t))),n.restore()}})),t.hooks.shutdown.push((function(e,t){t.unbind("dragstart",l),t.unbind("drag",r),t.unbind("dragend",s)}))},options:{selection:{mode:null,visualization:"focus",displaySelectionDecorations:!0,color:"#888888",shape:"round",minSize:5}},name:"selection",version:"1.1"})}(jQuery);
--- a/src/myams/resources/js/ext/flot/jquery.flot.stack.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.stack.js	Fri Dec 11 11:45:23 2020 +0100
@@ -78,7 +78,7 @@
             if (s.stack == null || s.stack === false) return;
 
             var needsBottom = s.bars.show || (s.lines.show && s.lines.fill);
-            var hasBottom = datapoints.pointsize > 2 && (horizontal ? datapoints.format[2].x : datapoints.format[2].y);
+            var hasBottom = datapoints.pointsize > 2 && (s.bars.horizontal ? datapoints.format[2].x : datapoints.format[2].y);
             // Series data is missing bottom points - need to format
             if (needsBottom && !hasBottom) {
                 addBottomPoints(s, datapoints);
--- a/src/myams/resources/js/ext/flot/jquery.flot.stack.min.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.stack.min.js	Fri Dec 11 11:45:23 2020 +0100
@@ -1,1 +1,1 @@
-jQuery.plot.plugins.push({init:function(s){s.hooks.processDatapoints.push((function(s,n,t){if(null!=n.stack&&!1!==n.stack){var i=n.bars.show||n.lines.show&&n.lines.fill,o=t.pointsize>2&&(y?t.format[2].x:t.format[2].y);i&&!o&&function(s,n){for(var t=[],i=0;i<n.points.length;i+=2)t.push(n.points[i]),t.push(n.points[i+1]),t.push(0);n.format.push({x:!1,y:!0,number:!0,required:!1,computeRange:"none"!==s.yaxis.options.autoScale,defaultValue:0}),n.points=t,n.pointsize=3}(n,t);var e=function(s,n){for(var t=null,i=0;i<n.length&&s!==n[i];++i)n[i].stack===s.stack&&(t=n[i]);return t}(n,s.getData());if(e){for(var l,u,p,a,f,r,h,c,g=t.pointsize,k=t.points,m=e.datapoints.pointsize,v=e.datapoints.points,z=[],d=n.lines.show,y=n.bars.horizontal,b=d&&n.lines.steps,w=!0,x=y?1:0,D=y?0:1,j=0,q=0;!(j>=k.length);){if(h=z.length,null==k[j]){for(c=0;c<g;++c)z.push(k[j+c]);j+=g}else if(q>=v.length){if(!d)for(c=0;c<g;++c)z.push(k[j+c]);j+=g}else if(null==v[q]){for(c=0;c<g;++c)z.push(null);w=!0,q+=m}else{if(l=k[j+x],u=k[j+D],a=v[q+x],f=v[q+D],r=0,l===a){for(c=0;c<g;++c)z.push(k[j+c]);z[h+D]+=f,r=f,j+=g,q+=m}else if(l>a){if(d&&j>0&&null!=k[j-g]){for(p=u+(k[j-g+D]-u)*(a-l)/(k[j-g+x]-l),z.push(a),z.push(p+f),c=2;c<g;++c)z.push(k[j+c]);r=f}q+=m}else{if(w&&d){j+=g;continue}for(c=0;c<g;++c)z.push(k[j+c]);d&&q>0&&null!=v[q-m]&&(r=f+(v[q-m+D]-f)*(l-a)/(v[q-m+x]-a)),z[h+D]+=r,j+=g}w=!1,h!==z.length&&i&&(z[h+2]+=r)}if(b&&h!==z.length&&h>0&&null!==z[h]&&z[h]!==z[h-g]&&z[h+1]!==z[h-g+1]){for(c=0;c<g;++c)z[h+g+c]=z[h+c];z[h+1]=z[h-g+1]}}t.points=z}}}))},options:{series:{stack:null}},name:"stack",version:"1.2"});
+jQuery.plot.plugins.push({init:function(s){s.hooks.processDatapoints.push((function(s,n,o){if(null!=n.stack&&!1!==n.stack){var t=n.bars.show||n.lines.show&&n.lines.fill,i=o.pointsize>2&&(n.bars.horizontal?o.format[2].x:o.format[2].y);t&&!i&&function(s,n){for(var o=[],t=0;t<n.points.length;t+=2)o.push(n.points[t]),o.push(n.points[t+1]),o.push(0);n.format.push({x:!1,y:!0,number:!0,required:!1,computeRange:"none"!==s.yaxis.options.autoScale,defaultValue:0}),n.points=o,n.pointsize=3}(n,o);var e=function(s,n){for(var o=null,t=0;t<n.length&&s!==n[t];++t)n[t].stack===s.stack&&(o=n[t]);return o}(n,s.getData());if(e){for(var l,u,p,a,r,f,h,c,g=o.pointsize,k=o.points,m=e.datapoints.pointsize,v=e.datapoints.points,z=[],b=n.lines.show,d=n.bars.horizontal,y=b&&n.lines.steps,w=!0,x=d?1:0,D=d?0:1,j=0,q=0;!(j>=k.length);){if(h=z.length,null==k[j]){for(c=0;c<g;++c)z.push(k[j+c]);j+=g}else if(q>=v.length){if(!b)for(c=0;c<g;++c)z.push(k[j+c]);j+=g}else if(null==v[q]){for(c=0;c<g;++c)z.push(null);w=!0,q+=m}else{if(l=k[j+x],u=k[j+D],a=v[q+x],r=v[q+D],f=0,l===a){for(c=0;c<g;++c)z.push(k[j+c]);z[h+D]+=r,f=r,j+=g,q+=m}else if(l>a){if(b&&j>0&&null!=k[j-g]){for(p=u+(k[j-g+D]-u)*(a-l)/(k[j-g+x]-l),z.push(a),z.push(p+r),c=2;c<g;++c)z.push(k[j+c]);f=r}q+=m}else{if(w&&b){j+=g;continue}for(c=0;c<g;++c)z.push(k[j+c]);b&&q>0&&null!=v[q-m]&&(f=r+(v[q-m+D]-r)*(l-a)/(v[q-m+x]-a)),z[h+D]+=f,j+=g}w=!1,h!==z.length&&t&&(z[h+2]+=f)}if(y&&h!==z.length&&h>0&&null!==z[h]&&z[h]!==z[h-g]&&z[h+1]!==z[h-g+1]){for(c=0;c<g;++c)z[h+g+c]=z[h+c];z[h+1]=z[h-g+1]}}o.points=z}}}))},options:{series:{stack:null}},name:"stack",version:"1.2"});
--- a/src/myams/resources/js/ext/flot/jquery.flot.time.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.time.js	Fri Dec 11 11:45:23 2020 +0100
@@ -26,19 +26,18 @@
     var floorInBase = $.plot.saturated.floorInBase;
 
     // Method to provide microsecond support to Date like classes.
-    var CreateMicroSecondDate = function(dateType, microEpoch) {
-        var newDate = new dateType(microEpoch);
+    var CreateMicroSecondDate = function(DateType, microEpoch) {
+        var newDate = new DateType(microEpoch);
 
         var oldSetTime = newDate.setTime.bind(newDate);
         newDate.update = function(microEpoch) {
             oldSetTime(microEpoch);
 
             // Round epoch to 3 decimal accuracy
-            microEpoch = Math.round(microEpoch*1000)/1000;
+            microEpoch = Math.round(microEpoch * 1000) / 1000;
 
             // Microseconds are stored as integers
-            var seconds = microEpoch/1000;
-            this.microseconds = 1000000 * (seconds - Math.floor(seconds));
+            this.microseconds = 1000 * (microEpoch - Math.floor(microEpoch));
         };
 
         var oldGetTime = newDate.getTime.bind(newDate);
@@ -56,9 +55,8 @@
         };
 
         newDate.setMicroseconds = function(microseconds) {
-            // Replace the microsecond part (6 last digits) in microEpoch
             var epochWithoutMicroseconds = oldGetTime();
-            var newEpoch = epochWithoutMicroseconds + microseconds/1000;
+            var newEpoch = epochWithoutMicroseconds + microseconds / 1000;
             this.update(newEpoch);
         };
 
@@ -81,27 +79,29 @@
         }
 
         var leftPad = function(n, pad) {
-			n = "" + n;
-			pad = "" + (pad == null ? "0" : pad);
-			return n.length == 1 ? pad + n : n;
-		};
+            n = "" + n;
+            pad = "" + (pad == null ? "0" : pad);
+            return n.length === 1 ? pad + n : n;
+        };
 
-		var formatMicroseconds = function(n, dec) {
-			if (dec < 6 && dec > 0) {
-				var magnitude = parseFloat('1e' + (dec-6));
-				n = Math.round(Math.round(n*magnitude)/magnitude);
-				n = ('00000' + n).slice(-6,-(6 - dec));
-			} else {
-                n = Math.round(n)
-				n = ('00000' + n).slice(-6);
-			}
-			return n;
-		};
+        var formatSubSeconds = function(milliseconds, microseconds, numberDecimalPlaces) {
+            var totalMicroseconds = milliseconds * 1000 + microseconds;
+            var formattedString;
+            if (numberDecimalPlaces < 6 && numberDecimalPlaces > 0) {
+                var magnitude = parseFloat('1e' + (numberDecimalPlaces - 6));
+                totalMicroseconds = Math.round(Math.round(totalMicroseconds * magnitude) / magnitude);
+                formattedString = ('00000' + totalMicroseconds).slice(-6, -(6 - numberDecimalPlaces));
+            } else {
+                totalMicroseconds = Math.round(totalMicroseconds)
+                formattedString = ('00000' + totalMicroseconds).slice(-6);
+            }
+            return formattedString;
+        };
 
         var r = [];
         var escape = false;
         var hours = d.getHours();
-		var isAM = hours < 12;
+        var isAM = hours < 12;
 
         if (!monthNames) {
             monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
@@ -112,55 +112,55 @@
         }
 
         var hours12;
-		if (hours > 12) {
-			hours12 = hours - 12;
-		} else if (hours == 0) {
-			hours12 = 12;
-		} else {
-			hours12 = hours;
-		}
+        if (hours > 12) {
+            hours12 = hours - 12;
+        } else if (hours === 0) {
+            hours12 = 12;
+        } else {
+            hours12 = hours;
+        }
 
         var decimals = -1;
         for (var i = 0; i < fmt.length; ++i) {
-			var c = fmt.charAt(i);
+            var c = fmt.charAt(i);
 
             if (!isNaN(Number(c)) && Number(c) > 0) {
                 decimals = Number(c);
             } else if (escape) {
-				switch (c) {
-					case 'a': c = "" + dayNames[d.getDay()]; break;
-					case 'b': c = "" + monthNames[d.getMonth()]; break;
-					case 'd': c = leftPad(d.getDate()); break;
-					case 'e': c = leftPad(d.getDate(), " "); break;
-					case 'h':	// For back-compat with 0.7; remove in 1.0
-					case 'H': c = leftPad(hours); break;
-					case 'I': c = leftPad(hours12); break;
-					case 'l': c = leftPad(hours12, " "); break;
-					case 'm': c = leftPad(d.getMonth() + 1); break;
-					case 'M': c = leftPad(d.getMinutes()); break;
-					// quarters not in Open Group's strftime specification
-					case 'q':
-						c = "" + (Math.floor(d.getMonth() / 3) + 1); break;
-					case 'S': c = leftPad(d.getSeconds()); break;
-					case 's': c = "" + formatMicroseconds(d.getMicroseconds(),decimals); break;
-					case 'y': c = leftPad(d.getFullYear() % 100); break;
-					case 'Y': c = "" + d.getFullYear(); break;
-					case 'p': c = (isAM) ? ("" + "am") : ("" + "pm"); break;
-					case 'P': c = (isAM) ? ("" + "AM") : ("" + "PM"); break;
-					case 'w': c = "" + d.getDay(); break;
-				}
-				r.push(c);
-				escape = false;
-			} else {
-				if (c == "%") {
-					escape = true;
-				} else {
-					r.push(c);
-				}
-			}
-		}
+                switch (c) {
+                    case 'a': c = "" + dayNames[d.getDay()]; break;
+                    case 'b': c = "" + monthNames[d.getMonth()]; break;
+                    case 'd': c = leftPad(d.getDate()); break;
+                    case 'e': c = leftPad(d.getDate(), " "); break;
+                    case 'h': // For back-compat with 0.7; remove in 1.0
+                    case 'H': c = leftPad(hours); break;
+                    case 'I': c = leftPad(hours12); break;
+                    case 'l': c = leftPad(hours12, " "); break;
+                    case 'm': c = leftPad(d.getMonth() + 1); break;
+                    case 'M': c = leftPad(d.getMinutes()); break;
+                    // quarters not in Open Group's strftime specification
+                    case 'q':
+                        c = "" + (Math.floor(d.getMonth() / 3) + 1); break;
+                    case 'S': c = leftPad(d.getSeconds()); break;
+                    case 's': c = "" + formatSubSeconds(d.getMilliseconds(), d.getMicroseconds(), decimals); break;
+                    case 'y': c = leftPad(d.getFullYear() % 100); break;
+                    case 'Y': c = "" + d.getFullYear(); break;
+                    case 'p': c = (isAM) ? ("" + "am") : ("" + "pm"); break;
+                    case 'P': c = (isAM) ? ("" + "AM") : ("" + "PM"); break;
+                    case 'w': c = "" + d.getDay(); break;
+                }
+                r.push(c);
+                escape = false;
+            } else {
+                if (c === "%") {
+                    escape = true;
+                } else {
+                    r.push(c);
+                }
+            }
+        }
 
-		return r.join("");
+        return r.join("");
     }
 
     // To have a consistent view of time-based data independent of which time
@@ -296,7 +296,6 @@
     var specQuarters = baseSpec.concat([[1, "quarter"], [2, "quarter"],
         [1, "year"]]);
 
-
     function dateTickGenerator(axis) {
         var opts = axis.options,
             ticks = [],
@@ -399,7 +398,7 @@
             if (step >= timeUnitSize.second) {
                 d.setMicroseconds(0);
             } else {
-                d.setMicroseconds(d.getMilliseconds()*1000);
+                d.setMicroseconds(d.getMilliseconds() * 1000);
             }
         }
         if (step >= timeUnitSize.minute) {
@@ -482,20 +481,23 @@
                 if (opts.mode === "time") {
                     axis.tickGenerator = dateTickGenerator;
 
+                    // if a tick formatter is already provided do not overwrite it
+                    if ('tickFormatter' in opts && typeof opts.tickFormatter === 'function') return;
+
                     axis.tickFormatter = function (v, axis) {
                         var d = dateGenerator(v, axis.options);
 
                         // first check global format
-						if (opts.timeformat != null) {
-							return formatDate(d, opts.timeformat, opts.monthNames, opts.dayNames);
-						}
+                        if (opts.timeformat != null) {
+                            return formatDate(d, opts.timeformat, opts.monthNames, opts.dayNames);
+                        }
 
-						// possibly use quarters if quarters are mentioned in
-						// any of these places
-						var useQuarters = (axis.options.tickSize &&
-								axis.options.tickSize[1] == "quarter") ||
-							(axis.options.minTickSize &&
-                                axis.options.minTickSize[1] == "quarter");
+                        // possibly use quarters if quarters are mentioned in
+                        // any of these places
+                        var useQuarters = (axis.options.tickSize &&
+                                axis.options.tickSize[1] === "quarter") ||
+                            (axis.options.minTickSize &&
+                                axis.options.minTickSize[1] === "quarter");
 
                         var timeUnitSize;
                         if (opts.timeBase === 'seconds') {
@@ -506,12 +508,12 @@
                             timeUnitSize = timeUnitSizeMilliseconds;
                         }
 
-						var t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]];
-						var span = axis.max - axis.min;
-						var suffix = (opts.twelveHourClock) ? " %p" : "";
-						var hourCode = (opts.twelveHourClock) ? "%I" : "%H";
+                        var t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]];
+                        var span = axis.max - axis.min;
+                        var suffix = (opts.twelveHourClock) ? " %p" : "";
+                        var hourCode = (opts.twelveHourClock) ? "%I" : "%H";
                         var factor;
-						var fmt;
+                        var fmt;
 
                         if (opts.timeBase === 'seconds') {
                             factor = 1;
@@ -522,45 +524,45 @@
                         }
 
                         if (t < timeUnitSize.second) {
-                            var decimals = -Math.floor(Math.log10(t/factor))
+                            var decimals = -Math.floor(Math.log10(t / factor))
 
                             // the two-and-halves require an additional decimal
                             if (String(t).indexOf('25') > -1) {
                                 decimals++;
                             }
 
-							fmt = "%S.%" + decimals + "s";
+                            fmt = "%S.%" + decimals + "s";
                         } else
                         if (t < timeUnitSize.minute) {
-							fmt = hourCode + ":%M:%S" + suffix;
-						} else if (t < timeUnitSize.day) {
-							if (span < 2 * timeUnitSize.day) {
-								fmt = hourCode + ":%M" + suffix;
-							} else {
-								fmt = "%b %d " + hourCode + ":%M" + suffix;
-							}
-						} else if (t < timeUnitSize.month) {
-							fmt = "%b %d";
-						} else if ((useQuarters && t < timeUnitSize.quarter) ||
-							(!useQuarters && t < timeUnitSize.year)) {
-							if (span < timeUnitSize.year) {
-								fmt = "%b";
-							} else {
-								fmt = "%b %Y";
-							}
-						} else if (useQuarters && t < timeUnitSize.year) {
-							if (span < timeUnitSize.year) {
-								fmt = "Q%q";
-							} else {
-								fmt = "Q%q %Y";
-							}
-						} else {
-							fmt = "%Y";
-						}
+                            fmt = hourCode + ":%M:%S" + suffix;
+                        } else if (t < timeUnitSize.day) {
+                            if (span < 2 * timeUnitSize.day) {
+                                fmt = hourCode + ":%M" + suffix;
+                            } else {
+                                fmt = "%b %d " + hourCode + ":%M" + suffix;
+                            }
+                        } else if (t < timeUnitSize.month) {
+                            fmt = "%b %d";
+                        } else if ((useQuarters && t < timeUnitSize.quarter) ||
+                            (!useQuarters && t < timeUnitSize.year)) {
+                            if (span < timeUnitSize.year) {
+                                fmt = "%b";
+                            } else {
+                                fmt = "%b %Y";
+                            }
+                        } else if (useQuarters && t < timeUnitSize.year) {
+                            if (span < timeUnitSize.year) {
+                                fmt = "Q%q";
+                            } else {
+                                fmt = "Q%q %Y";
+                            }
+                        } else {
+                            fmt = "%Y";
+                        }
 
-						var rt = formatDate(d, fmt, opts.monthNames, opts.dayNames);
+                        var rt = formatDate(d, fmt, opts.monthNames, opts.dayNames);
 
-						return rt;
+                        return rt;
                     };
                 }
             });
--- a/src/myams/resources/js/ext/flot/jquery.flot.time.min.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.time.min.js	Fri Dec 11 11:45:23 2020 +0100
@@ -1,1 +1,1 @@
-!function(e){"use strict";var t=e.plot.saturated.floorInBase,i=function(e,t){var i=new e(t),o=i.setTime.bind(i);i.update=function(e){o(e);var t=(e=Math.round(1e3*e)/1e3)/1e3;this.microseconds=1e6*(t-Math.floor(t))};var n=i.getTime.bind(i);return i.getTime=function(){return n()+this.microseconds/1e3},i.setTime=function(e){this.update(e)},i.getMicroseconds=function(){return this.microseconds},i.setMicroseconds=function(e){var t=n()+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,s=function(e,t){return t=""+(null==t?"0":t),1==(e=""+e).length?t+e:e},r=function(e,t){if(t<6&&t>0){var i=parseFloat("1e"+(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},a=[],c=!1,m=e.getHours(),u=m<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=m>12?m-12:0==m?12:m;for(var d=-1,l=0;l<t.length;++l){var h=t.charAt(l);if(!isNaN(Number(h))&&Number(h)>0)d=Number(h);else if(c){switch(h){case"a":h=""+o[e.getDay()];break;case"b":h=""+i[e.getMonth()];break;case"d":h=s(e.getDate());break;case"e":h=s(e.getDate()," ");break;case"h":case"H":h=s(m);break;case"I":h=s(n);break;case"l":h=s(n," ");break;case"m":h=s(e.getMonth()+1);break;case"M":h=s(e.getMinutes());break;case"q":h=""+(Math.floor(e.getMonth()/3)+1);break;case"S":h=s(e.getSeconds());break;case"s":h=""+r(e.getMicroseconds(),d);break;case"y":h=s(e.getFullYear()%100);break;case"Y":h=""+e.getFullYear();break;case"p":h=u?"am":"pm";break;case"P":h=u?"AM":"PM";break;case"w":h=""+e.getDay()}a.push(h),c=!1}else"%"==h?c=!0:a.push(h)}return a.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 s(e,t){if(t&&"seconds"===t.timeBase?e*=1e3:"microseconds"===t.timeBase&&(e/=1e3),e>864e13?e=864e13:e<-864e13&&(e=-864e13),"browser"===t.timezone)return i(Date,e);if(t.timezone&&"utc"!==t.timezone){if("undefined"!=typeof timezoneJS&&void 0!==timezoneJS.Date){var o=i(timezoneJS.Date,e);return o.setTimezone(t.timezone),o.setTime(e),o}return n(i(Date,e))}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},a={microsecond:.001,millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,quarter:7776e6,year:525949.2*60*1e3},c={microsecond:1,millisecond:1e3,second:1e6,minute:6e7,hour:36e8,day:864e8,month:2592e9,quarter:7776e9,year:525949.2*60*1e6},m=[[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=m.concat([[3,"month"],[6,"month"],[1,"year"]]),d=m.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);function l(e){var i,o=e.options,n=[],m=s(e.min,o),l=0,h=o.tickSize&&"quarter"===o.tickSize[1]||o.minTickSize&&"quarter"===o.minTickSize[1]?d:u;i="seconds"===o.timeBase?r:"microseconds"===o.timeBase?c:a,null!==o.minTickSize&&void 0!==o.minTickSize&&(l="number"==typeof o.tickSize?o.tickSize:o.minTickSize[0]*i[o.minTickSize[1]]);for(var M=0;M<h.length-1&&!(e.delta<(h[M][0]*i[h[M][1]]+h[M+1][0]*i[h[M+1][1]])/2&&h[M][0]*i[h[M][1]]>=l);++M);var f=h[M][0],g=h[M][1];if("year"===g){if(null!==o.minTickSize&&void 0!==o.minTickSize&&"year"===o.minTickSize[1])f=Math.floor(o.minTickSize[0]);else{var k=parseFloat("1e"+Math.floor(Math.log(e.delta/i.year)/Math.LN10)),p=e.delta/i.year/k;f=p<1.5?1:p<3?2:p<7.5?5:10,f*=k}f<1&&(f=1)}e.tickSize=o.tickSize||[f,g];var y=e.tickSize[0],S=y*i[g=e.tickSize[1]];"microsecond"===g?m.setMicroseconds(t(m.getMicroseconds(),y)):"millisecond"===g?m.setMilliseconds(t(m.getMilliseconds(),y)):"second"===g?m.setSeconds(t(m.getSeconds(),y)):"minute"===g?m.setMinutes(t(m.getMinutes(),y)):"hour"===g?m.setHours(t(m.getHours(),y)):"month"===g?m.setMonth(t(m.getMonth(),y)):"quarter"===g?m.setMonth(3*t(m.getMonth()/3,y)):"year"===g&&m.setFullYear(t(m.getFullYear(),y)),S>=i.millisecond&&(S>=i.second?m.setMicroseconds(0):m.setMicroseconds(1e3*m.getMilliseconds())),S>=i.minute&&m.setSeconds(0),S>=i.hour&&m.setMinutes(0),S>=i.day&&m.setHours(0),S>=4*i.day&&m.setDate(1),S>=2*i.month&&m.setMonth(t(m.getMonth(),3)),S>=2*i.quarter&&m.setMonth(t(m.getMonth(),6)),S>=i.year&&m.setMonth(0);var T,v,z=0,b=Number.NaN;do{if(v=b,T=m.getTime(),b=o&&"seconds"===o.timeBase?T/1e3:o&&"microseconds"===o.timeBase?1e3*T:T,n.push(b),"month"===g||"quarter"===g)if(y<1){m.setDate(1);var q=m.getTime();m.setMonth(m.getMonth()+("quarter"===g?3:1));var B=m.getTime();m.setTime(b+z*i.hour+(B-q)*y),z=m.getHours(),m.setHours(0)}else m.setMonth(m.getMonth()+y*("quarter"===g?3:1));else"year"===g?m.setFullYear(m.getFullYear()+y):"seconds"===o.timeBase?m.setTime(1e3*(b+S)):"microseconds"===o.timeBase?m.setTime((b+S)/1e3):m.setTime(b+S)}while(b<e.max&&b!==v);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=l,t.tickFormatter=function(e,t){var n=s(e,t.options);if(null!=i.timeformat)return o(n,i.timeformat,i.monthNames,i.dayNames);var m,u=t.options.tickSize&&"quarter"==t.options.tickSize[1]||t.options.minTickSize&&"quarter"==t.options.minTickSize[1];m="seconds"===i.timeBase?r:"microseconds"===i.timeBase?c:a;var d,l,h=t.tickSize[0]*m[t.tickSize[1]],M=t.max-t.min,f=i.twelveHourClock?" %p":"",g=i.twelveHourClock?"%I":"%H";if(d="seconds"===i.timeBase?1:"microseconds"===i.timeBase?1e6:1e3,h<m.second){var k=-Math.floor(Math.log10(h/d));String(h).indexOf("25")>-1&&k++,l="%S.%"+k+"s"}else l=h<m.minute?g+":%M:%S"+f:h<m.day?M<2*m.day?g+":%M"+f:"%b %d "+g+":%M"+f:h<m.month?"%b %d":u&&h<m.quarter||!u&&h<m.year?M<m.year?"%b":"%b %Y":u&&h<m.year?M<m.year?"Q%q":"Q%q %Y":"%Y";return o(n,l,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=s,e.plot.dateTickGenerator=l,e.plot.makeUtcWrapper=n}(jQuery);
+!function(e){"use strict";var t=e.plot.saturated.floorInBase,i=function(e,t){var i=new e(t),o=i.setTime.bind(i);i.update=function(e){o(e),e=Math.round(1e3*e)/1e3,this.microseconds=1e3*(e-Math.floor(e))};var n=i.getTime.bind(i);return i.getTime=function(){return n()+this.microseconds/1e3},i.setTime=function(e){this.update(e)},i.getMicroseconds=function(){return this.microseconds},i.setMicroseconds=function(e){var t=n()+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,s=function(e,t){return t=""+(null==t?"0":t),1===(e=""+e).length?t+e:e},r=function(e,t,i){var o,n=1e3*e+t;if(i<6&&i>0){var s=parseFloat("1e"+(i-6));o=("00000"+(n=Math.round(Math.round(n*s)/s))).slice(-6,-(6-i))}else o=("00000"+(n=Math.round(n))).slice(-6);return o},c=[],a=!1,m=e.getHours(),u=m<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=m>12?m-12:0===m?12:m;for(var d=-1,l=0;l<t.length;++l){var h=t.charAt(l);if(!isNaN(Number(h))&&Number(h)>0)d=Number(h);else if(a){switch(h){case"a":h=""+o[e.getDay()];break;case"b":h=""+i[e.getMonth()];break;case"d":h=s(e.getDate());break;case"e":h=s(e.getDate()," ");break;case"h":case"H":h=s(m);break;case"I":h=s(n);break;case"l":h=s(n," ");break;case"m":h=s(e.getMonth()+1);break;case"M":h=s(e.getMinutes());break;case"q":h=""+(Math.floor(e.getMonth()/3)+1);break;case"S":h=s(e.getSeconds());break;case"s":h=""+r(e.getMilliseconds(),e.getMicroseconds(),d);break;case"y":h=s(e.getFullYear()%100);break;case"Y":h=""+e.getFullYear();break;case"p":h=u?"am":"pm";break;case"P":h=u?"AM":"PM";break;case"w":h=""+e.getDay()}c.push(h),a=!1}else"%"===h?a=!0:c.push(h)}return c.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 s(e,t){if(t&&"seconds"===t.timeBase?e*=1e3:"microseconds"===t.timeBase&&(e/=1e3),e>864e13?e=864e13:e<-864e13&&(e=-864e13),"browser"===t.timezone)return i(Date,e);if(t.timezone&&"utc"!==t.timezone){if("undefined"!=typeof timezoneJS&&void 0!==timezoneJS.Date){var o=i(timezoneJS.Date,e);return o.setTimezone(t.timezone),o.setTime(e),o}return n(i(Date,e))}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},c={microsecond:.001,millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,quarter:7776e6,year:525949.2*60*1e3},a={microsecond:1,millisecond:1e3,second:1e6,minute:6e7,hour:36e8,day:864e8,month:2592e9,quarter:7776e9,year:525949.2*60*1e6},m=[[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=m.concat([[3,"month"],[6,"month"],[1,"year"]]),d=m.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);function l(e){var i,o=e.options,n=[],m=s(e.min,o),l=0,h=o.tickSize&&"quarter"===o.tickSize[1]||o.minTickSize&&"quarter"===o.minTickSize[1]?d:u;i="seconds"===o.timeBase?r:"microseconds"===o.timeBase?a:c,null!==o.minTickSize&&void 0!==o.minTickSize&&(l="number"==typeof o.tickSize?o.tickSize:o.minTickSize[0]*i[o.minTickSize[1]]);for(var f=0;f<h.length-1&&!(e.delta<(h[f][0]*i[h[f][1]]+h[f+1][0]*i[h[f+1][1]])/2&&h[f][0]*i[h[f][1]]>=l);++f);var M=h[f][0],g=h[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 k=parseFloat("1e"+Math.floor(Math.log(e.delta/i.year)/Math.LN10)),p=e.delta/i.year/k;M=p<1.5?1:p<3?2:p<7.5?5:10,M*=k}M<1&&(M=1)}e.tickSize=o.tickSize||[M,g];var y=e.tickSize[0],S=y*i[g=e.tickSize[1]];"microsecond"===g?m.setMicroseconds(t(m.getMicroseconds(),y)):"millisecond"===g?m.setMilliseconds(t(m.getMilliseconds(),y)):"second"===g?m.setSeconds(t(m.getSeconds(),y)):"minute"===g?m.setMinutes(t(m.getMinutes(),y)):"hour"===g?m.setHours(t(m.getHours(),y)):"month"===g?m.setMonth(t(m.getMonth(),y)):"quarter"===g?m.setMonth(3*t(m.getMonth()/3,y)):"year"===g&&m.setFullYear(t(m.getFullYear(),y)),S>=i.millisecond&&(S>=i.second?m.setMicroseconds(0):m.setMicroseconds(1e3*m.getMilliseconds())),S>=i.minute&&m.setSeconds(0),S>=i.hour&&m.setMinutes(0),S>=i.day&&m.setHours(0),S>=4*i.day&&m.setDate(1),S>=2*i.month&&m.setMonth(t(m.getMonth(),3)),S>=2*i.quarter&&m.setMonth(t(m.getMonth(),6)),S>=i.year&&m.setMonth(0);var T,v,z=0,b=Number.NaN;do{if(v=b,T=m.getTime(),b=o&&"seconds"===o.timeBase?T/1e3:o&&"microseconds"===o.timeBase?1e3*T:T,n.push(b),"month"===g||"quarter"===g)if(y<1){m.setDate(1);var q=m.getTime();m.setMonth(m.getMonth()+("quarter"===g?3:1));var B=m.getTime();m.setTime(b+z*i.hour+(B-q)*y),z=m.getHours(),m.setHours(0)}else m.setMonth(m.getMonth()+y*("quarter"===g?3:1));else"year"===g?m.setFullYear(m.getFullYear()+y):"seconds"===o.timeBase?m.setTime(1e3*(b+S)):"microseconds"===o.timeBase?m.setTime((b+S)/1e3):m.setTime(b+S)}while(b<e.max&&b!==v);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;if("time"===i.mode){if(t.tickGenerator=l,"tickFormatter"in i&&"function"==typeof i.tickFormatter)return;t.tickFormatter=function(e,t){var n=s(e,t.options);if(null!=i.timeformat)return o(n,i.timeformat,i.monthNames,i.dayNames);var m,u=t.options.tickSize&&"quarter"===t.options.tickSize[1]||t.options.minTickSize&&"quarter"===t.options.minTickSize[1];m="seconds"===i.timeBase?r:"microseconds"===i.timeBase?a:c;var d,l,h=t.tickSize[0]*m[t.tickSize[1]],f=t.max-t.min,M=i.twelveHourClock?" %p":"",g=i.twelveHourClock?"%I":"%H";if(d="seconds"===i.timeBase?1:"microseconds"===i.timeBase?1e6:1e3,h<m.second){var k=-Math.floor(Math.log10(h/d));String(h).indexOf("25")>-1&&k++,l="%S.%"+k+"s"}else l=h<m.minute?g+":%M:%S"+M:h<m.day?f<2*m.day?g+":%M"+M:"%b %d "+g+":%M"+M:h<m.month?"%b %d":u&&h<m.quarter||!u&&h<m.year?f<m.year?"%b":"%b %Y":u&&h<m.year?f<m.year?"Q%q":"Q%q %Y":"%Y";return o(n,l,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=s,e.plot.dateTickGenerator=l,e.plot.makeUtcWrapper=n}(jQuery);
--- a/src/myams/resources/js/ext/flot/jquery.flot.touchNavigate.js	Fri Dec 11 08:52:58 2020 +0100
+++ b/src/myams/resources/js/ext/flot/jquery.flot.touchNavigate.js	Fri Dec 11 11:45:23 2020 +0100
@@ -35,7 +35,7 @@
                 currentTouchedAxis: 'none',
                 touchedAxis: null,
                 navigationConstraint: 'unconstrained',
-                initialState: null,
+                initialState: null
             },
             useManualPan = options.pan.interactive && options.pan.touchMode === 'manual',
             smartPanLock = options.pan.touchMode === 'smartLock',