diff --git a/templates/assets/export-csv.js b/templates/assets/export-csv.js new file mode 100644 index 000000000..ac7c57464 --- /dev/null +++ b/templates/assets/export-csv.js @@ -0,0 +1,392 @@ +/** + * A Highcharts plugin for exporting data from a rendered chart as CSV, XLS or HTML table + * + * Author: Torstein Honsi + * Licence: MIT + * Version: 1.4.7 + */ +/*global Highcharts, window, document, Blob */ +(function (factory) { + if (typeof module === 'object' && module.exports) { + module.exports = factory; + } else { + factory(Highcharts); + } +})(function (Highcharts) { + + 'use strict'; + + var each = Highcharts.each, + pick = Highcharts.pick, + seriesTypes = Highcharts.seriesTypes, + downloadAttrSupported = document.createElement('a').download !== undefined; + + Highcharts.setOptions({ + lang: { + downloadCSV: 'Download CSV', + downloadXLS: 'Download XLS', + viewData: 'View data table' + } + }); + + + /** + * Get the data rows as a two dimensional array + */ + Highcharts.Chart.prototype.getDataRows = function () { + var options = (this.options.exporting || {}).csv || {}, + xAxis, + xAxes = this.xAxis, + rows = {}, + rowArr = [], + dataRows, + names = [], + i, + x, + xTitle, + // Options + dateFormat = options.dateFormat || '%Y-%m-%d %H:%M:%S', + columnHeaderFormatter = options.columnHeaderFormatter || function (item, key, keyLength) { + if (item instanceof Highcharts.Axis) { + return (item.options.title && item.options.title.text) || + (item.isDatetimeAxis ? 'DateTime' : 'Category'); + } + return item ? + item.name + (keyLength > 1 ? ' ('+ key + ')' : '') : + 'Category'; + }, + xAxisIndices = []; + + // Loop the series and index values + i = 0; + each(this.series, function (series) { + var keys = series.options.keys, + pointArrayMap = keys || series.pointArrayMap || ['y'], + valueCount = pointArrayMap.length, + requireSorting = series.requireSorting, + categoryMap = {}, + xAxisIndex = Highcharts.inArray(series.xAxis, xAxes), + j; + + // Map the categories for value axes + each(pointArrayMap, function (prop) { + categoryMap[prop] = (series[prop + 'Axis'] && series[prop + 'Axis'].categories) || []; + }); + + if (series.options.includeInCSVExport !== false && series.visible !== false) { // #55 + + // Build a lookup for X axis index and the position of the first + // series that belongs to that X axis. Includes -1 for non-axis + // series types like pies. + if (!Highcharts.find(xAxisIndices, function (index) { + return index[0] === xAxisIndex; + })) { + xAxisIndices.push([xAxisIndex, i]); + } + + // Add the column headers, usually the same as series names + j = 0; + while (j < valueCount) { + names.push(columnHeaderFormatter(series, pointArrayMap[j], pointArrayMap.length)); + j = j + 1; + } + + each(series.points, function (point, pIdx) { + var key = requireSorting ? point.x : pIdx, + prop, + val; + + j = 0; + + if (!rows[key]) { + // Generate the row + rows[key] = []; + // Contain the X values from one or more X axes + rows[key].xValues = []; + } + rows[key].x = point.x; + rows[key].xValues[xAxisIndex] = point.x; + + // Pies, funnels, geo maps etc. use point name in X row + if (!series.xAxis || series.exportKey === 'name') { + rows[key].name = point.name; + } + + while (j < valueCount) { + prop = pointArrayMap[j]; // y, z etc + val = point[prop]; + rows[key][i + j] = pick(categoryMap[prop][val], val); // Pick a Y axis category if present + j = j + 1; + } + + }); + i = i + j; + } + }); + + // Make a sortable array + for (x in rows) { + if (rows.hasOwnProperty(x)) { + rowArr.push(rows[x]); + } + } + + var binding, xAxisIndex, column; + dataRows = [names]; + + i = xAxisIndices.length; + while (i--) { // Start from end to splice in + xAxisIndex = xAxisIndices[i][0]; + column = xAxisIndices[i][1]; + xAxis = xAxes[xAxisIndex]; + + // Sort it by X values + rowArr.sort(function (a, b) { + return a.xValues[xAxisIndex] - b.xValues[xAxisIndex]; + }); + + // Add header row + xTitle = columnHeaderFormatter(xAxis); + //dataRows = [[xTitle].concat(names)]; + dataRows[0].splice(column, 0, xTitle); + + // Add the category column + each(rowArr, function (row) { + + var category = row.name; + if (!category) { + if (xAxis.isDatetimeAxis) { + if (row.x instanceof Date) { + row.x = row.x.getTime(); + } + category = Highcharts.dateFormat(dateFormat, row.x); + } else if (xAxis.categories) { + category = pick( + xAxis.names[row.x], + xAxis.categories[row.x], + row.x + ) + } else { + category = row.x; + } + } + + // Add the X/date/category + row.splice(column, 0, category); + }); + } + dataRows = dataRows.concat(rowArr); + + return dataRows; + }; + + /** + * Get a CSV string + */ + Highcharts.Chart.prototype.getCSV = function (useLocalDecimalPoint) { + var csv = '', + rows = this.getDataRows(), + options = (this.options.exporting || {}).csv || {}, + itemDelimiter = options.itemDelimiter || ',', // use ';' for direct import to Excel + lineDelimiter = options.lineDelimiter || '\n'; // '\n' isn't working with the js csv data extraction + + // Transform the rows to CSV + each(rows, function (row, i) { + var val = '', + j = row.length, + n = useLocalDecimalPoint ? (1.1).toLocaleString()[1] : '.'; + while (j--) { + val = row[j]; + if (typeof val === "string") { + val = '"' + val + '"'; + } + if (typeof val === 'number') { + if (n === ',') { + val = val.toString().replace(".", ","); + } + } + row[j] = val; + } + // Add the values + csv += row.join(itemDelimiter); + + // Add the line delimiter + if (i < rows.length - 1) { + csv += lineDelimiter; + } + }); + return csv; + }; + + /** + * Build a HTML table with the data + */ + Highcharts.Chart.prototype.getTable = function (useLocalDecimalPoint) { + var html = '', + rows = this.getDataRows(); + + // Transform the rows to HTML + each(rows, function (row, i) { + var tag = i ? 'td' : 'th', + val, + j, + n = useLocalDecimalPoint ? (1.1).toLocaleString()[1] : '.'; + + html += ''; + for (j = 0; j < row.length; j = j + 1) { + val = row[j]; + // Add the cell + if (typeof val === 'number') { + val = val.toString(); + if (n === ',') { + val = val.replace('.', n); + } + html += '<' + tag + ' class="number">' + val + ''; + + } else { + html += '<' + tag + '>' + (val === undefined ? '' : val) + ''; + } + } + + html += ''; + + // After the first row, end head and start body + if (!i) { + html += ''; + } + + }); + html += '
'; + + return html; + }; + + function getContent(chart, href, extension, content, MIME) { + var a, + blobObject, + name, + options = (chart.options.exporting || {}).csv || {}, + url = options.url || 'http://www.highcharts.com/studies/csv-export/download.php'; + + if (chart.options.exporting.filename) { + name = chart.options.exporting.filename; + } else if (chart.title) { + name = chart.title.textStr.replace(/ /g, '-').toLowerCase(); + } else { + name = 'chart'; + } + + // MS specific. Check this first because of bug with Edge (#76) + if (window.Blob && window.navigator.msSaveOrOpenBlob) { + // Falls to msSaveOrOpenBlob if download attribute is not supported + blobObject = new Blob([content]); + window.navigator.msSaveOrOpenBlob(blobObject, name + '.' + extension); + + // Download attribute supported + } else if (downloadAttrSupported) { + a = document.createElement('a'); + a.href = href; + a.target = '_blank'; + a.download = name + '.' + extension; + chart.container.append(a); // #111 + a.click(); + a.remove(); + + } else { + // Fall back to server side handling + Highcharts.post(url, { + data: content, + type: MIME, + extension: extension + }); + } + } + + /** + * Call this on click of 'Download CSV' button + */ + Highcharts.Chart.prototype.downloadCSV = function () { + var csv = this.getCSV(true); + getContent( + this, + 'data:text/csv,\uFEFF' + encodeURIComponent(csv), + 'csv', + csv, + 'text/csv' + ); + }; + + /** + * Call this on click of 'Download XLS' button + */ + Highcharts.Chart.prototype.downloadXLS = function () { + var uri = 'data:application/vnd.ms-excel;base64,', + template = '' + + '' + + '' + + '' + + '' + + '' + + this.getTable(true) + + '', + base64 = function (s) { + return window.btoa(unescape(encodeURIComponent(s))); // #50 + }; + getContent( + this, + uri + base64(template), + 'xls', + template, + 'application/vnd.ms-excel' + ); + }; + + /** + * View the data in a table below the chart + */ + Highcharts.Chart.prototype.viewData = function () { + if (!this.dataTableDiv) { + this.dataTableDiv = document.createElement('div'); + this.dataTableDiv.className = 'highcharts-data-table'; + + // Insert after the chart container + this.renderTo.parentNode.insertBefore( + this.dataTableDiv, + this.renderTo.nextSibling + ); + } + + this.dataTableDiv.innerHTML = this.getTable(); + }; + + + // Add "Download CSV" to the exporting menu. Use download attribute if supported, else + // run a simple PHP script that returns a file. The source code for the PHP script can be viewed at + // https://raw.github.com/highslide-software/highcharts.com/master/studies/csv-export/csv.php + if (Highcharts.getOptions().exporting) { + Highcharts.getOptions().exporting.buttons.contextButton.menuItems.push({ + textKey: 'downloadCSV', + onclick: function () { this.downloadCSV(); } + }, { + textKey: 'downloadXLS', + onclick: function () { this.downloadXLS(); } + }, { + textKey: 'viewData', + onclick: function () { this.viewData(); } + }); + } + + // Series specific + if (seriesTypes.map) { + seriesTypes.map.prototype.exportKey = 'name'; + } + if (seriesTypes.mapbubble) { + seriesTypes.mapbubble.prototype.exportKey = 'name'; + } + if (seriesTypes.treemap) { + seriesTypes.treemap.prototype.exportKey = 'name'; + } + +}); diff --git a/templates/assets/exporting.js b/templates/assets/exporting.js new file mode 100644 index 000000000..d493a31f3 --- /dev/null +++ b/templates/assets/exporting.js @@ -0,0 +1,27 @@ +/* + Highcharts JS v5.0.10 (2017-03-31) + Exporting module + + (c) 2010-2017 Torstein Honsi + + License: www.highcharts.com/license +*/ +(function(k){"object"===typeof module&&module.exports?module.exports=k:k(Highcharts)})(function(k){(function(f){var k=f.defaultOptions,n=f.doc,A=f.Chart,w=f.addEvent,F=f.removeEvent,D=f.fireEvent,q=f.createElement,B=f.discardElement,u=f.css,p=f.merge,C=f.pick,h=f.each,r=f.extend,G=f.isTouchDevice,E=f.win,H=f.Renderer.prototype.symbols;r(k.lang,{printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image", +contextButtonTitle:"Chart context menu"});k.navigation={buttonOptions:{theme:{},symbolSize:14,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,verticalAlign:"top",width:24}};p(!0,k.navigation,{menuStyle:{border:"1px solid #999999",background:"#ffffff",padding:"5px 0"},menuItemStyle:{padding:"0.5em 1em",background:"none",color:"#333333",fontSize:G?"14px":"11px",transition:"background 250ms, color 250ms"},menuItemHoverStyle:{background:"#335cad",color:"#ffffff"},buttonOptions:{symbolFill:"#666666", +symbolStroke:"#666666",symbolStrokeWidth:3,theme:{fill:"#ffffff",stroke:"none",padding:5}}});k.exporting={type:"image/png",url:"https://export.highcharts.com/",printMaxWidth:780,scale:2,buttons:{contextButton:{className:"highcharts-contextbutton",menuClassName:"highcharts-contextmenu",symbol:"menu",_titleKey:"contextButtonTitle",menuItems:[{textKey:"printChart",onclick:function(){this.print()}},{separator:!0},{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}}, +{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]}}};f.post=function(a,b,e){var c;a=q("form",p({method:"post",action:a,enctype:"multipart/form-data"},e),{display:"none"},n.body);for(c in b)q("input",{type:"hidden",name:c,value:b[c]},null,a);a.submit();B(a)};r(A.prototype,{sanitizeSVG:function(a,b){if(b&&b.exporting&&b.exporting.allowHTML){var e=a.match(/<\/svg>(.*?$)/);e&&e[1]&& +(e='\x3cforeignObject x\x3d"0" y\x3d"0" width\x3d"'+b.chart.width+'" height\x3d"'+b.chart.height+'"\x3e\x3cbody xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e'+e[1]+"\x3c/body\x3e\x3c/foreignObject\x3e",a=a.replace("\x3c/svg\x3e",e+"\x3c/svg\x3e"))}a=a.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\(("|")(\S+)("|")\)/g,"url($2)").replace(/url\([^#]+#/g,"url(#").replace(/.*?$/,"\x3c/svg\x3e").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g,'$1\x3d"rgb($2)" $1-opacity\x3d"$3"').replace(/ /g,"\u00a0").replace(/­/g,"\u00ad");return a=a.replace(//g,"\x3c$1title\x3e").replace(/height=([^" ]+)/g,'height\x3d"$1"').replace(/width=([^" ]+)/g,'width\x3d"$1"').replace(/hc-svg-href="([^"]+)">/g,'xlink:href\x3d"$1"/\x3e').replace(/ id=([^" >]+)/g,' id\x3d"$1"').replace(/class=([^" >]+)/g, +'class\x3d"$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(a){return a.toLowerCase()})},getChartHTML:function(){return this.container.innerHTML},getSVG:function(a){var b,e,c,v,m,g=p(this.options,a);n.createElementNS||(n.createElementNS=function(a,b){return n.createElement(b)});e=q("div",null,{position:"absolute",top:"-9999em",width:this.chartWidth+"px",height:this.chartHeight+"px"},n.body);c=this.renderTo.style.width;m=this.renderTo.style.height; +c=g.exporting.sourceWidth||g.chart.width||/px$/.test(c)&&parseInt(c,10)||600;m=g.exporting.sourceHeight||g.chart.height||/px$/.test(m)&&parseInt(m,10)||400;r(g.chart,{animation:!1,renderTo:e,forExport:!0,renderer:"SVGRenderer",width:c,height:m});g.exporting.enabled=!1;delete g.data;g.series=[];h(this.series,function(a){v=p(a.userOptions,{animation:!1,enableMouseTracking:!1,showCheckbox:!1,visible:a.visible});v.isInternal||g.series.push(v)});h(this.axes,function(a){a.userOptions.internalKey||(a.userOptions.internalKey= +f.uniqueKey())});b=new f.Chart(g,this.callback);a&&h(["xAxis","yAxis","series"],function(c){var d={};a[c]&&(d[c]=a[c],b.update(d))});h(this.axes,function(a){var c=f.find(b.axes,function(b){return b.options.internalKey===a.userOptions.internalKey}),d=a.getExtremes(),e=d.userMin,d=d.userMax;!c||void 0===e&&void 0===d||c.setExtremes(e,d,!0,!1)});c=b.getChartHTML();c=this.sanitizeSVG(c,g);g=null;b.destroy();B(e);return c},getSVGForExport:function(a,b){var e=this.options.exporting;return this.getSVG(p({chart:{borderRadius:0}}, +e.chartOptions,b,{exporting:{sourceWidth:a&&a.sourceWidth||e.sourceWidth,sourceHeight:a&&a.sourceHeight||e.sourceHeight}}))},exportChart:function(a,b){b=this.getSVGForExport(a,b);a=p(this.options.exporting,a);f.post(a.url,{filename:a.filename||"chart",type:a.type,width:a.width||0,scale:a.scale,svg:b},a.formAttributes)},print:function(){var a=this,b=a.container,e=[],c=b.parentNode,f=n.body,m=f.childNodes,g=a.options.exporting.printMaxWidth,d,t;if(!a.isPrinting){a.isPrinting=!0;a.pointer.reset(null, +0);D(a,"beforePrint");if(t=g&&a.chartWidth>g)d=[a.options.chart.width,void 0,!1],a.setSize(g,void 0,!1);h(m,function(a,b){1===a.nodeType&&(e[b]=a.style.display,a.style.display="none")});f.appendChild(b);E.focus();E.print();setTimeout(function(){c.appendChild(b);h(m,function(a,b){1===a.nodeType&&(a.style.display=e[b])});a.isPrinting=!1;t&&a.setSize.apply(a,d);D(a,"afterPrint")},1E3)}},contextMenu:function(a,b,e,c,f,m,g){var d=this,t=d.options.navigation,v=d.chartWidth,k=d.chartHeight,p="cache-"+a, +l=d[p],x=Math.max(f,m),y,z;l||(d[p]=l=q("div",{className:a},{position:"absolute",zIndex:1E3,padding:x+"px"},d.container),y=q("div",{className:"highcharts-menu"},null,l),u(y,r({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},t.menuStyle)),z=function(){u(l,{display:"none"});g&&g.setState(0);d.openMenu=!1},d.exportEvents.push(w(l,"mouseleave",function(){l.hideTimer=setTimeout(z,500)}),w(l,"mouseenter",function(){clearTimeout(l.hideTimer)}),w(n,"mouseup", +function(b){d.pointer.inClass(b.target,a)||z()})),h(b,function(a){if(a){var b;a.separator?b=q("hr",null,null,y):(b=q("div",{className:"highcharts-menu-item",onclick:function(b){b&&b.stopPropagation();z();a.onclick&&a.onclick.apply(d,arguments)},innerHTML:a.text||d.options.lang[a.textKey]},null,y),b.onmouseover=function(){u(this,t.menuItemHoverStyle)},b.onmouseout=function(){u(this,t.menuItemStyle)},u(b,r({cursor:"pointer"},t.menuItemStyle)));d.exportDivElements.push(b)}}),d.exportDivElements.push(y, +l),d.exportMenuWidth=l.offsetWidth,d.exportMenuHeight=l.offsetHeight);b={display:"block"};e+d.exportMenuWidth>v?b.right=v-e-f-x+"px":b.left=e-x+"px";c+m+d.exportMenuHeight>k&&"top"!==g.alignOptions.verticalAlign?b.bottom=k-c-x+"px":b.top=c+m-x+"px";u(l,b);d.openMenu=!0},addButton:function(a){var b=this,e=b.renderer,c=p(b.options.navigation.buttonOptions,a),f=c.onclick,m=c.menuItems,g,d,k=c.symbolSize||12;b.btnCount||(b.btnCount=0);b.exportDivElements||(b.exportDivElements=[],b.exportSVGElements=[]); +if(!1!==c.enabled){var h=c.theme,n=h.states,q=n&&n.hover,n=n&&n.select,l;delete h.states;f?l=function(a){a.stopPropagation();f.call(b,a)}:m&&(l=function(){b.contextMenu(d.menuClassName,m,d.translateX,d.translateY,d.width,d.height,d);d.setState(2)});c.text&&c.symbol?h.paddingLeft=C(h.paddingLeft,25):c.text||r(h,{width:c.width,height:c.height,padding:0});d=e.button(c.text,0,0,l,h,q,n).addClass(a.className).attr({"stroke-linecap":"round",title:b.options.lang[c._titleKey],zIndex:3});d.menuClassName=a.menuClassName|| +"highcharts-menu-"+b.btnCount++;c.symbol&&(g=e.symbol(c.symbol,c.symbolX-k/2,c.symbolY-k/2,k,k).addClass("highcharts-button-symbol").attr({zIndex:1}).add(d),g.attr({stroke:c.symbolStroke,fill:c.symbolFill,"stroke-width":c.symbolStrokeWidth||1}));d.add().align(r(c,{width:d.width,x:C(c.x,b.buttonOffset)}),!0,"spacingBox");b.buttonOffset+=(d.width+c.buttonSpacing)*("right"===c.align?-1:1);b.exportSVGElements.push(d,g)}},destroyExport:function(a){var b=a?a.target:this;a=b.exportSVGElements;var e=b.exportDivElements, +c=b.exportEvents,f;a&&(h(a,function(a,c){a&&(a.onclick=a.ontouchstart=null,f="cache-"+a.menuClassName,b[f]&&delete b[f],b.exportSVGElements[c]=a.destroy())}),a.length=0);e&&(h(e,function(a,c){clearTimeout(a.hideTimer);F(a,"mouseleave");b.exportDivElements[c]=a.onmouseout=a.onmouseover=a.ontouchstart=a.onclick=null;B(a)}),e.length=0);c&&(h(c,function(a){a()}),c.length=0)}});H.menu=function(a,b,e,c){return["M",a,b+2.5,"L",a+e,b+2.5,"M",a,b+c/2+.5,"L",a+e,b+c/2+.5,"M",a,b+c-1.5,"L",a+e,b+c-1.5]};A.prototype.renderExporting= +function(){var a,b=this.options.exporting,e=b.buttons,c=this.isDirtyExporting||!this.exportSVGElements;this.buttonOffset=0;this.isDirtyExporting&&this.destroyExport();if(c&&!1!==b.enabled){this.exportEvents=[];for(a in e)this.addButton(e[a]);this.isDirtyExporting=!1}w(this,"destroy",this.destroyExport)};A.prototype.callbacks.push(function(a){a.renderExporting();w(a,"redraw",a.renderExporting);h(["exporting","navigation"],function(b){a[b]={update:function(e,c){a.isDirtyExporting=!0;p(!0,a.options[b], +e);C(c,!0)&&a.redraw()}}})})})(k)}); diff --git a/templates/assets/highstock.js b/templates/assets/highstock.js index fe47e104b..0cbd4c6d5 100644 --- a/templates/assets/highstock.js +++ b/templates/assets/highstock.js @@ -1,305 +1,512 @@ /* - Highstock JS v1.2.4 (2012-10-08) + Highstock JS v5.0.10 (2017-03-31) - (c) 2009-2012 Torstein Hønsi + (c) 2009-2016 Torstein Honsi License: www.highcharts.com/license */ -(function(){function u(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function ja(){for(var a=0,b=arguments,c=b.length,d={};a-1?b.split(".")[1].length:0):a=isNaN(b=V(b))?2:b;var b=a,c=c===void 0?e.decimalPoint:c,d=d===void 0?e.thousandsSep:d,e=f<0?"-":"",a=String(F(f=V(+f||0).toFixed(b))),g=a.length>3?a.length%3:0;return e+(g?a.substr(0,g)+d:"")+ -a.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(b?c+V(f-a).toFixed(b).slice(2):"")}function Aa(a,b){return Array((b||2)+1-String(a).length).join(0)+a}function rb(a,b,c){var d=a[b];a[b]=function(){var a=Array.prototype.slice.call(arguments);a.unshift(d);return c.apply(this,a)}}function sb(a,b,c,d){var e,c=p(c,1);e=a/c;b||(b=[1,2,2.5,5,10],d&&d.allowDecimals===!1&&(c===1?b=[1,2,5,10]:c<=0.1&&(b=[1/c])));for(d=0;d= -C[Xa]&&(i.setMilliseconds(0),i.setSeconds(b>=C[Pa]?0:j*Y(i.getSeconds()/j)));if(b>=C[Pa])i[Hb](b>=C[sa]?0:j*Y(i[tb]()/j));if(b>=C[sa])i[Ib](b>=C[fa]?0:j*Y(i[ub]()/j));if(b>=C[fa])i[vb](b>=C[Ca]?1:j*Y(i[Da]()/j));b>=C[Ca]&&(i[Jb](b>=C[na]?0:j*Y(i[eb]()/j)),h=i[fb]());b>=C[na]&&(h-=h%j,i[Kb](h));if(b===C[Ba])i[vb](i[Da]()-i[wb]()+p(d,1));d=1;h=i[fb]();for(var k=i.getTime(),l=i[eb](),m=i[Da](),i=g?0:(864E5+i.getTimezoneOffset()*6E4)%864E5;kc&&(c=a[b]);return c} -function ta(a,b){for(var c in a)a[c]&&a[c]!==b&&a[c].destroy&&a[c].destroy(),delete a[c]}function Ra(a){hb||(hb=U(oa));a&&hb.appendChild(a);hb.innerHTML=""}function ib(a,b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(b)throw c;else S.console&&console.log(c)}function ma(a){return parseFloat(a.toPrecision(14))}function Fa(a,b){Ya=p(a,b.animation)}function Nb(){var a=P.global.useUTC,b=a?"getUTC":"get",c=a?"setUTC":"set";gb=a?Date.UTC:function(a,b,c,g,h,i){return(new Date(a,b,p(c, -1),p(g,0),p(h,0),p(i,0))).getTime()};tb=b+"Minutes";ub=b+"Hours";wb=b+"Day";Da=b+"Date";eb=b+"Month";fb=b+"FullYear";Hb=c+"Minutes";Ib=c+"Hours";vb=c+"Date";Jb=c+"Month";Kb=c+"FullYear"}function Ga(){}function Za(a,b,c){this.axis=a;this.pos=b;this.type=c||"";this.isNew=!0;c||this.addLabel()}function xb(a,b){this.axis=a;if(b)this.options=b,this.id=b.id;return this}function Ob(a,b,c,d,e,f){var g=a.chart.inverted;this.axis=a;this.isNegative=c;this.options=b;this.x=d;this.stack=e;this.percent=f==="percent"; -this.alignOptions={align:b.align||(g?c?"left":"right":"center"),verticalAlign:b.verticalAlign||(g?"middle":c?"bottom":"top"),y:p(b.y,g?4:c?14:-6),x:p(b.x,g?c?-6:6:0)};this.textAlign=b.textAlign||(g?c?"right":"left":"center")}function Sa(){this.init.apply(this,arguments)}function yb(a,b){var c=b.borderWidth,d=b.style,e=F(d.padding);this.chart=a;this.options=b;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.label=a.renderer.label("",0,0,b.shape,null,null,b.useHTML,null,"tooltip").attr({padding:e, -fill:b.backgroundColor,"stroke-width":c,r:b.borderRadius,zIndex:8}).css(d).css({padding:0}).hide().add();ca||this.label.shadow(b.shadow);this.shared=b.shared}function zb(a,b){var c=ca?"":b.chart.zoomType;this.zoomX=/x/.test(c);this.zoomY=/y/.test(c);this.options=b;this.chart=a;this.init(a,b.tooltip)}function Ab(a){this.init(a)}function $a(a,b){var c,d=a.series;a.series=null;c=w(P,a);c.series=a.series=d;var d=c.chart,e=d.margin,e=ga(e)?e:[e,e,e,e];this.optionsMarginTop=p(d.marginTop,e[0]);this.optionsMarginRight= -p(d.marginRight,e[1]);this.optionsMarginBottom=p(d.marginBottom,e[2]);this.optionsMarginLeft=p(d.marginLeft,e[3]);this.runChartClick=(e=d.events)&&!!e.click;this.callback=b;this.isResizing=0;this.options=c;this.axes=[];this.series=[];this.hasCartesianSeries=d.showAxes;this.init(e)}function Pb(a){var b=a.options,c=b.navigator,d=c.enabled,b=b.scrollbar,e=b.enabled,f=d?c.height:0,g=e?b.height:0,h=c.baseSeries;this.baseSeries=a.series[h]||typeof h==="string"&&a.get(h)||a.series[0];this.handles=[];this.scrollbarButtons= -[];this.elementsToDestroy=[];this.chart=a;this.height=f;this.scrollbarHeight=g;this.scrollbarEnabled=e;this.navigatorEnabled=d;this.navigatorOptions=c;this.scrollbarOptions=b;this.outlineHeight=f+g;this.init()}function Qb(a){this.chart=a;this.buttons=[];this.boxSpanElements={};this.init([{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}])}var r,E=document,S=window,M=Math, -t=M.round,Y=M.floor,Ha=M.ceil,x=M.max,K=M.min,V=M.abs,da=M.cos,ha=M.sin,Ia=M.PI,jb=Ia*2/360,Ta=navigator.userAgent,Rb=S.opera,Na=/msie/i.test(Ta)&&!Rb,ab=E.documentMode===8,Bb=/AppleWebKit/.test(Ta),kb=/Firefox/.test(Ta),ua="http://www.w3.org/2000/svg",ia=!!E.createElementNS&&!!E.createElementNS(ua,"svg").createSVGRect,$b=kb&&parseInt(Ta.split("Firefox/")[1],10)<4,ca=!ia&&!Na&&!!E.createElement("canvas").getContext,Ua,ba=E.documentElement.ontouchstart!==r,Sb={},Cb=0,hb,P,va,Ya,Db,C,lb=function(){}, -oa="div",$="none",Eb="rgba(192,192,192,"+(ia?1.0E-6:0.0020)+")",cb="millisecond",Xa="second",Pa="minute",sa="hour",fa="day",Ba="week",Ca="month",na="year",gb,tb,ub,wb,Da,eb,fb,Hb,Ib,vb,Jb,Kb,R={};S.Highcharts={};va=function(a,b,c){if(!v(b)||isNaN(b))return"Invalid date";var a=p(a,"%Y-%m-%d %H:%M:%S"),d=new Date(b),e,f=d[ub](),g=d[wb](),h=d[Da](),i=d[eb](),j=d[fb](),k=P.lang,l=k.weekdays,b={a:l[g].substr(0,3),A:l[g],d:Aa(h),e:h,b:k.shortMonths[i],B:k.months[i],m:Aa(i+1),y:j.toString().substr(2,2), -Y:j,H:Aa(f),I:Aa(f%12||12),l:f%12||12,M:Aa(d[tb]()),p:f<12?"AM":"PM",P:f<12?"am":"pm",S:Aa(d.getSeconds()),L:Aa(t(b%1E3),3)};for(e in b)a=a.replace("%"+e,b[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};Lb.prototype={wrapColor:function(a){if(this.color>=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};C=ja(cb,1,Xa,1E3,Pa,6E4,sa,36E5,fa,864E5,Ba,6048E5,Ca,2592E6,na,31556952E3);Db={init:function(a,b,c){var b=b||"",d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g,b=b.split(" "), -c=[].concat(c),h,i,j=function(a){for(g=a.length;g--;)a[g]==="M"&&a.splice(g+1,0,a[g+1],a[g+2],a[g+1],a[g+2])};e&&(j(b),j(c));a.isArea&&(h=b.splice(b.length-6,6),i=c.splice(c.length-6,6));if(d<=c.length/f)for(;d--;)c=[].concat(c).splice(0,f).concat(c);a.shift=0;if(b.length)for(a=c.length;b.length{point.key}
',pointFormat:'{series.name}: {point.y}
', -shadow:!0,shared:ca,snap:ba?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var Q=P.plotOptions,N=Q.line;Nb();var wa=function(a){var b=[],c;(function(a){(c=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(a))?b=[F(c[1]),F(c[2]), -F(c[3]),parseFloat(c[4],10)]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))&&(b=[F(c[1],16),F(c[2],16),F(c[3],16),1])})(a);return{get:function(c){return b&&!isNaN(b[0])?c==="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+")":c==="a"?b[3]:"rgba("+b.join(",")+")":a},brighten:function(a){if(za(a)&&a!==0){var c;for(c=0;c<3;c++)b[c]+=F(a*255),b[c]<0&&(b[c]=0),b[c]>255&&(b[c]=255)}return this},setOpacity:function(a){b[3]=a;return this}}};Ga.prototype={init:function(a,b){this.element=b==="span"?U(b): -E.createElementNS(ua,b);this.renderer=a;this.attrSetters={}},animate:function(a,b,c){b=p(b,Ya,!0);nb(this);if(b){b=w(b);if(c)b.complete=c;Fb(this,a,b)}else this.attr(a),c&&c()},attr:function(a,b){var c,d,e,f,g=this.element,h=g.nodeName.toLowerCase(),i=this.renderer,j,k=this.attrSetters,l=this.shadows,m,o,s=this;qa(a)&&v(b)&&(c=a,a={},a[c]=b);if(qa(a))c=a,h==="circle"?c={x:"cx",y:"cy"}[c]||c:c==="strokeWidth"&&(c="stroke-width"),s=G(g,c)||this[c]||0,c!=="d"&&c!=="visibility"&&(s=parseFloat(s));else for(c in a)if(j= -!1,d=a[c],e=k[c]&&k[c].call(this,d,c),e!==!1){e!==r&&(d=e);if(c==="d")d&&d.join&&(d=d.join(" ")),/(NaN| {2}|^$)/.test(d)&&(d="M 0 0");else if(c==="x"&&h==="text"){for(e=0;em&&/[ \-]/.test(b.innerText)&&(L(b,{width:m+"px",display:"block",whiteSpace:"normal"}),k=m);m=a.fontMetrics(b.style.fontSize).b; -q=s<0&&-k;bb=o<0&&-l;y=s*o<0;q+=o*m*(y?1-h:h);bb-=s*m*(j?y?h:1-h:1);i&&(q-=k*h*(s<0?-1:1),j&&(bb-=l*h*(o<0?-1:1)),L(b,{textAlign:g}));this.xCorr=q;this.yCorr=bb}L(b,{left:e+q+"px",top:f+bb+"px"});this.cTT=X}}else this.alignOnAdd=!0},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.inverted,d=this.rotation,e=[];c&&(a+=this.attr("width"),b+=this.attr("height"));(a||b)&&e.push("translate("+a+","+b+")");c?e.push("rotate(90) scale(-1,1)"):d&&e.push("rotate("+d+" "+(this.x|| -0)+" "+(this.y||0)+")");e.length&&G(this.element,"transform",e.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){a?(this.alignOptions=a,this.alignByTranslate=b,c||this.renderer.alignedObjects.push(this)):(a=this.alignOptions,b=this.alignByTranslate);var c=p(c,this.renderer),d=a.align,e=a.verticalAlign,f=(c.x||0)+(a.x||0),g=(c.y||0)+(a.y||0),h={};if(d==="right"||d==="center")f+=(c.width-(a.width||0))/{right:1,center:2}[d];h[b?"translateX": -"x"]=t(f);if(e==="bottom"||e==="middle")g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1);h[b?"translateY":"y"]=t(g);this[this.placed?"animate":"attr"](h);this.placed=!0;this.alignAttr=h;return this},getBBox:function(){var a=this.bBox,b=this.renderer,c,d=this.rotation,e=this.element,f=this.styles,g=d*jb;if(!a){if(e.namespaceURI===ua||b.forExport){try{a=e.getBBox?u({},e.getBBox()):{width:e.offsetWidth,height:e.offsetHeight}}catch(h){}if(!a||a.width<0)a={width:0,height:0}}else a=this.htmlGetBBox(); -if(b.isSVG&&(b=a.width,c=a.height,d))a.width=V(c*ha(g))+V(b*da(g)),a.height=V(c*da(g))+V(b*ha(g));if(Na&&f&&f.fontSize==="11px"&&c===22.700000762939453)a.height=14;this.bBox=a}return a},show:function(){return this.attr({visibility:"visible"})},hide:function(){return this.attr({visibility:"hidden"})},add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=d.childNodes,f=this.element,g=G(f,"zIndex"),h;if(a)this.parentGroup=a;this.parentInverted=a&&a.inverted;this.textStr!==void 0&&b.buildText(this); -if(g)c.handleZ=!0,g=F(g);if(c.handleZ)for(c=0;cg||!v(g)&&v(b))){d.insertBefore(f,a);h=!0;break}h||d.appendChild(f);this.added=!0;J(this,"add");return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||{},c=a.shadows,d,e;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=null;nb(a);if(a.clipPath)a.clipPath=a.clipPath.destroy();if(a.stops){for(e=0;e/g,'').replace(/<(i|em)>/g,'').replace(//g,"").split(//g),d=b.childNodes,e=/style="([^"]+)"/,f=/href="([^"]+)"/,g=G(b,"x"),h=a.styles,i=h&&h.width&&F(h.width),j=h&&h.lineHeight,k,h=d.length,l=[];h--;)b.removeChild(d[h]);i&&!a.added&&this.box.appendChild(b);c[c.length-1]===""&&c.pop();n(c,function(c,d){var h,y=0,q,c=c.replace(//g,"|||");h=c.split("|||");n(h,function(c){if(c!==""||h.length===1){var m={},n=E.createElementNS(ua,"tspan"),p;e.test(c)&& -(p=c.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),G(n,"style",p));f.test(c)&&(G(n,"onclick",'location.href="'+c.match(f)[1]+'"'),L(n,{cursor:"pointer"}));c=(c.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">");n.appendChild(E.createTextNode(c));y?m.dx=3:m.x=g;if(!y){if(d){!ia&&a.renderer.forExport&&L(n,{display:"block"});q=S.getComputedStyle&&F(S.getComputedStyle(k,null).getPropertyValue("line-height"));if(!q||isNaN(q)){var A;if(!(A=j))if(!(A=k.offsetHeight))l[d]=b.getBBox? -b.getBBox().height:a.renderer.fontMetrics(b.style.fontSize).h,A=t(l[d]-(l[d-1]||0))||18;q=A}G(n,"dy",q)}k=n}G(n,m);b.appendChild(n);y++;if(i)for(var c=c.replace(/([^\^])-/g,"$1- ").split(" "),B=[];c.length||B.length;)delete a.bBox,A=a.getBBox().width,m=A>i,!m||c.length===1?(c=B,B=[],c.length&&(n=E.createElementNS(ua,"tspan"),G(n,{dy:j||16,x:g}),p&&G(n,"style",p),b.appendChild(n),A>i&&(i=A))):(n.removeChild(n.firstChild),B.unshift(c.pop())),c.length&&n.appendChild(E.createTextNode(c.join(" ").replace(/- /g, -"-")))}})})},button:function(a,b,c,d,e,f,g){var h=this.label(a,b,c),i=0,j,k,l,m,o,a={x1:0,y1:0,x2:0,y2:1},e=w(ja("stroke-width",1,"stroke","#999","fill",ja("linearGradient",a,"stops",[[0,"#FFF"],[1,"#DDD"]]),"r",3,"padding",3,"style",ja("color","black")),e);l=e.style;delete e.style;f=w(e,ja("stroke","#68A","fill",ja("linearGradient",a,"stops",[[0,"#FFF"],[1,"#ACF"]])),f);m=f.style;delete f.style;g=w(e,ja("stroke","#68A","fill",ja("linearGradient",a,"stops",[[0,"#9BD"],[1,"#CDF"]])),g);o=g.style;delete g.style; -D(h.element,"mouseenter",function(){h.attr(f).css(m)});D(h.element,"mouseleave",function(){j=[e,f,g][i];k=[l,m,o][i];h.attr(j).css(k)});h.setState=function(a){(i=a)?a===2&&h.attr(g).css(o):h.attr(e).css(l)};return h.on("click",function(){d.call(h)}).attr(e).css(u({cursor:"default"},l))},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=t(a[1])-b%2/2);a[2]===a[5]&&(a[2]=a[5]=t(a[2])+b%2/2);return a},path:function(a){var b={fill:$};Wa(a)?b.d=a:ga(a)&&u(b,a);return this.createElement("path").attr(b)}, -circle:function(a,b,c){a=ga(a)?a:{x:a,y:b,r:c};return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){if(ga(a))b=a.y,c=a.r,d=a.innerR,e=a.start,f=a.end,a=a.x;return this.symbol("arc",a||0,b||0,c||0,c||0,{innerR:d||0,start:e||0,end:f||0})},rect:function(a,b,c,d,e,f){e=ga(a)?a.r:e;e=this.createElement("rect").attr({rx:e,ry:e,fill:$});return e.attr(ga(a)?a:e.crisp(f,a,b,x(c,0),x(d,0)))},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[p(c, -!0)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){var b=this.createElement("g");return v(a)?b.attr({"class":"highcharts-"+a}):b},image:function(a,b,c,d,e){var f={preserveAspectRatio:$};arguments.length>1&&u(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e,f){var g,h=this.symbols[a],h=h&&h(t(b), -t(c),d,e,f),i=/^url\((.*?)\)$/,j,k;h?(g=this.path(h),u(g,{symbolName:a,x:b,y:c,width:d,height:e}),f&&u(g,f)):i.test(a)&&(k=function(a,b){a.attr({width:b[0],height:b[1]});a.alignByTranslate||a.translate(-t(b[0]/2),-t(b[1]/2))},j=a.match(i)[1],a=Sb[j],g=this.image(j).attr({x:b,y:c}),a?k(g,a):(g.attr({width:0,height:0}),U("img",{onload:function(){k(g,Sb[j]=[this.width,this.height])},src:j})));return g},symbols:{circle:function(a,b,c,d){var e=0.166*c;return["M",a+c/2,b,"C",a+c+e,b,a+c+e,b+d,a+c/2,b+d, -"C",a-e,b+d,a-e,b,a+c/2,b,"Z"]},square:function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c,b+d,a,b+d,"Z"]},triangle:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d,a,b+d,"Z"]},"triangle-down":function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c/2,b+d,"Z"]},diamond:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d/2,a+c/2,b+d,a,b+d/2,"Z"]},arc:function(a,b,c,d,e){var f=e.start,c=e.r||c||d,g=e.end-1.0E-6,d=e.innerR,h=e.open,i=da(f),j=ha(f),k=da(g),g=ha(g),e=e.end-f');if(b)c=b===oa||b==="span"|| -b==="img"?c.join(""):a.prepVML(c),this.element=U(c);this.renderer=a;this.attrSetters={}},add:function(a){var b=this.renderer,c=this.element,d=b.box,d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);d.appendChild(c);this.added=!0;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();J(this,"add");return this},updateTransform:Ga.prototype.htmlUpdateTransform,attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,h=f.nodeName,i=this.renderer,j=this.symbolName,k,l=this.shadows,m,o= -this.attrSetters,s=this;qa(a)&&v(b)&&(c=a,a={},a[c]=b);if(qa(a))c=a,s=c==="strokeWidth"||c==="stroke-width"?this.strokeweight:this[c];else for(c in a)if(d=a[c],m=!1,e=o[c]&&o[c].call(this,d,c),e!==!1&&d!==null){e!==r&&(d=e);if(j&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(c))k||(this.symbolAttr(a),k=!0),m=!0;else if(c==="d"){d=d||[];this.d=d.join(" ");e=d.length;for(m=[];e--;)m[e]=za(d[e])?t(d[e]*10)-5:d[e]==="Z"?"x":d[e];d=m.join(" ")||"x";f.path=d;if(l)for(e=l.length;e--;)l[e].path= -l[e].cutOff?this.cutOffPath(d,l[e].cutOff):d;m=!0}else if(c==="visibility"){if(l)for(e=l.length;e--;)l[e].style[c]=d;h==="DIV"&&(d=d==="hidden"?"-999em":0,c="top");g[c]=d;m=!0}else if(c==="zIndex")d&&(g[c]=d),m=!0;else if(c==="width"||c==="height")d=x(0,d),this[c]=d,this.updateClipping?(this[c]=d,this.updateClipping()):g[c]=d,m=!0;else if(c==="x"||c==="y")this[c]=d,g[{x:"left",y:"top"}[c]]=d;else if(c==="class")f.className=d;else if(c==="stroke")d=i.color(d,f,c),c="strokecolor";else if(c==="stroke-width"|| -c==="strokeWidth")f.stroked=d?!0:!1,c="strokeweight",this[c]=d,za(d)&&(d+="px");else if(c==="dashstyle")(f.getElementsByTagName("stroke")[0]||U(i.prepVML([""]),null,null,f))[c]=d||"solid",this.dashstyle=d,m=!0;else if(c==="fill")h==="SPAN"?g.color=d:(f.filled=d!==$?!0:!1,d=i.color(d,f,c,this),c="fillcolor");else if(h==="shape"&&c==="rotation")this[c]=d,f.style.left=-t(ha(d*jb)+1)+"px",f.style.top=t(da(d*jb))+"px";else if(c==="translateX"||c==="translateY"||c==="rotation")this[c]=d,this.updateTransform(), -m=!0;else if(c==="text")this.bBox=null,f.innerHTML=d,m=!0;m||(ab?f[c]=d:G(f,c,d))}return s},clip:function(a){var b=this,c,d=b.element,e=d.parentNode;a?(c=a.members,c.push(b),b.destroyClip=function(){Ma(c,b)},e&&e.className==="highcharts-tracker"&&!ab&&L(d,{visibility:"hidden"}),a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),a={clip:ab?"inherit":"rect(auto)"});return b.css(a)},css:Ga.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&Ra(a)},destroy:function(){this.destroyClip&&this.destroyClip(); -return Ga.prototype.destroy.apply(this)},empty:function(){for(var a=this.element.childNodes,b=a.length,c;b--;)c=a[b],c.parentNode.removeChild(c)},on:function(a,b){this.element["on"+a]=function(){var a=S.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,b){var c,a=a.split(/[ ,]/);c=a.length;if(c===9||c===11)a[c-4]=a[c-2]=F(a[c-2])-10*b;return a.join(" ")},shadow:function(a,b,c){var d=[],e,f=this.element,g=this.renderer,h,i=f.style,j,k=f.path,l,m,o,s;k&&typeof k.value!=="string"&& -(k="x");m=k;if(a){o=p(a.width,3);s=(a.opacity||0.15)/o;for(e=1;e<=3;e++){l=o*2+1-2*e;c&&(m=this.cutOffPath(k.value,l+0.5));j=[''];h=U(g.prepVML(j),null,{left:F(i.left)+p(a.offsetX,1),top:F(i.top)+p(a.offsetY,1)});if(c)h.cutOff=l+1;j=[''];U(g.prepVML(j),null,null,h);b?b.element.appendChild(h):f.parentNode.insertBefore(h,f);d.push(h)}this.shadows= -d}return this}},ea=aa(Ga,ea),ea={Element:ea,isIE8:Ta.indexOf("MSIE 8.0")>-1,init:function(a,b,c){var d,e;this.alignedObjects=[];d=this.createElement(oa);e=d.element;e.style.position="relative";a.appendChild(d.element);this.box=e;this.boxWrapper=d;this.setSize(b,c,!1);if(!E.namespaces.hcv)E.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),E.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "},isHidden:function(){return!this.box.offsetWidth}, -clipRect:function(a,b,c,d){var e=this.createElement(),f=ga(a);return u(e,{members:[],left:f?a.x:a,top:f?a.y:b,width:f?a.width:c,height:f?a.height:d,getCSS:function(a){var b=a.inverted,c=this.top,d=this.left,e=d+this.width,f=c+this.height,c={clip:"rect("+t(b?d:c)+"px,"+t(b?f:e)+"px,"+t(b?e:f)+"px,"+t(b?c:d)+"px)"};!b&&ab&&a.element.nodeName!=="IMG"&&u(c,{width:e+"px",height:f+"px"});return c},updateClipping:function(){n(e.members,function(a){a.css(e.getCSS(a))})}})},color:function(a,b,c,d){var e=this, -f,g=/^rgba/,h,i,j=$;a&&a.linearGradient?i="gradient":a&&a.radialGradient&&(i="pattern");if(i){var k,l,m=a.linearGradient||a.radialGradient,o,s,y,q,p,X="",a=a.stops,I,z=[],A=function(){h=[''];U(e.prepVML(h),null,null,b)};o=a[0];I=a[a.length-1];o[0]>0&&a.unshift([0,o[1]]);I[0]<1&&a.push([1,I[1]]);n(a,function(a,b){g.test(a[1])?(f=wa(a[1]),k=f.get("rgb"),l=f.get("a")):(k=a[1],l=1);z.push(a[0]* -100+"% "+k);b?(y=l,q=k):(s=l,p=k)});if(c==="fill")if(i==="gradient")c=m.x1||m[0]||0,a=m.y1||m[1]||0,o=m.x2||m[2]||0,m=m.y2||m[3]||0,X='angle="'+(90-M.atan((m-a)/(o-c))*180/Ia)+'"',A();else{var j=m.r,B=j*2,Z=j*2,r=m.cx,v=m.cy,t=b.radialReference,x,j=function(){t&&(x=d.getBBox(),r+=(t[0]-x.x)/x.width-0.5,v+=(t[1]-x.y)/x.height-0.5,B*=t[2]/x.width,Z*=t[2]/x.height);X='src="'+P.global.VMLRadialGradientURL+'" size="'+B+","+Z+'" origin="0.5,0.5" position="'+r+","+v+'" color2="'+p+'" ';A()};d.added?j(): -D(d,"add",j);j=q}else j=k}else if(g.test(a)&&b.tagName!=="IMG")f=wa(a),h=["<",c,' opacity="',f.get("a"),'"/>'],U(this.prepVML(h),null,null,b),j=f.get("rgb");else{j=b.getElementsByTagName(c);if(j.length)j[0].opacity=1;j=a}return j},prepVML:function(a){var b=this.isIE8,a=a.join("");b?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')): -a=a.replace("<","1&&f.attr({x:b,y:c,width:d,height:e}); -return f},rect:function(a,b,c,d,e,f){if(ga(a))b=a.y,c=a.width,d=a.height,f=a.strokeWidth,a=a.x;var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,x(c,0),x(d,0)))},invertChild:function(a,b){var c=b.style;L(a,{flip:"x",left:F(c.width)-1,top:F(c.height)-1,rotation:-90})},symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,h=e.r||c||d,c=da(f),d=ha(f),i=da(g),j=ha(g),k=e.innerR,l=0.08/h,m=k&&0.1/k||0;if(g-f===0)return["x"];else 2*Ia-g+fj&&(c=!1)):h+k>m&&(h=m-k,d&&h+l0&&b.height>0){f=w({align:c&&k&&"center",x:c?!k&&4:10,verticalAlign:!c&&k&&"middle",y:c?k?16:10:k?6:-4,rotation:c&&!k&&90},f);if(!g)a.label=g=I.text(f.text,0,0).attr({align:f.textAlign||f.align,rotation:f.rotation, -zIndex:n}).css(f.style).add();b=[s[1],s[4],p(s[6],s[1])];s=[s[2],s[5],p(s[7],s[2])];c=Qa(b);k=Qa(s);g.align(f,!1,{x:c,y:k,width:Ea(b)-c,height:Ea(s)-k});g.show()}else g&&g.hide();return a},destroy:function(){Ma(this.axis.plotLinesAndBands,this);ta(this,this.axis)}};Ob.prototype={destroy:function(){ta(this,this.axis)},setTotal:function(a){this.cum=this.total=a},render:function(a){var b=this.options.formatter.call(this);this.label?this.label.attr({text:b,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(b, -0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,b){var c=this.axis,d=c.chart,e=d.inverted,f=this.isNegative,g=c.translate(this.percent?100:this.total,0,0,0,1),c=c.translate(0),c=V(g-c),h=d.xAxis[0].translate(this.x)+a,i=d.plotHeight,f={x:e?f?g:g-c:h,y:e?i-h-b:f?i-g-c:i-g,width:e?c:b,height:e?b:c};if(e=this.label)e.align(this.alignOptions,null,f),f=e.alignAttr,e.attr({visibility:this.options.crop===!1||d.isInsidePlot(f.x, -f.y)?ia?"inherit":"visible":"hidden"})}};Sa.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:H,lineColor:"#C0D0E0",lineWidth:1,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:5, -tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#6D869F",fontWeight:"bold"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Y-values"},stackLabels:{enabled:!1,formatter:function(){return this.total},style:H.style}},defaultLeftAxisOptions:{labels:{align:"right", -x:-8,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{align:"left",x:8,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{align:"center",x:0,y:14},title:{rotation:0}},defaultTopAxisOptions:{labels:{align:"center",x:0,y:-5},title:{rotation:0}},init:function(a,b){var c=b.isX;this.horiz=a.inverted?!c:c;this.xOrY=(this.isXAxis=c)?"x":"y";this.opposite=b.opposite;this.side=this.horiz?this.opposite?0:2:this.opposite?1:3;this.setOptions(b);var d=this.options,e=d.type,f=e==="datetime"; -this.labelFormatter=d.labels.formatter||this.defaultLabelFormatter;this.staggerLines=this.horiz&&d.labels.staggerLines;this.userOptions=b;this.minPixelPadding=0;this.chart=a;this.reversed=d.reversed;this.categories=d.categories;this.isLog=e==="logarithmic";this.isLinked=v(d.linkedTo);this.isDatetimeAxis=f;this.tickmarkOffset=d.categories&&d.tickmarkPlacement==="between"?0.5:0;this.ticks={};this.minorTicks={};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange= -d.minRange||d.maxZoom;this.range=d.range;this.offset=d.offset||0;this.stacks={};this.min=this.max=null;var g,d=this.options.events;a.axes.push(this);a[c?"xAxis":"yAxis"].push(this);this.series=[];if(a.inverted&&c&&this.reversed===r)this.reversed=!0;this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;this.addPlotLine=this.addPlotBand=this.addPlotBandOrLine;for(g in d)D(this,g,d[g]);if(this.isLog)this.val2lin=ra,this.lin2val=ka},setOptions:function(a){this.options=w(this.defaultOptions, -this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],w(P[this.isXAxis?"xAxis":"yAxis"],a))},defaultLabelFormatter:function(){var a=this.axis,b=this.value,c=this.dateTimeLabelFormat,d=P.lang.numericSymbols,e=d&&d.length,f,g=a.isLog?b:a.tickInterval;if(a.categories)f=b;else if(c)f=va(c,b);else if(e&&g>=1E3)for(;e--&&f===r;)a=Math.pow(1E3,e+1),g>=a&&d[e]!==null&&(f=Oa(b/a,-1)+d[e]);f=== -r&&(f=b>=1E3?Oa(b,0):Oa(b,-1));return f},getSeriesExtremes:function(){var a=this,b=a.chart,c=a.stacks,d=[],e=[],f;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=null;n(a.series,function(g){if(g.visible||!b.options.chart.ignoreHiddenSeries){var h=g.options,i,j,k,l,m,o,s,y,q,n=h.threshold,t,I=[],z=0;a.hasVisibleSeries=!0;if(a.isLog&&n<=0)n=h.threshold=null;if(a.isXAxis){if(h=g.xData,h.length)a.dataMin=K(p(a.dataMin,h[0]),Qa(h)),a.dataMax=x(p(a.dataMax,h[0]),Ea(h))}else{var A,B,Z,Va=g.cropped,w=g.xAxis.getExtremes(), -u=!!g.modifyValue;i=h.stacking;a.usePercentage=i==="percent";if(i)m=h.stack,l=g.type+p(m,""),o="-"+l,g.stackKey=l,j=d[l]||[],d[l]=j,k=e[o]||[],e[o]=k;if(a.usePercentage)a.dataMin=0,a.dataMax=99;h=g.processedXData;s=g.processedYData;t=s.length;for(f=0;f=w.min&&(h[f-1]|| -y)<=w.max))if(y=q.length)for(;y--;)q[y]!==null&&(I[z++]=q[y]);else I[z++]=q;if(!a.usePercentage&&I.length)a.dataMin=K(p(a.dataMin,I[0]),Qa(I)),a.dataMax=x(p(a.dataMax,I[0]),Ea(I));if(v(n))if(a.dataMin>=n)a.dataMin=n,a.ignoreMinPadding=!0;else if(a.dataMaxe+this.width)l=!0}else if(c=e,h=k-this.right,gf+this.height)l=!0;return l?null:d.renderer.crispLine(["M",c,g,"L",h,i],b||0)},getPlotBandPath:function(a,b){var c=this.getPlotLinePath(b),d=this.getPlotLinePath(a);d&&c?d.push(c[4],c[5],c[1],c[2]):d=null;return d},getLinearTickPositions:function(a,b,c){for(var d,b=ma(Y(b/a)*a),c=ma(Ha(c/a)*a),e=[];b<=c;){e.push(b);b=ma(b+a);if(b===d)break;d=b}return e},getLogTickPositions:function(a,b,c,d){var e=this.options,f=this.len,g=[];if(!d)this._minorAutoInterval=null;if(a>=0.5)a=t(a),g=this.getLinearTickPositions(a, -b,c);else if(a>=0.08)for(var f=Y(b),h,i,j,k,l,e=a>0.3?[1,2,4]:a>0.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];fb&&g.push(k),k>c&&(l=!0),k=j}else if(b=ka(b),c=ka(c),a=e[d?"minorTickInterval":"tickInterval"],a=p(a==="auto"?null:a,this._minorAutoInterval,(c-b)*(e.tickPixelInterval/(d?5:1))/((d?f/this.tickPositions.length:f)||1)),a=sb(a,null,M.pow(10,Y(M.log(a)/M.LN10))),g=Ja(this.getLinearTickPositions(a,b,c),ra),!d)this._minorAutoInterval=a/5;if(!d)this.tickInterval= -a;return g},getMinorTickPositions:function(){var a=this.tickPositions,b=this.minorTickInterval,c=[],d,e;if(this.isLog){e=a.length;for(d=1;d=this.minRange,f,g,h,i,j;if(this.isXAxis&&this.minRange===r&&!this.isLog)v(a.min)||v(a.max)?this.minRange=null:(n(this.series, -function(a){i=a.xData;for(g=j=a.xIncrement?1:i.length-1;g>0;g--)if(h=i[g]-i[g-1],f===r||h0||!b.ignoreMaxPadding))b.max+=c*j}b.tickInterval=b.min===b.max||b.min===void 0||b.max===void 0?1:h&&!l&&o===b.linkedParent.options.tickPixelInterval?b.linkedParent.tickInterval:p(l,s?1:(b.max- -b.min)*o/(b.len||1));g&&!a&&n(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(a);b.beforeSetTickPositions&&b.beforeSetTickPositions();if(b.postProcessTickInterval)b.tickInterval=b.postProcessTickInterval(b.tickInterval);if(!l&&b.tickIntervale&&i.shift(),d.endOnTick?b.max=f:b.max+hb[d]&&this.options.alignTicks!==!1)b[d]=c.length;a.maxTicks=b},adjustTickAmount:function(){var a=this.xOrY,b=this.tickPositions,c=this.chart.maxTicks;if(c&&c[a]&&!this.isDatetimeAxis&&!this.categories&&!this.isLinked&&this.options.alignTicks!==!1){var d=this.tickAmount,e=b.length;this.tickAmount=a=c[a];if(ea||a===null?a=c:b=a.min&&b<=a.max)j[b]||(j[b]=new Za(a,b)),p&&j[b].isNew&&j[b].render(c,!0),j[b].isActive=!0,j[b].render(c)}),o&&n(g,function(b,c){if(c%2===0&&b1||V(b-f.y)>1))clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(a,b,c,d)},32)},hide:function(){if(!this.isHidden){var a=this.chart.hoverPoints; -this.label.hide();a&&n(a,function(a){a.setState()});this.chart.hoverPoints=null;this.isHidden=!0}},hideCrosshairs:function(){n(this.crosshairs,function(a){a&&a.hide()})},getAnchor:function(a,b){var c,d=this.chart,e=d.inverted,f=0,g=0,h,a=la(a);c=a[0].tooltipPos;c||(n(a,function(a){h=a.series.yAxis;f+=a.plotX;g+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&h?h.top-d.plotTop:0)}),f/=a.length,g/=a.length,c=[e?d.plotWidth-g:f,this.shared&&!e&&a.length>1&&b?b.chartY-d.plotTop:e?d.plotHeight-f:g]); -return Ja(c,t)},getPosition:function(a,b,c){var d=this.chart,e=d.plotLeft,f=d.plotTop,g=d.plotWidth,h=d.plotHeight,i=p(this.options.distance,12),j=c.plotX,c=c.plotY,d=j+e+(d.inverted?i:-a-i),k=c-b+f+15,l;d<7&&(d=e+x(j,0)+i);d+a>e+g&&(d-=d+a-(e+g),k=c-b+f-i,l=!0);k=k&&c<=k+b&&(k=c+f+i));k+b>f+h&&(k=x(f,f+h-b-i));return{x:d,y:k}},refresh:function(a,b){function c(){var a=this.points||la(this),b=a[0].series,c;c=[b.tooltipHeaderFormatter(a[0].key)];n(a,function(a){b=a.series;c.push(b.tooltipFormatter&& -b.tooltipFormatter(a)||a.point.tooltipFormatter(b.tooltipOptions.pointFormat))});c.push(f.footerFormat||"");return c.join("")}var d=this.chart,e=this.label,f=this.options,g,h,i,j={},k,l=[];k=f.formatter||c;var j=d.hoverPoints,m,o=f.crosshairs;i=this.shared;h=this.getAnchor(a,b);g=h[0];h=h[1];i&&(!a.series||!a.series.noSharedTooltip)?(d.hoverPoints=a,j&&n(j,function(a){a.setState()}),n(a,function(a){a.setState("hover");l.push(a.getLabelConfig())}),j={x:a[0].category,y:a[0].y},j.points=l,a=a[0]):j= -a.getLabelConfig();k=k.call(j);j=a.series;i=i||!j.isCartesian||j.tooltipOutsidePlot||d.isInsidePlot(g,h);k===!1||!i?this.hide():(this.isHidden&&e.show(),e.attr({text:k}),m=f.borderColor||a.color||j.color||"#606060",e.attr({stroke:m}),e=(f.positioner||this.getPosition).call(this,e.width,e.height,{plotX:g,plotY:h}),this.move(t(e.x),t(e.y),g+d.plotLeft,h+d.plotTop),this.isHidden=!1);if(o){o=la(o);for(e=o.length;e--;)if(i=a.series[e?"yAxis":"xAxis"],o[e]&&i)if(i=i.getPlotLinePath(e?p(a.stackY,a.y):a.x, -1),this.crosshairs[e])this.crosshairs[e].attr({d:i,visibility:"visible"});else{j={"stroke-width":o[e].width||1,stroke:o[e].color||"#C0C0C0",zIndex:o[e].zIndex||2};if(o[e].dashStyle)j.dashstyle=o[e].dashStyle;this.crosshairs[e]=d.renderer.path(i).attr(j).add()}}J(d,"tooltipRefresh",{text:k,x:g+d.plotLeft,y:h+d.plotTop,borderColor:m})}};zb.prototype={normalizeMouseEvent:function(a){var b,c,d,a=a||S.event;if(!a.target)a.target=a.srcElement;a=Ub(a);d=a.touches?a.touches.item(0):a;this.chartPosition=b= -cc(this.chart.container);d.pageX===r?(c=a.x,b=a.y):(c=d.pageX-b.left,b=d.pageY-b.top);return u(a,{chartX:t(c),chartY:t(b)})},getMouseCoordinates:function(a){var b={xAxis:[],yAxis:[]},c=this.chart;n(c.axes,function(d){var e=d.isXAxis;b[e?"xAxis":"yAxis"].push({axis:d,value:d.translate(((c.inverted?!e:e)?a.chartX-c.plotLeft:d.top+d.len-a.chartY)-d.minPixelPadding,!0)})});return b},getIndex:function(a){var b=this.chart;return b.inverted?b.plotHeight+b.plotTop-a.chartY:a.chartX-b.plotLeft},onmousemove:function(a){var b= -this.chart,c=b.series,d=b.tooltip,e,f=b.hoverPoint,g=b.hoverSeries,h,i,j=b.chartWidth,k=this.getIndex(a);if(d&&this.options.tooltip.shared&&(!g||!g.noSharedTooltip)){e=[];h=c.length;for(i=0;ij&&e.splice(h,1);if(e.length&&e[0].plotX!==this.hoverX)d.refresh(e, -a),this.hoverX=e[0].plotX}if(g&&g.tracker&&(b=g.tooltipPoints[k])&&b!==f)b.onMouseOver()},resetTracker:function(a){var b=this.chart,c=b.hoverSeries,d=b.hoverPoint,e=b.tooltip,b=e&&e.shared?b.hoverPoints:d;(a=a&&e&&b)&&la(b)[0].plotX===r&&(a=!1);if(a)e.refresh(b);else{if(d)d.onMouseOut();if(c)c.onMouseOut();e&&(e.hide(),e.hideCrosshairs());this.hoverX=null}},setDOMEvents:function(){function a(){if(b.selectionMarker){var f={xAxis:[],yAxis:[]},g=b.selectionMarker.getBBox(),h=g.x-c.plotLeft,l=g.y-c.plotTop, -m;e&&(n(c.axes,function(a){if(a.options.zoomEnabled!==!1){var b=a.isXAxis,d=c.inverted?!b:b,e=a.translate(d?h:c.plotHeight-l-g.height,!0,0,0,1),d=a.translate((d?h+g.width:c.plotHeight-l)-2*a.minPixelPadding,!0,0,0,1);!isNaN(e)&&!isNaN(d)&&(f[b?"xAxis":"yAxis"].push({axis:a,min:K(e,d),max:x(e,d)}),m=!0)}}),m&&J(c,"selection",f,function(a){c.zoom(a)}));b.selectionMarker=b.selectionMarker.destroy()}if(c)L(d,{cursor:"auto"}),c.cancelClick=e,c.mouseIsDown=e=!1;O(E,ba?"touchend":"mouseup",a)}var b=this, -c=b.chart,d=c.container,e,f=b.zoomX&&!c.inverted||b.zoomY&&c.inverted,g=b.zoomY&&!c.inverted||b.zoomX&&c.inverted;b.hideTooltipOnMouseMove=function(a){a=Ub(a);b.chartPosition&&c.hoverSeries&&c.hoverSeries.isCartesian&&!c.isInsidePlot(a.pageX-b.chartPosition.left-c.plotLeft,a.pageY-b.chartPosition.top-c.plotTop)&&b.resetTracker()};b.hideTooltipOnMouseLeave=function(){b.resetTracker();b.chartPosition=null};d.onmousedown=function(d){d=b.normalizeMouseEvent(d);!ba&&d.preventDefault&&d.preventDefault(); -c.mouseIsDown=!0;c.cancelClick=!1;c.mouseDownX=b.mouseDownX=d.chartX;b.mouseDownY=d.chartY;D(E,ba?"touchend":"mouseup",a)};var h=function(a){if(!a||!(a.touches&&a.touches.length>1)){a=b.normalizeMouseEvent(a);if(!ba)a.returnValue=!1;var d=a.chartX,h=a.chartY,l=!c.isInsidePlot(d-c.plotLeft,h-c.plotTop);ba&&a.type==="touchstart"&&(G(a.target,"isTracker")?c.runTrackerClick||a.preventDefault():!c.runChartClick&&!l&&a.preventDefault());if(l)dc.plotLeft+c.plotWidth&&(d=c.plotLeft+ -c.plotWidth),hc.plotTop+c.plotHeight&&(h=c.plotTop+c.plotHeight);if(c.mouseIsDown&&a.type!=="touchstart"&&(e=Math.sqrt(Math.pow(b.mouseDownX-d,2)+Math.pow(b.mouseDownY-h,2)),e>10)){var m=c.isInsidePlot(b.mouseDownX-c.plotLeft,b.mouseDownY-c.plotTop);if(c.hasCartesianSeries&&(b.zoomX||b.zoomY)&&m&&!b.selectionMarker)b.selectionMarker=c.renderer.rect(c.plotLeft,c.plotTop,f?1:c.plotWidth,g?1:c.plotHeight,0).attr({fill:b.options.chart.selectionMarkerFill||"rgba(69,114,167,0.25)", -zIndex:7}).add();if(b.selectionMarker&&f){var o=d-b.mouseDownX;b.selectionMarker.attr({width:V(o),x:(o>0?0:o)+b.mouseDownX})}b.selectionMarker&&g&&(h-=b.mouseDownY,b.selectionMarker.attr({height:V(h),y:(h>0?0:h)+b.mouseDownY}));m&&!b.selectionMarker&&b.options.chart.panning&&c.pan(d)}if(!l)b.onmousemove(a);return l||!c.hasCartesianSeries}};d.onmousemove=h;D(d,"mouseleave",b.hideTooltipOnMouseLeave);D(E,"mousemove",b.hideTooltipOnMouseMove);d.ontouchstart=function(a){if(b.zoomX||b.zoomY)d.onmousedown(a); -h(a)};d.ontouchmove=h;d.ontouchend=function(){e&&b.resetTracker()};d.onclick=function(a){var d=c.hoverPoint,e,f,a=b.normalizeMouseEvent(a);a.cancelBubble=!0;if(!c.cancelClick)d&&(G(a.target,"isTracker")||G(a.target.parentNode,"isTracker"))?(e=d.plotX,f=d.plotY,u(d,{pageX:b.chartPosition.left+c.plotLeft+(c.inverted?c.plotWidth-f:e),pageY:b.chartPosition.top+c.plotTop+(c.inverted?c.plotHeight-e:f)}),J(d.series,"click",u(a,{point:d})),d.firePointEvent("click",a)):(u(a,b.getMouseCoordinates(a)),c.isInsidePlot(a.chartX- -c.plotLeft,a.chartY-c.plotTop)&&J(c,"click",a))}},destroy:function(){var a=this.chart,b=a.container;if(a.trackerGroup)a.trackerGroup=a.trackerGroup.destroy();O(b,"mouseleave",this.hideTooltipOnMouseLeave);O(E,"mousemove",this.hideTooltipOnMouseMove);b.onclick=b.onmousedown=b.onmousemove=b.ontouchstart=b.ontouchend=b.ontouchmove=null;clearInterval(this.tooltipTimeout)},init:function(a,b){if(!a.trackerGroup)a.trackerGroup=a.renderer.g("tracker").attr({zIndex:9}).add();if(b.enabled)a.tooltip=new yb(a, -b);this.setDOMEvents()}};Ab.prototype={init:function(a){var b=this,c=b.options=a.options.legend;if(c.enabled){var d=c.itemStyle,e=p(c.padding,8),f=c.itemMarginTop||0;b.baseline=F(d.fontSize)+3+f;b.itemStyle=d;b.itemHiddenStyle=w(d,c.itemHiddenStyle);b.itemMarginTop=f;b.padding=e;b.initialItemX=e;b.initialItemY=e-5;b.maxItemWidth=0;b.chart=a;b.itemHeight=0;b.lastLineHeight=0;b.render();D(b.chart,"endResize",function(){b.positionCheckboxes()})}},colorizeItem:function(a,b){var c=this.options,d=a.legendItem, -e=a.legendLine,f=a.legendSymbol,g=this.itemHiddenStyle.color,c=b?c.itemStyle.color:g,h=b?a.color:g,g=a.options&&a.options.marker,i={stroke:h,fill:h},j;d&&d.css({fill:c});e&&e.attr({stroke:h});if(f){if(g)for(j in g=a.convertAttribs(g),g)d=g[j],d!==r&&(i[j]=d);f.attr(i)}},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl,d=a._legendItemPos,e=d[0],d=d[1],f=a.checkbox;a.legendGroup&&a.legendGroup.translate(b?e:this.legendWidth-e-2*c-4,d);if(f)f.x=e,f.y=d},destroyItem:function(a){var b= -a.checkbox;n(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&a[b].destroy()});b&&Ra(a.checkbox)},destroy:function(){var a=this.group,b=this.box;if(b)this.box=b.destroy();if(a)this.group=a.destroy()},positionCheckboxes:function(){var a=this;n(a.allItems,function(b){var c=b.checkbox,d=a.group.alignAttr;c&&L(c,{left:d.translateX+b.legendItemWidth+c.x-20+"px",top:d.translateY+c.y+3+"px"})})},renderItem:function(a){var y;var b=this,c=b.chart,d=c.renderer,e=b.options,f=e.layout=== -"horizontal",g=e.symbolWidth,h=e.symbolPadding,i=b.itemStyle,j=b.itemHiddenStyle,k=b.padding,l=!e.rtl,m=e.width,o=e.itemMarginBottom||0,s=b.itemMarginTop,n=b.initialItemX,q=a.legendItem,p=a.series||a,r=p.options,t=r.showCheckbox;if(!q&&(a.legendGroup=d.g("legend-item").attr({zIndex:1}).add(b.scrollGroup),p.drawLegendSymbol(b,a),a.legendItem=q=d.text(e.labelFormatter.call(a),l?g+h:-h,b.baseline,e.useHTML).css(w(a.visible?i:j)).attr({align:l?"left":"right",zIndex:2}).add(a.legendGroup),a.legendGroup.on("mouseover", -function(){a.setState("hover");q.css(b.options.itemHoverStyle)}).on("mouseout",function(){q.css(a.visible?i:j);a.setState()}).on("click",function(b){var c=function(){a.setVisible()},b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):J(a,"legendItemClick",b,c)}),b.colorizeItem(a,a.visible),r&&t))a.checkbox=U("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},e.itemCheckboxStyle,c.container),D(a.checkbox,"click",function(b){J(a,"checkboxClick",{checked:b.target.checked}, -function(){a.select()})});d=q.getBBox();y=a.legendItemWidth=e.itemWidth||g+h+d.width+k+(t?20:0),e=y;b.itemHeight=g=d.height;if(f&&b.itemX-n+e>(m||c.chartWidth-2*k-n))b.itemX=n,b.itemY+=s+b.lastLineHeight+o,b.lastLineHeight=0;b.maxItemWidth=x(b.maxItemWidth,e);b.lastItemY=s+b.itemY+o;b.lastLineHeight=x(g,b.lastLineHeight);a._legendItemPos=[b.itemX,b.itemY];f?b.itemX+=e:(b.itemY+=s+g+o,b.lastLineHeight=g);b.offsetWidth=m||x(f?b.itemX-n:e,b.offsetWidth)},render:function(){var a=this,b=a.chart,c=b.renderer, -d=a.group,e,f,g,h,i=a.box,j=a.options,k=a.padding,l=j.borderWidth,m=j.backgroundColor;a.itemX=a.initialItemX;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;if(!d)a.group=d=c.g("legend").attr({zIndex:7}).add(),a.contentGroup=c.g().attr({zIndex:1}).add(d),a.scrollGroup=c.g().add(a.contentGroup),a.clipRect=c.clipRect(0,0,9999,b.chartHeight),a.contentGroup.clip(a.clipRect);e=[];n(b.series,function(a){var b=a.options;b.showInLegend&&(e=e.concat(a.legendItems||(b.legendType==="point"?a.data:a)))}); -Mb(e,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});j.reversed&&e.reverse();a.allItems=e;a.display=f=!!e.length;n(e,function(b){a.renderItem(b)});g=j.width||a.offsetWidth;h=a.lastItemY+a.lastLineHeight;h=a.handleOverflow(h);if(l||m){g+=k;h+=k;if(i){if(g>0&&h>0)i[i.isNew?"attr":"animate"](i.crisp(null,null,null,g,h)),i.isNew=!1}else a.box=i=c.rect(0,0,g,h,j.borderRadius,l||0).attr({stroke:j.borderColor,"stroke-width":l||0,fill:m||$}).add(d).shadow(j.shadow), -i.isNew=!0;i[f?"show":"hide"]()}a.legendWidth=g;a.legendHeight=h;n(e,function(b){a.positionItem(b)});f&&d.align(u({width:g,height:h},j),!0,b.spacingBox);b.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b=this,c=this.chart,d=c.renderer,e=this.options,f=e.y,f=c.spacingBox.height+(e.verticalAlign==="top"?-f:f)-this.padding,g=e.maxHeight,h=this.clipRect,i=e.navigation,j=p(i.animation,!0),k=i.arrowSize||12,l=this.nav;e.layout==="horizontal"&&(f/=2);g&&(f=K(f,g));if(a>f){this.clipHeight= -c=f-20;this.pageCount=Ha(a/c);this.currentPage=p(this.currentPage,1);this.fullHeight=a;h.attr({height:c});if(!l)this.nav=l=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,k,k).on("click",function(){b.scroll(-1,j)}).add(l),this.pager=d.text("",15,10).css(i.style).add(l),this.down=d.symbol("triangle-down",0,0,k,k).on("click",function(){b.scroll(1,j)}).add(l);b.scroll(0);a=f}else l&&(h.attr({height:c.chartHeight}),l.hide(),this.scrollGroup.attr({translateY:1}));return a},scroll:function(a, -b){var c=this.pageCount,d=this.currentPage+a,e=this.clipHeight,f=this.options.navigation,g=f.activeColor,f=f.inactiveColor,h=this.pager,i=this.padding;d>c&&(d=c);if(d>0)b!==r&&Fa(b,this.chart),this.nav.attr({translateX:i,translateY:e+7,visibility:"visible"}),this.up.attr({fill:d===1?f:g}).css({cursor:d===1?"default":"pointer"}),h.attr({text:d+"/"+this.pageCount}),this.down.attr({x:18+this.pager.getBBox().width,fill:d===c?f:g}).css({cursor:d===c?"default":"pointer"}),this.scrollGroup.animate({translateY:-K(e* -(d-1),this.fullHeight-e+i)+1}),h.attr({text:d+"/"+c}),this.currentPage=d}};$a.prototype={initSeries:function(a){var b=this.options.chart,b=new R[a.type||b.type||b.defaultSeriesType];b.init(this,a);return b},addSeries:function(a,b,c){var d,e=this;a&&(Fa(c,e),b=p(b,!0),J(e,"addSeries",{options:a},function(){d=e.initSeries(a);e.isDirtyLegend=!0;b&&e.redraw()}));return d},isInsidePlot:function(a,b,c){var d=c?b:a,a=c?a:b;return d>=0&&d<=this.plotWidth&&a>=0&&a<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!== -!1&&n(this.axes,function(a){a.adjustTickAmount()});this.maxTicks=null},redraw:function(a){var b=this.axes,c=this.series,d=this.tracker,e=this.legend,f=this.isDirtyLegend,g,h=this.isDirtyBox,i=c.length,j=i,k=this.renderer,l=k.isHidden(),m=[];Fa(a,this);for(l&&this.cloneRenderTo();j--;)if(a=c[j],a.isDirty&&a.options.stacking){g=!0;break}if(g)for(j=i;j--;)if(a=c[j],a.options.stacking)a.isDirty=!0;n(c,function(a){a.isDirty&&a.options.legendType==="point"&&(f=!0)});if(f&&e.options.enabled)e.render(),this.isDirtyLegend= -!1;if(this.hasCartesianSeries){if(!this.isResizing)this.maxTicks=null,n(b,function(a){a.setScale()});this.adjustTickAmounts();this.getMargins();n(b,function(a){if(a.isDirtyExtremes)a.isDirtyExtremes=!1,m.push(function(){J(a,"afterSetExtremes",a.getExtremes())});if(a.isDirty||h||g)a.redraw(),h=!0})}h&&this.drawChartBox();n(c,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()});d&&d.resetTracker&&d.resetTracker(!0);k.draw();J(this,"redraw");l&&this.cloneRenderTo(!0);n(m,function(a){a.call()})}, -showLoading:function(a){var b=this.options,c=this.loadingDiv,d=b.loading;if(!c)this.loadingDiv=c=U(oa,{className:"highcharts-loading"},u(d.style,{left:this.plotLeft+"px",top:this.plotTop+"px",width:this.plotWidth+"px",height:this.plotHeight+"px",zIndex:10,display:$}),this.container),this.loadingSpan=U("span",null,d.labelStyle,c);this.loadingSpan.innerHTML=a||b.lang.loading;if(!this.loadingShown)L(c,{opacity:0,display:""}),Fb(c,{opacity:d.style.opacity},{duration:d.showDuration||0}),this.loadingShown= -!0},hideLoading:function(){var a=this.options,b=this.loadingDiv;b&&Fb(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){L(b,{display:$})}});this.loadingShown=!1},get:function(a){var b=this.axes,c=this.series,d,e;for(d=0;dK(e.dataMin,e.min)&&c19?this.containerHeight:400)},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;a?b&&(this.renderTo.appendChild(c),Ra(b),delete this.renderToClone):(c&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),L(b,{position:"absolute",top:"-9999px",display:"block"}),E.body.appendChild(b),c&&b.appendChild(c))}, -getContainer:function(){var a,b=this.options.chart,c,d,e;this.renderTo=a=b.renderTo;e="highcharts-"+Cb++;if(qa(a))this.renderTo=a=E.getElementById(a);a||ib(13,!0);a.innerHTML="";a.offsetWidth||this.cloneRenderTo();this.getChartSize();c=this.chartWidth;d=this.chartHeight;this.container=a=U(oa,{className:"highcharts-container"+(b.className?" "+b.className:""),id:e},u({position:"relative",overflow:"hidden",width:c+"px",height:d+"px",textAlign:"left",lineHeight:"normal",zIndex:0},b.style),this.renderToClone|| -a);this.renderer=b.forExport?new pa(a,c,d,!0):new Ua(a,c,d);ca&&this.renderer.create(this,a,c,d)},getMargins:function(){var a=this.options.chart,b=a.spacingTop,c=a.spacingRight,d=a.spacingBottom,a=a.spacingLeft,e,f=this.legend,g=this.optionsMarginTop,h=this.optionsMarginLeft,i=this.optionsMarginRight,j=this.optionsMarginBottom,k=this.chartTitleOptions,l=this.chartSubtitleOptions,m=this.options.legend,o=p(m.margin,10),s=m.x,y=m.y,q=m.align,r=m.verticalAlign;this.resetMargins();e=this.axisOffset;if((this.title|| -this.subtitle)&&!v(this.optionsMarginTop))if(l=x(this.title&&!k.floating&&!k.verticalAlign&&k.y||0,this.subtitle&&!l.floating&&!l.verticalAlign&&l.y||0))this.plotTop=x(this.plotTop,l+p(k.margin,15)+b);if(f.display&&!m.floating)if(q==="right"){if(!v(i))this.marginRight=x(this.marginRight,f.legendWidth-s+o+c)}else if(q==="left"){if(!v(h))this.plotLeft=x(this.plotLeft,f.legendWidth+s+o+a)}else if(r==="top"){if(!v(g))this.plotTop=x(this.plotTop,f.legendHeight+y+o+b)}else if(r==="bottom"&&!v(j))this.marginBottom= -x(this.marginBottom,f.legendHeight-y+o+d);this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);this.hasCartesianSeries&&n(this.axes,function(a){a.getOffset()});v(h)||(this.plotLeft+=e[3]);v(g)||(this.plotTop+=e[0]);v(j)||(this.marginBottom+=e[2]);v(i)||(this.marginRight+=e[1]);this.setChartSize()},initReflow:function(){function a(a){var g=c.width||mb(d,"width"),h=c.height||mb(d,"height"),a=a?a.target:S;if(g&&h&&(a===S||a===E)){if(g!== -b.containerWidth||h!==b.containerHeight)clearTimeout(e),b.reflowTimeout=e=setTimeout(function(){b.container&&b.resize(g,h,!1)},100);b.containerWidth=g;b.containerHeight=h}}var b=this,c=b.options.chart,d=b.renderTo,e;D(S,"resize",a);D(b,"destroy",function(){O(S,"resize",a)})},resize:function(a,b,c){var d=this,e,f,g=d.resetZoomButton,h=d.title,i=d.subtitle,j;d.isResizing+=1;j=function(){d&&J(d,"endResize",null,function(){d.isResizing-=1})};Fa(c,d);d.oldChartHeight=d.chartHeight;d.oldChartWidth=d.chartWidth; -if(v(a))d.chartWidth=e=t(a);if(v(b))d.chartHeight=f=t(b);L(d.container,{width:e+"px",height:f+"px"});d.renderer.setSize(e,f,c);d.plotWidth=e-d.plotLeft-d.marginRight;d.plotHeight=f-d.plotTop-d.marginBottom;d.maxTicks=null;n(d.axes,function(a){a.isDirty=!0;a.setScale()});n(d.series,function(a){a.isDirty=!0});d.isDirtyLegend=!0;d.isDirtyBox=!0;d.getMargins();a=d.spacingBox;h&&h.align(null,null,a);i&&i.align(null,null,a);g&&g.align&&g.align(null,null,d[g.alignTo]);d.redraw(c);d.oldChartHeight=null;J(d, -"resize");Ya===!1?j():setTimeout(j,Ya&&Ya.duration||500)},setChartSize:function(){var a=this.inverted,b=this.chartWidth,c=this.chartHeight,d=this.options.chart,e=d.spacingTop,f=d.spacingRight,g=d.spacingBottom,h=d.spacingLeft,i,j,k,l;this.plotLeft=i=t(this.plotLeft);this.plotTop=j=t(this.plotTop);this.plotWidth=k=t(b-i-this.marginRight);this.plotHeight=l=t(c-j-this.marginBottom);this.plotSizeX=a?l:k;this.plotSizeY=a?k:l;this.plotBorderWidth=a=d.plotBorderWidth||0;this.spacingBox={x:h,y:e,width:b- -h-f,height:c-e-g};this.plotBox={x:i,y:j,width:k,height:l};this.clipBox={x:a/2,y:a/2,width:this.plotSizeX-a,height:this.plotSizeY-a};n(this.axes,function(a){a.setAxisSize();a.setAxisTranslation()})},resetMargins:function(){var a=this.options.chart,b=a.spacingRight,c=a.spacingBottom,d=a.spacingLeft;this.plotTop=p(this.optionsMarginTop,a.spacingTop);this.marginRight=p(this.optionsMarginRight,b);this.marginBottom=p(this.optionsMarginBottom,c);this.plotLeft=p(this.optionsMarginLeft,d);this.axisOffset= -[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,c=this.chartWidth,d=this.chartHeight,e=this.chartBackground,f=this.plotBackground,g=this.plotBorder,h=this.plotBGImage,i=a.borderWidth||0,j=a.backgroundColor,k=a.plotBackgroundColor,l=a.plotBackgroundImage,m=a.plotBorderWidth||0,o,s=this.plotLeft,n=this.plotTop,q=this.plotWidth,p=this.plotHeight,r=this.plotBox,t=this.clipRect,v=this.clipBox;o=i+(a.shadow?8:0);if(i||j)if(e)e.animate(e.crisp(null,null,null,c-o,d-o));else{e= -{fill:j||$};if(i)e.stroke=a.borderColor,e["stroke-width"]=i;this.chartBackground=b.rect(o/2,o/2,c-o,d-o,a.borderRadius,i).attr(e).add().shadow(a.shadow)}if(k)f?f.animate(r):this.plotBackground=b.rect(s,n,q,p,0).attr({fill:k}).add().shadow(a.plotShadow);if(l)h?h.animate(r):this.plotBGImage=b.image(l,s,n,q,p).add();t?t.animate({width:v.width,height:v.height}):this.clipRect=b.clipRect(v);if(m)g?g.animate(g.crisp(null,s,n,q,p)):this.plotBorder=b.rect(s,n,q,p,0,m).attr({stroke:a.plotBorderColor,"stroke-width":m, -zIndex:1}).add();this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,d=a.options.series,e,f;n(["inverted","angular","polar"],function(g){c=R[b.type||b.defaultSeriesType];f=a[g]||b[g]||c&&c.prototype[g];for(e=d&&d.length;!f&&e--;)(c=R[d[e].type])&&c.prototype[g]&&(f=!0);a[g]=f})},render:function(){var a=this,b=a.axes,c=a.renderer,d=a.options,e=d.labels,d=d.credits,f;a.setTitle();a.legend=new Ab(a);n(b,function(a){a.setScale()});a.getMargins();a.maxTicks=null;n(b,function(a){a.setTickPositions(!0); -a.setMaxTicks()});a.adjustTickAmounts();a.getMargins();a.drawChartBox();a.hasCartesianSeries&&n(b,function(a){a.render()});if(!a.seriesGroup)a.seriesGroup=c.g("series-group").attr({zIndex:3}).add();n(a.series,function(a){a.translate();a.setTooltipPoints();a.render()});e.items&&n(e.items,function(b){var d=u(e.style,b.style),f=F(d.left)+a.plotLeft,j=F(d.top)+a.plotTop+12;delete d.left;delete d.top;c.text(b.html,f,j).attr({zIndex:2}).css(d).add()});if(d.enabled&&!a.credits)f=d.href,a.credits=c.text(d.text, -0,0).on("click",function(){if(f)location.href=f}).attr({align:d.position.align,zIndex:8}).css(d.style).add().align(d.position);a.hasRendered=!0},destroy:function(){var a=this,b=a.axes,c=a.series,d=a.container,e,f=d&&d.parentNode;J(a,"destroy");O(a);for(e=b.length;e--;)b[e]=b[e].destroy();for(e=c.length;e--;)c[e]=c[e].destroy();n("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,tracker,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","), -function(b){var c=a[b];c&&c.destroy&&(a[b]=c.destroy())});if(d)d.innerHTML="",O(d),f&&Ra(d);for(e in a)delete a[e]},firstRender:function(){var a=this,b=a.options,c=a.callback;if(!ia&&S==S.top&&E.readyState!=="complete"||ca&&!S.canvg)ca?Vb.push(function(){a.firstRender()},b.global.canvasToolsURL):E.attachEvent("onreadystatechange",function(){E.detachEvent("onreadystatechange",a.firstRender);E.readyState==="complete"&&a.firstRender()});else{a.getContainer();J(a,"init");if(Highcharts.RangeSelector&& -b.rangeSelector.enabled)a.rangeSelector=new Highcharts.RangeSelector(a);a.resetMargins();a.setChartSize();a.propFromSeries();a.getAxes();n(b.series||[],function(b){a.initSeries(b)});if(Highcharts.Scroller&&(b.navigator.enabled||b.scrollbar.enabled))a.scroller=new Highcharts.Scroller(a);a.tracker=new zb(a,b);a.render();a.renderer.draw();c&&c.apply(a,[a]);n(a.callbacks,function(b){b.apply(a,[a])});a.cloneRenderTo(!0);J(a,"load")}},init:function(a){var b=this.options.chart,c;b.reflow!==!1&&D(this,"load", -this.initReflow);if(a)for(c in a)D(this,c,a[c]);this.xAxis=[];this.yAxis=[];this.animation=ca?!1:p(b.animation,!0);this.setSize=this.resize;this.pointCount=0;this.counters=new Lb;this.firstRender()}};$a.prototype.callbacks=[];var xa=function(){};xa.prototype={init:function(a,b,c){var d=a.chart.counters;this.series=a;this.applyOptions(b,c);this.pointAttr={};if(a.options.colorByPoint)b=a.chart.options.colors,this.color=this.color||b[d.color++],d.wrapColor(b.length);a.chart.pointCount++;return this}, -applyOptions:function(a,b){var c=this.series,d=typeof a;this.config=a;if(d==="number"||a===null)this.y=a;else if(typeof a[0]==="number")this.x=a[0],this.y=a[1];else if(d==="object"&&typeof a.length!=="number"){u(this,a);this.options=a;if(a.dataLabels)c._hasPointLabels=!0;if(a.marker)c._hasPointMarkers=!0}else if(typeof a[0]==="string")this.name=a[0],this.y=a[1];if(this.x===r)this.x=b===r?c.autoIncrement():b},destroy:function(){var a=this.series.chart,b=a.hoverPoints,c;a.pointCount--;if(b&&(this.setState(), -Ma(b,this),!b.length))a.hoverPoints=null;if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)O(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(c in this)this[c]=null},destroyElements:function(){for(var a="graphic,tracker,dataLabel,dataLabelUpper,group,connector,shadowGroup".split(","),b,c=6;c--;)b=a[c],this[b]&&(this[b]=this[b].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,key:this.name||this.category,series:this.series,point:this, -percentage:this.percentage,total:this.total||this.stackTotal}},select:function(a,b){var c=this,d=c.series.chart,a=p(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=a;c.setState(a&&"select");b||n(d.getSelectedPoints(),function(a){if(a.selected&&a!==c)a.selected=!1,a.setState(""),a.firePointEvent("unselect")})})},onMouseOver:function(){var a=this.series,b=a.chart,c=b.tooltip,d=b.hoverPoint;if(d&&d!==this)d.onMouseOut();this.firePointEvent("mouseOver");c&&(!c.shared|| -a.noSharedTooltip)&&c.refresh(this);this.setState("hover");b.hoverPoint=this},onMouseOut:function(){var a=this.series.chart,b=a.hoverPoints;if(!b||bc(this,b)===-1)this.firePointEvent("mouseOut"),this.setState(),a.hoverPoint=null},tooltipFormatter:function(a){var b=this.series,c=b.tooltipOptions,d=a.match(/\{(series|point)\.[a-zA-Z]+\}/g),e=/[{\.}]/,f,g,h,i,j={y:0,open:0,high:0,low:0,close:0,percentage:1,total:1};c.valuePrefix=c.valuePrefix||c.yPrefix;c.valueDecimals=c.valueDecimals||c.yDecimals;c.valueSuffix= -c.valueSuffix||c.ySuffix;for(i in d)g=d[i],qa(g)&&g!==a&&(h=(" "+g).split(e),f={point:this,series:b}[h[1]],h=h[2],f===this&&j.hasOwnProperty(h)?(f=j[h]?h:"value",f=(c[f+"Prefix"]||"")+Oa(this[h],p(c[f+"Decimals"],-1))+(c[f+"Suffix"]||"")):f=f[h],a=a.replace(g,f));return a},update:function(a,b,c){var d=this,e=d.series,f=d.graphic,g,h=e.data,i=h.length,j=e.chart,b=p(b,!0);d.firePointEvent("update",{options:a},function(){d.applyOptions(a);ga(a)&&(e.getAttribs(),f&&f.attr(d.pointAttr[e.state]));for(g= -0;ga+1&&b.push(d.slice(a+1,g)),a=g):g===e-1&&b.push(d.slice(a+1,g+1))});this.segments=b},setOptions:function(a){var b= -this.chart.options,c=b.plotOptions,d=c[this.type],e=a.data;a.data=null;c=w(d,c.series,a);c.data=a.data=e;this.tooltipOptions=w(b.tooltip,c.tooltip);d.marker===null&&delete c.marker;return c},getColor:function(){var a=this.options,b=this.chart.options.colors,c=this.chart.counters;this.color=a.color||!a.colorByPoint&&b[c.color++]||"gray";c.wrapColor(b.length)},getSymbol:function(){var a=this.options.marker,b=this.chart,c=b.options.symbols,b=b.counters;this.symbol=a.symbol||c[b.symbol++];if(/^url/.test(this.symbol))a.radius= -0;b.wrapSymbol(c.length)},drawLegendSymbol:function(a){var b=this.options,c=b.marker,d=a.options.symbolWidth,e=this.chart.renderer,f=this.legendGroup,a=a.baseline,g;if(b.lineWidth){g={"stroke-width":b.lineWidth};if(b.dashStyle)g.dashstyle=b.dashStyle;this.legendLine=e.path(["M",0,a-4,"L",d,a-4]).attr(g).add(f)}if(c&&c.enabled)b=c.radius,this.legendSymbol=e.symbol(this.symbol,d/2-b,a-4-b,2*b,2*b).add(f)},addPoint:function(a,b,c,d){var e=this.data,f=this.graph,g=this.area,h=this.chart,i=this.xData, -j=this.yData,k=f&&f.shift||0,l=this.options.data,m=this.pointClass.prototype;Fa(d,h);if(f&&c)f.shift=k+1;if(g){if(c)g.shift=k+1;g.isArea=!0}b=p(b,!0);d={series:this};m.applyOptions.apply(d,[a]);i.push(d.x);j.push(m.toYData?m.toYData.call(d):d.y);l.push(a);c&&(e[0]&&e[0].remove?e[0].remove(!1):(e.shift(),i.shift(),j.shift(),l.shift()));this.getAttribs();this.isDirtyData=this.isDirty=!0;b&&h.redraw()},setData:function(a,b){var c=this.points,d=this.options,e=this.initialColor,f=this.chart,g=null,h=this.xAxis, -i,j=this.pointClass.prototype;this.xIncrement=null;this.pointRange=h&&h.categories?1:d.pointRange;if(v(e))f.counters.color=e;var e=[],k=[],l=a?a.length:[],m=(i=this.pointArrayMap)&&i.length;if(l>(d.turboThreshold||1E3)){for(i=0;g===null&&ik||this.forceCrop))if(a=i.getExtremes(),i=a.min,k=a.max,b[d-1]k)b=[],c=[];else if(b[0]k){for(a=0;a=i){e=x(0,a-1);break}for(;ak){f=a+1;break}b=b.slice(e,f);c=c.slice(e,f);g=!0}for(a=b.length-1;a>0;a--)if(d= -b[a]-b[a-1],d>0&&(h===r||d= -0&&c<=d;)i[c++]=g}this.tooltipPoints=i}},tooltipHeaderFormatter:function(a){var b=this.tooltipOptions,c=b.xDateFormat,d=this.xAxis,e=d&&d.options.type==="datetime",f;if(e&&!c)for(f in C)if(C[f]>=d.closestPointRange){c=b.dateTimeLabelFormats[f];break}return b.headerFormat.replace("{point.key}",e&&za(a)?va(c,a):a).replace("{series.name}",this.name).replace("{series.color}",this.color)},onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&& -J(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;if(d)d.onMouseOut();this&&a.events.mouseOut&&J(this,"mouseOut");c&&!a.stickyTracking&&!c.shared&&c.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this,c=b.chart,d=c.renderer,e;e=b.options.animation;var f=c.clipBox,g=c.inverted,h;if(e&&!ga(e))e=Q[b.type].animation;h="_sharedClip"+e.duration+e.easing;if(a)a=c[h],e=c[h+"m"],a||(c[h]=a=d.clipRect(u(f, -{width:0})),c[h+"m"]=e=d.clipRect(-99,g?-c.plotLeft:-c.plotTop,99,g?c.chartWidth:c.chartHeight)),b.group.clip(a),b.markerGroup.clip(e),b.sharedClipKey=h;else{if(a=c[h])a.animate({width:c.plotSizeX},e),c[h+"m"].animate({width:c.plotSizeX+99},e);b.animate=null;b.animationTimeout=setTimeout(function(){b.afterAnimate()},e.duration)}},afterAnimate:function(){var a=this.chart,b=this.sharedClipKey,c=this.group;c&&this.options.clip!==!1&&(c.clip(a.clipRect),this.markerGroup.clip());setTimeout(function(){b&& -a[b]&&(a[b]=a[b].destroy(),a[b+"m"]=a[b+"m"].destroy())},100)},drawPoints:function(){var a,b=this.points,c=this.chart,d,e,f,g,h,i,j,k,l=this.options.marker,m,o=this.markerGroup;if(l.enabled||this._hasPointMarkers)for(f=b.length;f--;)if(g=b[f],d=g.plotX,e=g.plotY,k=g.graphic,i=g.marker||{},a=l.enabled&&i.enabled===r||i.enabled,m=c.isInsidePlot(d,e,c.inverted),a&&e!==r&&!isNaN(e))if(a=g.pointAttr[g.selected?"select":""],h=a.r,i=p(i.symbol,this.symbol),j=i.indexOf("url")===0,k)k.attr({visibility:m?ia? -"inherit":"visible":"hidden"}).animate(u({x:d-h,y:e-h},k.symbolName?{width:2*h,height:2*h}:{}));else{if(m&&(h>0||j))g.graphic=c.renderer.symbol(i,d-h,e-h,2*h,2*h).attr(a).add(o)}else if(k)g.graphic=k.destroy()},convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={},a=a||{},b=b||{},c=c||{},d=d||{};for(f in e)g=e[f],h[f]=p(a[g],b[f],c[f],d[f]);return h},getAttribs:function(){var a=this,b=Q[a.type].marker?a.options.marker:a.options,c=b.states,d=c.hover,e,f=a.color,g={stroke:f,fill:f}, -h=a.points||[],i=[],j,k=a.pointAttrToOptions,l;a.options.marker?(d.radius=d.radius||b.radius+2,d.lineWidth=d.lineWidth||b.lineWidth+1):d.color=d.color||wa(d.color||f).brighten(d.brightness).get();i[""]=a.convertAttribs(b,g);n(["hover","select"],function(b){i[b]=a.convertAttribs(c[b],i[""])});a.pointAttr=i;for(f=h.length;f--;){g=h[f];if((b=g.options&&g.options.marker||g.options)&&b.enabled===!1)b.radius=0;e=a.options.colorByPoint;if(g.options)for(l in k)v(b[k[l]])&&(e=!0);if(e){b=b||{};j=[];c=b.states|| -{};e=c.hover=c.hover||{};if(!a.options.marker)e.color=wa(e.color||g.color).brighten(e.brightness||d.brightness).get();j[""]=a.convertAttribs(u({color:g.color},b),i[""]);j.hover=a.convertAttribs(c.hover,i.hover,j[""]);j.select=a.convertAttribs(c.select,i.select,j[""])}else j=i;g.pointAttr=j}},destroy:function(){var a=this,b=a.chart,c=/AppleWebKit\/533/.test(Ta),d,e,f=a.data||[],g,h,i;J(a,"destroy");O(a);n(["xAxis","yAxis"],function(b){if(i=a[b])Ma(i.series,a),i.isDirty=!0});a.legendItem&&a.chart.legend.destroyItem(a); -for(e=f.length;e--;)(g=f[e])&&g.destroy&&g.destroy();a.points=null;clearTimeout(a.animationTimeout);n("area,graph,dataLabelsGroup,group,markerGroup,tracker,trackerGroup".split(","),function(b){a[b]&&(d=c&&b==="group"?"hide":"destroy",a[b][d]())});if(b.hoverSeries===a)b.hoverSeries=null;Ma(b.series,a);for(h in a)delete a[h]},drawDataLabels:function(){var a=this,b=a.options.dataLabels,c=a.points,d,e,f,g;if(b.enabled||a._hasPointLabels)a.dlProcessOptions&&a.dlProcessOptions(b),g=a.plotGroup("dataLabelsGroup", -"data-labels",a.visible?"visible":"hidden",6),e=b,n(c,function(c){var i,j=c.dataLabel,k,l=!0;d=c.options&&c.options.dataLabels;i=e.enabled||d&&d.enabled;if(j&&!i)c.dataLabel=j.destroy();else if(i){i=b.rotation;b=w(e,d);f=b.formatter.call(c.getLabelConfig(),b);b.style.color=p(b.color,b.style.color,a.color,"black");if(j)j.attr({text:f}),l=!1;else if(v(f)){j={fill:b.backgroundColor,stroke:b.borderColor,"stroke-width":b.borderWidth,r:b.borderRadius||0,rotation:i,padding:b.padding,zIndex:1};for(k in j)j[k]=== -r&&delete j[k];j=c.dataLabel=a.chart.renderer[i?"text":"label"](f,0,-999,null,null,null,b.useHTML).attr(j).css(b.style).add(g).shadow(b.shadow)}j&&a.alignDataLabel(c,j,b,null,l)}})},alignDataLabel:function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=p(a.plotX,-999),a=p(a.plotY,-999),i=b.getBBox(),d=u({x:g?f.plotWidth-a:h,y:t(g?f.plotHeight-h:a),width:0,height:0},d);u(c,{width:i.width,height:i.height});c.rotation?(d={align:c.align,x:d.x+c.x+d.width/2,y:d.y+c.y+d.height/2},b[e?"attr":"animate"](d)): -(b.align(c,null,d),d=b.alignAttr);b.attr({visibility:c.crop===!1||f.isInsidePlot(d.x,d.y)||f.isInsidePlot(h,a,g)?ia?"inherit":"visible":"hidden"})},getSegmentPath:function(a){var b=this,c=[];n(a,function(d,e){b.getPointSpline?c.push.apply(c,b.getPointSpline(a,d,e)):(c.push(e?"L":"M"),e&&b.options.step&&c.push(d.plotX,a[e-1].plotY),c.push(d.plotX,d.plotY))});return c},getGraphPath:function(){var a=this,b=[],c,d=[];n(a.segments,function(e){c=a.getSegmentPath(e);e.length>1?b=b.concat(c):d.push(e[0])}); -a.singlePoints=d;return a.graphPath=b},drawGraph:function(){var a=this.options,b=this.graph,c=this.group,d=a.lineColor||this.color,e=a.lineWidth,f=a.dashStyle,g=this.getGraphPath();if(b)nb(b),b.animate({d:g});else if(e){b={stroke:d,"stroke-width":e,zIndex:1};if(f)b.dashstyle=f;this.graph=this.chart.renderer.path(g).attr(b).add(c).shadow(a.shadow)}},invertGroups:function(){function a(){var a={width:b.yAxis.len,height:b.xAxis.len};n(["group","trackerGroup","markerGroup"],function(c){b[c]&&b[c].attr(a).invert()})} -var b=this,c=b.chart;D(c,"resize",a);D(b,"destroy",function(){O(c,"resize",a)});a();b.invertGroups=a},plotGroup:function(a,b,c,d,e){var f=this[a],g=this.chart,h=this.xAxis,i=this.yAxis;f||(this[a]=f=g.renderer.g(b).attr({visibility:c,zIndex:d||0.1}).add(e));f.translate(h?h.left:g.plotLeft,i?i.top:g.plotTop);return f},render:function(){var a=this.chart,b,c=this.options,d=c.animation&&!!this.animate,e=this.visible?"visible":"hidden",f=c.zIndex,g=this.hasRendered,h=a.seriesGroup;b=this.plotGroup("group", -"series",e,f,h);this.markerGroup=this.plotGroup("markerGroup","markers",e,f,h);d&&this.animate(!0);this.getAttribs();b.inverted=a.inverted;this.drawGraph&&this.drawGraph();this.drawPoints();this.drawDataLabels();this.options.enableMouseTracking!==!1&&this.drawTracker();a.inverted&&this.invertGroups();c.clip!==!1&&!this.sharedClipKey&&!g&&(b.clip(a.clipRect),this.trackerGroup&&this.trackerGroup.clip(a.clipRect));d?this.animate():g||this.afterAnimate();this.isDirty=this.isDirtyData=!1;this.hasRendered= -!0},redraw:function(){var a=this.chart,b=this.isDirtyData,c=this.group;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:this.xAxis.left,translateY:this.yAxis.top}));this.translate();this.setTooltipPoints(!0);this.render();b&&J(this,"updatedData")},setState:function(a){var b=this.options,c=this.graph,d=b.states,b=b.lineWidth,a=a||"";if(this.state!==a)this.state=a,d[a]&&d[a].enabled===!1||(a&&(b=d[a].lineWidth||b+1),c&&!c.dashstyle&&c.attr({"stroke-width":b},a?0: -500))},setVisible:function(a,b){var c=this.chart,d=this.legendItem,e=this.group,f=this.tracker,g=this.dataLabelsGroup,h=this.markerGroup,i,j=this.points,k=c.options.chart.ignoreHiddenSeries;i=this.visible;i=(this.visible=a=a===r?!i:a)?"show":"hide";if(e)e[i]();if(h)h[i]();if(f)f[i]();else if(j)for(e=j.length;e--;)if(f=j[e],f.tracker)f.tracker[i]();if(g)g[i]();d&&c.legend.colorizeItem(this,a);this.isDirty=!0;this.options.stacking&&n(c.series,function(a){if(a.options.stacking&&a.visible)a.isDirty=!0}); -if(k)c.isDirtyBox=!0;b!==!1&&c.redraw();J(this,i)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=a===r?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;J(this,a?"select":"unselect")},drawTracker:function(){var a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=d.length,f=a.chart,g=f.renderer,h=f.options.tooltip.snap,i=a.tracker,j=b.cursor,j=j&&{cursor:j},k=a.singlePoints,l=this.isCartesian&&this.plotGroup("trackerGroup", -null,"visible",b.zIndex||1,f.trackerGroup),m;if(e&&!c)for(m=e+1;m--;)d[m]==="M"&&d.splice(m+1,0,d[m+1]-h,d[m+2],"L"),(m&&d[m]==="M"||m===e)&&d.splice(m,0,"L",d[m-2]+h,d[m-1]);for(m=0;m=0;d--)da&&i>e?(i=x(a,e),k=2*e-i):ig&&k>e?(k=x(g,e),i=2*e-k):kz?g-z:I-(f<=I?z:0));c.barX=h;c.pointWidth=q;c.shapeType="rect";c.shapeArgs=f=b.renderer.Element.prototype.crisp.call(0,e,h,i,t,j);e%2&&(f.y-=1,f.height+=1);c.trackerArgs=V(j)<3&&w(c.shapeArgs,{height:6,y:i-3})})}, -getSymbol:lb,drawLegendSymbol:H.prototype.drawLegendSymbol,drawGraph:lb,drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer,d;n(a.points,function(e){var f=e.plotY,g=e.graphic;if(f!==r&&!isNaN(f)&&e.y!==null)d=e.shapeArgs,g?(nb(g),g.animate(w(d))):e.graphic=c[e.shapeType](d).attr(e.pointAttr[e.selected?"select":""]).add(a.group).shadow(b.shadow,null,b.stacking&&!b.borderRadius);else if(g)e.graphic=g.destroy()})},drawTracker:function(){var a=this,b=a.chart,c=b.renderer,d,e,f=+new Date,g= -a.options,h=g.cursor,i=h&&{cursor:h},j=a.isCartesian&&a.plotGroup("trackerGroup",null,"visible",g.zIndex||1,b.trackerGroup),k,l,m;n(a.points,function(h){e=h.tracker;d=h.trackerArgs||h.shapeArgs;l=h.plotY;m=!a.isCartesian||l!==r&&!isNaN(l);delete d.strokeWidth;if(h.y!==null&&m)e?e.attr(d):h.tracker=c[h.shapeType](d).attr({isTracker:f,fill:Eb,visibility:a.visible?"visible":"hidden"}).on(ba?"touchstart":"mouseover",function(c){k=c.relatedTarget||c.fromElement;if(b.hoverSeries!==a&&G(k,"isTracker")!== -f)a.onMouseOver();h.onMouseOver()}).on("mouseout",function(b){if(!g.stickyTracking&&(k=b.relatedTarget||b.toElement,G(k,"isTracker")!==f))a.onMouseOut()}).css(i).add(h.group||j)})},alignDataLabel:function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=a.below||a.plotY>(this.translatedThreshold||f.plotSizeY),i=this.options.stacking||c.inside;if(a.shapeArgs&&(d=w(a.shapeArgs),g&&(d={x:f.plotWidth-d.y-d.height,y:f.plotHeight-d.x-d.width,width:d.height,height:d.width}),!i))g?(d.x+=h?0:d.width,d.width=0): -(d.y+=h?d.height:0,d.height=0);c.align=p(c.align,!g||i?"center":h?"right":"left");c.verticalAlign=p(c.verticalAlign,g||i?"middle":h?"top":"bottom");W.prototype.alignDataLabel.call(this,a,b,c,d,e)},animate:function(a){var b=this,c=b.points,d=b.options;if(!a)n(c,function(a){var c=a.graphic,a=a.shapeArgs,g=b.yAxis,h=d.threshold;c&&(c.attr({height:0,y:v(h)?g.getThreshold(h):g.translate(g.getExtremes().min,0,1,0,1)}),c.animate({height:a.height,y:a.y},d.animation))}),b.animate=null},remove:function(){var a= -this,b=a.chart;b.hasRendered&&n(b.series,function(b){if(b.type===a.type)b.isDirty=!0});W.prototype.remove.apply(a,arguments)}});R.column=ea;Q.bar=w(Q.column);La=aa(ea,{type:"bar",inverted:!0});R.bar=La;Q.scatter=w(N,{lineWidth:0,states:{hover:{lineWidth:0}},tooltip:{headerFormat:'{series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"}});La=aa(W,{type:"scatter",sorted:!1,translate:function(){var a=this;W.prototype.translate.apply(a); -n(a.points,function(b){b.shapeType="circle";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){for(var a=this,b=a.options.cursor,b=b&&{cursor:b},c=a.points,d=c.length,e;d--;)if(e=c[d].graphic)e.element._i=d;a._hasTracking?a._hasTracking=!0:a.markerGroup.attr({isTracker:!0}).on(ba?"touchstart":"mouseover",function(b){a.onMouseOver();if(b.target._i!==r)c[b.target._i].onMouseOver()}).on("mouseout",function(){if(!a.options.stickyTracking)a.onMouseOut()}).css(b)}}); -R.scatter=La;Q.pie=w(N,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},legendType:"point",marker:null,size:"75%",showInLegend:!1,slicedOffset:10,states:{hover:{brightness:0.1,shadow:!1}}});N={type:"pie",isCartesian:!1,pointClass:aa(xa,{init:function(){xa.prototype.init.apply(this,arguments);var a=this,b;u(a,{visible:a.visible!==!1,name:p(a.name,"Slice")});b=function(){a.slice()};D(a,"select", -b);D(a,"unselect",b);return a},setVisible:function(a){var b=this.series,c=b.chart,d=this.tracker,e=this.dataLabel,f=this.connector,g=this.shadowGroup,h;h=(this.visible=a=a===r?!this.visible:a)?"show":"hide";this.group[h]();if(d)d[h]();if(e)e[h]();if(f)f[h]();if(g)g[h]();this.legendItem&&c.legend.colorizeItem(this,a);if(!b.isDirty&&b.options.ignoreHiddenPoint)b.isDirty=!0,c.redraw()},slice:function(a,b,c){var d=this.series.chart,e=this.slicedTranslation;Fa(c,d);p(b,!0);a=this.sliced=v(a)?a:!this.sliced; -a={translateX:a?e[0]:d.plotLeft,translateY:a?e[1]:d.plotTop};this.group.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}}),pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=this.chart.counters.color},animate:function(){var a=this;n(a.points,function(b){var c=b.graphic,b=b.shapeArgs,d=-Ia/2;c&&(c.attr({r:0,start:d,end:d}),c.animate({r:b.r,start:b.start,end:b.end},a.options.animation))});a.animate=null},setData:function(a, -b){W.prototype.setData.call(this,a,!1);this.processData();this.generatePoints();p(b,!0)&&this.chart.redraw()},getCenter:function(){var a=this.options,b=this.chart,c=b.plotWidth,d=b.plotHeight,a=a.center.concat([a.size,a.innerSize||0]),e=K(c,d),f;return Ja(a,function(a,b){return(f=/%$/.test(a))?[c,d,e,e][b]*F(a)/100:a})},translate:function(){this.generatePoints();var a=0,b=-0.25,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,f,g=this.chart,h,i,j,k=this.points,l=2*Ia,m=c.dataLabels.distance,o=c.ignoreHiddenPoint, -n,p=k.length,q;this.center=f=this.getCenter();this.getX=function(a,b){j=M.asin((a-f[1])/(f[2]/2+m));return f[0]+(b?-1:1)*da(j)*(f[2]/2+m)};for(n=0;n0,s=[[],[]],y,q,r,t,v=2,z;if(d.enabled||this._hasPointLabels){W.prototype.drawDataLabels.apply(this);n(a,function(a){a.dataLabel&&s[a.labelPos[7]0){for(z=m-l-j;z<=m+l+j;z+=a)A.push(z);r=A.length; -if(u>r){h=[].concat(x);h.sort(t);for(z=u;z--;)h[z].rank=z;for(z=u;z--;)x[z].rank>=r&&x.splice(z,1);u=x.length}for(z=0;z0){if(q=B.pop(),w=q.i,q=q.y,y>q&&A[w+1]!==null||y=c[1]||p===i;)if(j=c.shift(),k=d.apply(0,m),k!==r&&(g.push(j),h.push(k)),m[0]=[],m[1]=[],m[2]=[],m[3]=[],p===i)break;if(p===i)break;if(o){j=this.cropStart+p;j=e&&e[j]||this.pointClass.prototype.applyOptions.apply({series:this},[f[j]]);var q;for(k=0;kg/i||j&&c.forced){e=!0;this.points=null;a=h.getExtremes();j=a.min;k=a.max;a=h.getGroupIntervalFactor&&h.getGroupIntervalFactor(j,k,d)||1;g=i*(k-j)/g*a;h=(h.getNonLinearTimeTicks||db)(Gb(g,c.units||Xb),j,k,null,d,this.closestPointRange);f=T.groupData.apply(this,[d,f,h,c.approximation]);d=f[0];f=f[1];if(c.smoothed){a=d.length-1;for(d[a]=k;a--&&a>0;)d[a]+=g/2;d[0]=j}this.currentDataGrouping=h.info;if(b.pointRange===null)this.pointRange= -h.info.totalRange;this.closestPointRange=h.info.totalRange;this.processedXData=d;this.processedYData=f}else this.currentDataGrouping=null,this.pointRange=l;this.hasGroupedData=e}};T.destroyGroupedData=function(){var a=this.groupedData;n(a||[],function(b,c){b&&(a[c]=b.destroy?b.destroy():null)});this.groupedData=null};T.generatePoints=function(){fc.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};T.tooltipHeaderFormatter=function(a){var b=this.tooltipOptions, -c=this.options.dataGrouping,d=b.xDateFormat,e,f=this.xAxis,g,h;if(f&&f.options.type==="datetime"&&c&&za(a)){g=this.currentDataGrouping;c=c.dateTimeLabelFormats;if(g)f=c[g.unitName],g.count===1?d=f[0]:(d=f[1],e=f[2]);else if(!d)for(h in C)if(C[h]>=f.closestPointRange){d=c[h][0];break}d=va(d,a);e&&(d+=va(e,a+g.totalRange-1));a=b.headerFormat.replace("{point.key}",d)}else a=hc.apply(this,[a]);return a};T.destroy=function(){for(var a=this.groupedData||[],b=a.length;b--;)a[b]&&a[b].destroy();gc.apply(this)}; -rb(T,"setOptions",function(a,b){var c=a.call(this,b),d=this.type,e=this.chart.options.plotOptions;if(Wb[d]){if(!Q[d].dataGrouping)Q[d].dataGrouping=w(ic,Wb[d]);c.dataGrouping=w(Q[d].dataGrouping,e.series&&e.series.dataGrouping,e[d].dataGrouping,b.dataGrouping)}return c});Q.ohlc=w(Q.column,{lineWidth:1,tooltip:{pointFormat:'{series.name}
Open: {point.open}
High: {point.high}
Low: {point.low}
Close: {point.close}
'},states:{hover:{lineWidth:3}}, -threshold:null});N=aa(xa,{applyOptions:function(a){var b=this.series,c=b.pointArrayMap,d=0,e=0,f=c.length;if(typeof a==="object"&&typeof a.length!=="number")u(this,a),this.options=a;else if(a.length){if(a.length>f){if(typeof a[0]==="string")this.name=a[0];else if(typeof a[0]==="number")this.x=a[0];d++}for(;e', -this.name||a.name,"

Open: ",this.open,"
High: ",this.high,"
Low: ",this.low,"
Close: ",this.close,"
"].join("")},toYData:function(){return[this.open,this.high,this.low,this.close]}});N=aa(R.column,{type:"ohlc",pointArrayMap:["open","high","low","close"],pointValKey:"high",pointClass:N,pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},upColorProp:"stroke",getAttribs:function(){R.column.prototype.getAttribs.apply(this,arguments);var a=this.options,b=a.states, -a=a.upColor||this.color,c=w(this.pointAttr),d=this.upColorProp;c[""][d]=a;c.hover[d]=b.hover.upColor||a;c.select[d]=b.select.upColor||a;n(this.points,function(a){if(a.open=j.min&&c.x<=j.max?c.plotY=i.lineTop-a.plotTop:c.shapeArgs={};if((e=b[d-1])&&e.plotX===c.plotX){if(e.stackIndex===r)e.stackIndex=0;c.stackIndex=e.stackIndex+1}})},drawPoints:function(){var a,b=this.points,c=this.chart.renderer,d,e,f=this.options,g=f.y,h=f.shape,i,j,k,l,m=f.lineWidth%2/2,o;for(k=b.length;k--;)if(l=b[k],d=l.plotX+m,j=l.stackIndex,e=l.plotY,e!==r&&(e=l.plotY+g+m-(j!==r&&j*f.stackDistance)), -i=j?r:l.plotX+m,o=j?r:l.plotY,j=l.graphic,a=l.tracker,e!==r)a=l.pointAttr[l.selected?"select":""],j?j.attr({x:d,y:e,r:a.r,anchorX:i,anchorY:o}):j=l.graphic=c.label(l.options.title||f.title||"A",d,e,h,i,o).css(w(f.style,l.style)).attr(a).attr({align:h==="flag"?"left":"center",width:f.width,height:f.height}).add(this.group).shadow(f.shadow),i=j.box,j=i.getBBox(),l.shapeArgs=u(j,{x:d-(h==="flag"?0:i.attr("width")/2),y:e});else if(j)l.graphic=j.destroy(),a&&a.attr("y",-9999)},drawTracker:function(){R.column.prototype.drawTracker.apply(this); -n(this.points,function(a){a.tracker&&D(a.tracker.element,"mouseover",function(){a.graphic.toFront()})})},tooltipFormatter:function(a){return a.point.text},animate:function(){}});pb.flag=function(a,b,c,d,e){var f=e&&e.anchorX||a,e=e&&e.anchorY||b;return["M",f,e,"L",a,b+d,a,b,a+c,b,a+c,b+d,a,b+d,"M",f,e,"Z"]};n(["circle","square"],function(a){pb[a+"pin"]=function(b,c,d,e,f){var g=f&&f.anchorX,f=f&&f.anchorY,b=pb[a](b,c,d,e);g&&f&&b.push("M",g,c+e,"L",g,f);return b}});Ua===Ka&&n(["flag","circlepin", -"squarepin"],function(a){Ka.prototype.symbols[a]=pb[a]});var qb=ba?"touchstart":"mousedown",Yb=ba?"touchmove":"mousemove",Zb=ba?"touchend":"mouseup",N=ja("linearGradient",{x1:0,y1:0,x2:0,y2:1},"stops",[[0,"#FFF"],[1,"#CCC"]]),H=[].concat(Xb);H[4]=[fa,[1,2,3,4]];H[5]=[Ba,[1,2,3]];u(P,{navigator:{handles:{backgroundColor:"#FFF",borderColor:"#666"},height:40,margin:10,maskFill:"rgba(255, 255, 255, 0.75)",outlineColor:"#444",outlineWidth:1,series:{type:"areaspline",color:"#4572A7",compare:null,fillOpacity:0.4, -dataGrouping:{approximation:"average",groupPixelWidth:2,smoothed:!0,units:H},dataLabels:{enabled:!1},id:"highcharts-navigator-series",lineColor:"#4572A7",lineWidth:1,marker:{enabled:!1},pointRange:0,shadow:!1},xAxis:{tickWidth:0,lineWidth:0,gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",x:3,y:-4}},yAxis:{gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:0.1,maxPadding:0.1,labels:{enabled:!1},title:{text:null},tickWidth:0}},scrollbar:{height:ba?20:14,barBackgroundColor:N,barBorderRadius:2, -barBorderWidth:1,barBorderColor:"#666",buttonArrowColor:"#666",buttonBackgroundColor:N,buttonBorderColor:"#666",buttonBorderRadius:2,buttonBorderWidth:1,rifleColor:"#666",trackBackgroundColor:ja("linearGradient",{x1:0,y1:0,x2:0,y2:1},"stops",[[0,"#EEE"],[1,"#FFF"]]),trackBorderColor:"#CCC",trackBorderWidth:1}});Pb.prototype={getAxisTop:function(a){return this.navigatorOptions.top||a-this.height-this.scrollbarHeight-this.chart.options.chart.spacingBottom},drawHandle:function(a,b){var c=this.chart.renderer, -d=this.elementsToDestroy,e=this.handles,f=this.navigatorOptions.handles,f={fill:f.backgroundColor,stroke:f.borderColor,"stroke-width":1},g;this.rendered||(e[b]=c.g().css({cursor:"e-resize"}).attr({zIndex:4-b}).add(),g=c.rect(-4.5,0,9,16,3,1).attr(f).add(e[b]),d.push(g),g=c.path(["M",-1.5,4,"L",-1.5,12,"M",0.5,4,"L",0.5,12]).attr(f).add(e[b]),d.push(g));e[b].translate(this.scrollerLeft+this.scrollbarHeight+parseInt(a,10),this.top+this.height/2-8)},drawScrollbarButton:function(a){var b=this.chart.renderer, -c=this.elementsToDestroy,d=this.scrollbarButtons,e=this.scrollbarHeight,f=this.scrollbarOptions,g;this.rendered||(d[a]=b.g().add(this.scrollbarGroup),g=b.rect(-0.5,-0.5,e+1,e+1,f.buttonBorderRadius,f.buttonBorderWidth).attr({stroke:f.buttonBorderColor,"stroke-width":f.buttonBorderWidth,fill:f.buttonBackgroundColor}).add(d[a]),c.push(g),g=b.path(["M",e/2+(a?-1:1),e/2-3,"L",e/2+(a?-1:1),e/2+3,e/2+(a?2:-2),e/2]).attr({fill:f.buttonArrowColor}).add(d[a]),c.push(g));a&&d[a].attr({translateX:this.scrollerWidth- -e})},render:function(a,b,c,d){var e=this.chart,f=e.renderer,g,h,i,j,k=this.scrollbarGroup,l=this.scrollbar,m=this.xAxis,o=this.scrollbarTrack,n=this.scrollbarHeight,y=this.scrollbarEnabled,q=this.navigatorOptions,r=this.scrollbarOptions,v=this.height,w=this.top,z=this.navigatorEnabled,A=q.outlineWidth,B=A/2,u=this.outlineHeight,D=r.barBorderRadius,G=r.barBorderWidth,C=w+B;if(!isNaN(a)){this.navigatorLeft=g=p(m.left,e.plotLeft+n);this.navigatorWidth=h=p(m.len,e.plotWidth-2*n);this.scrollerLeft=i=g- -n;this.scrollerWidth=j=j=h+2*n;if(m.getExtremes){var E=e.xAxis[0].getExtremes(),e=E.dataMin===null,H=m.getExtremes(),J=K(E.dataMin,H.dataMin),E=x(E.dataMax,H.dataMax);!e&&(J!==H.min||E!==H.max)&&m.setExtremes(J,E,!0,!1)}c=p(c,m.translate(a));d=p(d,m.translate(b));this.zoomedMin=a=x(F(K(c,d)),0);this.zoomedMax=d=K(F(x(c,d)),h);this.range=c=d-a;if(!this.rendered){if(z)this.leftShade=f.rect().attr({fill:q.maskFill,zIndex:3}).add(),this.rightShade=f.rect().attr({fill:q.maskFill,zIndex:3}).add(),this.outline= -f.path().attr({"stroke-width":A,stroke:q.outlineColor,zIndex:3}).add();if(y)this.scrollbarGroup=k=f.g().add(),l=r.trackBorderWidth,this.scrollbarTrack=o=f.rect().attr({y:-l%2/2,fill:r.trackBackgroundColor,stroke:r.trackBorderColor,"stroke-width":l,r:r.trackBorderRadius||0,height:n}).add(k),this.scrollbar=l=f.rect().attr({y:-G%2/2,height:n,fill:r.barBackgroundColor,stroke:r.barBorderColor,"stroke-width":G,r:D}).add(k),this.scrollbarRifles=f.path().attr({stroke:r.rifleColor,"stroke-width":1}).add(k)}z&& -(this.leftShade.attr({x:g,y:w,width:a,height:v}),this.rightShade.attr({x:g+d,y:w,width:h-d,height:v}),this.outline.attr({d:["M",i,C,"L",g+a+B,C,g+a+B,C+u-n,"M",g+d-B,C+u-n,"L",g+d-B,C,i+j,C]}),this.drawHandle(a+B,0),this.drawHandle(d+B,1));y&&(this.drawScrollbarButton(0),this.drawScrollbarButton(1),k.translate(i,t(C+v)),o.attr({width:j}),l.attr({x:t(n+a)+G%2/2,width:c-G}),f=n+a+c/2-0.5,this.scrollbarRifles.attr({d:["M",f-3,n/4,"L",f-3,2*n/3,"M",f,n/4,"L",f,2*n/3,"M",f+3,n/4,"L",f+3,2*n/3],visibility:c> -12?"visible":"hidden"}));this.rendered=!0}},addEvents:function(){var a=this.chart;D(a.container,qb,this.mouseDownHandler);D(a.container,Yb,this.mouseMoveHandler);D(document,Zb,this.mouseUpHandler)},removeEvents:function(){var a=this.chart;O(a.container,qb,this.mouseDownHandler);O(a.container,Yb,this.mouseMoveHandler);O(document,Zb,this.mouseUpHandler);this.navigatorEnabled&&O(this.baseSeries,"updatedData",this.updatedDataHandler)},init:function(){var a=this,b=a.chart,c,d,e=a.scrollbarHeight,f=a.navigatorOptions, -g=a.height,h=a.top,i,j,k,l=document.body.style,m,o=a.baseSeries,n;a.mouseDownHandler=function(d){var d=b.tracker.normalizeMouseEvent(d),e=a.zoomedMin,f=a.zoomedMax,h=a.top,i=a.scrollbarHeight,k=a.scrollerLeft,o=a.scrollerWidth,n=a.navigatorLeft,p=a.navigatorWidth,q=a.range,s=d.chartX,r=d.chartY,d=ba?10:7;if(r>h&&rn+e&&sk&&sk+o-i?e+K(10,q):sp&&(f=p-q),f!==e&&b.xAxis[0].setExtremes(c.translate(f,!0),c.translate(f+q,!0),!0,!1,{trigger:"navigator"}))};a.mouseMoveHandler=function(c){var d=a.scrollbarHeight,e=a.navigatorLeft,f=a.navigatorWidth,g=a.scrollerLeft,h=a.scrollerWidth,i=a.range,c=b.tracker.normalizeMouseEvent(c),c=c.chartX;cg+h-d&&(c=g+h-d);a.grabbedLeft?(k=!0,a.render(0,0,c- -e,a.otherHandlePos)):a.grabbedRight?(k=!0,a.render(0,0,a.otherHandlePos,c-e)):a.grabbedCenter&&(k=!0,cf+j-i&&(c=f+j-i),a.render(0,0,c-j,c-j+i))};a.mouseUpHandler=function(){var d=a.zoomedMin,e=a.zoomedMax;k&&b.xAxis[0].setExtremes(c.translate(d,!0),c.translate(e,!0),!0,!1,{trigger:"navigator"});a.grabbedLeft=a.grabbedRight=a.grabbedCenter=k=j=null;l.cursor=m||""};a.updatedDataHandler=function(){var c=o.xAxis,d=c.getExtremes(),e=d.min,f=d.max,g=d.dataMin,d=d.dataMax,h=f-e,j,k,l,m,p;j=i.xData; -var q=!!c.setExtremes;k=f>=j[j.length-1];j=e<=g;if(!n)i.options.pointStart=o.xData[0],i.setData(o.options.data,!1),p=!0;j&&(m=g,l=m+h);k&&(l=d,j||(m=x(l-h,i.xData[0])));q&&(j||k)?c.setExtremes(m,l,!0,!1,{trigger:"updatedData"}):(p&&b.redraw(!1),a.render(x(e,g),K(f,d)))};var p=b.xAxis.length,q=b.yAxis.length,r=b.setSize;b.extraBottomMargin=a.outlineHeight+f.margin;a.top=h=a.getAxisTop(b.chartHeight);if(a.navigatorEnabled){var t=o?o.options:{},v=t.data,u=f.series;n=u.data;t.data=u.data=null;a.xAxis= -c=new Sa(b,w({ordinal:o&&o.xAxis.options.ordinal},f.xAxis,{isX:!0,type:"datetime",index:p,height:g,top:h,offset:0,offsetLeft:e,offsetRight:-e,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1}));a.yAxis=d=new Sa(b,w(f.yAxis,{alignTicks:!1,height:g,top:h,offset:0,index:q,zoomEnabled:!1}));p=w(t,u,{threshold:null,clip:!1,enableMouseTracking:!1,group:"nav",padXAxis:!1,xAxis:p,yAxis:q,name:"Navigator",showInLegend:!1,isInternal:!0,visible:!0});t.data=v;u.data=n;p.data=n||v;i=b.initSeries(p); -f.adaptToUpdatedData!==!1&&D(o,"updatedData",a.updatedDataHandler)}else a.xAxis=c={translate:function(a,c){var d=b.xAxis[0].getExtremes(),f=b.plotWidth-2*e,g=d.dataMin,d=d.dataMax-g;return c?a*d/f+g:f*(a-g)/d}};a.series=i;b.setSize=function(e,f,g){a.top=h=a.getAxisTop(f);if(c&&d)c.options.top=d.options.top=h;r.call(b,e,f,g)};a.addEvents()},destroy:function(){this.removeEvents();n([this.xAxis,this.yAxis,this.leftShade,this.rightShade,this.outline,this.scrollbarTrack,this.scrollbarRifles,this.scrollbarGroup, -this.scrollbar],function(a){a&&a.destroy&&a.destroy()});this.xAxis=this.yAxis=this.leftShade=this.rightShade=this.outline=this.scrollbarTrack=this.scrollbarRifles=this.scrollbarGroup=this.scrollbar=null;n([this.scrollbarButtons,this.handles,this.elementsToDestroy],function(a){ta(a)})}};Highcharts.Scroller=Pb;rb(Sa.prototype,"zoom",function(a,b,c){var d=this.chart,e=d.options,f=e.chart.zoomType,g=e.navigator,e=e.rangeSelector,h;if(this.isXAxis&&(g&&g.enabled||e&&e.enabled))if(f==="x")d.resetZoomButton= -"blocked";else if(f==="y")h=!1;else if(f==="xy")d=this.previousZoom,v(b)?this.previousZoom=[this.min,this.max]:d&&(b=d[0],c=d[1],delete this.previousZoom);return h!==r?h:a.call(this,b,c)});u(P,{rangeSelector:{buttonTheme:{width:28,height:16,padding:1,r:0,zIndex:7}}});P.lang=w(P.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From:",rangeSelectorTo:"To:"});Qb.prototype={clickButton:function(a,b,c){var d=this,e=d.chart,f=d.buttons,g=e.xAxis[0],h=g&&g.getExtremes(),i=e.scroller&&e.scroller.xAxis,j= -i&&i.getExtremes&&i.getExtremes(),i=j&&j.dataMin,j=j&&j.dataMax,k=h&&h.dataMin,l=h&&h.dataMax,i=(v(k)&&v(i)?K:p)(k,i),j=(v(l)&&v(j)?x:p)(l,j),m,o=g&&K(h.max,j),h=new Date(o),l=b.type,k=b.count,n,r,q={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(!(i===null||j===null||a===d.selected))q[l]?(n=q[l]*k,m=x(o-n,i)):l==="month"?(h.setMonth(h.getMonth()-k),m=x(h.getTime(),i),n=2592E6*k):l==="ytd"?(h=new Date(0),l=new Date(j),r=l.getFullYear(),h.setFullYear(r),String(r)!==va("%Y", -h)&&h.setFullYear(r-1),m=r=x(i||0,h.getTime()),l=l.getTime(),o=K(j||l,l)):l==="year"?(h.setFullYear(h.getFullYear()-k),m=x(i,h.getTime()),n=31536E6*k):l==="all"&&g&&(m=i,o=j),f[a]&&f[a].setState(2),g?setTimeout(function(){g.setExtremes(m,o,p(c,1),0,{trigger:"rangeSelectorButton",rangeSelectorButton:b});d.selected=a},1):(e=e.options.xAxis,e[0]=w(e[0],{range:n,min:r}),d.selected=a)},init:function(a){var b=this,c=b.chart,d=c.options.rangeSelector,a=d.buttons||a,e=b.buttons,f=b.leftBox,g=b.rightBox,d= -d.selected;c.extraTopMargin=25;b.buttonOptions=a;b.mouseDownHandler=function(){f&&f.blur();g&&g.blur()};D(c.container,qb,b.mouseDownHandler);d!==r&&a[d]&&this.clickButton(d,a[d],!1);D(c,"load",function(){D(c.xAxis[0],"afterSetExtremes",function(){e[b.selected]&&!c.renderer.forExport&&e[b.selected].setState(0);b.selected=null})})},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,c=a.hasFocus?c.inputEditDateFormat||"%Y-%m-%d":c.inputDateFormat||"%b %e, %Y";if(b)a.HCTime=b;a.value= -va(c,a.HCTime)},drawInput:function(a){var b=this,c=b.chart,d=c.options.rangeSelector,e=b.div,f=a==="min",g;b.boxSpanElements[a]=U("span",{innerHTML:P.lang[f?"rangeSelectorFrom":"rangeSelectorTo"]},d.labelStyle,e);g=U("input",{name:a,className:"highcharts-range-selector",type:"text"},u({width:"80px",height:"16px",border:"1px solid silver",marginLeft:"5px",marginRight:f?"5px":"0",textAlign:"center"},d.inputStyle),e);g.onfocus=g.onblur=function(a){a=a||window.event||{};g.hasFocus=a.type==="focus";b.setInputValue(g)}; -g.onchange=function(){var a=g.value,d=Date.parse(a),e=c.xAxis[0].getExtremes();isNaN(d)&&(d=a.split("-"),d=Date.UTC(F(d[0]),F(d[1])-1,F(d[2])));if(!isNaN(d)&&(f&&d>=e.dataMin&&d<=b.rightBox.HCTime||!f&&d<=e.dataMax&&d>=b.leftBox.HCTime))c.xAxis[0].setExtremes(f?d:e.min,f?e.max:d,r,r,{trigger:"rangeSelectorInput"})};return g},render:function(a,b){var c=this,d=c.chart,e=d.renderer,f=d.container,g=d.options.rangeSelector,h=c.buttons,i=P.lang,j=c.div,j=d.options.chart.style,k=g.buttonTheme,l=g.inputEnabled!== -!1,m=k&&k.states,o=d.plotLeft,p;if(!c.rendered&&(c.zoomText=e.text(i.rangeSelectorZoom,o,d.plotTop-10).css(g.labelStyle).add(),p=o+c.zoomText.getBBox().width+5,n(c.buttonOptions,function(a,b){h[b]=e.button(a.text,p,d.plotTop-25,function(){c.clickButton(b,a);c.isActive=!0},k,m&&m.hover,m&&m.select).css({textAlign:"center"}).add();p+=h[b].width+(g.buttonSpacing||0);c.selected===b&&h[b].setState(2)}),l))c.divRelative=j=U("div",null,{position:"relative",height:0,fontFamily:j.fontFamily,fontSize:j.fontSize, -zIndex:1}),f.parentNode.insertBefore(j,f),c.divAbsolute=c.div=j=U("div",null,u({position:"absolute",top:d.plotTop-25+"px",right:d.chartWidth-d.plotLeft-d.plotWidth+"px"},g.inputBoxStyle),j),c.leftBox=c.drawInput("min"),c.rightBox=c.drawInput("max");l&&(c.setInputValue(c.leftBox,a),c.setInputValue(c.rightBox,b));c.rendered=!0},destroy:function(){var a=this.leftBox,b=this.rightBox,c=this.boxSpanElements,d=this.divRelative,e=this.divAbsolute,f=this.zoomText;O(this.chart.container,qb,this.mouseDownHandler); -n([this.buttons],function(a){ta(a)});if(f)this.zoomText=f.destroy();if(a)a.onfocus=a.onblur=a.onchange=null;if(b)b.onfocus=b.onblur=b.onchange=null;n([a,b,c.min,c.max,e,d],function(a){Ra(a)});this.leftBox=this.rightBox=this.boxSpanElements=this.div=this.divAbsolute=this.divRelative=null}};Highcharts.RangeSelector=Qb;$a.prototype.callbacks.push(function(a){function b(){f=a.xAxis[0].getExtremes();g.render(x(f.min,f.dataMin),K(f.max,f.dataMax))}function c(){f=a.xAxis[0].getExtremes();h.render(f.min, -f.max)}function d(a){g.render(a.min,a.max)}function e(a){h.render(a.min,a.max)}var f,g=a.scroller,h=a.rangeSelector;g&&(D(a.xAxis[0],"afterSetExtremes",d),D(a,"resize",b),b());h&&(D(a.xAxis[0],"afterSetExtremes",e),D(a,"resize",c),c());D(a,"destroy",function(){g&&(O(a,"resize",b),O(a.xAxis[0],"afterSetExtremes",d));h&&(O(a,"resize",c),O(a.xAxis[0],"afterSetExtremes",e))})});Highcharts.StockChart=function(a,b){var c=a.series,d,e={marker:{enabled:!1,states:{hover:{radius:5}}},shadow:!1,states:{hover:{lineWidth:2}}}, -f={shadow:!1,borderWidth:0};a.xAxis=Ja(la(a.xAxis||{}),function(a){return w({minPadding:0,maxPadding:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},a,{type:"datetime",categories:null})});a.yAxis=Ja(la(a.yAxis||{}),function(a){d=a.opposite;return w({labels:{align:d?"right":"left",x:d?-2:2,y:-2},showLastLabel:!1,title:{text:null}},a)});a.series=null;a=w({chart:{panning:!0},navigator:{enabled:!0},scrollbar:{enabled:!0},rangeSelector:{enabled:!0},title:{text:null},tooltip:{shared:!0, -crosshairs:!0},legend:{enabled:!1},plotOptions:{line:e,spline:e,area:e,areaspline:e,arearange:e,areasplinerange:e,column:f,columnrange:f,candlestick:f,ohlc:f}},a,{_stock:!0,chart:{inverted:!1}});a.series=c;return new $a(a,b)};var jc=T.init,kc=T.processData,lc=xa.prototype.tooltipFormatter;T.init=function(){jc.apply(this,arguments);var a=this.options.compare;if(a)this.modifyValue=function(b,c){var d=this.compareValue,b=a==="value"?b-d:b=100*(b/d)-100;if(c)c.change=b;return b}};T.processData=function(){kc.apply(this, -arguments);if(this.options.compare)for(var a=0,b=this.processedXData,c=this.processedYData,d=c.length,e=this.xAxis.getExtremes().min;a=e){this.compareValue=c[a];break}};xa.prototype.tooltipFormatter=function(a){a=a.replace("{point.change}",(this.change>0?"+":"")+Oa(this.change,this.series.tooltipOptions.changeDecimals||2));return lc.apply(this,[a])};(function(){var a=T.init,b=T.getSegments;T.init=function(){var b,d;a.apply(this,arguments);b=this.chart;(d=this.xAxis)&& -d.options.ordinal&&D(this,"updatedData",function(){delete d.ordinalIndex});if(d&&d.options.ordinal&&!d.hasOrdinalExtension){d.hasOrdinalExtension=!0;d.beforeSetTickPositions=function(){var a,b=[],c=!1,e,j=this.getExtremes(),k=j.min,j=j.max,l;if(this.options.ordinal){n(this.series,function(c,d){if(c.visible!==!1&&c.takeOrdinalPosition!==!1&&(b=b.concat(c.processedXData),a=b.length,d&&a)){b.sort(function(a,b){return a-b});for(d=a-1;d--;)b[d]===b[d+1]&&b.splice(d,1)}});a=b.length;if(a>2){e=b[1]-b[0]; -for(l=a-1;l--&&!c;)b[l+1]-b[l]!==e&&(c=!0)}c?(this.ordinalPositions=b,c=d.val2lin(k,!0),e=d.val2lin(j,!0),this.ordinalSlope=j=(j-k)/(e-c),this.ordinalOffset=k-c*j):this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=r}};d.val2lin=function(a,b){var c=this.ordinalPositions;if(c){var d=c.length,e,k;for(e=d;e--;)if(c[e]===a){k=e;break}for(e=d-1;e--;)if(a>c[e]||e===0){c=(a-c[e])/(c[e+1]-c[e]);k=e+c;break}return b?k:this.ordinalSlope*(k||0)+this.ordinalOffset}else return a};d.lin2val=function(a, -b){var c=this.ordinalPositions;if(c){var d=this.ordinalSlope,e=this.ordinalOffset,k=c.length-1,l,m;if(b)a<0?a=c[0]:a>k?a=c[k]:(k=Y(a),m=a-k);else for(;k--;)if(l=d*k+e,a>=l){d=d*(k+1)+e;m=(a-l)/(d-l);break}return m!==r&&c[k]!==r?c[k]+(m?m*(c[k+1]-c[k]):0):a}else return a};d.getExtendedPositions=function(){var a=d.series[0].currentDataGrouping,e=d.ordinalIndex,h=a?a.count+a.unitName:"raw",i=d.getExtremes(),j,k;if(!e)e=d.ordinalIndex={};if(!e[h])j={series:[],getExtremes:function(){return{min:i.dataMin, -max:i.dataMax}},options:{ordinal:!0}},n(d.series,function(d){k={xAxis:j,xData:d.xData,chart:b,destroyGroupedData:lb};k.options={dataGrouping:a?{enabled:!0,forced:!0,approximation:"open",units:[[a.unitName,[a.count]]]}:{enabled:!1}};d.processData.apply(k);j.series.push(k)}),d.beforeSetTickPositions.apply(j),e[h]=j.ordinalPositions;return e[h]};d.getGroupIntervalFactor=function(a,b,c){for(var d=0,e=c.length,k=[];dc;j[n]k*5||x)p=db(a,j[m],j[n],e),u=u.concat(p),m=n+1;if(x)break}a=p.info;if(l&&a.unitRange<=C[sa]){n=u.length-1;for(m=1;mc?a-1:a;for(A=void 0;l--;)m=n[l],c=A-m,A&&c1)o&&n(o,function(a){a.setState()}),i<0?(o=r,r=d.ordinalPositions?d:r):o=d.ordinalPositions?d:r,q=r.ordinalPositions,k>q[q.length-1]&&q.push(k),o=p.apply(o,[t.apply(o,[l,!0])+i,!0]),i=p.apply(r,[t.apply(r,[m,!0])+i,!0]),o>K(j.dataMin,l)&&ia.xAxis.closestPointRange*e&&d.splice(g+1,0,b.splice(h+1,b.length-h))})}})();u(Highcharts,{Axis:Sa,CanVGRenderer:ob,Chart:$a,Color:wa,Legend:Ab,MouseTracker:zb,Point:xa,Tick:Za,Tooltip:yb,Renderer:Ua,Series:W,SVGRenderer:pa,VMLRenderer:Ka,dateFormat:va,pathAnim:Db,getOptions:function(){return P},hasBidiBug:$b,numberFormat:Oa, -seriesTypes:R,setOptions:function(a){P=w(P,a);Nb();return P},addEvent:D,removeEvent:O,createElement:U,discardElement:Ra,css:L,each:n,extend:u,map:Ja,merge:w,pick:p,splat:la,extendClass:aa,pInt:F,wrap:rb,svg:ia,canvas:ca,vml:!ia&&!ca,product:"Highstock",version:"1.2.4"})})(); +(function(K,a){"object"===typeof module&&module.exports?module.exports=K.document?a(K):a:K.Highcharts=a(K)})("undefined"!==typeof window?window:this,function(K){K=function(){var a=window,D=a.document,C=a.navigator&&a.navigator.userAgent||"",G=D&&D.createElementNS&&!!D.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,H=/(edge|msie|trident)/i.test(C)&&!window.opera,v=!G,l=/Firefox/.test(C),r=l&&4>parseInt(C.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highstock", +version:"5.0.10",deg2rad:2*Math.PI/360,doc:D,hasBidiBug:r,hasTouch:D&&void 0!==D.documentElement.ontouchstart,isMS:H,isWebKit:/AppleWebKit/.test(C),isFirefox:l,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(C),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:G,vml:v,win:a,charts:[],marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){}}}();(function(a){var D=[],C=a.charts,G=a.doc,H=a.win;a.error=function(v,l){v=a.isNumber(v)?"Highcharts error #"+ +v+": www.highcharts.com/errors/"+v:v;if(l)throw Error(v);H.console&&console.log(v)};a.Fx=function(a,l,r){this.options=l;this.elem=a;this.prop=r};a.Fx.prototype={dSetter:function(){var a=this.paths[0],l=this.paths[1],r=[],w=this.now,q=a.length,n;if(1===w)r=this.toD;else if(q===l.length&&1>w)for(;q--;)n=parseFloat(a[q]),r[q]=isNaN(n)?a[q]:w*parseFloat(l[q]-n)+n;else r=l;this.elem.attr("d",r,null,!0)},update:function(){var a=this.elem,l=this.prop,r=this.now,w=this.options.step;if(this[l+"Setter"])this[l+ +"Setter"]();else a.attr?a.element&&a.attr(l,r,null,!0):a.style[l]=r+this.unit;w&&w.call(a,r,this)},run:function(a,l,r){var v=this,q=function(a){return q.stopped?!1:v.step(a)},n;this.startTime=+new Date;this.start=a;this.end=l;this.unit=r;this.now=this.start;this.pos=0;q.elem=this.elem;q.prop=this.prop;q()&&1===D.push(q)&&(q.timerId=setInterval(function(){for(n=0;n=n+this.startTime){this.now=this.end;this.pos=1;this.update();a=f[this.prop]=!0;for(c in f)!0!==f[c]&&(a=!1);a&&q&&q.call(v);v=!1}else this.pos=w.easing((l-this.startTime)/n),this.now=this.start+(this.end-this.start)*this.pos,this.update(),v=!0;return v},initPath:function(v,l,r){function w(a){var b,k;for(B=a.length;B--;)b="M"===a[B]||"L"===a[B],k=/[a-zA-Z]/.test(a[B+3]),b&&k&&a.splice(B+1,0,a[B+1],a[B+2],a[B+1],a[B+ +2])}function q(a,d){for(;a.lengthf?"AM":"PM",P:12>f?"am":"pm",S:p(q.getSeconds()),L:p(Math.round(l% +1E3),3)},a.dateFormats);for(n in w)for(;-1!==v.indexOf("%"+n);)v=v.replace("%"+n,"function"===typeof w[n]?w[n](l):w[n]);return r?v.substr(0,1).toUpperCase()+v.substr(1):v};a.formatSingle=function(v,l){var r=/\.([0-9])/,w=a.defaultOptions.lang;/f$/.test(v)?(r=(r=v.match(r))?r[1]:-1,null!==l&&(l=a.numberFormat(l,r,w.decimalPoint,-1=r&&(l=[1/r]))); +for(w=0;w=v||!q&&n<=(l[w]+(l[w+1]||l[w]))/2);w++);return f=a.correctFloat(f*r,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,l){var r=a.length,w,q;for(q=0;qr&&(r=a[l]);return r};a.destroyObjectProperties= +function(a,l){for(var r in a)a[r]&&a[r]!==l&&a[r].destroy&&a[r].destroy(),delete a[r]};a.discardElement=function(v){var l=a.garbageBin;l||(l=a.createElement("div"));v&&l.appendChild(v);l.innerHTML=""};a.correctFloat=function(a,l){return parseFloat(a.toPrecision(l||14))};a.setAnimation=function(v,l){l.renderer.globalAnimation=a.pick(v,l.options.chart.animation,!0)};a.animObject=function(v){return a.isObject(v)?a.merge(v):{duration:v?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5, +day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(v,l,r,w){v=+v||0;l=+l;var q=a.defaultOptions.lang,n=(v.toString().split(".")[1]||"").length,f,c;-1===l?l=Math.min(n,20):a.isNumber(l)||(l=2);c=(Math.abs(v)+Math.pow(10,-Math.max(l,n)-1)).toFixed(l);n=String(a.pInt(c));f=3v?"-":"")+(f?n.substr(0,f)+w:"");v+=n.substr(f).replace(/(\d{3})(?=\d)/g,"$1"+w);l&&(v+=r+c.slice(-l));return v};Math.easeInOutSine= +function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(v,l){return"width"===l?Math.min(v.offsetWidth,v.scrollWidth)-a.getStyle(v,"padding-left")-a.getStyle(v,"padding-right"):"height"===l?Math.min(v.offsetHeight,v.scrollHeight)-a.getStyle(v,"padding-top")-a.getStyle(v,"padding-bottom"):(v=H.getComputedStyle(v,void 0))&&a.pInt(v.getPropertyValue(l))};a.inArray=function(a,l){return l.indexOf?l.indexOf(a):[].indexOf.call(l,a)};a.grep=function(a,l){return[].filter.call(a,l)};a.find=function(a, +l){return[].find.call(a,l)};a.map=function(a,l){for(var r=[],w=0,q=a.length;w>16,(l&65280)>>8,l&255,1]:4===r&&(w=[(l&3840)>>4|(l&3840)>>8,(l&240)>>4|l&240,(l&15)<<4|l&15,1])),!w)for(q=this.parsers.length;q--&&!w;)n=this.parsers[q],(r=n.regex.exec(l))&&(w=n.parse(r)); +this.rgba=w||[]},get:function(a){var l=this.input,w=this.rgba,q;this.stops?(q=H(l),q.stops=[].concat(q.stops),D(this.stops,function(n,f){q.stops[f]=[q.stops[f][0],n.get(a)]})):q=w&&C(w[0])?"rgb"===a||!a&&1===w[3]?"rgb("+w[0]+","+w[1]+","+w[2]+")":"a"===a?w[3]:"rgba("+w.join(",")+")":l;return q},brighten:function(a){var l,w=this.rgba;if(this.stops)D(this.stops,function(q){q.brighten(a)});else if(C(a)&&0!==a)for(l=0;3>l;l++)w[l]+=v(255*a),0>w[l]&&(w[l]=0),255A.width)A={width:0,height:0}}else A=this.htmlGetBBox();k.isSVG&&(a=A.width,k=A.height,c&&"11px"===c.fontSize&&17===Math.round(k)&&(A.height=k=14), +g&&(A.width=Math.abs(k*Math.sin(d))+Math.abs(a*Math.cos(d)),A.height=Math.abs(k*Math.cos(d))+Math.abs(a*Math.sin(d))));if(p&&0]*>/g,"")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,g,b){"string"===typeof a?b.setAttribute(g, +a):a&&this.colorGradient(a,g,b)},visibilitySetter:function(a,g,b){"inherit"===a?b.removeAttribute(g):b.setAttribute(g,a)},zIndexSetter:function(a,g){var A=this.renderer,b=this.parentGroup,k=(b||A).element||A.box,d,m=this.element,c;d=this.added;var h;n(a)&&(m.zIndex=a,a=+a,this[g]===a&&(d=!1),this[g]=a);if(d){(a=this.zIndex)&&b&&(b.handleZ=!0);g=k.childNodes;for(h=0;ha||!n(a)&&n(d)||0>a&&!n(d)&&k!==A.box)&&(k.insertBefore(m,b),c=!0);c||k.appendChild(m)}return c}, +_defaultSetter:function(a,g,b){b.setAttribute(g,a)}};D.prototype.yGetter=D.prototype.xGetter;D.prototype.translateXSetter=D.prototype.translateYSetter=D.prototype.rotationSetter=D.prototype.verticalAlignSetter=D.prototype.scaleXSetter=D.prototype.scaleYSetter=function(a,g){this[g]=a;this.doTransform=!0};D.prototype["stroke-widthSetter"]=D.prototype.strokeSetter=function(a,g,b){this[g]=a;this.stroke&&this["stroke-width"]?(D.prototype.fillSetter.call(this,this.stroke,"stroke",b),b.setAttribute("stroke-width", +this["stroke-width"]),this.hasStroke=!0):"stroke-width"===g&&0===a&&this.hasStroke&&(b.removeAttribute("stroke"),this.hasStroke=!1)};C=a.SVGRenderer=function(){this.init.apply(this,arguments)};C.prototype={Element:D,SVG_NS:O,init:function(a,g,b,d,c,h){var A;d=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"}).css(this.getStyle(d));A=d.element;a.appendChild(A);-1===a.innerHTML.indexOf("xmlns")&&v(A,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=A;this.boxWrapper=d;this.alignedObjects= +[];this.url=(k||m)&&e.getElementsByTagName("base").length?P.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(e.createTextNode("Created with Highstock 5.0.10"));this.defs=this.createElement("defs").add();this.allowHTML=h;this.forExport=c;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(g,b,!1);var y;k&&a.getBoundingClientRect&&(g=function(){w(a,{left:0,top:0}); +y=a.getBoundingClientRect();w(a,{left:Math.ceil(y.left)-y.left+"px",top:Math.ceil(y.top)-y.top+"px"})},g(),this.unSubPixelFix=G(P,"resize",g))},getStyle:function(a){return this.style=b({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},setStyle:function(a){this.boxWrapper.css(this.getStyle(a))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();c(this.gradients|| +{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var g=new this.Element;g.init(this,a);return g},draw:J,getRadialAttr:function(a,g){return{cx:a[0]-a[2]/2+g.cx*a[2],cy:a[1]-a[2]/2+g.cy*a[2],r:g.r*a[2]}},getSpanWidth:function(a,g){var b=a.getBBox(!0).width;!R&&this.forExport&&(b=this.measureSpanWidth(g.firstChild.data,a.styles));return b},applyEllipsis:function(a,g,b,d){var k=this.getSpanWidth(a,g), +A=k>d,k=b,m,c=0,h=b.length,y=function(a){g.removeChild(g.firstChild);a&&g.appendChild(e.createTextNode(a))};if(A){for(;c<=h;)m=Math.ceil((c+h)/2),k=b.substring(0,m)+"\u2026",y(k),k=this.getSpanWidth(a,g),c===h?c=h+1:k>d?h=m-1:c=m;0===h&&y("")}return A},buildText:function(a){var g=a.element,b=this,k=b.forExport,d=E(a.textStr,"").toString(),m=-1!==d.indexOf("\x3c"),A=g.childNodes,c,y,L,F,p=v(g,"x"),u=a.styles,x=a.textWidth,t=u&&u.lineHeight,B=u&&u.textOutline,f=u&&"ellipsis"===u.textOverflow,J=u&&"nowrap"=== +u.whiteSpace,q=u&&u.fontSize,n,l,r=A.length,u=x&&!a.added&&this.box,M=function(a){var d;d=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:q||b.style.fontSize||12;return t?I(t):b.fontMetrics(d,a.getAttribute("style")?a:g).h};n=[d,f,J,t,B,q,x].join();if(n!==a.textCache){for(a.textCache=n;r--;)g.removeChild(A[r]);m||B||f||x||-1!==d.indexOf(" ")?(c=/<.*class="([^"]+)".*>/,y=/<.*style="([^"]+)".*>/,L=/<.*href="(http[^"]+)".*>/,u&&u.appendChild(g),d=m?d.replace(/<(b|strong)>/g,'\x3cspan style\x3d"font-weight:bold"\x3e').replace(/<(i|em)>/g, +'\x3cspan style\x3d"font-style:italic"\x3e').replace(/
/g,"\x3c/span\x3e").split(//g):[d],d=h(d,function(a){return""!==a}),z(d,function(d,m){var A,h=0;d=d.replace(/^\s+|\s+$/g,"").replace(//g,"\x3c/span\x3e|||");A=d.split("|||");z(A,function(d){if(""!==d||1===A.length){var E={},u=e.createElementNS(b.SVG_NS,"tspan"),t,I;c.test(d)&&(t=d.match(c)[1],v(u,"class",t));y.test(d)&&(I=d.match(y)[1].replace(/(;| |^)color([ :])/, +"$1fill$2"),v(u,"style",I));L.test(d)&&!k&&(v(u,"onclick",'location.href\x3d"'+d.match(L)[1]+'"'),w(u,{cursor:"pointer"}));d=(d.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"\x3c").replace(/>/g,"\x3e");if(" "!==d){u.appendChild(e.createTextNode(d));h?E.dx=0:m&&null!==p&&(E.x=p);v(u,E);g.appendChild(u);!h&&l&&(!R&&k&&w(u,{display:"block"}),v(u,"dy",M(u)));if(x){E=d.replace(/([^\^])-/g,"$1- ").split(" ");t=1x,void 0===F&&(F=d),d&&1!==E.length?(u.removeChild(u.firstChild),z.unshift(E.pop())):(E=z,z=[],E.length&&!J&&(u=e.createElementNS(O,"tspan"),v(u,{dy:q,x:p}),I&&v(u,"style",I),g.appendChild(u)),B>x&&(x=B)),E.length&&u.appendChild(e.createTextNode(E.join(" ").replace(/- /g,"-")));a.rotation=n}h++}}});l=l||g.childNodes.length}),F&&a.attr("title",a.textStr),u&&u.removeChild(g),B&&a.applyTextOutline&&a.applyTextOutline(B)):g.appendChild(e.createTextNode(d.replace(/</g, +"\x3c").replace(/>/g,"\x3e")))}},getContrast:function(a){a=r(a).rgba;return 510b?k>g+c&&kh?k>g+c&&kd&&h>a+c&&hk&&h>a+c&&ha?a+3:Math.round(1.2*a);return{h:g,b:Math.round(.8*g),f:a}},rotCorr:function(a,g,b){var d=a;g&&b&&(d=Math.max(d*Math.cos(g*f),4));return{x:-a/3*Math.sin(g*f),y:d}},label:function(d,k,m,c,h,L,E,u,F){var A=this,p=A.g("button"!==F&&"label"),x=p.text=A.text("",0,0,E).attr({zIndex:1}),t,e,I=0,B=3, +f=0,J,R,O,q,l,w={},r,M,Q=/^url\((.*?)\)$/.test(c),v=Q,P,S,N,T;F&&p.addClass("highcharts-"+F);v=Q;P=function(){return(r||0)%2/2};S=function(){var a=x.element.style,g={};e=(void 0===J||void 0===R||l)&&n(x.textStr)&&x.getBBox();p.width=(J||e.width||0)+2*B+f;p.height=(R||e.height||0)+2*B;M=B+A.fontMetrics(a&&a.fontSize,x).b;v&&(t||(p.box=t=A.symbols[c]||Q?A.symbol(c):A.rect(),t.addClass(("button"===F?"":"highcharts-label-box")+(F?" highcharts-"+F+"-box":"")),t.add(p),a=P(),g.x=a,g.y=(u?-M:0)+a),g.width= +Math.round(p.width),g.height=Math.round(p.height),t.attr(b(g,w)),w={})};N=function(){var a=f+B,g;g=u?0:M;n(J)&&e&&("center"===l||"right"===l)&&(a+={center:.5,right:1}[l]*(J-e.width));if(a!==x.x||g!==x.y)x.attr("x",a),void 0!==g&&x.attr("y",g);x.x=a;x.y=g};T=function(a,g){t?t.attr(a,g):w[a]=g};p.onAdd=function(){x.add(p);p.attr({text:d||0===d?d:"",x:k,y:m});t&&n(h)&&p.attr({anchorX:h,anchorY:L})};p.widthSetter=function(g){J=a.isNumber(g)?g:null};p.heightSetter=function(a){R=a};p["text-alignSetter"]= +function(a){l=a};p.paddingSetter=function(a){n(a)&&a!==B&&(B=p.padding=a,N())};p.paddingLeftSetter=function(a){n(a)&&a!==f&&(f=a,N())};p.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==I&&(I=a,e&&p.attr({x:O}))};p.textSetter=function(a){void 0!==a&&x.textSetter(a);S();N()};p["stroke-widthSetter"]=function(a,g){a&&(v=!0);r=this["stroke-width"]=a;T(g,a)};p.strokeSetter=p.fillSetter=p.rSetter=function(a,g){"fill"===g&&a&&(v=!0);T(g,a)};p.anchorXSetter=function(a,g){h=a;T(g,Math.round(a)- +P()-O)};p.anchorYSetter=function(a,g){L=a;T(g,a-q)};p.xSetter=function(a){p.x=a;I&&(a-=I*((J||e.width)+2*B));O=Math.round(a);p.attr("translateX",O)};p.ySetter=function(a){q=p.y=Math.round(a);p.attr("translateY",q)};var C=p.css;return b(p,{css:function(a){if(a){var g={};a=y(a);z(p.textProps,function(b){void 0!==a[b]&&(g[b]=a[b],delete a[b])});x.css(g)}return C.call(p,a)},getBBox:function(){return{width:e.width+2*B,height:e.height+2*B,x:e.x-B,y:e.y-B}},shadow:function(a){a&&(S(),t&&t.shadow(a));return p}, +destroy:function(){g(p.element,"mouseenter");g(p.element,"mouseleave");x&&(x=x.destroy());t&&(t=t.destroy());D.prototype.destroy.call(p);p=A=S=N=T=null}})}};a.Renderer=C})(K);(function(a){var D=a.attr,C=a.createElement,G=a.css,H=a.defined,v=a.each,l=a.extend,r=a.isFirefox,w=a.isMS,q=a.isWebKit,n=a.pInt,f=a.SVGRenderer,c=a.win,e=a.wrap;l(a.SVGElement.prototype,{htmlCss:function(a){var b=this.element;if(b=a&&"SPAN"===b.tagName&&a.width)delete a.width,this.textWidth=b,this.updateTransform();a&&"ellipsis"=== +a.textOverflow&&(a.whiteSpace="nowrap",a.overflow="hidden");this.styles=l(this.styles,a);G(this.element,a);return this},htmlGetBBox:function(){var a=this.element;"text"===a.nodeName&&(a.style.position="absolute");return{x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,c=this.translateX||0,h=this.translateY||0,e=this.x||0,p=this.y||0,x=this.textAlign||"left",k={left:0,center:.5,right:1}[x],F=this.styles; +G(b,{marginLeft:c,marginTop:h});this.shadows&&v(this.shadows,function(a){G(a,{marginLeft:c+1,marginTop:h+1})});this.inverted&&v(b.childNodes,function(d){a.invertChild(d,b)});if("SPAN"===b.tagName){var d=this.rotation,u=n(this.textWidth),m=F&&F.whiteSpace,y=[d,x,b.innerHTML,this.textWidth,this.textAlign].join();y!==this.cTT&&(F=a.fontMetrics(b.style.fontSize).b,H(d)&&this.setSpanRotation(d,k,F),G(b,{width:"",whiteSpace:m||"nowrap"}),b.offsetWidth>u&&/[ \-]/.test(b.textContent||b.innerText)&&G(b,{width:u+ +"px",display:"block",whiteSpace:m||"normal"}),this.getSpanCorrection(b.offsetWidth,F,k,d,x));G(b,{left:e+(this.xCorr||0)+"px",top:p+(this.yCorr||0)+"px"});q&&(F=b.offsetHeight);this.cTT=y}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,t){var h={},e=w?"-ms-transform":q?"-webkit-transform":r?"MozTransform":c.opera?"-o-transform":"";h[e]=h.transform="rotate("+a+"deg)";h[e+(r?"Origin":"-origin")]=h.transformOrigin=100*b+"% "+t+"px";G(this.element,h)},getSpanCorrection:function(a,b,c){this.xCorr= +-a*c;this.yCorr=-b}});l(f.prototype,{html:function(a,b,c){var h=this.createElement("span"),t=h.element,p=h.renderer,x=p.isSVG,k=function(a,b){v(["opacity","visibility"],function(d){e(a,d+"Setter",function(a,d,k,c){a.call(this,d,k,c);b[k]=d})})};h.textSetter=function(a){a!==t.innerHTML&&delete this.bBox;t.innerHTML=this.textStr=a;h.htmlUpdateTransform()};x&&k(h,h.element.style);h.xSetter=h.ySetter=h.alignSetter=h.rotationSetter=function(a,b){"align"===b&&(b="textAlign");h[b]=a;h.htmlUpdateTransform()}; +h.attr({text:a,x:Math.round(b),y:Math.round(c)}).css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize,position:"absolute"});t.style.whiteSpace="nowrap";h.css=h.htmlCss;x&&(h.add=function(a){var b,c=p.box.parentNode,m=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)m.push(a),a=a.parentGroup;v(m.reverse(),function(a){var d,y=D(a.element,"class");y&&(y={className:y});b=a.div=a.div||C("div",y,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px",display:a.display, +opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},b||c);d=b.style;l(a,{on:function(){h.on.apply({element:m[0].div},arguments);return a},translateXSetter:function(b,g){d.left=b+"px";a[g]=b;a.doTransform=!0},translateYSetter:function(b,g){d.top=b+"px";a[g]=b;a.doTransform=!0}});k(a,d)})}}else b=c;b.appendChild(t);h.added=!0;h.alignOnAdd&&h.htmlUpdateTransform();return h});return h}})})(K);(function(a){var D,C,G=a.createElement,H=a.css,v=a.defined,l=a.deg2rad,r=a.discardElement,w=a.doc, +q=a.each,n=a.erase,f=a.extend;D=a.extendClass;var c=a.isArray,e=a.isNumber,z=a.isObject,b=a.merge;C=a.noop;var t=a.pick,h=a.pInt,B=a.SVGElement,p=a.SVGRenderer,x=a.win;a.svg||(C={docMode8:w&&8===w.documentMode,init:function(a,b){var d=["\x3c",b,' filled\x3d"f" stroked\x3d"f"'],k=["position: ","absolute",";"],m="div"===b;("shape"===b||m)&&k.push("left:0;top:0;width:1px;height:1px;");k.push("visibility: ",m?"hidden":"visible");d.push(' style\x3d"',k.join(""),'"/\x3e');b&&(d=m||"span"===b||"img"===b? +d.join(""):a.prepVML(d),this.element=G(d));this.renderer=a},add:function(a){var b=this.renderer,d=this.element,k=b.box,m=a&&a.inverted,k=a?a.element||a:k;a&&(this.parentGroup=a);m&&b.invertChild(d,k);k.appendChild(d);this.added=!0;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();if(this.onAdd)this.onAdd();this.className&&this.attr("class",this.className);return this},updateTransform:B.prototype.htmlUpdateTransform,setSpanRotation:function(){var a=this.rotation,b=Math.cos(a*l),d= +Math.sin(a*l);H(this.element,{filter:a?["progid:DXImageTransform.Microsoft.Matrix(M11\x3d",b,", M12\x3d",-d,", M21\x3d",d,", M22\x3d",b,", sizingMethod\x3d'auto expand')"].join(""):"none"})},getSpanCorrection:function(a,b,d,c,m){var k=c?Math.cos(c*l):1,h=c?Math.sin(c*l):0,p=t(this.elemHeight,this.element.offsetHeight),u;this.xCorr=0>k&&-a;this.yCorr=0>h&&-p;u=0>k*h;this.xCorr+=h*b*(u?1-d:d);this.yCorr-=k*b*(c?u?d:1-d:1);m&&"left"!==m&&(this.xCorr-=a*d*(0>k?-1:1),c&&(this.yCorr-=p*d*(0>h?-1:1)),H(this.element, +{textAlign:m}))},pathToVML:function(a){for(var b=a.length,d=[];b--;)e(a[b])?d[b]=Math.round(10*a[b])-5:"Z"===a[b]?d[b]="x":(d[b]=a[b],!a.isArc||"wa"!==a[b]&&"at"!==a[b]||(d[b+5]===d[b+7]&&(d[b+7]+=a[b+7]>a[b+5]?1:-1),d[b+6]===d[b+8]&&(d[b+8]+=a[b+8]>a[b+6]?1:-1)));return d.join(" ")||"x"},clip:function(a){var b=this,d;a?(d=a.members,n(d,b),d.push(b),b.destroyClip=function(){n(d,b)},a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),a={clip:b.docMode8?"inherit":"rect(auto)"});return b.css(a)},css:B.prototype.htmlCss, +safeRemoveChild:function(a){a.parentNode&&r(a)},destroy:function(){this.destroyClip&&this.destroyClip();return B.prototype.destroy.apply(this)},on:function(a,b){this.element["on"+a]=function(){var a=x.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,b){var d;a=a.split(/[ ,]/);d=a.length;if(9===d||11===d)a[d-4]=a[d-2]=h(a[d-2])-10*b;return a.join(" ")},shadow:function(a,b,d){var c=[],k,y=this.element,p=this.renderer,E,x=y.style,g,L=y.path,e,F,B,f;L&&"string"!==typeof L.value&&(L= +"x");F=L;if(a){B=t(a.width,3);f=(a.opacity||.15)/B;for(k=1;3>=k;k++)e=2*B+1-2*k,d&&(F=this.cutOffPath(L.value,e+.5)),g=['\x3cshape isShadow\x3d"true" strokeweight\x3d"',e,'" filled\x3d"false" path\x3d"',F,'" coordsize\x3d"10 10" style\x3d"',y.style.cssText,'" /\x3e'],E=G(p.prepVML(g),null,{left:h(x.left)+t(a.offsetX,1),top:h(x.top)+t(a.offsetY,1)}),d&&(E.cutOff=e+1),g=['\x3cstroke color\x3d"',a.color||"#000000",'" opacity\x3d"',f*k,'"/\x3e'],G(p.prepVML(g),null,null,E),b?b.element.appendChild(E): +y.parentNode.insertBefore(E,y),c.push(E);this.shadows=c}return this},updateShadows:C,setAttr:function(a,b){this.docMode8?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){(this.added?this.element:this).className=a},dashstyleSetter:function(a,b,d){(d.getElementsByTagName("stroke")[0]||G(this.renderer.prepVML(["\x3cstroke/\x3e"]),null,null,d))[b]=a||"solid";this[b]=a},dSetter:function(a,b,d){var c=this.shadows;a=a||[];this.d=a.join&&a.join(" ");d.path=a=this.pathToVML(a);if(c)for(d= +c.length;d--;)c[d].path=c[d].cutOff?this.cutOffPath(a,c[d].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,d){var c=d.nodeName;"SPAN"===c?d.style.color=a:"IMG"!==c&&(d.filled="none"!==a,this.setAttr("fillcolor",this.renderer.color(a,d,b,this)))},"fill-opacitySetter":function(a,b,d){G(this.renderer.prepVML(["\x3c",b.split("-")[0],' opacity\x3d"',a,'"/\x3e']),null,null,d)},opacitySetter:C,rotationSetter:function(a,b,d){d=d.style;this[b]=d[b]=a;d.left=-Math.round(Math.sin(a*l)+1)+"px";d.top=Math.round(Math.cos(a* +l))+"px"},strokeSetter:function(a,b,d){this.setAttr("strokecolor",this.renderer.color(a,d,b,this))},"stroke-widthSetter":function(a,b,d){d.stroked=!!a;this[b]=a;e(a)&&(a+="px");this.setAttr("strokeweight",a)},titleSetter:function(a,b){this.setAttr(b,a)},visibilitySetter:function(a,b,d){"inherit"===a&&(a="visible");this.shadows&&q(this.shadows,function(d){d.style[b]=a});"DIV"===d.nodeName&&(a="hidden"===a?"-999em":0,this.docMode8||(d.style[b]=a?"visible":"hidden"),b="top");d.style[b]=a},xSetter:function(a, +b,d){this[b]=a;"x"===b?b="left":"y"===b&&(b="top");this.updateClipping?(this[b]=a,this.updateClipping()):d.style[b]=a},zIndexSetter:function(a,b,d){d.style[b]=a}},C["stroke-opacitySetter"]=C["fill-opacitySetter"],a.VMLElement=C=D(B,C),C.prototype.ySetter=C.prototype.widthSetter=C.prototype.heightSetter=C.prototype.xSetter,C={Element:C,isIE8:-1n[0]&&b.push([1,n[1]]);q(b,function(g,b){p.test(g[1])?(k=a.color(g[1]),L=k.get("rgb"),u=k.get("a")):(L=g[1],u=1);l.push(100*g[0]+"% "+L);b?(A=u,F=L):(B=u,f=L)});if("fill"===d)if("gradient"===x)d=t.x1||t[0]||0,b=t.y1||t[1]||0,e=t.x2||t[2]||0,t=t.y2||t[3]||0,z='angle\x3d"'+(90-180*Math.atan((t-b)/(e-d))/Math.PI)+'"',w();else{var g=t.r,r=2*g,v=2*g,C=t.cx,D=t.cy,H=c.radialReference,K,g=function(){H&&(K=h.getBBox(),C+=(H[0]- +K.x)/K.width-.5,D+=(H[1]-K.y)/K.height-.5,r*=H[2]/K.width,v*=H[2]/K.height);z='src\x3d"'+a.getOptions().global.VMLRadialGradientURL+'" size\x3d"'+r+","+v+'" origin\x3d"0.5,0.5" position\x3d"'+C+","+D+'" color2\x3d"'+f+'" ';w()};h.added?g():h.onAdd=g;g=F}else g=L}else p.test(b)&&"IMG"!==c.tagName?(k=a.color(b),h[d+"-opacitySetter"](k.get("a"),d,c),g=k.get("rgb")):(g=c.getElementsByTagName(d),g.length&&(g[0].opacity=1,g[0].type="solid"),g=b);return g},prepVML:function(a){var b=this.isIE8;a=a.join(""); +b?(a=a.replace("/\x3e",' xmlns\x3d"urn:schemas-microsoft-com:vml" /\x3e'),a=-1===a.indexOf('style\x3d"')?a.replace("/\x3e",' style\x3d"display:inline-block;behavior:url(#default#VML);" /\x3e'):a.replace('style\x3d"','style\x3d"display:inline-block;behavior:url(#default#VML);')):a=a.replace("\x3c","\x3chcv:");return a},text:p.prototype.html,path:function(a){var b={coordsize:"10 10"};c(a)?b.d=a:z(a)&&f(b,a);return this.createElement("shape").attr(b)},circle:function(a,b,d){var c=this.symbol("circle"); +z(a)&&(d=a.r,b=a.y,a=a.x);c.isCircle=!0;c.r=d;return c.attr({x:a,y:b})},g:function(a){var b;a&&(b={className:"highcharts-"+a,"class":"highcharts-"+a});return this.createElement("div").attr(b)},image:function(a,b,d,c,m){var h=this.createElement("img").attr({src:a});1this.max&&n>this.max;c&&f?(a&&(c.flat=c.toString()===f.toString(),z=0),c.push(e&&f[4]===c[4]?f[4]+z:f[4],e||f[5]!==c[5]?f[5]:f[5]+z,e&&f[1]===c[1]?f[1]+z:f[1],e||f[2]!==c[2]?f[2]:f[2]+z)):c=null;return c},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(l,n){var f=(new a.PlotLineOrBand(this,l)).render(),c=this.userOptions;f&&(n&&(c[n]=c[n]||[],c[n].push(l)), +this.plotLinesAndBands.push(f));return f},removePlotBandOrLine:function(a){for(var n=this.plotLinesAndBands,f=this.options,c=this.userOptions,e=n.length;e--;)n[e].id===a&&n[e].destroy();v([f.plotLines||[],c.plotLines||[],f.plotBands||[],c.plotBands||[]],function(c){for(e=c.length;e--;)c[e].id===a&&l(c,c[e])})}}})(K);(function(a){var D=a.correctFloat,C=a.defined,G=a.destroyObjectProperties,H=a.isNumber,v=a.merge,l=a.pick,r=a.deg2rad;a.Tick=function(a,l,n,f){this.axis=a;this.pos=l;this.type=n||"";this.isNew= +!0;n||f||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,q=a.options,n=a.chart,f=a.categories,c=a.names,e=this.pos,z=q.labels,b=a.tickPositions,t=e===b[0],h=e===b[b.length-1],c=f?l(f[e],c[e],e):e,f=this.label,b=b.info,B;a.isDatetimeAxis&&b&&(B=q.dateTimeLabelFormats[b.higherRanks[e]||b.unitName]);this.isFirst=t;this.isLast=h;q=a.labelFormatter.call({axis:a,chart:n,isFirst:t,isLast:h,dateTimeLabelFormat:B,value:a.isLog?D(a.lin2log(c)):c});C(f)?f&&f.attr({text:q}):(this.labelLength= +(this.label=f=C(q)&&z.enabled?n.renderer.text(q,0,0,z.useHTML).css(v(z.style)).add(a.labelGroup):null)&&f.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var q=this.axis,n=a.x,f=q.chart.chartWidth,c=q.chart.spacing,e=l(q.labelLeft,Math.min(q.pos,c[3])),c=l(q.labelRight,Math.max(q.pos+q.len,f-c[1])),z=this.label,b=this.rotation,t={left:0,center:.5,right:1}[q.labelAlign],h=z.getBBox().width, +B=q.getSlotWidth(),p=B,x=1,k,F={};if(b)0>b&&n-t*hc&&(k=Math.round((f-n)/Math.cos(b*r)));else if(f=n+(1-t)*h,n-t*hc&&(p=c-a.x+p*t,x=-1),p=Math.min(B,p),pp||q.autoRotation&&(z.styles||{}).width)k=p;k&&(F.width=k,(q.options.labels.style||{}).textOverflow||(F.textOverflow="ellipsis"),z.css(F))},getPosition:function(a,l,n,f){var c=this.axis,e=c.chart,z=f&&e.oldChartHeight|| +e.chartHeight;return{x:a?c.translate(l+n,null,null,f)+c.transB:c.left+c.offset+(c.opposite?(f&&e.oldChartWidth||e.chartWidth)-c.right-c.left:0),y:a?z-c.bottom+c.offset-(c.opposite?c.height:0):z-c.translate(l+n,null,null,f)-c.transB}},getLabelPosition:function(a,l,n,f,c,e,z,b){var t=this.axis,h=t.transA,B=t.reversed,p=t.staggerLines,x=t.tickRotCorr||{x:0,y:0},k=c.y;C(k)||(k=0===t.side?n.rotation?-8:-n.getBBox().height:2===t.side?x.y+8:Math.cos(n.rotation*r)*(x.y-n.getBBox(!1,0).height/2));a=a+c.x+ +x.x-(e&&f?e*h*(B?-1:1):0);l=l+k-(e&&!f?e*h*(B?1:-1):0);p&&(n=z/(b||1)%p,t.opposite&&(n=p-n-1),l+=t.labelOffset/p*n);return{x:a,y:Math.round(l)}},getMarkPath:function(a,l,n,f,c,e){return e.crispLine(["M",a,l,"L",a+(c?0:-n),l+(c?n:0)],f)},renderGridLine:function(a,l,n){var f=this.axis,c=f.options,e=this.gridLine,z={},b=this.pos,t=this.type,h=f.tickmarkOffset,B=f.chart.renderer,p=t?t+"Grid":"grid",x=c[p+"LineWidth"],k=c[p+"LineColor"],c=c[p+"LineDashStyle"];e||(z.stroke=k,z["stroke-width"]=x,c&&(z.dashstyle= +c),t||(z.zIndex=1),a&&(z.opacity=0),this.gridLine=e=B.path().attr(z).addClass("highcharts-"+(t?t+"-":"")+"grid-line").add(f.gridGroup));if(!a&&e&&(a=f.getPlotLinePath(b+h,e.strokeWidth()*n,a,!0)))e[this.isNew?"attr":"animate"]({d:a,opacity:l})},renderMark:function(a,q,n){var f=this.axis,c=f.options,e=f.chart.renderer,z=this.type,b=z?z+"Tick":"tick",t=f.tickSize(b),h=this.mark,B=!h,p=a.x;a=a.y;var x=l(c[b+"Width"],!z&&f.isXAxis?1:0),c=c[b+"Color"];t&&(f.opposite&&(t[0]=-t[0]),B&&(this.mark=h=e.path().addClass("highcharts-"+ +(z?z+"-":"")+"tick").add(f.axisGroup),h.attr({stroke:c,"stroke-width":x})),h[B?"attr":"animate"]({d:this.getMarkPath(p,a,t[0],h.strokeWidth()*n,f.horiz,e),opacity:q}))},renderLabel:function(a,q,n,f){var c=this.axis,e=c.horiz,z=c.options,b=this.label,t=z.labels,h=t.step,B=c.tickmarkOffset,p=!0,x=a.x;a=a.y;b&&H(x)&&(b.xy=a=this.getLabelPosition(x,a,b,e,t,B,f,h),this.isFirst&&!this.isLast&&!l(z.showFirstLabel,1)||this.isLast&&!this.isFirst&&!l(z.showLastLabel,1)?p=!1:!e||c.isRadial||t.step||t.rotation|| +q||0===n||this.handleOverflow(a),h&&f%h&&(p=!1),p&&H(a.y)?(a.opacity=n,b[this.isNew?"attr":"animate"](a)):b.attr("y",-9999),this.isNew=!1)},render:function(a,q,n){var f=this.axis,c=f.horiz,e=this.getPosition(c,this.pos,f.tickmarkOffset,q),z=e.x,b=e.y,f=c&&z===f.pos+f.len||!c&&b===f.pos?-1:1;n=l(n,1);this.isActive=!0;this.renderGridLine(q,n,f);this.renderMark(e,n,f);this.renderLabel(e,q,n,a)},destroy:function(){G(this,this.axis)}}})(K);(function(a){var D=a.addEvent,C=a.animObject,G=a.arrayMax,H=a.arrayMin, +v=a.AxisPlotLineOrBandExtension,l=a.color,r=a.correctFloat,w=a.defaultOptions,q=a.defined,n=a.deg2rad,f=a.destroyObjectProperties,c=a.each,e=a.extend,z=a.fireEvent,b=a.format,t=a.getMagnitude,h=a.grep,B=a.inArray,p=a.isArray,x=a.isNumber,k=a.isString,F=a.merge,d=a.normalizeTickInterval,u=a.pick,m=a.PlotLineOrBand,y=a.removeEvent,J=a.splat,E=a.syncTimeout,I=a.Tick;a.Axis=function(){this.init.apply(this,arguments)};a.Axis.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S", +minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,labels:{enabled:!0,style:{color:"#666666",cursor:"default",fontSize:"11px"},x:0},minPadding:.01,maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999", +lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return a.numberFormat(this.total,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"#000000",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}}, +defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(a,b){var g=b.isX;this.chart=a;this.horiz=a.inverted?!g:g;this.isXAxis=g;this.coll=this.coll||(g?"xAxis":"yAxis");this.opposite=b.opposite;this.side=b.side||(this.horiz?this.opposite?0:2:this.opposite?1:3);this.setOptions(b);var d=this.options,c=d.type;this.labelFormatter=d.labels.formatter|| +this.defaultLabelFormatter;this.userOptions=b;this.minPixelPadding=0;this.reversed=d.reversed;this.visible=!1!==d.visible;this.zoomEnabled=!1!==d.zoomEnabled;this.hasNames="category"===c||!0===d.categories;this.categories=d.categories||this.hasNames;this.names=this.names||[];this.plotLinesAndBandsGroups={};this.isLog="logarithmic"===c;this.isDatetimeAxis="datetime"===c;this.positiveValuesOnly=this.isLog&&!this.allowNegativeLog;this.isLinked=q(d.linkedTo);this.ticks={};this.labelEdge=[];this.minorTicks= +{};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange=d.minRange||d.maxZoom;this.range=d.range;this.offset=d.offset||0;this.stacks={};this.oldStacks={};this.stacksTouched=0;this.min=this.max=null;this.crosshair=u(d.crosshair,J(a.options.tooltip.crosshairs)[g?0:1],!1);var m;b=this.options.events;-1===B(this,a.axes)&&(g?a.axes.splice(a.xAxis.length,0,this):a.axes.push(this),a[this.coll].push(this));this.series=this.series||[];a.inverted&&g&&void 0===this.reversed&& +(this.reversed=!0);this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(m in b)D(this,m,b[m]);this.lin2log=d.linearToLogConverter||this.lin2log;this.isLog&&(this.val2lin=this.log2lin,this.lin2val=this.lin2log)},setOptions:function(a){this.options=F(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],F(w[this.coll],a))},defaultLabelFormatter:function(){var g= +this.axis,d=this.value,c=g.categories,m=this.dateTimeLabelFormat,h=w.lang,k=h.numericSymbols,h=h.numericSymbolMagnitude||1E3,p=k&&k.length,y,E=g.options.labels.format,g=g.isLog?Math.abs(d):g.tickInterval;if(E)y=b(E,this);else if(c)y=d;else if(m)y=a.dateFormat(m,d);else if(p&&1E3<=g)for(;p--&&void 0===y;)c=Math.pow(h,p+1),g>=c&&0===10*d%c&&null!==k[p]&&0!==d&&(y=a.numberFormat(d/c,-1)+k[p]);void 0===y&&(y=1E4<=Math.abs(d)?a.numberFormat(d,-1):a.numberFormat(d,-1,void 0,""));return y},getSeriesExtremes:function(){var a= +this,b=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();c(a.series,function(g){if(g.visible||!b.options.chart.ignoreHiddenSeries){var d=g.options,c=d.threshold,m;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=c&&(c=null);if(a.isXAxis)d=g.xData,d.length&&(g=H(d),x(g)||g instanceof Date||(d=h(d,function(a){return x(a)}),g=H(d)),a.dataMin=Math.min(u(a.dataMin,d[0]),g),a.dataMax=Math.max(u(a.dataMax,d[0]),G(d)));else if(g.getExtremes(), +m=g.dataMax,g=g.dataMin,q(g)&&q(m)&&(a.dataMin=Math.min(u(a.dataMin,g),g),a.dataMax=Math.max(u(a.dataMax,m),m)),q(c)&&(a.threshold=c),!d.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})},translate:function(a,b,d,c,m,h){var g=this.linkedParent||this,k=1,p=0,y=c?g.oldTransA:g.transA;c=c?g.oldMin:g.min;var L=g.minPixelPadding;m=(g.isOrdinal||g.isBroken||g.isLog&&m)&&g.lin2val;y||(y=g.transA);d&&(k*=-1,p=g.len);g.reversed&&(k*=-1,p-=k*(g.sector||g.len));b?(a=(a*k+p-L)/y+c,m&&(a=g.lin2val(a))): +(m&&(a=g.val2lin(a)),a=k*(a-c)*y+p+k*L+(x(h)?y*h:0));return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,b,d,c,m){var g=this.chart,h=this.left,k=this.top,y,p,L=d&&g.oldChartHeight||g.chartHeight,E=d&&g.oldChartWidth||g.chartWidth,t;y=this.transB;var e=function(a,b,g){if(ag)c?a=Math.min(Math.max(b,a),g):t=!0;return a};m=u(m,this.translate(a, +null,null,d));a=d=Math.round(m+y);y=p=Math.round(L-m-y);x(m)?this.horiz?(y=k,p=L-this.bottom,a=d=e(a,h,h+this.width)):(a=h,d=E-this.right,y=p=e(y,k,k+this.height)):t=!0;return t&&!c?null:g.renderer.crispLine(["M",a,y,"L",d,p],b||1)},getLinearTickPositions:function(a,b,d){var g,c=r(Math.floor(b/a)*a);d=r(Math.ceil(d/a)*a);var m=[];if(this.single)return[b];for(b=c;b<=d;){m.push(b);b=r(b+a);if(b===g)break;g=b}return m},getMinorTickPositions:function(){var a=this,b=a.options,d=a.tickPositions,m=a.minorTickInterval, +h=[],k=a.pointRangePadding||0,y=a.min-k,k=a.max+k,p=k-y;if(p&&p/m= +this.minRange,k,y,p,E,x,t;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(q(a.min)||q(a.max)?this.minRange=null:(c(this.series,function(a){E=a.xData;for(y=x=a.xIncrement?1:E.length-1;0=l?(w=l,B=0):g.dataMax<=l&&(v=l,I=0)),g.min=u(C,w,g.dataMin),g.max=u(D,v,g.dataMax));k&&(g.positiveValuesOnly&&!b&&0>=Math.min(g.min,u(g.dataMin,g.min))&&a.error(10,1),g.min=r(y(g.min),15),g.max=r(y(g.max),15));g.range&&q(g.max)&&(g.userMin=g.min=C=Math.max(g.min,g.minFromRange()),g.userMax=D=g.max,g.range=null);z(g,"foundExtremes");g.beforePadding&&g.beforePadding();g.adjustForMinRange(); +!(J||g.axisPointRange||g.usePercentage||e)&&q(g.min)&&q(g.max)&&(y=g.max-g.min)&&(!q(C)&&B&&(g.min-=y*B),!q(D)&&I&&(g.max+=y*I));x(h.softMin)&&(g.min=Math.min(g.min,h.softMin));x(h.softMax)&&(g.max=Math.max(g.max,h.softMax));x(h.floor)&&(g.min=Math.max(g.min,h.floor));x(h.ceiling)&&(g.max=Math.min(g.max,h.ceiling));n&&q(g.dataMin)&&(l=l||0,!q(C)&&g.min=l?g.min=l:!q(D)&&g.max>l&&g.dataMax<=l&&(g.max=l));g.tickInterval=g.min===g.max||void 0===g.min||void 0===g.max?1:e&&!f&&F===g.linkedParent.options.tickPixelInterval? +f=g.linkedParent.tickInterval:u(f,this.tickAmount?(g.max-g.min)/Math.max(this.tickAmount-1,1):void 0,J?1:(g.max-g.min)*F/Math.max(g.len,F));E&&!b&&c(g.series,function(a){a.processData(g.min!==g.oldMin||g.max!==g.oldMax)});g.setAxisTranslation(!0);g.beforeSetTickPositions&&g.beforeSetTickPositions();g.postProcessTickInterval&&(g.tickInterval=g.postProcessTickInterval(g.tickInterval));g.pointRange&&!f&&(g.tickInterval=Math.max(g.pointRange,g.tickInterval));b=u(h.minTickInterval,g.isDatetimeAxis&&g.closestPointRange); +!f&&g.tickIntervalg.tickInterval&&1E3g.max)),!!this.tickAmount));this.tickAmount||(g.tickInterval=g.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,b,d=a.tickPositions,c=a.tickPositioner,m=a.startOnTick,h=a.endOnTick;this.tickmarkOffset=this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval= +"auto"===a.minorTickInterval&&this.tickInterval?this.tickInterval/5:a.minorTickInterval;this.single=this.min===this.max&&q(this.min)&&!this.tickAmount&&!1!==a.allowDecimals;this.tickPositions=b=d&&d.slice();!b&&(b=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,a.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval, +this.min,this.max),b.length>this.len&&(b=[b[0],b.pop()]),this.tickPositions=b,c&&(c=c.apply(this,[this.min,this.max])))&&(this.tickPositions=b=c);this.paddedTicks=b.slice(0);this.trimTicks(b,m,h);this.isLinked||(this.single&&(this.min-=.5,this.max+=.5),d||c||this.adjustTickAmount())},trimTicks:function(a,b,d){var g=a[0],c=a[a.length-1],m=this.minPointOffset||0;if(!this.isLinked){if(b&&-Infinity!==g)this.min=g;else for(;this.min-m>a[0];)a.shift();if(d)this.max=c;else for(;this.max+mb&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.tickInterval,b=this.tickPositions,d=this.tickAmount,c=this.finalTickAmt,m=b&&b.length;if(md&&(this.tickInterval*=2,this.setTickPositions());if(q(c)){for(a=d=b.length;a--;)(3===c&&1===a%2||2>=c&&0c&&(a=c)), +q(d)&&(bc&&(b=c))),this.displayBtn=void 0!==a||void 0!==b,this.setExtremes(a,b,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,d=b.offsets||[0,0,0,0],c=this.horiz,m=u(b.width,a.plotWidth-d[3]+d[1]),h=u(b.height,a.plotHeight-d[0]+d[2]),k=u(b.top,a.plotTop+d[0]),b=u(b.left,a.plotLeft+d[3]),d=/%$/;d.test(h)&&(h=Math.round(parseFloat(h)/100*a.plotHeight));d.test(k)&&(k=Math.round(parseFloat(k)/100*a.plotHeight+a.plotTop));this.left=b;this.top=k; +this.width=m;this.height=h;this.bottom=a.chartHeight-h-k;this.right=a.chartWidth-m-b;this.len=Math.max(c?m:h,0);this.pos=c?b:k},getExtremes:function(){var a=this.isLog,b=this.lin2log;return{min:a?r(b(this.min)):this.min,max:a?r(b(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,g=this.lin2log,d=b?g(this.min):this.min,b=b?g(this.max):this.max;null===a?a=d:d>a?a=d:ba?"right":195a?"left":"center"},tickSize:function(a){var b=this.options,g=b[a+"Length"],d=u(b[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(d&&g)return"inside"===b[a+"Position"]&&(g=-g),[g,d]},labelMetrics:function(){return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[0]&&this.ticks[0].label)},unsquish:function(){var a=this.options.labels,b=this.horiz, +d=this.tickInterval,m=d,h=this.len/(((this.categories?1:0)+this.max-this.min)/d),k,y=a.rotation,p=this.labelMetrics(),E,x=Number.MAX_VALUE,t,e=function(a){a/=h||1;a=1=a)E=e(Math.abs(p.h/Math.sin(n*a))),b=E+Math.abs(a/360),b(d.step||0)&&!d.rotation&&(this.staggerLines||1)*this.len/c||!b&&(m&&m-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,d=this.tickPositions,m=this.ticks,h=this.options.labels,y=this.horiz,p=this.getSlotWidth(),E=Math.max(1,Math.round(p-2*(h.padding||5))),t={},x=this.labelMetrics(),e=h.style&&h.style.textOverflow,u,I=0,B,f;k(h.rotation)|| +(t.rotation=h.rotation||0);c(d,function(a){(a=m[a])&&a.labelLength>I&&(I=a.labelLength)});this.maxLabelLength=I;if(this.autoRotation)I>E&&I>x.h?t.rotation=this.labelRotation:this.labelRotation=0;else if(p&&(u={width:E+"px"},!e))for(u.textOverflow="clip",B=d.length;!y&&B--;)if(f=d[B],E=m[f].label)E.styles&&"ellipsis"===E.styles.textOverflow?E.css({textOverflow:"clip"}):m[f].labelLength>p&&E.css({width:p+"px"}),E.getBBox().height>this.len/d.length-(x.h-x.f)&&(E.specCss={textOverflow:"ellipsis"});t.rotation&& +(u={width:(I>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+"px"},e||(u.textOverflow="ellipsis"));if(this.labelAlign=h.align||this.autoLabelAlign(this.labelRotation))t.align=this.labelAlign;c(d,function(a){var b=(a=m[a])&&a.label;b&&(b.attr(t),u&&b.css(F(u,b.specCss)),delete b.specCss,a.rotation=t.rotation)});this.tickRotCorr=b.rotCorr(x.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||q(this.min)&&q(this.max)&&!!this.tickPositions},addTitle:function(a){var b= +this.chart.renderer,g=this.horiz,d=this.opposite,c=this.options.title,m;this.axisTitle||((m=c.textAlign)||(m=(g?{low:"left",middle:"center",high:"right"}:{low:d?"right":"left",middle:"center",high:d?"left":"right"})[c.align]),this.axisTitle=b.text(c.text,0,0,c.useHTML).attr({zIndex:7,rotation:c.rotation||0,align:m}).addClass("highcharts-axis-title").css(c.style).add(this.axisGroup),this.axisTitle.isNew=!0);this.axisTitle[a?"show":"hide"](!0)},generateTick:function(a){var b=this.ticks;b[a]?b[a].addLabel(): +b[a]=new I(this,a)},getOffset:function(){var a=this,b=a.chart,d=b.renderer,m=a.options,h=a.tickPositions,k=a.ticks,y=a.horiz,p=a.side,E=b.inverted?[1,0,3,2][p]:p,t,x,e=0,I,B=0,f=m.title,z=m.labels,F=0,J=b.axisOffset,b=b.clipOffset,l=[-1,1,1,-1][p],n,r=m.className,w=a.axisParent,v=this.tickSize("tick");t=a.hasData();a.showAxis=x=t||u(m.showEmpty,!0);a.staggerLines=a.horiz&&z.staggerLines;a.axisGroup||(a.gridGroup=d.g("grid").attr({zIndex:m.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+ +"-grid "+(r||"")).add(w),a.axisGroup=d.g("axis").attr({zIndex:m.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(r||"")).add(w),a.labelGroup=d.g("axis-labels").attr({zIndex:z.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(r||"")).add(w));if(t||a.isLinked)c(h,function(b,g){a.generateTick(b,g)}),a.renderUnsquish(),!1===z.reserveSpace||0!==p&&2!==p&&{1:"left",3:"right"}[p]!==a.labelAlign&&"center"!==a.labelAlign||c(h,function(a){F=Math.max(k[a].getLabelSize(),F)}), +a.staggerLines&&(F*=a.staggerLines,a.labelOffset=F*(a.opposite?-1:1));else for(n in k)k[n].destroy(),delete k[n];f&&f.text&&!1!==f.enabled&&(a.addTitle(x),x&&(e=a.axisTitle.getBBox()[y?"height":"width"],I=f.offset,B=q(I)?0:u(f.margin,y?5:10)));a.renderLine();a.offset=l*u(m.offset,J[p]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};d=0===p?-a.labelMetrics().h:2===p?a.tickRotCorr.y:0;B=Math.abs(F)+B;F&&(B=B-d+l*(y?u(z.y,a.tickRotCorr.y+8*l):z.x));a.axisTitleMargin=u(I,B);J[p]=Math.max(J[p],a.axisTitleMargin+ +e+l*a.offset,B,t&&h.length&&v?v[0]+l*a.offset:0);m=m.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);b[E]=Math.max(b[E],m)},getLinePath:function(a){var b=this.chart,g=this.opposite,d=this.offset,c=this.horiz,m=this.left+(g?this.width:0)+d,d=b.chartHeight-this.bottom-(g?this.height:0)+d;g&&(a*=-1);return b.renderer.crispLine(["M",c?this.left:m,c?d:this.top,"L",c?b.chartWidth-this.right:m,c?d:b.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup), +this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var a=this.horiz,b=this.left,d=this.top,c=this.len,m=this.options.title,h=a?b:d,k=this.opposite,y=this.offset,p=m.x||0,E=m.y||0,t=this.chart.renderer.fontMetrics(m.style&&m.style.fontSize,this.axisTitle).f,c={low:h+(a?0:c),middle:h+c/2,high:h+(a?c:0)}[m.align],b=(a?d+this.height:b)+(a?1:-1)*(k?-1:1)*this.axisTitleMargin+(2===this.side?t:0);return{x:a?c+p:b+(k?this.width: +0)+y+p,y:a?b+E-(k?this.height:0)+y:c+E}},renderMinorTick:function(a){var b=this.chart.hasRendered&&x(this.oldMin),g=this.minorTicks;g[a]||(g[a]=new I(this,a,"minor"));b&&g[a].isNew&&g[a].render(null,!0);g[a].render(null,!1,1)},renderTick:function(a,b){var g=this.isLinked,d=this.ticks,c=this.chart.hasRendered&&x(this.oldMin);if(!g||a>=this.min&&a<=this.max)d[a]||(d[a]=new I(this,a)),c&&d[a].isNew&&d[a].render(b,!0,.1),d[a].render(b)},render:function(){var a=this,b=a.chart,d=a.options,h=a.isLog,k=a.lin2log, +y=a.isLinked,p=a.tickPositions,t=a.axisTitle,x=a.ticks,e=a.minorTicks,u=a.alternateBands,B=d.stackLabels,f=d.alternateGridColor,z=a.tickmarkOffset,F=a.axisLine,J=a.showAxis,l=C(b.renderer.globalAnimation),n,q;a.labelEdge.length=0;a.overlap=!1;c([x,e,u],function(a){for(var b in a)a[b].isActive=!1});if(a.hasData()||y)a.minorTickInterval&&!a.categories&&c(a.getMinorTickPositions(),function(b){a.renderMinorTick(b)}),p.length&&(c(p,function(b,d){a.renderTick(b,d)}),z&&(0===a.min||a.single)&&(x[-1]||(x[-1]= +new I(a,-1,null,!0)),x[-1].render(-1))),f&&c(p,function(d,g){q=void 0!==p[g+1]?p[g+1]+z:a.max-z;0===g%2&&d=c.second?0:u*Math.floor(k.getMilliseconds()/u));if(d>=c.second)k[C.hcSetSeconds](d>=c.minute?0:u*Math.floor(k.getSeconds()/u));if(d>=c.minute)k[C.hcSetMinutes](d>=c.hour?0:u*Math.floor(k[C.hcGetMinutes]()/u));if(d>=c.hour)k[C.hcSetHours](d>= +c.day?0:u*Math.floor(k[C.hcGetHours]()/u));if(d>=c.day)k[C.hcSetDate](d>=c.month?1:u*Math.floor(k[C.hcGetDate]()/u));d>=c.month&&(k[C.hcSetMonth](d>=c.year?0:u*Math.floor(k[C.hcGetMonth]()/u)),x=k[C.hcGetFullYear]());if(d>=c.year)k[C.hcSetFullYear](x-x%u);if(d===c.week)k[C.hcSetDate](k[C.hcGetDate]()-k[C.hcGetDay]()+f(t,1));x=k[C.hcGetFullYear]();t=k[C.hcGetMonth]();var y=k[C.hcGetDate](),J=k[C.hcGetHours]();if(C.hcTimezoneOffset||C.hcGetTimezoneOffset)m=(!p||!!C.hcGetTimezoneOffset)&&(b-z>4*c.month|| +q(z)!==q(b)),k=k.getTime(),k=new C(k+q(k));p=k.getTime();for(z=1;ph.length&&l(h,function(a){0===a%18E5&&"000000000"===G("%H%M%S%L",a)&&(e[a]="day")})}h.info=r(a,{higherRanks:e,totalRange:d*u});return h};D.prototype.normalizeTimeTickInterval=function(a,f){var b=f||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second", +[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]];f=b[b.length-1];var t=c[f[0]],h=f[1],e;for(e=0;er&&(!q||B<=w)&&void 0!==B&&z.push(B),B>w&&(p=!0),B=h;else r=c(r),w=c(w),a=n[q?"minorTickInterval":"tickInterval"],a=v("auto"===a?null:a,this._minorAutoInterval, +n.tickPixelInterval/(q?5:1)*(w-r)/((q?f/this.tickPositions.length:f)||1)),a=H(a,null,C(a)),z=G(this.getLinearTickPositions(a,r,w),e),q||(this._minorAutoInterval=a/5);q||(this.tickInterval=a);return z};D.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};D.prototype.lin2log=function(a){return Math.pow(10,a)}})(K);(function(a){var D=a.dateFormat,C=a.each,G=a.extend,H=a.format,v=a.isNumber,l=a.map,r=a.merge,w=a.pick,q=a.splat,n=a.syncTimeout,f=a.timeUnits;a.Tooltip=function(){this.init.apply(this, +arguments)};a.Tooltip.prototype={init:function(a,e){this.chart=a;this.options=e;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=e.split&&!a.inverted;this.shared=e.shared||this.split},cleanSplit:function(a){C(this.chart.series,function(c){var e=c&&c.tt;e&&(!e.isActive||a?c.tt=e.destroy():e.isActive=!1)})},getLabel:function(){var a=this.chart.renderer,e=this.options;this.label||(this.split?this.label=a.g("tooltip"):(this.label=a.label("",0,0,e.shape||"callout",null,null,e.useHTML, +null,"tooltip").attr({padding:e.padding,r:e.borderRadius}),this.label.attr({fill:e.backgroundColor,"stroke-width":e.borderWidth}).css(e.style).shadow(e.shadow)),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();this.init(this.chart,r(!0,this.options,a))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy());clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)}, +move:function(a,e,f,b){var c=this,h=c.now,B=!1!==c.options.animation&&!c.isHidden&&(1E-B?E:E-B); +else if(y)h[a]=Math.max(m,g+B+d>b?g:g+B);else return!1},u=function(a,b,d,g){var m;gb-c?m=!1:h[a]=gb-d/2?b-d-2:g-d/2;return m},m=function(a){var b=x;x=k;k=b;p=a},y=function(){!1!==d.apply(0,x)?!1!==u.apply(0,k)||p||(m(!0),y()):p?h.x=h.y=0:(m(!0),y())};(b.inverted||1y&&(B=!1);a=(d.series&&d.series.yAxis&&d.series.yAxis.pos)+(d.plotY||0);a-=t.plotTop;b.push({target:d.isHeader?t.plotHeight+x:a,rank:d.isHeader?1:0,size:c.tt.getBBox().height+1,point:d,x:y,tt:m})});this.cleanSplit();a.distribute(b,t.plotHeight+x);C(b,function(a){var b=a.point,c=b.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:B||b.isHeader?a.x:b.plotX+t.plotLeft+w(p.distance, +16),y:a.pos+t.plotTop,anchorX:b.isHeader?b.plotX+t.plotLeft:b.plotX+c.xAxis.pos,anchorY:b.isHeader?a.pos+t.plotTop-15:b.plotY+c.yAxis.pos})})},updatePosition:function(a){var c=this.chart,f=this.getLabel(),f=(this.options.positioner||this.getPosition).call(this,f.width,f.height,a);this.move(Math.round(f.x),Math.round(f.y||0),a.plotX+c.plotLeft,a.plotY+c.plotTop)},getDateFormat:function(a,e,z,b){var c=D("%m-%d %H:%M:%S.%L",e),h,B,p={millisecond:15,second:12,minute:9,hour:6,day:3},x="millisecond";for(B in f){if(a=== +f.week&&+D("%w",e)===z&&"00:00:00.000"===c.substr(6)){B="week";break}if(f[B]>a){B=x;break}if(p[B]&&c.substr(p[B])!=="01-01 00:00:00.000".substr(p[B]))break;"week"!==B&&(x=B)}B&&(h=b[B]);return h},getXDateFormat:function(a,e,f){e=e.dateTimeLabelFormats;var b=f&&f.closestPointRange;return(b?this.getDateFormat(b,a.x,f.options.startOfWeek,e):e.day)||e.year},tooltipFooterHeaderFormatter:function(a,e){var c=e?"footer":"header";e=a.series;var b=e.tooltipOptions,t=b.xDateFormat,h=e.xAxis,f=h&&"datetime"=== +h.options.type&&v(a.key),c=b[c+"Format"];f&&!t&&(t=this.getXDateFormat(a,b,h));f&&t&&(c=c.replace("{point.key}","{point.key:"+t+"}"));return H(c,{point:a,series:e})},bodyFormatter:function(a){return l(a,function(a){var c=a.series.tooltipOptions;return(c.pointFormatter||a.point.tooltipFormatter).call(a.point,c.pointFormat)})}}})(K);(function(a){var D=a.addEvent,C=a.attr,G=a.charts,H=a.color,v=a.css,l=a.defined,r=a.doc,w=a.each,q=a.extend,n=a.fireEvent,f=a.offset,c=a.pick,e=a.removeEvent,z=a.splat, +b=a.Tooltip,t=a.win;a.Pointer=function(a,b){this.init(a,b)};a.Pointer.prototype={init:function(a,t){this.options=t;this.chart=a;this.runChartClick=t.chart.events&&!!t.chart.events.click;this.pinchDown=[];this.lastValidTouch={};b&&t.tooltip.enabled&&(a.tooltip=new b(a,t.tooltip),this.followTouchMove=c(t.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,h=b.options.chart,x=h.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(x=c(h.pinchType,x));this.zoomX=a=/x/.test(x); +this.zoomY=x=/y/.test(x);this.zoomHor=a&&!b||x&&b;this.zoomVert=x&&!b||a&&b;this.hasZoom=a||x},normalize:function(a,b){var c,h;a=a||t.event;a.target||(a.target=a.srcElement);h=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;b||(this.chartPosition=b=f(this.chart.container));void 0===h.pageX?(c=Math.max(a.x,a.clientX-b.left),b=a.y):(c=h.pageX-b.left,b=h.pageY-b.top);return q(a,{chartX:Math.round(c),chartY:Math.round(b)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};w(this.chart.axes, +function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},getKDPoints:function(a,b,p){var h=[],k,t,d;w(a,function(a){k=a.noSharedTooltip&&b;t=!b&&a.directTouch;a.visible&&!t&&c(a.options.enableMouseTracking,!0)&&(d=a.searchPoint(p,!k&&0>a.options.findNearestPointBy.indexOf("y")))&&d.series&&h.push(d)});h.sort(function(a,d){var c=a.distX-d.distX,m=a.dist-d.dist,h=(d.series.group&&d.series.group.zIndex)-(a.series.group&&a.series.group.zIndex); +return 0!==c&&b?c:0!==m?m:0!==h?h:a.series.index>d.series.index?-1:1});if(b&&h[0]&&!h[0].series.noSharedTooltip)for(a=h.length;a--;)(h[a].x!==h[0].x||h[a].series.noSharedTooltip)&&h.splice(a,1);return h},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getHoverData:function(b,t,p,x,k,e){var d=b,h=t,m;x?k?(m=[],w(p,function(a){var b=a.noSharedTooltip&&k,h=!k&&a.directTouch;a.visible&&!b&&!h&&c(a.options.enableMouseTracking,!0)&&(a=a.searchKDTree({clientX:d.clientX, +plotY:d.plotY},!b&&1===a.kdDimensions))&&a.series&&m.push(a)}),0===m.length&&(m=[d])):m=[d]:h&&!h.stickyTracking?(k||(p=[h]),m=this.getKDPoints(p,k,e),d=a.find(m,function(a){return a.series===h})):(b=a.grep(p,function(a){return a.stickyTracking}),m=this.getKDPoints(b,k,e),h=(d=m[0])&&d.series,k&&(m=this.getKDPoints(p,k,e)));m.sort(function(a,b){return a.series.index-b.series.index});return{hoverPoint:d,hoverSeries:h,hoverPoints:m}},runPointActions:function(b,t){var h=this.chart,x=h.tooltip,k=x?x.shared: +!1,e=t||h.hoverPoint,d=e&&e.series||h.hoverSeries;t=this.getHoverData(e,d,h.series,!!t||!k&&d&&d.directTouch,k,b);var f,m,e=t.hoverPoint;f=(d=t.hoverSeries)&&d.tooltipOptions.followPointer;m=(k=k&&e&&!e.series.noSharedTooltip)?t.hoverPoints:e?[e]:[];if(e&&(e!==h.hoverPoint||x&&x.isHidden)){w(h.hoverPoints||[],function(b){-1===a.inArray(b,m)&&b.setState()});w(m||[],function(a){a.setState("hover")});if(h.hoverSeries!==d)d.onMouseOver();d&&!d.directTouch&&(h.hoverPoint&&h.hoverPoint.firePointEvent("mouseOut"), +e.firePointEvent("mouseOver"));h.hoverPoints=m;h.hoverPoint=e;x&&x.refresh(k?m:e,b)}else f&&x&&!x.isHidden&&(e=x.getAnchor([{}],b),x.updatePosition({plotX:e[0],plotY:e[1]}));this.unDocMouseMove||(this.unDocMouseMove=D(r,"mousemove",function(b){var d=G[a.hoverChartIndex];if(d)d.pointer.onDocumentMouseMove(b)}));w(h.axes,function(a){c(a.crosshair.snap,!0)?w(m,function(d){d.series[a.coll]===a&&a.drawCrosshair(b,d)}):a.drawCrosshair(b)})},reset:function(a,b){var c=this.chart,h=c.hoverSeries,k=c.hoverPoint, +t=c.hoverPoints,d=c.tooltip,e=d&&d.shared?t:k;a&&e&&w(z(e),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)d&&e&&(d.refresh(e),k&&(k.setState(k.state,!0),w(c.axes,function(a){a.crosshair&&a.drawCrosshair(null,k)})));else{if(k)k.onMouseOut();t&&w(t,function(a){a.setState()});if(h)h.onMouseOut();d&&d.hide(b);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());w(c.axes,function(a){a.hideCrosshair()});this.hoverX=c.hoverPoints=c.hoverPoint=null}},scaleGroups:function(a, +b){var c=this.chart,h;w(c.series,function(k){h=a||k.getPlotBox();k.xAxis&&k.xAxis.zoomEnabled&&k.group&&(k.group.attr(h),k.markerGroup&&(k.markerGroup.attr(h),k.markerGroup.clip(b?c.clipRect:null)),k.dataLabelsGroup&&k.dataLabelsGroup.attr(h))});c.clipRect.attr(b||c.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var b=this.chart,c=b.options.chart,h=a.chartX,k=a.chartY, +t=this.zoomHor,d=this.zoomVert,e=b.plotLeft,m=b.plotTop,y=b.plotWidth,f=b.plotHeight,E,I=this.selectionMarker,g=this.mouseDownX,n=this.mouseDownY,z=c.panKey&&a[c.panKey+"Key"];I&&I.touch||(he+y&&(h=e+y),km+f&&(k=m+f),this.hasDragged=Math.sqrt(Math.pow(g-h,2)+Math.pow(n-k,2)),10m.max&&(l=m.max-k,r=!0);r?(E-=.8*(E-e[t][0]),y||(g-=.8*(g-e[t][1])),q()):e[t]=[E,g];u||(c[t]=F-x,c[p]=k);c=u?1/d:d;f[p]=k;f[t]=l;n[u?a?"scaleY":"scaleX":"scale"+h]=d;n["translate"+h]=c*x+(E-c*J)},pinch:function(a){var r=this,q=r.chart,n=r.pinchDown,f=a.touches,c=f.length,e=r.lastValidTouch,z=r.hasZoom,b=r.selectionMarker,t={},h=1===c&&(r.inClass(a.target,"highcharts-tracker")&&q.runTrackerClick|| +r.runChartClick),B={};1c-6&&t(J||b.spacingBox.width-2*u-e.x)&&(this.itemX=u,this.itemY+=I+this.lastLineHeight+ +E,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth,f);this.lastItemY=I+this.itemY+E;this.lastLineHeight=Math.max(k,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];p?this.itemX+=f:(this.itemY+=I+k+E,this.lastLineHeight=k);this.offsetWidth=J||Math.max((p?this.itemX-u-m:f)+u,this.offsetWidth)},getAllItems:function(){var a=[];l(this.chart.series,function(b){var c=b&&b.options;b&&n(c.showInLegend,v(c.linkedTo)?!1:void 0,!0)&&(a=a.concat(b.legendItems||("point"===c.legendType? +b.data:b)))});return a},adjustMargins:function(a,c){var b=this.chart,e=this.options,p=e.align.charAt(0)+e.verticalAlign.charAt(0)+e.layout.charAt(0);e.floating||l([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(h,k){h.test(p)&&!v(a[k])&&(b[w[k]]=Math.max(b[w[k]],b.legend[(k+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][k]*e[k%2?"x":"y"]+n(e.margin,12)+c[k]))})},render:function(){var a=this,e=a.chart,h=e.renderer,f=a.group,p,x,k,n,d=a.box,u=a.options,m=a.padding;a.itemX=m;a.itemY= +a.initialItemY;a.offsetWidth=0;a.lastItemY=0;f||(a.group=f=h.g("legend").attr({zIndex:7}).add(),a.contentGroup=h.g().attr({zIndex:1}).add(f),a.scrollGroup=h.g().add(a.contentGroup));a.renderTitle();p=a.getAllItems();c(p,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});u.reversed&&p.reverse();a.allItems=p;a.display=x=!!p.length;a.lastLineHeight=0;l(p,function(b){a.renderItem(b)});k=(u.width||a.offsetWidth)+m;n=a.lastItemY+a.lastLineHeight+a.titleHeight; +n=a.handleOverflow(n);n+=m;d||(a.box=d=h.rect().addClass("highcharts-legend-box").attr({r:u.borderRadius}).add(f),d.isNew=!0);d.attr({stroke:u.borderColor,"stroke-width":u.borderWidth||0,fill:u.backgroundColor||"none"}).shadow(u.shadow);0c&&!1!==u.enabled?(this.clipHeight=z=Math.max(c-20-this.titleHeight-k,0),this.currentPage=n(this.currentPage,1),this.fullHeight=a,l(g,function(a,b){var c=a._legendItemPos[1];a=Math.round(a.legendItem.getBBox().height);var d=E.length;if(!d||c-E[d-1]>z&&(I||c)!==E[d-1])E.push(I||c),d++;b===g.length-1&&c+a-E[d-1]>z&&E.push(c);c!==I&&(I=c)}),d||(d=b.clipRect=e.clipRect(0,k,9999,0),b.contentGroup.clip(d)),q(z),J||(this.nav=J=e.g().attr({zIndex:1}).add(this.group), +this.up=e.symbol("triangle",0,0,y,y).on("click",function(){b.scroll(-1,m)}).add(J),this.pager=e.text("",15,10).addClass("highcharts-legend-navigation").css(u.style).add(J),this.down=e.symbol("triangle-down",0,0,y,y).on("click",function(){b.scroll(1,m)}).add(J)),b.scroll(0),a=c):J&&(q(),this.nav=J.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,c){var b=this.pages,e=b.length;a=this.currentPage+a;var p=this.clipHeight,t=this.options.navigation,k=this.pager, +n=this.padding;a>e&&(a=e);0t&&(e=typeof a[0],"string"===e?c.name=a[0]:"number"===e&&(c.x=a[0]),h++);n=n.value;)n=c[++e];n&&n.color&&!this.options.color&&(this.color=n.color);return n},destroy:function(){var a=this.series.chart,c=a.hoverPoints,e;a.pointCount--;c&&(this.setState(),H(c,this),c.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)n(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(e in this)this[e]=null},destroyElements:function(){for(var a=["graphic", +"dataLabel","dataLabelUpper","connector","shadowGroup"],c,e=6;e--;)c=a[e],this[c]&&(this[c]=this[c].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var c=this.series,e=c.tooltipOptions,f=q(e.valueDecimals,""),b=e.valuePrefix||"",t=e.valueSuffix||"";C(c.pointArrayMap||["y"],function(c){c= +"{point."+c;if(b||t)a=a.replace(c+"}",b+c+"}"+t);a=a.replace(c+"}",c+":,."+f+"f}")});return l(a,{point:this,series:this.series})},firePointEvent:function(a,c,e){var f=this,b=this.series.options;(b.point.events[a]||f.options&&f.options.events&&f.options.events[a])&&this.importEvents();"click"===a&&b.allowPointSelect&&(e=function(a){f.select&&f.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});v(this,a,c,e)},visible:!0}})(K);(function(a){var D=a.addEvent,C=a.animObject,G=a.arrayMax,H=a.arrayMin,v=a.correctFloat, +l=a.Date,r=a.defaultOptions,w=a.defaultPlotOptions,q=a.defined,n=a.each,f=a.erase,c=a.extend,e=a.fireEvent,z=a.grep,b=a.isArray,t=a.isNumber,h=a.isString,B=a.merge,p=a.pick,x=a.removeEvent,k=a.splat,F=a.SVGElement,d=a.syncTimeout,u=a.win;a.Series=a.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",radius:4,states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc", +lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3,findNearestPointBy:"x"}, +{isCartesian:!0,pointClass:a.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,b){var d=this,m,k,g=a.series,h;d.chart=a;d.options=b=d.setOptions(b);d.linkedSeries=[];d.bindAxes();c(d,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});k=b.events;for(m in k)D(d,m,k[m]);if(k&&k.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;d.getColor(); +d.getSymbol();n(d.parallelArrays,function(a){d[a+"Data"]=[]});d.setData(b.data,!1);d.isCartesian&&(a.hasCartesianSeries=!0);g.length&&(h=g[g.length-1]);d._i=p(h&&h._i,-1)+1;a.orderSeries(this.insert(g))},insert:function(a){var b=this.options.index,c;if(t(b)){for(c=a.length;c--;)if(b>=p(a[c].options.index,a[c]._i)){a.splice(c+1,0,this);break}-1===c&&a.unshift(this);c+=1}else a.push(this);return p(c,a.length-1)},bindAxes:function(){var b=this,c=b.options,d=b.chart,k;n(b.axisTypes||[],function(m){n(d[m], +function(a){k=a.options;if(c[m]===k.index||void 0!==c[m]&&c[m]===k.id||void 0===c[m]&&0===k.index)b.insert(a.series),b[m]=a,a.isDirty=!0});b[m]||b.optionalAxis===m||a.error(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,d=arguments,m=t(b)?function(d){var g="y"===d&&c.toYData?c.toYData(a):a[d];c[d+"Data"][b]=g}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(d,2))};n(c.parallelArrays,m)},autoIncrement:function(){var a=this.options,b=this.xIncrement,c,d=a.pointIntervalUnit, +b=p(b,a.pointStart,0);this.pointInterval=c=p(this.pointInterval,a.pointInterval,1);d&&(a=new l(b),"day"===d?a=+a[l.hcSetDate](a[l.hcGetDate]()+c):"month"===d?a=+a[l.hcSetMonth](a[l.hcGetMonth]()+c):"year"===d&&(a=+a[l.hcSetFullYear](a[l.hcGetFullYear]()+c)),c=a-b);this.xIncrement=b+c;return b},setOptions:function(a){var b=this.chart,c=b.options.plotOptions,b=b.userOptions||{},d=b.plotOptions||{},m=c[this.type];this.userOptions=a;c=B(m,c.series,a);this.tooltipOptions=B(r.tooltip,r.plotOptions[this.type].tooltip, +b.tooltip,d.series&&d.series.tooltip,d[this.type]&&d[this.type].tooltip,a.tooltip);this.stickyTracking=p(a.stickyTracking,d[this.type]&&d[this.type].stickyTracking,d.series&&d.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:c.stickyTracking);null===m.marker&&delete c.marker;this.zoneAxis=c.zoneAxis;a=this.zones=(c.zones||[]).slice();!c.negativeColor&&!c.negativeFillColor||c.zones||a.push({value:c[this.zoneAxis+"Threshold"]||c.threshold||0,className:"highcharts-negative", +color:c.negativeColor,fillColor:c.negativeFillColor});a.length&&q(a[a.length-1].value)&&a.push({color:this.color,fillColor:this.fillColor});return c},getCyclic:function(a,b,c){var d,m=this.chart,g=this.userOptions,k=a+"Index",h=a+"Counter",e=c?c.length:p(m.options.chart[a+"Count"],m[a+"Count"]);b||(d=p(g[k],g["_"+k]),q(d)||(m.series.length||(m[h]=0),g["_"+k]=d=m[h]%e,m[h]+=1),c&&(b=c[d]));void 0!==d&&(this[k]=d);this[a]=b},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color", +this.options.color||w[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,setData:function(c,d,k,e){var m=this,g=m.points,y=g&&g.length||0,E,f=m.options,x=m.chart,u=null,l=m.xAxis,z=f.turboThreshold,F=this.xData,q=this.yData,r=(E=m.pointArrayMap)&&E.length;c=c||[];E=c.length;d=p(d,!0);if(!1!==e&&E&&y===E&&!m.cropped&&!m.hasGroupedData&&m.visible)n(c,function(a, +b){g[b].update&&a!==f.data[b]&&g[b].update(a,!1,null,!1)});else{m.xIncrement=null;m.colorCounter=0;n(this.parallelArrays,function(a){m[a+"Data"].length=0});if(z&&E>z){for(k=0;null===u&&kp||this.forceCrop))if(c[m-1]l)c=[],d=[];else if(c[0]l)k=this.cropData(this.xData,this.yData,n,l),c=k.xData,d=k.yData,k=k.start,g=!0;for(p=c.length||1;--p;)m=x?f(c[p])-f(c[p-1]):c[p]-c[p-1],0m&&this.requireSorting&&a.error(15);this.cropped=g;this.cropStart=k;this.processedXData=c;this.processedYData=d;this.closestPointRange= +h},cropData:function(a,b,c,d){var m=a.length,g=0,k=m,h=p(this.cropShoulder,1),e;for(e=0;e=c){g=Math.max(0,e-h);break}for(c=e;cd){k=c+h;break}return{xData:a.slice(g,k),yData:b.slice(g,k),start:g,end:k}},generatePoints:function(){var a=this.options.data,b=this.data,c,d=this.processedXData,h=this.processedYData,g=this.pointClass,e=d.length,p=this.cropStart||0,f,t=this.hasGroupedData,u,x=[],n;b||t||(b=[],b.length=a.length,b=this.data=b);for(n=0;n=h&&(d[x]||f)<=e,p&&f)if(p=u.length)for(;p--;)null!==u[p]&&(k[g++]=u[p]);else k[g++]=u;this.dataMin=H(k);this.dataMax=G(k)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,c=this.xAxis,d=c.categories,k=this.yAxis,g=this.points,h=g.length,e=!!this.modifyValue,f=a.pointPlacement,u="between"===f||t(f), +x=a.threshold,n=a.startFromThreshold?x:0,l,z,F,r,B=Number.MAX_VALUE;"between"===f&&(f=.5);t(f)&&(f*=p(a.pointRange||c.pointRange));for(a=0;a=D&&(w.isNull=!0);w.plotX=l=v(Math.min(Math.max(-1E5,c.translate(C,0,0,0,1,f,"flags"===this.type)),1E5));b&&this.visible&&!w.isNull&&G&&G[C]&&(r=this.getStackIndicator(r,C,this.index),H=G[C],D=H.points[r.key],z=D[0],D= +D[1],z===n&&r.key===G[C].base&&(z=p(x,k.min)),k.positiveValuesOnly&&0>=z&&(z=null),w.total=w.stackTotal=H.total,w.percentage=H.total&&w.y/H.total*100,w.stackY=D,H.setOffset(this.pointXOffset||0,this.barW||0));w.yBottom=q(z)?k.translate(z,0,1,0,1):null;e&&(D=this.modifyValue(D,w));w.plotY=z="number"===typeof D&&Infinity!==D?Math.min(Math.max(-1E5,k.translate(D,0,1,0,1)),1E5):void 0;w.isInside=void 0!==z&&0<=z&&z<=k.len&&0<=l&&l<=c.len;w.clientX=u?v(c.translate(C,0,0,0,1,f)):l;w.negative=w.y<(x||0); +w.category=d&&void 0!==d[w.x]?d[w.x]:w.x;w.isNull||(void 0!==F&&(B=Math.min(B,Math.abs(l-F))),F=l);w.zone=this.zones.length&&w.getZone()}this.closestPointRangePx=B},getValidPoints:function(a,b){var c=this.chart;return z(a||this.points||[],function(a){return b&&!c.isInsidePlot(a.plotX,a.plotY,c.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,c=this.options,d=b.renderer,m=b.inverted,g=this.clipBox,k=g||b.clipBox,h=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,k.height, +c.xAxis,c.yAxis].join(),e=b[h],p=b[h+"m"];e||(a&&(k.width=0,b[h+"m"]=p=d.clipRect(-99,m?-b.plotLeft:-b.plotTop,99,m?b.chartWidth:b.chartHeight)),b[h]=e=d.clipRect(k),e.count={length:0});a&&!e.count[this.index]&&(e.count[this.index]=!0,e.count.length+=1);!1!==c.clip&&(this.group.clip(a||g?e:b.clipRect),this.markerGroup.clip(p),this.sharedClipKey=h);a||(e.count[this.index]&&(delete e.count[this.index],--e.count.length),0===e.count.length&&h&&b[h]&&(g||(b[h]=b[h].destroy()),b[h+"m"]&&(b[h+"m"]=b[h+"m"].destroy())))}, +animate:function(a){var b=this.chart,c=C(this.options.animation),d;a?this.setClip(c):(d=this.sharedClipKey,(a=b[d])&&a.animate({width:b.plotSizeX},c),b[d+"m"]&&b[d+"m"].animate({width:b.plotSizeX+99},c),this.animate=null)},afterAnimate:function(){this.setClip();e(this,"afterAnimate")},drawPoints:function(){var a=this.points,b=this.chart,c,d,k,g,h=this.options.marker,e,f,u,x,n=this.markerGroup,l=p(h.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>=2*h.radius);if(!1!==h.enabled||this._hasPointMarkers)for(d= +0;dg&&b.shadow));m&&(m.startX=c.xMap,m.isArea=c.isArea)})},applyZones:function(){var a=this,b=this.chart,c=b.renderer,d=this.zones,k,g,h=this.clips||[],e,f=this.graph,u=this.area,x=Math.max(b.chartWidth,b.chartHeight),t=this[(this.zoneAxis||"y")+"Axis"],l,z,F=b.inverted,q,r,B,w,v=!1;d.length&&(f||u)&&t&&void 0!==t.min&&(z=t.reversed,q=t.horiz,f&&f.hide(),u&&u.hide(),l=t.getExtremes(),n(d,function(d,m){k=z?q?b.plotWidth:0:q?0: +t.toPixels(l.min);k=Math.min(Math.max(p(g,k),0),x);g=Math.min(Math.max(Math.round(t.toPixels(p(d.value,l.max),!0)),0),x);v&&(k=g=t.toPixels(l.max));r=Math.abs(k-g);B=Math.min(k,g);w=Math.max(k,g);t.isXAxis?(e={x:F?w:B,y:0,width:r,height:x},q||(e.x=b.plotHeight-e.x)):(e={x:0,y:F?w:B,width:x,height:r},q&&(e.y=b.plotWidth-e.y));F&&c.isVML&&(e=t.isXAxis?{x:0,y:z?B:w,height:e.width,width:b.chartWidth}:{x:e.y-b.plotLeft-b.spacingBox.x,y:0,width:e.height,height:b.chartHeight});h[m]?h[m].animate(e):(h[m]= +c.clipRect(e),f&&a["zone-graph-"+m].clip(h[m]),u&&a["zone-area-"+m].clip(h[m]));v=d.value>l.max}),this.clips=h)},invertGroups:function(a){function b(){n(["group","markerGroup"],function(b){c[b]&&(d.renderer.isVML&&c[b].attr({width:c.yAxis.len,height:c.xAxis.len}),c[b].width=c.yAxis.len,c[b].height=c.xAxis.len,c[b].invert(a))})}var c=this,d=c.chart,k;c.xAxis&&(k=D(d,"resize",b),D(c,"destroy",k),b(a),c.invertGroups=b)},plotGroup:function(a,b,c,d,k){var g=this[a],m=!g;m&&(this[a]=g=this.chart.renderer.g(b).attr({zIndex:d|| +.1}).add(k),g.addClass("highcharts-series-"+this.index+" highcharts-"+this.type+"-series highcharts-color-"+this.colorIndex+" "+(this.options.className||"")));g.attr({visibility:c})[m?"attr":"animate"](this.getPlotBox());return g},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;a.inverted&&(b=c,c=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,k=a.options,h=!!a.animate&&b.renderer.isSVG&&C(k.animation).duration, +g=a.visible?"inherit":"hidden",e=k.zIndex,p=a.hasRendered,f=b.seriesGroup,u=b.inverted;c=a.plotGroup("group","series",g,e,f);a.markerGroup=a.plotGroup("markerGroup","markers",g,e,f);h&&a.animate(!0);c.inverted=a.isCartesian?u:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(u);!1===k.clip||a.sharedClipKey||p||c.clip(b.clipRect);h&&a.animate();p||(a.animationTimeout= +d(function(){a.afterAnimate()},h));a.isDirty=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,c=this.group,d=this.xAxis,k=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:p(d&&d.left,a.plotLeft),translateY:p(k&&k.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var c=this.xAxis,d=this.yAxis,k=this.chart.inverted;return this.searchKDTree({clientX:k? +c.len-a.chartY+c.pos:a.chartX-c.pos,plotY:k?d.len-a.chartX+d.pos:a.chartY-d.pos},b)},buildKDTree:function(){function a(c,d,g){var k,m;if(m=c&&c.length)return k=b.kdAxisArray[d%g],c.sort(function(a,b){return a[k]-b[k]}),m=Math.floor(m/2),{point:c[m],left:a(c.slice(0,m),d+1,g),right:a(c.slice(m+1),d+1,g)}}this.buildingKdTree=!0;var b=this,c=-1f?"left":"right";t=0>f?"right":"left";b[u]&&(u=c(a,b[u],h+1,e),x=u[m]n;)l--;this.updateParallelArrays(g,"splice",l,0,0);this.updateParallelArrays(g,l);f&&g.name&&(f[n]=g.name);u.splice(l,0,a);x&&(this.data.splice(l,0,null),this.processData());"point"===k.legendType&& +this.generatePoints();d&&(e[0]&&e[0].remove?e[0].remove(!1):(e.shift(),this.updateParallelArrays(g,"shift"),u.shift()));this.isDirtyData=this.isDirty=!0;c&&p.redraw(h)},removePoint:function(a,c,d){var k=this,m=k.data,h=m[a],e=k.points,f=k.chart,x=function(){e&&e.length===m.length&&e.splice(a,1);m.splice(a,1);k.options.data.splice(a,1);k.updateParallelArrays(h||{series:k},"splice",a,1);h&&h.destroy();k.isDirty=!0;k.isDirtyData=!0;c&&f.redraw()};p(d,f);c=b(c,!0);h?h.firePointEvent("remove",null,x): +x()},remove:function(a,c,d){function k(){m.destroy();h.isDirtyLegend=h.isDirtyBox=!0;h.linkSeries();b(a,!0)&&h.redraw(c)}var m=this,h=m.chart;!1!==d?n(m,"remove",null,k):k()},update:function(a,c){var d=this,k=this.chart,m=this.userOptions,h=this.oldType||this.type,e=a.type||m.type||k.options.chart.type,p=B[h].prototype,f=["group","markerGroup","dataLabelsGroup"],g;if(e&&e!==h||void 0!==a.zIndex)f.length=0;r(f,function(a){f[a]=d[a];delete d[a]});a=z(m,{animation:!1,index:this.index,pointStart:this.xData[0]}, +{data:this.options.data},a);this.remove(!1,null,!1);for(g in p)this[g]=void 0;q(this,B[e||h].prototype);r(f,function(a){d[a]=f[a]});this.init(k,a);this.oldType=h;k.linkSeries();b(c,!0)&&k.redraw(!1)}});q(G.prototype,{update:function(a,c){var d=this.chart;a=d.options[this.coll][this.options.index]=z(this.userOptions,a);this.destroy(!0);this.init(d,q(a,{events:void 0}));d.isDirtyBox=!0;b(c,!0)&&d.redraw()},remove:function(a){for(var c=this.chart,d=this.coll,k=this.series,m=k.length;m--;)k[m]&&k[m].remove(!1); +w(c.axes,this);w(c[d],this);c.options[d].splice(this.options.index,1);r(c[d],function(a,b){a.options.index=b});this.destroy();c.isDirtyBox=!0;b(a,!0)&&c.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})})(K);(function(a){var D=a.color,C=a.each,G=a.map,H=a.pick,v=a.Series,l=a.seriesType;l("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(){var a=[],l=[],q=this.xAxis,n=this.yAxis,f=n.stacks[this.stackKey], +c={},e=this.points,z=this.index,b=n.series,t=b.length,h,B=H(n.options.reversedStacks,!0)?1:-1,p,x;if(this.options.stacking){for(p=0;pa&&q>l?(q=Math.max(a,l),f=2*l-q):qH&&f>l?(f=Math.max(H,l),q=2*l-f):f=Math.abs(c)&&.5a.closestPointRange*a.xAxis.transA,l=a.borderWidth=r(e.borderWidth,l?0:1),b=a.yAxis,t=a.translatedThreshold=b.getThreshold(e.threshold),h=r(e.minPointLength,5),n=a.getColumnMetrics(),p=n.width,x=a.barW=Math.max(p,1+2*l),k=a.pointXOffset=n.offset;c.inverted&&(t-=.5);e.pointPadding&&(x=Math.ceil(x));w.prototype.translate.apply(a);G(a.points,function(e){var d=r(e.yBottom,t),f=999+Math.abs(d),f=Math.min(Math.max(-f,e.plotY),b.len+f),m=e.plotX+k,l=x,n=Math.min(f,d),E,q= +Math.max(f,d)-n;Math.abs(q)h?d-h:t-(E?h:0));e.barX=m;e.pointWidth=p;e.tooltipPos=c.inverted?[b.len+b.pos-c.plotLeft-f,a.xAxis.len-m-l/2,q]:[m+l/2,f+b.pos-c.plotTop,q];e.shapeType="rect";e.shapeArgs=a.crispCol.apply(a,e.isNull?[e.plotX,b.len/2,0,0]:[m,n,l,q])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")}, +pointAttribs:function(a,c){var e=this.options,f,b=this.pointAttrToOptions||{};f=b.stroke||"borderColor";var t=b["stroke-width"]||"borderWidth",h=a&&a.color||this.color,n=a[f]||e[f]||this.color||h,p=a[t]||e[t]||this[t]||0,b=e.dashStyle;a&&this.zones.length&&(h=(h=a.getZone())&&h.color||a.options.color||this.color);c&&(a=l(e.states[c],a.options.states&&a.options.states[c]||{}),c=a.brightness,h=a.color||void 0!==c&&C(h).brighten(a.brightness).get()||h,n=a[f]||n,p=a[t]||p,b=a.dashStyle||b);f={fill:h, +stroke:n,"stroke-width":p};e.borderRadius&&(f.r=e.borderRadius);b&&(f.dashstyle=b);return f},drawPoints:function(){var a=this,c=this.chart,e=a.options,n=c.renderer,b=e.animationLimit||250,t;G(a.points,function(h){var f=h.graphic;if(v(h.plotY)&&null!==h.y){t=h.shapeArgs;if(f)f[c.pointCountq;++q)n= +r[q],a=2>q||2===q&&/%$/.test(n),r[q]=C(n,[l,H,w,r[2]][q])+(a?v:0);r[3]>r[2]&&(r[3]=r[2]);return r}}})(K);(function(a){var D=a.addEvent,C=a.defined,G=a.each,H=a.extend,v=a.inArray,l=a.noop,r=a.pick,w=a.Point,q=a.Series,n=a.seriesType,f=a.setAnimation;n("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return null===this.y?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10, +stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1,shadow:!1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var c=this,f=c.points,b=c.startAngleRad;a||(G(f,function(a){var h=a.graphic,e=a.shapeArgs;h&&(h.attr({r:a.startR||c.center[3]/2,start:b,end:b}),h.animate({r:e.r,start:e.start,end:e.end}, +c.options.animation))}),c.animate=null)},updateTotals:function(){var a,e=0,f=this.points,b=f.length,t,h=this.options.ignoreHiddenPoint;for(a=0;at.y&&(t.y=null),e+=h&&!t.visible?0:t.y;this.total=e;for(a=0;a1.5*Math.PI?p-=2*Math.PI:p<-Math.PI/2&&(p+=2*Math.PI);y.slicedTranslation={translateX:Math.round(Math.cos(p)*b),translateY:Math.round(Math.sin(p)*b)};h=Math.cos(p)*a[2]/2;l=Math.sin(p)*a[2]/2;y.tooltipPos=[a[0]+.7*h,a[1]+.7*l];y.half=p<-Math.PI/2||p>Math.PI/2?1:0;y.angle=p;t=Math.min(t,d/5);y.labelPos=[a[0]+h+Math.cos(p)*d,a[1]+l+Math.sin(p)*d,a[0]+h+Math.cos(p)*t,a[1]+l+Math.sin(p)*t,a[0]+h,a[1]+l,0>d?"center":y.half?"right":"left",p]}},drawGraph:null,drawPoints:function(){var a= +this,e=a.chart.renderer,f,b,t,h,l=a.options.shadow;l&&!a.shadowGroup&&(a.shadowGroup=e.g("shadow").add(a.group));G(a.points,function(c){if(null!==c.y){b=c.graphic;h=c.shapeArgs;f=c.getTranslate();var p=c.shadowGroup;l&&!p&&(p=c.shadowGroup=e.g("shadow").add(a.shadowGroup));p&&p.attr(f);t=a.pointAttribs(c,c.selected&&"select");b?b.setRadialReference(a.center).attr(t).animate(H(h,f)):(c.graphic=b=e[c.shapeType](h).setRadialReference(a.center).attr(f).add(a.group),c.visible||b.attr({visibility:"hidden"}), +b.attr(t).attr({"stroke-linejoin":"round"}).shadow(l,p));b.addClass(c.getClassName())}})},searchPoint:l,sortByAngle:function(a,e){a.sort(function(a,b){return void 0!==a.angle&&(b.angle-a.angle)*e})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:a.CenteredSeriesMixin.getCenter,getSymbol:l},{init:function(){w.prototype.init.apply(this,arguments);var a=this,e;a.name=r(a.name,"Slice");e=function(c){a.slice("select"===c.type)};D(a,"select",e);D(a,"unselect",e);return a},setVisible:function(a, +e){var c=this,b=c.series,f=b.chart,h=b.options.ignoreHiddenPoint;e=r(e,h);a!==c.visible&&(c.visible=c.options.visible=a=void 0===a?!c.visible:a,b.options.data[v(c,b.data)]=c.options,G(["graphic","dataLabel","connector","shadowGroup"],function(b){if(c[b])c[b][a?"show":"hide"](!0)}),c.legendItem&&f.legend.colorizeItem(c,a),a||"hover"!==c.state||c.setState(""),h&&(b.isDirty=!0),e&&f.redraw())},slice:function(a,e,l){var b=this.series;f(l,b.chart);r(e,!0);this.sliced=this.options.sliced=C(a)?a:!this.sliced; +b.options.data[v(this,b.data)]=this.options;this.graphic.animate(this.getTranslate());this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(a){var c=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.x,c.y,c.r+a,c.r+a,{innerR:this.shapeArgs.r,start:c.start,end:c.end})}})})(K);(function(a){var D=a.addEvent,C=a.arrayMax,G=a.defined,H=a.each, +v=a.extend,l=a.format,r=a.map,w=a.merge,q=a.noop,n=a.pick,f=a.relativeLength,c=a.Series,e=a.seriesTypes,z=a.stableSort;a.distribute=function(a,c){function b(a,b){return a.target-b.target}var e,p=!0,f=a,k=[],l;l=0;for(e=a.length;e--;)l+=a[e].size;if(l>c){z(a,function(a,b){return(b.rank||0)-(a.rank||0)});for(l=e=0;l<=c;)l+=a[e].size,e++;k=a.splice(e-1,a.length)}z(a,b);for(a=r(a,function(a){return{size:a.size,targets:[a.target]}});p;){for(e=a.length;e--;)p=a[e],l=(Math.min.apply(0,p.targets)+Math.max.apply(0, +p.targets))/2,p.pos=Math.min(Math.max(0,l-p.size/2),c-p.size);e=a.length;for(p=!1;e--;)0a[e].pos&&(a[e-1].size+=a[e].size,a[e-1].targets=a[e-1].targets.concat(a[e].targets),a[e-1].pos+a[e-1].size>c&&(a[e-1].pos=c-a[e-1].size),a.splice(e,1),p=!0)}e=0;H(a,function(a){var b=0;H(a.targets,function(){f[e].pos=a.pos+b;b+=f[e].size;e++})});f.push.apply(f,k);z(f,b)};c.prototype.drawDataLabels=function(){var a=this,c=a.options,h=c.dataLabels,e=a.points,p,f,k=a.hasRendered||0,q,d, +u=n(h.defer,!0),m=a.chart.renderer;if(h.enabled||a._hasPointLabels)a.dlProcessOptions&&a.dlProcessOptions(h),d=a.plotGroup("dataLabelsGroup","data-labels",u&&!k?"hidden":"visible",h.zIndex||6),u&&(d.attr({opacity:+k}),k||D(a,"afterAnimate",function(){a.visible&&d.show(!0);d[c.animation?"animate":"attr"]({opacity:1},{duration:200})})),f=h,H(e,function(b){var k,e=b.dataLabel,x,g,t,u=b.connector,y=!e,r;p=b.dlOptions||b.options&&b.options.dataLabels;if(k=n(p&&p.enabled,f.enabled)&&null!==b.y)for(g in h= +w(f,p),x=b.getLabelConfig(),q=h.format?l(h.format,x):h.formatter.call(x,h),r=h.style,t=h.rotation,r.color=n(h.color,r.color,a.color,"#000000"),"contrast"===r.color&&(b.contrastColor=m.getContrast(b.color||a.color),r.color=h.inside||0>h.distance||c.stacking?b.contrastColor:"#000000"),c.cursor&&(r.cursor=c.cursor),x={fill:h.backgroundColor,stroke:h.borderColor,"stroke-width":h.borderWidth,r:h.borderRadius||0,rotation:t,padding:h.padding,zIndex:1},x)void 0===x[g]&&delete x[g];!e||k&&G(q)?k&&G(q)&&(e? +x.text=q:(e=b.dataLabel=m[t?"text":"label"](q,0,-9999,h.shape,null,null,h.useHTML,null,"data-label"),e.addClass("highcharts-data-label-color-"+b.colorIndex+" "+(h.className||"")+(h.useHTML?"highcharts-tracker":""))),e.attr(x),e.css(r).shadow(h.shadow),e.added||e.add(d),a.alignDataLabel(b,e,h,null,y)):(b.dataLabel=e.destroy(),u&&(b.connector=u.destroy()))})};c.prototype.alignDataLabel=function(a,c,h,e,p){var b=this.chart,k=b.inverted,f=n(a.plotX,-9999),d=n(a.plotY,-9999),l=c.getBBox(),m,t=h.rotation, +q=h.align,E=this.visible&&(a.series.forceDL||b.isInsidePlot(f,Math.round(d),k)||e&&b.isInsidePlot(f,k?e.x+1:e.y+e.height-1,k)),r="justify"===n(h.overflow,"justify");E&&(m=h.style.fontSize,m=b.renderer.fontMetrics(m,c).b,e=v({x:k?b.plotWidth-d:f,y:Math.round(k?b.plotHeight-f:d),width:0,height:0},e),v(h,{width:l.width,height:l.height}),t?(r=!1,k=b.renderer.rotCorr(m,t),k={x:e.x+h.x+e.width/2+k.x,y:e.y+h.y+{top:0,middle:.5,bottom:1}[h.verticalAlign]*e.height},c[p?"attr":"animate"](k).attr({align:q}), +f=(t+720)%360,f=180f,"left"===q?k.y-=f?l.height:0:"center"===q?(k.x-=l.width/2,k.y-=l.height/2):"right"===q&&(k.x-=l.width,k.y-=f?0:l.height)):(c.align(h,null,e),k=c.alignAttr),r?a.isLabelJustified=this.justifyDataLabel(c,h,k,l,e,p):n(h.crop,!0)&&(E=b.isInsidePlot(k.x,k.y)&&b.isInsidePlot(k.x+l.width,k.y+l.height)),h.shape&&!t&&c.attr({anchorX:a.plotX,anchorY:a.plotY}));E||(c.attr({y:-9999}),c.placed=!1)};c.prototype.justifyDataLabel=function(a,c,e,f,p,l){var b=this.chart,h=c.align,d=c.verticalAlign, +x,m,t=a.box?0:a.padding||0;x=e.x+t;0>x&&("right"===h?c.align="left":c.x=-x,m=!0);x=e.x+f.width-t;x>b.plotWidth&&("left"===h?c.align="right":c.x=b.plotWidth-x,m=!0);x=e.y+t;0>x&&("bottom"===d?c.verticalAlign="top":c.y=-x,m=!0);x=e.y+f.height-t;x>b.plotHeight&&("top"===d?c.verticalAlign="bottom":c.y=b.plotHeight-x,m=!0);m&&(a.placed=!l,a.align(c,null,p));return m};e.pie&&(e.pie.prototype.drawDataLabels=function(){var b=this,e=b.data,h,f=b.chart,p=b.options.dataLabels,x=n(p.connectorPadding,10),k=n(p.connectorWidth, +1),l=f.plotWidth,d=f.plotHeight,u,m=p.distance,y=b.center,q=y[2]/2,E=y[1],z=0t-2?z:A,k),g._attr={visibility:Q,align:w[6]},g._pos={x:G+p.x+({left:x,right:-x}[w[6]]||0),y:A+ +p.y-10},w.x=G,w.y=A,null===b.options.size&&(v=g.getBBox().width,z=null,G-vl-x&&(z=Math.round(G+v-l+x),N[1]=Math.max(z,N[1])),0>A-D/2?N[0]=Math.max(Math.round(-A+D/2),N[0]):A+D/2>d&&(N[2]=Math.max(Math.round(A+D/2-d),N[2])),g.sideOverflow=z)}),0===C(N)||this.verifyDataLabelOverflow(N))&&(this.placeDataLabels(),z&&k&&H(this.points,function(a){var c;u=a.connector;if((g=a.dataLabel)&&g._pos&&a.visible){Q=g._attr.visibility;if(c=!u)a.connector=u=f.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+ +a.colorIndex).add(b.dataLabelsGroup),u.attr({"stroke-width":k,stroke:p.connectorColor||a.color||"#666666"});u[c?"attr":"animate"]({d:b.connectorPath(a.labelPos)});u.attr("visibility",Q)}else u&&(a.connector=u.destroy())}))},e.pie.prototype.connectorPath=function(a){var b=a.x,c=a.y;return n(this.options.dataLabels.softConnector,!0)?["M",b+("left"===a[6]?5:-5),c,"C",b,c,2*a[2]-a[4],2*a[3]-a[5],a[2],a[3],"L",a[4],a[5]]:["M",b+("left"===a[6]?5:-5),c,"L",a[2],a[3],"L",a[4],a[5]]},e.pie.prototype.placeDataLabels= +function(){H(this.points,function(a){var b=a.dataLabel;b&&a.visible&&((a=b._pos)?(b.sideOverflow&&(b._attr.width=b.getBBox().width-b.sideOverflow,b.css({width:b._attr.width+"px",textOverflow:"ellipsis"}),b.shortened=!0),b.attr(b._attr),b[b.moved?"animate":"attr"](a),b.moved=!0):b&&b.attr({y:-9999}))},this)},e.pie.prototype.alignDataLabel=q,e.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,c=this.options,e=c.center,p=c.minSize||80,l,k;null!==e[0]?l=Math.max(b[2]-Math.max(a[1],a[3]), +p):(l=Math.max(b[2]-a[1]-a[3],p),b[0]+=(a[3]-a[1])/2);null!==e[1]?l=Math.max(Math.min(l,b[2]-Math.max(a[0],a[2])),p):(l=Math.max(Math.min(l,b[2]-a[0]-a[2]),p),b[1]+=(a[0]-a[2])/2);ln(this.translatedThreshold,k.yAxis.len)),u=n(h.inside, +!!this.options.stacking);l&&(f=w(l),0>f.y&&(f.height+=f.y,f.y=0),l=f.y+f.height-k.yAxis.len,0a+c||k+db+e||f+lthis.pointCount))},pan:function(a,b){var c=this,d=c.hoverPoints,k;d&&r(d,function(a){a.setState()});r("xy"===b?[1,0]:[1],function(b){b=c[b?"xAxis":"yAxis"][0];var d=b.horiz,e=a[d?"chartX":"chartY"],d=d? +"mouseDownX":"mouseDownY",m=c[d],h=(b.pointRange||0)/2,g=b.getExtremes(),f=b.toValue(m-e,!0)+h,h=b.toValue(m+b.len-e,!0)-h,p=hp&&0>g&&(b.setExtremes(m,f,!1,!1,{trigger:"pan"}),k=!0);c[d]=e});k&&c.redraw(!1);H(c.container,{cursor:"move"})}});w(t.prototype,{select:function(a,c){var k=this,d=k.series,e=d.chart;a=b(a, +!k.selected);k.firePointEvent(a?"select":"unselect",{accumulate:c},function(){k.selected=k.options.selected=a;d.options.data[f(k,d.data)]=k.options;k.setState(a&&"select");c||r(e.getSelectedPoints(),function(a){a.selected&&a!==k&&(a.selected=a.options.selected=!1,d.options.data[f(a,d.data)]=a.options,a.setState(""),a.firePointEvent("unselect"))})})},onMouseOver:function(a){var b=this.series.chart.pointer;this.firePointEvent("mouseOver");b.runPointActions(a,this)},onMouseOut:function(){var a=this.series.chart; +this.firePointEvent("mouseOut");r(a.hoverPoints||[],function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var a=z(this.series.options.point,this.options).events,b;this.events=a;for(b in a)D(this,b,a[b]);this.hasImportedEvents=!0}},setState:function(a,c){var k=Math.floor(this.plotX),d=this.plotY,e=this.series,h=e.options.states[a]||{},f=l[e.type].marker&&e.options.marker,p=f&&!1===f.enabled,t=f&&f.states&&f.states[a]||{},n=!1===t.enabled,g= +e.stateMarkerGraphic,x=this.marker||{},q=e.chart,r=e.halo,z,v=f&&e.markerAttribs;a=a||"";if(!(a===this.state&&!c||this.selected&&"select"!==a||!1===h.enabled||a&&(n||p&&!1===t.enabled)||a&&x.states&&x.states[a]&&!1===x.states[a].enabled)){v&&(z=e.markerAttribs(this,a));if(this.graphic)this.state&&this.graphic.removeClass("highcharts-point-"+this.state),a&&this.graphic.addClass("highcharts-point-"+a),this.graphic.attr(e.pointAttribs(this,a)),z&&this.graphic.animate(z,b(q.options.chart.animation,t.animation, +f.animation)),g&&g.hide();else{if(a&&t){f=x.symbol||e.symbol;g&&g.currentSymbol!==f&&(g=g.destroy());if(g)g[c?"animate":"attr"]({x:z.x,y:z.y});else f&&(e.stateMarkerGraphic=g=q.renderer.symbol(f,z.x,z.y,z.width,z.height).add(e.markerGroup),g.currentSymbol=f);g&&g.attr(e.pointAttribs(this,a))}g&&(g[a&&q.isInsidePlot(k,d,q.inverted)?"show":"hide"](),g.element.point=this)}(k=h.halo)&&k.size?(r||(e.halo=r=q.renderer.path().add(v?e.markerGroup:e.group)),r[c?"animate":"attr"]({d:this.haloPath(k.size)}), +r.attr({"class":"highcharts-halo highcharts-color-"+b(this.colorIndex,e.colorIndex)}),r.point=this,r.attr(w({fill:this.color||e.color,"fill-opacity":k.opacity,zIndex:-1},k.attributes))):r&&r.point&&r.point.haloPath&&r.animate({d:r.point.haloPath(0)});this.state=a}},haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-a,this.plotY-a,2*a,2*a)}});w(h.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&& +q(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;b.hoverSeries=null;if(d)d.onMouseOut();this&&a.events.mouseOut&&q(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();this.setState()},setState:function(a){var c=this,e=c.options,d=c.graph,h=e.states,m=e.lineWidth,e=0;a=a||"";if(c.state!==a&&(r([c.group,c.markerGroup,c.dataLabelsGroup],function(b){b&&(c.state&&b.removeClass("highcharts-series-"+ +c.state),a&&b.addClass("highcharts-series-"+a))}),c.state=a,!h[a]||!1!==h[a].enabled)&&(a&&(m=h[a].lineWidth||m+(h[a].lineWidthPlus||0)),d&&!d.dashstyle))for(m={"stroke-width":m},d.animate(m,b(c.chart.options.chart.animation,h[a]&&h[a].animation));c["zone-graph-"+e];)c["zone-graph-"+e].attr(m),e+=1},setVisible:function(a,b){var c=this,d=c.chart,e=c.legendItem,k,h=d.options.chart.ignoreHiddenSeries,f=c.visible;k=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!f:a)?"show":"hide";r(["group", +"dataLabelsGroup","markerGroup","tracker","tt"],function(a){if(c[a])c[a][k]()});if(d.hoverSeries===c||(d.hoverPoint&&d.hoverPoint.series)===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&r(d.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});r(c.linkedSeries,function(b){b.setVisible(a,!1)});h&&(d.isDirtyBox=!0);!1!==b&&d.redraw();q(c,k)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=void 0=== +a?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);q(this,a?"select":"unselect")},drawTracker:a.drawTrackerGraph})})(K);(function(a){var D=a.Chart,C=a.each,G=a.inArray,H=a.isArray,v=a.isObject,l=a.pick,r=a.splat;D.prototype.setResponsive=function(l){var q=this.options.responsive,n=[],f=this.currentResponsive;q&&q.rules&&C(q.rules,function(c){void 0===c._id&&(c._id=a.uniqueKey());this.matchResponsiveRule(c,n,l)},this);var c=a.merge.apply(0,a.map(n,function(c){return a.find(q.rules,function(a){return a._id=== +c}).chartOptions})),n=n.toString()||void 0;n!==(f&&f.ruleIds)&&(f&&this.update(f.undoOptions,l),n?(this.currentResponsive={ruleIds:n,mergedOptions:c,undoOptions:this.currentOptions(c)},this.update(c,l)):this.currentResponsive=void 0)};D.prototype.matchResponsiveRule=function(a,q){var n=a.condition;(n.callback||function(){return this.chartWidth<=l(n.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=l(n.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=l(n.minWidth,0)&&this.chartHeight>=l(n.minHeight,0)}).call(this)&& +q.push(a._id)};D.prototype.currentOptions=function(a){function l(a,c,e,n){var b,f;for(b in a)if(!n&&-1h.length||void 0===n)return a.call(this,e,n,b,t);m=h.length;for(k=0;kb;h[k] +5*q||y){if(h[k]>E){for(r=a.call(this,e,h[c],h[k],t);r.length&&r[0]<=E;)r.shift();r.length&&(E=r[r.length-1]);z=z.concat(r)}c=k+1}if(y)break}a=r.info;if(p&&a.unitRange<=f.hour){k=z.length-1;for(c=1;cb?a-1:a;for(g=void 0;p--;)c=k[p],b=Math.abs(g- +c),g&&b<.8*w&&(null===u||b<.8*u)?(d[z[p]]&&!d[z[p+1]]?(b=p+1,g=c):b=p,z.splice(b,1)):g=c}return z});w(C.prototype,{beforeSetTickPositions:function(){var a,e=[],f=!1,b,l=this.getExtremes(),h=l.min,n=l.max,p,x=this.isXAxis&&!!this.options.breaks,l=this.options.ordinal,k=this.chart.options.chart.ignoreHiddenSeries;if(l||x){r(this.series,function(b,c){if(!(k&&!1===b.visible||!1===b.takeOrdinalPosition&&!x)&&(e=e.concat(b.processedXData),a=e.length,e.sort(function(a,b){return a-b}),a))for(c=a-1;c--;)e[c]=== +e[c+1]&&e.splice(c,1)});a=e.length;if(2b||n-e[e.length-1]>b)&&(f=!0)}f?(this.ordinalPositions=e,b=this.ordinal2lin(Math.max(h,e[0]),!0),p=Math.max(this.ordinal2lin(Math.min(n,e[e.length-1]),!0),1),this.ordinalSlope=n=(n-h)/(p-b),this.ordinalOffset=h-b*n):this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0}this.isOrdinal=l&&f;this.groupIntervalFactor=null},val2lin:function(a,e){var c= +this.ordinalPositions;if(c){var b=c.length,f,h;for(f=b;f--;)if(c[f]===a){h=f;break}for(f=b-1;f--;)if(a>c[f]||0===f){a=(a-c[f])/(c[f+1]-c[f]);h=f+a;break}e=e?h:this.ordinalSlope*(h||0)+this.ordinalOffset}else e=a;return e},lin2val:function(a,e){var c=this.ordinalPositions;if(c){var b=this.ordinalSlope,f=this.ordinalOffset,h=c.length-1,l;if(e)0>a?a=c[0]:a>h?a=c[h]:(h=Math.floor(a),l=a-h);else for(;h--;)if(e=b*h+f,a>=e){b=b*(h+1)+f;l=(a-e)/(b-e);break}return void 0!==l&&void 0!==c[h]?c[h]+(l?l*(c[h+ +1]-c[h]):0):a}return a},getExtendedPositions:function(){var a=this.chart,e=this.series[0].currentDataGrouping,f=this.ordinalIndex,b=e?e.count+e.unitName:"raw",l=this.getExtremes(),h,n;f||(f=this.ordinalIndex={});f[b]||(h={series:[],chart:a,getExtremes:function(){return{min:l.dataMin,max:l.dataMax}},options:{ordinal:!0},val2lin:C.prototype.val2lin,ordinal2lin:C.prototype.ordinal2lin},r(this.series,function(b){n={xAxis:h,xData:b.xData,chart:a,destroyGroupedData:q};n.options={dataGrouping:e?{enabled:!0, +forced:!0,approximation:"open",units:[[e.unitName,[e.count]]]}:{enabled:!1}};b.processData.apply(n);h.series.push(n)}),this.beforeSetTickPositions.apply(h),f[b]=h.ordinalPositions);return f[b]},getGroupIntervalFactor:function(a,e,f){var b;f=f.processedXData;var c=f.length,h=[];b=this.groupIntervalFactor;if(!b){for(b=0;bh?(q=u,y=c.ordinalPositions?c:u):(q=c.ordinalPositions?c:u,y=u),u=y.ordinalPositions,p>u[u.length-1]&&u.push(p),this.fixedRange=k-n,h=c.toFixedRange(null,null,d.apply(q,[m.apply(q,[n,!0])+h,!0]),d.apply(y,[m.apply(y,[k,!0])+h,!0])),h.min>=Math.min(l.dataMin,n)&&h.max<=Math.max(p,k)&&c.setExtremes(h.min,h.max,!0,!1,{trigger:"pan"}),this.mouseDownX=b,H(this.container,{cursor:"move"})):f=!0}else f=!0;f&&a.apply(this,Array.prototype.slice.call(arguments, +1))});n.prototype.gappedPath=function(){var a=this.options.gapSize,e=this.points.slice(),f=e.length-1;if(a&&0this.closestPointRange*a&&e.splice(f+1,0,{isNull:!0});return this.getGraphPath(e)}})(K);(function(a){function D(){return Array.prototype.slice.call(arguments,1)}function C(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,G(this.pointArrayMap,["y"]))}var G=a.pick,H=a.wrap,v=a.each,l=a.extend,r=a.isArray,w=a.fireEvent,q=a.Axis,n=a.Series; +l(q.prototype,{isInBreak:function(a,c){var e=a.repeat||Infinity,f=a.from,b=a.to-a.from;c=c>=f?(c-f)%e:e-(f-c)%e;return a.inclusive?c<=b:c=a)break;else if(f.isInBreak(c,a)){b-=a-c.from;break}return b},f.lin2val=function(a){var b,c; +for(c=0;c=a);c++)b.tok;)u-=p;for(;ub.to||l>b.from&&nb.from&&nb.from&&n>b.to&&n=c[0]);r++);for(r;r<=m;r++){for(;(void 0!==c[y+1]&&a[r]>=c[y+1]||r===m)&&(p=c[y],this.dataGroupInfo={start:l,length:u[0].length},l=e.apply(this,u),void 0!==l&&(f.push(p),g.push(l),h.push(this.dataGroupInfo)),l=r,u[0]=[],u[1]=[],u[2]=[],u[3]=[],y+=1,r!==m););if(r===m)break;if(t){p=this.cropStart+r;p=d&&d[p]||this.pointClass.prototype.applyOptions.apply({series:this},[k[p]]); +var v,w;for(v=0;vthis.chart.plotSizeX/e||b&&h.forced)&&(k=!0);return k? +e:0};G.prototype.setDataGrouping=function(a,b){var c;b=f(b,!0);a||(a={forced:!1,units:null});if(this instanceof G)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:a},!1);else l(this.chart.options.series,function(b){b.dataGrouping=a},!1);b&&this.chart.redraw()}})(K);(function(a){var D=a.each,C=a.Point,G=a.seriesType,H=a.seriesTypes;G("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'\x3cspan style\x3d"color:{point.color}"\x3e\u25cf\x3c/span\x3e \x3cb\x3e {series.name}\x3c/b\x3e\x3cbr/\x3eOpen: {point.open}\x3cbr/\x3eHigh: {point.high}\x3cbr/\x3eLow: {point.low}\x3cbr/\x3eClose: {point.close}\x3cbr/\x3e'}, +threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0},{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(a){return[a.open,a.high,a.low,a.close]},pointValKey:"high",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},pointAttribs:function(a,l){l=H.column.prototype.pointAttribs.call(this,a,l);var r=this.options;delete l.fill;!a.options.color&&r.upColor&&a.openb)););C(l,function(a,b){var c;void 0===a.plotY&&(a.x>=d.min&&a.x<=d.max?a.plotY=e.chartHeight-k.bottom-(k.opposite?k.height:0)+k.offset-v.top:a.shapeArgs={});a.plotX+=u;(h=l[b-1])&&h.plotX===a.plotX&&(void 0===h.stackIndex&&(h.stackIndex=0),c=h.stackIndex+1);a.stackIndex= +c})},drawPoints:function(){var c=this.points,e=this.chart,f=e.renderer,b,l,h=this.options,n=h.y,p,q,k,r,d,u,m,y=this.yAxis;for(q=c.length;q--;)k=c[q],m=k.plotX>this.xAxis.len,b=k.plotX,r=k.stackIndex,p=k.options.shape||h.shape,l=k.plotY,void 0!==l&&(l=k.plotY+n-(void 0!==r&&r*h.stackDistance)),d=r?void 0:k.plotX,u=r?void 0:k.plotY,r=k.graphic,void 0!==l&&0<=b&&!m?(r||(r=k.graphic=f.label("",null,null,p,null,null,h.useHTML).attr(this.pointAttribs(k)).css(G(h.style,k.style)).attr({align:"flag"===p? +"left":"center",width:h.width,height:h.height,"text-align":h.textAlign}).addClass("highcharts-point").add(this.markerGroup),k.graphic.div&&(k.graphic.div.point=k),r.shadow(h.shadow)),0b&&(c-=Math.round((l-b)/2),b=l);c=n[a](c,f,b,l);e&&h&&c.push("M",e,f>h?f:f+l,"L",e,h);return c}});v===q&&C(["flag","circlepin","squarepin"],function(a){q.prototype.symbols[a]=n[a]})})(K);(function(a){function D(a,b,c){this.init(a,b,c)}var C=a.addEvent,G=a.Axis,H=a.correctFloat,v=a.defaultOptions,l=a.defined,r=a.destroyObjectProperties,w=a.doc,q=a.each,n=a.fireEvent,f=a.hasTouch,c=a.isTouchDevice, +e=a.merge,z=a.pick,b=a.removeEvent,t=a.wrap,h,B={height:c?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:a.svg&&!c,margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1};v.scrollbar=e(!0,B,v.scrollbar);a.swapXY=h=function(a,b){var c= +a.length,e;if(b)for(b=0;b=p?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0),!1===c.showFull&&(0>=a&&1<=b?this.group.hide():this.group.show()),this.rendered=!0)},initEvents:function(){var a=this;a.mouseMoveHandler=function(b){var c=a.chart.pointer.normalize(b),e=a.options.vertical?"chartY":"chartX",d=a.initPositions;!a.grabbedCenter||b.touches&&0===b.touches[0][e]|| +(c=a.cursorToScrollbarPosition(c)[e],e=a[e],e=c-e,a.hasDragged=!0,a.updatePosition(d[0]+e,d[1]+e),a.hasDragged&&n(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&n(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b});a.grabbedCenter=a.hasDragged=a.chartX=a.chartY=null};a.mouseDownHandler=function(b){b=a.chart.pointer.normalize(b);b=a.cursorToScrollbarPosition(b);a.chartX=b.chartX;a.chartY=b.chartY; +a.initPositions=[a.from,a.to];a.grabbedCenter=!0};a.buttonToMinClick=function(b){var c=H(a.to-a.from)*a.options.step;a.updatePosition(H(a.from-c),H(a.to-c));n(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.buttonToMaxClick=function(b){var c=(a.to-a.from)*a.options.step;a.updatePosition(a.from+c,a.to+c);n(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})};a.trackClick=function(b){var c=a.chart.pointer.normalize(b),e=a.to-a.from,d=a.y+a.scrollbarTop,f=a.x+a.scrollbarLeft; +a.options.vertical&&c.chartY>d||!a.options.vertical&&c.chartX>f?a.updatePosition(a.from+e,a.to+e):a.updatePosition(a.from-e,a.to-e);n(a,"changed",{from:a.from,to:a.to,trigger:"scrollbar",DOMEvent:b})}},cursorToScrollbarPosition:function(a){var b=this.options,b=b.minWidth>this.calculatedWidth?b.minWidth:0;return{chartX:(a.chartX-this.x-this.xOffset)/(this.barWidth-b),chartY:(a.chartY-this.y-this.yOffset)/(this.barWidth-b)}},updatePosition:function(a,b){1a&&(b=H(b-a),a=0); +this.from=a;this.to=b},update:function(a){this.destroy();this.init(this.chart.renderer,e(!0,this.options,a),this.chart)},addEvents:function(){var a=this.options.inverted?[1,0]:[0,1],b=this.scrollbarButtons,c=this.scrollbarGroup.element,e=this.mouseDownHandler,d=this.mouseMoveHandler,h=this.mouseUpHandler,a=[[b[a[0]].element,"click",this.buttonToMinClick],[b[a[1]].element,"click",this.buttonToMaxClick],[this.track.element,"click",this.trackClick],[c,"mousedown",e],[w,"mousemove",d],[w,"mouseup",h]]; +f&&a.push([c,"touchstart",e],[w,"touchmove",d],[w,"touchend",h]);q(a,function(a){C.apply(null,a)});this._events=a},removeEvents:function(){q(this._events,function(a){b.apply(null,a)});this._events=void 0},destroy:function(){var a=this.chart.scroller;this.removeEvents();q(["track","scrollbarRifles","scrollbar","scrollbarGroup","group"],function(a){this[a]&&this[a].destroy&&(this[a]=this[a].destroy())},this);a&&this===a.scrollbar&&(a.scrollbar=null,r(a.scrollbarButtons))}};t(G.prototype,"init",function(a){var b= +this;a.apply(b,Array.prototype.slice.call(arguments,1));b.options.scrollbar&&b.options.scrollbar.enabled&&(b.options.scrollbar.vertical=!b.horiz,b.options.startOnTick=b.options.endOnTick=!1,b.scrollbar=new D(b.chart.renderer,b.options.scrollbar,b.chart),C(b.scrollbar,"changed",function(a){var c=Math.min(z(b.options.min,b.min),b.min,b.dataMin),d=Math.max(z(b.options.max,b.max),b.max,b.dataMax)-c,e;b.horiz&&!b.reversed||!b.horiz&&b.reversed?(e=c+d*this.to,c+=d*this.from):(e=c+d*(1-this.from),c+=d*(1- +this.to));b.setExtremes(c,e,!0,!1,a)}))});t(G.prototype,"render",function(a){var b=Math.min(z(this.options.min,this.min),this.min,this.dataMin),c=Math.max(z(this.options.max,this.max),this.max,this.dataMax),e=this.scrollbar,d;a.apply(this,Array.prototype.slice.call(arguments,1));if(e){this.horiz?(e.position(this.left,this.top+this.height+2+this.chart.scrollbarsOffsets[1]+(this.opposite?0:this.axisTitleMargin+this.offset),this.width,this.height),d=1):(e.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+ +(this.opposite?this.axisTitleMargin+this.offset:0),this.top,this.width,this.height),d=0);if(!this.opposite&&!this.horiz||this.opposite&&this.horiz)this.chart.scrollbarsOffsets[d]+=this.scrollbar.size+this.scrollbar.options.margin;isNaN(b)||isNaN(c)||!l(this.min)||!l(this.max)?e.setRange(0,0):(d=(this.min-b)/(c-b),b=(this.max-b)/(c-b),this.horiz&&!this.reversed||!this.horiz&&this.reversed?e.setRange(d,b):e.setRange(1-b,1-d))}});t(G.prototype,"getOffset",function(a){var b=this.horiz?2:1,c=this.scrollbar; +a.apply(this,Array.prototype.slice.call(arguments,1));c&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[b]+=c.size+c.options.margin)});t(G.prototype,"destroy",function(a){this.scrollbar&&(this.scrollbar=this.scrollbar.destroy());a.apply(this,Array.prototype.slice.call(arguments,1))});a.Scrollbar=D})(K);(function(a){function D(a){this.init(a)}var C=a.addEvent,G=a.Axis,H=a.Chart,v=a.color,l=a.defaultOptions,r=a.defined,w=a.destroyObjectProperties,q=a.doc,n=a.each,f=a.erase,c=a.error,e=a.extend, +z=a.grep,b=a.hasTouch,t=a.isNumber,h=a.isObject,B=a.merge,p=a.pick,x=a.removeEvent,k=a.Scrollbar,F=a.Series,d=a.seriesTypes,u=a.wrap,m=a.swapXY,y=[].concat(a.defaultDataGroupingUnits),J=function(a){var b=z(arguments,t);if(b.length)return Math[a].apply(0,b)};y[4]=["day",[1,2,3,4]];y[5]=["week",[1,2,3]];d=void 0===d.areaspline?"line":"areaspline";e(l,{navigator:{height:40,margin:25,maskInside:!0,handles:{backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:v("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc", +outlineWidth:1,series:{type:d,color:"#335cad",fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:y},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},pointRange:0,shadow:!1,threshold:null},xAxis:{className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left", +style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});D.prototype={drawHandle:function(a,b,c,d){this.handles[b][d](c?{translateX:Math.round(this.left+this.height/2-8),translateY:Math.round(this.top+parseInt(a,10)+.5)}:{translateX:Math.round(this.left+parseInt(a,10)),translateY:Math.round(this.top+this.height/ +2-8)})},getHandlePath:function(a){return m(["M",-4.5,.5,"L",3.5,.5,"L",3.5,15.5,"L",-4.5,15.5,"L",-4.5,.5,"M",-1.5,4,"L",-1.5,12,"M",.5,4,"L",.5,12],a)},drawOutline:function(a,b,c,d){var g=this.navigatorOptions.maskInside,e=this.outline.strokeWidth(),f=e/2,e=e%2/2,h=this.outlineHeight,k=this.scrollbarHeight,m=this.size,l=this.left-k,n=this.top;c?(l-=f,c=n+b+e,b=n+a+e,a=["M",l+h,n-k-e,"L",l+h,c,"L",l,c,"L",l,b,"L",l+h,b,"L",l+h,n+m+k].concat(g?["M",l+h,c-f,"L",l+h,b+f]:[])):(a+=l+k-e,b+=l+k-e,n+=f, +a=["M",l,n,"L",a,n,"L",a,n+h,"L",b,n+h,"L",b,n,"L",l+m+2*k,n].concat(g?["M",a-f,n,"L",b+f,n]:[]));this.outline[d]({d:a})},drawMasks:function(a,b,c,d){var g=this.left,e=this.top,f=this.height,h,k,l,m;c?(l=[g,g,g],m=[e,e+a,e+b],k=[f,f,f],h=[a,b-a,this.size-b]):(l=[g,g+a,g+b],m=[e,e,e],k=[a,b-a,this.size-b],h=[f,f,f]);n(this.shades,function(a,b){a[d]({x:l[b],y:m[b],width:k[b],height:h[b]})})},renderElements:function(){var a=this,b=a.navigatorOptions,c=b.maskInside,d=a.chart,e=d.inverted,f=d.renderer, +h;a.navigatorGroup=h=f.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();var k={cursor:e?"ns-resize":"ew-resize"};n([!c,c,!c],function(c,d){a.shades[d]=f.rect().addClass("highcharts-navigator-mask"+(1===d?"-inside":"-outside")).attr({fill:c?b.maskFill:"transparent"}).css(1===d&&k).add(h)});a.outline=f.path().addClass("highcharts-navigator-outline").attr({"stroke-width":b.outlineWidth,stroke:b.outlineColor}).add(h);n([0,1],function(c){a.handles[c]=f.path(a.getHandlePath(e)).attr({zIndex:7- +c}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][c]).add(h);var d=b.handles;a.handles[c].attr({fill:d.backgroundColor,stroke:d.borderColor,"stroke-width":1}).css(k)})},update:function(a){this.destroy();B(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(a,b,c,d){var g=this.chart,e,f,h=this.scrollbarHeight,k,l=this.xAxis;e=this.navigatorEnabled;var m,n=this.rendered;f=g.inverted;var q=g.xAxis[0].minRange;if(!this.hasDragged|| +r(c)){if(!t(a)||!t(b))if(n)c=0,d=l.width;else return;this.left=p(l.left,g.plotLeft+h+(f?g.plotWidth:0));this.size=m=k=p(l.len,(f?g.plotHeight:g.plotWidth)-2*h);g=f?h:k+2*h;c=p(c,l.toPixels(a,!0));d=p(d,l.toPixels(b,!0));t(c)&&Infinity!==Math.abs(c)||(c=0,d=g);a=l.toValue(c,!0);b=l.toValue(d,!0);if(Math.abs(b-a)=h&&(a=h-k,m=this.getUnionExtremes().dataMax), +a!==e&&(this.fixedWidth=k,b=d.toFixedRange(a,a+k,null,m),c.xAxis[0].setExtremes(Math.min(b.min,b.max),Math.max(b.min,b.max),!0,null,{trigger:"navigator"})))},handlesMousedown:function(a,b){this.chart.pointer.normalize(a);a=this.chart;var c=a.xAxis[0],d=a.inverted&&!c.reversed||!a.inverted&&c.reversed;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=d?c.min:c.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=d?c.max:c.min);a.fixedRange=null}, +onMouseMove:function(a){var b=this,c=b.chart,d=b.left,e=b.navigatorSize,f=b.range,h=b.dragOffset,k=c.inverted;a.touches&&0===a.touches[0].pageX||(a=c.pointer.normalize(a),c=a.chartX,k&&(d=b.top,c=a.chartY),b.grabbedLeft?(b.hasDragged=!0,b.render(0,0,c-d,b.otherHandlePos)):b.grabbedRight?(b.hasDragged=!0,b.render(0,0,b.otherHandlePos,c-d)):b.grabbedCenter&&(b.hasDragged=!0,ce+h-f&&(c=e+h-f),b.render(0,0,c-h,c-h+f)),b.hasDragged&&b.scrollbar&&b.scrollbar.options.liveRedraw&&(a.DOMType=a.type, +setTimeout(function(){b.onMouseUp(a)},0)))},onMouseUp:function(a){var b=this.chart,c=this.xAxis,d=this.scrollbar,e,f,h=a.DOMEvent||a;(!this.hasDragged||d&&d.hasDragged)&&"scrollbar"!==a.trigger||(this.zoomedMin===this.otherHandlePos?e=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(f=this.fixedExtreme),this.zoomedMax===this.size&&(f=this.getUnionExtremes().dataMax),c=c.toFixedRange(this.zoomedMin,this.zoomedMax,e,f),r(c.min)&&b.xAxis[0].setExtremes(Math.min(c.min,c.max),Math.max(c.min,c.max), +!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:h}));"mousemove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(n(this.eventsToUnbind,function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()},removeBaseSeriesEvents:function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&!1!== +this.navigatorOptions.adaptToUpdatedData&&(n(a,function(a){x(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&x(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))},init:function(a){var b=a.options,c=b.navigator,d=c.enabled,e=b.scrollbar,f=e.enabled,b=d?c.height:0,h=f?e.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=b;this.scrollbarHeight=h;this.scrollbarEnabled=f;this.navigatorEnabled=d;this.navigatorOptions=c;this.scrollbarOptions=e;this.outlineHeight= +b+h;this.opposite=p(c.opposite,!d&&a.inverted);var l=this,e=l.baseSeries,f=a.xAxis.length,m=a.yAxis.length,n=e&&e[0]&&e[0].xAxis||a.xAxis[0];a.extraMargin={type:l.opposite?"plotTop":"marginBottom",value:(d||!a.inverted?l.outlineHeight:0)+c.margin};a.inverted&&(a.extraMargin.type=l.opposite?"marginRight":"plotLeft");a.isDirtyBox=!0;l.navigatorEnabled?(l.xAxis=new G(a,B({breaks:n.options.breaks,ordinal:n.options.ordinal},c.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime", +index:f,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[h,0,-h,0],width:b}:{offsets:[0,-h,0,h],height:b})),l.yAxis=new G(a,B(c.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:m,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),e||c.series.data?l.addBaseSeries():0===a.series.length&&u(a,"redraw",function(b,c){0=Math.round(a.size);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,!1,null,!1))},addChartEvents:function(){C(this.chart,"redraw",function(){var a=this.navigator,b=a&&(a.baseSeries&&a.baseSeries[0]&&a.baseSeries[0].xAxis||a.scrollbar&&this.xAxis[0]);b&&a.render(b.min,b.max)})},destroy:function(){this.removeEvents();this.xAxis&& +(f(this.chart.xAxis,this.xAxis),f(this.chart.axes,this.xAxis));this.yAxis&&(f(this.chart.yAxis,this.yAxis),f(this.chart.axes,this.yAxis));n(this.series||[],function(a){a.destroy&&a.destroy()});n("series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" "),function(a){this[a]&&this[a].destroy&&this[a].destroy();this[a]=null},this);n([this.handles],function(a){w(a)},this)}};a.Navigator=D;u(G.prototype,"zoom",function(a,b,c){var d=this.chart, +e=d.options,g=e.chart.zoomType,f=e.navigator,e=e.rangeSelector,h;this.isXAxis&&(f&&f.enabled||e&&e.enabled)&&("x"===g?d.resetZoomButton="blocked":"y"===g?h=!1:"xy"===g&&(d=this.previousZoom,r(b)?this.previousZoom=[this.min,this.max]:d&&(b=d[0],c=d[1],delete this.previousZoom)));return void 0!==h?h:a.call(this,b,c)});u(H.prototype,"init",function(a,b,c){C(this,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new D(this)});a.call(this, +b,c)});u(H.prototype,"setChartSize",function(a){var b=this.legend,c=this.navigator,d,e,f,h;a.apply(this,[].slice.call(arguments,1));c&&(e=b.options,f=c.xAxis,h=c.yAxis,d=c.scrollbarHeight,this.inverted?(c.left=c.opposite?this.chartWidth-d-c.height:this.spacing[3]+d,c.top=this.plotTop+d):(c.left=this.plotLeft+d,c.top=c.navigatorOptions.top||this.chartHeight-c.height-d-this.spacing[2]-("bottom"===e.verticalAlign&&e.enabled&&!e.floating?b.legendHeight+p(e.margin,10):0)),f&&h&&(this.inverted?f.options.left= +h.options.left=c.left:f.options.top=h.options.top=c.top,f.setAxisSize(),h.setAxisSize()))});u(F.prototype,"addPoint",function(a,b,d,e,f){var g=this.options.turboThreshold;g&&this.xData.length>g&&h(b,!0)&&this.chart.navigator&&c(20,!0);a.call(this,b,d,e,f)});u(H.prototype,"addSeries",function(a,b,c,d){a=a.call(this,b,!1,d);this.navigator&&this.navigator.setBaseSeries();p(c,!0)&&this.redraw();return a});u(F.prototype,"update",function(a,b,c){a.call(this,b,!1);this.chart.navigator&&this.chart.navigator.setBaseSeries(); +p(c,!0)&&this.chart.redraw()});H.prototype.callbacks.push(function(a){var b=a.navigator;b&&(a=a.xAxis[0].getExtremes(),b.render(a.min,a.max))})})(K);(function(a){function D(a){this.init(a)}var C=a.addEvent,G=a.Axis,H=a.Chart,v=a.css,l=a.createElement,r=a.dateFormat,w=a.defaultOptions,q=w.global.useUTC,n=a.defined,f=a.destroyObjectProperties,c=a.discardElement,e=a.each,z=a.extend,b=a.fireEvent,t=a.Date,h=a.isNumber,B=a.merge,p=a.pick,x=a.pInt,k=a.splat,F=a.wrap;z(w,{rangeSelector:{buttonTheme:{"stroke-width":0, +width:28,height:18,padding:2,zIndex:7},height:35,inputPosition:{align:"right"},labelStyle:{color:"#666666"}}});w.lang=B(w.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});D.prototype={clickButton:function(a,b){var c=this,d=c.chart,f=c.buttonOptions[a],l=d.xAxis[0],n=d.scroller&&d.scroller.getUnionExtremes()||l||{},g=n.dataMin,r=n.dataMax,t,u=l&&Math.round(Math.min(l.max,p(r,l.max))),v=f.type,w,n=f._range,x,z,B,D=f.dataGrouping;if(null!==g&&null!==r){d.fixedRange=n;D&& +(this.forcedDataGrouping=!0,G.prototype.setDataGrouping.call(l||{chart:this.chart},D,!1));if("month"===v||"year"===v)l?(v={range:f,max:u,dataMin:g,dataMax:r},t=l.minFromRange.call(v),h(v.newMax)&&(u=v.newMax)):n=f;else if(n)t=Math.max(u-n,g),u=Math.min(t+n,r);else if("ytd"===v)if(l)void 0===r&&(g=Number.MAX_VALUE,r=Number.MIN_VALUE,e(d.series,function(a){a=a.xData;g=Math.min(a[0],g);r=Math.max(a[a.length-1],r)}),b=!1),u=c.getYTDExtremes(r,g,q),t=x=u.min,u=u.max;else{C(d,"beforeRender",function(){c.clickButton(a)}); +return}else"all"===v&&l&&(t=g,u=r);c.setSelected(a);l?l.setExtremes(t,u,p(b,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:f}):(w=k(d.options.xAxis)[0],B=w.range,w.range=n,z=w.min,w.min=x,C(d,"load",function(){w.range=B;w.min=z}))}},setSelected:function(a){this.selected=this.options.selected=a},defaultButtons:[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}], +init:function(a){var c=this,d=a.options.rangeSelector,f=d.buttons||[].concat(c.defaultButtons),h=d.selected,k=function(){var a=c.minInput,d=c.maxInput;a&&a.blur&&b(a,"blur");d&&d.blur&&b(d,"blur")};c.chart=a;c.options=d;c.buttons=[];a.extraTopMargin=d.height;c.buttonOptions=f;this.unMouseDown=C(a.container,"mousedown",k);this.unResize=C(a,"resize",k);e(f,c.computeButtonRange);void 0!==h&&f[h]&&this.clickButton(h,!1);C(a,"load",function(){C(a.xAxis[0],"setExtremes",function(b){this.max-this.min!== +a.fixedRange&&"rangeSelectorButton"!==b.trigger&&"updatedData"!==b.trigger&&c.forcedDataGrouping&&this.setDataGrouping(!1,!1)})})},updateButtonStates:function(){var a=this.chart,b=a.xAxis[0],c=Math.round(b.max-b.min),f=!b.hasVisibleSeries,a=a.scroller&&a.scroller.getUnionExtremes()||b,k=a.dataMin,l=a.dataMax,a=this.getYTDExtremes(l,k,q),n=a.min,g=a.max,p=this.selected,r=h(p),t=this.options.allButtonsEnabled,v=this.buttons;e(this.buttonOptions,function(a,d){var e=a._range,h=a.type,m=a.count||1;a=v[d]; +var q=0;d=d===p;var u=e>l-k,y=e=864E5*{month:28,year:365}[h]*m&&c<=864E5*{month:31,year:366}[h]*m?e=!0:"ytd"===h?(e=g-n===c,w=!d):"all"===h&&(e=b.max-b.min>=l-k,x=!d&&r&&e);h=!t&&(u||y||x||f);e=d&&e||e&&!r&&!w;h?q=3:e&&(r=!0,q=2);a.state!==q&&a.setState(q)})},computeButtonRange:function(a){var b=a.type,c=a.count||1,d={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(d[b])a._range=d[b]*c;else if("month"===b||"year"=== +b)a._range=864E5*{month:30,year:365}[b]*c},setInputValue:function(a,b){var c=this.chart.options.rangeSelector,d=this[a+"Input"];n(b)&&(d.previousValue=d.HCTime,d.HCTime=b);d.value=r(c.inputEditDateFormat||"%Y-%m-%d",d.HCTime);this[a+"DateBox"].attr({text:r(c.inputDateFormat||"%b %e, %Y",d.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];v(this[a+"Input"],{left:b.translateX+c.x+"px",top:b.translateY+"px",width:c.width-2+"px",height:c.height-2+"px",border:"2px solid silver"})}, +hideInput:function(a){v(this[a+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(a)},drawInput:function(a){function b(){var a=p.value,b=(k.inputDateParser||Date.parse)(a),e=d.xAxis[0],g=d.scroller&&d.scroller.xAxis?d.scroller.xAxis:e,f=g.dataMin,g=g.dataMax;b!==p.previousValue&&(p.previousValue=b,h(b)||(b=a.split("-"),b=Date.UTC(x(b[0]),x(b[1])-1,x(b[2]))),h(b)&&(q||(b+=6E4*(new Date).getTimezoneOffset()),n?b>c.maxInput.HCTime?b=void 0:bg&&(b= +g),void 0!==b&&e.setExtremes(n?b:e.min,n?e.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}var c=this,d=c.chart,e=d.renderer.style||{},f=d.renderer,k=d.options.rangeSelector,g=c.div,n="min"===a,p,r,t=this.inputGroup;this[a+"Label"]=r=f.label(w.lang[n?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(t);t.offset+=r.width+5;this[a+"DateBox"]=f=f.label("",t.offset).addClass("highcharts-range-input").attr({padding:2,width:k.inputBoxWidth|| +90,height:k.inputBoxHeight||17,stroke:k.inputBoxBorderColor||"#cccccc","stroke-width":1,"text-align":"center"}).on("click",function(){c.showInput(a);c[a+"Input"].focus()}).add(t);t.offset+=f.width+(n?10:0);this[a+"Input"]=p=l("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:d.plotTop+"px"},g);r.css(B(e,k.labelStyle));f.css(B({color:"#333333"},e,k.inputStyle));v(p,z({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:e.fontSize,fontFamily:e.fontFamily, +left:"-9em"},k.inputStyle));p.onfocus=function(){c.showInput(a)};p.onblur=function(){c.hideInput(a)};p.onchange=b;p.onkeypress=function(a){13===a.keyCode&&b()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a=p((b.buttonPosition||{}).y,a.plotTop-a.axisOffset[0]-b.height);return{buttonTop:a,inputTop:a-10}},getYTDExtremes:function(a,b,c){var d=new t(a),e=d[t.hcGetFullYear]();c=c?t.UTC(e,0,1):+new t(e,0,1);b=Math.max(b||0,c);d=d.getTime();return{max:Math.min(a||d,d),min:b}},render:function(a, +b){var c=this,d=c.chart,f=d.renderer,h=d.container,k=d.options,g=k.exporting&&!1!==k.exporting.enabled&&k.navigation&&k.navigation.buttonOptions,q=k.rangeSelector,r=c.buttons,k=w.lang,t=c.div,t=c.inputGroup,u=q.buttonTheme,v=q.buttonPosition||{},x=q.inputEnabled,B=u&&u.states,C=d.plotLeft,D,F=this.getPosition(),G=c.group,H=c.rendered;!1!==q.enabled&&(H||(c.group=G=f.g("range-selector-buttons").add(),c.zoomText=f.text(k.rangeSelectorZoom,p(v.x,C),15).css(q.labelStyle).add(G),D=p(v.x,C)+c.zoomText.getBBox().width+ +5,e(c.buttonOptions,function(a,b){r[b]=f.button(a.text,D,0,function(){c.clickButton(b);c.isActive=!0},u,B&&B.hover,B&&B.select,B&&B.disabled).attr({"text-align":"center"}).add(G);D+=r[b].width+p(q.buttonSpacing,5)}),!1!==x&&(c.div=t=l("div",null,{position:"relative",height:0,zIndex:1}),h.parentNode.insertBefore(t,h),c.inputGroup=t=f.g("input-group").add(),t.offset=0,c.drawInput("min"),c.drawInput("max"))),c.updateButtonStates(),G[H?"animate":"attr"]({translateY:F.buttonTop}),!1!==x&&(t.align(z({y:F.inputTop, +width:t.offset,x:g&&F.inputTop<(g.y||0)+g.height-d.spacing[0]?-40:0},q.inputPosition),!0,d.spacingBox),n(x)||(d=G.getBBox(),t[t.alignAttr.translateXc&&(e?a=b-d:b=a+d);h(a)||(a=b=void 0);return{min:a,max:b}};G.prototype.minFromRange=function(){var a=this.range,b={month:"Month",year:"FullYear"}[a.type], +c,e=this.max,f,k,l=function(a,c){var d=new Date(a);d["set"+b](d["get"+b]()+c);return d.getTime()-a};h(a)?(c=e-a,k=a):(c=e+l(e,-a.count),this.chart&&(this.chart.fixedRange=e-c));f=p(this.dataMin,Number.MIN_VALUE);h(c)||(c=f);c<=f&&(c=f,void 0===k&&(k=l(c,a.count)),this.newMax=Math.min(c+k,this.dataMax));h(e)||(c=void 0);return c};F(H.prototype,"init",function(a,b,c){C(this,"init",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new D(this))});a.call(this,b,c)});H.prototype.callbacks.push(function(a){function b(){c= +a.xAxis[0].getExtremes();h(c.min)&&d.render(c.min,c.max)}var c,d=a.rangeSelector,e,f;d&&(f=C(a.xAxis[0],"afterSetExtremes",function(a){d.render(a.min,a.max)}),e=C(a,"redraw",b),b());C(a,"destroy",function(){d&&(e(),f())})});a.RangeSelector=D})(K);(function(a){var D=a.arrayMax,C=a.arrayMin,G=a.Axis,H=a.Chart,v=a.defined,l=a.each,r=a.extend,w=a.format,q=a.inArray,n=a.isNumber,f=a.isString,c=a.map,e=a.merge,z=a.pick,b=a.Point,t=a.Renderer,h=a.Series,B=a.splat,p=a.SVGRenderer,x=a.VMLRenderer,k=a.wrap, +F=h.prototype,d=F.init,u=F.processData,m=b.prototype.tooltipFormatter;a.StockChart=a.stockChart=function(b,d,h){var k=f(b)||b.nodeName,g=arguments[k?1:0],l=g.series,m=a.getOptions(),n,p=z(g.navigator&&g.navigator.enabled,m.navigator.enabled,!0),q=p?{startOnTick:!1,endOnTick:!1}:null,r={marker:{enabled:!1,radius:2}},t={shadow:!1,borderWidth:0};g.xAxis=c(B(g.xAxis||{}),function(a){return e({minPadding:0,maxPadding:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},m.xAxis, +a,{type:"datetime",categories:null},q)});g.yAxis=c(B(g.yAxis||{}),function(a){n=z(a.opposite,!0);return e({labels:{y:-2},opposite:n,showLastLabel:!1,title:{text:null}},m.yAxis,a)});g.series=null;g=e({chart:{panning:!0,pinchType:"x"},navigator:{enabled:p},scrollbar:{enabled:z(m.scrollbar.enabled,!0)},rangeSelector:{enabled:z(m.rangeSelector.enabled,!0)},title:{text:null},tooltip:{shared:!0,crosshairs:!0},legend:{enabled:!1},plotOptions:{line:r,spline:r,area:r,areaspline:r,arearange:r,areasplinerange:r, +column:t,columnrange:t,candlestick:t,ohlc:t}},g,{isStock:!0});g.series=l;return k?new H(b,g,h):new H(g,d)};k(G.prototype,"autoLabelAlign",function(a){var b=this.chart,c=this.options,b=b._labelPanes=b._labelPanes||{},d=this.options.labels;return this.chart.options.isStock&&"yAxis"===this.coll&&(c=c.top+","+c.height,!b[c]&&d.enabled)?(15===d.x&&(d.x=0),void 0===d.align&&(d.align="right"),b[c]=this,"right"):a.call(this,[].slice.call(arguments,1))});k(G.prototype,"destroy",function(a){var b=this.chart, +c=this.options&&this.options.top+","+this.options.height;c&&b._labelPanes&&b._labelPanes[c]===this&&delete b._labelPanes[c];return a.call(this,Array.prototype.slice.call(arguments,1))});k(G.prototype,"getPlotLinePath",function(a,b,d,e,g,h){var k=this,m=this.isLinked&&!this.series?this.linkedParent.series:this.series,p=k.chart,r=p.renderer,t=k.left,u=k.top,w,x,y,B,E=[],C=[],D,F;if("colorAxis"===k.coll)return a.apply(this,[].slice.call(arguments,1));C=function(a){var b="xAxis"===a?"yAxis":"xAxis";a= +k.options[b];return n(a)?[p[b][a]]:f(a)?[p.get(a)]:c(m,function(a){return a[b]})}(k.coll);l(k.isXAxis?p.yAxis:p.xAxis,function(a){if(v(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis",b=v(a.options[b])?p[b][a.options[b]]:p[b][0];k===b&&C.push(a)}});D=C.length?[]:[k.isXAxis?p.yAxis[0]:p.xAxis[0]];l(C,function(a){-1===q(a,D)&&D.push(a)});F=z(h,k.translate(b,null,null,e));n(F)&&(k.horiz?l(D,function(a){var b;x=a.pos;B=x+a.len;w=y=Math.round(F+k.transB);if(wt+k.width)g?w=y=Math.min(Math.max(t,w),t+k.width):b=!0;b||E.push("M",w,x,"L",y,B)}):l(D,function(a){var b;w=a.pos;y=w+a.len;x=B=Math.round(u+k.height-F);if(xu+k.height)g?x=B=Math.min(Math.max(u,x),k.top+k.height):b=!0;b||E.push("M",w,x,"L",y,B)}));return 0=e&&(u=-(l.translateX+b.width-e));l.attr({x:m+u,y:k,anchorX:h?m:this.opposite?0:a.chartWidth,anchorY:h?this.opposite?a.chartHeight:0:k+b.height/2})}});F.init=function(){d.apply(this,arguments);this.setCompare(this.options.compare)};F.setCompare=function(a){this.modifyValue="value"===a||"percent"===a?function(b,c){var d=this.compareValue;if(void 0!==b&&void 0!==d)return b="value"===a?b-d:b/d*100-(100===this.options.compareBase?0:100),c&&(c.change=b),b}:null;this.userOptions.compare= +a;this.chart.hasRendered&&(this.isDirty=!0)};F.processData=function(){var a,b=-1,c,d,e,f;u.apply(this,arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,d=this.processedYData,e=d.length,this.pointArrayMap&&(b=q("close",this.pointArrayMap),-1===b&&(b=q(this.pointValKey||"y",this.pointArrayMap))),a=0;a=this.xAxis.min&&0!==f){this.compareValue=f;break}};k(F,"getExtremes",function(a){var b;a.apply(this,[].slice.call(arguments,1));this.modifyValue&& +(b=[this.modifyValue(this.dataMin),this.modifyValue(this.dataMax)],this.dataMin=C(b),this.dataMax=D(b))});G.prototype.setCompare=function(a,b){this.isXAxis||(l(this.series,function(b){b.setCompare(a)}),z(b,!0)&&this.chart.redraw())};b.prototype.tooltipFormatter=function(b){b=b.replace("{point.change}",(0 asset_path('jquery.min.js', active_page), :type => "text/javascript"} %script{:src => asset_path('bootstrap/js/bootstrap.min.js', active_page), :type => "text/javascript"} %script{:src => asset_path('highstock.js', active_page), :type => "text/javascript"} + %script{:src => asset_path('exporting.js', active_page), :type => "text/javascript"} + %script{:src => asset_path('export-csv.js', active_page), :type => "text/javascript"} %body %div.navbar.navbar-fixed-top %div.navbar-inner