/*
 Highstock JS v5.0.11 (2017-05-04)

 (c) 2009-2016 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(K,T){"object"===typeof module&&module.exports?module.exports=K.document?T(K):T:K.Highcharts=T(K)})("undefined"!==typeof window?window:this,function(K){K=function(){var a=window,A=a.document,B=a.navigator&&a.navigator.userAgent||"",D=A&&A.createElementNS&&!!A.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,E=/(edge|msie|trident)/i.test(B)&&!window.opera,q=!D,f=/Firefox/.test(B),g=f&&4>parseInt(B.split("Firefox/")[1],10);return a.Highcharts?a.Highcharts.error(16,!0):{product:"Highstock",
version:"5.0.11",deg2rad:2*Math.PI/360,doc:A,hasBidiBug:g,hasTouch:A&&void 0!==A.documentElement.ontouchstart,isMS:E,isWebKit:/AppleWebKit/.test(B),isFirefox:f,isTouchDevice:/(Mobile|Android|Windows Phone)/.test(B),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:D,vml:q,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();(function(a){var A=[],B=a.charts,D=a.doc,E=a.win;a.error=function(q,f){q=a.isNumber(q)?"Highcharts error #"+
q+": www.highcharts.com/errors/"+q:q;if(f)throw Error(q);E.console&&console.log(q)};a.Fx=function(a,f,g){this.options=f;this.elem=a;this.prop=g};a.Fx.prototype={dSetter:function(){var a=this.paths[0],f=this.paths[1],g=[],z=this.now,p=a.length,t;if(1===z)g=this.toD;else if(p===f.length&&1>z)for(;p--;)t=parseFloat(a[p]),g[p]=isNaN(t)?a[p]:z*parseFloat(f[p]-t)+t;else g=f;this.elem.attr("d",g,null,!0)},update:function(){var a=this.elem,f=this.prop,g=this.now,z=this.options.step;if(this[f+"Setter"])this[f+
"Setter"]();else a.attr?a.element&&a.attr(f,g,null,!0):a.style[f]=g+this.unit;z&&z.call(a,g,this)},run:function(a,f,g){var q=this,p=function(a){return p.stopped?!1:q.step(a)},t;this.startTime=+new Date;this.start=a;this.end=f;this.unit=g;this.now=this.start;this.pos=0;p.elem=this.elem;p.prop=this.prop;p()&&1===A.push(p)&&(p.timerId=setInterval(function(){for(t=0;t<A.length;t++)A[t]()||A.splice(t--,1);A.length||clearInterval(p.timerId)},13))},step:function(q){var f=+new Date,g,z=this.options,p=this.elem,
t=z.complete,e=z.duration,c=z.curAnim;p.attr&&!p.element?q=!1:q||f>=e+this.startTime?(this.now=this.end,this.pos=1,this.update(),g=c[this.prop]=!0,a.objectEach(c,function(a){!0!==a&&(g=!1)}),g&&t&&t.call(p),q=!1):(this.pos=z.easing((f-this.startTime)/e),this.now=this.start+(this.end-this.start)*this.pos,this.update(),q=!0);return q},initPath:function(q,f,g){function z(a){var b,k;for(y=a.length;y--;)b="M"===a[y]||"L"===a[y],k=/[a-zA-Z]/.test(a[y+3]),b&&k&&a.splice(y+1,0,a[y+1],a[y+2],a[y+1],a[y+2])}
function p(a,m){for(;a.length<k;){a[0]=m[k-a.length];var c=a.slice(0,b);[].splice.apply(a,[0,0].concat(c));u&&(c=a.slice(a.length-b),[].splice.apply(a,[a.length,0].concat(c)),y--)}a[0]="M"}function t(a,m){for(var c=(k-a.length)/b;0<c&&c--;)n=a.slice().splice(a.length/I-b,b*I),n[0]=m[k-b-c*b],v&&(n[b-6]=n[b-2],n[b-5]=n[b-1]),[].splice.apply(a,[a.length/I,0].concat(n)),u&&c--}f=f||"";var e,c=q.startX,r=q.endX,v=-1<f.indexOf("C"),b=v?7:3,k,n,y;f=f.split(" ");g=g.slice();var u=q.isArea,I=u?2:1,G;v&&(z(f),
z(g));if(c&&r){for(y=0;y<c.length;y++)if(c[y]===r[0]){e=y;break}else if(c[0]===r[r.length-c.length+y]){e=y;G=!0;break}void 0===e&&(f=[])}f.length&&a.isNumber(e)&&(k=g.length+e*I*b,G?(p(f,g),t(g,f)):(p(g,f),t(f,g)));return[f,g]}};a.extend=function(a,f){var g;a||(a={});for(g in f)a[g]=f[g];return a};a.merge=function(){var q,f=arguments,g,z={},p=function(t,e){"object"!==typeof t&&(t={});a.objectEach(e,function(c,r){!a.isObject(c,!0)||a.isClass(c)||a.isDOMElement(c)?t[r]=e[r]:t[r]=p(t[r]||{},c)});return t};
!0===f[0]&&(z=f[1],f=Array.prototype.slice.call(f,2));g=f.length;for(q=0;q<g;q++)z=p(z,f[q]);return z};a.pInt=function(a,f){return parseInt(a,f||10)};a.isString=function(a){return"string"===typeof a};a.isArray=function(a){a=Object.prototype.toString.call(a);return"[object Array]"===a||"[object Array Iterator]"===a};a.isObject=function(q,f){return!!q&&"object"===typeof q&&(!f||!a.isArray(q))};a.isDOMElement=function(q){return a.isObject(q)&&"number"===typeof q.nodeType};a.isClass=function(q){var f=
q&&q.constructor;return!(!a.isObject(q,!0)||a.isDOMElement(q)||!f||!f.name||"Object"===f.name)};a.isNumber=function(a){return"number"===typeof a&&!isNaN(a)};a.erase=function(a,f){for(var g=a.length;g--;)if(a[g]===f){a.splice(g,1);break}};a.defined=function(a){return void 0!==a&&null!==a};a.attr=function(q,f,g){var z;a.isString(f)?a.defined(g)?q.setAttribute(f,g):q&&q.getAttribute&&(z=q.getAttribute(f)):a.defined(f)&&a.isObject(f)&&a.objectEach(f,function(a,t){q.setAttribute(t,a)});return z};a.splat=
function(q){return a.isArray(q)?q:[q]};a.syncTimeout=function(a,f,g){if(f)return setTimeout(a,f,g);a.call(0,g)};a.pick=function(){var a=arguments,f,g,z=a.length;for(f=0;f<z;f++)if(g=a[f],void 0!==g&&null!==g)return g};a.css=function(q,f){a.isMS&&!a.svg&&f&&void 0!==f.opacity&&(f.filter="alpha(opacity\x3d"+100*f.opacity+")");a.extend(q.style,f)};a.createElement=function(q,f,g,z,p){q=D.createElement(q);var t=a.css;f&&a.extend(q,f);p&&t(q,{padding:0,border:"none",margin:0});g&&t(q,g);z&&z.appendChild(q);
return q};a.extendClass=function(q,f){var g=function(){};g.prototype=new q;a.extend(g.prototype,f);return g};a.pad=function(a,f,g){return Array((f||2)+1-String(a).length).join(g||0)+a};a.relativeLength=function(a,f){return/%$/.test(a)?f*parseFloat(a)/100:parseFloat(a)};a.wrap=function(a,f,g){var q=a[f];a[f]=function(){var a=Array.prototype.slice.call(arguments),t=arguments,e=this;e.proceed=function(){q.apply(e,arguments.length?arguments:t)};a.unshift(q);a=g.apply(this,a);e.proceed=null;return a}};
a.getTZOffset=function(q){var f=a.Date;return 6E4*(f.hcGetTimezoneOffset&&f.hcGetTimezoneOffset(q)||f.hcTimezoneOffset||0)};a.dateFormat=function(q,f,g){if(!a.defined(f)||isNaN(f))return a.defaultOptions.lang.invalidDate||"";q=a.pick(q,"%Y-%m-%d %H:%M:%S");var z=a.Date,p=new z(f-a.getTZOffset(f)),t=p[z.hcGetHours](),e=p[z.hcGetDay](),c=p[z.hcGetDate](),r=p[z.hcGetMonth](),v=p[z.hcGetFullYear](),b=a.defaultOptions.lang,k=b.weekdays,n=b.shortWeekdays,y=a.pad,z=a.extend({a:n?n[e]:k[e].substr(0,3),A:k[e],
d:y(c),e:y(c,2," "),w:e,b:b.shortMonths[r],B:b.months[r],m:y(r+1),y:v.toString().substr(2,2),Y:v,H:y(t),k:t,I:y(t%12||12),l:t%12||12,M:y(p[z.hcGetMinutes]()),p:12>t?"AM":"PM",P:12>t?"am":"pm",S:y(p.getSeconds()),L:y(Math.round(f%1E3),3)},a.dateFormats);a.objectEach(z,function(a,b){for(;-1!==q.indexOf("%"+b);)q=q.replace("%"+b,"function"===typeof a?a(f):a)});return g?q.substr(0,1).toUpperCase()+q.substr(1):q};a.formatSingle=function(q,f){var g=/\.([0-9])/,z=a.defaultOptions.lang;/f$/.test(q)?(g=(g=
q.match(g))?g[1]:-1,null!==f&&(f=a.numberFormat(f,g,z.decimalPoint,-1<q.indexOf(",")?z.thousandsSep:""))):f=a.dateFormat(q,f);return f};a.format=function(q,f){for(var g="{",z=!1,p,t,e,c,r=[],v;q;){g=q.indexOf(g);if(-1===g)break;p=q.slice(0,g);if(z){p=p.split(":");t=p.shift().split(".");c=t.length;v=f;for(e=0;e<c;e++)v=v[t[e]];p.length&&(v=a.formatSingle(p.join(":"),v));r.push(v)}else r.push(p);q=q.slice(g+1);g=(z=!z)?"}":"{"}r.push(q);return r.join("")};a.getMagnitude=function(a){return Math.pow(10,
Math.floor(Math.log(a)/Math.LN10))};a.normalizeTickInterval=function(q,f,g,z,p){var t,e=q;g=a.pick(g,1);t=q/g;f||(f=p?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===z&&(1===g?f=a.grep(f,function(a){return 0===a%1}):.1>=g&&(f=[1/g])));for(z=0;z<f.length&&!(e=f[z],p&&e*g>=q||!p&&t<=(f[z]+(f[z+1]||f[z]))/2);z++);return e=a.correctFloat(e*g,-Math.round(Math.log(.001)/Math.LN10))};a.stableSort=function(a,f){var g=a.length,q,p;for(p=0;p<g;p++)a[p].safeI=p;a.sort(function(a,e){q=f(a,e);return 0===q?
a.safeI-e.safeI:q});for(p=0;p<g;p++)delete a[p].safeI};a.arrayMin=function(a){for(var f=a.length,g=a[0];f--;)a[f]<g&&(g=a[f]);return g};a.arrayMax=function(a){for(var f=a.length,g=a[0];f--;)a[f]>g&&(g=a[f]);return g};a.destroyObjectProperties=function(q,f){a.objectEach(q,function(a,z){a&&a!==f&&a.destroy&&a.destroy();delete q[z]})};a.discardElement=function(q){var f=a.garbageBin;f||(f=a.createElement("div"));q&&f.appendChild(q);f.innerHTML=""};a.correctFloat=function(a,f){return parseFloat(a.toPrecision(f||
14))};a.setAnimation=function(q,f){f.renderer.globalAnimation=a.pick(q,f.options.chart.animation,!0)};a.animObject=function(q){return a.isObject(q)?a.merge(q):{duration:q?500:0}};a.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5};a.numberFormat=function(q,f,g,z){q=+q||0;f=+f;var p=a.defaultOptions.lang,t=(q.toString().split(".")[1]||"").length,e,c;-1===f?f=Math.min(t,20):a.isNumber(f)||(f=2);c=(Math.abs(q)+Math.pow(10,-Math.max(f,t)-1)).toFixed(f);
t=String(a.pInt(c));e=3<t.length?t.length%3:0;g=a.pick(g,p.decimalPoint);z=a.pick(z,p.thousandsSep);q=(0>q?"-":"")+(e?t.substr(0,e)+z:"");q+=t.substr(e).replace(/(\d{3})(?=\d)/g,"$1"+z);f&&(q+=g+c.slice(-f));return q};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};a.getStyle=function(q,f,g){if("width"===f)return Math.min(q.offsetWidth,q.scrollWidth)-a.getStyle(q,"padding-left")-a.getStyle(q,"padding-right");if("height"===f)return Math.min(q.offsetHeight,q.scrollHeight)-a.getStyle(q,
"padding-top")-a.getStyle(q,"padding-bottom");if(q=E.getComputedStyle(q,void 0))q=q.getPropertyValue(f),a.pick(g,!0)&&(q=a.pInt(q));return q};a.inArray=function(a,f){return f.indexOf?f.indexOf(a):[].indexOf.call(f,a)};a.grep=function(a,f){return[].filter.call(a,f)};a.find=function(a,f){return[].find.call(a,f)};a.map=function(a,f){for(var g=[],z=0,p=a.length;z<p;z++)g[z]=f.call(a[z],a[z],z,a);return g};a.offset=function(a){var f=D.documentElement;a=a.getBoundingClientRect();return{top:a.top+(E.pageYOffset||
f.scrollTop)-(f.clientTop||0),left:a.left+(E.pageXOffset||f.scrollLeft)-(f.clientLeft||0)}};a.stop=function(a,f){for(var g=A.length;g--;)A[g].elem!==a||f&&f!==A[g].prop||(A[g].stopped=!0)};a.each=function(a,f,g){return Array.prototype.forEach.call(a,f,g)};a.objectEach=function(a,f,g){for(var z in a)a.hasOwnProperty(z)&&f.call(g,a[z],z,a)};a.addEvent=function(q,f,g){function z(a){a.target=a.srcElement||E;g.call(q,a)}var p=q.hcEvents=q.hcEvents||{};q.addEventListener?q.addEventListener(f,g,!1):q.attachEvent&&
(q.hcEventsIE||(q.hcEventsIE={}),q.hcEventsIE[g.toString()]=z,q.attachEvent("on"+f,z));p[f]||(p[f]=[]);p[f].push(g);return function(){a.removeEvent(q,f,g)}};a.removeEvent=function(q,f,g){function z(a,c){q.removeEventListener?q.removeEventListener(a,c,!1):q.attachEvent&&(c=q.hcEventsIE[c.toString()],q.detachEvent("on"+a,c))}function p(){var c,v;q.nodeName&&(f?(c={},c[f]=!0):c=e,a.objectEach(c,function(a,k){if(e[k])for(v=e[k].length;v--;)z(k,e[k][v])}))}var t,e=q.hcEvents,c;e&&(f?(t=e[f]||[],g?(c=a.inArray(g,
t),-1<c&&(t.splice(c,1),e[f]=t),z(f,g)):(p(),e[f]=[])):(p(),q.hcEvents={}))};a.fireEvent=function(q,f,g,z){var p;p=q.hcEvents;var t,e;g=g||{};if(D.createEvent&&(q.dispatchEvent||q.fireEvent))p=D.createEvent("Events"),p.initEvent(f,!0,!0),a.extend(p,g),q.dispatchEvent?q.dispatchEvent(p):q.fireEvent(f,p);else if(p)for(p=p[f]||[],t=p.length,g.target||a.extend(g,{preventDefault:function(){g.defaultPrevented=!0},target:q,type:f}),f=0;f<t;f++)(e=p[f])&&!1===e.call(q,g)&&g.preventDefault();z&&!g.defaultPrevented&&
z(g)};a.animate=function(q,f,g){var z,p="",t,e,c;a.isObject(g)||(c=arguments,g={duration:c[2],easing:c[3],complete:c[4]});a.isNumber(g.duration)||(g.duration=400);g.easing="function"===typeof g.easing?g.easing:Math[g.easing]||Math.easeInOutSine;g.curAnim=a.merge(f);a.objectEach(f,function(c,v){a.stop(q,v);e=new a.Fx(q,g,v);t=null;"d"===v?(e.paths=e.initPath(q,q.d,f.d),e.toD=f.d,z=0,t=1):q.attr?z=q.attr(v):(z=parseFloat(a.getStyle(q,v))||0,"opacity"!==v&&(p="px"));t||(t=c);t&&t.match&&t.match("px")&&
(t=t.replace(/px/g,""));e.run(z,t,p)})};a.seriesType=function(q,f,g,z,p){var t=a.getOptions(),e=a.seriesTypes;t.plotOptions[q]=a.merge(t.plotOptions[f],g);e[q]=a.extendClass(e[f]||function(){},z);e[q].prototype.type=q;p&&(e[q].prototype.pointClass=a.extendClass(a.Point,p));return e[q]};a.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),f=0;return function(){return"highcharts-"+a+"-"+f++}}();E.jQuery&&(E.jQuery.fn.highcharts=function(){var q=[].slice.call(arguments);if(this[0])return q[0]?
(new (a[a.isString(q[0])?q.shift():"Chart"])(this[0],q[0],q[1]),this):B[a.attr(this[0],"data-highcharts-chart")]});D&&!D.defaultView&&(a.getStyle=function(q,f){var g={width:"clientWidth",height:"clientHeight"}[f];if(q.style[f])return a.pInt(q.style[f]);"opacity"===f&&(f="filter");if(g)return q.style.zoom=1,Math.max(q[g]-2*a.getStyle(q,"padding"),0);q=q.currentStyle[f.replace(/\-(\w)/g,function(a,g){return g.toUpperCase()})];"filter"===f&&(q=q.replace(/alpha\(opacity=([0-9]+)\)/,function(a,g){return g/
100}));return""===q?1:a.pInt(q)});Array.prototype.forEach||(a.each=function(a,f,g){for(var z=0,p=a.length;z<p;z++)if(!1===f.call(g,a[z],z,a))return z});Array.prototype.indexOf||(a.inArray=function(a,f){var g,z=0;if(f)for(g=f.length;z<g;z++)if(f[z]===a)return z;return-1});Array.prototype.filter||(a.grep=function(a,f){for(var g=[],z=0,p=a.length;z<p;z++)f(a[z],z)&&g.push(a[z]);return g});Array.prototype.find||(a.find=function(a,f){var g,z=a.length;for(g=0;g<z;g++)if(f(a[g],g))return a[g]})})(K);(function(a){var A=
a.each,B=a.isNumber,D=a.map,E=a.merge,q=a.pInt;a.Color=function(f){if(!(this instanceof a.Color))return new a.Color(f);this.init(f)};a.Color.prototype={parsers:[{regex:/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*\)/,parse:function(a){return[q(a[1]),q(a[2]),q(a[3]),parseFloat(a[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(a){return[q(a[1]),q(a[2]),q(a[3]),1]}}],names:{white:"#ffffff",black:"#000000"},
init:function(f){var g,z,p,t;if((this.input=f=this.names[f&&f.toLowerCase?f.toLowerCase():""]||f)&&f.stops)this.stops=D(f.stops,function(e){return new a.Color(e[1])});else if(f&&"#"===f[0]&&(g=f.length,f=parseInt(f.substr(1),16),7===g?z=[(f&16711680)>>16,(f&65280)>>8,f&255,1]:4===g&&(z=[(f&3840)>>4|(f&3840)>>8,(f&240)>>4|f&240,(f&15)<<4|f&15,1])),!z)for(p=this.parsers.length;p--&&!z;)t=this.parsers[p],(g=t.regex.exec(f))&&(z=t.parse(g));this.rgba=z||[]},get:function(a){var g=this.input,f=this.rgba,
p;this.stops?(p=E(g),p.stops=[].concat(p.stops),A(this.stops,function(g,e){p.stops[e]=[p.stops[e][0],g.get(a)]})):p=f&&B(f[0])?"rgb"===a||!a&&1===f[3]?"rgb("+f[0]+","+f[1]+","+f[2]+")":"a"===a?f[3]:"rgba("+f.join(",")+")":g;return p},brighten:function(a){var g,f=this.rgba;if(this.stops)A(this.stops,function(g){g.brighten(a)});else if(B(a)&&0!==a)for(g=0;3>g;g++)f[g]+=q(255*a),0>f[g]&&(f[g]=0),255<f[g]&&(f[g]=255);return this},setOpacity:function(a){this.rgba[3]=a;return this}};a.color=function(f){return new a.Color(f)}})(K);
(function(a){var A,B,D=a.addEvent,E=a.animate,q=a.attr,f=a.charts,g=a.color,z=a.css,p=a.createElement,t=a.defined,e=a.deg2rad,c=a.destroyObjectProperties,r=a.doc,v=a.each,b=a.extend,k=a.erase,n=a.grep,y=a.hasTouch,u=a.inArray,I=a.isArray,G=a.isFirefox,F=a.isMS,m=a.isObject,x=a.isString,l=a.isWebKit,C=a.merge,d=a.noop,H=a.objectEach,h=a.pick,w=a.pInt,R=a.removeEvent,J=a.splat,N=a.stop,Q=a.svg,O=a.SVG_NS,P=a.symbolSizes,M=a.win;A=a.SVGElement=function(){return this};A.prototype={opacity:1,SVG_NS:O,
textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline".split(" "),init:function(a,h){this.element="span"===h?p(h):r.createElementNS(this.SVG_NS,h);this.renderer=a},animate:function(w,d,b){d=a.animObject(h(d,this.renderer.globalAnimation,!0));0!==d.duration?(b&&(d.complete=b),E(this,w,d)):(this.attr(w,null,b),d.step&&d.step.call(this));return this},colorGradient:function(h,d,w){var b=this.renderer,L,m,l,k,c,n,x,y,u,e,
r=[],J;h.radialGradient?m="radialGradient":h.linearGradient&&(m="linearGradient");m&&(l=h[m],c=b.gradients,x=h.stops,e=w.radialReference,I(l)&&(h[m]=l={x1:l[0],y1:l[1],x2:l[2],y2:l[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===m&&e&&!t(l.gradientUnits)&&(k=l,l=C(l,b.getRadialAttr(e,k),{gradientUnits:"userSpaceOnUse"})),H(l,function(a,h){"id"!==h&&r.push(h,a)}),H(x,function(a){r.push(a)}),r=r.join(","),c[r]?e=c[r].attr("id"):(l.id=e=a.uniqueKey(),c[r]=n=b.createElement(m).attr(l).add(b.defs),
n.radAttr=k,n.stops=[],v(x,function(h){0===h[1].indexOf("rgba")?(L=a.color(h[1]),y=L.get("rgb"),u=L.get("a")):(y=h[1],u=1);h=b.createElement("stop").attr({offset:h[0],"stop-color":y,"stop-opacity":u}).add(n);n.stops.push(h)})),J="url("+b.url+"#"+e+")",w.setAttribute(d,J),w.gradient=r,h.toString=function(){return J})},applyTextOutline:function(h){var d=this.element,w,b,L,m,l;-1!==h.indexOf("contrast")&&(h=h.replace(/contrast/g,this.renderer.getContrast(d.style.fill)));h=h.split(" ");b=h[h.length-1];
if((L=h[0])&&"none"!==L&&a.svg){this.fakeTS=!0;h=[].slice.call(d.getElementsByTagName("tspan"));this.ySetter=this.xSetter;L=L.replace(/(^[\d\.]+)(.*?)$/g,function(a,h,d){return 2*h+d});for(l=h.length;l--;)w=h[l],"highcharts-text-outline"===w.getAttribute("class")&&k(h,d.removeChild(w));m=d.firstChild;v(h,function(a,h){0===h&&(a.setAttribute("x",d.getAttribute("x")),h=d.getAttribute("y"),a.setAttribute("y",h||0),null===h&&d.setAttribute("y",0));a=a.cloneNode(1);q(a,{"class":"highcharts-text-outline",
fill:b,stroke:b,"stroke-width":L,"stroke-linejoin":"round"});d.insertBefore(a,m)})}},attr:function(a,h,d,w){var b,L=this.element,l,m=this,k,c;"string"===typeof a&&void 0!==h&&(b=a,a={},a[b]=h);"string"===typeof a?m=(this[a+"Getter"]||this._defaultGetter).call(this,a,L):(H(a,function(h,d){k=!1;w||N(this,d);this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(d)&&(l||(this.symbolAttr(a),l=!0),k=!0);!this.rotation||"x"!==d&&"y"!==d||(this.doTransform=!0);k||(c=this[d+"Setter"]||
this._defaultSetter,c.call(this,h,d,L))},this),this.doTransform&&(this.updateTransform(),this.doTransform=!1));d&&d();return m},addClass:function(a,h){var d=this.attr("class")||"";-1===d.indexOf(a)&&(h||(a=(d+(d?" ":"")+a).replace("  "," ")),this.attr("class",a));return this},hasClass:function(a){return-1!==q(this.element,"class").indexOf(a)},removeClass:function(a){q(this.element,"class",(q(this.element,"class")||"").replace(a,""));return this},symbolAttr:function(a){var d=this;v("x y r start end width height innerR anchorX anchorY".split(" "),
function(w){d[w]=h(a[w],d[w])});d.attr({d:d.renderer.symbols[d.symbolName](d.x,d.y,d.width,d.height,d)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,h){var d=this,w={},b;h=h||a.strokeWidth||0;b=Math.round(h)%2/2;a.x=Math.floor(a.x||d.x||0)+b;a.y=Math.floor(a.y||d.y||0)+b;a.width=Math.floor((a.width||d.width||0)-2*b);a.height=Math.floor((a.height||d.height||0)-2*b);t(a.strokeWidth)&&(a.strokeWidth=h);H(a,function(a,h){d[h]!==a&&(d[h]=
w[h]=a)});return w},css:function(a){var h=this.styles,d={},l=this.element,m,L="",k,c=!h,C=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);h&&H(a,function(a,w){a!==h[w]&&(d[w]=a,c=!0)});c&&(h&&(a=b(h,d)),m=this.textWidth=a&&a.width&&"auto"!==a.width&&"text"===l.nodeName.toLowerCase()&&w(a.width),this.styles=a,m&&!Q&&this.renderer.forExport&&delete a.width,F&&!Q?z(this.element,a):(k=function(a,h){return"-"+h.toLowerCase()},H(a,function(a,h){-1===u(h,C)&&(L+=h.replace(/([A-Z])/g,
k)+":"+a+";")}),L&&q(l,"style",L)),this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline)));return this},getStyle:function(a){return M.getComputedStyle(this.element||this,"").getPropertyValue(a)},strokeWidth:function(){var a=this.getStyle("stroke-width"),h;a.indexOf("px")===a.length-2?a=w(a):(h=r.createElementNS(O,"rect"),q(h,{width:a,"stroke-width":0}),this.element.parentNode.appendChild(h),a=h.getBBox().width,h.parentNode.removeChild(h));
return a},on:function(a,h){var d=this,w=d.element;y&&"click"===a?(w.ontouchstart=function(a){d.touchEventFired=Date.now();a.preventDefault();h.call(w,a)},w.onclick=function(a){(-1===M.navigator.userAgent.indexOf("Android")||1100<Date.now()-(d.touchEventFired||0))&&h.call(w,a)}):w["on"+a]=h;return this},setRadialReference:function(a){var h=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;h&&h.radAttr&&h.animate(this.renderer.getRadialAttr(a,h.radAttr));return this},translate:function(a,
h){return this.attr({translateX:a,translateY:h})},invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,d=this.translateY||0,w=this.scaleX,b=this.scaleY,l=this.inverted,m=this.rotation,k=this.element;l&&(a+=this.width,d+=this.height);a=["translate("+a+","+d+")"];l?a.push("rotate(90) scale(-1,1)"):m&&a.push("rotate("+m+" "+(k.getAttribute("x")||0)+" "+(k.getAttribute("y")||0)+")");(t(w)||t(b))&&a.push("scale("+h(w,1)+" "+h(b,1)+")");
a.length&&k.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,d,w){var b,l,m,L,c={};l=this.renderer;m=l.alignedObjects;var C,n;if(a){if(this.alignOptions=a,this.alignByTranslate=d,!w||x(w))this.alignTo=b=w||"renderer",k(m,this),m.push(this),w=null}else a=this.alignOptions,d=this.alignByTranslate,b=this.alignTo;w=h(w,l[b],l);b=a.align;l=a.verticalAlign;m=(w.x||0)+(a.x||0);L=(w.y||0)+(a.y||0);"right"===b?C=1:"center"===
b&&(C=2);C&&(m+=(w.width-(a.width||0))/C);c[d?"translateX":"x"]=Math.round(m);"bottom"===l?n=1:"middle"===l&&(n=2);n&&(L+=(w.height-(a.height||0))/n);c[d?"translateY":"y"]=Math.round(L);this[this.placed?"animate":"attr"](c);this.placed=!0;this.alignAttr=c;return this},getBBox:function(a,d){var w,l=this.renderer,m,k=this.element,c=this.styles,L,C=this.textStr,n,x=l.cache,y=l.cacheKeys,u;d=h(d,this.rotation);m=d*e;L=k&&A.prototype.getStyle.call(k,"font-size");void 0!==C&&(u=C.toString(),-1===u.indexOf("\x3c")&&
(u=u.replace(/[0-9]/g,"0")),u+=["",d||0,L,c&&c.width,c&&c.textOverflow].join());u&&!a&&(w=x[u]);if(!w){if(k.namespaceURI===this.SVG_NS||l.forExport){try{(n=this.fakeTS&&function(a){v(k.querySelectorAll(".highcharts-text-outline"),function(h){h.style.display=a})})&&n("none"),w=k.getBBox?b({},k.getBBox()):{width:k.offsetWidth,height:k.offsetHeight},n&&n("")}catch(U){}if(!w||0>w.width)w={width:0,height:0}}else w=this.htmlGetBBox();l.isSVG&&(a=w.width,l=w.height,c&&"11px"===c.fontSize&&17===Math.round(l)&&
(w.height=l=14),d&&(w.width=Math.abs(l*Math.sin(m))+Math.abs(a*Math.cos(m)),w.height=Math.abs(l*Math.cos(m))+Math.abs(a*Math.sin(m))));if(u&&0<w.height){for(;250<y.length;)delete x[y.shift()];x[u]||y.push(u);x[u]=w}}return w},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var h=this;h.animate({opacity:0},{duration:a||150,complete:function(){h.attr({y:-9999})}})},add:function(a){var h=this.renderer,
d=this.element,w;a&&(this.parentGroup=a);this.parentInverted=a&&a.inverted;void 0!==this.textStr&&h.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)w=this.zIndexSetter();w||(a?a.element:h.box).appendChild(d);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var h=a.parentNode;h&&h.removeChild(a)},destroy:function(){var a=this,h=a.element||{},d=a.renderer.isSVG&&"SPAN"===h.nodeName&&a.parentGroup,w=h.ownerSVGElement;h.onclick=h.onmouseout=h.onmouseover=h.onmousemove=h.point=
null;N(a);a.clipPath&&w&&(v(w.querySelectorAll("[clip-path]"),function(h){-1<h.getAttribute("clip-path").indexOf(a.clipPath.element.id+")")&&h.removeAttribute("clip-path")}),a.clipPath=a.clipPath.destroy());if(a.stops){for(w=0;w<a.stops.length;w++)a.stops[w]=a.stops[w].destroy();a.stops=null}for(a.safeRemoveChild(h);d&&d.div&&0===d.div.childNodes.length;)h=d.parentGroup,a.safeRemoveChild(d.div),delete d.div,d=h;a.alignTo&&k(a.renderer.alignedObjects,a);H(a,function(h,d){delete a[d]});return null},
xGetter:function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)},_defaultGetter:function(a){a=h(this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a},dSetter:function(a,h,d){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");d.setAttribute(h,a);this[h]=a},alignSetter:function(a){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,
h,d){this[h]=a;d.setAttribute(h,a)},titleSetter:function(a){var d=this.element.getElementsByTagName("title")[0];d||(d=r.createElementNS(this.SVG_NS,"title"),this.element.appendChild(d));d.firstChild&&d.removeChild(d.firstChild);d.appendChild(r.createTextNode(String(h(a),"").replace(/<[^>]*>/g,"")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this))},fillSetter:function(a,h,d){"string"===typeof a?d.setAttribute(h,a):a&&this.colorGradient(a,
h,d)},visibilitySetter:function(a,h,d){"inherit"===a?d.removeAttribute(h):d.setAttribute(h,a)},zIndexSetter:function(a,h){var d=this.renderer,b=this.parentGroup,l=(b||d).element||d.box,m,k=this.element,c;m=this.added;var C;t(a)&&(k.zIndex=a,a=+a,this[h]===a&&(m=!1),this[h]=a);if(m){(a=this.zIndex)&&b&&(b.handleZ=!0);h=l.childNodes;for(C=0;C<h.length&&!c;C++)b=h[C],m=b.zIndex,b!==k&&(w(m)>a||!t(a)&&t(m)||0>a&&!t(m)&&l!==d.box)&&(l.insertBefore(k,b),c=!0);c||l.appendChild(k)}return c},_defaultSetter:function(a,
h,d){d.setAttribute(h,a)}};A.prototype.yGetter=A.prototype.xGetter;A.prototype.translateXSetter=A.prototype.translateYSetter=A.prototype.rotationSetter=A.prototype.verticalAlignSetter=A.prototype.scaleXSetter=A.prototype.scaleYSetter=function(a,h){this[h]=a;this.doTransform=!0};B=a.SVGRenderer=function(){this.init.apply(this,arguments)};B.prototype={Element:A,SVG_NS:O,init:function(a,h,d,w,b,m){var k;w=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});k=w.element;a.appendChild(k);
-1===a.innerHTML.indexOf("xmlns")&&q(k,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=k;this.boxWrapper=w;this.alignedObjects=[];this.url=(G||l)&&r.getElementsByTagName("base").length?M.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(r.createTextNode("Created with Highstock 5.0.11"));this.defs=this.createElement("defs").add();this.allowHTML=m;this.forExport=b;this.gradients={};this.cache=
{};this.cacheKeys=[];this.imgCount=0;this.setSize(h,d,!1);var c;G&&a.getBoundingClientRect&&(h=function(){z(a,{left:0,top:0});c=a.getBoundingClientRect();z(a,{left:Math.ceil(c.left)-c.left+"px",top:Math.ceil(c.top)-c.top+"px"})},h(),this.unSubPixelFix=D(M,"resize",h))},definition:function(a){function h(a,w){var b;v(J(a),function(a){var l=d.createElement(a.tagName),m={};H(a,function(a,h){"tagName"!==h&&"children"!==h&&"textContent"!==h&&(m[h]=a)});l.attr(m);l.add(w||d.defs);a.textContent&&l.element.appendChild(r.createTextNode(a.textContent));
h(a.children||[],l);b=l});return b}var d=this;return h(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 h=new this.Element;h.init(this,a);return h},draw:d,getRadialAttr:function(a,h){return{cx:a[0]-a[2]/2+h.cx*a[2],cy:a[1]-
a[2]/2+h.cy*a[2],r:h.r*a[2]}},getSpanWidth:function(a,h){var d=a.getBBox(!0).width;!Q&&this.forExport&&(d=this.measureSpanWidth(h.firstChild.data,a.styles));return d},applyEllipsis:function(a,h,d,w){var b=this.getSpanWidth(a,h),l=b>w,b=d,m,k=0,c=d.length,C=function(a){h.removeChild(h.firstChild);a&&h.appendChild(r.createTextNode(a))};if(l){for(;k<=c;)m=Math.ceil((k+c)/2),b=d.substring(0,m)+"\u2026",C(b),b=this.getSpanWidth(a,h),k===c?k=c+1:b>w?c=m-1:k=m;0===c&&C("")}return l},buildText:function(a){var d=
a.element,b=this,l=b.forExport,m=h(a.textStr,"").toString(),k=-1!==m.indexOf("\x3c"),c=d.childNodes,C,x,y,u,e=q(d,"x"),J=a.styles,H=a.textWidth,L=J&&J.lineHeight,g=J&&J.textOutline,t=J&&"ellipsis"===J.textOverflow,f=J&&"nowrap"===J.whiteSpace,R,G=c.length,F=H&&!a.added&&this.box,N=function(a){return L?w(L):b.fontMetrics(void 0,a.getAttribute("style")?a:d).h},J=[m,t,f,L,g,J&&J.fontSize,H].join();if(J!==a.textCache){for(a.textCache=J;G--;)d.removeChild(c[G]);k||g||t||H||-1!==m.indexOf(" ")?(C=/<.*class="([^"]+)".*>/,
x=/<.*style="([^"]+)".*>/,y=/<.*href="(http[^"]+)".*>/,F&&F.appendChild(d),m=k?m.replace(/<(b|strong)>/g,'\x3cspan class\x3d"highcharts-strong"\x3e').replace(/<(i|em)>/g,'\x3cspan class\x3d"highcharts-emphasized"\x3e').replace(/<a/g,"\x3cspan").replace(/<\/(b|strong|i|em|a)>/g,"\x3c/span\x3e").split(/<br.*?>/g):[m],m=n(m,function(a){return""!==a}),v(m,function(h,w){var m,k=0;h=h.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||\x3cspan").replace(/<\/span>/g,"\x3c/span\x3e|||");m=h.split("|||");v(m,function(h){if(""!==
h||1===m.length){var c={},n=r.createElementNS(b.SVG_NS,"tspan"),v,J;C.test(h)&&(v=h.match(C)[1],q(n,"class",v));x.test(h)&&(J=h.match(x)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),q(n,"style",J));y.test(h)&&!l&&(q(n,"onclick",'location.href\x3d"'+h.match(y)[1]+'"'),z(n,{cursor:"pointer"}));h=(h.replace(/<(.|\n)*?>/g,"")||" ").replace(/&lt;/g,"\x3c").replace(/&gt;/g,"\x3e");if(" "!==h){n.appendChild(r.createTextNode(h));k?c.dx=0:w&&null!==e&&(c.x=e);q(n,c);d.appendChild(n);!k&&R&&(!Q&&l&&z(n,{display:"block"}),
q(n,"dy",N(n)));if(H){c=h.replace(/([^\^])-/g,"$1- ").split(" ");v=1<m.length||w||1<c.length&&!f;var L=[],g,G=N(n),F=a.rotation;for(t&&(u=b.applyEllipsis(a,n,h,H));!t&&v&&(c.length||L.length);)a.rotation=0,g=b.getSpanWidth(a,n),h=g>H,void 0===u&&(u=h),h&&1!==c.length?(n.removeChild(n.firstChild),L.unshift(c.pop())):(c=L,L=[],c.length&&!f&&(n=r.createElementNS(O,"tspan"),q(n,{dy:G,x:e}),J&&q(n,"style",J),d.appendChild(n)),g>H&&(H=g)),c.length&&n.appendChild(r.createTextNode(c.join(" ").replace(/- /g,
"-")));a.rotation=F}k++}}});R=R||d.childNodes.length}),u&&a.attr("title",a.textStr),F&&F.removeChild(d),g&&a.applyTextOutline&&a.applyTextOutline(g)):d.appendChild(r.createTextNode(m.replace(/&lt;/g,"\x3c").replace(/&gt;/g,"\x3e")))}},getContrast:function(a){a=g(a).rgba;return 510<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,h,d,w,b,m,l,k,c){var n=this.label(a,h,d,c,null,null,null,null,"button"),x=0;n.attr(C({padding:8,r:2},b));D(n.element,F?"mouseover":"mouseenter",function(){3!==x&&n.setState(1)});
D(n.element,F?"mouseout":"mouseleave",function(){3!==x&&n.setState(x)});n.setState=function(a){1!==a&&(n.state=x=a);n.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][a||0])};return n.on("click",function(a){3!==x&&w.call(n,a)})},crispLine:function(a,h){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-h%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+h%2/2);return a},path:function(a){var h={};I(a)?h.d=a:m(a)&&b(h,a);return this.createElement("path").attr(h)},
circle:function(a,h,d){a=m(a)?a:{x:a,y:h,r:d};h=this.createElement("circle");h.xSetter=h.ySetter=function(a,h,d){d.setAttribute("c"+h,a)};return h.attr(a)},arc:function(a,h,d,w,b,l){m(a)?(w=a,h=w.y,d=w.r,a=w.x):w={innerR:w,start:b,end:l};a=this.symbol("arc",a,h,d,d,w);a.r=d;return a},rect:function(a,h,d,w,b,l){b=m(a)?a.r:b;l=this.createElement("rect");a=m(a)?a:void 0===a?{}:{x:a,y:h,width:Math.max(d,0),height:Math.max(w,0)};b&&(a.r=b);l.rSetter=function(a,h,d){q(d,{rx:a,ry:a})};return l.attr(a)},
setSize:function(a,d,w){var b=this.alignedObjects,m=b.length;this.width=a;this.height=d;for(this.boxWrapper.animate({width:a,height:d},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:h(w,!0)?void 0:0});m--;)b[m].align()},g:function(a){var h=this.createElement("g");return a?h.attr({"class":"highcharts-"+a}):h},image:function(a,h,d,w,m){var l={preserveAspectRatio:"none"};1<arguments.length&&b(l,{x:h,y:d,width:w,height:m});l=this.createElement("image").attr(l);
l.element.setAttributeNS?l.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):l.element.setAttribute("hc-svg-href",a);return l},symbol:function(a,d,w,m,l,k){var c=this,n,C=/^url\((.*?)\)$/,x=C.test(a),y=!x&&(this.symbols[a]?a:"circle"),u=y&&this.symbols[y],J=t(d)&&u&&u.call(this.symbols,Math.round(d),Math.round(w),m,l,k),e,H;u?(n=this.path(J),b(n,{symbolName:y,x:d,y:w,width:m,height:l}),k&&b(n,k)):x&&(e=a.match(C)[1],n=this.image(e),n.imgwidth=h(P[e]&&P[e].width,k&&k.width),n.imgheight=
h(P[e]&&P[e].height,k&&k.height),H=function(){n.attr({width:n.width,height:n.height})},v(["width","height"],function(a){n[a+"Setter"]=function(a,h){var d={},w=this["img"+h],b="width"===h?"translateX":"translateY";this[h]=a;t(w)&&(this.element&&this.element.setAttribute(h,w),this.alignByTranslate||(d[b]=((this[h]||0)-w)/2,this.attr(d)))}}),t(d)&&n.attr({x:d,y:w}),n.isImg=!0,t(n.imgwidth)&&t(n.imgheight)?H():(n.attr({width:0,height:0}),p("img",{onload:function(){var a=f[c.chartIndex];0===this.width&&
(z(this,{position:"absolute",top:"-999em"}),r.body.appendChild(this));P[e]={width:this.width,height:this.height};n.imgwidth=this.width;n.imgheight=this.height;n.element&&H();this.parentNode&&this.parentNode.removeChild(this);c.imgCount--;if(!c.imgCount&&a&&a.onload)a.onload()},src:e}),this.imgCount++));return n},symbols:{circle:function(a,h,d,w){return this.arc(a+d/2,h+w/2,d/2,w/2,{start:0,end:2*Math.PI,open:!1})},square:function(a,h,d,w){return["M",a,h,"L",a+d,h,a+d,h+w,a,h+w,"Z"]},triangle:function(a,
h,d,w){return["M",a+d/2,h,"L",a+d,h+w,a,h+w,"Z"]},"triangle-down":function(a,h,d,w){return["M",a,h,"L",a+d,h,a+d/2,h+w,"Z"]},diamond:function(a,h,d,w){return["M",a+d/2,h,"L",a+d,h+w/2,a+d/2,h+w,a,h+w/2,"Z"]},arc:function(a,h,d,w,b){var m=b.start,l=b.r||d,k=b.r||w||d,c=b.end-.001;d=b.innerR;w=b.open;var n=Math.cos(m),C=Math.sin(m),x=Math.cos(c),c=Math.sin(c);b=b.end-m<Math.PI?0:1;l=["M",a+l*n,h+k*C,"A",l,k,0,b,1,a+l*x,h+k*c];t(d)&&l.push(w?"M":"L",a+d*x,h+d*c,"A",d,d,0,b,0,a+d*n,h+d*C);l.push(w?"":
"Z");return l},callout:function(a,h,d,w,b){var l=Math.min(b&&b.r||0,d,w),m=l+6,k=b&&b.anchorX;b=b&&b.anchorY;var c;c=["M",a+l,h,"L",a+d-l,h,"C",a+d,h,a+d,h,a+d,h+l,"L",a+d,h+w-l,"C",a+d,h+w,a+d,h+w,a+d-l,h+w,"L",a+l,h+w,"C",a,h+w,a,h+w,a,h+w-l,"L",a,h+l,"C",a,h,a,h,a+l,h];k&&k>d?b>h+m&&b<h+w-m?c.splice(13,3,"L",a+d,b-6,a+d+6,b,a+d,b+6,a+d,h+w-l):c.splice(13,3,"L",a+d,w/2,k,b,a+d,w/2,a+d,h+w-l):k&&0>k?b>h+m&&b<h+w-m?c.splice(33,3,"L",a,b+6,a-6,b,a,b-6,a,h+l):c.splice(33,3,"L",a,w/2,k,b,a,w/2,a,h+l):
b&&b>w&&k>a+m&&k<a+d-m?c.splice(23,3,"L",k+6,h+w,k,h+w+6,k-6,h+w,a+l,h+w):b&&0>b&&k>a+m&&k<a+d-m&&c.splice(3,3,"L",k-6,h,k,h-6,k+6,h,d-l,h);return c}},clipRect:function(h,d,w,b){var l=a.uniqueKey(),m=this.createElement("clipPath").attr({id:l}).add(this.defs);h=this.rect(h,d,w,b,0).add(m);h.id=l;h.clipPath=m;h.count=0;return h},text:function(a,h,d,w){var b=!Q&&this.forExport,l={};if(w&&(this.allowHTML||!this.forExport))return this.html(a,h,d);l.x=Math.round(h||0);d&&(l.y=Math.round(d));if(a||0===a)l.text=
a;a=this.createElement("text").attr(l);b&&a.css({position:"absolute"});w||(a.xSetter=function(a,h,d){var w=d.getElementsByTagName("tspan"),b,l=d.getAttribute(h),m;for(m=0;m<w.length;m++)b=w[m],b.getAttribute(h)===l&&b.setAttribute(h,a);d.setAttribute(h,a)});return a},fontMetrics:function(a,h){a=h&&A.prototype.getStyle.call(h,"font-size");a=/px/.test(a)?w(a):/em/.test(a)?parseFloat(a)*(h?this.fontMetrics(null,h.parentNode).f:16):12;h=24>a?a+3:Math.round(1.2*a);return{h:h,b:Math.round(.8*h),f:a}},rotCorr:function(a,
h,d){var w=a;h&&d&&(w=Math.max(w*Math.cos(h*e),4));return{x:-a/3*Math.sin(h*e),y:w}},label:function(h,d,w,l,m,k,c,n,x){var y=this,u=y.g("button"!==x&&"label"),J=u.text=y.text("",0,0,c).attr({zIndex:1}),e,r,H=0,g=3,f=0,G,O,F,N,p,I={},z,P=/^url\((.*?)\)$/.test(l),L=P,Q,q,M,S;x&&u.addClass("highcharts-"+x);L=!0;Q=function(){return e.strokeWidth()%2/2};q=function(){var a=J.element.style,h={};r=(void 0===G||void 0===O||p)&&t(J.textStr)&&J.getBBox();u.width=(G||r.width||0)+2*g+f;u.height=(O||r.height||
0)+2*g;z=g+y.fontMetrics(a&&a.fontSize,J).b;L&&(e||(u.box=e=y.symbols[l]||P?y.symbol(l):y.rect(),e.addClass(("button"===x?"":"highcharts-label-box")+(x?" highcharts-"+x+"-box":"")),e.add(u),a=Q(),h.x=a,h.y=(n?-z:0)+a),h.width=Math.round(u.width),h.height=Math.round(u.height),e.attr(b(h,I)),I={})};M=function(){var a=f+g,h;h=n?0:z;t(G)&&r&&("center"===p||"right"===p)&&(a+={center:.5,right:1}[p]*(G-r.width));if(a!==J.x||h!==J.y)J.attr("x",a),void 0!==h&&J.attr("y",h);J.x=a;J.y=h};S=function(a,h){e?e.attr(a,
h):I[a]=h};u.onAdd=function(){J.add(u);u.attr({text:h||0===h?h:"",x:d,y:w});e&&t(m)&&u.attr({anchorX:m,anchorY:k})};u.widthSetter=function(h){G=a.isNumber(h)?h:null};u.heightSetter=function(a){O=a};u["text-alignSetter"]=function(a){p=a};u.paddingSetter=function(a){t(a)&&a!==g&&(g=u.padding=a,M())};u.paddingLeftSetter=function(a){t(a)&&a!==f&&(f=a,M())};u.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==H&&(H=a,r&&u.attr({x:F}))};u.textSetter=function(a){void 0!==a&&J.textSetter(a);q();
M()};u["stroke-widthSetter"]=function(a,h){a&&(L=!0);this["stroke-width"]=a;S(h,a)};u.rSetter=function(a,h){S(h,a)};u.anchorXSetter=function(a,h){m=u.anchorX=a;S(h,Math.round(a)-Q()-F)};u.anchorYSetter=function(a,h){k=u.anchorY=a;S(h,a-N)};u.xSetter=function(a){u.x=a;H&&(a-=H*((G||r.width)+2*g));F=Math.round(a);u.attr("translateX",F)};u.ySetter=function(a){N=u.y=Math.round(a);u.attr("translateY",N)};var B=u.css;return b(u,{css:function(a){if(a){var h={};a=C(a);v(u.textProps,function(d){void 0!==a[d]&&
(h[d]=a[d],delete a[d])});J.css(h)}return B.call(u,a)},getBBox:function(){return{width:r.width+2*g,height:r.height+2*g,x:r.x-g,y:r.y-g}},destroy:function(){R(u.element,"mouseenter");R(u.element,"mouseleave");J&&(J=J.destroy());e&&(e=e.destroy());A.prototype.destroy.call(u);u=y=q=M=S=null}})}};a.Renderer=B})(K);(function(a){var A=a.attr,B=a.createElement,D=a.css,E=a.defined,q=a.each,f=a.extend,g=a.isFirefox,z=a.isMS,p=a.isWebKit,t=a.pInt,e=a.SVGRenderer,c=a.win,r=a.wrap;f(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=f(this.styles,a);D(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,k=this.x||
0,c=this.y||0,y=this.textAlign||"left",u={left:0,center:.5,right:1}[y],e=this.styles;D(b,{marginLeft:this.translateX||0,marginTop:this.translateY||0});this.inverted&&q(b.childNodes,function(l){a.invertChild(l,b)});if("SPAN"===b.tagName){var r=this.rotation,g=t(this.textWidth),m=e&&e.whiteSpace,x=[r,y,b.innerHTML,this.textWidth,this.textAlign].join();x!==this.cTT&&(e=a.fontMetrics(b.style.fontSize).b,E(r)&&this.setSpanRotation(r,u,e),D(b,{width:"",whiteSpace:m||"nowrap"}),b.offsetWidth>g&&/[ \-]/.test(b.textContent||
b.innerText)&&D(b,{width:g+"px",display:"block",whiteSpace:m||"normal"}),this.getSpanCorrection(b.offsetWidth,e,u,r,y));D(b,{left:k+(this.xCorr||0)+"px",top:c+(this.yCorr||0)+"px"});p&&(e=b.offsetHeight);this.cTT=x}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,k){var n={},y=z?"-ms-transform":p?"-webkit-transform":g?"MozTransform":c.opera?"-o-transform":"";n[y]=n.transform="rotate("+a+"deg)";n[y+(g?"Origin":"-origin")]=n.transformOrigin=100*b+"% "+k+"px";D(this.element,n)},getSpanCorrection:function(a,
b,k){this.xCorr=-a*k;this.yCorr=-b}});f(e.prototype,{html:function(a,b,k){var c=this.createElement("span"),y=c.element,u=c.renderer,e=u.isSVG,v=function(a,b){q(["opacity","visibility"],function(m){r(a,m+"Setter",function(a,m,d,k){a.call(this,m,d,k);b[d]=m})})};c.textSetter=function(a){a!==y.innerHTML&&delete this.bBox;y.innerHTML=this.textStr=a;c.htmlUpdateTransform()};e&&v(c,c.element.style);c.xSetter=c.ySetter=c.alignSetter=c.rotationSetter=function(a,b){"align"===b&&(b="textAlign");c[b]=a;c.htmlUpdateTransform()};
c.attr({text:a,x:Math.round(b),y:Math.round(k)}).css({position:"absolute"});y.style.whiteSpace="nowrap";c.css=c.htmlCss;e&&(c.add=function(a){var b,k=u.box.parentNode,l=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)l.push(a),a=a.parentGroup;q(l.reverse(),function(a){var d,m=A(a.element,"class");m&&(m={className:m});b=a.div=a.div||B("div",m,{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||k);d=b.style;f(a,{on:function(){c.on.apply({element:l[0].div},arguments);return a},translateXSetter:function(h,w){d.left=h+"px";a[w]=h;a.doTransform=!0},translateYSetter:function(h,w){d.top=h+"px";a[w]=h;a.doTransform=!0}});v(a,d)})}}else b=k;b.appendChild(y);c.added=!0;c.alignOnAdd&&c.htmlUpdateTransform();return c});return c}})})(K);(function(a){function A(){var f=a.defaultOptions.global,p=g.moment;if(f.timezone){if(p)return function(a){return-p.tz(a,f.timezone).utcOffset()};a.error(25)}return f.useUTC&&
f.getTimezoneOffset}function B(){var z=a.defaultOptions.global,p,t=z.useUTC,e=t?"getUTC":"get",c=t?"setUTC":"set";a.Date=p=z.Date||g.Date;p.hcTimezoneOffset=t&&z.timezoneOffset;p.hcGetTimezoneOffset=A();p.hcMakeTime=function(a,c,b,k,n,y){var u;t?(u=p.UTC.apply(0,arguments),u+=E(u)):u=(new p(a,c,f(b,1),f(k,0),f(n,0),f(y,0))).getTime();return u};D("Minutes Hours Day Date Month FullYear".split(" "),function(a){p["hcGet"+a]=e+a});D("Milliseconds Seconds Minutes Hours Date Month FullYear".split(" "),function(a){p["hcSet"+
a]=c+a})}var D=a.each,E=a.getTZOffset,q=a.merge,f=a.pick,g=a.win;a.defaultOptions={symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",
resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{useUTC:!0},chart:{borderRadius:0,colorCount:10,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}},width:null,height:null},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",layout:"horizontal",
labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{}},loading:{},tooltip:{enabled:!0,animation:a.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},
footerFormat:"",padding:8,snap:a.isTouchDevice?25:10,headerFormat:'\x3cspan class\x3d"highcharts-header"\x3e{point.key}\x3c/span\x3e\x3cbr/\x3e',pointFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e {series.name}: \x3cspan class\x3d"highcharts-strong"\x3e{point.y}\x3c/span\x3e\x3cbr/\x3e'},credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},text:"Highcharts.com"}};a.setOptions=function(g){a.defaultOptions=
q(!0,a.defaultOptions,g);B();return a.defaultOptions};a.getOptions=function(){return a.defaultOptions};a.defaultPlotOptions=a.defaultOptions.plotOptions;B()})(K);(function(a){var A=a.correctFloat,B=a.defined,D=a.destroyObjectProperties,E=a.isNumber,q=a.pick,f=a.deg2rad;a.Tick=function(a,f,p,t){this.axis=a;this.pos=f;this.type=p||"";this.isNew=!0;p||t||this.addLabel()};a.Tick.prototype={addLabel:function(){var a=this.axis,f=a.options,p=a.chart,t=a.categories,e=a.names,c=this.pos,r=f.labels,v=a.tickPositions,
b=c===v[0],k=c===v[v.length-1],e=t?q(t[c],e[c],c):c,t=this.label,v=v.info,n;a.isDatetimeAxis&&v&&(n=f.dateTimeLabelFormats[v.higherRanks[c]||v.unitName]);this.isFirst=b;this.isLast=k;f=a.labelFormatter.call({axis:a,chart:p,isFirst:b,isLast:k,dateTimeLabelFormat:n,value:a.isLog?A(a.lin2log(e)):e});B(t)?t&&t.attr({text:f}):(this.labelLength=(this.label=t=B(f)&&r.enabled?p.renderer.text(f,0,0,r.useHTML).add(a.labelGroup):null)&&t.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?
this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(a){var g=this.axis,p=a.x,t=g.chart.chartWidth,e=g.chart.spacing,c=q(g.labelLeft,Math.min(g.pos,e[3])),e=q(g.labelRight,Math.max(g.pos+g.len,t-e[1])),r=this.label,v=this.rotation,b={left:0,center:.5,right:1}[g.labelAlign],k=r.getBBox().width,n=g.getSlotWidth(),y=n,u=1,I,G={};if(v)0>v&&p-b*k<c?I=Math.round(p/Math.cos(v*f)-c):0<v&&p+b*k>e&&(I=Math.round((t-p)/Math.cos(v*f)));else if(t=p+(1-b)*k,p-b*k<c?y=a.x+y*(1-b)-c:
t>e&&(y=e-a.x+y*b,u=-1),y=Math.min(n,y),y<n&&"center"===g.labelAlign&&(a.x+=u*(n-y-b*(n-Math.min(k,y)))),k>y||g.autoRotation&&(r.styles||{}).width)I=y;I&&(G.width=I,(g.options.labels.style||{}).textOverflow||(G.textOverflow="ellipsis"),r.css(G))},getPosition:function(a,f,p,t){var e=this.axis,c=e.chart,r=t&&c.oldChartHeight||c.chartHeight;return{x:a?e.translate(f+p,null,null,t)+e.transB:e.left+e.offset+(e.opposite?(t&&c.oldChartWidth||c.chartWidth)-e.right-e.left:0),y:a?r-e.bottom+e.offset-(e.opposite?
e.height:0):r-e.translate(f+p,null,null,t)-e.transB}},getLabelPosition:function(a,q,p,t,e,c,r,v){var b=this.axis,k=b.transA,n=b.reversed,y=b.staggerLines,u=b.tickRotCorr||{x:0,y:0},g=e.y;B(g)||(g=0===b.side?p.rotation?-8:-p.getBBox().height:2===b.side?u.y+8:Math.cos(p.rotation*f)*(u.y-p.getBBox(!1,0).height/2));a=a+e.x+u.x-(c&&t?c*k*(n?-1:1):0);q=q+g-(c&&!t?c*k*(n?1:-1):0);y&&(p=r/(v||1)%y,b.opposite&&(p=y-p-1),q+=b.labelOffset/y*p);return{x:a,y:Math.round(q)}},getMarkPath:function(a,f,p,t,e,c){return c.crispLine(["M",
a,f,"L",a+(e?0:-p),f+(e?p:0)],t)},renderGridLine:function(a,f,p){var g=this.axis,e=this.gridLine,c={},r=this.pos,v=this.type,b=g.tickmarkOffset,k=g.chart.renderer;e||(v||(c.zIndex=1),a&&(c.opacity=0),this.gridLine=e=k.path().attr(c).addClass("highcharts-"+(v?v+"-":"")+"grid-line").add(g.gridGroup));if(!a&&e&&(a=g.getPlotLinePath(r+b,e.strokeWidth()*p,a,!0)))e[this.isNew?"attr":"animate"]({d:a,opacity:f})},renderMark:function(a,f,p){var g=this.axis,e=g.chart.renderer,c=this.type,r=g.tickSize(c?c+"Tick":
"tick"),v=this.mark,b=!v,k=a.x;a=a.y;r&&(g.opposite&&(r[0]=-r[0]),b&&(this.mark=v=e.path().addClass("highcharts-"+(c?c+"-":"")+"tick").add(g.axisGroup)),v[b?"attr":"animate"]({d:this.getMarkPath(k,a,r[0],v.strokeWidth()*p,g.horiz,e),opacity:f}))},renderLabel:function(a,f,p,t){var e=this.axis,c=e.horiz,r=e.options,v=this.label,b=r.labels,k=b.step,n=e.tickmarkOffset,y=!0,u=a.x;a=a.y;v&&E(u)&&(v.xy=a=this.getLabelPosition(u,a,v,c,b,n,t,k),this.isFirst&&!this.isLast&&!q(r.showFirstLabel,1)||this.isLast&&
!this.isFirst&&!q(r.showLastLabel,1)?y=!1:!c||e.isRadial||b.step||b.rotation||f||0===p||this.handleOverflow(a),k&&t%k&&(y=!1),y&&E(a.y)?(a.opacity=p,v[this.isNew?"attr":"animate"](a)):v.attr("y",-9999),this.isNew=!1)},render:function(a,f,p){var g=this.axis,e=g.horiz,c=this.getPosition(e,this.pos,g.tickmarkOffset,f),r=c.x,v=c.y,g=e&&r===g.pos+g.len||!e&&v===g.pos?-1:1;p=q(p,1);this.isActive=!0;this.renderGridLine(f,p,g);this.renderMark(c,p,g);this.renderLabel(c,f,p,a)},destroy:function(){D(this,this.axis)}}})(K);
var T=function(a){var A=a.addEvent,B=a.animObject,D=a.arrayMax,E=a.arrayMin,q=a.correctFloat,f=a.defaultOptions,g=a.defined,z=a.deg2rad,p=a.destroyObjectProperties,t=a.each,e=a.extend,c=a.fireEvent,r=a.format,v=a.getMagnitude,b=a.grep,k=a.inArray,n=a.isArray,y=a.isNumber,u=a.isString,I=a.merge,G=a.normalizeTickInterval,F=a.objectEach,m=a.pick,x=a.removeEvent,l=a.splat,C=a.syncTimeout,d=a.Tick,H=function(){this.init.apply(this,arguments)};a.extend(H.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,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"},type:"linear"},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)}}},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,d){var h=d.isX,w=this;w.chart=a;w.horiz=a.inverted?!h:h;w.isXAxis=h;w.coll=w.coll||(h?"xAxis":"yAxis");w.opposite=
d.opposite;w.side=d.side||(w.horiz?w.opposite?0:2:w.opposite?1:3);w.setOptions(d);var b=this.options,c=b.type;w.labelFormatter=b.labels.formatter||w.defaultLabelFormatter;w.userOptions=d;w.minPixelPadding=0;w.reversed=b.reversed;w.visible=!1!==b.visible;w.zoomEnabled=!1!==b.zoomEnabled;w.hasNames="category"===c||!0===b.categories;w.categories=b.categories||w.hasNames;w.names=w.names||[];w.plotLinesAndBandsGroups={};w.isLog="logarithmic"===c;w.isDatetimeAxis="datetime"===c;w.positiveValuesOnly=w.isLog&&
!w.allowNegativeLog;w.isLinked=g(b.linkedTo);w.ticks={};w.labelEdge=[];w.minorTicks={};w.plotLinesAndBands=[];w.alternateBands={};w.len=0;w.minRange=w.userMinRange=b.minRange||b.maxZoom;w.range=b.range;w.offset=b.offset||0;w.stacks={};w.oldStacks={};w.stacksTouched=0;w.max=null;w.min=null;w.crosshair=m(b.crosshair,l(a.options.tooltip.crosshairs)[h?0:1],!1);d=w.options.events;-1===k(w,a.axes)&&(h?a.axes.splice(a.xAxis.length,0,w):a.axes.push(w),a[w.coll].push(w));w.series=w.series||[];a.inverted&&
h&&void 0===w.reversed&&(w.reversed=!0);F(d,function(a,h){A(w,h,a)});w.lin2log=b.linearToLogConverter||w.lin2log;w.isLog&&(w.val2lin=w.log2lin,w.lin2val=w.lin2log)},setOptions:function(a){this.options=I(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],I(f[this.coll],a))},defaultLabelFormatter:function(){var h=this.axis,d=this.value,b=h.categories,l=this.dateTimeLabelFormat,
m=f.lang,k=m.numericSymbols,m=m.numericSymbolMagnitude||1E3,c=k&&k.length,n,C=h.options.labels.format,h=h.isLog?Math.abs(d):h.tickInterval;if(C)n=r(C,this);else if(b)n=d;else if(l)n=a.dateFormat(l,d);else if(c&&1E3<=h)for(;c--&&void 0===n;)b=Math.pow(m,c+1),h>=b&&0===10*d%b&&null!==k[c]&&0!==d&&(n=a.numberFormat(d/b,-1)+k[c]);void 0===n&&(n=1E4<=Math.abs(d)?a.numberFormat(d,-1):a.numberFormat(d,-1,void 0,""));return n},getSeriesExtremes:function(){var a=this,d=a.chart;a.hasVisibleSeries=!1;a.dataMin=
a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();t(a.series,function(h){if(h.visible||!d.options.chart.ignoreHiddenSeries){var w=h.options,l=w.threshold,k;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=l&&(l=null);if(a.isXAxis)w=h.xData,w.length&&(h=E(w),y(h)||h instanceof Date||(w=b(w,function(a){return y(a)}),h=E(w)),a.dataMin=Math.min(m(a.dataMin,w[0]),h),a.dataMax=Math.max(m(a.dataMax,w[0]),D(w)));else if(h.getExtremes(),k=h.dataMax,h=h.dataMin,g(h)&&g(k)&&
(a.dataMin=Math.min(m(a.dataMin,h),h),a.dataMax=Math.max(m(a.dataMax,k),k)),g(l)&&(a.threshold=l),!w.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})},translate:function(a,d,b,l,m,k){var h=this.linkedParent||this,w=1,c=0,n=l?h.oldTransA:h.transA;l=l?h.oldMin:h.min;var C=h.minPixelPadding;m=(h.isOrdinal||h.isBroken||h.isLog&&m)&&h.lin2val;n||(n=h.transA);b&&(w*=-1,c=h.len);h.reversed&&(w*=-1,c-=w*(h.sector||h.len));d?(a=(a*w+c-C)/n+l,m&&(a=h.lin2val(a))):(m&&(a=h.val2lin(a)),a=w*(a-l)*n+c+
w*C+(y(k)?n*k:0));return a},toPixels:function(a,d){return this.translate(a,!1,!this.horiz,null,!0)+(d?0:this.pos)},toValue:function(a,d){return this.translate(a-(d?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,d,b,l,k){var h=this.chart,w=this.left,c=this.top,n,C,u=b&&h.oldChartHeight||h.chartHeight,x=b&&h.oldChartWidth||h.chartWidth,e;n=this.transB;var r=function(a,h,d){if(a<h||a>d)l?a=Math.min(Math.max(h,a),d):e=!0;return a};k=m(k,this.translate(a,null,null,b));a=b=Math.round(k+
n);n=C=Math.round(u-k-n);y(k)?this.horiz?(n=c,C=u-this.bottom,a=b=r(a,w,w+this.width)):(a=w,b=x-this.right,n=C=r(n,c,c+this.height)):e=!0;return e&&!l?null:h.renderer.crispLine(["M",a,n,"L",b,C],d||1)},getLinearTickPositions:function(a,d,b){var h,w=q(Math.floor(d/a)*a);b=q(Math.ceil(b/a)*a);var l=[];if(this.single)return[d];for(d=w;d<=b;){l.push(d);d=q(d+a);if(d===h)break;h=d}return l},getMinorTickPositions:function(){var a=this,d=a.options,b=a.tickPositions,l=a.minorTickInterval,m=[],k=a.pointRangePadding||
0,c=a.min-k,k=a.max+k,n=k-c;if(n&&n/l<a.len/3)if(a.isLog)t(this.paddedTicks,function(h,d,w){d&&m.push.apply(m,a.getLogTickPositions(l,w[d-1],w[d],!0))});else if(a.isDatetimeAxis&&"auto"===d.minorTickInterval)m=m.concat(a.getTimeTicks(a.normalizeTimeTickInterval(l),c,k,d.startOfWeek));else for(d=c+(b[0]-c)%l;d<=k&&d!==m[0];d+=l)m.push(d);0!==m.length&&a.trimTicks(m);return m},adjustForMinRange:function(){var a=this.options,d=this.min,b=this.max,l,k=this.dataMax-this.dataMin>=this.minRange,c,n,C,u,
x,e;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(g(a.min)||g(a.max)?this.minRange=null:(t(this.series,function(a){u=a.xData;for(n=x=a.xIncrement?1:u.length-1;0<n;n--)if(C=u[n]-u[n-1],void 0===c||C<c)c=C}),this.minRange=Math.min(5*c,this.dataMax-this.dataMin)));b-d<this.minRange&&(e=this.minRange,l=(e-b+d)/2,l=[d-l,m(a.min,d-l)],k&&(l[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),d=D(l),b=[d+e,m(a.max,d+e)],k&&(b[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),b=E(b),b-d<e&&
(l[0]=b-e,l[1]=m(a.min,b-e),d=D(l)));this.min=d;this.max=b},getClosest:function(){var a;this.categories?a=1:t(this.series,function(h){var d=h.closestPointRange,w=h.visible||!h.chart.options.chart.ignoreHiddenSeries;!h.noSharedTooltip&&g(d)&&w&&(a=g(a)?Math.min(a,d):d)});return a},nameToX:function(a){var h=n(this.categories),d=h?this.categories:this.names,b=a.options.x,l;a.series.requireSorting=!1;g(b)||(b=!1===this.options.uniqueNames?a.series.autoIncrement():k(a.name,d));-1===b?h||(l=d.length):l=
b;void 0!==l&&(this.names[l]=a.name);return l},updateNames:function(){var a=this;0<this.names.length&&(this.names.length=0,this.minRange=void 0,t(this.series||[],function(h){h.xIncrement=null;if(!h.points||h.isDirtyData)h.processData(),h.generatePoints();t(h.points,function(d,w){var b;d.options&&(b=a.nameToX(d),void 0!==b&&b!==d.x&&(d.x=b,h.xData[w]=b))})}))},setAxisTranslation:function(a){var h=this,d=h.max-h.min,b=h.axisPointRange||0,l,k=0,c=0,n=h.linkedParent,C=!!h.categories,x=h.transA,e=h.isXAxis;
if(e||C||b)l=h.getClosest(),n?(k=n.minPointOffset,c=n.pointRangePadding):t(h.series,function(a){var d=C?1:e?m(a.options.pointRange,l,0):h.axisPointRange||0;a=a.options.pointPlacement;b=Math.max(b,d);h.single||(k=Math.max(k,u(a)?0:d/2),c=Math.max(c,"on"===a?0:d))}),n=h.ordinalSlope&&l?h.ordinalSlope/l:1,h.minPointOffset=k*=n,h.pointRangePadding=c*=n,h.pointRange=Math.min(b,d),e&&(h.closestPointRange=l);a&&(h.oldTransA=x);h.translationSlope=h.transA=x=h.options.staticScale||h.len/(d+c||1);h.transB=
h.horiz?h.left:h.bottom;h.minPixelPadding=x*k},minFromRange:function(){return this.max-this.range},setTickInterval:function(h){var d=this,b=d.chart,l=d.options,k=d.isLog,n=d.log2lin,C=d.isDatetimeAxis,u=d.isXAxis,x=d.isLinked,e=l.maxPadding,r=l.minPadding,H=l.tickInterval,f=l.tickPixelInterval,F=d.categories,p=d.threshold,I=d.softThreshold,z,B,A,D;C||F||x||this.getTickAmount();A=m(d.userMin,l.min);D=m(d.userMax,l.max);x?(d.linkedParent=b[d.coll][l.linkedTo],b=d.linkedParent.getExtremes(),d.min=m(b.min,
b.dataMin),d.max=m(b.max,b.dataMax),l.type!==d.linkedParent.options.type&&a.error(11,1)):(!I&&g(p)&&(d.dataMin>=p?(z=p,r=0):d.dataMax<=p&&(B=p,e=0)),d.min=m(A,z,d.dataMin),d.max=m(D,B,d.dataMax));k&&(d.positiveValuesOnly&&!h&&0>=Math.min(d.min,m(d.dataMin,d.min))&&a.error(10,1),d.min=q(n(d.min),15),d.max=q(n(d.max),15));d.range&&g(d.max)&&(d.userMin=d.min=A=Math.max(d.min,d.minFromRange()),d.userMax=D=d.max,d.range=null);c(d,"foundExtremes");d.beforePadding&&d.beforePadding();d.adjustForMinRange();
!(F||d.axisPointRange||d.usePercentage||x)&&g(d.min)&&g(d.max)&&(n=d.max-d.min)&&(!g(A)&&r&&(d.min-=n*r),!g(D)&&e&&(d.max+=n*e));y(l.softMin)&&(d.min=Math.min(d.min,l.softMin));y(l.softMax)&&(d.max=Math.max(d.max,l.softMax));y(l.floor)&&(d.min=Math.max(d.min,l.floor));y(l.ceiling)&&(d.max=Math.min(d.max,l.ceiling));I&&g(d.dataMin)&&(p=p||0,!g(A)&&d.min<p&&d.dataMin>=p?d.min=p:!g(D)&&d.max>p&&d.dataMax<=p&&(d.max=p));d.tickInterval=d.min===d.max||void 0===d.min||void 0===d.max?1:x&&!H&&f===d.linkedParent.options.tickPixelInterval?
H=d.linkedParent.tickInterval:m(H,this.tickAmount?(d.max-d.min)/Math.max(this.tickAmount-1,1):void 0,F?1:(d.max-d.min)*f/Math.max(d.len,f));u&&!h&&t(d.series,function(a){a.processData(d.min!==d.oldMin||d.max!==d.oldMax)});d.setAxisTranslation(!0);d.beforeSetTickPositions&&d.beforeSetTickPositions();d.postProcessTickInterval&&(d.tickInterval=d.postProcessTickInterval(d.tickInterval));d.pointRange&&!H&&(d.tickInterval=Math.max(d.pointRange,d.tickInterval));h=m(l.minTickInterval,d.isDatetimeAxis&&d.closestPointRange);
!H&&d.tickInterval<h&&(d.tickInterval=h);C||k||H||(d.tickInterval=G(d.tickInterval,null,v(d.tickInterval),m(l.allowDecimals,!(.5<d.tickInterval&&5>d.tickInterval&&1E3<d.max&&9999>d.max)),!!this.tickAmount));this.tickAmount||(d.tickInterval=d.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,d,b=a.tickPositions,l=a.tickPositioner,m=a.startOnTick,k=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&&g(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=d=b&&b.slice();!d&&(d=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),d.length>this.len&&(d=[d[0],d.pop()]),this.tickPositions=d,l&&(l=l.apply(this,[this.min,this.max])))&&(this.tickPositions=d=l);this.paddedTicks=d.slice(0);this.trimTicks(d,m,k);this.isLinked||(this.single&&(this.min-=.5,this.max+=.5),b||l||this.adjustTickAmount())},trimTicks:function(a,d,b){var h=a[0],l=a[a.length-1],m=this.minPointOffset||0;if(!this.isLinked){if(d&&-Infinity!==h)this.min=h;else for(;this.min-m>a[0];)a.shift();if(b)this.max=l;else for(;this.max+m<a[a.length-1];)a.pop();
0===a.length&&g(h)&&a.push((l+h)/2)}},alignToOthers:function(){var a={},d,b=this.options;!1===this.chart.options.chart.alignTicks||!1===b.alignTicks||this.isLog||t(this.chart[this.coll],function(h){var b=h.options,b=[h.horiz?b.left:b.top,b.width,b.height,b.pane].join();h.series.length&&(a[b]?d=!0:a[b]=1)});return d},getTickAmount:function(){var a=this.options,d=a.tickAmount,b=a.tickPixelInterval;!g(a.tickInterval)&&this.len<b&&!this.isRadial&&!this.isLog&&a.startOnTick&&a.endOnTick&&(d=2);!d&&this.alignToOthers()&&
(d=Math.ceil(this.len/b)+1);4>d&&(this.finalTickAmt=d,d=5);this.tickAmount=d},adjustTickAmount:function(){var a=this.tickInterval,d=this.tickPositions,b=this.tickAmount,l=this.finalTickAmt,m=d&&d.length;if(m<b){for(;d.length<b;)d.push(q(d[d.length-1]+a));this.transA*=(m-1)/(b-1);this.max=d[d.length-1]}else m>b&&(this.tickInterval*=2,this.setTickPositions());if(g(l)){for(a=b=d.length;a--;)(3===l&&1===a%2||2>=l&&0<a&&a<b-1)&&d.splice(a,1);this.finalTickAmt=void 0}},setScale:function(){var a,d;this.oldMin=
this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();d=this.len!==this.oldAxisLength;t(this.series,function(d){if(d.isDirtyData||d.isDirty||d.xAxis.isDirty)a=!0});d||a||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=
d||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(a,d,b,l,k){var h=this,w=h.chart;b=m(b,!0);t(h.series,function(a){delete a.kdTree});k=e(k,{min:a,max:d});c(h,"setExtremes",k,function(){h.userMin=a;h.userMax=d;h.eventArgs=k;b&&w.redraw(l)})},zoom:function(a,d){var h=this.dataMin,b=this.dataMax,l=this.options,k=Math.min(h,m(l.min,h)),l=Math.max(b,m(l.max,b));if(a!==this.min||d!==this.max)this.allowZoomOutside||(g(h)&&(a<k&&(a=k),a>l&&(a=l)),
g(b)&&(d<k&&(d=k),d>l&&(d=l))),this.displayBtn=void 0!==a||void 0!==d,this.setExtremes(a,d,!1,void 0,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,d=this.options,b=d.offsets||[0,0,0,0],l=this.horiz,k=m(d.width,a.plotWidth-b[3]+b[1]),c=m(d.height,a.plotHeight-b[0]+b[2]),n=m(d.top,a.plotTop+b[0]),d=m(d.left,a.plotLeft+b[3]),b=/%$/;b.test(c)&&(c=Math.round(parseFloat(c)/100*a.plotHeight));b.test(n)&&(n=Math.round(parseFloat(n)/100*a.plotHeight+a.plotTop));this.left=d;this.top=n;
this.width=k;this.height=c;this.bottom=a.chartHeight-c-n;this.right=a.chartWidth-k-d;this.len=Math.max(l?k:c,0);this.pos=l?d:n},getExtremes:function(){var a=this.isLog,d=this.lin2log;return{min:a?q(d(this.min)):this.min,max:a?q(d(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var d=this.isLog,h=this.lin2log,b=d?h(this.min):this.min,d=d?h(this.max):this.max;null===a?a=b:b>a?a=b:d<a&&(a=d);return this.translate(a,0,
1,0,1)},autoLabelAlign:function(a){a=(m(a,0)-90*this.side+720)%360;return 15<a&&165>a?"right":195<a&&345>a?"left":"center"},tickSize:function(a){var d=this.options,h=d[a+"Length"],b=m(d[a+"Width"],"tick"===a&&this.isXAxis?1:0);if(b&&h)return"inside"===d[a+"Position"]&&(h=-h),[h,b]},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,d=this.horiz,
b=this.tickInterval,l=b,k=this.len/(((this.categories?1:0)+this.max-this.min)/b),c,n=a.rotation,C=this.labelMetrics(),x,u=Number.MAX_VALUE,e,y=function(a){a/=k||1;a=1<a?Math.ceil(a):1;return a*b};d?(e=!a.staggerLines&&!a.step&&(g(n)?[n]:k<m(a.autoRotationLimit,80)&&a.autoRotation))&&t(e,function(a){var d;if(a===n||a&&-90<=a&&90>=a)x=y(Math.abs(C.h/Math.sin(z*a))),d=x+Math.abs(a/360),d<u&&(u=d,c=a,l=x)}):a.step||(l=y(C.h));this.autoRotation=e;this.labelRotation=m(c,n);return l},getSlotWidth:function(){var a=
this.chart,d=this.horiz,b=this.options.labels,l=Math.max(this.tickPositions.length-(this.categories?0:1),1),m=a.margin[3];return d&&2>(b.step||0)&&!b.rotation&&(this.staggerLines||1)*this.len/l||!d&&(m&&m-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,d=a.renderer,b=this.tickPositions,l=this.ticks,m=this.options.labels,k=this.horiz,c=this.getSlotWidth(),n=Math.max(1,Math.round(c-2*(m.padding||5))),C={},x=this.labelMetrics(),e=m.style&&m.style.textOverflow,y,r=0,v,H;u(m.rotation)||
(C.rotation=m.rotation||0);t(b,function(a){(a=l[a])&&a.labelLength>r&&(r=a.labelLength)});this.maxLabelLength=r;if(this.autoRotation)r>n&&r>x.h?C.rotation=this.labelRotation:this.labelRotation=0;else if(c&&(y={width:n+"px"},!e))for(y.textOverflow="clip",v=b.length;!k&&v--;)if(H=b[v],n=l[H].label)n.styles&&"ellipsis"===n.styles.textOverflow?n.css({textOverflow:"clip"}):l[H].labelLength>c&&n.css({width:c+"px"}),n.getBBox().height>this.len/b.length-(x.h-x.f)&&(n.specCss={textOverflow:"ellipsis"});C.rotation&&
(y={width:(r>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+"px"},e||(y.textOverflow="ellipsis"));if(this.labelAlign=m.align||this.autoLabelAlign(this.labelRotation))C.align=this.labelAlign;t(b,function(a){var d=(a=l[a])&&a.label;d&&(d.attr(C),y&&d.css(I(y,d.specCss)),delete d.specCss,a.rotation=C.rotation)});this.tickRotCorr=d.rotCorr(x.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||g(this.min)&&g(this.max)&&!!this.tickPositions},addTitle:function(a){var d=
this.chart.renderer,h=this.horiz,b=this.opposite,l=this.options.title,m;this.axisTitle||((m=l.textAlign)||(m=(h?{low:"left",middle:"center",high:"right"}:{low:b?"right":"left",middle:"center",high:b?"left":"right"})[l.align]),this.axisTitle=d.text(l.text,0,0,l.useHTML).attr({zIndex:7,rotation:l.rotation||0,align:m}).addClass("highcharts-axis-title").add(this.axisGroup),this.axisTitle.isNew=!0);this.axisTitle[a?"show":"hide"](!0)},generateTick:function(a){var h=this.ticks;h[a]?h[a].addLabel():h[a]=
new d(this,a)},getOffset:function(){var a=this,d=a.chart,b=d.renderer,l=a.options,k=a.tickPositions,c=a.ticks,n=a.horiz,C=a.side,x=d.inverted?[1,0,3,2][C]:C,u,e,y=0,r,v=0,H=l.title,f=l.labels,G=0,p=d.axisOffset,d=d.clipOffset,I=[-1,1,1,-1][C],q=l.className,z=a.axisParent,B=this.tickSize("tick");u=a.hasData();a.showAxis=e=u||m(l.showEmpty,!0);a.staggerLines=a.horiz&&f.staggerLines;a.axisGroup||(a.gridGroup=b.g("grid").attr({zIndex:l.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+
(q||"")).add(z),a.axisGroup=b.g("axis").attr({zIndex:l.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(q||"")).add(z),a.labelGroup=b.g("axis-labels").attr({zIndex:f.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(q||"")).add(z));u||a.isLinked?(t(k,function(d,h){a.generateTick(d,h)}),a.renderUnsquish(),!1===f.reserveSpace||0!==C&&2!==C&&{1:"left",3:"right"}[C]!==a.labelAlign&&"center"!==a.labelAlign||t(k,function(a){G=Math.max(c[a].getLabelSize(),G)}),a.staggerLines&&
(G*=a.staggerLines,a.labelOffset=G*(a.opposite?-1:1))):F(c,function(a,d){a.destroy();delete c[d]});H&&H.text&&!1!==H.enabled&&(a.addTitle(e),e&&!1!==H.reserveSpace&&(a.titleOffset=y=a.axisTitle.getBBox()[n?"height":"width"],r=H.offset,v=g(r)?0:m(H.margin,n?5:10)));a.renderLine();a.offset=I*m(l.offset,p[C]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};b=0===C?-a.labelMetrics().h:2===C?a.tickRotCorr.y:0;v=Math.abs(G)+v;G&&(v=v-b+I*(n?m(f.y,a.tickRotCorr.y+8*I):f.x));a.axisTitleMargin=m(r,v);p[C]=Math.max(p[C],
a.axisTitleMargin+y+I*a.offset,v,u&&k.length&&B?B[0]+I*a.offset:0);l=l.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);d[x]=Math.max(d[x],l)},getLinePath:function(a){var d=this.chart,h=this.opposite,b=this.offset,l=this.horiz,m=this.left+(h?this.width:0)+b,b=d.chartHeight-this.bottom-(h?this.height:0)+b;h&&(a*=-1);return d.renderer.crispLine(["M",l?this.left:m,l?b:this.top,"L",l?d.chartWidth-this.right:m,l?b:d.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup))},
getTitlePosition:function(){var a=this.horiz,d=this.left,b=this.top,l=this.len,m=this.options.title,k=a?d:b,c=this.opposite,n=this.offset,C=m.x||0,x=m.y||0,u=this.chart.renderer.fontMetrics(m.style&&m.style.fontSize,this.axisTitle).f,l={low:k+(a?0:l),middle:k+l/2,high:k+(a?l:0)}[m.align],d=(a?b+this.height:d)+(a?1:-1)*(c?-1:1)*this.axisTitleMargin+(2===this.side?u:0);return{x:a?l+C:d+(c?this.width:0)+n+C,y:a?d+x-(c?this.height:0)+n:l+x}},renderMinorTick:function(a){var h=this.chart.hasRendered&&y(this.oldMin),
b=this.minorTicks;b[a]||(b[a]=new d(this,a,"minor"));h&&b[a].isNew&&b[a].render(null,!0);b[a].render(null,!1,1)},renderTick:function(a,b){var h=this.isLinked,l=this.ticks,m=this.chart.hasRendered&&y(this.oldMin);if(!h||a>=this.min&&a<=this.max)l[a]||(l[a]=new d(this,a)),m&&l[a].isNew&&l[a].render(b,!0,.1),l[a].render(b)},render:function(){var h=this,b=h.chart,l=h.options,m=h.isLog,k=h.lin2log,c=h.isLinked,n=h.tickPositions,x=h.axisTitle,u=h.ticks,e=h.minorTicks,y=h.alternateBands,r=l.stackLabels,
v=l.alternateGridColor,H=h.tickmarkOffset,f=h.axisLine,g=h.showAxis,G=B(b.renderer.globalAnimation),p,I;h.labelEdge.length=0;h.overlap=!1;t([u,e,y],function(a){F(a,function(a){a.isActive=!1})});if(h.hasData()||c)h.minorTickInterval&&!h.categories&&t(h.getMinorTickPositions(),function(a){h.renderMinorTick(a)}),n.length&&(t(n,function(a,d){h.renderTick(a,d)}),H&&(0===h.min||h.single)&&(u[-1]||(u[-1]=new d(h,-1,null,!0)),u[-1].render(-1))),v&&t(n,function(d,l){I=void 0!==n[l+1]?n[l+1]+H:h.max-H;0===
l%2&&d<h.max&&I<=h.max+(b.polar?-H:H)&&(y[d]||(y[d]=new a.PlotLineOrBand(h)),p=d+H,y[d].options={from:m?k(p):p,to:m?k(I):I,color:v},y[d].render(),y[d].isActive=!0)}),h._addedPlotLB||(t((l.plotLines||[]).concat(l.plotBands||[]),function(a){h.addPlotBandOrLine(a)}),h._addedPlotLB=!0);t([u,e,y],function(a){var d,h=[],l=G.duration;F(a,function(a,d){a.isActive||(a.render(d,!1,0),a.isActive=!1,h.push(d))});C(function(){for(d=h.length;d--;)a[h[d]]&&!a[h[d]].isActive&&(a[h[d]].destroy(),delete a[h[d]])},
a!==y&&b.hasRendered&&l?l:0)});f&&(f[f.isPlaced?"animate":"attr"]({d:this.getLinePath(f.strokeWidth())}),f.isPlaced=!0,f[g?"show":"hide"](!0));x&&g&&(x[x.isNew?"attr":"animate"](h.getTitlePosition()),x.isNew=!1);r&&r.enabled&&h.renderStackTotals();h.isDirty=!1},redraw:function(){this.visible&&(this.render(),t(this.plotLinesAndBands,function(a){a.render()}));t(this.series,function(a){a.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(a){var d=this,
b=d.stacks,h=d.plotLinesAndBands,l;a||x(d);F(b,function(a,d){p(a);b[d]=null});t([d.ticks,d.minorTicks,d.alternateBands],function(a){p(a)});if(h)for(a=h.length;a--;)h[a].destroy();t("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross".split(" "),function(a){d[a]&&(d[a]=d[a].destroy())});for(l in d.plotLinesAndBandsGroups)d.plotLinesAndBandsGroups[l]=d.plotLinesAndBandsGroups[l].destroy();F(d,function(a,b){-1===k(b,d.keepProps)&&delete d[b]})},drawCrosshair:function(a,d){var b,
h=this.crosshair,l=m(h.snap,!0),k,c=this.cross;a||(a=this.cross&&this.cross.e);this.crosshair&&!1!==(g(d)||!l)?(l?g(d)&&(k=this.isXAxis?d.plotX:this.len-d.plotY):k=a&&(this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos),g(k)&&(b=this.getPlotLinePath(d&&(this.isXAxis?d.x:m(d.stackY,d.y)),null,null,null,k)||null),g(b)?(d=this.categories&&!this.isRadial,c||(this.cross=c=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(d?"category ":"thin ")+h.className).attr({zIndex:m(h.zIndex,
2)}).add()),c.show().attr({d:b}),d&&!h.width&&c.attr({"stroke-width":this.transA}),this.cross.e=a):this.hideCrosshair()):this.hideCrosshair()},hideCrosshair:function(){this.cross&&this.cross.hide()}});return a.Axis=H}(K);(function(a){var A=a.Axis,B=a.Date,D=a.dateFormat,E=a.defaultOptions,q=a.defined,f=a.each,g=a.extend,z=a.getMagnitude,p=a.getTZOffset,t=a.normalizeTickInterval,e=a.pick,c=a.timeUnits;A.prototype.getTimeTicks=function(a,v,b,k){var n=[],y={},u=E.global.useUTC,r,G=new B(v-Math.max(p(v),
p(b))),t=B.hcMakeTime,m=a.unitRange,x=a.count,l;if(q(v)){G[B.hcSetMilliseconds](m>=c.second?0:x*Math.floor(G.getMilliseconds()/x));if(m>=c.second)G[B.hcSetSeconds](m>=c.minute?0:x*Math.floor(G.getSeconds()/x));if(m>=c.minute)G[B.hcSetMinutes](m>=c.hour?0:x*Math.floor(G[B.hcGetMinutes]()/x));if(m>=c.hour)G[B.hcSetHours](m>=c.day?0:x*Math.floor(G[B.hcGetHours]()/x));if(m>=c.day)G[B.hcSetDate](m>=c.month?1:x*Math.floor(G[B.hcGetDate]()/x));m>=c.month&&(G[B.hcSetMonth](m>=c.year?0:x*Math.floor(G[B.hcGetMonth]()/
x)),r=G[B.hcGetFullYear]());if(m>=c.year)G[B.hcSetFullYear](r-r%x);if(m===c.week)G[B.hcSetDate](G[B.hcGetDate]()-G[B.hcGetDay]()+e(k,1));r=G[B.hcGetFullYear]();k=G[B.hcGetMonth]();var C=G[B.hcGetDate](),d=G[B.hcGetHours]();if(B.hcTimezoneOffset||B.hcGetTimezoneOffset)l=(!u||!!B.hcGetTimezoneOffset)&&(b-v>4*c.month||p(v)!==p(b)),G=G.getTime(),G=new B(G+p(G));u=G.getTime();for(v=1;u<b;)n.push(u),u=m===c.year?t(r+v*x,0):m===c.month?t(r,k+v*x):!l||m!==c.day&&m!==c.week?l&&m===c.hour?t(r,k,C,d+v*x):u+
m*x:t(r,k,C+v*x*(m===c.day?1:7)),v++;n.push(u);m<=c.hour&&1E4>n.length&&f(n,function(a){0===a%18E5&&"000000000"===D("%H%M%S%L",a)&&(y[a]="day")})}n.info=g(a,{higherRanks:y,totalRange:m*x});return n};A.prototype.normalizeTimeTickInterval=function(a,e){var b=e||[["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]];e=b[b.length-1];var k=c[e[0]],n=e[1],y;for(y=
0;y<b.length&&!(e=b[y],k=c[e[0]],n=e[1],b[y+1]&&a<=(k*n[n.length-1]+c[b[y+1][0]])/2);y++);k===c.year&&a<5*k&&(n=[1,2,5]);a=t(a/k,n,"year"===e[0]?Math.max(z(a/k),1):1);return{unitRange:k,count:a,unitName:e[0]}}})(K);(function(a){var A=a.Axis,B=a.getMagnitude,D=a.map,E=a.normalizeTickInterval,q=a.pick;A.prototype.getLogTickPositions=function(a,g,z,p){var f=this.options,e=this.len,c=this.lin2log,r=this.log2lin,v=[];p||(this._minorAutoInterval=null);if(.5<=a)a=Math.round(a),v=this.getLinearTickPositions(a,
g,z);else if(.08<=a)for(var e=Math.floor(g),b,k,n,y,u,f=.3<a?[1,2,4]:.15<a?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];e<z+1&&!u;e++)for(k=f.length,b=0;b<k&&!u;b++)n=r(c(e)*f[b]),n>g&&(!p||y<=z)&&void 0!==y&&v.push(y),y>z&&(u=!0),y=n;else g=c(g),z=c(z),a=f[p?"minorTickInterval":"tickInterval"],a=q("auto"===a?null:a,this._minorAutoInterval,f.tickPixelInterval/(p?5:1)*(z-g)/((p?e/this.tickPositions.length:e)||1)),a=E(a,null,B(a)),v=D(this.getLinearTickPositions(a,g,z),r),p||(this._minorAutoInterval=a/5);p||(this.tickInterval=
a);return v};A.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};A.prototype.lin2log=function(a){return Math.pow(10,a)}})(K);(function(a,A){var B=a.arrayMax,D=a.arrayMin,E=a.defined,q=a.destroyObjectProperties,f=a.each,g=a.erase,z=a.merge,p=a.pick;a.PlotLineOrBand=function(a,e){this.axis=a;e&&(this.options=e,this.id=e.id)};a.PlotLineOrBand.prototype={render:function(){var f=this,e=f.axis,c=e.horiz,r=f.options,v=r.label,b=f.label,k=r.to,n=r.from,y=r.value,u=E(n)&&E(k),g=E(y),G=f.svgElem,
F=!G,m=[],x=p(r.zIndex,0),l=r.events,m={"class":"highcharts-plot-"+(u?"band ":"line ")+(r.className||"")},C={},d=e.chart.renderer,H=u?"bands":"lines",h;h=e.log2lin;e.isLog&&(n=h(n),k=h(k),y=h(y));C.zIndex=x;H+="-"+x;(h=e.plotLinesAndBandsGroups[H])||(e.plotLinesAndBandsGroups[H]=h=d.g("plot-"+H).attr(C).add());F&&(f.svgElem=G=d.path().attr(m).add(h));if(g)m=e.getPlotLinePath(y,G.strokeWidth());else if(u)m=e.getPlotBandPath(n,k,r);else return;F&&m&&m.length?(G.attr({d:m}),l&&a.objectEach(l,function(a,
d){G.on(d,function(a){l[d].apply(f,[a])})})):G&&(m?(G.show(),G.animate({d:m})):(G.hide(),b&&(f.label=b=b.destroy())));v&&E(v.text)&&m&&m.length&&0<e.width&&0<e.height&&!m.flat?(v=z({align:c&&u&&"center",x:c?!u&&4:10,verticalAlign:!c&&u&&"middle",y:c?u?16:10:u?6:-4,rotation:c&&!u&&90},v),this.renderLabel(v,m,u,x)):b&&b.hide();return f},renderLabel:function(a,e,c,r){var v=this.label,b=this.axis.chart.renderer;v||(v={align:a.textAlign||a.align,rotation:a.rotation,"class":"highcharts-plot-"+(c?"band":
"line")+"-label "+(a.className||"")},v.zIndex=r,this.label=v=b.text(a.text,0,0,a.useHTML).attr(v).add());r=[e[1],e[4],c?e[6]:e[1]];e=[e[2],e[5],c?e[7]:e[2]];c=D(r);b=D(e);v.align(a,!1,{x:c,y:b,width:B(r)-c,height:B(e)-b});v.show()},destroy:function(){g(this.axis.plotLinesAndBands,this);delete this.axis;q(this)}};a.extend(A.prototype,{getPlotBandPath:function(a,e){var c=this.getPlotLinePath(e,null,null,!0),r=this.getPlotLinePath(a,null,null,!0),v=this.horiz,b=1;a=a<this.min&&e<this.min||a>this.max&&
e>this.max;r&&c?(a&&(r.flat=r.toString()===c.toString(),b=0),r.push(v&&c[4]===r[4]?c[4]+b:c[4],v||c[5]!==r[5]?c[5]:c[5]+b,v&&c[1]===r[1]?c[1]+b:c[1],v||c[2]!==r[2]?c[2]:c[2]+b)):r=null;return r},addPlotBand:function(a){return this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){return this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(f,e){var c=(new a.PlotLineOrBand(this,f)).render(),r=this.userOptions;c&&(e&&(r[e]=r[e]||[],r[e].push(f)),this.plotLinesAndBands.push(c));return c},
removePlotBandOrLine:function(a){for(var e=this.plotLinesAndBands,c=this.options,r=this.userOptions,v=e.length;v--;)e[v].id===a&&e[v].destroy();f([c.plotLines||[],r.plotLines||[],c.plotBands||[],r.plotBands||[]],function(b){for(v=b.length;v--;)b[v].id===a&&g(b,b[v])})},removePlotBand:function(a){this.removePlotBandOrLine(a)},removePlotLine:function(a){this.removePlotBandOrLine(a)}})})(K,T);(function(a){var A=a.dateFormat,B=a.each,D=a.extend,E=a.format,q=a.isNumber,f=a.map,g=a.merge,z=a.pick,p=a.splat,
t=a.syncTimeout,e=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){B(this.chart.series,function(c){var e=c&&c.tt;e&&(!e.isActive||a?c.tt=e.destroy():e.isActive=!1)})},applyFilter:function(){var a=this.chart;a.renderer.definition({tagName:"filter",id:"drop-shadow-"+a.index,
opacity:.5,children:[{tagName:"feGaussianBlur",in:"SourceAlpha",stdDeviation:1},{tagName:"feOffset",dx:1,dy:1},{tagName:"feComponentTransfer",children:[{tagName:"feFuncA",type:"linear",slope:.3}]},{tagName:"feMerge",children:[{tagName:"feMergeNode"},{tagName:"feMergeNode",in:"SourceGraphic"}]}]});a.renderer.definition({tagName:"style",textContent:".highcharts-tooltip-"+a.index+"{filter:url(#drop-shadow-"+a.index+")}"})},getLabel:function(){var a=this.chart.renderer,e=this.options;this.label||(this.label=
this.split?a.g("tooltip"):a.label("",0,0,e.shape||"callout",null,null,e.useHTML,null,"tooltip").attr({padding:e.padding,r:e.borderRadius}),this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();g(!0,this.chart.options.tooltip.userOptions,a);this.init(this.chart,g(!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,v,b){var k=this,c=k.now,y=!1!==k.options.animation&&!k.isHidden&&(1<Math.abs(a-c.x)||1<Math.abs(e-c.y)),u=k.followPointer||1<k.len;D(c,{x:y?(2*c.x+a)/3:a,y:y?(c.y+e)/2:e,anchorX:u?void 0:y?(2*c.anchorX+v)/3:v,anchorY:u?void 0:y?(c.anchorY+b)/2:b});k.getLabel().attr(c);y&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){k&&k.move(a,e,v,b)},32))},hide:function(a){var c=
this;clearTimeout(this.hideTimer);a=z(a,this.options.hideDelay,500);this.isHidden||(this.hideTimer=t(function(){c.getLabel()[a?"fadeOut":"hide"]();c.isHidden=!0},a))},getAnchor:function(a,e){var c,b=this.chart,k=b.inverted,n=b.plotTop,y=b.plotLeft,u=0,r=0,g,F;a=p(a);c=a[0].tooltipPos;this.followPointer&&e&&(void 0===e.chartX&&(e=b.pointer.normalize(e)),c=[e.chartX-b.plotLeft,e.chartY-n]);c||(B(a,function(a){g=a.series.yAxis;F=a.series.xAxis;u+=a.plotX+(!k&&F?F.left-y:0);r+=(a.plotLow?(a.plotLow+a.plotHigh)/
2:a.plotY)+(!k&&g?g.top-n:0)}),u/=a.length,r/=a.length,c=[k?b.plotWidth-r:u,this.shared&&!k&&1<a.length&&e?e.chartY-n:k?b.plotHeight-u:r]);return f(c,Math.round)},getPosition:function(a,e,v){var b=this.chart,k=this.distance,c={},y=v.h||0,u,r=["y",b.chartHeight,e,v.plotY+b.plotTop,b.plotTop,b.plotTop+b.plotHeight],f=["x",b.chartWidth,a,v.plotX+b.plotLeft,b.plotLeft,b.plotLeft+b.plotWidth],g=!this.followPointer&&z(v.ttBelow,!b.inverted===!!v.negative),m=function(a,b,h,l,m,n){var d=h<l-k,C=l+k+h<b,w=
l-k-h;l+=k;if(g&&C)c[a]=l;else if(!g&&d)c[a]=w;else if(d)c[a]=Math.min(n-h,0>w-y?w:w-y);else if(C)c[a]=Math.max(m,l+y+h>b?l:l+y);else return!1},x=function(a,b,h,l){var d;l<k||l>b-k?d=!1:c[a]=l<h/2?1:l>b-h/2?b-h-2:l-h/2;return d},l=function(a){var d=r;r=f;f=d;u=a},C=function(){!1!==m.apply(0,r)?!1!==x.apply(0,f)||u||(l(!0),C()):u?c.x=c.y=0:(l(!0),C())};(b.inverted||1<this.len)&&l();C();return c},defaultFormatter:function(a){var c=this.points||p(this),e;e=[a.tooltipFooterHeaderFormatter(c[0])];e=e.concat(a.bodyFormatter(c));
e.push(a.tooltipFooterHeaderFormatter(c[0],!0));return e},refresh:function(a,e){var c,b,k=a,n,y={},u=[];c=this.options.formatter||this.defaultFormatter;var y=this.shared,r;clearTimeout(this.hideTimer);this.followPointer=p(k)[0].series.tooltipOptions.followPointer;n=this.getAnchor(k,e);e=n[0];b=n[1];!y||k.series&&k.series.noSharedTooltip?y=k.getLabelConfig():(B(k,function(a){a.setState("hover");u.push(a.getLabelConfig())}),y={x:k[0].category,y:k[0].y},y.points=u,k=k[0]);this.len=u.length;y=c.call(y,
this);r=k.series;this.distance=z(r.tooltipOptions.distance,16);!1===y?this.hide():(c=this.getLabel(),this.isHidden&&c.attr({opacity:1}).show(),this.split?this.renderSplit(y,a):(c.attr({text:y&&y.join?y.join(""):y}),c.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+z(k.colorIndex,r.colorIndex)),this.updatePosition({plotX:e,plotY:b,negative:k.negative,ttBelow:k.ttBelow,h:n[2]||0})),this.isHidden=!1)},renderSplit:function(c,e){var r=this,b=[],k=this.chart,n=k.renderer,y=!0,u=this.options,
f,g=this.getLabel();B(c.slice(0,e.length+1),function(a,m){m=e[m-1]||{isHeader:!0,plotX:e[0].plotX};var c=m.series||r,l=c.tt,C="highcharts-color-"+z(m.colorIndex,(m.series||{}).colorIndex,"none");l||(c.tt=l=n.label(null,null,null,"callout").addClass("highcharts-tooltip-box "+C).attr({padding:u.padding,r:u.borderRadius}).add(g));l.isActive=!0;l.attr({text:a});a=l.getBBox();C=a.width+l.strokeWidth();m.isHeader?(f=a.height,C=Math.max(0,Math.min(m.plotX+k.plotLeft-C/2,k.chartWidth-C))):C=m.plotX+k.plotLeft-
z(u.distance,16)-C;0>C&&(y=!1);a=(m.series&&m.series.yAxis&&m.series.yAxis.pos)+(m.plotY||0);a-=k.plotTop;b.push({target:m.isHeader?k.plotHeight+f:a,rank:m.isHeader?1:0,size:c.tt.getBBox().height+1,point:m,x:C,tt:l})});this.cleanSplit();a.distribute(b,k.plotHeight+f);B(b,function(a){var b=a.point,c=b.series;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:y||b.isHeader?a.x:b.plotX+k.plotLeft+z(u.distance,16),y:a.pos+k.plotTop,anchorX:b.isHeader?b.plotX+k.plotLeft:b.plotX+c.xAxis.pos,anchorY:b.isHeader?
a.pos+k.plotTop-15:b.plotY+c.yAxis.pos})})},updatePosition:function(a){var c=this.chart,e=this.getLabel(),e=(this.options.positioner||this.getPosition).call(this,e.width,e.height,a);this.move(Math.round(e.x),Math.round(e.y||0),a.plotX+c.plotLeft,a.plotY+c.plotTop)},getDateFormat:function(a,r,f,b){var k=A("%m-%d %H:%M:%S.%L",r),c,y,u={millisecond:15,second:12,minute:9,hour:6,day:3},g="millisecond";for(y in e){if(a===e.week&&+A("%w",r)===f&&"00:00:00.000"===k.substr(6)){y="week";break}if(e[y]>a){y=
g;break}if(u[y]&&k.substr(u[y])!=="01-01 00:00:00.000".substr(u[y]))break;"week"!==y&&(g=y)}y&&(c=b[y]);return c},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,k=b.xDateFormat,n=e.xAxis,y=n&&"datetime"===n.options.type&&q(a.key),c=b[c+"Format"];y&&!k&&(k=this.getXDateFormat(a,b,n));y&&
k&&(c=c.replace("{point.key}","{point.key:"+k+"}"));return E(c,{point:a,series:e})},bodyFormatter:function(a){return f(a,function(a){var c=a.series.tooltipOptions;return(c.pointFormatter||a.point.tooltipFormatter).call(a.point,c.pointFormat)})}}})(K);(function(a){var A=a.addEvent,B=a.attr,D=a.charts,E=a.css,q=a.defined,f=a.doc,g=a.each,z=a.extend,p=a.fireEvent,t=a.offset,e=a.pick,c=a.removeEvent,r=a.splat,v=a.Tooltip,b=a.win;a.Pointer=function(a,b){this.init(a,b)};a.Pointer.prototype={init:function(a,
b){this.options=b;this.chart=a;this.runChartClick=b.chart.events&&!!b.chart.events.click;this.pinchDown=[];this.lastValidTouch={};v&&b.tooltip.enabled&&(a.tooltip=new v(a,b.tooltip),this.followTouchMove=e(b.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var b=this.chart,k=b.options.chart,c=k.zoomType||"",b=b.inverted;/touch/.test(a.type)&&(c=e(k.pinchType,c));this.zoomX=a=/x/.test(c);this.zoomY=c=/y/.test(c);this.zoomHor=a&&!b||c&&b;this.zoomVert=c&&!b||a&&b;this.hasZoom=
a||c},normalize:function(a,c){var k,e;a=a||b.event;a.target||(a.target=a.srcElement);e=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;c||(this.chartPosition=c=t(this.chart.container));void 0===e.pageX?(k=Math.max(a.x,a.clientX-c.left),c=a.y):(k=e.pageX-c.left,c=e.pageY-c.top);return z(a,{chartX:Math.round(k),chartY:Math.round(c)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};g(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,c){var k=[],n,y,f;g(a,function(a){n=a.noSharedTooltip&&b;y=!b&&a.directTouch;a.visible&&!y&&e(a.options.enableMouseTracking,!0)&&(f=a.searchPoint(c,!n&&0>a.options.findNearestPointBy.indexOf("y")))&&f.series&&k.push(f)});k.sort(function(a,c){var l=a.distX-c.distX,m=a.dist-c.dist,d=(c.series.group&&c.series.group.zIndex)-(a.series.group&&a.series.group.zIndex);return 0!==l&&b?l:0!==m?m:0!==d?d:a.series.index>c.series.index?-1:1});if(b&&k[0]&&
!k[0].series.noSharedTooltip)for(a=k.length;a--;)(k[a].x!==k[0].x||k[a].series.noSharedTooltip)&&k.splice(a,1);return k},getPointFromEvent:function(a){a=a.target;for(var b;a&&!b;)b=a.point,a=a.parentNode;return b},getHoverData:function(b,c,y,u,f,r){var k=b,m=c,n;u?f?(n=[],g(y,function(a){var b=a.noSharedTooltip&&f,d=!f&&a.directTouch;a.visible&&!b&&!d&&e(a.options.enableMouseTracking,!0)&&(a=a.searchKDTree({clientX:k.clientX,plotY:k.plotY},!b&&1===a.kdDimensions))&&a.series&&n.push(a)}),0===n.length&&
(n=[k])):n=[k]:m&&!m.stickyTracking?(f||(y=[m]),n=this.getKDPoints(y,f,r),k=a.find(n,function(a){return a.series===m})):(b=a.grep(y,function(a){return a.stickyTracking}),n=this.getKDPoints(b,f,r),m=(k=n[0])&&k.series,f&&(n=this.getKDPoints(y,f,r)));n.sort(function(a,b){return a.series.index-b.series.index});return{hoverPoint:k,hoverSeries:m,hoverPoints:n}},runPointActions:function(b,c){var k=this.chart,n=k.tooltip,r=n?n.shared:!1,v=c||k.hoverPoint,p=v&&v.series||k.hoverSeries;c=this.getHoverData(v,
p,k.series,!!c||p&&p.directTouch,r,b);var m,x,v=c.hoverPoint;m=(p=c.hoverSeries)&&p.tooltipOptions.followPointer;x=(r=r&&v&&!v.series.noSharedTooltip)?c.hoverPoints:v?[v]:[];if(v&&(v!==k.hoverPoint||n&&n.isHidden)){g(k.hoverPoints||[],function(b){-1===a.inArray(b,x)&&b.setState()});g(x||[],function(a){a.setState("hover")});if(k.hoverSeries!==p)p.onMouseOver();p&&!p.directTouch&&(k.hoverPoint&&k.hoverPoint.firePointEvent("mouseOut"),v.firePointEvent("mouseOver"));k.hoverPoints=x;k.hoverPoint=v;n&&
n.refresh(r?x:v,b)}else m&&n&&!n.isHidden&&(p=n.getAnchor([{}],b),n.updatePosition({plotX:p[0],plotY:p[1]}));this.unDocMouseMove||(this.unDocMouseMove=A(f,"mousemove",function(b){var l=D[a.hoverChartIndex];if(l)l.pointer.onDocumentMouseMove(b)}));g(k.axes,function(l){e(l.crosshair.snap,!0)?a.find(x,function(a){return a.series[l.coll]===l})?l.drawCrosshair(b,v):l.hideCrosshair():l.drawCrosshair(b)})},reset:function(a,b){var c=this.chart,k=c.hoverSeries,e=c.hoverPoint,n=c.hoverPoints,f=c.tooltip,m=
f&&f.shared?n:e;a&&m&&g(r(m),function(b){b.series.isCartesian&&void 0===b.plotX&&(a=!1)});if(a)f&&m&&(f.refresh(m),e&&(e.setState(e.state,!0),g(c.axes,function(a){a.crosshair&&a.drawCrosshair(null,e)})));else{if(e)e.onMouseOut();n&&g(n,function(a){a.setState()});if(k)k.onMouseOut();f&&f.hide(b);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());g(c.axes,function(a){a.hideCrosshair()});this.hoverX=c.hoverPoints=c.hoverPoint=null}},scaleGroups:function(a,b){var c=this.chart,k;g(c.series,
function(e){k=a||e.getPlotBox();e.xAxis&&e.xAxis.zoomEnabled&&e.group&&(e.group.attr(k),e.markerGroup&&(e.markerGroup.attr(k),e.markerGroup.clip(b?c.clipRect:null)),e.dataLabelsGroup&&e.dataLabelsGroup.attr(k))});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,k=a.chartX,e=a.chartY,f=this.zoomHor,r=this.zoomVert,
m=b.plotLeft,x=b.plotTop,l=b.plotWidth,C=b.plotHeight,d,H=this.selectionMarker,h=this.mouseDownX,w=this.mouseDownY,g=c.panKey&&a[c.panKey+"Key"];H&&H.touch||(k<m?k=m:k>m+l&&(k=m+l),e<x?e=x:e>x+C&&(e=x+C),this.hasDragged=Math.sqrt(Math.pow(h-k,2)+Math.pow(w-e,2)),10<this.hasDragged&&(d=b.isInsidePlot(h-m,w-x),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&d&&!g&&!H&&(this.selectionMarker=H=b.renderer.rect(m,x,f?1:l,r?1:C,0).attr({"class":"highcharts-selection-marker",zIndex:7}).add()),H&&f&&(k-=h,
H.attr({width:Math.abs(k),x:(0<k?0:k)+h})),H&&r&&(k=e-w,H.attr({height:Math.abs(k),y:(0<k?0:k)+w})),d&&!H&&c.panning&&b.pan(a,c.panning)))},drop:function(a){var b=this,c=this.chart,k=this.hasPinched;if(this.selectionMarker){var e={originalEvent:a,xAxis:[],yAxis:[]},f=this.selectionMarker,r=f.attr?f.attr("x"):f.x,m=f.attr?f.attr("y"):f.y,x=f.attr?f.attr("width"):f.width,l=f.attr?f.attr("height"):f.height,C;if(this.hasDragged||k)g(c.axes,function(d){if(d.zoomEnabled&&q(d.min)&&(k||b[{xAxis:"zoomX",
yAxis:"zoomY"}[d.coll]])){var c=d.horiz,h="touchend"===a.type?d.minPixelPadding:0,n=d.toValue((c?r:m)+h),c=d.toValue((c?r+x:m+l)-h);e[d.coll].push({axis:d,min:Math.min(n,c),max:Math.max(n,c)});C=!0}}),C&&p(c,"selection",e,function(a){c.zoom(z(a,k?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();k&&this.scaleGroups()}c&&(E(c.container,{cursor:c._cursor}),c.cancelClick=10<this.hasDragged,c.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=
this.normalize(a);this.zoomOption(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(b){D[a.hoverChartIndex]&&D[a.hoverChartIndex].pointer.drop(b)},onDocumentMouseMove:function(a){var b=this.chart,c=this.chartPosition;a=this.normalize(a,c);!c||this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)||this.reset()},onContainerMouseLeave:function(b){var c=D[a.hoverChartIndex];c&&(b.relatedTarget||b.toElement)&&(c.pointer.reset(),
c.pointer.chartPosition=null)},onContainerMouseMove:function(b){var c=this.chart;q(a.hoverChartIndex)&&D[a.hoverChartIndex]&&D[a.hoverChartIndex].mouseIsDown||(a.hoverChartIndex=c.index);b=this.normalize(b);b.returnValue=!1;"mousedown"===c.mouseIsDown&&this.drag(b);!this.inClass(b.target,"highcharts-tracker")&&!c.isInsidePlot(b.chartX-c.plotLeft,b.chartY-c.plotTop)||c.openMenu||this.runPointActions(b)},inClass:function(a,b){for(var c;a;){if(c=B(a,"class")){if(-1!==c.indexOf(b))return!0;if(-1!==c.indexOf("highcharts-container"))return!1}a=
a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries;a=a.relatedTarget||a.toElement;if(!(!b||!a||b.stickyTracking||this.inClass(a,"highcharts-tooltip")||this.inClass(a,"highcharts-series-"+b.index)&&this.inClass(a,"highcharts-tracker")))b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,k=b.plotLeft,e=b.plotTop;a=this.normalize(a);b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(p(c.series,"click",z(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",
a)):(z(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-k,a.chartY-e)&&p(b,"click",a)))},setDOMEvents:function(){var b=this,c=b.chart.container;c.onmousedown=function(a){b.onContainerMouseDown(a)};c.onmousemove=function(a){b.onContainerMouseMove(a)};c.onclick=function(a){b.onContainerClick(a)};A(c,"mouseleave",b.onContainerMouseLeave);1===a.chartCount&&A(f,"mouseup",b.onDocumentMouseUp);a.hasTouch&&(c.ontouchstart=function(a){b.onContainerTouchStart(a)},c.ontouchmove=function(a){b.onContainerTouchMove(a)},
1===a.chartCount&&A(f,"touchend",b.onDocumentTouchEnd))},destroy:function(){var b=this;b.unDocMouseMove&&b.unDocMouseMove();c(b.chart.container,"mouseleave",b.onContainerMouseLeave);a.chartCount||(c(f,"mouseup",b.onDocumentMouseUp),c(f,"touchend",b.onDocumentTouchEnd));clearInterval(b.tooltipTimeout);a.objectEach(b,function(a,c){b[c]=null})}}})(K);(function(a){var A=a.charts,B=a.each,D=a.extend,E=a.map,q=a.noop,f=a.pick;D(a.Pointer.prototype,{pinchTranslate:function(a,f,p,t,e,c){this.zoomHor&&this.pinchTranslateDirection(!0,
a,f,p,t,e,c);this.zoomVert&&this.pinchTranslateDirection(!1,a,f,p,t,e,c)},pinchTranslateDirection:function(a,f,p,t,e,c,r,v){var b=this.chart,k=a?"x":"y",n=a?"X":"Y",y="chart"+n,u=a?"width":"height",g=b["plot"+(a?"Left":"Top")],G,F,m=v||1,x=b.inverted,l=b.bounds[a?"h":"v"],C=1===f.length,d=f[0][y],H=p[0][y],h=!C&&f[1][y],w=!C&&p[1][y],q;p=function(){!C&&20<Math.abs(d-h)&&(m=v||Math.abs(H-w)/Math.abs(d-h));F=(g-H)/m+d;G=b["plot"+(a?"Width":"Height")]/m};p();f=F;f<l.min?(f=l.min,q=!0):f+G>l.max&&(f=
l.max-G,q=!0);q?(H-=.8*(H-r[k][0]),C||(w-=.8*(w-r[k][1])),p()):r[k]=[H,w];x||(c[k]=F-g,c[u]=G);c=x?1/m:m;e[u]=G;e[k]=f;t[x?a?"scaleY":"scaleX":"scale"+n]=m;t["translate"+n]=c*g+(H-c*d)},pinch:function(a){var g=this,p=g.chart,t=g.pinchDown,e=a.touches,c=e.length,r=g.lastValidTouch,v=g.hasZoom,b=g.selectionMarker,k={},n=1===c&&(g.inClass(a.target,"highcharts-tracker")&&p.runTrackerClick||g.runChartClick),y={};1<c&&(g.initiated=!0);v&&g.initiated&&!n&&a.preventDefault();E(e,function(a){return g.normalize(a)});
"touchstart"===a.type?(B(e,function(a,b){t[b]={chartX:a.chartX,chartY:a.chartY}}),r.x=[t[0].chartX,t[1]&&t[1].chartX],r.y=[t[0].chartY,t[1]&&t[1].chartY],B(p.axes,function(a){if(a.zoomEnabled){var b=p.bounds[a.horiz?"h":"v"],c=a.minPixelPadding,k=a.toPixels(f(a.options.min,a.dataMin)),m=a.toPixels(f(a.options.max,a.dataMax)),e=Math.max(k,m);b.min=Math.min(a.pos,Math.min(k,m)-c);b.max=Math.max(a.pos+a.len,e+c)}}),g.res=!0):g.followTouchMove&&1===c?this.runPointActions(g.normalize(a)):t.length&&(b||
(g.selectionMarker=b=D({destroy:q,touch:!0},p.plotBox)),g.pinchTranslate(t,e,k,b,y,r),g.hasPinched=v,g.scaleGroups(k,y),g.res&&(g.res=!1,this.reset(!1,0)))},touch:function(g,q){var p=this.chart,t,e;if(p.index!==a.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});a.hoverChartIndex=p.index;1===g.touches.length?(g=this.normalize(g),(e=p.isInsidePlot(g.chartX-p.plotLeft,g.chartY-p.plotTop))&&!p.openMenu?(q&&this.runPointActions(g),"touchmove"===g.type&&(q=this.pinchDown,t=q[0]?4<=Math.sqrt(Math.pow(q[0].chartX-
g.chartX,2)+Math.pow(q[0].chartY-g.chartY,2)):!1),f(t,!0)&&this.pinch(g)):q&&this.reset()):2===g.touches.length&&this.pinch(g)},onContainerTouchStart:function(a){this.zoomOption(a);this.touch(a,!0)},onContainerTouchMove:function(a){this.touch(a)},onDocumentTouchEnd:function(f){A[a.hoverChartIndex]&&A[a.hoverChartIndex].pointer.drop(f)}})})(K);(function(a){var A=a.addEvent,B=a.charts,D=a.css,E=a.doc,q=a.extend,f=a.noop,g=a.Pointer,z=a.removeEvent,p=a.win,t=a.wrap;if(!a.hasTouch&&(p.PointerEvent||p.MSPointerEvent)){var e=
{},c=!!p.PointerEvent,r=function(){var b=[];b.item=function(a){return this[a]};a.objectEach(e,function(a){b.push({pageX:a.pageX,pageY:a.pageY,target:a.target})});return b},v=function(b,c,e,y){"touch"!==b.pointerType&&b.pointerType!==b.MSPOINTER_TYPE_TOUCH||!B[a.hoverChartIndex]||(y(b),y=B[a.hoverChartIndex].pointer,y[c]({type:e,target:b.currentTarget,preventDefault:f,touches:r()}))};q(g.prototype,{onContainerPointerDown:function(a){v(a,"onContainerTouchStart","touchstart",function(a){e[a.pointerId]=
{pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){v(a,"onContainerTouchMove","touchmove",function(a){e[a.pointerId]={pageX:a.pageX,pageY:a.pageY};e[a.pointerId].target||(e[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){v(a,"onDocumentTouchEnd","touchend",function(a){delete e[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,c?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,c?"pointermove":
"MSPointerMove",this.onContainerPointerMove);a(E,c?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});t(g.prototype,"init",function(a,c,e){a.call(this,c,e);this.hasZoom&&D(c.container,{"-ms-touch-action":"none","touch-action":"none"})});t(g.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(A)});t(g.prototype,"destroy",function(a){this.batchMSEvents(z);a.call(this)})}})(K);(function(a){var A,B=a.addEvent,D=a.css,E=a.discardElement,q=a.defined,
f=a.each,g=a.isFirefox,z=a.marginNames,p=a.merge,t=a.pick,e=a.setAnimation,c=a.stableSort,r=a.win,v=a.wrap;A=a.Legend=function(a,c){this.init(a,c)};A.prototype={init:function(a,c){this.chart=a;this.setOptions(c);c.enabled&&(this.render(),B(this.chart,"endResize",function(){this.legend.positionCheckboxes()}))},setOptions:function(a){var b=t(a.padding,8);this.options=a;this.itemMarginTop=a.itemMarginTop||0;this.padding=b;this.initialItemY=b-5;this.itemHeight=this.maxItemWidth=0;this.symbolWidth=t(a.symbolWidth,
16);this.pages=[]},update:function(a,c){var b=this.chart;this.setOptions(p(!0,this.options,a));this.destroy();b.isDirtyLegend=b.isDirtyBox=!0;t(c,!0)&&b.redraw()},colorizeItem:function(a,c){a.legendGroup[c?"removeClass":"addClass"]("highcharts-legend-item-hidden")},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl,e=a._legendItemPos,f=e[0],e=e[1],r=a.checkbox;(a=a.legendGroup)&&a.element&&a.translate(b?f:this.legendWidth-f-2*c-4,e);r&&(r.x=f,r.y=e)},destroyItem:function(a){var b=
a.checkbox;f(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())});b&&E(a.checkbox)},destroy:function(){function a(a){this[a]&&(this[a]=this[a].destroy())}f(this.getAllItems(),function(b){f(["legendItem","legendGroup"],a,b)});f("clipRect up down pager nav box title group".split(" "),a,this);this.display=null},positionCheckboxes:function(a){var b=this.group&&this.group.alignAttr,c,e=this.clipHeight||this.legendHeight,u=this.titleHeight;b&&(c=b.translateY,
f(this.allItems,function(k){var n=k.checkbox,f;n&&(f=c+u+n.y+(a||0)+3,D(n,{left:b.translateX+k.checkboxOffset+n.x-20+"px",top:f+"px",display:f>c-6&&f<c+e-6?"":"none"}))}))},renderTitle:function(){var a=this.options,c=this.padding,e=a.title,f=0;e.text&&(this.title||(this.title=this.chart.renderer.label(e.text,c-3,c-4,null,null,null,a.useHTML,null,"legend-title").attr({zIndex:1}).add(this.group)),a=this.title.getBBox(),f=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:f}));this.titleHeight=
f},setText:function(b){var c=this.options;b.legendItem.attr({text:c.labelFormat?a.format(c.labelFormat,b):c.labelFormatter.call(b)})},renderItem:function(a){var b=this.chart,c=b.renderer,e=this.options,f="horizontal"===e.layout,r=this.symbolWidth,g=e.symbolPadding,v=this.padding,m=f?t(e.itemDistance,20):0,x=!e.rtl,l=e.width,C=e.itemMarginBottom||0,d=this.itemMarginTop,H=a.legendItem,h=!a.series,w=!h&&a.series.drawLegendSymbol?a.series:a,p=w.options,p=this.createCheckboxForItem&&p&&p.showCheckbox,
q=e.useHTML,z=a.options.className;H||(a.legendGroup=c.g("legend-item").addClass("highcharts-"+w.type+"-series highcharts-color-"+a.colorIndex+(z?" "+z:"")+(h?" highcharts-series-"+a.index:"")).attr({zIndex:1}).add(this.scrollGroup),a.legendItem=H=c.text("",x?r+g:-g,this.baseline||0,q).attr({align:x?"left":"right",zIndex:2}).add(a.legendGroup),this.baseline||(this.fontMetrics=c.fontMetrics(12,H),this.baseline=this.fontMetrics.f+3+d,H.attr("y",this.baseline)),this.symbolHeight=e.symbolHeight||this.fontMetrics.f,
w.drawLegendSymbol(this,a),this.setItemEvents&&this.setItemEvents(a,H,q),p&&this.createCheckboxForItem(a));this.colorizeItem(a,a.visible);this.setText(a);c=H.getBBox();r=a.checkboxOffset=e.itemWidth||a.legendItemWidth||r+g+c.width+m+(p?20:0);this.itemHeight=g=Math.round(a.legendItemHeight||c.height||this.symbolHeight);f&&this.itemX-v+r>(l||b.spacingBox.width-2*v-e.x)&&(this.itemX=v,this.itemY+=d+this.lastLineHeight+C,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth,r);this.lastItemY=
d+this.itemY+C;this.lastLineHeight=Math.max(g,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];f?this.itemX+=r:(this.itemY+=d+g+C,this.lastLineHeight=g);this.offsetWidth=l||Math.max((f?this.itemX-v-m:r)+v,this.offsetWidth)},getAllItems:function(){var a=[];f(this.chart.series,function(b){var c=b&&b.options;b&&t(c.showInLegend,q(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,
k=e.align.charAt(0)+e.verticalAlign.charAt(0)+e.layout.charAt(0);e.floating||f([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(f,n){f.test(k)&&!q(a[n])&&(b[z[n]]=Math.max(b[z[n]],b.legend[(n+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][n]*e[n%2?"x":"y"]+t(e.margin,12)+c[n]))})},render:function(){var a=this,e=a.chart,n=e.renderer,r=a.group,u,g,v,t,m=a.box,x=a.options,l=a.padding;a.itemX=l;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;r||(a.group=r=n.g("legend").attr({zIndex:7}).add(),
a.contentGroup=n.g().attr({zIndex:1}).add(r),a.scrollGroup=n.g().add(a.contentGroup));a.renderTitle();u=a.getAllItems();c(u,function(a,d){return(a.options&&a.options.legendIndex||0)-(d.options&&d.options.legendIndex||0)});x.reversed&&u.reverse();a.allItems=u;a.display=g=!!u.length;a.lastLineHeight=0;f(u,function(b){a.renderItem(b)});v=(x.width||a.offsetWidth)+l;t=a.lastItemY+a.lastLineHeight+a.titleHeight;t=a.handleOverflow(t);t+=l;m||(a.box=m=n.rect().addClass("highcharts-legend-box").attr({r:x.borderRadius}).add(r),
m.isNew=!0);0<v&&0<t&&(m[m.isNew?"attr":"animate"](m.crisp({x:0,y:0,width:v,height:t},m.strokeWidth())),m.isNew=!1);m[g?"show":"hide"]();"none"===r.getStyle("display")&&(v=t=0);a.legendWidth=v;a.legendHeight=t;f(u,function(b){a.positionItem(b)});g&&r.align(p(x,{width:v,height:t}),!0,"spacingBox");e.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b=this,c=this.chart,e=c.renderer,r=this.options,g=r.y,v=this.padding,c=c.spacingBox.height+("top"===r.verticalAlign?-g:g)-v,g=r.maxHeight,
p,m=this.clipRect,x=r.navigation,l=t(x.animation,!0),C=x.arrowSize||12,d=this.nav,H=this.pages,h,w=this.allItems,q=function(a){"number"===typeof a?m.attr({height:a}):m&&(b.clipRect=m.destroy(),b.contentGroup.clip());b.contentGroup.div&&(b.contentGroup.div.style.clip=a?"rect("+v+"px,9999px,"+(v+a)+"px,0)":"auto")};"horizontal"!==r.layout||"middle"===r.verticalAlign||r.floating||(c/=2);g&&(c=Math.min(c,g));H.length=0;a>c&&!1!==x.enabled?(this.clipHeight=p=Math.max(c-20-this.titleHeight-v,0),this.currentPage=
t(this.currentPage,1),this.fullHeight=a,f(w,function(a,d){var b=a._legendItemPos[1];a=Math.round(a.legendItem.getBBox().height);var c=H.length;if(!c||b-H[c-1]>p&&(h||b)!==H[c-1])H.push(h||b),c++;d===w.length-1&&b+a-H[c-1]>p&&H.push(b);b!==h&&(h=b)}),m||(m=b.clipRect=e.clipRect(0,v,9999,0),b.contentGroup.clip(m)),q(p),d||(this.nav=d=e.g().attr({zIndex:1}).add(this.group),this.up=e.symbol("triangle",0,0,C,C).on("click",function(){b.scroll(-1,l)}).add(d),this.pager=e.text("",15,10).addClass("highcharts-legend-navigation").add(d),
this.down=e.symbol("triangle-down",0,0,C,C).on("click",function(){b.scroll(1,l)}).add(d)),b.scroll(0),a=c):d&&(q(),this.nav=d.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,c){var b=this.pages,k=b.length;a=this.currentPage+a;var f=this.clipHeight,r=this.pager,g=this.padding;a>k&&(a=k);0<a&&(void 0!==c&&e(c,this.chart),this.nav.attr({translateX:g,translateY:f+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({"class":1===a?"highcharts-legend-nav-inactive":
"highcharts-legend-nav-active"}),r.attr({text:a+"/"+k}),this.down.attr({x:18+this.pager.getBBox().width,"class":a===k?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),c=-b[a-1]+this.initialItemY,this.scrollGroup.animate({translateY:c}),this.currentPage=a,this.positionCheckboxes(c))}};a.LegendSymbolMixin={drawRectangle:function(a,c){var b=a.symbolHeight,e=a.options.squareSymbol;c.legendSymbol=this.chart.renderer.rect(e?(a.symbolWidth-b)/2:0,a.baseline-b+1,e?b:a.symbolWidth,b,t(a.options.symbolRadius,
b/2)).addClass("highcharts-point").attr({zIndex:3}).add(c.legendGroup)},drawLineMarker:function(a){var b=this.options.marker,c,e=a.symbolWidth,f=a.symbolHeight;c=f/2;var r=this.chart.renderer,g=this.legendGroup;a=a.baseline-Math.round(.3*a.fontMetrics.b);this.legendLine=r.path(["M",0,a,"L",e,a]).addClass("highcharts-graph").attr({}).add(g);b&&!1!==b.enabled&&(c=Math.min(t(b.radius,c),c),0===this.symbol.indexOf("url")&&(b=p(b,{width:f,height:f}),c=0),this.legendSymbol=b=r.symbol(this.symbol,e/2-c,
a-c,2*c,2*c,b).addClass("highcharts-point").add(g),b.isMarker=!0)}};(/Trident\/7\.0/.test(r.navigator.userAgent)||g)&&v(A.prototype,"positionItem",function(a,c){var b=this,e=function(){c._legendItemPos&&a.call(b,c)};e();setTimeout(e)})})(K);(function(a){var A=a.addEvent,B=a.animObject,D=a.attr,E=a.doc,q=a.Axis,f=a.createElement,g=a.defaultOptions,z=a.discardElement,p=a.charts,t=a.defined,e=a.each,c=a.extend,r=a.find,v=a.fireEvent,b=a.getStyle,k=a.grep,n=a.isNumber,y=a.isObject,u=a.isString,I=a.Legend,
G=a.marginNames,F=a.merge,m=a.objectEach,x=a.Pointer,l=a.pick,C=a.pInt,d=a.removeEvent,H=a.seriesTypes,h=a.splat,w=a.svg,R=a.syncTimeout,J=a.win,N=a.Renderer,Q=a.Chart=function(){this.getArgs.apply(this,arguments)};a.chart=function(a,d,b){return new Q(a,d,b)};c(Q.prototype,{callbacks:[],getArgs:function(){var a=[].slice.call(arguments);if(u(a[0])||a[0].nodeName)this.renderTo=a.shift();this.init(a[0],a[1])},init:function(d,b){var h,c,l=d.series,e=d.plotOptions||{};d.series=null;h=F(g,d);for(c in h.plotOptions)h.plotOptions[c].tooltip=
e[c]&&F(e[c].tooltip)||void 0;h.tooltip.userOptions=d.chart&&d.chart.forExport&&d.tooltip.userOptions||d.tooltip;h.series=d.series=l;this.userOptions=d;d=h.chart;c=d.events;this.margin=[];this.spacing=[];this.bounds={h:{},v:{}};this.callback=b;this.isResizing=0;this.options=h;this.axes=[];this.series=[];this.hasCartesianSeries=d.showAxes;var k=this;k.index=p.length;p.push(k);a.chartCount++;c&&m(c,function(a,d){A(k,d,a)});k.xAxis=[];k.yAxis=[];k.pointCount=k.colorCounter=k.symbolCounter=0;k.firstRender()},
initSeries:function(d){var b=this.options.chart;(b=H[d.type||b.type||b.defaultSeriesType])||a.error(17,!0);b=new b;b.init(this,d);return b},orderSeries:function(a){var d=this.series;for(a=a||0;a<d.length;a++)d[a]&&(d[a].index=a,d[a].name=d[a].name||"Series "+(d[a].index+1))},isInsidePlot:function(a,d,b){var h=b?d:a;a=b?a:d;return 0<=h&&h<=this.plotWidth&&0<=a&&a<=this.plotHeight},redraw:function(d){var b=this.axes,h=this.series,l=this.pointer,m=this.legend,k=this.isDirtyLegend,w,C,f=this.hasCartesianSeries,
x=this.isDirtyBox,n,r=this.renderer,g=r.isHidden(),u=[];this.setResponsive&&this.setResponsive(!1);a.setAnimation(d,this);g&&this.temporaryDisplay();this.layOutTitles();for(d=h.length;d--;)if(n=h[d],n.options.stacking&&(w=!0,n.isDirty)){C=!0;break}if(C)for(d=h.length;d--;)n=h[d],n.options.stacking&&(n.isDirty=!0);e(h,function(a){a.isDirty&&"point"===a.options.legendType&&(a.updateTotals&&a.updateTotals(),k=!0);a.isDirtyData&&v(a,"updatedData")});k&&m.options.enabled&&(m.render(),this.isDirtyLegend=
!1);w&&this.getStacks();f&&e(b,function(a){a.updateNames();a.setScale()});this.getMargins();f&&(e(b,function(a){a.isDirty&&(x=!0)}),e(b,function(a){var d=a.min+","+a.max;a.extKey!==d&&(a.extKey=d,u.push(function(){v(a,"afterSetExtremes",c(a.eventArgs,a.getExtremes()));delete a.eventArgs}));(x||w)&&a.redraw()}));x&&this.drawChartBox();v(this,"predraw");e(h,function(a){(x||a.isDirty)&&a.visible&&a.redraw();a.isDirtyData=!1});l&&l.reset(!0);r.draw();v(this,"redraw");v(this,"render");g&&this.temporaryDisplay(!0);
e(u,function(a){a.call()})},get:function(a){function d(d){return d.id===a||d.options&&d.options.id===a}var b,h=this.series,c;b=r(this.axes,d)||r(this.series,d);for(c=0;!b&&c<h.length;c++)b=r(h[c].points||[],d);return b},getAxes:function(){var a=this,d=this.options,b=d.xAxis=h(d.xAxis||{}),d=d.yAxis=h(d.yAxis||{});e(b,function(a,d){a.index=d;a.isX=!0});e(d,function(a,d){a.index=d});b=b.concat(d);e(b,function(d){new q(a,d)})},getSelectedPoints:function(){var a=[];e(this.series,function(d){a=a.concat(k(d.data||
[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return k(this.series,function(a){return a.selected})},setTitle:function(a,d,b){var h=this,c=h.options,l;l=c.title=F(c.title,a);c=c.subtitle=F(c.subtitle,d);e([["title",a,l],["subtitle",d,c]],function(a,d){var b=a[0],c=h[b],l=a[1];a=a[2];c&&l&&(h[b]=c=c.destroy());a&&a.text&&!c&&(h[b]=h.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+b,zIndex:a.zIndex||4}).add(),h[b].update=function(a){h.setTitle(!d&&
a,d&&a)})});h.layOutTitles(b)},layOutTitles:function(a){var d=0,b,h=this.renderer,m=this.spacingBox;e(["title","subtitle"],function(a){var b=this[a],l=this.options[a];a="title"===a?-3:l.verticalAlign?0:d+2;var e;b&&(e=h.fontMetrics(e,b).b,b.css({width:(l.width||m.width+l.widthAdjust)+"px"}).align(c({y:a+e},l),!1,"spacingBox"),l.floating||l.verticalAlign||(d=Math.ceil(d+b.getBBox(l.useHTML).height)))},this);b=this.titleOffset!==d;this.titleOffset=d;!this.isDirtyBox&&b&&(this.isDirtyBox=b,this.hasRendered&&
l(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var d=this.options.chart,h=d.width,d=d.height,c=this.renderTo;t(h)||(this.containerWidth=b(c,"width"));t(d)||(this.containerHeight=b(c,"height"));this.chartWidth=Math.max(0,h||this.containerWidth||600);this.chartHeight=Math.max(0,a.relativeLength(d,this.chartWidth)||this.containerHeight||400)},temporaryDisplay:function(d){var h=this.renderTo;if(d)for(;h&&h.style;)h.hcOrigStyle&&(a.css(h,h.hcOrigStyle),delete h.hcOrigStyle),h=h.parentNode;
else for(;h&&h.style;)"none"===b(h,"display",!1)&&(h.hcOrigStyle={display:h.style.display,height:h.style.height,overflow:h.style.overflow},a.css(h,{display:"block",height:0,overflow:"hidden"}),h.style.setProperty&&h.style.setProperty("display","block","important")),h=h.parentNode},setClassName:function(a){this.container.className="highcharts-container "+(a||"")},getContainer:function(){var d,b=this.options,h=b.chart,c,l;d=this.renderTo;var m=a.uniqueKey(),e;d||(this.renderTo=d=h.renderTo);u(d)&&(this.renderTo=
d=E.getElementById(d));d||a.error(13,!0);c=C(D(d,"data-highcharts-chart"));n(c)&&p[c]&&p[c].hasRendered&&p[c].destroy();D(d,"data-highcharts-chart",this.index);d.innerHTML="";h.skipClone||d.offsetWidth||this.temporaryDisplay();this.getChartSize();c=this.chartWidth;l=this.chartHeight;this.container=d=f("div",{id:m},void 0,d);this._cursor=d.style.cursor;this.renderer=new (a[h.renderer]||N)(d,c,l,null,h.forExport,b.exporting&&b.exporting.allowHTML);this.setClassName(h.className);for(e in b.defs)this.renderer.definition(b.defs[e]);
this.renderer.chartIndex=this.index},getMargins:function(a){var d=this.spacing,b=this.margin,h=this.titleOffset;this.resetMargins();h&&!t(b[0])&&(this.plotTop=Math.max(this.plotTop,h+this.options.title.margin+d[0]));this.legend.display&&this.legend.adjustMargins(b,d);this.extraMargin&&(this[this.extraMargin.type]=(this[this.extraMargin.type]||0)+this.extraMargin.value);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);a||this.getAxisMargins()},getAxisMargins:function(){var a=this,d=a.axisOffset=
[0,0,0,0],b=a.margin;a.hasCartesianSeries&&e(a.axes,function(a){a.visible&&a.getOffset()});e(G,function(h,c){t(b[c])||(a[h]+=d[c])});a.setChartSize()},reflow:function(a){var d=this,h=d.options.chart,c=d.renderTo,l=t(h.width),m=h.width||b(c,"width"),h=h.height||b(c,"height"),c=a?a.target:J;if(!l&&!d.isPrinting&&m&&h&&(c===J||c===E)){if(m!==d.containerWidth||h!==d.containerHeight)clearTimeout(d.reflowTimeout),d.reflowTimeout=R(function(){d.container&&d.setSize(void 0,void 0,!1)},a?100:0);d.containerWidth=
m;d.containerHeight=h}},initReflow:function(){var a=this,d;d=A(J,"resize",function(d){a.reflow(d)});A(a,"destroy",d)},setSize:function(d,b,h){var c=this,l=c.renderer;c.isResizing+=1;a.setAnimation(h,c);c.oldChartHeight=c.chartHeight;c.oldChartWidth=c.chartWidth;void 0!==d&&(c.options.chart.width=d);void 0!==b&&(c.options.chart.height=b);c.getChartSize();c.setChartSize(!0);l.setSize(c.chartWidth,c.chartHeight,h);e(c.axes,function(a){a.isDirty=!0;a.setScale()});c.isDirtyLegend=!0;c.isDirtyBox=!0;c.layOutTitles();
c.getMargins();c.redraw(h);c.oldChartHeight=null;v(c,"resize");R(function(){c&&v(c,"endResize",null,function(){--c.isResizing})},B(void 0).duration)},setChartSize:function(a){var d=this.inverted,b=this.renderer,h=this.chartWidth,c=this.chartHeight,l=this.options.chart,m=this.spacing,k=this.clipOffset,w,C,f,x;this.plotLeft=w=Math.round(this.plotLeft);this.plotTop=C=Math.round(this.plotTop);this.plotWidth=f=Math.max(0,Math.round(h-w-this.marginRight));this.plotHeight=x=Math.max(0,Math.round(c-C-this.marginBottom));
this.plotSizeX=d?x:f;this.plotSizeY=d?f:x;this.plotBorderWidth=l.plotBorderWidth||0;this.spacingBox=b.spacingBox={x:m[3],y:m[0],width:h-m[3]-m[1],height:c-m[0]-m[2]};this.plotBox=b.plotBox={x:w,y:C,width:f,height:x};h=2*Math.floor(this.plotBorderWidth/2);d=Math.ceil(Math.max(h,k[3])/2);b=Math.ceil(Math.max(h,k[0])/2);this.clipBox={x:d,y:b,width:Math.floor(this.plotSizeX-Math.max(h,k[1])/2-d),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(h,k[2])/2-b))};a||e(this.axes,function(a){a.setAxisSize();
a.setAxisTranslation()})},resetMargins:function(){var a=this,d=a.options.chart;e(["margin","spacing"],function(b){var h=d[b],c=y(h)?h:[h,h,h,h];e(["Top","Right","Bottom","Left"],function(h,m){a[b][m]=l(d[b+h],c[m])})});e(G,function(d,b){a[d]=l(a.margin[b],a.spacing[b])});a.axisOffset=[0,0,0,0];a.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,d=this.renderer,b=this.chartWidth,h=this.chartHeight,c=this.chartBackground,l=this.plotBackground,m=this.plotBorder,e,k,w=this.plotLeft,
C=this.plotTop,f=this.plotWidth,x=this.plotHeight,n=this.plotBox,r=this.clipRect,g=this.clipBox,u="animate";c||(this.chartBackground=c=d.rect().addClass("highcharts-background").add(),u="attr");e=k=c.strokeWidth();c[u]({x:k/2,y:k/2,width:b-k-e%2,height:h-k-e%2,r:a.borderRadius});u="animate";l||(u="attr",this.plotBackground=l=d.rect().addClass("highcharts-plot-background").add());l[u](n);r?r.animate({width:g.width,height:g.height}):this.clipRect=d.clipRect(g);u="animate";m||(u="attr",this.plotBorder=
m=d.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add());m[u](m.crisp({x:w,y:C,width:f,height:x},-m.strokeWidth()));this.isDirtyBox=!1},propFromSeries:function(){var a=this,d=a.options.chart,b,h=a.options.series,c,l;e(["inverted","angular","polar"],function(m){b=H[d.type||d.defaultSeriesType];l=d[m]||b&&b.prototype[m];for(c=h&&h.length;!l&&c--;)(b=H[h[c].type])&&b.prototype[m]&&(l=!0);a[m]=l})},linkSeries:function(){var a=this,d=a.series;e(d,function(a){a.linkedSeries.length=0});e(d,
function(d){var b=d.options.linkedTo;u(b)&&(b=":previous"===b?a.series[d.index-1]:a.get(b))&&b.linkedParent!==d&&(b.linkedSeries.push(d),d.linkedParent=b,d.visible=l(d.options.visible,b.options.visible,d.visible))})},renderSeries:function(){e(this.series,function(a){a.translate();a.render()})},renderLabels:function(){var a=this,d=a.options.labels;d.items&&e(d.items,function(b){var h=c(d.style,b.style),l=C(h.left)+a.plotLeft,m=C(h.top)+a.plotTop+12;delete h.left;delete h.top;a.renderer.text(b.html,
l,m).attr({zIndex:2}).css(h).add()})},render:function(){var a=this.axes,d=this.renderer,b=this.options,h,c,l;this.setTitle();this.legend=new I(this,b.legend);this.getStacks&&this.getStacks();this.getMargins(!0);this.setChartSize();b=this.plotWidth;h=this.plotHeight-=21;e(a,function(a){a.setScale()});this.getAxisMargins();c=1.1<b/this.plotWidth;l=1.05<h/this.plotHeight;if(c||l)e(a,function(a){(a.horiz&&c||!a.horiz&&l)&&a.setTickInterval(!0)}),this.getMargins();this.drawChartBox();this.hasCartesianSeries&&
e(a,function(a){a.visible&&a.render()});this.seriesGroup||(this.seriesGroup=d.g("series-group").attr({zIndex:3}).add());this.renderSeries();this.renderLabels();this.addCredits();this.setResponsive&&this.setResponsive();this.hasRendered=!0},addCredits:function(a){var d=this;a=F(!0,this.options.credits,a);a.enabled&&!this.credits&&(this.credits=this.renderer.text(a.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){a.href&&(J.location.href=a.href)}).attr({align:a.position.align,
zIndex:8}).add().align(a.position),this.credits.update=function(a){d.credits=d.credits.destroy();d.addCredits(a)})},destroy:function(){var b=this,h=b.axes,c=b.series,l=b.container,k,w=l&&l.parentNode;v(b,"destroy");b.renderer.forExport?a.erase(p,b):p[b.index]=void 0;a.chartCount--;b.renderTo.removeAttribute("data-highcharts-chart");d(b);for(k=h.length;k--;)h[k]=h[k].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(k=c.length;k--;)c[k]=c[k].destroy();e("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "),
function(a){var d=b[a];d&&d.destroy&&(b[a]=d.destroy())});l&&(l.innerHTML="",d(l),w&&z(l));m(b,function(a,d){delete b[d]})},isReadyToRender:function(){var a=this;return w||J!=J.top||"complete"===E.readyState?!0:(E.attachEvent("onreadystatechange",function(){E.detachEvent("onreadystatechange",a.firstRender);"complete"===E.readyState&&a.firstRender()}),!1)},firstRender:function(){var a=this,d=a.options;if(a.isReadyToRender()){a.getContainer();v(a,"init");a.resetMargins();a.setChartSize();a.propFromSeries();
a.getAxes();e(d.series||[],function(d){a.initSeries(d)});a.linkSeries();v(a,"beforeRender");x&&(a.pointer=new x(a,d));a.render();if(!a.renderer.imgCount&&a.onload)a.onload();a.temporaryDisplay(!0)}},onload:function(){e([this.callback].concat(this.callbacks),function(a){a&&void 0!==this.index&&a.apply(this,[this])},this);v(this,"load");v(this,"render");t(this.index)&&!1!==this.options.chart.reflow&&this.initReflow();this.onload=null}})})(K);(function(a){var A,B=a.each,D=a.extend,E=a.erase,q=a.fireEvent,
f=a.format,g=a.isArray,z=a.isNumber,p=a.pick,t=a.removeEvent;A=a.Point=function(){};A.prototype={init:function(a,c,f){var e=a.chart.options.chart.colorCount;this.series=a;this.applyOptions(c,f);a.options.colorByPoint?(c=a.colorCounter,a.colorCounter++,a.colorCounter===e&&(a.colorCounter=0)):c=a.colorIndex;this.colorIndex=p(this.colorIndex,c);a.chart.pointCount++;return this},applyOptions:function(a,c){var e=this.series,f=e.options.pointValKey||e.pointValKey;a=A.prototype.optionsToObject.call(this,
a);D(this,a);this.options=this.options?D(this.options,a):a;a.group&&delete this.group;f&&(this.y=this[f]);this.isNull=p(this.isValid&&!this.isValid(),null===this.x||!z(this.y,!0));this.selected&&(this.state="select");"name"in this&&void 0===c&&e.xAxis&&e.xAxis.hasNames&&(this.x=e.xAxis.nameToX(this));void 0===this.x&&e&&(this.x=void 0===c?e.autoIncrement(this):c);return this},optionsToObject:function(a){var c={},e=this.series,f=e.options.keys,b=f||e.pointArrayMap||["y"],k=b.length,n=0,p=0;if(z(a)||
null===a)c[b[0]]=a;else if(g(a))for(!f&&a.length>k&&(e=typeof a[0],"string"===e?c.name=a[0]:"number"===e&&(c.x=a[0]),n++);p<k;)f&&void 0===a[n]||(c[b[p]]=a[n]),n++,p++;else"object"===typeof a&&(c=a,a.dataLabels&&(e._hasPointLabels=!0),a.marker&&(e._hasPointMarkers=!0));return c},getClassName:function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+
this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},getZone:function(){var a=this.series,c=a.zones,a=a.zoneAxis||"y",f=0,g;for(g=c[f];this[a]>=g.value;)g=c[++f];g&&g.color&&!this.options.color&&(this.color=g.color);return g},destroy:function(){var a=this.series.chart,c=a.hoverPoints,f;a.pointCount--;c&&(this.setState(),E(c,this),c.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();
if(this.graphic||this.dataLabel)t(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(f in this)this[f]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],c,f=6;f--;)c=a[f],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,g=p(e.valueDecimals,""),b=e.valuePrefix||"",k=e.valueSuffix||"";B(c.pointArrayMap||["y"],function(c){c="{point."+c;if(b||k)a=a.replace(c+"}",b+c+"}"+k);a=a.replace(c+"}",c+":,."+g+"f}")});return f(a,{point:this,series:this.series})},firePointEvent:function(a,c,f){var e=this,b=this.series.options;(b.point.events[a]||e.options&&e.options.events&&e.options.events[a])&&this.importEvents();"click"===a&&b.allowPointSelect&&
(f=function(a){e.select&&e.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});q(this,a,c,f)},visible:!0}})(K);(function(a){var A=a.addEvent,B=a.animObject,D=a.arrayMax,E=a.arrayMin,q=a.correctFloat,f=a.Date,g=a.defaultOptions,z=a.defined,p=a.each,t=a.erase,e=a.extend,c=a.fireEvent,r=a.grep,v=a.isArray,b=a.isNumber,k=a.isString,n=a.merge,y=a.objectEach,u=a.pick,I=a.removeEvent,G=a.splat,F=a.SVGElement,m=a.syncTimeout,x=a.win;a.Series=a.seriesType("line",null,{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},
events:{},marker:{radius:4,states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},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}},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,c,h=a.series,l;d.chart=a;d.options=b=d.setOptions(b);d.linkedSeries=[];d.bindAxes();e(d,{name:b.name,state:"",visible:!1!==b.visible,selected:!0===b.selected});c=b.events;y(c,function(a,b){A(d,b,a)});if(c&&c.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;d.getColor();d.getSymbol();p(d.parallelArrays,function(a){d[a+
"Data"]=[]});d.setData(b.data,!1);d.isCartesian&&(a.hasCartesianSeries=!0);h.length&&(l=h[h.length-1]);d._i=u(l&&l._i,-1)+1;a.orderSeries(this.insert(h))},insert:function(a){var c=this.options.index,d;if(b(c)){for(d=a.length;d--;)if(c>=u(a[d].options.index,a[d]._i)){a.splice(d+1,0,this);break}-1===d&&a.unshift(this);d+=1}else a.push(this);return u(d,a.length-1)},bindAxes:function(){var b=this,c=b.options,d=b.chart,m;p(b.axisTypes||[],function(h){p(d[h],function(a){m=a.options;if(c[h]===m.index||void 0!==
c[h]&&c[h]===m.id||void 0===c[h]&&0===m.index)b.insert(a.series),b[h]=a,a.isDirty=!0});b[h]||b.optionalAxis===h||a.error(18,!0)})},updateParallelArrays:function(a,c){var d=a.series,l=arguments,h=b(c)?function(b){var h="y"===b&&d.toYData?d.toYData(a):a[b];d[b+"Data"][c]=h}:function(a){Array.prototype[c].apply(d[a+"Data"],Array.prototype.slice.call(l,2))};p(d.parallelArrays,h)},autoIncrement:function(){var a=this.options,b=this.xIncrement,d,c=a.pointIntervalUnit,b=u(b,a.pointStart,0);this.pointInterval=
d=u(this.pointInterval,a.pointInterval,1);c&&(a=new f(b),"day"===c?a=+a[f.hcSetDate](a[f.hcGetDate]()+d):"month"===c?a=+a[f.hcSetMonth](a[f.hcGetMonth]()+d):"year"===c&&(a=+a[f.hcSetFullYear](a[f.hcGetFullYear]()+d)),d=a-b);this.xIncrement=b+d;return b},setOptions:function(a){var b=this.chart,d=b.options,c=d.plotOptions,h=(b.userOptions||{}).plotOptions||{},l=c[this.type];this.userOptions=a;b=n(l,c.series,a);this.tooltipOptions=n(g.tooltip,g.plotOptions.series&&g.plotOptions.series.tooltip,g.plotOptions[this.type].tooltip,
d.tooltip.userOptions,c.series&&c.series.tooltip,c[this.type].tooltip,a.tooltip);this.stickyTracking=u(a.stickyTracking,h[this.type]&&h[this.type].stickyTracking,h.series&&h.series.stickyTracking,this.tooltipOptions.shared&&!this.noSharedTooltip?!0:b.stickyTracking);null===l.marker&&delete b.marker;this.zoneAxis=b.zoneAxis;a=this.zones=(b.zones||[]).slice();!b.negativeColor&&!b.negativeFillColor||b.zones||a.push({value:b[this.zoneAxis+"Threshold"]||b.threshold||0,className:"highcharts-negative"});
a.length&&z(a[a.length-1].value)&&a.push({});return b},getCyclic:function(a,b,d){var c,h=this.chart,l=this.userOptions,m=a+"Index",e=a+"Counter",k=d?d.length:u(h.options.chart[a+"Count"],h[a+"Count"]);b||(c=u(l[m],l["_"+m]),z(c)||(h.series.length||(h[e]=0),l["_"+m]=c=h[e]%k,h[e]+=1),d&&(b=d[c]));void 0!==c&&(this[m]=c);this[a]=b},getColor:function(){this.getCyclic("color")},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,
setData:function(c,m,d,e){var h=this,l=h.points,f=l&&l.length||0,x,C=h.options,n=h.chart,g=null,r=h.xAxis,H=C.turboThreshold,y=this.xData,t=this.yData,G=(x=h.pointArrayMap)&&x.length;c=c||[];x=c.length;m=u(m,!0);if(!1!==e&&x&&f===x&&!h.cropped&&!h.hasGroupedData&&h.visible)p(c,function(a,d){l[d].update&&a!==C.data[d]&&l[d].update(a,!1,null,!1)});else{h.xIncrement=null;h.colorCounter=0;p(this.parallelArrays,function(a){h[a+"Data"].length=0});if(H&&x>H){for(d=0;null===g&&d<x;)g=c[d],d++;if(b(g))for(d=
0;d<x;d++)y[d]=this.autoIncrement(),t[d]=c[d];else if(v(g))if(G)for(d=0;d<x;d++)g=c[d],y[d]=g[0],t[d]=g.slice(1,G+1);else for(d=0;d<x;d++)g=c[d],y[d]=g[0],t[d]=g[1];else a.error(12)}else for(d=0;d<x;d++)void 0!==c[d]&&(g={series:h},h.pointClass.prototype.applyOptions.apply(g,[c[d]]),h.updateParallelArrays(g,d));k(t[0])&&a.error(14,!0);h.data=[];h.options.data=h.userOptions.data=c;for(d=f;d--;)l[d]&&l[d].destroy&&l[d].destroy();r&&(r.minRange=r.userMinRange);h.isDirty=n.isDirtyBox=!0;h.isDirtyData=
!!l;d=!1}"point"===C.legendType&&(this.processData(),this.generatePoints());m&&n.redraw(d)},processData:function(b){var c=this.xData,d=this.yData,l=c.length,h;h=0;var m,e,k=this.xAxis,f,x=this.options;f=x.cropThreshold;var n=this.getExtremesFromAll||x.getExtremesFromAll,g=this.isCartesian,x=k&&k.val2lin,r=k&&k.isLog,u,v;if(g&&!this.isDirty&&!k.isDirty&&!this.yAxis.isDirty&&!b)return!1;k&&(b=k.getExtremes(),u=b.min,v=b.max);if(g&&this.sorted&&!n&&(!f||l>f||this.forceCrop))if(c[l-1]<u||c[0]>v)c=[],
d=[];else if(c[0]<u||c[l-1]>v)h=this.cropData(this.xData,this.yData,u,v),c=h.xData,d=h.yData,h=h.start,m=!0;for(f=c.length||1;--f;)l=r?x(c[f])-x(c[f-1]):c[f]-c[f-1],0<l&&(void 0===e||l<e)?e=l:0>l&&this.requireSorting&&a.error(15);this.cropped=m;this.cropStart=h;this.processedXData=c;this.processedYData=d;this.closestPointRange=e},cropData:function(a,b,d,c){var h=a.length,l=0,m=h,e=u(this.cropShoulder,1),k;for(k=0;k<h;k++)if(a[k]>=d){l=Math.max(0,k-e);break}for(d=k;d<h;d++)if(a[d]>c){m=d+e;break}return{xData:a.slice(l,
m),yData:b.slice(l,m),start:l,end:m}},generatePoints:function(){var a=this.options,b=a.data,d=this.data,c,h=this.processedXData,m=this.processedYData,e=this.pointClass,k=h.length,f=this.cropStart||0,x,n=this.hasGroupedData,a=a.keys,g,u=[],r;d||n||(d=[],d.length=b.length,d=this.data=d);a&&n&&(this.options.keys=!1);for(r=0;r<k;r++)x=f+r,n?(g=(new e).init(this,[h[r]].concat(G(m[r]))),g.dataGroup=this.groupMap[r]):(g=d[x])||void 0===b[x]||(d[x]=g=(new e).init(this,b[x],h[r])),g&&(g.index=x,u[r]=g);this.options.keys=
a;if(d&&(k!==(c=d.length)||n))for(r=0;r<c;r++)r!==f||n||(r+=k),d[r]&&(d[r].destroyElements(),d[r].plotX=void 0);this.data=d;this.points=u},getExtremes:function(a){var c=this.yAxis,d=this.processedXData,l,h=[],m=0;l=this.xAxis.getExtremes();var e=l.min,k=l.max,f,x,n,g;a=a||this.stackedYData||this.processedYData||[];l=a.length;for(g=0;g<l;g++)if(x=d[g],n=a[g],f=(b(n,!0)||v(n))&&(!c.positiveValuesOnly||n.length||0<n),x=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(d[g]||x)>=
e&&(d[g]||x)<=k,f&&x)if(f=n.length)for(;f--;)null!==n[f]&&(h[m++]=n[f]);else h[m++]=n;this.dataMin=E(h);this.dataMax=D(h)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,c=a.stacking,d=this.xAxis,m=d.categories,h=this.yAxis,e=this.points,k=e.length,f=!!this.modifyValue,x=a.pointPlacement,n="between"===x||b(x),g=a.threshold,r=a.startFromThreshold?g:0,v,p,y,t,G=Number.MAX_VALUE;"between"===x&&(x=.5);b(x)&&(x*=u(a.pointRange||d.pointRange));for(a=
0;a<k;a++){var F=e[a],I=F.x,B=F.y;p=F.low;var A=c&&h.stacks[(this.negStacks&&B<(r?0:g)?"-":"")+this.stackKey],D;h.positiveValuesOnly&&null!==B&&0>=B&&(F.isNull=!0);F.plotX=v=q(Math.min(Math.max(-1E5,d.translate(I,0,0,0,1,x,"flags"===this.type)),1E5));c&&this.visible&&!F.isNull&&A&&A[I]&&(t=this.getStackIndicator(t,I,this.index),D=A[I],B=D.points[t.key],p=B[0],B=B[1],p===r&&t.key===A[I].base&&(p=u(g,h.min)),h.positiveValuesOnly&&0>=p&&(p=null),F.total=F.stackTotal=D.total,F.percentage=D.total&&F.y/
D.total*100,F.stackY=B,D.setOffset(this.pointXOffset||0,this.barW||0));F.yBottom=z(p)?h.translate(p,0,1,0,1):null;f&&(B=this.modifyValue(B,F));F.plotY=p="number"===typeof B&&Infinity!==B?Math.min(Math.max(-1E5,h.translate(B,0,1,0,1)),1E5):void 0;F.isInside=void 0!==p&&0<=p&&p<=h.len&&0<=v&&v<=d.len;F.clientX=n?q(d.translate(I,0,0,0,1,x)):v;F.negative=F.y<(g||0);F.category=m&&void 0!==m[F.x]?m[F.x]:F.x;F.isNull||(void 0!==y&&(G=Math.min(G,Math.abs(v-y))),y=v);F.zone=this.zones.length&&F.getZone()}this.closestPointRangePx=
G},getValidPoints:function(a,b){var d=this.chart;return r(a||this.points||[],function(a){return b&&!d.isInsidePlot(a.plotX,a.plotY,d.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,d=this.options,c=b.renderer,h=b.inverted,l=this.clipBox,m=l||b.clipBox,e=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,m.height,d.xAxis,d.yAxis].join(),k=b[e],f=b[e+"m"];k||(a&&(m.width=0,b[e+"m"]=f=c.clipRect(-99,h?-b.plotLeft:-b.plotTop,99,h?b.chartWidth:b.chartHeight)),b[e]=k=c.clipRect(m),
k.count={length:0});a&&!k.count[this.index]&&(k.count[this.index]=!0,k.count.length+=1);!1!==d.clip&&(this.group.clip(a||l?k:b.clipRect),this.markerGroup.clip(f),this.sharedClipKey=e);a||(k.count[this.index]&&(delete k.count[this.index],--k.count.length),0===k.count.length&&e&&b[e]&&(l||(b[e]=b[e].destroy()),b[e+"m"]&&(b[e+"m"]=b[e+"m"].destroy())))},animate:function(a){var b=this.chart,d=B(this.options.animation),c;a?this.setClip(d):(c=this.sharedClipKey,(a=b[c])&&a.animate({width:b.plotSizeX},d),
b[c+"m"]&&b[c+"m"].animate({width:b.plotSizeX+99},d),this.animate=null)},afterAnimate:function(){this.setClip();c(this,"afterAnimate")},drawPoints:function(){var a=this.points,c=this.chart,d,m,h,e,k=this.options.marker,f,x,n,g,r=this[this.specialGroup]||this.markerGroup,v=u(k.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>=2*k.radius);if(!1!==k.enabled||this._hasPointMarkers)for(m=0;m<a.length;m++)h=a[m],d=h.plotY,e=h.graphic,f=h.marker||{},x=!!h.marker,n=v&&void 0===f.enabled||f.enabled,
g=h.isInside,n&&b(d)&&null!==h.y?(d=u(f.symbol,this.symbol),h.hasImage=0===d.indexOf("url"),n=this.markerAttribs(h,h.selected&&"select"),e?e[g?"show":"hide"](!0).animate(n):g&&(0<n.width||h.hasImage)&&(h.graphic=e=c.renderer.symbol(d,n.x,n.y,n.width,n.height,x?f:k).add(r)),e&&e.addClass(h.getClassName(),!0)):e&&(h.graphic=e.destroy())},markerAttribs:function(a,b){var d=this.options.marker,c=a.marker||{},h=u(c.radius,d.radius);b&&(d=d.states[b],b=c.states&&c.states[b],h=u(b&&b.radius,d&&d.radius,h+
(d&&d.radiusPlus||0)));a.hasImage&&(h=0);a={x:Math.floor(a.plotX)-h,y:a.plotY-h};h&&(a.width=a.height=2*h);return a},destroy:function(){var a=this,b=a.chart,d=/AppleWebKit\/533/.test(x.navigator.userAgent),m,h,e=a.data||[],k,f;c(a,"destroy");I(a);p(a.axisTypes||[],function(d){(f=a[d])&&f.series&&(t(f.series,a),f.isDirty=f.forceRedraw=!0)});a.legendItem&&a.chart.legend.destroyItem(a);for(h=e.length;h--;)(k=e[h])&&k.destroy&&k.destroy();a.points=null;clearTimeout(a.animationTimeout);y(a,function(a,
b){a instanceof F&&!a.survive&&(m=d&&"group"===b?"hide":"destroy",a[m]())});b.hoverSeries===a&&(b.hoverSeries=null);t(b.series,a);b.orderSeries();y(a,function(d,b){delete a[b]})},getGraphPath:function(a,b,d){var c=this,h=c.options,m=h.step,l,e=[],k=[],f;a=a||c.points;(l=a.reversed)&&a.reverse();(m={right:1,center:2}[m]||m&&3)&&l&&(m=4-m);!h.connectNulls||b||d||(a=this.getValidPoints(a));p(a,function(l,x){var n=l.plotX,g=l.plotY,w=a[x-1];(l.leftCliff||w&&w.rightCliff)&&!d&&(f=!0);l.isNull&&!z(b)&&
0<x?f=!h.connectNulls:l.isNull&&!b?f=!0:(0===x||f?x=["M",l.plotX,l.plotY]:c.getPointSpline?x=c.getPointSpline(a,l,x):m?(x=1===m?["L",w.plotX,g]:2===m?["L",(w.plotX+n)/2,w.plotY,"L",(w.plotX+n)/2,g]:["L",n,w.plotY],x.push("L",n,g)):x=["L",n,g],k.push(l.x),m&&k.push(l.x),e.push.apply(e,x),f=!1)});e.xMap=k;return c.graphPath=e},drawGraph:function(){var a=this,b=(this.gappedPath||this.getGraphPath).call(this),d=[["graph","highcharts-graph"]];p(this.zones,function(a,b){d.push(["zone-graph-"+b,"highcharts-graph highcharts-zone-graph-"+
b+" "+(a.className||"")])});p(d,function(d,c){c=d[0];var h=a[c];h?(h.endX=b.xMap,h.animate({d:b})):b.length&&(a[c]=a.chart.renderer.path(b).addClass(d[1]).attr({zIndex:1}).add(a.group));h&&(h.startX=b.xMap,h.isArea=b.isArea)})},applyZones:function(){var a=this,b=this.chart,d=b.renderer,c=this.zones,h,m,e=this.clips||[],k,f=this.graph,x=this.area,n=Math.max(b.chartWidth,b.chartHeight),g=this[(this.zoneAxis||"y")+"Axis"],r,v,y=b.inverted,t,G,F,q,I=!1;c.length&&(f||x)&&g&&void 0!==g.min&&(v=g.reversed,
t=g.horiz,f&&f.hide(),x&&x.hide(),r=g.getExtremes(),p(c,function(c,l){h=v?t?b.plotWidth:0:t?0:g.toPixels(r.min);h=Math.min(Math.max(u(m,h),0),n);m=Math.min(Math.max(Math.round(g.toPixels(u(c.value,r.max),!0)),0),n);I&&(h=m=g.toPixels(r.max));G=Math.abs(h-m);F=Math.min(h,m);q=Math.max(h,m);g.isXAxis?(k={x:y?q:F,y:0,width:G,height:n},t||(k.x=b.plotHeight-k.x)):(k={x:0,y:y?q:F,width:n,height:G},t&&(k.y=b.plotWidth-k.y));e[l]?e[l].animate(k):(e[l]=d.clipRect(k),f&&a["zone-graph-"+l].clip(e[l]),x&&a["zone-area-"+
l].clip(e[l]));I=c.value>r.max}),this.clips=e)},invertGroups:function(a){function b(){p(["group","markerGroup"],function(b){d[b]&&(c.renderer.isVML&&d[b].attr({width:d.yAxis.len,height:d.xAxis.len}),d[b].width=d.yAxis.len,d[b].height=d.xAxis.len,d[b].invert(a))})}var d=this,c=d.chart,h;d.xAxis&&(h=A(c,"resize",b),A(d,"destroy",h),b(a),d.invertGroups=b)},plotGroup:function(a,b,d,c,h){var m=this[a],l=!m;l&&(this[a]=m=this.chart.renderer.g().attr({zIndex:c||.1}).add(h));m.addClass("highcharts-"+b+" highcharts-series-"+
this.index+" highcharts-"+this.type+"-series highcharts-color-"+this.colorIndex+" "+(this.options.className||""),!0);m.attr({visibility:d})[l?"attr":"animate"](this.getPlotBox());return m},getPlotBox:function(){var a=this.chart,b=this.xAxis,d=this.yAxis;a.inverted&&(b=d,d=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:d?d.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,d,c=a.options,h=!!a.animate&&b.renderer.isSVG&&B(c.animation).duration,e=a.visible?"inherit":
"hidden",k=c.zIndex,f=a.hasRendered,x=b.seriesGroup,n=b.inverted;d=a.plotGroup("group","series",e,k,x);a.markerGroup=a.plotGroup("markerGroup","markers",e,k,x);h&&a.animate(!0);d.inverted=a.isCartesian?n:!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(n);!1===c.clip||a.sharedClipKey||f||d.clip(b.clipRect);h&&a.animate();f||(a.animationTimeout=m(function(){a.afterAnimate()},
h));a.isDirty=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirty||this.isDirtyData,d=this.group,c=this.xAxis,h=this.yAxis;d&&(a.inverted&&d.attr({width:a.plotWidth,height:a.plotHeight}),d.animate({translateX:u(c&&c.left,a.plotLeft),translateY:u(h&&h.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var d=this.xAxis,c=this.yAxis,h=this.chart.inverted;return this.searchKDTree({clientX:h?d.len-a.chartY+
d.pos:a.chartX-d.pos,plotY:h?c.len-a.chartX+c.pos:a.chartY-c.pos},b)},buildKDTree:function(){function a(d,c,m){var h,l;if(l=d&&d.length)return h=b.kdAxisArray[c%m],d.sort(function(a,d){return a[h]-d[h]}),l=Math.floor(l/2),{point:d[l],left:a(d.slice(0,l),c+1,m),right:a(d.slice(l+1),c+1,m)}}this.buildingKdTree=!0;var b=this,d=-1<b.options.findNearestPointBy.indexOf("y")?2:1;delete b.kdTree;m(function(){b.kdTree=a(b.getValidPoints(null,!b.directTouch),d,d);b.buildingKdTree=!1},b.options.kdNow?0:1)},
searchKDTree:function(a,b){function d(a,b,e,k){var f=b.point,x=c.kdAxisArray[e%k],n,g,r=f;g=z(a[h])&&z(f[h])?Math.pow(a[h]-f[h],2):null;n=z(a[m])&&z(f[m])?Math.pow(a[m]-f[m],2):null;n=(g||0)+(n||0);f.dist=z(n)?Math.sqrt(n):Number.MAX_VALUE;f.distX=z(g)?Math.sqrt(g):Number.MAX_VALUE;x=a[x]-f[x];n=0>x?"left":"right";g=0>x?"right":"left";b[n]&&(n=d(a,b[n],e+1,k),r=n[l]<r[l]?n:f);b[g]&&Math.sqrt(x*x)<r[l]&&(a=d(a,b[g],e+1,k),r=a[l]<r[l]?a:r);return r}var c=this,h=this.kdAxisArray[0],m=this.kdAxisArray[1],
l=b?"distX":"dist";b=-1<c.options.findNearestPointBy.indexOf("y")?2:1;this.kdTree||this.buildingKdTree||this.buildKDTree();if(this.kdTree)return d(a,this.kdTree,b,b)}})})(K);(function(a){function A(a,c,f,g,b){var e=a.chart.inverted;this.axis=a;this.isNegative=f;this.options=c;this.x=g;this.total=null;this.points={};this.stack=b;this.rightCliff=this.leftCliff=0;this.alignOptions={align:c.align||(e?f?"left":"right":"center"),verticalAlign:c.verticalAlign||(e?"middle":f?"bottom":"top"),y:t(c.y,e?4:f?
14:-6),x:t(c.x,e?f?-6:6:0)};this.textAlign=c.textAlign||(e?f?"right":"left":"center")}var B=a.Axis,D=a.Chart,E=a.correctFloat,q=a.defined,f=a.destroyObjectProperties,g=a.each,z=a.format,p=a.objectEach,t=a.pick;a=a.Series;A.prototype={destroy:function(){f(this,this.axis)},render:function(a){var c=this.options,e=c.format,e=e?z(e,this):c.formatter.call(this);this.label?this.label.attr({text:e,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(e,null,null,c.useHTML).css(c.style).attr({align:this.textAlign,
rotation:c.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,c){var e=this.axis,f=e.chart,b=f.inverted,k=e.reversed,k=this.isNegative&&!k||!this.isNegative&&k,n=e.translate(e.usePercentage?100:this.total,0,0,0,1),e=e.translate(0),e=Math.abs(n-e);a=f.xAxis[0].translate(this.x)+a;var g=f.plotHeight,b={x:b?k?n:n-e:a,y:b?g-a-c:k?g-n-e:g-n,width:b?e:c,height:b?c:e};if(c=this.label)c.align(this.alignOptions,null,b),b=c.alignAttr,c[!1===this.options.crop||f.isInsidePlot(b.x,b.y)?"show":"hide"](!0)}};
D.prototype.getStacks=function(){var a=this;g(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&(a.oldStacks=a.stacks)});g(a.series,function(c){!c.options.stacking||!0!==c.visible&&!1!==a.options.chart.ignoreHiddenSeries||(c.stackKey=c.type+t(c.options.stack,""))})};B.prototype.buildStacks=function(){var a=this.series,c,f=t(this.options.reversedStacks,!0),g=a.length,b;if(!this.isXAxis){this.usePercentage=!1;for(b=g;b--;)a[f?b:g-b-1].setStackedPoints();for(b=g;b--;)c=a[f?b:g-b-1],c.setStackCliffs&&
c.setStackCliffs();if(this.usePercentage)for(b=0;b<g;b++)a[b].setPercentStacks()}};B.prototype.renderStackTotals=function(){var a=this.chart,c=a.renderer,f=this.stacks,g=this.stackTotalGroup;g||(this.stackTotalGroup=g=c.g("stack-labels").attr({visibility:"visible",zIndex:6}).add());g.translate(a.plotLeft,a.plotTop);p(f,function(a){p(a,function(a){a.render(g)})})};B.prototype.resetStacks=function(){var a=this,c=a.stacks;a.isXAxis||p(c,function(c){p(c,function(e,b){e.touched<a.stacksTouched?(e.destroy(),
delete c[b]):(e.total=null,e.cum=null)})})};B.prototype.cleanStacks=function(){var a;this.isXAxis||(this.oldStacks&&(a=this.stacks=this.oldStacks),p(a,function(a){p(a,function(a){a.cum=a.total})}))};a.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var a=this.processedXData,c=this.processedYData,f=[],g=c.length,b=this.options,k=b.threshold,n=b.startFromThreshold?k:0,p=b.stack,b=b.stacking,u=this.stackKey,I="-"+
u,G=this.negStacks,F=this.yAxis,m=F.stacks,x=F.oldStacks,l,C,d,H,h,w,z;F.stacksTouched+=1;for(h=0;h<g;h++)w=a[h],z=c[h],l=this.getStackIndicator(l,w,this.index),H=l.key,d=(C=G&&z<(n?0:k))?I:u,m[d]||(m[d]={}),m[d][w]||(x[d]&&x[d][w]?(m[d][w]=x[d][w],m[d][w].total=null):m[d][w]=new A(F,F.options.stackLabels,C,w,p)),d=m[d][w],null!==z&&(d.points[H]=d.points[this.index]=[t(d.cum,n)],q(d.cum)||(d.base=H),d.touched=F.stacksTouched,0<l.index&&!1===this.singleStacks&&(d.points[H][0]=d.points[this.index+","+
w+",0"][0])),"percent"===b?(C=C?u:I,G&&m[C]&&m[C][w]?(C=m[C][w],d.total=C.total=Math.max(C.total,d.total)+Math.abs(z)||0):d.total=E(d.total+(Math.abs(z)||0))):d.total=E(d.total+(z||0)),d.cum=t(d.cum,n)+(z||0),null!==z&&(d.points[H].push(d.cum),f[h]=d.cum);"percent"===b&&(F.usePercentage=!0);this.stackedYData=f;F.oldStacks={}}};a.prototype.setPercentStacks=function(){var a=this,c=a.stackKey,f=a.yAxis.stacks,v=a.processedXData,b;g([c,"-"+c],function(c){for(var e=v.length,k,g;e--;)if(k=v[e],b=a.getStackIndicator(b,
k,a.index,c),k=(g=f[c]&&f[c][k])&&g.points[b.key])g=g.total?100/g.total:0,k[0]=E(k[0]*g),k[1]=E(k[1]*g),a.stackedYData[e]=k[1]})};a.prototype.getStackIndicator=function(a,c,f,g){!q(a)||a.x!==c||g&&a.key!==g?a={x:c,index:0,key:g}:a.index++;a.key=[f,c,a.index].join();return a}})(K);(function(a){var A=a.addEvent,B=a.Axis,D=a.createElement,E=a.css,q=a.defined,f=a.each,g=a.erase,z=a.extend,p=a.fireEvent,t=a.inArray,e=a.isNumber,c=a.isObject,r=a.isArray,v=a.merge,b=a.objectEach,k=a.pick,n=a.Point,y=a.Series,
u=a.seriesTypes,I=a.setAnimation,G=a.splat;z(a.Chart.prototype,{addSeries:function(a,b,c){var m,e=this;a&&(b=k(b,!0),p(e,"addSeries",{options:a},function(){m=e.initSeries(a);e.isDirtyLegend=!0;e.linkSeries();b&&e.redraw(c)}));return m},addAxis:function(a,b,c,l){var m=b?"xAxis":"yAxis",d=this.options;a=v(a,{index:this[m].length,isX:b});new B(this,a);d[m]=G(d[m]||{});d[m].push(a);k(c,!0)&&this.redraw(l)},showLoading:function(a){var b=this,c=b.options,l=b.loadingDiv,e=function(){l&&E(l,{left:b.plotLeft+
"px",top:b.plotTop+"px",width:b.plotWidth+"px",height:b.plotHeight+"px"})};l||(b.loadingDiv=l=D("div",{className:"highcharts-loading highcharts-loading-hidden"},null,b.container),b.loadingSpan=D("span",{className:"highcharts-loading-inner"},null,l),A(b,"redraw",e));l.className="highcharts-loading";b.loadingSpan.innerHTML=a||c.lang.loading;b.loadingShown=!0;e()},hideLoading:function(){var a=this.loadingDiv;a&&(a.className="highcharts-loading highcharts-loading-hidden");this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions tooltip".split(" "),update:function(a,c){var m=this,l={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},g=a.chart,d,n;if(g){v(!0,m.options.chart,g);"className"in g&&m.setClassName(g.className);if("inverted"in g||"polar"in g)m.propFromSeries(),d=!0;"alignTicks"in g&&(d=!0);b(g,function(a,d){-1!==t("chart."+d,m.propsRequireUpdateSeries)&&(n=!0);-1!==t(d,m.propsRequireDirtyBox)&&(m.isDirtyBox=
!0)})}a.plotOptions&&v(!0,this.options.plotOptions,a.plotOptions);b(a,function(a,d){if(m[d]&&"function"===typeof m[d].update)m[d].update(a,!1);else if("function"===typeof m[l[d]])m[l[d]](a);"chart"!==d&&-1!==t(d,m.propsRequireUpdateSeries)&&(n=!0)});f("xAxis yAxis zAxis series colorAxis pane".split(" "),function(d){a[d]&&f(G(a[d]),function(a,b){(b=q(a.id)&&m.get(a.id)||m[d][b])&&b.coll===d&&b.update(a,!1)})});d&&f(m.axes,function(a){a.update({},!1)});n&&f(m.series,function(a){a.update({},!1)});a.loading&&
v(!0,m.options.loading,a.loading);d=g&&g.width;g=g&&g.height;e(d)&&d!==m.chartWidth||e(g)&&g!==m.chartHeight?m.setSize(d,g):k(c,!0)&&m.redraw()},setSubtitle:function(a){this.setTitle(void 0,a)}});z(n.prototype,{update:function(a,b,e,l){function m(){d.applyOptions(a);null===d.y&&h&&(d.graphic=h.destroy());c(a,!0)&&(h&&h.element&&a&&a.marker&&a.marker.symbol&&(d.graphic=h.destroy()),a&&a.dataLabels&&d.dataLabel&&(d.dataLabel=d.dataLabel.destroy()));g=d.index;f.updateParallelArrays(d,g);n.data[g]=c(n.data[g],
!0)||c(a,!0)?d.options:a;f.isDirty=f.isDirtyData=!0;!f.fixedBox&&f.hasCartesianSeries&&(x.isDirtyBox=!0);"point"===n.legendType&&(x.isDirtyLegend=!0);b&&x.redraw(e)}var d=this,f=d.series,h=d.graphic,g,x=f.chart,n=f.options;b=k(b,!0);!1===l?m():d.firePointEvent("update",{options:a},m)},remove:function(a,b){this.series.removePoint(t(this,this.series.data),a,b)}});z(y.prototype,{addPoint:function(a,b,c,l){var m=this.options,d=this.data,e=this.chart,h=this.xAxis,h=h&&h.hasNames&&h.names,f=m.data,g,x,
n=this.xData,u,r;b=k(b,!0);g={series:this};this.pointClass.prototype.applyOptions.apply(g,[a]);r=g.x;u=n.length;if(this.requireSorting&&r<n[u-1])for(x=!0;u&&n[u-1]>r;)u--;this.updateParallelArrays(g,"splice",u,0,0);this.updateParallelArrays(g,u);h&&g.name&&(h[r]=g.name);f.splice(u,0,a);x&&(this.data.splice(u,0,null),this.processData());"point"===m.legendType&&this.generatePoints();c&&(d[0]&&d[0].remove?d[0].remove(!1):(d.shift(),this.updateParallelArrays(g,"shift"),f.shift()));this.isDirtyData=this.isDirty=
!0;b&&e.redraw(l)},removePoint:function(a,b,c){var m=this,e=m.data,d=e[a],f=m.points,h=m.chart,g=function(){f&&f.length===e.length&&f.splice(a,1);e.splice(a,1);m.options.data.splice(a,1);m.updateParallelArrays(d||{series:m},"splice",a,1);d&&d.destroy();m.isDirty=!0;m.isDirtyData=!0;b&&h.redraw()};I(c,h);b=k(b,!0);d?d.firePointEvent("remove",null,g):g()},remove:function(a,b,c){function m(){e.destroy();d.isDirtyLegend=d.isDirtyBox=!0;d.linkSeries();k(a,!0)&&d.redraw(b)}var e=this,d=e.chart;!1!==c?p(e,
"remove",null,m):m()},update:function(a,b){var c=this,m=c.chart,e=c.userOptions,d=c.oldType||c.type,g=a.type||e.type||m.options.chart.type,h=u[d].prototype,n=["group","markerGroup","dataLabelsGroup"],r;if(g&&g!==d||void 0!==a.zIndex)n.length=0;f(n,function(a){n[a]=c[a];delete c[a]});a=v(e,{animation:!1,index:c.index,pointStart:c.xData[0]},{data:c.options.data},a);c.remove(!1,null,!1);for(r in h)c[r]=void 0;z(c,u[g||d].prototype);f(n,function(a){c[a]=n[a]});c.init(m,a);c.oldType=d;m.linkSeries();k(b,
!0)&&m.redraw(!1)}});z(B.prototype,{update:function(a,b){var c=this.chart;a=c.options[this.coll][this.options.index]=v(this.userOptions,a);this.destroy(!0);this.init(c,z(a,{events:void 0}));c.isDirtyBox=!0;k(b,!0)&&c.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,l=this.series,e=l.length;e--;)l[e]&&l[e].remove(!1);g(b.axes,this);g(b[c],this);r(b.options[c])?b.options[c].splice(this.options.index,1):delete b.options[c];f(b[c],function(a,b){a.options.index=b});this.destroy();b.isDirtyBox=
!0;k(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}})})(K);(function(a){var A=a.each,B=a.map,D=a.pick,E=a.Series,q=a.seriesType;q("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(){var f=[],g=[],q=this.xAxis,p=this.yAxis,t=p.stacks[this.stackKey],e={},c=this.points,r=this.index,v=p.series,b=v.length,k,n=D(p.options.reversedStacks,!0)?1:-1,y;if(this.options.stacking){for(y=0;y<c.length;y++)e[c[y].x]=
c[y];a.objectEach(t,function(a,b){null!==a.total&&g.push(b)});g.sort(function(a,b){return a-b});k=B(v,function(){return this.visible});A(g,function(a,c){var u=0,v,m;if(e[a]&&!e[a].isNull)f.push(e[a]),A([-1,1],function(f){var l=1===f?"rightNull":"leftNull",x=0,d=t[g[c+f]];if(d)for(y=r;0<=y&&y<b;)v=d.points[y],v||(y===r?e[a][l]=!0:k[y]&&(m=t[a].points[y])&&(x-=m[1]-m[0])),y+=n;e[a][1===f?"rightCliff":"leftCliff"]=x});else{for(y=r;0<=y&&y<b;){if(v=t[a].points[y]){u=v[1];break}y+=n}u=p.translate(u,0,
1,0,1);f.push({isNull:!0,plotX:q.translate(a,0,0,0,1),x:a,plotY:u,yBottom:u})}})}return f},getGraphPath:function(a){var f=E.prototype.getGraphPath,q=this.options,p=q.stacking,t=this.yAxis,e,c,r=[],v=[],b=this.index,k,n=t.stacks[this.stackKey],y=q.threshold,u=t.getThreshold(q.threshold),I,q=q.connectNulls||"percent"===p,G=function(c,m,e){var l=a[c];c=p&&n[l.x].points[b];var f=l[e+"Null"]||0;e=l[e+"Cliff"]||0;var d,g,l=!0;e||f?(d=(f?c[0]:c[1])+e,g=c[0]+e,l=!!f):!p&&a[m]&&a[m].isNull&&(d=g=y);void 0!==
d&&(v.push({plotX:k,plotY:null===d?u:t.getThreshold(d),isNull:l,isCliff:!0}),r.push({plotX:k,plotY:null===g?u:t.getThreshold(g),doCurve:!1}))};a=a||this.points;p&&(a=this.getStackPoints());for(e=0;e<a.length;e++)if(c=a[e].isNull,k=D(a[e].rectPlotX,a[e].plotX),I=D(a[e].yBottom,u),!c||q)q||G(e,e-1,"left"),c&&!p&&q||(v.push(a[e]),r.push({x:e,plotX:k,plotY:I})),q||G(e,e+1,"right");e=f.call(this,v,!0,!0);r.reversed=!0;c=f.call(this,r,!0,!0);c.length&&(c[0]="L");c=e.concat(c);f=f.call(this,v,!1,q);c.xMap=
e.xMap;this.areaPath=c;return f},drawGraph:function(){this.areaPath=[];E.prototype.drawGraph.apply(this);var a=this,g=this.areaPath,q=this.options,p=[["area","highcharts-area"]];A(this.zones,function(a,e){p.push(["zone-area-"+e,"highcharts-area highcharts-zone-area-"+e+" "+a.className])});A(p,function(f){var e=f[0],c=a[e];c?(c.endX=g.xMap,c.animate({d:g})):(c=a[e]=a.chart.renderer.path(g).addClass(f[1]).attr({zIndex:0}).add(a.group),c.isArea=!0);c.startX=g.xMap;c.shiftUnit=q.step?2:1})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(K);
(function(a){var A=a.pick;a=a.seriesType;a("spline","line",{},{getPointSpline:function(a,D,E){var q=D.plotX,f=D.plotY,g=a[E-1];E=a[E+1];var z,p,t,e;if(g&&!g.isNull&&!1!==g.doCurve&&!D.isCliff&&E&&!E.isNull&&!1!==E.doCurve&&!D.isCliff){a=g.plotY;t=E.plotX;E=E.plotY;var c=0;z=(1.5*q+g.plotX)/2.5;p=(1.5*f+a)/2.5;t=(1.5*q+t)/2.5;e=(1.5*f+E)/2.5;t!==z&&(c=(e-p)*(t-q)/(t-z)+f-e);p+=c;e+=c;p>a&&p>f?(p=Math.max(a,f),e=2*f-p):p<a&&p<f&&(p=Math.min(a,f),e=2*f-p);e>E&&e>f?(e=Math.max(E,f),p=2*f-e):e<E&&e<f&&
(e=Math.min(E,f),p=2*f-e);D.rightContX=t;D.rightContY=e}D=["C",A(g.rightContX,g.plotX),A(g.rightContY,g.plotY),A(z,q),A(p,f),q,f];g.rightContX=g.rightContY=null;return D}})})(K);(function(a){var A=a.seriesTypes.area.prototype,B=a.seriesType;B("areaspline","spline",a.defaultPlotOptions.area,{getStackPoints:A.getStackPoints,getGraphPath:A.getGraphPath,setStackCliffs:A.setStackCliffs,drawGraph:A.drawGraph,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle})})(K);(function(a){var A=a.animObject,B=a.each,
D=a.extend,E=a.isNumber,q=a.merge,f=a.pick,g=a.Series,z=a.seriesType,p=a.svg;z("column","line",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){g.prototype.init.apply(this,
arguments);var a=this,e=a.chart;e.hasRendered&&B(e.series,function(c){c.type===a.type&&(c.isDirty=!0)})},getColumnMetrics:function(){var a=this,e=a.options,c=a.xAxis,g=a.yAxis,v=c.reversed,b,k={},n=0;!1===e.grouping?n=1:B(a.chart.series,function(c){var e=c.options,m=c.yAxis,f;c.type===a.type&&c.visible&&g.len===m.len&&g.pos===m.pos&&(e.stacking?(b=c.stackKey,void 0===k[b]&&(k[b]=n++),f=k[b]):!1!==e.grouping&&(f=n++),c.columnIndex=f)});var p=Math.min(Math.abs(c.transA)*(c.ordinalSlope||e.pointRange||
c.closestPointRange||c.tickInterval||1),c.len),u=p*e.groupPadding,q=(p-2*u)/(n||1),e=Math.min(e.maxPointWidth||c.len,f(e.pointWidth,q*(1-2*e.pointPadding)));a.columnMetrics={width:e,offset:(q-e)/2+(u+((a.columnIndex||0)+(v?1:0))*q-p/2)*(v?-1:1)};return a.columnMetrics},crispCol:function(a,e,c,f){var g=this.chart,b=this.borderWidth,k=-(b%2?.5:0),b=b%2?.5:1;g.inverted&&g.renderer.isVML&&(b+=1);this.options.crisp&&(c=Math.round(a+c)+k,a=Math.round(a)+k,c-=a);f=Math.round(e+f)+b;k=.5>=Math.abs(e)&&.5<
f;e=Math.round(e)+b;f-=e;k&&f&&(--e,f+=1);return{x:a,y:e,width:c,height:f}},translate:function(){var a=this,e=a.chart,c=a.options,r=a.dense=2>a.closestPointRange*a.xAxis.transA,r=a.borderWidth=f(c.borderWidth,r?0:1),p=a.yAxis,b=a.translatedThreshold=p.getThreshold(c.threshold),k=f(c.minPointLength,5),n=a.getColumnMetrics(),y=n.width,u=a.barW=Math.max(y,1+2*r),q=a.pointXOffset=n.offset;e.inverted&&(b-=.5);c.pointPadding&&(u=Math.ceil(u));g.prototype.translate.apply(a);B(a.points,function(c){var g=
f(c.yBottom,b),m=999+Math.abs(g),m=Math.min(Math.max(-m,c.plotY),p.len+m),n=c.plotX+q,l=u,r=Math.min(m,g),d,v=Math.max(m,g)-r;Math.abs(v)<k&&k&&(v=k,d=!p.reversed&&!c.negative||p.reversed&&c.negative,r=Math.abs(r-b)>k?g-k:b-(d?k:0));c.barX=n;c.pointWidth=y;c.tooltipPos=e.inverted?[p.len+p.pos-e.plotLeft-m,a.xAxis.len-n-l/2,v]:[n+l/2,m+p.pos-e.plotTop,v];c.shapeType="rect";c.shapeArgs=a.crispCol.apply(a,c.isNull?[n,b,l,0]:[n,r,l,v])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,
drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},drawPoints:function(){var a=this,e=this.chart,c=e.renderer,f=a.options.animationLimit||250,g;B(a.points,function(b){var k=b.graphic;if(E(b.plotY)&&null!==b.y){g=b.shapeArgs;if(k)k[e.pointCount<f?"animate":"attr"](q(g));else b.graphic=k=c[b.shapeType](g).add(b.group||a.group);k.addClass(b.getClassName(),!0)}else k&&(b.graphic=k.destroy())})},animate:function(a){var e=this,c=this.yAxis,f=e.options,g=this.chart.inverted,
b={};p&&(a?(b.scaleY=.001,a=Math.min(c.pos+c.len,Math.max(c.pos,c.toPixels(f.threshold))),g?b.translateX=a-c.len:b.translateY=a,e.group.attr(b)):(b[g?"translateX":"translateY"]=c.pos,e.group.animate(b,D(A(e.options.animation),{step:function(a,b){e.group.attr({scaleY:Math.max(.001,b.pos)})}})),e.animate=null))},remove:function(){var a=this,e=a.chart;e.hasRendered&&B(e.series,function(c){c.type===a.type&&(c.isDirty=!0)});g.prototype.remove.apply(a,arguments)}})})(K);(function(a){a=a.seriesType;a("bar",
"column",null,{inverted:!0})})(K);(function(a){var A=a.Series;a=a.seriesType;a("scatter","line",{lineWidth:0,findNearestPointBy:"xy",marker:{enabled:!0},tooltip:{headerFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\x3e\u25cf\x3c/span\x3e \x3cspan class\x3d"highcharts-header"\x3e {series.name}\x3c/span\x3e\x3cbr/\x3e',pointFormat:"x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3e"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group",
"markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&A.prototype.drawGraph.call(this)}})})(K);(function(a){var A=a.pick,B=a.relativeLength;a.CenteredSeriesMixin={getCenter:function(){var a=this.options,E=this.chart,q=2*(a.slicedOffset||0),f=E.plotWidth-2*q,E=E.plotHeight-2*q,g=a.center,g=[A(g[0],"50%"),A(g[1],"50%"),a.size||"100%",a.innerSize||0],z=Math.min(f,E),p,t;for(p=0;4>p;++p)t=g[p],a=2>p||2===p&&/%$/.test(t),g[p]=B(t,[f,E,z,g[2]][p])+(a?q:0);
g[3]>g[2]&&(g[3]=g[2]);return g}}})(K);(function(a){var A=a.addEvent,B=a.defined,D=a.each,E=a.extend,q=a.inArray,f=a.noop,g=a.pick,z=a.Point,p=a.Series,t=a.seriesType,e=a.setAnimation;t("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0}},{isCartesian:!1,
requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var c=this,e=c.points,b=c.startAngleRad;a||(D(e,function(a){var e=a.graphic,f=a.shapeArgs;e&&(e.attr({r:a.startR||c.center[3]/2,start:b,end:b}),e.animate({r:f.r,start:f.start,end:f.end},c.options.animation))}),c.animate=null)},updateTotals:function(){var a,e=0,f=this.points,b=f.length,k,g=this.options.ignoreHiddenPoint;
for(a=0;a<b;a++)k=f[a],e+=g&&!k.visible?0:k.isNull?0:k.y;this.total=e;for(a=0;a<b;a++)k=f[a],k.percentage=0<e&&(k.visible||!g)?k.y/e*100:0,k.total=e},generatePoints:function(){p.prototype.generatePoints.call(this);this.updateTotals()},translate:function(a){this.generatePoints();var c=0,e=this.options,b=e.slicedOffset,f=b+(e.borderWidth||0),n,p,u,t=e.startAngle||0,q=this.startAngleRad=Math.PI/180*(t-90),t=(this.endAngleRad=Math.PI/180*(g(e.endAngle,t+360)-90))-q,F=this.points,m,x=e.dataLabels.distance,
e=e.ignoreHiddenPoint,l,C=F.length,d;a||(this.center=a=this.getCenter());this.getX=function(d,b,c){u=Math.asin(Math.min((d-a[1])/(a[2]/2+c.labelDistance),1));return a[0]+(b?-1:1)*Math.cos(u)*(a[2]/2+c.labelDistance)};for(l=0;l<C;l++){d=F[l];d.labelDistance=g(d.options.dataLabels&&d.options.dataLabels.distance,x);this.maxLabelDistance=Math.max(this.maxLabelDistance||0,d.labelDistance);n=q+c*t;if(!e||d.visible)c+=d.percentage/100;p=q+c*t;d.shapeType="arc";d.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/
2,start:Math.round(1E3*n)/1E3,end:Math.round(1E3*p)/1E3};u=(p+n)/2;u>1.5*Math.PI?u-=2*Math.PI:u<-Math.PI/2&&(u+=2*Math.PI);d.slicedTranslation={translateX:Math.round(Math.cos(u)*b),translateY:Math.round(Math.sin(u)*b)};p=Math.cos(u)*a[2]/2;m=Math.sin(u)*a[2]/2;d.tooltipPos=[a[0]+.7*p,a[1]+.7*m];d.half=u<-Math.PI/2||u>Math.PI/2?1:0;d.angle=u;n=Math.min(f,d.labelDistance/5);d.labelPos=[a[0]+p+Math.cos(u)*d.labelDistance,a[1]+m+Math.sin(u)*d.labelDistance,a[0]+p+Math.cos(u)*n,a[1]+m+Math.sin(u)*n,a[0]+
p,a[1]+m,0>d.labelDistance?"center":d.half?"right":"left",u]}},drawGraph:null,drawPoints:function(){var a=this,e=a.chart.renderer,f,b,k;D(a.points,function(c){c.isNull||(b=c.graphic,k=c.shapeArgs,f=c.getTranslate(),b?b.setRadialReference(a.center).animate(E(k,f)):(c.graphic=b=e[c.shapeType](k).setRadialReference(a.center).attr(f).add(a.group),c.visible||b.attr({visibility:"hidden"})),b.addClass(c.getClassName()))})},searchPoint:f,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:f},{init:function(){z.prototype.init.apply(this,arguments);var a=this,e;a.name=g(a.name,"Slice");e=function(c){a.slice("select"===c.type)};A(a,"select",e);A(a,"unselect",e);return a},isValid:function(){return a.isNumber(this.y,!0)&&0<=this.y},setVisible:function(a,e){var c=this,b=c.series,f=b.chart,n=b.options.ignoreHiddenPoint;e=g(e,n);a!==c.visible&&(c.visible=c.options.visible=
a=void 0===a?!c.visible:a,b.options.data[q(c,b.data)]=c.options,D(["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(""),n&&(b.isDirty=!0),e&&f.redraw())},slice:function(a,f,p){var b=this.series;e(p,b.chart);g(f,!0);this.sliced=this.options.sliced=B(a)?a:!this.sliced;b.options.data[q(this,b.data)]=this.options;this.graphic.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 A=a.addEvent,B=a.arrayMax,D=a.defined,E=a.each,q=a.extend,f=a.format,g=a.map,z=a.merge,p=a.noop,t=a.pick,e=a.relativeLength,c=a.Series,r=a.seriesTypes,v=a.stableSort;a.distribute=function(a,c){function b(a,b){return a.target-b.target}var e,
f=!0,k=a,p=[],r;r=0;for(e=a.length;e--;)r+=a[e].size;if(r>c){v(a,function(a,b){return(b.rank||0)-(a.rank||0)});for(r=e=0;r<=c;)r+=a[e].size,e++;p=a.splice(e-1,a.length)}v(a,b);for(a=g(a,function(a){return{size:a.size,targets:[a.target]}});f;){for(e=a.length;e--;)f=a[e],r=(Math.min.apply(0,f.targets)+Math.max.apply(0,f.targets))/2,f.pos=Math.min(Math.max(0,r-f.size/2),c-f.size);e=a.length;for(f=!1;e--;)0<e&&a[e-1].pos+a[e-1].size>a[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),f=!0)}e=0;E(a,function(a){var b=0;E(a.targets,function(){k[e].pos=a.pos+b;b+=k[e].size;e++})});k.push.apply(k,p);v(k,b)};c.prototype.drawDataLabels=function(){var b=this,c=b.options,e=c.dataLabels,g=b.points,u,p,r=b.hasRendered||0,v,m,x=t(e.defer,!0),l=b.chart.renderer;if(e.enabled||b._hasPointLabels)b.dlProcessOptions&&b.dlProcessOptions(e),m=b.plotGroup("dataLabelsGroup","data-labels",x&&!r?"hidden":"visible",e.zIndex||6),x&&(m.attr({opacity:+r}),
r||A(b,"afterAnimate",function(){b.visible&&m.show(!0);m[c.animation?"animate":"attr"]({opacity:1},{duration:200})})),p=e,E(g,function(c){var d,k=c.dataLabel,h,g,n=c.connector,x=!k;u=c.dlOptions||c.options&&c.options.dataLabels;if(d=t(u&&u.enabled,p.enabled)&&null!==c.y)e=z(p,u),h=c.getLabelConfig(),v=e.format?f(e.format,h):e.formatter.call(h,e),h=e.rotation,g={r:e.borderRadius||0,rotation:h,padding:e.padding,zIndex:1},a.objectEach(g,function(a,d){void 0===a&&delete g[d]});!k||d&&D(v)?d&&D(v)&&(k?
g.text=v:(k=c.dataLabel=l[h?"text":"label"](v,0,-9999,e.shape,null,null,e.useHTML,null,"data-label"),k.addClass("highcharts-data-label-color-"+c.colorIndex+" "+(e.className||"")+(e.useHTML?"highcharts-tracker":""))),k.attr(g),k.added||k.add(m),b.alignDataLabel(c,k,e,null,x)):(c.dataLabel=k=k.destroy(),n&&(c.connector=n.destroy()))})};c.prototype.alignDataLabel=function(a,c,e,f,g){var b=this.chart,k=b.inverted,n=t(a.plotX,-9999),m=t(a.plotY,-9999),x=c.getBBox(),l,u=e.rotation,d=e.align,p=this.visible&&
(a.series.forceDL||b.isInsidePlot(n,Math.round(m),k)||f&&b.isInsidePlot(n,k?f.x+1:f.y+f.height-1,k)),h="justify"===t(e.overflow,"justify");if(p&&(l=b.renderer.fontMetrics(void 0,c).b,f=q({x:k?b.plotWidth-m:n,y:Math.round(k?b.plotHeight-n:m),width:0,height:0},f),q(e,{width:x.width,height:x.height}),u?(h=!1,n=b.renderer.rotCorr(l,u),n={x:f.x+e.x+f.width/2+n.x,y:f.y+e.y+{top:0,middle:.5,bottom:1}[e.verticalAlign]*f.height},c[g?"attr":"animate"](n).attr({align:d}),m=(u+720)%360,m=180<m&&360>m,"left"===
d?n.y-=m?x.height:0:"center"===d?(n.x-=x.width/2,n.y-=x.height/2):"right"===d&&(n.x-=x.width,n.y-=m?0:x.height)):(c.align(e,null,f),n=c.alignAttr),h?a.isLabelJustified=this.justifyDataLabel(c,e,n,x,f,g):t(e.crop,!0)&&(p=b.isInsidePlot(n.x,n.y)&&b.isInsidePlot(n.x+x.width,n.y+x.height)),e.shape&&!u))c[g?"attr":"animate"]({anchorX:k?b.plotWidth-a.plotY:a.plotX,anchorY:k?b.plotHeight-a.plotX:a.plotY});p||(c.attr({y:-9999}),c.placed=!1)};c.prototype.justifyDataLabel=function(a,c,e,f,g,p){var b=this.chart,
k=c.align,m=c.verticalAlign,n,l,u=a.box?0:a.padding||0;n=e.x+u;0>n&&("right"===k?c.align="left":c.x=-n,l=!0);n=e.x+f.width-u;n>b.plotWidth&&("left"===k?c.align="right":c.x=b.plotWidth-n,l=!0);n=e.y+u;0>n&&("bottom"===m?c.verticalAlign="top":c.y=-n,l=!0);n=e.y+f.height-u;n>b.plotHeight&&("top"===m?c.verticalAlign="bottom":c.y=b.plotHeight-n,l=!0);l&&(a.placed=!p,a.align(c,null,g));return l};r.pie&&(r.pie.prototype.drawDataLabels=function(){var b=this,e=b.data,f,g=b.chart,u=b.options.dataLabels,p=t(u.connectorPadding,
10),r=t(u.connectorWidth,1),v=g.plotWidth,m=g.plotHeight,x,l=b.center,C=l[2]/2,d=l[1],q,h,w,z,J=[[],[]],N,A,O,P,M=[0,0,0,0];b.visible&&(u.enabled||b._hasPointLabels)&&(E(e,function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),a.dataLabel.shortened=!1)}),c.prototype.drawDataLabels.apply(b),E(e,function(a){a.dataLabel&&a.visible&&(J[a.half].push(a),a.dataLabel._pos=null)}),E(J,function(c,e){var k,n,x=c.length,r=[],t;if(x)for(b.sortByAngle(c,
e-.5),0<b.maxLabelDistance&&(k=Math.max(0,d-C-b.maxLabelDistance),n=Math.min(d+C+b.maxLabelDistance,g.plotHeight),E(c,function(a){0<a.labelDistance&&a.dataLabel&&(a.top=Math.max(0,d-C-a.labelDistance),a.bottom=Math.min(d+C+a.labelDistance,g.plotHeight),t=a.dataLabel.getBBox().height||21,a.positionsIndex=r.push({target:a.labelPos[1]-a.top+t/2,size:t,rank:a.y})-1)}),a.distribute(r,n+t-k)),P=0;P<x;P++)f=c[P],n=f.positionsIndex,w=f.labelPos,q=f.dataLabel,O=!1===f.visible?"hidden":"inherit",k=w[1],r&&
D(r[n])?void 0===r[n].pos?O="hidden":(z=r[n].size,A=f.top+r[n].pos):A=k,delete f.positionIndex,N=u.justify?l[0]+(e?-1:1)*(C+f.labelDistance):b.getX(A<f.top+2||A>f.bottom-2?k:A,e,f),q._attr={visibility:O,align:w[6]},q._pos={x:N+u.x+({left:p,right:-p}[w[6]]||0),y:A+u.y-10},w.x=N,w.y=A,null===b.options.size&&(h=q.getBBox().width,k=null,N-h<p?(k=Math.round(h-N+p),M[3]=Math.max(k,M[3])):N+h>v-p&&(k=Math.round(N+h-v+p),M[1]=Math.max(k,M[1])),0>A-z/2?M[0]=Math.max(Math.round(-A+z/2),M[0]):A+z/2>m&&(M[2]=
Math.max(Math.round(A+z/2-m),M[2])),q.sideOverflow=k)}),0===B(M)||this.verifyDataLabelOverflow(M))&&(this.placeDataLabels(),r&&E(this.points,function(a){var d;x=a.connector;if((q=a.dataLabel)&&q._pos&&a.visible&&0<a.labelDistance){O=q._attr.visibility;if(d=!x)a.connector=x=g.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+a.colorIndex).add(b.dataLabelsGroup);x[d?"attr":"animate"]({d:b.connectorPath(a.labelPos)});x.attr("visibility",O)}else x&&(a.connector=x.destroy())}))},
r.pie.prototype.connectorPath=function(a){var b=a.x,c=a.y;return t(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]]},r.pie.prototype.placeDataLabels=function(){E(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)},r.pie.prototype.alignDataLabel=p,r.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,c=this.options,f=c.center,g=c.minSize||80,p,r;null!==f[0]?p=Math.max(b[2]-Math.max(a[1],a[3]),g):(p=Math.max(b[2]-a[1]-a[3],g),b[0]+=(a[3]-a[1])/2);null!==f[1]?p=Math.max(Math.min(p,b[2]-Math.max(a[0],a[2])),g):(p=Math.max(Math.min(p,b[2]-a[0]-a[2]),g),b[1]+=(a[0]-a[2])/2);p<b[2]?(b[2]=p,b[3]=Math.min(e(c.innerSize||
0,p),p),this.translate(b),this.drawDataLabels&&this.drawDataLabels()):r=!0;return r});r.column&&(r.column.prototype.alignDataLabel=function(a,e,f,g,p){var b=this.chart.inverted,k=a.series,n=a.dlBox||a.shapeArgs,m=t(a.below,a.plotY>t(this.translatedThreshold,k.yAxis.len)),x=t(f.inside,!!this.options.stacking);n&&(g=z(n),0>g.y&&(g.height+=g.y,g.y=0),n=g.y+g.height-k.yAxis.len,0<n&&(g.height-=n),b&&(g={x:k.yAxis.len-g.y-g.height,y:k.xAxis.len-g.x-g.width,width:g.height,height:g.width}),x||(b?(g.x+=m?
0:g.width,g.width=0):(g.y+=m?g.height:0,g.height=0)));f.align=t(f.align,!b||x?"center":m?"right":"left");f.verticalAlign=t(f.verticalAlign,b||x?"middle":m?"top":"bottom");c.prototype.alignDataLabel.call(this,a,e,f,g,p);a.isLabelJustified&&a.contrastColor&&a.dataLabel.css({color:a.contrastColor})})})(K);(function(a){var A=a.Chart,B=a.each,D=a.pick,E=a.addEvent;A.prototype.callbacks.push(function(a){function f(){var f=[];B(a.series||[],function(a){var g=a.options.dataLabels,t=a.dataLabelCollections||
["dataLabel"];(g.enabled||a._hasPointLabels)&&!g.allowOverlap&&a.visible&&B(t,function(e){B(a.points,function(a){a[e]&&(a[e].labelrank=D(a.labelrank,a.shapeArgs&&a.shapeArgs.height),f.push(a[e]))})})});a.hideOverlappingLabels(f)}f();E(a,"redraw",f)});A.prototype.hideOverlappingLabels=function(a){var f=a.length,g,q,p,t,e,c,r,v,b,k=function(a,b,c,e,f,g,m,k){return!(f>a+c||f+m<a||g>b+e||g+k<b)};for(q=0;q<f;q++)if(g=a[q])g.oldOpacity=g.opacity,g.newOpacity=1;a.sort(function(a,b){return(b.labelrank||0)-
(a.labelrank||0)});for(q=0;q<f;q++)for(p=a[q],g=q+1;g<f;++g)if(t=a[g],p&&t&&p!==t&&p.placed&&t.placed&&0!==p.newOpacity&&0!==t.newOpacity&&(e=p.alignAttr,c=t.alignAttr,r=p.parentGroup,v=t.parentGroup,b=2*(p.box?0:p.padding),e=k(e.x+r.translateX,e.y+r.translateY,p.width-b,p.height-b,c.x+v.translateX,c.y+v.translateY,t.width-b,t.height-b)))(p.labelrank<t.labelrank?p:t).newOpacity=0;B(a,function(a){var b,c;a&&(c=a.newOpacity,a.oldOpacity!==c&&a.placed&&(c?a.show(!0):b=function(){a.hide()},a.alignAttr.opacity=
c,a[a.isOld?"animate":"attr"](a.alignAttr,null,b)),a.isOld=!0)})}})(K);(function(a){var A=a.addEvent,B=a.Chart,D=a.createElement,E=a.css,q=a.defaultOptions,f=a.defaultPlotOptions,g=a.each,z=a.extend,p=a.fireEvent,t=a.hasTouch,e=a.inArray,c=a.isObject,r=a.Legend,v=a.merge,b=a.pick,k=a.Point,n=a.Series,y=a.seriesTypes,u=a.svg,I;I=a.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart.pointer,c=function(a){var c=b.getPointFromEvent(a);if(void 0!==c)c.onMouseOver(a)};g(a.points,function(a){a.graphic&&
(a.graphic.element.point=a);a.dataLabel&&(a.dataLabel.div?a.dataLabel.div.point=a:a.dataLabel.element.point=a)});a._hasTracking||(g(a.trackerGroups,function(e){if(a[e]&&(a[e].addClass("highcharts-tracker").on("mouseover",c).on("mouseout",function(a){b.onTrackerMouseOut(a)}),t))a[e].on("touchstart",c)}),a._hasTracking=!0)},drawTrackerGraph:function(){var a=this,b=a.options.trackByArea,c=[].concat(b?a.areaPath:a.graphPath),e=c.length,f=a.chart,k=f.pointer,d=f.renderer,n=f.options.tooltip.snap,h=a.tracker,
p,r=function(){if(f.hoverSeries!==a)a.onMouseOver()},v="rgba(192,192,192,"+(u?.0001:.002)+")";if(e&&!b)for(p=e+1;p--;)"M"===c[p]&&c.splice(p+1,0,c[p+1]-n,c[p+2],"L"),(p&&"M"===c[p]||p===e)&&c.splice(p,0,"L",c[p-2]+n,c[p-1]);h?h.attr({d:c}):a.graph&&(a.tracker=d.path(c).attr({"stroke-linejoin":"round",visibility:a.visible?"visible":"hidden",stroke:v,fill:b?v:"none","stroke-width":a.graph.strokeWidth()+(b?0:2*n),zIndex:2}).add(a.group),g([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",
r).on("mouseout",function(a){k.onTrackerMouseOut(a)});if(t)a.on("touchstart",r)}))}};y.column&&(y.column.prototype.drawTracker=I.drawTrackerPoint);y.pie&&(y.pie.prototype.drawTracker=I.drawTrackerPoint);y.scatter&&(y.scatter.prototype.drawTracker=I.drawTrackerPoint);z(r.prototype,{setItemEvents:function(a,b,c){var e=this.chart.renderer.boxWrapper,m="highcharts-legend-"+(a.series?"point":"series")+"-active";(c?b:a.legendGroup).on("mouseover",function(){a.setState("hover");e.addClass(m)}).on("mouseout",
function(){e.removeClass(m);a.setState()}).on("click",function(b){var d=function(){a.setVisible&&a.setVisible()};b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,d):p(a,"legendItemClick",b,d)})},createCheckboxForItem:function(a){a.checkbox=D("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container);A(a.checkbox,"click",function(b){p(a.series||a,"checkboxClick",{checked:b.target.checked,item:a},function(){a.select()})})}});
z(B.prototype,{showResetZoom:function(){var a=this,b=q.lang,c=a.options.chart.resetZoomButton,e=c.theme,f=e.states,g="chart"===c.relativeTo?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},e,f&&f.hover).attr({align:c.position.align,title:b.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(c.position,!1,g)},zoomOut:function(){var a=this;p(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var e,m=this.pointer,f=
!1,l;!a||a.resetSelection?g(this.axes,function(a){e=a.zoom()}):g(a.xAxis.concat(a.yAxis),function(a){var d=a.axis;m[d.isXAxis?"zoomX":"zoomY"]&&(e=d.zoom(a.min,a.max),d.displayBtn&&(f=!0))});l=this.resetZoomButton;f&&!l?this.showResetZoom():!f&&c(l)&&(this.resetZoomButton=l.destroy());e&&this.redraw(b(this.options.chart.animation,a&&a.animation,100>this.pointCount))},pan:function(a,b){var c=this,e=c.hoverPoints,f;e&&g(e,function(a){a.setState()});g("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",h=c[d],m=(b.pointRange||0)/2,l=b.getExtremes(),g=b.toValue(h-e,!0)+m,m=b.toValue(h+b.len-e,!0)-m,k=m<g,h=k?m:g,g=k?g:m,m=Math.min(l.dataMin,b.toValue(b.toPixels(l.min)-b.minPixelPadding)),k=Math.max(l.dataMax,b.toValue(b.toPixels(l.max)+b.minPixelPadding)),n;n=m-h;0<n&&(g+=n,h=m);n=g-k;0<n&&(g=k,h-=n);b.series.length&&h!==l.min&&g!==l.max&&(b.setExtremes(h,g,!1,!1,{trigger:"pan"}),f=!0);c[d]=e});f&&c.redraw(!1);E(c.container,{cursor:"move"})}});
z(k.prototype,{select:function(a,c){var m=this,f=m.series,l=f.chart;a=b(a,!m.selected);m.firePointEvent(a?"select":"unselect",{accumulate:c},function(){m.selected=m.options.selected=a;f.options.data[e(m,f.data)]=m.options;m.setState(a&&"select");c||g(l.getSelectedPoints(),function(a){a.selected&&a!==m&&(a.selected=a.options.selected=!1,f.options.data[e(a,f.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");g(a.hoverPoints||[],function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var b=this,c=v(b.series.options.point,b.options).events;b.events=c;a.objectEach(c,function(a,c){A(b,c,a)});this.hasImportedEvents=!0}},setState:function(a,c){var e=Math.floor(this.plotX),g=this.plotY,l=this.series,k=l.options.states[a]||{},d=f[l.type].marker&&l.options.marker,
n=d&&!1===d.enabled,h=d&&d.states&&d.states[a]||{},p=!1===h.enabled,r=l.stateMarkerGraphic,u=this.marker||{},v=l.chart,q=l.halo,t,y=d&&l.markerAttribs;a=a||"";if(!(a===this.state&&!c||this.selected&&"select"!==a||!1===k.enabled||a&&(p||n&&!1===h.enabled)||a&&u.states&&u.states[a]&&!1===u.states[a].enabled)){y&&(t=l.markerAttribs(this,a));if(this.graphic)this.state&&this.graphic.removeClass("highcharts-point-"+this.state),a&&this.graphic.addClass("highcharts-point-"+a),t&&this.graphic.animate(t,b(v.options.chart.animation,
h.animation,d.animation)),r&&r.hide();else{if(a&&h)if(d=u.symbol||l.symbol,r&&r.currentSymbol!==d&&(r=r.destroy()),r)r[c?"animate":"attr"]({x:t.x,y:t.y});else d&&(l.stateMarkerGraphic=r=v.renderer.symbol(d,t.x,t.y,t.width,t.height).add(l.markerGroup),r.currentSymbol=d);r&&(r[a&&v.isInsidePlot(e,g,v.inverted)?"show":"hide"](),r.element.point=this)}(e=k.halo)&&e.size?(q||(l.halo=q=v.renderer.path().add(y?l.markerGroup:l.group)),q[c?"animate":"attr"]({d:this.haloPath(e.size)}),q.attr({"class":"highcharts-halo highcharts-color-"+
b(this.colorIndex,l.colorIndex)}),q.point=this):q&&q.point&&q.point.haloPath&&q.animate({d:q.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)}});z(n.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&p(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,
e=b.hoverPoint;b.hoverSeries=null;if(e)e.onMouseOut();this&&a.events.mouseOut&&p(this,"mouseOut");!c||this.stickyTracking||c.shared&&!this.noSharedTooltip||c.hide();this.setState()},setState:function(a){var b=this;a=a||"";b.state!==a&&(g([b.group,b.markerGroup,b.dataLabelsGroup],function(c){c&&(b.state&&c.removeClass("highcharts-series-"+b.state),a&&c.addClass("highcharts-series-"+a))}),b.state=a)},setVisible:function(a,b){var c=this,e=c.chart,f=c.legendItem,k,d=e.options.chart.ignoreHiddenSeries,
n=c.visible;k=(c.visible=a=c.options.visible=c.userOptions.visible=void 0===a?!n:a)?"show":"hide";g(["group","dataLabelsGroup","markerGroup","tracker","tt"],function(a){if(c[a])c[a][k]()});if(e.hoverSeries===c||(e.hoverPoint&&e.hoverPoint.series)===c)c.onMouseOut();f&&e.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&g(e.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});g(c.linkedSeries,function(d){d.setVisible(a,!1)});d&&(e.isDirtyBox=!0);!1!==b&&e.redraw();p(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);p(this,a?"select":"unselect")},drawTracker:I.drawTrackerGraph})})(K);(function(a){var A=a.Chart,B=a.each,D=a.inArray,E=a.isArray,q=a.isObject,f=a.pick,g=a.splat;A.prototype.setResponsive=function(f){var g=this.options.responsive,q=[],e=this.currentResponsive;g&&g.rules&&B(g.rules,function(c){void 0===c._id&&(c._id=a.uniqueKey());this.matchResponsiveRule(c,q,
f)},this);var c=a.merge.apply(0,a.map(q,function(c){return a.find(g.rules,function(a){return a._id===c}).chartOptions})),q=q.toString()||void 0;q!==(e&&e.ruleIds)&&(e&&this.update(e.undoOptions,f),q?(this.currentResponsive={ruleIds:q,mergedOptions:c,undoOptions:this.currentOptions(c)},this.update(c,f)):this.currentResponsive=void 0)};A.prototype.matchResponsiveRule=function(a,g){var p=a.condition;(p.callback||function(){return this.chartWidth<=f(p.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=f(p.maxHeight,
Number.MAX_VALUE)&&this.chartWidth>=f(p.minWidth,0)&&this.chartHeight>=f(p.minHeight,0)}).call(this)&&g.push(a._id)};A.prototype.currentOptions=function(f){function p(e,c,f,v){var b;a.objectEach(e,function(a,n){if(!v&&-1<D(n,["series","xAxis","yAxis"]))for(e[n]=g(e[n]),f[n]=[],b=0;b<e[n].length;b++)c[n][b]&&(f[n][b]={},p(a[b],c[n][b],f[n][b],v+1));else q(a)?(f[n]=E(a)?[]:{},p(a,c[n]||{},f[n],v+1)):f[n]=c[n]||null})}var t={};p(f,this.options,t,0);return t}})(K);(function(a){var A=a.addEvent,B=a.Axis,
D=a.Chart,E=a.css,q=a.dateFormat,f=a.defined,g=a.each,z=a.extend,p=a.noop,t=a.timeUnits,e=a.wrap;e(a.Series.prototype,"init",function(a){var c;a.apply(this,Array.prototype.slice.call(arguments,1));(c=this.xAxis)&&c.options.ordinal&&A(this,"updatedData",function(){delete c.ordinalIndex})});e(B.prototype,"getTimeTicks",function(a,e,g,b,k,n,p,u){var c=0,r,v,m={},x,l,C,d=[],y=-Number.MAX_VALUE,h=this.options.tickPixelInterval;if(!this.options.ordinal&&!this.options.breaks||!n||3>n.length||void 0===g)return a.call(this,
e,g,b,k);l=n.length;for(r=0;r<l;r++){C=r&&n[r-1]>b;n[r]<g&&(c=r);if(r===l-1||n[r+1]-n[r]>5*p||C){if(n[r]>y){for(v=a.call(this,e,n[c],n[r],k);v.length&&v[0]<=y;)v.shift();v.length&&(y=v[v.length-1]);d=d.concat(v)}c=r+1}if(C)break}a=v.info;if(u&&a.unitRange<=t.hour){r=d.length-1;for(c=1;c<r;c++)q("%d",d[c])!==q("%d",d[c-1])&&(m[d[c]]="day",x=!0);x&&(m[d[0]]="day");a.higherRanks=m}d.info=a;if(u&&f(h)){u=a=d.length;r=[];var w;for(x=[];u--;)c=this.translate(d[u]),w&&(x[u]=w-c),r[u]=w=c;x.sort();x=x[Math.floor(x.length/
2)];x<.6*h&&(x=null);u=d[a-1]>b?a-1:a;for(w=void 0;u--;)c=r[u],b=Math.abs(w-c),w&&b<.8*h&&(null===x||b<.8*x)?(m[d[u]]&&!m[d[u+1]]?(b=u+1,w=c):b=u,d.splice(b,1)):w=c}return d});z(B.prototype,{beforeSetTickPositions:function(){var a,e=[],f=!1,b,k=this.getExtremes(),n=k.min,p=k.max,u,q=this.isXAxis&&!!this.options.breaks,k=this.options.ordinal,t=this.chart.options.chart.ignoreHiddenSeries;if(k||q){g(this.series,function(b,c){if(!(t&&!1===b.visible||!1===b.takeOrdinalPosition&&!q)&&(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(2<a){b=e[1]-e[0];for(u=a-1;u--&&!f;)e[u+1]-e[u]!==b&&(f=!0);!this.options.keepOrdinalPadding&&(e[0]-n>b||p-e[e.length-1]>b)&&(f=!0)}f?(this.ordinalPositions=e,b=this.ordinal2lin(Math.max(n,e[0]),!0),u=Math.max(this.ordinal2lin(Math.min(p,e[e.length-1]),!0),1),this.ordinalSlope=p=(p-n)/(u-b),this.ordinalOffset=n-b*p):this.ordinalPositions=this.ordinalSlope=this.ordinalOffset=void 0}this.isOrdinal=
k&&f;this.groupIntervalFactor=null},val2lin:function(a,e){var c=this.ordinalPositions;if(c){var b=c.length,f,g;for(f=b;f--;)if(c[f]===a){g=f;break}for(f=b-1;f--;)if(a>c[f]||0===f){a=(a-c[f])/(c[f+1]-c[f]);g=f+a;break}e=e?g:this.ordinalSlope*(g||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,g=c.length-1,p;if(e)0>a?a=c[0]:a>g?a=c[g]:(g=Math.floor(a),p=a-g);else for(;g--;)if(e=b*g+f,a>=e){b=b*(g+1)+f;p=(a-
e)/(b-e);break}return void 0!==p&&void 0!==c[g]?c[g]+(p?p*(c[g+1]-c[g]):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",k=this.getExtremes(),n,q;f||(f=this.ordinalIndex={});f[b]||(n={series:[],chart:a,getExtremes:function(){return{min:k.dataMin,max:k.dataMax}},options:{ordinal:!0},val2lin:B.prototype.val2lin,ordinal2lin:B.prototype.ordinal2lin},g(this.series,function(b){q={xAxis:n,xData:b.xData,chart:a,
destroyGroupedData:p};q.options={dataGrouping:e?{enabled:!0,forced:!0,approximation:"open",units:[[e.unitName,[e.count]]]}:{enabled:!1}};b.processData.apply(q);n.series.push(q)}),this.beforeSetTickPositions.apply(n),f[b]=n.ordinalPositions);return f[b]},getGroupIntervalFactor:function(a,e,f){var b;f=f.processedXData;var c=f.length,g=[];b=this.groupIntervalFactor;if(!b){for(b=0;b<c-1;b++)g[b]=f[b+1]-f[b];g.sort(function(a,b){return a-b});g=g[Math.floor(c/2)];a=Math.max(a,f[0]);e=Math.min(e,f[c-1]);
this.groupIntervalFactor=b=c*g/(e-a)}return b},postProcessTickInterval:function(a){var c=this.ordinalSlope;return c?this.options.breaks?this.closestPointRange:a/(c/this.closestPointRange):a}});B.prototype.ordinal2lin=B.prototype.val2lin;e(D.prototype,"pan",function(a,e){var c=this.xAxis[0],b=e.chartX,f=!1;if(c.options.ordinal&&c.series.length){var n=this.mouseDownX,p=c.getExtremes(),u=p.dataMax,r=p.min,q=p.max,t=this.hoverPoints,m=c.closestPointRange,n=(n-b)/(c.translationSlope*(c.ordinalSlope||m)),
x={ordinalPositions:c.getExtendedPositions()},m=c.lin2val,l=c.val2lin,C;x.ordinalPositions?1<Math.abs(n)&&(t&&g(t,function(a){a.setState()}),0>n?(t=x,C=c.ordinalPositions?c:x):(t=c.ordinalPositions?c:x,C=x),x=C.ordinalPositions,u>x[x.length-1]&&x.push(u),this.fixedRange=q-r,n=c.toFixedRange(null,null,m.apply(t,[l.apply(t,[r,!0])+n,!0]),m.apply(C,[l.apply(C,[q,!0])+n,!0])),n.min>=Math.min(p.dataMin,r)&&n.max<=Math.max(u,q)&&c.setExtremes(n.min,n.max,!0,!1,{trigger:"pan"}),this.mouseDownX=b,E(this.container,
{cursor:"move"})):f=!0}else f=!0;f&&a.apply(this,Array.prototype.slice.call(arguments,1))})})(K);(function(a){function A(){return Array.prototype.slice.call(arguments,1)}function B(a){a.apply(this);this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,D(this.pointArrayMap,["y"]))}var D=a.pick,E=a.wrap,q=a.each,f=a.extend,g=a.isArray,z=a.fireEvent,p=a.Axis,t=a.Series;f(p.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<b&&0!==c},isInAnyBreak:function(a,c){var e=this.options.breaks,f=e&&e.length,b,g,n;if(f){for(;f--;)this.isInBreak(e[f],a)&&(b=!0,g||(g=D(e[f].showPoints,this.isXAxis?!1:!0)));n=b&&c?b&&!g:b}return n}});E(p.prototype,"setTickPositions",function(a){a.apply(this,Array.prototype.slice.call(arguments,1));if(this.options.breaks){var c=this.tickPositions,e=this.tickPositions.info,f=[],b;for(b=0;b<c.length;b++)this.isInAnyBreak(c[b])||f.push(c[b]);this.tickPositions=f;this.tickPositions.info=e}});
E(p.prototype,"init",function(a,c,f){var e=this;f.breaks&&f.breaks.length&&(f.ordinal=!1);a.call(this,c,f);a=this.options.breaks;e.isBroken=g(a)&&!!a.length;e.isBroken&&(e.val2lin=function(a){var b=a,c,f;for(f=0;f<e.breakArray.length;f++)if(c=e.breakArray[f],c.to<=a)b-=c.len;else if(c.from>=a)break;else if(e.isInBreak(c,a)){b-=a-c.from;break}return b},e.lin2val=function(a){var b,c;for(c=0;c<e.breakArray.length&&!(b=e.breakArray[c],b.from>=a);c++)b.to<a?a+=b.len:e.isInBreak(b,a)&&(a+=b.len);return a},
e.setExtremes=function(a,c,e,f,g){for(;this.isInAnyBreak(a);)a-=this.closestPointRange;for(;this.isInAnyBreak(c);)c-=this.closestPointRange;p.prototype.setExtremes.call(this,a,c,e,f,g)},e.setAxisTranslation=function(a){p.prototype.setAxisTranslation.call(this,a);a=e.options.breaks;var b=[],c=[],f=0,g,r,t=e.userMin||e.min,v=e.userMax||e.max,m=D(e.pointRangePadding,0),x,l;q(a,function(a){r=a.repeat||Infinity;e.isInBreak(a,t)&&(t+=a.to%r-t%r);e.isInBreak(a,v)&&(v-=v%r-a.from%r)});q(a,function(a){x=a.from;
for(r=a.repeat||Infinity;x-r>t;)x-=r;for(;x<t;)x+=r;for(l=x;l<v;l+=r)b.push({value:l,move:"in"}),b.push({value:l+(a.to-a.from),move:"out",size:a.breakSize})});b.sort(function(a,d){return a.value===d.value?("in"===a.move?0:1)-("in"===d.move?0:1):a.value-d.value});g=0;x=t;q(b,function(a){g+="in"===a.move?1:-1;1===g&&"in"===a.move&&(x=a.value);0===g&&(c.push({from:x,to:a.value,len:a.value-x-(a.size||0)}),f+=a.value-x-(a.size||0))});e.breakArray=c;e.unitLength=v-t-f+m;z(e,"afterBreaks");e.options.staticScale?
e.transA=e.options.staticScale:e.unitLength&&(e.transA*=(v-e.min+m)/e.unitLength);m&&(e.minPixelPadding=e.transA*e.minPointOffset);e.min=t;e.max=v})});E(t.prototype,"generatePoints",function(a){a.apply(this,A(arguments));var c=this.xAxis,e=this.yAxis,f=this.points,b,g=f.length,n=this.options.connectNulls,p;if(c&&e&&(c.options.breaks||e.options.breaks))for(;g--;)b=f[g],p=null===b.y&&!1===n,p||!c.isInAnyBreak(b.x,!0)&&!e.isInAnyBreak(b.y,!0)||(f.splice(g,1),this.data[g]&&this.data[g].destroyElements())});
a.Series.prototype.drawBreaks=function(a,c){var e=this,f=e.points,b,g,n,p;a&&q(c,function(c){b=a.breakArray||[];g=a.isXAxis?a.min:D(e.options.threshold,a.min);q(f,function(e){p=D(e["stack"+c.toUpperCase()],e[c]);q(b,function(b){n=!1;if(g<b.from&&p>b.to||g>b.from&&p<b.from)n="pointBreak";else if(g<b.from&&p>b.from&&p<b.to||g>b.from&&p>b.to&&p<b.from)n="pointInBreak";n&&z(a,n,{point:e,brk:b})})})})};a.Series.prototype.gappedPath=function(){var a=this.options.gapSize,c=this.points.slice(),f=c.length-
1;if(a&&0<f)for(;f--;)c[f+1].x-c[f].x>this.closestPointRange*a&&c.splice(f+1,0,{isNull:!0});return this.getGraphPath(c)};E(a.seriesTypes.column.prototype,"drawPoints",B);E(a.Series.prototype,"drawPoints",B)})(K);(function(a){var A=a.arrayMax,B=a.arrayMin,D=a.Axis,E=a.defaultPlotOptions,q=a.defined,f=a.each,g=a.extend,z=a.format,p=a.isNumber,t=a.merge,e=a.pick,c=a.Point,r=a.Tooltip,v=a.wrap,b=a.Series.prototype,k=b.processData,n=b.generatePoints,y=b.destroy,u={approximation:"average",groupPixelWidth:2,
dateTimeLabelFormats:{millisecond:["%A, %b %e, %H:%M:%S.%L","%A, %b %e, %H:%M:%S.%L","-%H:%M:%S.%L"],second:["%A, %b %e, %H:%M:%S","%A, %b %e, %H:%M:%S","-%H:%M:%S"],minute:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],hour:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],day:["%A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],week:["Week from %A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],month:["%B %Y","%B","-%B %Y"],year:["%Y","%Y","-%Y"]}},I={line:{},spline:{},area:{},areaspline:{},column:{approximation:"sum",
groupPixelWidth:10},arearange:{approximation:"range"},areasplinerange:{approximation:"range"},columnrange:{approximation:"range",groupPixelWidth:10},candlestick:{approximation:"ohlc",groupPixelWidth:10},ohlc:{approximation:"ohlc",groupPixelWidth:5}},G=a.defaultDataGroupingUnits=[["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]],["week",[1]],["month",[1,3,6]],["year",null]],F={sum:function(a){var b=a.length,
c;if(!b&&a.hasNulls)c=null;else if(b)for(c=0;b--;)c+=a[b];return c},average:function(a){var b=a.length;a=F.sum(a);p(a)&&b&&(a/=b);return a},averages:function(){var a=[];f(arguments,function(b){a.push(F.average(b))});return a},open:function(a){return a.length?a[0]:a.hasNulls?null:void 0},high:function(a){return a.length?A(a):a.hasNulls?null:void 0},low:function(a){return a.length?B(a):a.hasNulls?null:void 0},close:function(a){return a.length?a[a.length-1]:a.hasNulls?null:void 0},ohlc:function(a,b,
c,e){a=F.open(a);b=F.high(b);c=F.low(c);e=F.close(e);if(p(a)||p(b)||p(c)||p(e))return[a,b,c,e]},range:function(a,b){a=F.low(a);b=F.high(b);if(p(a)||p(b))return[a,b]}};b.groupData=function(a,b,c,e){var d=this.data,g=this.options.data,h=[],m=[],l=[],k=a.length,n,x,r=!!b,q=[];e="function"===typeof e?e:F[e]||I[this.type]&&F[I[this.type].approximation]||F[u.approximation];var t=this.pointArrayMap,v=t&&t.length,C=0;x=0;var y,z;v?f(t,function(){q.push([])}):q.push([]);y=v||1;for(z=0;z<=k&&!(a[z]>=c[0]);z++);
for(z;z<=k;z++){for(;void 0!==c[C+1]&&a[z]>=c[C+1]||z===k;){n=c[C];this.dataGroupInfo={start:x,length:q[0].length};x=e.apply(this,q);void 0!==x&&(h.push(n),m.push(x),l.push(this.dataGroupInfo));x=z;for(n=0;n<y;n++)q[n].length=0,q[n].hasNulls=!1;C+=1;if(z===k)break}if(z===k)break;if(t){n=this.cropStart+z;var B=d&&d[n]||this.pointClass.prototype.applyOptions.apply({series:this},[g[n]]),A;for(n=0;n<v;n++)A=B[t[n]],p(A)?q[n].push(A):null===A&&(q[n].hasNulls=!0)}else n=r?b[z]:null,p(n)?q[0].push(n):null===
n&&(q[0].hasNulls=!0)}return[h,m,l]};b.processData=function(){var a=this.chart,c=this.options.dataGrouping,f=!1!==this.allowDG&&c&&e(c.enabled,a.options.isStock),g=this.visible||!a.options.chart.ignoreHiddenSeries,d;this.forceCrop=f;this.groupPixelWidth=null;this.hasProcessed=!0;if(!1!==k.apply(this,arguments)&&f){this.destroyGroupedData();var n=this.processedXData,h=this.processedYData,p=a.plotSizeX,a=this.xAxis,u=a.options.ordinal,r=this.groupPixelWidth=a.getGroupPixelWidth&&a.getGroupPixelWidth();
if(r){this.isDirty=d=!0;var t=a.getExtremes(),f=t.min,t=t.max,u=u&&a.getGroupIntervalFactor(f,t,this)||1,p=r*(t-f)/p*u,r=a.getTimeTicks(a.normalizeTimeTickInterval(p,c.units||G),Math.min(f,n[0]),Math.max(t,n[n.length-1]),a.options.startOfWeek,n,this.closestPointRange),n=b.groupData.apply(this,[n,h,r,c.approximation]),h=n[0],u=n[1];if(c.smoothed){c=h.length-1;for(h[c]=Math.min(h[c],t);c--&&0<c;)h[c]+=p/2;h[0]=Math.max(h[0],f)}this.currentDataGrouping=r.info;this.closestPointRange=r.info.totalRange;
this.groupMap=n[2];q(h[0])&&h[0]<a.dataMin&&g&&(a.min===a.dataMin&&(a.min=h[0]),a.dataMin=h[0]);this.processedXData=h;this.processedYData=u}else this.currentDataGrouping=this.groupMap=null;this.hasGroupedData=d}};b.destroyGroupedData=function(){var a=this.groupedData;f(a||[],function(b,c){b&&(a[c]=b.destroy?b.destroy():null)});this.groupedData=null};b.generatePoints=function(){n.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};v(c.prototype,"update",function(b){this.dataGroup?
a.error(24):b.apply(this,[].slice.call(arguments,1))});v(r.prototype,"tooltipFooterHeaderFormatter",function(b,c,e){var f=c.series,d=f.tooltipOptions,l=f.options.dataGrouping,h=d.xDateFormat,m,k=f.xAxis,n=a.dateFormat;return k&&"datetime"===k.options.type&&l&&p(c.key)?(b=f.currentDataGrouping,l=l.dateTimeLabelFormats,b?(k=l[b.unitName],1===b.count?h=k[0]:(h=k[1],m=k[2])):!h&&l&&(h=this.getXDateFormat(c,d,k)),h=n(h,c.key),m&&(h+=n(m,c.key+b.totalRange-1)),z(d[(e?"footer":"header")+"Format"],{point:g(c.point,
{key:h}),series:f})):b.call(this,c,e)});b.destroy=function(){for(var a=this.groupedData||[],b=a.length;b--;)a[b]&&a[b].destroy();y.apply(this)};v(b,"setOptions",function(a,b){a=a.call(this,b);var c=this.type,e=this.chart.options.plotOptions,d=E[c].dataGrouping;I[c]&&(d||(d=t(u,I[c])),a.dataGrouping=t(d,e.series&&e.series.dataGrouping,e[c].dataGrouping,b.dataGrouping));this.chart.options.isStock&&(this.requireSorting=!0);return a});v(D.prototype,"setScale",function(a){a.call(this);f(this.series,function(a){a.hasProcessed=
!1})});D.prototype.getGroupPixelWidth=function(){var a=this.series,b=a.length,c,e=0,d=!1,f;for(c=b;c--;)(f=a[c].options.dataGrouping)&&(e=Math.max(e,f.groupPixelWidth));for(c=b;c--;)(f=a[c].options.dataGrouping)&&a[c].hasProcessed&&(b=(a[c].processedXData||a[c].data).length,a[c].groupPixelWidth||b>this.chart.plotSizeX/e||b&&f.forced)&&(d=!0);return d?e:0};D.prototype.setDataGrouping=function(a,b){var c;b=e(b,!0);a||(a={forced:!1,units:null});if(this instanceof D)for(c=this.series.length;c--;)this.series[c].update({dataGrouping:a},
!1);else f(this.chart.options.series,function(b){b.dataGrouping=a},!1);b&&this.chart.redraw()}})(K);(function(a){var A=a.each,B=a.Point,D=a.seriesType,E=a.seriesTypes;D("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'\x3cspan class\x3d"highcharts-color-{point.colorIndex}"\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},{directTouch:!1,pointArrayMap:["open",
"high","low","close"],toYData:function(a){return[a.open,a.high,a.low,a.close]},pointValKey:"close",translate:function(){var a=this,f=a.yAxis,g=!!a.modifyValue,z=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];E.column.prototype.translate.apply(a);A(a.points,function(p){A([p.open,p.high,p.low,p.close,p.low],function(q,e){null!==q&&(g&&(q=a.modifyValue(q)),p[z[e]]=f.toPixels(q,!0))});p.tooltipPos[1]=p.plotHigh+f.pos-a.chart.plotTop})},drawPoints:function(){var a=this,f=a.chart;A(a.points,function(g){var q,
p,t,e,c=g.graphic,r,v=!c;void 0!==g.plotY&&(c||(g.graphic=c=f.renderer.path().add(a.group)),p=c.strokeWidth()%2/2,r=Math.round(g.plotX)-p,t=Math.round(g.shapeArgs.width/2),e=["M",r,Math.round(g.yBottom),"L",r,Math.round(g.plotHigh)],null!==g.open&&(q=Math.round(g.plotOpen)+p,e.push("M",r,q,"L",r-t,q)),null!==g.close&&(q=Math.round(g.plotClose)+p,e.push("M",r,q,"L",r+t,q)),c[v?"attr":"animate"]({d:e}).addClass(g.getClassName(),!0))})},animate:null},{getClassName:function(){return B.prototype.getClassName.call(this)+
(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}})})(K);(function(a){var A=a.defaultPlotOptions,B=a.each,D=a.merge;a=a.seriesType;a("candlestick","ohlc",D(A.column,{states:{hover:{lineWidth:2}},tooltip:A.ohlc.tooltip,threshold:null}),{drawPoints:function(){var a=this,q=a.chart;B(a.points,function(f){var g=f.graphic,z,p,t,e,c,r,v,b=!g;void 0!==f.plotY&&(g||(f.graphic=g=q.renderer.path().add(a.group)),c=g.strokeWidth()%2/2,r=Math.round(f.plotX)-c,z=f.plotOpen,p=f.plotClose,t=
Math.min(z,p),z=Math.max(z,p),v=Math.round(f.shapeArgs.width/2),p=Math.round(t)!==Math.round(f.plotHigh),e=z!==f.yBottom,t=Math.round(t)+c,z=Math.round(z)+c,c=[],c.push("M",r-v,z,"L",r-v,t,"L",r+v,t,"L",r+v,z,"Z","M",r,t,"L",r,p?Math.round(f.plotHigh):t,"M",r,z,"L",r,e?Math.round(f.yBottom):z),g[b?"attr":"animate"]({d:c}).addClass(f.getClassName(),!0))})}})})(K);(function(a){var A=a.addEvent,B=a.each,D=a.noop,E=a.seriesType,q=a.seriesTypes,f=a.TrackerMixin,g=a.SVGRenderer.prototype.symbols,z=a.stableSort;
E("flags","column",{pointRange:0,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}\x3cbr/\x3e"},threshold:null,y:-30},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:a.Series.prototype.init,translate:function(){q.column.prototype.translate.apply(this);var a=this.options,f=this.chart,e=this.points,c=e.length-1,g,v,b=a.onSeries;g=b&&f.get(b);var a=a.onKey||"y",b=g&&g.options.step,k=g&&g.points,n=k&&k.length,
y=this.xAxis,u=this.yAxis,I=y.getExtremes(),A=0,F,m,x;if(g&&g.visible&&n)for(A=(g.pointXOffset||0)+(g.barW||0)/2,g=g.currentDataGrouping,m=k[n-1].x+(g?g.totalRange:0),z(e,function(a,b){return a.x-b.x}),a="plot"+a[0].toUpperCase()+a.substr(1);n--&&e[c]&&!(g=e[c],F=k[n],F.x<=g.x&&void 0!==F[a]&&(g.x<=m&&(g.plotY=F[a],F.x<g.x&&!b&&(x=k[n+1])&&void 0!==x[a]&&(g.plotY+=(g.x-F.x)/(x.x-F.x)*(x[a]-F[a]))),c--,n++,0>c)););B(e,function(a,b){var d;void 0===a.plotY&&(a.x>=I.min&&a.x<=I.max?a.plotY=f.chartHeight-
y.bottom-(y.opposite?y.height:0)+y.offset-u.top:a.shapeArgs={});a.plotX+=A;(v=e[b-1])&&v.plotX===a.plotX&&(void 0===v.stackIndex&&(v.stackIndex=0),d=v.stackIndex+1);a.stackIndex=d})},drawPoints:function(){var f=this.points,g=this.chart,e=g.renderer,c,r,q=this.options,b=q.y,k,n,y,u,z,B,A,m=this.yAxis;for(n=f.length;n--;)y=f[n],A=y.plotX>this.xAxis.len,c=y.plotX,u=y.stackIndex,k=y.options.shape||q.shape,r=y.plotY,void 0!==r&&(r=y.plotY+b-(void 0!==u&&u*q.stackDistance)),z=u?void 0:y.plotX,B=u?void 0:
y.plotY,u=y.graphic,void 0!==r&&0<=c&&!A?(u||(u=y.graphic=e.label("",null,null,k,null,null,q.useHTML).attr({align:"flag"===k?"left":"center",width:q.width,height:q.height,"text-align":q.textAlign}).addClass("highcharts-point").add(this.markerGroup),y.graphic.div&&(y.graphic.div.point=y)),0<c&&(c-=u.strokeWidth()%2),u.attr({text:y.options.title||q.title||"A",x:c,y:r,anchorX:z,anchorY:B}),y.tooltipPos=g.inverted?[m.len+m.pos-g.plotLeft-r,this.xAxis.len-c]:[c,r+m.pos-g.plotTop]):u&&(y.graphic=u.destroy());
q.useHTML&&a.wrap(this.markerGroup,"on",function(b){return a.SVGElement.prototype.on.apply(b.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})},drawTracker:function(){var a=this.points;f.drawTrackerPoint.apply(this);B(a,function(f){var e=f.graphic;e&&A(e.element,"mouseover",function(){0<f.stackIndex&&!f.raised&&(f._y=e.y,e.attr({y:f._y-8}),f.raised=!0);B(a,function(a){a!==f&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:D,buildKDTree:D,setClip:D});g.flag=
function(a,f,e,c,g){return["M",g&&g.anchorX||a,g&&g.anchorY||f,"L",a,f+c,a,f,a+e,f,a+e,f+c,a,f+c,"Z"]};B(["circle","square"],function(a){g[a+"pin"]=function(f,e,c,p,q){var b=q&&q.anchorX;q=q&&q.anchorY;"circle"===a&&p>c&&(f-=Math.round((p-c)/2),c=p);f=g[a](f,e,c,p);b&&q&&f.push("M",b,e>q?e:e+p,"L",b,q);return f}})})(K);(function(a){function A(a,b,c){this.init(a,b,c)}var B=a.addEvent,D=a.Axis,E=a.correctFloat,q=a.defaultOptions,f=a.defined,g=a.destroyObjectProperties,z=a.doc,p=a.each,t=a.fireEvent,
e=a.hasTouch,c=a.isTouchDevice,r=a.merge,v=a.pick,b=a.removeEvent,k=a.wrap,n,y={height:c?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:a.svg&&!c,margin:10,minWidth:6,step:.2,zIndex:3};q.scrollbar=r(!0,y,q.scrollbar);a.swapXY=n=function(a,b){var c=a.length,e;if(b)for(b=0;b<c;b+=3)e=a[b+1],a[b+1]=a[b+2],a[b+2]=e;return a};A.prototype={init:function(a,b,c){this.scrollbarButtons=[];this.renderer=a;this.userOptions=b;this.options=r(y,b);this.chart=c;this.size=v(this.options.size,this.options.height);
b.enabled&&(this.render(),this.initEvents(),this.addEvents())},render:function(){var a=this.renderer,b=this.options,c=this.size,e;this.group=e=a.g("scrollbar").attr({zIndex:b.zIndex,translateY:-99999}).add();this.track=a.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:b.trackBorderRadius||0,height:c,width:c}).add(e);this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=a.g().add(e);this.scrollbar=a.rect().addClass("highcharts-scrollbar-thumb").attr({height:c,
width:c,r:b.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=a.path(n(["M",-3,c/4,"L",-3,2*c/3,"M",0,c/4,"L",0,2*c/3,"M",3,c/4,"L",3,2*c/3],b.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)},position:function(a,b,c,e){var f=this.options.vertical,g=0,l=
this.rendered?"animate":"attr";this.x=a;this.y=b+this.trackBorderWidth;this.width=c;this.xOffset=this.height=e;this.yOffset=g;f?(this.width=this.yOffset=c=g=this.size,this.xOffset=b=0,this.barWidth=e-2*c,this.x=a+=this.options.margin):(this.height=this.xOffset=e=b=this.size,this.barWidth=c-2*e,this.y+=this.options.margin);this.group[l]({translateX:a,translateY:this.y});this.track[l]({width:c,height:e});this.scrollbarButtons[1][l]({translateX:f?0:c-b,translateY:f?e-g:0})},drawScrollbarButton:function(a){var b=
this.renderer,c=this.scrollbarButtons,e=this.options,f=this.size,g;g=b.g().add(this.group);c.push(g);g=b.rect().addClass("highcharts-scrollbar-button").add(g);g.attr(g.crisp({x:-.5,y:-.5,width:f+1,height:f+1,r:e.buttonBorderRadius},g.strokeWidth()));b.path(n(["M",f/2+(a?-1:1),f/2-3,"L",f/2+(a?-1:1),f/2+3,"L",f/2+(a?2:-2),f/2],e.vertical)).addClass("highcharts-scrollbar-arrow").add(c[a])},setRange:function(a,b){var c=this.options,e=c.vertical,g=c.minWidth,k=this.barWidth,l,n,d=this.rendered&&!this.hasDragged?
"animate":"attr";f(k)&&(a=Math.max(a,0),l=Math.ceil(k*a),this.calculatedWidth=n=E(k*Math.min(b,1)-l),n<g&&(l=(k-g+n)*a,n=g),g=Math.floor(l+this.xOffset+this.yOffset),k=n/2-.5,this.from=a,this.to=b,e?(this.scrollbarGroup[d]({translateY:g}),this.scrollbar[d]({height:n}),this.scrollbarRifles[d]({translateY:k}),this.scrollbarTop=g,this.scrollbarLeft=0):(this.scrollbarGroup[d]({translateX:g}),this.scrollbar[d]({width:n}),this.scrollbarRifles[d]({translateX:k}),this.scrollbarLeft=g,this.scrollbarTop=0),
12>=n?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",f=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(f[0]+e,f[1]+e),a.hasDragged&&t(a,"changed",{from:a.from,to:a.to,
trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};a.mouseUpHandler=function(b){a.hasDragged&&t(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=E(a.to-a.from)*a.options.step;a.updatePosition(E(a.from-
c),E(a.to-c));t(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);t(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,f=a.y+a.scrollbarTop,g=a.x+a.scrollbarLeft;a.options.vertical&&c.chartY>f||!a.options.vertical&&c.chartX>g?a.updatePosition(a.from+e,a.to+e):a.updatePosition(a.from-e,a.to-e);
t(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){1<b&&(a=E(1-E(b-a)),b=1);0>a&&(b=E(b-a),a=0);this.from=a;this.to=b},update:function(a){this.destroy();this.init(this.chart.renderer,r(!0,this.options,a),this.chart)},addEvents:function(){var a=
this.options.inverted?[1,0]:[0,1],b=this.scrollbarButtons,c=this.scrollbarGroup.element,f=this.mouseDownHandler,g=this.mouseMoveHandler,k=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",f],[z,"mousemove",g],[z,"mouseup",k]];e&&a.push([c,"touchstart",f],[z,"touchmove",g],[z,"touchend",k]);p(a,function(a){B.apply(null,a)});this._events=a},removeEvents:function(){p(this._events,
function(a){b.apply(null,a)});this._events.length=0},destroy:function(){var a=this.chart.scroller;this.removeEvents();p(["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,g(a.scrollbarButtons))}};k(D.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 A(b.chart.renderer,b.options.scrollbar,b.chart),B(b.scrollbar,"changed",function(a){var c=Math.min(v(b.options.min,b.min),b.min,b.dataMin),e=Math.max(v(b.options.max,b.max),b.max,b.dataMax)-c,f;b.horiz&&!b.reversed||!b.horiz&&b.reversed?(f=c+e*this.to,c+=e*this.from):(f=c+e*(1-this.from),c+=e*(1-this.to));b.setExtremes(c,f,!0,!1,a)}))});k(D.prototype,"render",function(a){var b=Math.min(v(this.options.min,this.min),this.min,this.dataMin),
c=Math.max(v(this.options.max,this.max),this.max,this.dataMax),e=this.scrollbar,g=this.titleOffset||0;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:g+this.axisTitleMargin+this.offset),this.width,this.height),g=1):(e.position(this.left+this.width+2+this.chart.scrollbarsOffsets[0]+(this.opposite?g+this.axisTitleMargin+this.offset:0),this.top,this.width,this.height),g=0);if(!this.opposite&&
!this.horiz||this.opposite&&this.horiz)this.chart.scrollbarsOffsets[g]+=this.scrollbar.size+this.scrollbar.options.margin;isNaN(b)||isNaN(c)||!f(this.min)||!f(this.max)?e.setRange(0,0):(g=(this.min-b)/(c-b),b=(this.max-b)/(c-b),this.horiz&&!this.reversed||!this.horiz&&this.reversed?e.setRange(g,b):e.setRange(1-b,1-g))}});k(D.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)});k(D.prototype,"destroy",function(a){this.scrollbar&&(this.scrollbar=this.scrollbar.destroy());a.apply(this,Array.prototype.slice.call(arguments,1))});a.Scrollbar=A})(K);(function(a){function A(a){this.init(a)}var B=a.addEvent,D=a.Axis,E=a.Chart,q=a.defaultOptions,f=a.defined,g=a.destroyObjectProperties,z=a.doc,p=a.each,t=a.erase,e=a.error,c=a.extend,r=a.grep,v=a.hasTouch,b=a.isNumber,k=a.isObject,n=a.merge,y=a.pick,u=a.removeEvent,I=a.Scrollbar,G=a.Series,F=a.seriesTypes,
m=a.wrap,x=a.swapXY,l=[].concat(a.defaultDataGroupingUnits),C=function(a){var d=r(arguments,b);if(d.length)return Math[a].apply(0,d)};l[4]=["day",[1,2,3,4]];l[5]=["week",[1,2,3]];c(q,{navigator:{height:40,margin:25,maskInside:!0,series:{type:void 0===F.areaspline?"line":"areaspline",compare:null,dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,smoothed:!0,units:l},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,tickPixelInterval:200,labels:{align:"left",x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});A.prototype={drawHandle:function(a,b,c,e){this.handles[b][e](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 x(["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,e){var d=this.navigatorOptions.maskInside,h=this.outline.strokeWidth(),f=h/2,h=h%2/2,g=this.outlineHeight,l=this.scrollbarHeight,m=this.size,k=this.left-l,n=this.top;c?(k-=f,c=n+b+h,b=n+a+h,a=["M",k+g,n-l-h,"L",
k+g,c,"L",k,c,"L",k,b,"L",k+g,b,"L",k+g,n+m+l].concat(d?["M",k+g,c-f,"L",k+g,b+f]:[])):(a+=k+l-h,b+=k+l-h,n+=f,a=["M",k,n,"L",a,n,"L",a,n+g,"L",b,n+g,"L",b,n,"L",k+m+2*l,n].concat(d?["M",a-f,n,"L",b+f,n]:[]));this.outline[e]({d:a})},drawMasks:function(a,b,c,e){var d=this.left,h=this.top,f=this.height,g,l,m,k;c?(m=[d,d,d],k=[h,h+a,h+b],l=[f,f,f],g=[a,b-a,this.size-b]):(m=[d,d+a,d+b],k=[h,h,h],l=[a,b-a,this.size-b],g=[f,f,f]);p(this.shades,function(a,b){a[e]({x:m[b],y:k[b],width:l[b],height:g[b]})})},
renderElements:function(){var a=this,b=a.navigatorOptions.maskInside,c=a.chart,e=c.inverted,f=c.renderer,g;a.navigatorGroup=g=f.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();p([!b,b,!b],function(b,c){a.shades[c]=f.rect().addClass("highcharts-navigator-mask"+(1===c?"-inside":"-outside")).add(g)});a.outline=f.path().addClass("highcharts-navigator-outline").add(g);p([0,1],function(b){a.handles[b]=f.path(a.getHandlePath(e)).attr({zIndex:7-b}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+
["left","right"][b]).add(g)})},update:function(a){this.destroy();n(!0,this.chart.options.navigator,this.options,a);this.init(this.chart)},render:function(a,c,e,g){var d=this.chart,h,l,m=this.scrollbarHeight,k,n=this.xAxis;h=n.fake?d.xAxis[0]:n;var p=this.navigatorEnabled,q,w=this.rendered;l=d.inverted;var r=d.xAxis[0].minRange;if(!this.hasDragged||f(e)){if(!b(a)||!b(c))if(w)e=0,g=n.width;else return;this.left=y(n.left,d.plotLeft+m+(l?d.plotWidth:0));this.size=q=k=y(n.len,(l?d.plotHeight:d.plotWidth)-
2*m);d=l?m:k+2*m;e=y(e,n.toPixels(a,!0));g=y(g,n.toPixels(c,!0));b(e)&&Infinity!==Math.abs(e)||(e=0,g=d);a=n.toValue(e,!0);c=n.toValue(g,!0);if(Math.abs(c-a)<r)if(this.grabbedLeft)e=n.toPixels(c-r,!0);else if(this.grabbedRight)g=n.toPixels(a+r,!0);else return;this.zoomedMax=Math.min(Math.max(e,g,0),q);this.zoomedMin=Math.min(Math.max(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(e,g),0),q);this.range=this.zoomedMax-this.zoomedMin;q=Math.round(this.zoomedMax);e=Math.round(this.zoomedMin);
p&&(this.navigatorGroup.attr({visibility:"visible"}),w=w&&!this.hasDragged?"animate":"attr",this.drawMasks(e,q,l,w),this.drawOutline(e,q,l,w),this.drawHandle(e,0,l,w),this.drawHandle(q,1,l,w));this.scrollbar&&(l?(l=this.top-m,h=this.left-m+(p?0:(h.titleOffset||0)+h.axisTitleMargin),m=k+2*m):(l=this.top+(p?this.height:-m),h=this.left-m),this.scrollbar.position(h,l,d,m),this.scrollbar.setRange(this.zoomedMin/k,this.zoomedMax/k));this.rendered=!0}},addMouseEvents:function(){var a=this,b=a.chart,c=b.container,
e=[],f,g;a.mouseMoveHandler=f=function(b){a.onMouseMove(b)};a.mouseUpHandler=g=function(b){a.onMouseUp(b)};e=a.getPartsEvents("mousedown");e.push(B(c,"mousemove",f),B(z,"mouseup",g));v&&(e.push(B(c,"touchmove",f),B(z,"touchend",g)),e.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=e;a.series&&a.series[0]&&e.push(B(a.series[0].xAxis,"foundExtremes",function(){b.navigator.modifyNavigatorAxisExtremes()}))},getPartsEvents:function(a){var b=this,c=[];p(["shades","handles"],function(d){p(b[d],
function(e,h){c.push(B(e.element,a,function(a){b[d+"Mousedown"](a,h)}))})});return c},shadesMousedown:function(a,b){a=this.chart.pointer.normalize(a);var c=this.chart,d=this.xAxis,e=this.zoomedMin,f=this.left,g=this.size,l=this.range,m=a.chartX,k;c.inverted&&(m=a.chartY,f=this.top);1===b?(this.grabbedCenter=m,this.fixedWidth=l,this.dragOffset=m-e):(a=m-f-l/2,0===b?a=Math.max(0,a):2===b&&a+l>=g&&(a=g-l,k=this.getUnionExtremes().dataMax),a!==e&&(this.fixedWidth=l,b=d.toFixedRange(a,a+l,null,k),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,g=b.dragOffset,
l=c.inverted;a.touches&&0===a.touches[0].pageX||(a=c.pointer.normalize(a),c=a.chartX,l&&(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,c<g?c=g:c>e+g-f&&(c=e+g-f),b.render(0,0,c-g,c-g+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,g,l=a.DOMEvent||a;(!this.hasDragged||d&&d.hasDragged)&&"scrollbar"!==a.trigger||(this.zoomedMin===this.otherHandlePos?e=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(g=this.fixedExtreme),this.zoomedMax===this.size&&(g=this.getUnionExtremes().dataMax),c=c.toFixedRange(this.zoomedMin,this.zoomedMax,e,g),f(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:l}));"mousemove"!==
a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null)},removeEvents:function(){this.eventsToUnbind&&(p(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&&(p(a,function(a){u(a,"updatedData",this.updatedDataHandler)},
this),a[0].xAxis&&u(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,g=f?e.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=b;this.scrollbarHeight=g;this.scrollbarEnabled=f;this.navigatorEnabled=d;this.navigatorOptions=c;this.scrollbarOptions=e;this.outlineHeight=b+g;this.opposite=y(c.opposite,!d&&a.inverted);var l=this,e=l.baseSeries,f=a.xAxis.length,k=
a.yAxis.length,p=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 D(a,n({breaks:p.options.breaks,ordinal:p.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:[g,0,-g,0],width:b}:{offsets:[0,-g,0,g],height:b})),l.yAxis=new D(a,n(c.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:k,zoomEnabled:!1},a.inverted?{width:b}:{height:b})),e||c.series.data?l.addBaseSeries():0===a.series.length&&m(a,"redraw",function(b,c){0<a.series.length&&!l.series&&(l.setBaseSeries(),a.redraw=b);b.call(a,c)}),l.renderElements(),l.addMouseEvents()):l.xAxis={translate:function(b,c){var d=a.xAxis[0],e=d.getExtremes(),h=d.len-2*g,f=C("min",
d.options.min,e.dataMin),d=C("max",d.options.max,e.dataMax)-f;return c?b*d/h+f:h*(b-f)/d},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)},toFixedRange:D.prototype.toFixedRange,fake:!0};a.options.scrollbar.enabled&&(a.scrollbar=l.scrollbar=new I(a.renderer,n(a.options.scrollbar,{margin:l.navigatorEnabled?0:10,vertical:a.inverted}),a),B(l.scrollbar,"changed",function(b){var c=l.size,d=c*this.to,c=c*this.from;l.hasDragged=l.scrollbar.hasDragged;l.render(0,
0,c,d);(a.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType)&&setTimeout(function(){l.onMouseUp(b)})}));l.addBaseSeriesEvents();l.addChartEvents()},getUnionExtremes:function(a){var b=this.chart.xAxis[0],c=this.xAxis,d=c.options,e=b.options,f;a&&null===b.dataMin||(f={dataMin:y(d&&d.min,C("min",e.min,b.dataMin,c.dataMin,c.min)),dataMax:y(d&&d.max,C("max",e.max,b.dataMax,c.dataMax,c.max))});return f},setBaseSeries:function(a){var b=this.chart,c;a=a||b.options&&b.options.navigator.baseSeries||0;this.series&&
(this.removeBaseSeriesEvents(),p(this.series,function(a){a.destroy()}));c=this.baseSeries=[];p(b.series||[],function(b,d){(b.options.showInNavigator||(d===a||b.options.id===a)&&!1!==b.options.showInNavigator)&&c.push(b)});this.xAxis&&!this.xAxis.fake&&this.addBaseSeries()},addBaseSeries:function(){var a=this,b=a.chart,c=a.series=[],e=a.baseSeries,f,g,l=a.navigatorOptions.series,m,k={enableMouseTracking:!1,index:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,
stacking:!1,isInternal:!0,visible:!0};e?p(e,function(d,e){k.name="Navigator "+(e+1);f=d.options||{};m=f.navigatorOptions||{};g=n(f,k,l,m);e=m.data||l.data;a.hasNavigatorData=a.hasNavigatorData||!!e;g.data=e||f.data&&f.data.slice(0);d.navigatorSeries=b.initSeries(g);c.push(d.navigatorSeries)}):(g=n(l,k),g.data=l.data,a.hasNavigatorData=!!g.data,c.push(b.initSeries(g)));this.addBaseSeriesEvents()},addBaseSeriesEvents:function(){var a=this,b=a.baseSeries||[];b[0]&&b[0].xAxis&&B(b[0].xAxis,"foundExtremes",
this.modifyBaseAxisExtremes);!1!==this.navigatorOptions.adaptToUpdatedData&&p(b,function(b){b.xAxis&&B(b,"updatedData",this.updatedDataHandler);B(b,"remove",function(){this.navigatorSeries&&(t(a.series,this.navigatorSeries),this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)},modifyNavigatorAxisExtremes:function(){var a=this.xAxis,b;a.getExtremes&&(!(b=this.getUnionExtremes(!0))||b.dataMin===a.min&&b.dataMax===a.max||(a.min=b.dataMin,a.max=b.dataMax))},modifyBaseAxisExtremes:function(){var a=
this.chart.navigator,c=this.getExtremes(),e=c.dataMin,f=c.dataMax,c=c.max-c.min,g=a.stickToMin,l=a.stickToMax,m,k,n=a.series&&a.series[0],p=!!this.setExtremes;this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger||(g&&(k=e,m=k+c),l&&(m=f,g||(k=Math.max(m-c,n&&n.xData?n.xData[0]:-Number.MAX_VALUE))),p&&(g||l)&&b(k)&&(this.min=this.userMin=k,this.max=this.userMax=m));a.stickToMin=a.stickToMax=null},updatedDataHandler:function(){var a=this.chart.navigator,c=this.navigatorSeries;a.stickToMin=
b(this.xAxis.min)&&this.xAxis.min<=this.xData[0];a.stickToMax=Math.round(a.zoomedMax)>=Math.round(a.size);c&&!a.hasNavigatorData&&(c.options.pointStart=this.xData[0],c.setData(this.options.data,!1,null,!1))},addChartEvents:function(){B(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&&(t(this.chart.xAxis,this.xAxis),t(this.chart.axes,
this.xAxis));this.yAxis&&(t(this.chart.yAxis,this.yAxis),t(this.chart.axes,this.yAxis));p(this.series||[],function(a){a.destroy&&a.destroy()});p("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);p([this.handles],function(a){g(a)},this)}};a.Navigator=A;m(D.prototype,"zoom",function(a,b,c){var d=this.chart,e=d.options,h=e.chart.zoomType,g=e.navigator,
e=e.rangeSelector,l;this.isXAxis&&(g&&g.enabled||e&&e.enabled)&&("x"===h?d.resetZoomButton="blocked":"y"===h?l=!1:"xy"===h&&(d=this.previousZoom,f(b)?this.previousZoom=[this.min,this.max]:d&&(b=d[0],c=d[1],delete this.previousZoom)));return void 0!==l?l:a.call(this,b,c)});m(E.prototype,"init",function(a,b,c){B(this,"beforeRender",function(){var a=this.options;if(a.navigator.enabled||a.scrollbar.enabled)this.scroller=this.navigator=new A(this)});a.call(this,b,c)});m(E.prototype,"setChartSize",function(a){var b=
this.legend,c=this.navigator,d,e,f,g;a.apply(this,[].slice.call(arguments,1));c&&(e=b.options,f=c.xAxis,g=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+y(e.margin,10):0)),f&&g&&(this.inverted?f.options.left=g.options.left=c.left:f.options.top=g.options.top=
c.top,f.setAxisSize(),g.setAxisSize()))});m(G.prototype,"addPoint",function(a,b,c,f,g){var d=this.options.turboThreshold;d&&this.xData.length>d&&k(b,!0)&&this.chart.navigator&&e(20,!0);a.call(this,b,c,f,g)});m(E.prototype,"addSeries",function(a,b,c,e){a=a.call(this,b,!1,e);this.navigator&&this.navigator.setBaseSeries();y(c,!0)&&this.redraw();return a});m(G.prototype,"update",function(a,b,c){a.call(this,b,!1);this.chart.navigator&&this.chart.navigator.setBaseSeries();y(c,!0)&&this.chart.redraw()});
E.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 A(a){this.init(a)}var B=a.addEvent,D=a.Axis,E=a.Chart,q=a.css,f=a.createElement,g=a.dateFormat,z=a.defaultOptions,p=z.global.useUTC,t=a.defined,e=a.destroyObjectProperties,c=a.discardElement,r=a.each,v=a.extend,b=a.fireEvent,k=a.Date,n=a.isNumber,y=a.merge,u=a.pick,I=a.pInt,G=a.splat,F=a.wrap;v(z,{rangeSelector:{buttonTheme:{"stroke-width":0,width:28,height:18,
padding:2,zIndex:7},height:35,inputPosition:{align:"right"}}});z.lang=y(z.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});A.prototype={clickButton:function(a,b){var c=this,e=c.chart,d=c.buttonOptions[a],f=e.xAxis[0],h=e.scroller&&e.scroller.getUnionExtremes()||f||{},g=h.dataMin,m=h.dataMax,k,q=f&&Math.round(Math.min(f.max,u(m,f.max))),x=d.type,t,h=d._range,v,y,z,A=d.dataGrouping;if(null!==g&&null!==m){e.fixedRange=h;A&&(this.forcedDataGrouping=!0,D.prototype.setDataGrouping.call(f||
{chart:this.chart},A,!1));if("month"===x||"year"===x)f?(x={range:d,max:q,dataMin:g,dataMax:m},k=f.minFromRange.call(x),n(x.newMax)&&(q=x.newMax)):h=d;else if(h)k=Math.max(q-h,g),q=Math.min(k+h,m);else if("ytd"===x)if(f)void 0===m&&(g=Number.MAX_VALUE,m=Number.MIN_VALUE,r(e.series,function(a){a=a.xData;g=Math.min(a[0],g);m=Math.max(a[a.length-1],m)}),b=!1),q=c.getYTDExtremes(m,g,p),k=v=q.min,q=q.max;else{B(e,"beforeRender",function(){c.clickButton(a)});return}else"all"===x&&f&&(k=g,q=m);c.setSelected(a);
f?f.setExtremes(k,q,u(b,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:d}):(t=G(e.options.xAxis)[0],z=t.range,t.range=h,y=t.min,t.min=v,B(e,"load",function(){t.range=z;t.min=y}))}},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,e=a.options.rangeSelector,
f=e.buttons||[].concat(c.defaultButtons),d=e.selected,g=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=e;c.buttons=[];a.extraTopMargin=e.height;c.buttonOptions=f;this.unMouseDown=B(a.container,"mousedown",g);this.unResize=B(a,"resize",g);r(f,c.computeButtonRange);void 0!==d&&f[d]&&this.clickButton(d,!1);B(a,"load",function(){B(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),e=!b.hasVisibleSeries,a=a.scroller&&a.scroller.getUnionExtremes()||b,d=a.dataMin,f=a.dataMax,a=this.getYTDExtremes(f,d,p),h=a.min,g=a.max,k=this.selected,q=n(k),t=this.options.allButtonsEnabled,u=this.buttons;r(this.buttonOptions,function(a,l){var m=a._range,n=a.type,p=a.count||1;a=u[l];var r=0;l=l===k;var x=m>f-d,w=m<b.minRange,v=!1,y=!1,m=m===c;
("month"===n||"year"===n)&&c>=864E5*{month:28,year:365}[n]*p&&c<=864E5*{month:31,year:366}[n]*p?m=!0:"ytd"===n?(m=g-h===c,v=!l):"all"===n&&(m=b.max-b.min>=f-d,y=!l&&q&&m);n=!t&&(x||w||y||e);m=l&&m||m&&!q&&!v;n?r=3:m&&(q=!0,r=2);a.state!==r&&a.setState(r)})},computeButtonRange:function(a){var b=a.type,c=a.count||1,e={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(e[b])a._range=e[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,e=this[a+"Input"];t(b)&&(e.previousValue=e.HCTime,e.HCTime=b);e.value=g(c.inputEditDateFormat||"%Y-%m-%d",e.HCTime);this[a+"DateBox"].attr({text:g(c.inputDateFormat||"%b %e, %Y",e.HCTime)})},showInput:function(a){var b=this.inputGroup,c=this[a+"DateBox"];q(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){q(this[a+"Input"],{border:0,width:"1px",height:"1px"});
this.setInputValue(a)},drawInput:function(a){function b(){var a=m.value,b=(g.inputDateParser||Date.parse)(a),d=e.xAxis[0],f=e.scroller&&e.scroller.xAxis?e.scroller.xAxis:d,h=f.dataMin,f=f.dataMax;b!==m.previousValue&&(m.previousValue=b,n(b)||(b=a.split("-"),b=Date.UTC(I(b[0]),I(b[1])-1,I(b[2]))),n(b)&&(p||(b+=6E4*(new Date).getTimezoneOffset()),k?b>c.maxInput.HCTime?b=void 0:b<h&&(b=h):b<c.minInput.HCTime?b=void 0:b>f&&(b=f),void 0!==b&&d.setExtremes(k?b:d.min,k?d.max:b,void 0,void 0,{trigger:"rangeSelectorInput"})))}
var c=this,e=c.chart,d=e.renderer,g=e.options.rangeSelector,h=c.div,k="min"===a,m,q,r=this.inputGroup;this[a+"Label"]=q=d.label(z.lang[k?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(r);r.offset+=q.width+5;this[a+"DateBox"]=d=d.label("",r.offset).addClass("highcharts-range-input").attr({padding:2,width:g.inputBoxWidth||90,height:g.inputBoxHeight||17,stroke:g.inputBoxBorderColor||"#cccccc","stroke-width":1,"text-align":"center"}).on("click",
function(){c.showInput(a);c[a+"Input"].focus()}).add(r);r.offset+=d.width+(k?10:0);this[a+"Input"]=m=f("input",{name:a,className:"highcharts-range-selector",type:"text"},{top:e.plotTop+"px"},h);m.onfocus=function(){c.showInput(a)};m.onblur=function(){c.hideInput(a)};m.onchange=b;m.onkeypress=function(a){13===a.keyCode&&b()}},getPosition:function(){var a=this.chart,b=a.options.rangeSelector,a=u((b.buttonPosition||{}).y,a.plotTop-a.axisOffset[0]-b.height);return{buttonTop:a,inputTop:a-10}},getYTDExtremes:function(a,
b,c){var e=new k(a),d=e[k.hcGetFullYear]();c=c?k.UTC(d,0,1):+new k(d,0,1);b=Math.max(b||0,c);e=e.getTime();return{max:Math.min(a||e,e),min:b}},render:function(a,b){var c=this,e=c.chart,d=e.renderer,g=e.container,h=e.options,k=h.exporting&&!1!==h.exporting.enabled&&h.navigation&&h.navigation.buttonOptions,m=h.rangeSelector,n=c.buttons,h=z.lang,p=c.div,p=c.inputGroup,q=m.buttonTheme,x=m.buttonPosition||{},y=m.inputEnabled,A=q&&q.states,B=e.plotLeft,D,E=this.getPosition(),F=c.group,G=c.rendered;!1!==
m.enabled&&(G||(c.group=F=d.g("range-selector-buttons").add(),c.zoomText=d.text(h.rangeSelectorZoom,u(x.x,B),15).css(m.labelStyle).add(F),D=u(x.x,B)+c.zoomText.getBBox().width+5,r(c.buttonOptions,function(a,b){n[b]=d.button(a.text,D,0,function(){c.clickButton(b);c.isActive=!0},q,A&&A.hover,A&&A.select,A&&A.disabled).attr({"text-align":"center"}).add(F);D+=n[b].width+u(m.buttonSpacing,5)}),!1!==y&&(c.div=p=f("div",null,{position:"relative",height:0,zIndex:1}),g.parentNode.insertBefore(p,g),c.inputGroup=
p=d.g("input-group").add(),p.offset=0,c.drawInput("min"),c.drawInput("max"))),c.updateButtonStates(),F[G?"animate":"attr"]({translateY:E.buttonTop}),!1!==y&&(p.align(v({y:E.inputTop,width:p.offset,x:k&&E.inputTop<(k.y||0)+k.height-e.spacing[0]?-40:0},m.inputPosition),!0,e.spacingBox),t(y)||(e=F.getBBox(),p[p.alignAttr.translateX<e.x+e.width+10?"hide":"show"]()),c.setInputValue("min",a),c.setInputValue("max",b)),c.rendered=!0)},update:function(a){var b=this.chart;y(!0,b.options.rangeSelector,a);this.destroy();
this.init(b)},destroy:function(){var b=this,f=b.minInput,g=b.maxInput;b.unMouseDown();b.unResize();e(b.buttons);f&&(f.onfocus=f.onblur=f.onchange=null);g&&(g.onfocus=g.onblur=g.onchange=null);a.objectEach(b,function(a,d){a&&"chart"!==d&&(a.destroy?a.destroy():a.nodeType&&c(this[d]));a!==A.prototype[d]&&(b[d]=null)},this)}};D.prototype.toFixedRange=function(a,b,c,e){var d=this.chart&&this.chart.fixedRange;a=u(c,this.translate(a,!0,!this.horiz));b=u(e,this.translate(b,!0,!this.horiz));c=d&&(b-a)/d;
.7<c&&1.3>c&&(e?a=b-d:b=a+d);n(a)||(a=b=void 0);return{min:a,max:b}};D.prototype.minFromRange=function(){var a=this.range,b={month:"Month",year:"FullYear"}[a.type],c,e=this.max,d,f,h=function(a,c){var d=new Date(a),e=d["get"+b]();d["set"+b](e+c);e===d["get"+b]()&&d.setDate(0);return d.getTime()-a};n(a)?(c=e-a,f=a):(c=e+h(e,-a.count),this.chart&&(this.chart.fixedRange=e-c));d=u(this.dataMin,Number.MIN_VALUE);n(c)||(c=d);c<=d&&(c=d,void 0===f&&(f=h(c,a.count)),this.newMax=Math.min(c+f,this.dataMax));
n(e)||(c=void 0);return c};F(E.prototype,"init",function(a,b,c){B(this,"init",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new A(this))});a.call(this,b,c)});E.prototype.callbacks.push(function(a){function b(){c=a.xAxis[0].getExtremes();n(c.min)&&e.render(c.min,c.max)}var c,e=a.rangeSelector,d,f;e&&(f=B(a.xAxis[0],"afterSetExtremes",function(a){e.render(a.min,a.max)}),d=B(a,"redraw",b),b());B(a,"destroy",function(){e&&(d(),f())})});a.RangeSelector=A})(K);(function(a){var A=a.arrayMax,
B=a.arrayMin,D=a.Axis,E=a.Chart,q=a.defined,f=a.each,g=a.format,z=a.grep,p=a.inArray,t=a.isNumber,e=a.isString,c=a.map,r=a.merge,v=a.pick,b=a.Point,k=a.Series,n=a.splat,y=a.SVGRenderer,u=a.wrap,I=k.prototype,G=I.init,F=I.processData,m=b.prototype.tooltipFormatter;a.StockChart=a.stockChart=function(b,f,g){var d=e(b)||b.nodeName,l=arguments[d?1:0],h=l.series,k=a.getOptions(),m,p=v(l.navigator&&l.navigator.enabled,k.navigator.enabled,!0),q=p?{startOnTick:!1,endOnTick:!1}:null,t={marker:{enabled:!1,radius:2}},
x={shadow:!1,borderWidth:0};l.xAxis=c(n(l.xAxis||{}),function(a){return r({minPadding:0,maxPadding:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},k.xAxis,a,{type:"datetime",categories:null},q)});l.yAxis=c(n(l.yAxis||{}),function(a){m=v(a.opposite,!0);return r({labels:{y:-2},opposite:m,showLastLabel:!1,title:{text:null}},k.yAxis,a)});l.series=null;l=r({chart:{panning:!0,pinchType:"x"},navigator:{enabled:p},scrollbar:{enabled:v(k.scrollbar.enabled,!0)},rangeSelector:{enabled:v(k.rangeSelector.enabled,
!0)},title:{text:null},tooltip:{shared:!0,crosshairs:!0},legend:{enabled:!1},plotOptions:{line:t,spline:t,area:t,areaspline:t,arearange:t,areasplinerange:t,column:x,columnrange:x,candlestick:x,ohlc:x}},l,{isStock:!0});l.series=h;return d?new E(b,l,g):new E(l,f)};u(D.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))});u(D.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))});u(D.prototype,"getPlotLinePath",function(b,g,k,d,m,h){var l=this,n=this.isLinked&&!this.series?this.linkedParent.series:this.series,r=l.chart,x=r.renderer,u=
l.left,y=l.top,z,C,A,B,D=[],E=[],F,H;if("colorAxis"===l.coll)return b.apply(this,[].slice.call(arguments,1));E=function(a){var b="xAxis"===a?"yAxis":"xAxis";a=l.options[b];return t(a)?[r[b][a]]:e(a)?[r.get(a)]:c(n,function(a){return a[b]})}(l.coll);f(l.isXAxis?r.yAxis:r.xAxis,function(a){if(q(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis",b=q(a.options[b])?r[b][a.options[b]]:r[b][0];l===b&&E.push(a)}});F=E.length?[]:[l.isXAxis?r.yAxis[0]:r.xAxis[0]];f(E,function(b){-1!==
p(b,F)||a.find(F,function(a){return a.pos===b.pos&&a.len&&b.len})||F.push(b)});H=v(h,l.translate(g,null,null,d));t(H)&&(l.horiz?f(F,function(a){var b;C=a.pos;B=C+a.len;z=A=Math.round(H+l.transB);if(z<u||z>u+l.width)m?z=A=Math.min(Math.max(u,z),u+l.width):b=!0;b||D.push("M",z,C,"L",A,B)}):f(F,function(a){var b;z=a.pos;A=z+a.len;C=B=Math.round(y+l.height-H);if(C<y||C>y+l.height)m?C=B=Math.min(Math.max(y,C),l.top+l.height):b=!0;b||D.push("M",z,C,"L",A,B)}));return 0<D.length?x.crispPolyLine(D,k||1):
null});D.prototype.getPlotBandPath=function(a,b){b=this.getPlotLinePath(b,null,null,!0);a=this.getPlotLinePath(a,null,null,!0);var c=[],d;if(a&&b)if(a.toString()===b.toString())c=a,c.flat=!0;else for(d=0;d<a.length;d+=6)c.push("M",a[d+1],a[d+2],"L",a[d+4],a[d+5],b[d+4],b[d+5],b[d+1],b[d+2],"z");else c=null;return c};y.prototype.crispPolyLine=function(a,b){var c;for(c=0;c<a.length;c+=6)a[c+1]===a[c+4]&&(a[c+1]=a[c+4]=Math.round(a[c+1])-b%2/2),a[c+2]===a[c+5]&&(a[c+2]=a[c+5]=Math.round(a[c+2])+b%2/
2);return a};u(D.prototype,"hideCrosshair",function(a,b){a.call(this,b);this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});u(D.prototype,"drawCrosshair",function(a,b,c){var d,e;a.call(this,b,c);if(q(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){a=this.chart;var f=this.options.crosshair.label,k=this.horiz;d=this.opposite;e=this.left;var l=this.top,m=this.crossLabel,n,p=f.format,r="",t="inside"===this.options.tickPosition,u=!1!==this.crosshair.snap,x=0;b||(b=this.cross&&
this.cross.e);n=k?"center":d?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";m||(m=this.crossLabel=a.renderer.label(null,null,null,f.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:f.align||n,padding:v(f.padding,8),r:v(f.borderRadius,3),zIndex:2}).add(this.labelGroup));k?(n=u?c.plotX+e:b.chartX,l+=d?0:this.height):(n=d?this.width+e:0,l=u?c.plotY+l:b.chartY);p||f.formatter||(this.isDatetimeAxis&&
(r="%b %d, %Y"),p="{value"+(r?":"+r:"")+"}");b=u?c[this.isXAxis?"x":"y"]:this.toValue(k?b.chartX:b.chartY);m.attr({text:p?g(p,{value:b}):f.formatter.call(this,b),x:n,y:l,visibility:"visible"});b=m.getBBox();if(k){if(t&&!d||!t&&d)l=m.y-b.height}else l=m.y-b.height/2;k?(d=e-b.x,e=e+this.width-b.x):(d="left"===this.labelAlign?e:0,e="right"===this.labelAlign?e+this.width:a.chartWidth);m.translateX<d&&(x=d-m.translateX);m.translateX+b.width>=e&&(x=-(m.translateX+b.width-e));m.attr({x:n+x,y:l,anchorX:k?
n:this.opposite?0:a.chartWidth,anchorY:k?this.opposite?a.chartHeight:0:l+b.height/2})}});I.init=function(){G.apply(this,arguments);this.setCompare(this.options.compare)};I.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)};I.processData=function(){var a,b=
-1,c,d,e,f;F.apply(this,arguments);if(this.xAxis&&this.processedYData)for(c=this.processedXData,d=this.processedYData,e=d.length,this.pointArrayMap&&(b=p("close",this.pointArrayMap),-1===b&&(b=p(this.pointValKey||"y",this.pointArrayMap))),a=0;a<e-1;a++)if(f=d[a]&&-1<b?d[a][b]:d[a],t(f)&&c[a+1]>=this.xAxis.min&&0!==f){this.compareValue=f;break}};u(I,"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=B(b),this.dataMax=A(b))});D.prototype.setCompare=function(a,b){this.isXAxis||(f(this.series,function(b){b.setCompare(a)}),v(b,!0)&&this.chart.redraw())};b.prototype.tooltipFormatter=function(b){b=b.replace("{point.change}",(0<this.change?"+":"")+a.numberFormat(this.change,v(this.series.tooltipOptions.changeDecimals,2)));return m.apply(this,[b])};u(k.prototype,"render",function(a){this.chart.is3d&&this.chart.is3d()||this.chart.polar||!this.xAxis||this.xAxis.isRadial||(!this.clipBox&&this.animate?
(this.clipBox=r(this.chart.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=this.yAxis.len):this.chart[this.sharedClipKey]?this.chart[this.sharedClipKey].attr({width:this.xAxis.len,height:this.yAxis.len}):this.clipBox&&(this.clipBox.width=this.xAxis.len,this.clipBox.height=this.yAxis.len));a.call(this)});u(E.prototype,"getSelectedPoints",function(a){var b=a.call(this);f(this.series,function(a){a.hasGroupedData&&(b=b.concat(z(a.points||[],function(a){return a.selected})))});return b});
u(E.prototype,"update",function(a,b){"scrollbar"in b&&this.navigator&&(r(!0,this.options.scrollbar,b.scrollbar),this.navigator.update({},!1),delete b.scrollbar);return a.apply(this,Array.prototype.slice.call(arguments,1))})})(K);return K});
