PHP Classes

File: themes/default/js/chart.js

Recommend this page to a friend!
  Classes of Aby Dahana   Dwitri PHP Social Network Platform   themes/default/js/chart.js   Download  
File: themes/default/js/chart.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Dwitri PHP Social Network Platform
Create a community site like a social network
Author: By
Last change:
Date: 3 years ago
Size: 163,346 bytes
 

Contents

Class file image Download
!function(){function t(){var t,e,i=arguments,n={},s=function(t,e){var i,n;"object"!=typeof t&&(t={});for(n in e)e.hasOwnProperty(n)&&(i=e[n],t[n]=i&&"object"==typeof i&&"[object Array]"!==Object.prototype.toString.call(i)&&"renderTo"!==n&&"number"!=typeof i.nodeType?s(t[n]||{},i):e[n]);return t};for(i[0]===!0&&(n=i[1],i=Array.prototype.slice.call(i,2)),e=i.length,t=0;e>t;t++)n=s(n,i[t]);return n}function e(t,e){return parseInt(t,e||10)}function i(t){return"string"==typeof t}function n(t){return t&&"object"==typeof t}function s(t){return"[object Array]"===Object.prototype.toString.call(t)}function o(t){return"number"==typeof t}function r(t){return rt.log(t)/rt.LN10}function a(t){return rt.pow(10,t)}function h(t,e){for(var i=t.length;i--;)if(t[i]===e){t.splice(i,1);break}}function l(t){return t!==z&&null!==t}function c(t,e,s){var o,r;if(i(e))l(s)?t.setAttribute(e,s):t&&t.getAttribute&&(r=t.getAttribute(e));else if(l(e)&&n(e))for(o in e)t.setAttribute(o,e[o]);return r}function d(t){return s(t)?t:[t]}function p(t,e){xt&&!Tt&&e&&e.opacity!==z&&(e.filter="alpha(opacity="+100*e.opacity+")"),Wt(t.style,e)}function u(t,e,i,n,s){return t=st.createElement(t),e&&Wt(t,e),s&&p(t,{padding:0,border:Rt,margin:0}),i&&p(t,i),n&&n.appendChild(t),t}function f(t,e){var i=function(){return z};return i.prototype=new t,Wt(i.prototype,e),i}function g(t,e){return Array((e||2)+1-String(t).length).join(0)+t}function m(t){return 6e4*(N&&N(t)||Y||0)}function y(t,e){for(var i,n,s,o,r,a="{",h=!1,l=[];-1!==(a=t.indexOf(a));){if(i=t.slice(0,a),h){for(n=i.split(":"),s=n.shift().split("."),r=s.length,i=e,o=0;r>o;o++)i=i[s[o]];n.length&&(n=n.join(":"),s=/\.([0-9])/,o=X.lang,r=void 0,/f$/.test(n)?(r=(r=n.match(s))?r[1]:-1,null!==i&&(i=nt.numberFormat(i,r,o.decimalPoint,n.indexOf(",")>-1?o.thousandsSep:""))):i=H(n,i))}l.push(i),t=t.slice(a+1),a=(h=!h)?"}":"{"}return l.push(t),l.join("")}function v(t){return rt.pow(10,ht(rt.log(t)/rt.LN10))}function x(t,e,i,n,s){var o,r=t,i=Gt(i,1);for(o=t/i,e||(e=[1,2,2.5,5,10],n===!1&&(1===i?e=[1,2,5,10]:.1>=i&&(e=[1/i]))),n=0;n<e.length&&(r=e[n],!(s&&r*i>=t||!s&&o<=(e[n]+(e[n+1]||e[n]))/2));n++);return r*=i}function b(t,e){var i,n,s=t.length;for(n=0;s>n;n++)t[n].ss_i=n;for(t.sort(function(t,n){return i=e(t,n),0===i?t.ss_i-n.ss_i:i}),n=0;s>n;n++)delete t[n].ss_i}function k(t){for(var e=t.length,i=t[0];e--;)t[e]<i&&(i=t[e]);return i}function w(t){for(var e=t.length,i=t[0];e--;)t[e]>i&&(i=t[e]);return i}function S(t,e){for(var i in t)t[i]&&t[i]!==e&&t[i].destroy&&t[i].destroy(),delete t[i]}function A(t){B||(B=u(It)),t&&B.appendChild(t),B.innerHTML=""}function T(t,e){var i="Highcharts error #"+t+": www.highcharts.com/errors/"+t;if(e)throw i;ot.console&&console.log(i)}function P(t,e){return parseFloat(t.toPrecision(e||14))}function C(t,e){e.renderer.globalAnimation=Gt(t,e.animation)}function L(){var t=X.global,e=t.useUTC,i=e?"getUTC":"get",n=e?"setUTC":"set";G=t.Date||window.Date,Y=e&&t.timezoneOffset,N=e&&t.getTimezoneOffset,F=function(t,i,n,s,o,r){var a;return e?(a=G.UTC.apply(0,arguments),a+=m(a)):a=new G(t,i,Gt(n,1),Gt(s,0),Gt(o,0),Gt(r,0)).getTime(),a},V=i+"Minutes",j=i+"Hours",_=i+"Day",U=i+"Date",Z=i+"Month",K=i+"FullYear",q=n+"Milliseconds",$=n+"Seconds",J=n+"Minutes",Q=n+"Hours",tt=n+"Date",et=n+"Month",it=n+"FullYear"}function M(){}function D(t,e,i,n){this.axis=t,this.pos=e,this.type=i||"",this.isNew=!0,!i&&!n&&this.addLabel()}function O(t,e,i,n,s){var o=t.chart.inverted;this.axis=t,this.isNegative=i,this.options=e,this.x=n,this.total=null,this.points={},this.stack=s,this.alignOptions={align:e.align||(o?i?"left":"right":"center"),verticalAlign:e.verticalAlign||(o?"middle":i?"bottom":"top"),y:Gt(e.y,o?4:i?14:-6),x:Gt(e.x,o?i?-6:6:0)},this.textAlign=e.textAlign||(o?i?"right":"left":"center")}var z,I,R,B,X,H,E,W,G,F,Y,N,V,j,_,U,Z,K,q,$,J,Q,tt,et,it,nt,st=document,ot=window,rt=Math,at=rt.round,ht=rt.floor,lt=rt.ceil,ct=rt.max,dt=rt.min,pt=rt.abs,ut=rt.cos,ft=rt.sin,gt=rt.PI,mt=2*gt/360,yt=navigator.userAgent,vt=ot.opera,xt=/(msie|trident)/i.test(yt)&&!vt,bt=8===st.documentMode,kt=/AppleWebKit/.test(yt),wt=/Firefox/.test(yt),St=/(Mobile|Android|Windows Phone)/.test(yt),At="http://www.w3.org/2000/svg",Tt=!!st.createElementNS&&!!st.createElementNS(At,"svg").createSVGRect,Pt=wt&&parseInt(yt.split("Firefox/")[1],10)<4,Ct=!Tt&&!xt&&!!st.createElement("canvas").getContext,Lt={},Mt=0,Dt=function(){return z},Ot=[],zt=0,It="div",Rt="none",Bt=/^[0-9]+$/,Xt=["plotTop","marginRight","marginBottom","plotLeft"],Ht="stroke-width",Et={};nt=ot.Highcharts=ot.Highcharts?T(16,!0):{},nt.seriesTypes=Et;var Wt=nt.extend=function(t,e){var i;t||(t={});for(i in e)t[i]=e[i];return t},Gt=nt.pick=function(){var t,e,i=arguments,n=i.length;for(t=0;n>t;t++)if(e=i[t],e!==z&&null!==e)return e},Ft=nt.wrap=function(t,e,i){var n=t[e];t[e]=function(){var t=Array.prototype.slice.call(arguments);return t.unshift(n),i.apply(this,t)}};H=function(t,e,i){if(!l(e)||isNaN(e))return X.lang.invalidDate||"";var n,t=Gt(t,"%Y-%m-%d %H:%M:%S"),s=new G(e-m(e)),o=s[j](),r=s[_](),a=s[U](),h=s[Z](),c=s[K](),d=X.lang,p=d.weekdays,s=Wt({a:p[r].substr(0,3),A:p[r],d:g(a),e:a,w:r,b:d.shortMonths[h],B:d.months[h],m:g(h+1),y:c.toString().substr(2,2),Y:c,H:g(o),k:o,I:g(o%12||12),l:o%12||12,M:g(s[V]()),p:12>o?"AM":"PM",P:12>o?"am":"pm",S:g(s.getSeconds()),L:g(at(e%1e3),3)},nt.dateFormats);for(n in s)for(;-1!==t.indexOf("%"+n);)t=t.replace("%"+n,"function"==typeof s[n]?s[n](e):s[n]);return i?t.substr(0,1).toUpperCase()+t.substr(1):t},W={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},nt.numberFormat=function(t,i,n,s){var o=X.lang,t=+t||0,r=-1===i?dt((t.toString().split(".")[1]||"").length,20):isNaN(i=pt(i))?2:i,i=void 0===n?o.decimalPoint:n,s=void 0===s?o.thousandsSep:s,o=0>t?"-":"",n=String(e(t=pt(t).toFixed(r))),a=n.length>3?n.length%3:0;return o+(a?n.substr(0,a)+s:"")+n.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+s)+(r?i+pt(t-n).toFixed(r).slice(2):"")},E={init:function(t,e,i){var n,s,o,e=e||"",r=t.shift,a=e.indexOf("C")>-1,h=a?7:3,e=e.split(" "),i=[].concat(i),l=function(t){for(n=t.length;n--;)"M"===t[n]&&t.splice(n+1,0,t[n+1],t[n+2],t[n+1],t[n+2])};if(a&&(l(e),l(i)),t.isArea&&(s=e.splice(e.length-6,6),o=i.splice(i.length-6,6)),r<=i.length/h&&e.length===i.length)for(;r--;)i=[].concat(i).splice(0,h).concat(i);if(t.shift=0,e.length)for(t=i.length;e.length<t;)r=[].concat(e).splice(e.length-h,h),a&&(r[h-6]=r[h-2],r[h-5]=r[h-1]),e=e.concat(r);return s&&(e=e.concat(s),i=i.concat(o)),[e,i]},step:function(t,e,i,n){var s=[],o=t.length;if(1===i)s=n;else if(o===e.length&&1>i)for(;o--;)n=parseFloat(t[o]),s[o]=isNaN(n)?t[o]:i*parseFloat(e[o]-n)+n;else s=e;return s}},function(t){ot.HighchartsAdapter=ot.HighchartsAdapter||t&&{init:function(e){var n=t.fx;t.extend(t.easing,{easeOutQuad:function(t,e,i,n,s){return-n*(e/=s)*(e-2)+i}}),t.each(["cur","_default","width","height","opacity"],function(e,i){var s,o=n.step;"cur"===i?o=n.prototype:"_default"===i&&t.Tween&&(o=t.Tween.propHooks[i],i="set"),(s=o[i])&&(o[i]=function(t){var n,t=e?t:this;return"align"!==t.prop?(n=t.elem,n.attr?n.attr(t.prop,"cur"===i?z:t.now):s.apply(this,arguments)):void 0})}),Ft(t.cssHooks.opacity,"get",function(t,e,i){return e.attr?e.opacity||0:t.call(this,e,i)}),this.addAnimSetter("d",function(t){var i,n=t.elem;t.started||(i=e.init(n,n.d,n.toD),t.start=i[0],t.end=i[1],t.started=!0),n.attr("d",e.step(t.start,t.end,t.pos,n.toD))}),this.each=Array.prototype.forEach?function(t,e){return Array.prototype.forEach.call(t,e)}:function(t,e){var i,n=t.length;for(i=0;n>i;i++)if(e.call(t[i],t[i],i,t)===!1)return i},t.fn.highcharts=function(){var t,e,n="Chart",s=arguments;return this[0]&&(i(s[0])&&(n=s[0],s=Array.prototype.slice.call(s,1)),t=s[0],t!==z&&(t.chart=t.chart||{},t.chart.renderTo=this[0],new nt[n](t,s[1]),e=this),t===z&&(e=Ot[c(this[0],"data-highcharts-chart")])),e}},addAnimSetter:function(e,i){t.Tween?t.Tween.propHooks[e]={set:i}:t.fx.step[e]=i},getScript:t.getScript,inArray:t.inArray,adapterRun:function(e,i){return t(e)[i]()},grep:t.grep,map:function(t,e){for(var i=[],n=0,s=t.length;s>n;n++)i[n]=e.call(t[n],t[n],n,t);return i},offset:function(e){return t(e).offset()},addEvent:function(e,i,n){t(e).bind(i,n)},removeEvent:function(e,i,n){var s=st.removeEventListener?"removeEventListener":"detachEvent";st[s]&&e&&!e[s]&&(e[s]=function(){}),t(e).unbind(i,n)},fireEvent:function(e,i,n,s){var o,r=t.Event(i),a="detached"+i;!xt&&n&&(delete n.layerX,delete n.layerY,delete n.returnValue),Wt(r,n),e[i]&&(e[a]=e[i],e[i]=null),t.each(["preventDefault","stopPropagation"],function(t,e){var i=r[e];r[e]=function(){try{i.call(r)}catch(t){"preventDefault"===e&&(o=!0)}}}),t(e).trigger(r),e[a]&&(e[i]=e[a],e[a]=null),s&&!r.isDefaultPrevented()&&!o&&s(r)},washMouseEvent:function(t){var e=t.originalEvent||t;return e.pageX===z&&(e.pageX=t.pageX,e.pageY=t.pageY),e},animate:function(e,i,n){var s=t(e);e.style||(e.style={}),i.d&&(e.toD=i.d,i.d=1),s.stop(),i.opacity!==z&&e.attr&&(i.opacity+="px"),e.hasAnim=1,s.animate(i,n)},stop:function(e){e.hasAnim&&t(e).stop()}}}(ot.jQuery);var Yt=ot.HighchartsAdapter,Nt=Yt||{};Yt&&Yt.init.call(Yt,E);var Vt=Nt.adapterRun,jt=Nt.getScript,_t=Nt.inArray,Ut=nt.each=Nt.each,Zt=Nt.grep,Kt=Nt.offset,qt=Nt.map,$t=Nt.addEvent,Jt=Nt.removeEvent,Qt=Nt.fireEvent,te=Nt.washMouseEvent,ee=Nt.animate,ie=Nt.stop;X={colors:"#008800,#0077AA,#888888,#FF0000,#8085e9,#f15c80,#e4d354,#2b908f,#f45b5b,#91e8e1".split(","),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:"k,M,G,T,P,E".split(","),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/4.1.8/modules/canvas-tools.js",VMLRadialGradientURL:"http://code.highcharts.com/4.1.8/gfx/vml-radial-gradient.png"},chart:{borderColor:"#4572A7",borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0",resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",align:"center",margin:15,style:{color:"#333333",fontSize:"18px"}},subtitle:{text:"",align:"center",style:{color:"#555555"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},lineWidth:2,marker:{lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{enabled:!0,lineWidthPlus:1,radiusPlus:2},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":nt.numberFormat(this.y,-1)},style:{color:"contrast",fontSize:"11px",fontWeight:"bold",textShadow:"0 0 6px contrast, 0 0 3px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,states:{hover:{lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1e3}},labels:{style:{position:"absolute",color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#909090",borderRadius:0,navigation:{activeColor:"#274b6d",inactiveColor:"#CCC"},shadow:!1,itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold"},itemHoverStyle:{color:"#000"},itemHiddenStyle:{color:"#CCC"},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"white",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:Tt,backgroundColor:"rgba(249, 249, 249, .85)",borderWidth:1,borderRadius:0,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:"",headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">?</span> {series.name}: <b>{point.y}</b><br/>',shadow:!0,snap:St?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"9px"}}};var ne=X.plotOptions,Yt=ne.line;L();var se=/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*\)/,oe=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,re=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,ae=function(i){var n,s,r=[];return function(t){t&&t.stops?s=qt(t.stops,function(t){return ae(t[1])}):(n=se.exec(t))?r=[e(n[1]),e(n[2]),e(n[3]),parseFloat(n[4],10)]:(n=oe.exec(t))?r=[e(n[1],16),e(n[2],16),e(n[3],16),1]:(n=re.exec(t))&&(r=[e(n[1]),e(n[2]),e(n[3]),1])}(i),{get:function(e){var n;return s?(n=t(i),n.stops=[].concat(n.stops),Ut(s,function(t,i){n.stops[i]=[n.stops[i][0],t.get(e)]})):n=r&&!isNaN(r[0])?"rgb"===e?"rgb("+r[0]+","+r[1]+","+r[2]+")":"a"===e?r[3]:"rgba("+r.join(",")+")":i,n},brighten:function(t){if(s)Ut(s,function(e){e.brighten(t)});else if(o(t)&&0!==t){var i;for(i=0;3>i;i++)r[i]+=e(255*t),r[i]<0&&(r[i]=0),r[i]>255&&(r[i]=255)}return this},rgba:r,setOpacity:function(t){return r[3]=t,this},raw:i}};M.prototype={opacity:1,textProps:"fontSize,fontWeight,fontFamily,fontStyle,color,lineHeight,width,textDecoration,textOverflow,textShadow".split(","),init:function(t,e){this.element="span"===e?u(e):st.createElementNS(At,e),this.renderer=t},animate:function(e,i,n){return i=Gt(i,this.renderer.globalAnimation,!0),ie(this),i?(i=t(i,{}),n&&(i.complete=n),ee(this,e,i)):this.attr(e,null,n),this},colorGradient:function(e,i,n){var o,r,a,h,c,d,p,u,f,g,m=this.renderer,y=[];if(e.linearGradient?r="linearGradient":e.radialGradient&&(r="radialGradient"),r){a=e[r],h=m.gradients,d=e.stops,f=n.radialReference,s(a)&&(e[r]=a={x1:a[0],y1:a[1],x2:a[2],y2:a[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===r&&f&&!l(a.gradientUnits)&&(a=t(a,{cx:f[0]-f[2]/2+a.cx*f[2],cy:f[1]-f[2]/2+a.cy*f[2],r:a.r*f[2],gradientUnits:"userSpaceOnUse"}));for(g in a)"id"!==g&&y.push(g,a[g]);for(g in d)y.push(d[g]);y=y.join(","),h[y]?e=h[y].attr("id"):(a.id=e="highcharts-"+Mt++,h[y]=c=m.createElement(r).attr(a).add(m.defs),c.stops=[],Ut(d,function(t){0===t[1].indexOf("rgba")?(o=ae(t[1]),p=o.get("rgb"),u=o.get("a")):(p=t[1],u=1),t=m.createElement("stop").attr({offset:t[0],"stop-color":p,"stop-opacity":u}).add(c),c.stops.push(t)})),n.setAttribute(i,"url("+m.url+"#"+e+")")}},applyTextShadow:function(t){var i,n=this.element,s=-1!==t.indexOf("contrast"),o={},r=this.renderer.forExport||n.style.textShadow!==z&&!xt;s&&(o.textShadow=t=t.replace(/contrast/g,this.renderer.getContrast(n.style.fill))),kt&&(o.textRendering="geometricPrecision"),r?p(n,o):(this.fakeTS=!0,this.ySetter=this.xSetter,i=[].slice.call(n.getElementsByTagName("tspan")),Ut(t.split(/\s?,\s?/g),function(t){var s,o,r=n.firstChild,t=t.split(" ");s=t[t.length-1],(o=t[t.length-2])&&Ut(i,function(t,i){var a;0===i&&(t.setAttribute("x",n.getAttribute("x")),i=n.getAttribute("y"),t.setAttribute("y",i||0),null===i&&n.setAttribute("y",0)),a=t.cloneNode(1),c(a,{"class":"highcharts-text-shadow",fill:s,stroke:s,"stroke-opacity":1/ct(e(o),3),"stroke-width":o,"stroke-linejoin":"round"}),n.insertBefore(a,r)})}))},attr:function(t,e,i){var n,s,o,r=this.element,a=this;if("string"==typeof t&&e!==z&&(n=t,t={},t[n]=e),"string"==typeof t)a=(this[t+"Getter"]||this._defaultGetter).call(this,t,r);else{for(n in t)e=t[n],o=!1,this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(n)&&(s||(this.symbolAttr(t),s=!0),o=!0),!this.rotation||"x"!==n&&"y"!==n||(this.doTransform=!0),o||(this[n+"Setter"]||this._defaultSetter).call(this,e,n,r),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(n)&&this.updateShadows(n,e);this.doTransform&&(this.updateTransform(),this.doTransform=!1)}return i&&i(),a},updateShadows:function(t,e){for(var i=this.shadows,n=i.length;n--;)i[n].setAttribute(t,"height"===t?ct(e-(i[n].cutHeight||0),0):"d"===t?this.d:e)},addClass:function(t){var e=this.element,i=c(e,"class")||"";return-1===i.indexOf(t)&&c(e,"class",i+" "+t),this},symbolAttr:function(t){var e=this;Ut("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),function(i){e[i]=Gt(t[i],e[i])}),e.attr({d:e.renderer.symbols[e.symbolName](e.x,e.y,e.width,e.height,e)})},clip:function(t){return this.attr("clip-path",t?"url("+this.renderer.url+"#"+t.id+")":Rt)},crisp:function(t){var e,i,n={},s=t.strokeWidth||this.strokeWidth||0;i=at(s)%2/2,t.x=ht(t.x||this.x||0)+i,t.y=ht(t.y||this.y||0)+i,t.width=ht((t.width||this.width||0)-2*i),t.height=ht((t.height||this.height||0)-2*i),t.strokeWidth=s;for(e in t)this[e]!==t[e]&&(this[e]=n[e]=t[e]);return n},css:function(t){var i,n,s=this.styles,o={},r=this.element,a="";if(i=!s,t&&t.color&&(t.fill=t.color),s)for(n in t)t[n]!==s[n]&&(o[n]=t[n],i=!0);if(i){if(i=this.textWidth=t&&t.width&&"text"===r.nodeName.toLowerCase()&&e(t.width)||this.textWidth,s&&(t=Wt(s,o)),this.styles=t,i&&(Ct||!Tt&&this.renderer.forExport)&&delete t.width,xt&&!Tt)p(this.element,t);else{s=function(t,e){return"-"+e.toLowerCase()};for(n in t)a+=n.replace(/([A-Z])/g,s)+":"+t[n]+";";c(r,"style",a)}i&&this.added&&this.renderer.buildText(this)}return this},on:function(t,e){var i=this,n=i.element;return R&&"click"===t?(n.ontouchstart=function(t){i.touchEventFired=G.now(),t.preventDefault(),e.call(n,t)},n.onclick=function(t){(-1===yt.indexOf("Android")||G.now()-(i.touchEventFired||0)>1100)&&e.call(n,t)}):n["on"+t]=e,this},setRadialReference:function(t){return this.element.radialReference=t,this},translate:function(t,e){return this.attr({translateX:t,translateY:e})},invert:function(){return this.inverted=!0,this.updateTransform(),this},updateTransform:function(){var t=this.translateX||0,e=this.translateY||0,i=this.scaleX,n=this.scaleY,s=this.inverted,o=this.rotation,r=this.element;s&&(t+=this.attr("width"),e+=this.attr("height")),t=["translate("+t+","+e+")"],s?t.push("rotate(90) scale(-1,1)"):o&&t.push("rotate("+o+" "+(r.getAttribute("x")||0)+" "+(r.getAttribute("y")||0)+")"),(l(i)||l(n))&&t.push("scale("+Gt(i,1)+" "+Gt(n,1)+")"),t.length&&r.setAttribute("transform",t.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,n){var s,o,r,a,l={};return o=this.renderer,r=o.alignedObjects,t?(this.alignOptions=t,this.alignByTranslate=e,(!n||i(n))&&(this.alignTo=s=n||"renderer",h(r,this),r.push(this),n=null)):(t=this.alignOptions,e=this.alignByTranslate,s=this.alignTo),n=Gt(n,o[s],o),s=t.align,o=t.verticalAlign,r=(n.x||0)+(t.x||0),a=(n.y||0)+(t.y||0),("right"===s||"center"===s)&&(r+=(n.width-(t.width||0))/{right:1,center:2}[s]),l[e?"translateX":"x"]=at(r),("bottom"===o||"middle"===o)&&(a+=(n.height-(t.height||0))/({bottom:1,middle:2}[o]||1)),l[e?"translateY":"y"]=at(a),this[this.placed?"animate":"attr"](l),this.placed=!0,this.alignAttr=l,this},getBBox:function(t){var e,i,n=this.renderer,s=this.rotation,o=this.element,r=this.styles,a=s*mt;i=this.textStr;var h,l,c,d=o.style;if(i!==z&&(c=["",s||0,r&&r.fontSize,o.style.width].join(","),c=""===i||Bt.test(i)?"num:"+i.toString().length+c:i+c),c&&!t&&(e=n.cache[c]),!e){if(o.namespaceURI===At||n.forExport){try{l=this.fakeTS&&function(t){Ut(o.querySelectorAll(".highcharts-text-shadow"),function(e){e.style.display=t})},wt&&d.textShadow?(h=d.textShadow,d.textShadow=""):l&&l(Rt),e=o.getBBox?Wt({},o.getBBox()):{width:o.offsetWidth,height:o.offsetHeight},h?d.textShadow=h:l&&l("")}catch(p){}(!e||e.width<0)&&(e={width:0,height:0})}else e=this.htmlGetBBox();n.isSVG&&(t=e.width,i=e.height,xt&&r&&"11px"===r.fontSize&&"16.9"===i.toPrecision(3)&&(e.height=i=14),s&&(e.width=pt(i*ft(a))+pt(t*ut(a)),e.height=pt(i*ut(a))+pt(t*ft(a)))),c&&(n.cache[c]=e)}return e},show:function(t){return this.attr({visibility:t?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(t){var e=this;e.animate({opacity:0},{duration:t||150,complete:function(){e.attr({y:-9999})}})},add:function(t){var e,i=this.renderer,n=this.element;return t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&i.buildText(this),this.added=!0,(!t||t.handleZ||this.zIndex)&&(e=this.zIndexSetter()),e||(t?t.element:i.box).appendChild(n),this.onAdd&&this.onAdd(),this},safeRemoveChild:function(t){var e=t.parentNode;e&&e.removeChild(t)},destroy:function(){var t,e,i=this,n=i.element||{},s=i.shadows,o=i.renderer.isSVG&&"SPAN"===n.nodeName&&i.parentGroup;if(n.onclick=n.onmouseout=n.onmouseover=n.onmousemove=n.point=null,ie(i),i.clipPath&&(i.clipPath=i.clipPath.destroy()),i.stops){for(e=0;e<i.stops.length;e++)i.stops[e]=i.stops[e].destroy();i.stops=null}for(i.safeRemoveChild(n),s&&Ut(s,function(t){i.safeRemoveChild(t)});o&&o.div&&0===o.div.childNodes.length;)n=o.parentGroup,i.safeRemoveChild(o.div),delete o.div,o=n;i.alignTo&&h(i.renderer.alignedObjects,i);for(t in i)delete i[t];return null},shadow:function(t,e,i){var n,s,o,r,a,h,l=[],d=this.element;if(t){for(r=Gt(t.width,3),a=(t.opacity||.15)/r,h=this.parentInverted?"(-1,-1)":"("+Gt(t.offsetX,1)+", "+Gt(t.offsetY,1)+")",n=1;r>=n;n++)s=d.cloneNode(0),o=2*r+1-2*n,c(s,{isShadow:"true",stroke:t.color||"black","stroke-opacity":a*n,"stroke-width":o,transform:"translate"+h,fill:Rt}),i&&(c(s,"height",ct(c(s,"height")-o,0)),s.cutHeight=o),e?e.element.appendChild(s):d.parentNode.insertBefore(s,d),l.push(s);this.shadows=l}return this},xGetter:function(t){return"circle"===this.element.nodeName&&(t={x:"cx",y:"cy"}[t]||t),this._defaultGetter(t)},_defaultGetter:function(t){return t=Gt(this[t],this.element?this.element.getAttribute(t):null,0),/^[\-0-9\.]+$/.test(t)&&(t=parseFloat(t)),t},dSetter:function(t,e,i){t&&t.join&&(t=t.join(" ")),/(NaN| {2}|^$)/.test(t)&&(t="M 0 0"),i.setAttribute(e,t),this[e]=t},dashstyleSetter:function(t){var i;if(t=t&&t.toLowerCase()){for(t=t.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(","),i=t.length;i--;)t[i]=e(t[i])*this["stroke-width"];t=t.join(",").replace("NaN","none"),this.element.setAttribute("stroke-dasharray",t)}},alignSetter:function(t){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[t])},opacitySetter:function(t,e,i){this[e]=t,i.setAttribute(e,t)},titleSetter:function(t){var e=this.element.getElementsByTagName("title")[0];e||(e=st.createElementNS(At,"title"),this.element.appendChild(e)),e.appendChild(st.createTextNode(String(Gt(t),"").replace(/<[^>]*>/g,"")))},textSetter:function(t){t!==this.textStr&&(delete this.bBox,this.textStr=t,this.added&&this.renderer.buildText(this))},fillSetter:function(t,e,i){"string"==typeof t?i.setAttribute(e,t):t&&this.colorGradient(t,e,i)},visibilitySetter:function(t,e,i){"inherit"===t?i.removeAttribute(e):i.setAttribute(e,t)},zIndexSetter:function(t,i){var n,s,o,r=this.renderer,a=this.parentGroup,r=(a||r).element||r.box,h=this.element;n=this.added;var d;if(l(t)&&(h.setAttribute(i,t),t=+t,this[i]===t&&(n=!1),this[i]=t),n){for((t=this.zIndex)&&a&&(a.handleZ=!0),a=r.childNodes,d=0;d<a.length&&!o;d++)n=a[d],s=c(n,"zIndex"),n!==h&&(e(s)>t||!l(t)&&l(s))&&(r.insertBefore(h,n),o=!0);o||r.appendChild(h)}return o},_defaultSetter:function(t,e,i){i.setAttribute(e,t)}},M.prototype.yGetter=M.prototype.xGetter,M.prototype.translateXSetter=M.prototype.translateYSetter=M.prototype.rotationSetter=M.prototype.verticalAlignSetter=M.prototype.scaleXSetter=M.prototype.scaleYSetter=function(t,e){this[e]=t,this.doTransform=!0},M.prototype["stroke-widthSetter"]=M.prototype.strokeSetter=function(t,e,i){this[e]=t,this.stroke&&this["stroke-width"]?(this.strokeWidth=this["stroke-width"],M.prototype.fillSetter.call(this,this.stroke,"stroke",i),i.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===e&&0===t&&this.hasStroke&&(i.removeAttribute("stroke"),this.hasStroke=!1)};var he=function(){this.init.apply(this,arguments)};if(he.prototype={Element:M,init:function(t,e,i,n,s){var o,r=location,n=this.createElement("svg").attr({version:"1.1"}).css(this.getStyle(n));o=n.element,t.appendChild(o),-1===t.innerHTML.indexOf("xmlns")&&c(o,"xmlns",At),this.isSVG=!0,this.box=o,this.boxWrapper=n,this.alignedObjects=[],this.url=(wt||kt)&&st.getElementsByTagName("base").length?r.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(st.createTextNode("Created with Highcharts 4.1.8")),this.defs=this.createElement("defs").add(),this.forExport=s,this.gradients={},this.cache={},this.setSize(e,i,!1);var a;wt&&t.getBoundingClientRect&&(this.subPixelFix=e=function(){p(t,{left:0,top:0}),a=t.getBoundingClientRect(),p(t,{left:lt(a.left)-a.left+"px",top:lt(a.top)-a.top+"px"})},e(),$t(ot,"resize",e))},getStyle:function(t){return this.style=Wt({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},t)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),S(this.gradients||{}),this.gradients=null,t&&(this.defs=t.destroy()),this.subPixelFix&&Jt(ot,"resize",this.subPixelFix),this.alignedObjects=null},createElement:function(t){var e=new this.Element;return e.init(this,t),e},draw:function(){},buildText:function(t){for(var i,n,s=t.element,o=this,r=o.forExport,a=Gt(t.textStr,"").toString(),h=-1!==a.indexOf("<"),l=s.childNodes,d=c(s,"x"),u=t.styles,f=t.textWidth,g=u&&u.lineHeight,m=u&&u.textShadow,y=u&&"ellipsis"===u.textOverflow,v=l.length,x=f&&!t.added&&this.box,b=function(t){return g?e(g):o.fontMetrics(/(px|em)$/.test(t&&t.style.fontSize)?t.style.fontSize:u&&u.fontSize||o.style.fontSize||12,t).h},k=function(t){return t.replace(/&lt;/g,"<").replace(/&gt;/g,">")};v--;)s.removeChild(l[v]);h||m||y||-1!==a.indexOf(" ")?(i=/<.*style="([^"]+)".*>/,n=/<.*href="(http[^"]+)".*>/,x&&x.appendChild(s),a=h?a.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g):[a],""===a[a.length-1]&&a.pop(),Ut(a,function(e,a){var h,l=0,e=e.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");h=e.split("|||"),Ut(h,function(e){if(""!==e||1===h.length){var g,m={},v=st.createElementNS(At,"tspan");if(i.test(e)&&(g=e.match(i)[1].replace(/(;| |^)color([ :])/,"$1fill$2"),c(v,"style",g)),n.test(e)&&!r&&(c(v,"onclick",'location.href="'+e.match(n)[1]+'"'),p(v,{cursor:"pointer"})),e=k(e.replace(/<(.|\n)*?>/g,"")||" ")," "!==e){if(v.appendChild(st.createTextNode(e)),l?m.dx=0:a&&null!==d&&(m.x=d),c(v,m),s.appendChild(v),!l&&a&&(!Tt&&r&&p(v,{display:"block"}),c(v,"dy",b(v))),f){for(var x,w,S,m=e.replace(/([^\^])-/g,"$1- ").split(" "),A=h.length>1||a||m.length>1&&"nowrap"!==u.whiteSpace,T=[],P=b(v),C=1,L=t.rotation,M=e,D=M.length;(A||y)&&(m.length||T.length);)t.rotation=0,x=t.getBBox(!0),S=x.width,!Tt&&o.forExport&&(S=o.measureSpanWidth(v.firstChild.data,t.styles)),x=S>f,void 0===w&&(w=x),y&&w?(D/=2,""===M||!x&&.5>D?m=[]:(x&&(w=!0),M=e.substring(0,M.length+(x?-1:1)*lt(D)),m=[M+(f>3?"?":"")],v.removeChild(v.firstChild))):x&&1!==m.length?(v.removeChild(v.firstChild),T.unshift(m.pop())):(m=T,T=[],m.length&&(C++,v=st.createElementNS(At,"tspan"),c(v,{dy:P,x:d}),g&&c(v,"style",g),s.appendChild(v)),S>f&&(f=S)),m.length&&v.appendChild(st.createTextNode(m.join(" ").replace(/- /g,"-")));w&&t.attr("title",t.textStr),t.rotation=L}l++}}})}),x&&x.removeChild(s),m&&t.applyTextShadow&&t.applyTextShadow(m)):s.appendChild(st.createTextNode(k(a)))},getContrast:function(t){return t=ae(t).rgba,t[0]+t[1]+t[2]>384?"#000000":"#FFFFFF"},button:function(e,i,n,s,o,r,a,h,l){var c,d,p,u,f,g,m=this.label(e,i,n,l,null,null,null,null,"button"),y=0,e={x1:0,y1:0,x2:0,y2:1},o=t({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:e,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},o);return p=o.style,delete o.style,r=t(o,{stroke:"#68A",fill:{linearGradient:e,stops:[[0,"#FFF"],[1,"#ACF"]]}},r),u=r.style,delete r.style,a=t(o,{stroke:"#68A",fill:{linearGradient:e,stops:[[0,"#9BD"],[1,"#CDF"]]}},a),f=a.style,delete a.style,h=t(o,{style:{color:"#CCC"}},h),g=h.style,delete h.style,$t(m.element,xt?"mouseover":"mouseenter",function(){3!==y&&m.attr(r).css(u)}),$t(m.element,xt?"mouseout":"mouseleave",function(){3!==y&&(c=[o,r,a][y],d=[p,u,f][y],m.attr(c).css(d))}),m.setState=function(t){(m.state=y=t)?2===t?m.attr(a).css(f):3===t&&m.attr(h).css(g):m.attr(o).css(p)},m.on("click",function(t){3!==y&&s.call(m,t)}).attr(o).css(Wt({cursor:"default"},p))},crispLine:function(t,e){return t[1]===t[4]&&(t[1]=t[4]=at(t[1])-e%2/2),t[2]===t[5]&&(t[2]=t[5]=at(t[2])+e%2/2),t},path:function(t){var e={fill:Rt};return s(t)?e.d=t:n(t)&&Wt(e,t),this.createElement("path").attr(e)},circle:function(t,e,i){return t=n(t)?t:{x:t,y:e,r:i},e=this.createElement("circle"),e.xSetter=function(t){this.element.setAttribute("cx",t)},e.ySetter=function(t){this.element.setAttribute("cy",t)},e.attr(t)},arc:function(t,e,i,s,o,r){return n(t)&&(e=t.y,i=t.r,s=t.innerR,o=t.start,r=t.end,t=t.x),t=this.symbol("arc",t||0,e||0,i||0,i||0,{innerR:s||0,start:o||0,end:r||0}),t.r=i,t},rect:function(t,e,i,s,o,r){var o=n(t)?t.r:o,a=this.createElement("rect"),t=n(t)?t:t===z?{}:{x:t,y:e,width:ct(i,0),height:ct(s,0)};return r!==z&&(t.strokeWidth=r,t=a.crisp(t)),o&&(t.r=o),a.rSetter=function(t){c(this.element,{rx:t,ry:t})},a.attr(t)},setSize:function(t,e,i){var n=this.alignedObjects,s=n.length;for(this.width=t,this.height=e,this.boxWrapper[Gt(i,!0)?"animate":"attr"]({width:t,height:e});s--;)n[s].align()},g:function(t){var e=this.createElement("g");return l(t)?e.attr({"class":"highcharts-"+t}):e},image:function(t,e,i,n,s){var o={preserveAspectRatio:Rt};return arguments.length>1&&Wt(o,{x:e,y:i,width:n,height:s}),o=this.createElement("image").attr(o),o.element.setAttributeNS?o.element.setAttributeNS("http://www.w3.org/1999/xlink","href",t):o.element.setAttribute("hc-svg-href",t),o},symbol:function(t,e,i,n,s,o){var r,a,h,l=this.symbols[t],l=l&&l(at(e),at(i),n,s,o),c=/^url\((.*?)\)$/;return l?(r=this.path(l),Wt(r,{symbolName:t,x:e,y:i,width:n,height:s}),o&&Wt(r,o)):c.test(t)&&(h=function(t,e){t.element&&(t.attr({width:e[0],height:e[1]}),t.alignByTranslate||t.translate(at((n-e[0])/2),at((s-e[1])/2)))},a=t.match(c)[1],t=Lt[a]||o&&o.width&&o.height&&[o.width,o.height],r=this.image(a).attr({x:e,y:i}),r.isImg=!0,t?h(r,t):(r.attr({width:0,height:0}),u("img",{onload:function(){h(r,Lt[a]=[this.width,this.height])},src:a}))),r},symbols:{circle:function(t,e,i,n){var s=.166*i;return["M",t+i/2,e,"C",t+i+s,e,t+i+s,e+n,t+i/2,e+n,"C",t-s,e+n,t-s,e,t+i/2,e,"Z"]},square:function(t,e,i,n){return["M",t,e,"L",t+i,e,t+i,e+n,t,e+n,"Z"]},triangle:function(t,e,i,n){return["M",t+i/2,e,"L",t+i,e+n,t,e+n,"Z"]},"triangle-down":function(t,e,i,n){return["M",t,e,"L",t+i,e,t+i/2,e+n,"Z"]},diamond:function(t,e,i,n){return["M",t+i/2,e,"L",t+i,e+n/2,t+i/2,e+n,t,e+n/2,"Z"]},arc:function(t,e,i,n,s){var o=s.start,i=s.r||i||n,r=s.end-.001,n=s.innerR,a=s.open,h=ut(o),l=ft(o),c=ut(r),r=ft(r),s=s.end-o<gt?0:1;return["M",t+i*h,e+i*l,"A",i,i,0,s,1,t+i*c,e+i*r,a?"M":"L",t+n*c,e+n*r,"A",n,n,0,s,0,t+n*h,e+n*l,a?"":"Z"]},callout:function(t,e,i,n,s){var o,r=dt(s&&s.r||0,i,n),a=r+6,h=s&&s.anchorX,s=s&&s.anchorY;return o=["M",t+r,e,"L",t+i-r,e,"C",t+i,e,t+i,e,t+i,e+r,"L",t+i,e+n-r,"C",t+i,e+n,t+i,e+n,t+i-r,e+n,"L",t+r,e+n,"C",t,e+n,t,e+n,t,e+n-r,"L",t,e+r,"C",t,e,t,e,t+r,e], h&&h>i&&s>e+a&&e+n-a>s?o.splice(13,3,"L",t+i,s-6,t+i+6,s,t+i,s+6,t+i,e+n-r):h&&0>h&&s>e+a&&e+n-a>s?o.splice(33,3,"L",t,s+6,t-6,s,t,s-6,t,e+r):s&&s>n&&h>t+a&&t+i-a>h?o.splice(23,3,"L",h+6,e+n,h,e+n+6,h-6,e+n,t+r,e+n):s&&0>s&&h>t+a&&t+i-a>h&&o.splice(3,3,"L",h-6,e,h,e-6,h+6,e,i-r,e),o}},clipRect:function(t,e,i,n){var s="highcharts-"+Mt++,o=this.createElement("clipPath").attr({id:s}).add(this.defs),t=this.rect(t,e,i,n,0).add(o);return t.id=s,t.clipPath=o,t.count=0,t},text:function(t,e,i,n){var s=Ct||!Tt&&this.forExport,o={};return n&&!this.forExport?this.html(t,e,i):(o.x=Math.round(e||0),i&&(o.y=Math.round(i)),(t||0===t)&&(o.text=t),t=this.createElement("text").attr(o),s&&t.css({position:"absolute"}),n||(t.xSetter=function(t,e,i){var n,s,o=i.getElementsByTagName("tspan"),r=i.getAttribute(e);for(s=0;s<o.length;s++)n=o[s],n.getAttribute(e)===r&&n.setAttribute(e,t);i.setAttribute(e,t)}),t)},fontMetrics:function(t,i){var n,s,t=t||this.style.fontSize;return i&&ot.getComputedStyle&&(i=i.element||i,t=(n=ot.getComputedStyle(i,""))&&n.fontSize),t=/px/.test(t)?e(t):/em/.test(t)?12*parseFloat(t):12,n=24>t?t+3:at(1.2*t),s=at(.8*n),{h:n,b:s,f:t}},rotCorr:function(t,e,i){var n=t;return e&&i&&(n=ct(n*ut(e*mt),4)),{x:-t/3*ft(e*mt),y:n}},label:function(e,i,n,s,o,r,a,h,c){function d(){var t,e;t=A.element.style,g=(void 0===m||void 0===y||S.styles.textAlign)&&l(A.textStr)&&A.getBBox(),S.width=(m||g.width||0)+2*P+C,S.height=(y||g.height||0)+2*P,b=P+w.fontMetrics(t&&t.fontSize,A).b,k&&(f||(t=at(-T*P)+L,e=(h?-b:0)+L,S.box=f=s?w.symbol(s,t,e,S.width,S.height,D):w.rect(t,e,S.width,S.height,0,D[Ht]),f.isImg||f.attr("fill",Rt),f.add(S)),f.isImg||f.attr(Wt({width:at(S.width),height:at(S.height)},D)),D=null)}function p(){var t,e=S.styles,e=e&&e.textAlign,i=C+P*(1-T);t=h?0:b,l(m)&&g&&("center"===e||"right"===e)&&(i+={center:.5,right:1}[e]*(m-g.width)),(i!==A.x||t!==A.y)&&(A.attr("x",i),t!==z&&A.attr("y",t)),A.x=i,A.y=t}function u(t,e){f?f.attr(t,e):D[t]=e}var f,g,m,y,v,x,b,k,w=this,S=w.g(c),A=w.text("",0,0,a).attr({zIndex:1}),T=0,P=3,C=0,L=0,D={};S.onAdd=function(){A.add(S),S.attr({text:e||0===e?e:"",x:i,y:n}),f&&l(o)&&S.attr({anchorX:o,anchorY:r})},S.widthSetter=function(t){m=t},S.heightSetter=function(t){y=t},S.paddingSetter=function(t){l(t)&&t!==P&&(P=S.padding=t,p())},S.paddingLeftSetter=function(t){l(t)&&t!==C&&(C=t,p())},S.alignSetter=function(t){T={left:0,center:.5,right:1}[t]},S.textSetter=function(t){t!==z&&A.textSetter(t),d(),p()},S["stroke-widthSetter"]=function(t,e){t&&(k=!0),L=t%2/2,u(e,t)},S.strokeSetter=S.fillSetter=S.rSetter=function(t,e){"fill"===e&&t&&(k=!0),u(e,t)},S.anchorXSetter=function(t,e){o=t,u(e,at(t)-L-v)},S.anchorYSetter=function(t,e){r=t,u(e,t-x)},S.xSetter=function(t){S.x=t,T&&(t-=T*((m||g.width)+P)),v=at(t),S.attr("translateX",v)},S.ySetter=function(t){x=S.y=at(t),S.attr("translateY",x)};var O=S.css;return Wt(S,{css:function(e){if(e){var i={},e=t(e);Ut(S.textProps,function(t){e[t]!==z&&(i[t]=e[t],delete e[t])}),A.css(i)}return O.call(S,e)},getBBox:function(){return{width:g.width+2*P,height:g.height+2*P,x:g.x-P,y:g.y-P}},shadow:function(t){return f&&f.shadow(t),S},destroy:function(){Jt(S.element,"mouseenter"),Jt(S.element,"mouseleave"),A&&(A=A.destroy()),f&&(f=f.destroy()),M.prototype.destroy.call(S),S=w=d=p=u=null}})}},I=he,Wt(M.prototype,{htmlCss:function(t){var e=this.element;return(e=t&&"SPAN"===e.tagName&&t.width)&&(delete t.width,this.textWidth=e,this.updateTransform()),t&&"ellipsis"===t.textOverflow&&(t.whiteSpace="nowrap",t.overflow="hidden"),this.styles=Wt(this.styles,t),p(this.element,t),this},htmlGetBBox:function(){var t=this.element;return"text"===t.nodeName&&(t.style.position="absolute"),{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var t=this.renderer,i=this.element,n=this.translateX||0,s=this.translateY||0,o=this.x||0,r=this.y||0,a=this.textAlign||"left",h={left:0,center:.5,right:1}[a],c=this.shadows,d=this.styles;if(p(i,{marginLeft:n,marginTop:s}),c&&Ut(c,function(t){p(t,{marginLeft:n+1,marginTop:s+1})}),this.inverted&&Ut(i.childNodes,function(e){t.invertChild(e,i)}),"SPAN"===i.tagName){var u,f=this.rotation,g=e(this.textWidth),m=[f,a,i.innerHTML,this.textWidth,this.textAlign].join(",");m!==this.cTT&&(u=t.fontMetrics(i.style.fontSize).b,l(f)&&this.setSpanRotation(f,h,u),c=Gt(this.elemWidth,i.offsetWidth),c>g&&/[ \-]/.test(i.textContent||i.innerText)&&(p(i,{width:g+"px",display:"block",whiteSpace:d&&d.whiteSpace||"normal"}),c=g),this.getSpanCorrection(c,u,h,f,a)),p(i,{left:o+(this.xCorr||0)+"px",top:r+(this.yCorr||0)+"px"}),kt&&(u=i.offsetHeight),this.cTT=m}}else this.alignOnAdd=!0},setSpanRotation:function(t,e,i){var n={},s=xt?"-ms-transform":kt?"-webkit-transform":wt?"MozTransform":vt?"-o-transform":"";n[s]=n.transform="rotate("+t+"deg)",n[s+(wt?"Origin":"-origin")]=n.transformOrigin=100*e+"% "+i+"px",p(this.element,n)},getSpanCorrection:function(t,e,i){this.xCorr=-t*i,this.yCorr=-e}}),Wt(he.prototype,{html:function(t,e,i){var n=this.createElement("span"),s=n.element,o=n.renderer;return n.textSetter=function(t){t!==s.innerHTML&&delete this.bBox,s.innerHTML=this.textStr=t,n.htmlUpdateTransform()},n.xSetter=n.ySetter=n.alignSetter=n.rotationSetter=function(t,e){"align"===e&&(e="textAlign"),n[e]=t,n.htmlUpdateTransform()},n.attr({text:t,x:at(e),y:at(i)}).css({position:"absolute",fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),s.style.whiteSpace="nowrap",n.css=n.htmlCss,o.isSVG&&(n.add=function(t){var e,i=o.box.parentNode,r=[];if(this.parentGroup=t){if(e=t.div,!e){for(;t;)r.push(t),t=t.parentGroup;Ut(r.reverse(),function(t){var n,s=c(t.element,"class");s&&(s={className:s}),e=t.div=t.div||u(It,s,{position:"absolute",left:(t.translateX||0)+"px",top:(t.translateY||0)+"px"},e||i),n=e.style,Wt(t,{translateXSetter:function(e,i){n.left=e+"px",t[i]=e,t.doTransform=!0},translateYSetter:function(e,i){n.top=e+"px",t[i]=e,t.doTransform=!0}}),Ft(t,"visibilitySetter",function(t,e,i,s){t.call(this,e,i,s),n[i]=e})})}}else e=i;return e.appendChild(s),n.added=!0,n.alignOnAdd&&n.htmlUpdateTransform(),n}),n}}),!Tt&&!Ct){Nt={init:function(t,e){var i=["<",e,' filled="f" stroked="f"'],n=["position: ","absolute",";"],s=e===It;("shape"===e||s)&&n.push("left:0;top:0;width:1px;height:1px;"),n.push("visibility: ",s?"hidden":"visible"),i.push(' style="',n.join(""),'"/>'),e&&(i=s||"span"===e||"img"===e?i.join(""):t.prepVML(i),this.element=u(i)),this.renderer=t},add:function(t){var e=this.renderer,i=this.element,n=e.box,n=t?t.element||t:n;return t&&t.inverted&&e.invertChild(i,n),n.appendChild(i),this.added=!0,this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform(),this.onAdd&&this.onAdd(),this},updateTransform:M.prototype.htmlUpdateTransform,setSpanRotation:function(){var t=this.rotation,e=ut(t*mt),i=ft(t*mt);p(this.element,{filter:t?["progid:DXImageTransform.Microsoft.Matrix(M11=",e,", M12=",-i,", M21=",i,", M22=",e,", sizingMethod='auto expand')"].join(""):Rt})},getSpanCorrection:function(t,e,i,n,s){var o,r=n?ut(n*mt):1,a=n?ft(n*mt):0,h=Gt(this.elemHeight,this.element.offsetHeight);this.xCorr=0>r&&-t,this.yCorr=0>a&&-h,o=0>r*a,this.xCorr+=a*e*(o?1-i:i),this.yCorr-=r*e*(n?o?i:1-i:1),s&&"left"!==s&&(this.xCorr-=t*i*(0>r?-1:1),n&&(this.yCorr-=h*i*(0>a?-1:1)),p(this.element,{textAlign:s}))},pathToVML:function(t){for(var e=t.length,i=[];e--;)o(t[e])?i[e]=at(10*t[e])-5:"Z"===t[e]?i[e]="x":(i[e]=t[e],!t.isArc||"wa"!==t[e]&&"at"!==t[e]||(i[e+5]===i[e+7]&&(i[e+7]+=t[e+7]>t[e+5]?1:-1),i[e+6]===i[e+8]&&(i[e+8]+=t[e+8]>t[e+6]?1:-1)));return i.join(" ")||"x"},clip:function(t){var e,i=this;return t?(e=t.members,h(e,i),e.push(i),i.destroyClip=function(){h(e,i)},t=t.getCSS(i)):(i.destroyClip&&i.destroyClip(),t={clip:bt?"inherit":"rect(auto)"}),i.css(t)},css:M.prototype.htmlCss,safeRemoveChild:function(t){t.parentNode&&A(t)},destroy:function(){return this.destroyClip&&this.destroyClip(),M.prototype.destroy.apply(this)},on:function(t,e){return this.element["on"+t]=function(){var t=ot.event;t.target=t.srcElement,e(t)},this},cutOffPath:function(t,i){var n,t=t.split(/[ ,]/);return n=t.length,(9===n||11===n)&&(t[n-4]=t[n-2]=e(t[n-2])-10*i),t.join(" ")},shadow:function(t,i,n){var s,o,r,a,h,l,c,d=[],p=this.element,f=this.renderer,g=p.style,m=p.path;if(m&&"string"!=typeof m.value&&(m="x"),h=m,t){for(l=Gt(t.width,3),c=(t.opacity||.15)/l,s=1;3>=s;s++)a=2*l+1-2*s,n&&(h=this.cutOffPath(m.value,a+.5)),r=['<shape isShadow="true" strokeweight="',a,'" filled="false" path="',h,'" coordsize="10 10" style="',p.style.cssText,'" />'],o=u(f.prepVML(r),null,{left:e(g.left)+Gt(t.offsetX,1),top:e(g.top)+Gt(t.offsetY,1)}),n&&(o.cutOff=a+1),r=['<stroke color="',t.color||"black",'" opacity="',c*s,'"/>'],u(f.prepVML(r),null,null,o),i?i.element.appendChild(o):p.parentNode.insertBefore(o,p),d.push(o);this.shadows=d}return this},updateShadows:Dt,setAttr:function(t,e){bt?this.element[t]=e:this.element.setAttribute(t,e)},classSetter:function(t){this.element.className=t},dashstyleSetter:function(t,e,i){(i.getElementsByTagName("stroke")[0]||u(this.renderer.prepVML(["<stroke/>"]),null,null,i))[e]=t||"solid",this[e]=t},dSetter:function(t,e,i){var n=this.shadows,t=t||[];if(this.d=t.join&&t.join(" "),i.path=t=this.pathToVML(t),n)for(i=n.length;i--;)n[i].path=n[i].cutOff?this.cutOffPath(t,n[i].cutOff):t;this.setAttr(e,t)},fillSetter:function(t,e,i){var n=i.nodeName;"SPAN"===n?i.style.color=t:"IMG"!==n&&(i.filled=t!==Rt,this.setAttr("fillcolor",this.renderer.color(t,i,e,this)))},opacitySetter:Dt,rotationSetter:function(t,e,i){i=i.style,this[e]=i[e]=t,i.left=-at(ft(t*mt)+1)+"px",i.top=at(ut(t*mt))+"px"},strokeSetter:function(t,e,i){this.setAttr("strokecolor",this.renderer.color(t,i,e))},"stroke-widthSetter":function(t,e,i){i.stroked=!!t,this[e]=t,o(t)&&(t+="px"),this.setAttr("strokeweight",t)},titleSetter:function(t,e){this.setAttr(e,t)},visibilitySetter:function(t,e,i){"inherit"===t&&(t="visible"),this.shadows&&Ut(this.shadows,function(i){i.style[e]=t}),"DIV"===i.nodeName&&(t="hidden"===t?"-999em":0,bt||(i.style[e]=t?"visible":"hidden"),e="top"),i.style[e]=t},xSetter:function(t,e,i){this[e]=t,"x"===e?e="left":"y"===e&&(e="top"),this.updateClipping?(this[e]=t,this.updateClipping()):i.style[e]=t},zIndexSetter:function(t,e,i){i.style[e]=t}},nt.VMLElement=Nt=f(M,Nt),Nt.prototype.ySetter=Nt.prototype.widthSetter=Nt.prototype.heightSetter=Nt.prototype.xSetter;var le={Element:Nt,isIE8:yt.indexOf("MSIE 8.0")>-1,init:function(t,e,i,n){var s;if(this.alignedObjects=[],n=this.createElement(It).css(Wt(this.getStyle(n),{position:"relative"})),s=n.element,t.appendChild(n.element),this.isVML=!0,this.box=s,this.boxWrapper=n,this.cache={},this.setSize(e,i,!1),!st.namespaces.hcv){st.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{st.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(o){st.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(t,e,i,s){var o=this.createElement(),r=n(t);return Wt(o,{members:[],count:0,left:(r?t.x:t)+1,top:(r?t.y:e)+1,width:(r?t.width:i)-1,height:(r?t.height:s)-1,getCSS:function(t){var e=t.element,i=e.nodeName,t=t.inverted,n=this.top-("shape"===i?e.offsetTop:0),s=this.left,e=s+this.width,o=n+this.height,n={clip:"rect("+at(t?s:n)+"px,"+at(t?o:e)+"px,"+at(t?e:o)+"px,"+at(t?n:s)+"px)"};return!t&&bt&&"DIV"===i&&Wt(n,{width:e+"px",height:o+"px"}),n},updateClipping:function(){Ut(o.members,function(t){t.element&&t.css(o.getCSS(t))})}})},color:function(t,e,i,n){var s,o,r,a=this,h=/^rgba/,l=Rt;if(t&&t.linearGradient?r="gradient":t&&t.radialGradient&&(r="pattern"),r){var c,d,p,f,g,m,y,v,x=t.linearGradient||t.radialGradient,b="",t=t.stops,k=[],w=function(){o=['<fill colors="'+k.join(",")+'" opacity="',g,'" o:opacity2="',f,'" type="',r,'" ',b,'focus="100%" method="any" />'],u(a.prepVML(o),null,null,e)};if(p=t[0],v=t[t.length-1],p[0]>0&&t.unshift([0,p[1]]),v[0]<1&&t.push([1,v[1]]),Ut(t,function(t,e){h.test(t[1])?(s=ae(t[1]),c=s.get("rgb"),d=s.get("a")):(c=t[1],d=1),k.push(100*t[0]+"% "+c),e?(g=d,m=c):(f=d,y=c)}),"fill"===i)if("gradient"===r)i=x.x1||x[0]||0,t=x.y1||x[1]||0,p=x.x2||x[2]||0,x=x.y2||x[3]||0,b='angle="'+(90-180*rt.atan((x-t)/(p-i))/gt)+'"',w();else{var S,l=x.r,A=2*l,T=2*l,P=x.cx,C=x.cy,L=e.radialReference,l=function(){L&&(S=n.getBBox(),P+=(L[0]-S.x)/S.width-.5,C+=(L[1]-S.y)/S.height-.5,A*=L[2]/S.width,T*=L[2]/S.height),b='src="'+X.global.VMLRadialGradientURL+'" size="'+A+","+T+'" origin="0.5,0.5" position="'+P+","+C+'" color2="'+y+'" ',w()};n.added?l():n.onAdd=l,l=m}else l=c}else h.test(t)&&"IMG"!==e.tagName?(s=ae(t),o=["<",i,' opacity="',s.get("a"),'"/>'],u(this.prepVML(o),null,null,e),l=s.get("rgb")):(l=e.getElementsByTagName(i),l.length&&(l[0].opacity=1,l[0].type="solid"),l=t);return l},prepVML:function(t){var e=this.isIE8,t=t.join("");return e?(t=t.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),t=-1===t.indexOf('style="')?t.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):t.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):t=t.replace("<","<hcv:"),t},text:he.prototype.html,path:function(t){var e={coordsize:"10 10"};return s(t)?e.d=t:n(t)&&Wt(e,t),this.createElement("shape").attr(e)},circle:function(t,e,i){var s=this.symbol("circle");return n(t)&&(i=t.r,e=t.y,t=t.x),s.isCircle=!0,s.r=i,s.attr({x:t,y:e})},g:function(t){var e;return t&&(e={className:"highcharts-"+t,"class":"highcharts-"+t}),this.createElement(It).attr(e)},image:function(t,e,i,n,s){var o=this.createElement("img").attr({src:t});return arguments.length>1&&o.attr({x:e,y:i,width:n,height:s}),o},createElement:function(t){return"rect"===t?this.symbol(t):he.prototype.createElement.call(this,t)},invertChild:function(t,i){var n=this,s=i.style,o="IMG"===t.tagName&&t.style;p(t,{flip:"x",left:e(s.width)-(o?e(o.top):1),top:e(s.height)-(o?e(o.left):1),rotation:-90}),Ut(t.childNodes,function(e){n.invertChild(e,t)})},symbols:{arc:function(t,e,i,n,s){var o=s.start,r=s.end,a=s.r||i||n,i=s.innerR,n=ut(o),h=ft(o),l=ut(r),c=ft(r);return r-o===0?["x"]:(o=["wa",t-a,e-a,t+a,e+a,t+a*n,e+a*h,t+a*l,e+a*c],s.open&&!i&&o.push("e","M",t,e),o.push("at",t-i,e-i,t+i,e+i,t+i*l,e+i*c,t+i*n,e+i*h,"x","e"),o.isArc=!0,o)},circle:function(t,e,i,n,s){return s&&(i=n=2*s.r),s&&s.isCircle&&(t-=i/2,e-=n/2),["wa",t,e,t+i,e+n,t+i,e+n/2,t+i,e+n/2,"e"]},rect:function(t,e,i,n,s){return he.prototype.symbols[l(s)&&s.r?"callout":"square"].call(0,t,e,i,n,s)}}};nt.VMLRenderer=Nt=function(){this.init.apply(this,arguments)},Nt.prototype=t(he.prototype,le),I=Nt}he.prototype.measureSpanWidth=function(t,e){var i,n=st.createElement("span");return i=st.createTextNode(t),n.appendChild(i),p(n,e),this.box.appendChild(n),i=n.offsetWidth,A(n),i};var ce;Ct&&(nt.CanVGRenderer=Nt=function(){At="http://www.w3.org/1999/xhtml"},Nt.prototype.symbols={},ce=function(){function t(){var t,i=e.length;for(t=0;i>t;t++)e[t]();e=[]}var e=[];return{push:function(i,n){0===e.length&&jt(n,t),e.push(i)}}}(),I=Nt),D.prototype={addLabel:function(){var e,i=this.axis,n=i.options,s=i.chart,o=i.categories,r=i.names,h=this.pos,c=n.labels,d=i.tickPositions,p=h===d[0],u=h===d[d.length-1],r=o?Gt(o[h],r[h],h):h,o=this.label,d=d.info;i.isDatetimeAxis&&d&&(e=n.dateTimeLabelFormats[d.higherRanks[h]||d.unitName]),this.isFirst=p,this.isLast=u,n=i.labelFormatter.call({axis:i,chart:s,isFirst:p,isLast:u,dateTimeLabelFormat:e,value:i.isLog?P(a(r)):r}),l(o)?o&&o.attr({text:n}):(this.labelLength=(this.label=o=l(n)&&c.enabled?s.renderer.text(n,0,0,c.useHTML).css(t(c.style)).add(i.labelGroup):null)&&o.getBBox().width,this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(t){var e,i=this.axis,n=t.x,s=i.chart.chartWidth,o=i.chart.spacing,r=Gt(i.labelLeft,dt(i.pos,o[3])),o=Gt(i.labelRight,ct(i.pos+i.len,s-o[1])),a=this.label,h=this.rotation,l={left:0,center:.5,right:1}[i.labelAlign],c=a.getBBox().width,d=i.slotWidth,p=1,u={};h?0>h&&r>n-l*c?e=at(n/ut(h*mt)-r):h>0&&n+l*c>o&&(e=at((s-n)/ut(h*mt))):(s=n+(1-l)*c,r>n-l*c?d=t.x+d*(1-l)-r:s>o&&(d=o-t.x+d*l,p=-1),d=dt(i.slotWidth,d),d<i.slotWidth&&"center"===i.labelAlign&&(t.x+=p*(i.slotWidth-d-l*(i.slotWidth-dt(c,d)))),(c>d||i.autoRotation&&a.styles.width)&&(e=d)),e&&(u.width=e,i.options.labels.style.textOverflow||(u.textOverflow="ellipsis"),a.css(u))},getPosition:function(t,e,i,n){var s=this.axis,o=s.chart,r=n&&o.oldChartHeight||o.chartHeight;return{x:t?s.translate(e+i,null,null,n)+s.transB:s.left+s.offset+(s.opposite?(n&&o.oldChartWidth||o.chartWidth)-s.right-s.left:0),y:t?r-s.bottom+s.offset-(s.opposite?s.height:0):r-s.translate(e+i,null,null,n)-s.transB}},getLabelPosition:function(t,e,i,n,s,o,r,a){var h=this.axis,l=h.transA,c=h.reversed,d=h.staggerLines,p=h.tickRotCorr||{x:0,y:0},i=Gt(s.y,p.y+(2===h.side?8:-(i.getBBox().height/2))),t=t+s.x+p.x-(o&&n?o*l*(c?-1:1):0),e=e+i-(o&&!n?o*l*(c?1:-1):0);return d&&(e+=r/(a||1)%d*(h.labelOffset/d)),{x:t,y:at(e)}},getMarkPath:function(t,e,i,n,s,o){return o.crispLine(["M",t,e,"L",t+(s?0:-i),e+(s?i:0)],n)},render:function(t,e,i){var n=this.axis,s=n.options,o=n.chart.renderer,r=n.horiz,a=this.type,h=this.label,l=this.pos,c=s.labels,d=this.gridLine,p=a?a+"Grid":"grid",u=a?a+"Tick":"tick",f=s[p+"LineWidth"],g=s[p+"LineColor"],m=s[p+"LineDashStyle"],y=s[u+"Length"],p=Gt(s[u+"Width"],!a&&n.isXAxis?1:0),v=s[u+"Color"],x=s[u+"Position"],u=this.mark,b=c.step,k=!0,w=n.tickmarkOffset,S=this.getPosition(r,l,w,e),A=S.x,S=S.y,T=r&&A===n.pos+n.len||!r&&S===n.pos?-1:1,i=Gt(i,1);this.isActive=!0,f&&(l=n.getPlotLinePath(l+w,f*T,e,!0),d===z&&(d={stroke:g,"stroke-width":f},m&&(d.dashstyle=m),a||(d.zIndex=1),e&&(d.opacity=0),this.gridLine=d=f?o.path(l).attr(d).add(n.gridGroup):null),!e&&d&&l&&d[this.isNew?"attr":"animate"]({d:l,opacity:i})),p&&y&&("inside"===x&&(y=-y),n.opposite&&(y=-y),a=this.getMarkPath(A,S,y,p*T,r,o),u?u.animate({d:a,opacity:i}):this.mark=o.path(a).attr({stroke:v,"stroke-width":p,opacity:i}).add(n.axisGroup)),h&&!isNaN(A)&&(h.xy=S=this.getLabelPosition(A,S,h,r,c,w,t,b),this.isFirst&&!this.isLast&&!Gt(s.showFirstLabel,1)||this.isLast&&!this.isFirst&&!Gt(s.showLastLabel,1)?k=!1:r&&!n.isRadial&&!c.step&&!c.rotation&&!e&&0!==i&&this.handleOverflow(S),b&&t%b&&(k=!1),k&&!isNaN(S.y)?(S.opacity=i,h[this.isNew?"attr":"animate"](S),this.isNew=!1):h.attr("y",-9999))},destroy:function(){S(this,this.axis)}},nt.PlotLineOrBand=function(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)},nt.PlotLineOrBand.prototype={render:function(){var e,i=this,n=i.axis,s=n.horiz,o=i.options,a=o.label,h=i.label,c=o.width,d=o.to,p=o.from,u=l(p)&&l(d),f=o.value,g=o.dashStyle,m=i.svgElem,y=[],v=o.color,x=o.zIndex,b=o.events,S={},A=n.chart.renderer;if(n.isLog&&(p=r(p),d=r(d),f=r(f)),c)y=n.getPlotLinePath(f,c),S={stroke:v,"stroke-width":c},g&&(S.dashstyle=g);else{if(!u)return;y=n.getPlotBandPath(p,d,o),v&&(S.fill=v),o.borderWidth&&(S.stroke=o.borderColor,S["stroke-width"]=o.borderWidth)}if(l(x)&&(S.zIndex=x),m)y?m.animate({d:y},null,m.onGetPath):(m.hide(),m.onGetPath=function(){m.show()},h&&(i.label=h=h.destroy()));else if(y&&y.length&&(i.svgElem=m=A.path(y).attr(S).add(),b))for(e in o=function(t){m.on(t,function(e){b[t].apply(i,[e])})},b)o(e);return a&&l(a.text)&&y&&y.length&&n.width>0&&n.height>0?(a=t({align:s&&u&&"center",x:s?!u&&4:10,verticalAlign:!s&&u&&"middle",y:s?u?16:10:u?6:-4,rotation:s&&!u&&90},a),h||(S={align:a.textAlign||a.align,rotation:a.rotation},l(x)&&(S.zIndex=x),i.label=h=A.text(a.text,0,0,a.useHTML).attr(S).css(a.style).add()),n=[y[1],y[4],u?y[6]:y[1]],u=[y[2],y[5],u?y[7]:y[2]],y=k(n),s=k(u),h.align(a,!1,{x:y,y:s,width:w(n)-y,height:w(u)-s}),h.show()):h&&h.hide(),i},destroy:function(){h(this.axis.plotLinesAndBands,this),delete this.axis,S(this)}};var de=nt.Axis=function(){this.init.apply(this,arguments)};de.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#D8D8D8",labels:{enabled:!0,style:{color:"#606060",cursor:"default",fontSize:"11px"},x:0,y:15},lineColor:"#C0D0E0",lineWidth:1,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#707070"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return nt.numberFormat(this.total,-1)},style:t(ne.line.dataLabels.style,{color:"#000000"})}},defaultLeftAxisOptions:{labels:{x:-15,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0,y:null},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0,y:-15},title:{rotation:0}},init:function(t,e){var i=e.isX;this.chart=t,this.horiz=t.inverted?!i:i,this.coll=(this.isXAxis=i)?"xAxis":"yAxis",this.opposite=e.opposite,this.side=e.side||(this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(e);var n=this.options,s=n.type;this.labelFormatter=n.labels.formatter||this.defaultLabelFormatter,this.userOptions=e,this.minPixelPadding=0,this.reversed=n.reversed,this.zoomEnabled=n.zoomEnabled!==!1,this.categories=n.categories||"category"===s,this.names=this.names||[],this.isLog="logarithmic"===s,this.isDatetimeAxis="datetime"===s,this.isLinked=l(n.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=n.minRange||n.maxZoom,this.range=n.range,this.offset=n.offset||0,this.stacks={},this.oldStacks={},this.stacksTouched=0,this.min=this.max=null,this.crosshair=Gt(n.crosshair,d(t.options.tooltip.crosshairs)[i?0:1],!1);var o,n=this.options.events;-1===_t(this,t.axes)&&(i&&!this.isColorAxis?t.axes.splice(t.xAxis.length,0,this):t.axes.push(this),t[this.coll].push(this)),this.series=this.series||[],t.inverted&&i&&this.reversed===z&&(this.reversed=!0),this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(o in n)$t(this,o,n[o]);this.isLog&&(this.val2lin=r,this.lin2val=a)},setOptions:function(e){this.options=t(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],t(X[this.coll],e))},defaultLabelFormatter:function(){var t,e=this.axis,i=this.value,n=e.categories,s=this.dateTimeLabelFormat,o=X.lang.numericSymbols,r=o&&o.length,a=e.options.labels.format,e=e.isLog?i:e.tickInterval;if(a)t=y(a,this);else if(n)t=i;else if(s)t=H(s,i);else if(r&&e>=1e3)for(;r--&&t===z;)n=Math.pow(1e3,r+1),e>=n&&10*i%n===0&&null!==o[r]&&(t=nt.numberFormat(i/n,-1)+o[r]);return t===z&&(t=pt(i)>=1e4?nt.numberFormat(i,-1):nt.numberFormat(i,-1,z,"")),t},getSeriesExtremes:function(){var t=this,e=t.chart;t.hasVisibleSeries=!1,t.dataMin=t.dataMax=t.ignoreMinPadding=t.ignoreMaxPadding=null,t.buildStacks&&t.buildStacks(),Ut(t.series,function(i){if(i.visible||!e.options.chart.ignoreHiddenSeries){var n;n=i.options.threshold;var s;t.hasVisibleSeries=!0,t.isLog&&0>=n&&(n=null),t.isXAxis?(n=i.xData,n.length&&(t.dataMin=dt(Gt(t.dataMin,n[0]),k(n)),t.dataMax=ct(Gt(t.dataMax,n[0]),w(n)))):(i.getExtremes(),s=i.dataMax,i=i.dataMin,l(i)&&l(s)&&(t.dataMin=dt(Gt(t.dataMin,i),i),t.dataMax=ct(Gt(t.dataMax,s),s)),l(n)&&(t.dataMin>=n?(t.dataMin=n,t.ignoreMinPadding=!0):t.dataMax<n&&(t.dataMax=n,t.ignoreMaxPadding=!0)))}})},translate:function(t,e,i,n,s,r){var a=this.linkedParent||this,h=1,l=0,c=n?a.oldTransA:a.transA,n=n?a.oldMin:a.min,d=a.minPixelPadding,s=(a.doPostTranslate||a.isLog&&s)&&a.lin2val;return c||(c=a.transA),i&&(h*=-1,l=a.len),a.reversed&&(h*=-1,l-=h*(a.sector||a.len)),e?(t=t*h+l,t-=d,t=t/c+n,s&&(t=a.lin2val(t))):(s&&(t=a.val2lin(t)),"between"===r&&(r=.5),t=h*(t-n)*c+l+h*d+(o(r)?c*r*a.pointRange:0)),t},toPixels:function(t,e){return this.translate(t,!1,!this.horiz,null,!0)+(e?0:this.pos)},toValue:function(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(t,e,i,n,s){var o,r,a,h=this.chart,l=this.left,c=this.top,d=i&&h.oldChartHeight||h.chartHeight,p=i&&h.oldChartWidth||h.chartWidth;o=this.transB;var u=function(t,e,i){return(e>t||t>i)&&(n?t=dt(ct(e,t),i):a=!0),t},s=Gt(s,this.translate(t,null,null,i)),t=i=at(s+o);return o=r=at(d-s-o),isNaN(s)?a=!0:this.horiz?(o=c,r=d-this.bottom,t=i=u(t,l,l+this.width)):(t=l,i=p-this.right,o=r=u(o,c,c+this.height)),a&&!n?null:h.renderer.crispLine(["M",t,o,"L",i,r],e||1)},getLinearTickPositions:function(t,e,i){var n,s=P(ht(e/t)*t),r=P(lt(i/t)*t),a=[];if(e===i&&o(e))return[e];for(e=s;r>=e&&(a.push(e),e=P(e+t),e!==n);)n=e;return a},getMinorTickPositions:function(){var t,e=this.options,i=this.tickPositions,n=this.minorTickInterval,s=[],o=this.pointRangePadding||0;t=this.min-o;var o=this.max+o,r=o-t;if(r&&r/n<this.len/3)if(this.isLog)for(o=i.length,t=1;o>t;t++)s=s.concat(this.getLogTickPositions(n,i[t-1],i[t],!0));else if(this.isDatetimeAxis&&"auto"===e.minorTickInterval)s=s.concat(this.getTimeTicks(this.normalizeTimeTickInterval(n),t,o,e.startOfWeek));else for(i=t+(i[0]-t)%n;o>=i;i+=n)s.push(i);return 0!==s.length&&this.trimTicks(s,e.startOnTick,e.endOnTick),s},adjustForMinRange:function(){var t,e,i,n,s,o,r=this.options,a=this.min,h=this.max,c=this.dataMax-this.dataMin>=this.minRange;if(this.isXAxis&&this.minRange===z&&!this.isLog&&(l(r.min)||l(r.max)?this.minRange=null:(Ut(this.series,function(t){for(s=t.xData,i=o=t.xIncrement?1:s.length-1;i>0;i--)n=s[i]-s[i-1],(e===z||e>n)&&(e=n)}),this.minRange=dt(5*e,this.dataMax-this.dataMin))),h-a<this.minRange){var d=this.minRange;t=(d-h+a)/2,t=[a-t,Gt(r.min,a-t)],c&&(t[2]=this.dataMin),a=w(t),h=[a+d,Gt(r.max,a+d)],c&&(h[2]=this.dataMax),h=k(h),d>h-a&&(t[0]=h-d,t[1]=Gt(r.min,h-d),a=w(t))}this.min=a,this.max=h},setAxisTranslation:function(t){var e,n=this,s=n.max-n.min,o=n.axisPointRange||0,r=0,a=0,h=n.linkedParent,c=!!n.categories,d=n.transA,p=n.isXAxis;(p||c||o)&&(h?(r=h.minPointOffset,a=h.pointRangePadding):Ut(n.series,function(t){var h=c?1:p?t.pointRange:n.axisPointRange||0,d=t.options.pointPlacement,u=t.closestPointRange;h>s&&(h=0),o=ct(o,h),n.single||(r=ct(r,i(d)?0:h/2),a=ct(a,"on"===d?0:h)),!t.noSharedTooltip&&l(u)&&(e=l(e)?dt(e,u):u)}),h=n.ordinalSlope&&e?n.ordinalSlope/e:1,n.minPointOffset=r*=h,n.pointRangePadding=a*=h,n.pointRange=dt(o,s),p&&(n.closestPointRange=e)),t&&(n.oldTransA=d),n.translationSlope=n.transA=d=n.len/(s+a||1),n.transB=n.horiz?n.left:n.bottom,n.minPixelPadding=d*r},minFromRange:function(){return this.max-this.range},setTickInterval:function(t){var e=this,i=e.chart,n=e.options,s=e.isLog,a=e.isDatetimeAxis,h=e.isXAxis,c=e.isLinked,d=n.maxPadding,p=n.minPadding,u=n.tickInterval,f=n.tickPixelInterval,g=e.categories;!a&&!g&&!c&&this.getTickAmount(),c?(e.linkedParent=i[e.coll][n.linkedTo],i=e.linkedParent.getExtremes(),e.min=Gt(i.min,i.dataMin),e.max=Gt(i.max,i.dataMax),n.type!==e.linkedParent.options.type&&T(11,1)):(e.min=Gt(e.userMin,n.min,e.dataMin),e.max=Gt(e.userMax,n.max,e.dataMax)),s&&(!t&&dt(e.min,Gt(e.dataMin,e.min))<=0&&T(10,1),e.min=P(r(e.min),15),e.max=P(r(e.max),15)),e.range&&l(e.max)&&(e.userMin=e.min=ct(e.min,e.minFromRange()),e.userMax=e.max,e.range=null),e.beforePadding&&e.beforePadding(),e.adjustForMinRange(),g||e.axisPointRange||e.usePercentage||c||!l(e.min)||!l(e.max)||!(i=e.max-e.min)||(l(n.min)||l(e.userMin)||!p||!(e.dataMin<0)&&e.ignoreMinPadding||(e.min-=i*p),l(n.max)||l(e.userMax)||!d||!(e.dataMax>0)&&e.ignoreMaxPadding||(e.max+=i*d)),o(n.floor)&&(e.min=ct(e.min,n.floor)),o(n.ceiling)&&(e.max=dt(e.max,n.ceiling)),e.tickInterval=e.min===e.max||void 0===e.min||void 0===e.max?1:c&&!u&&f===e.linkedParent.options.tickPixelInterval?u=e.linkedParent.tickInterval:Gt(u,this.tickAmount?(e.max-e.min)/ct(this.tickAmount-1,1):void 0,g?1:(e.max-e.min)*f/ct(e.len,f)),h&&!t&&Ut(e.series,function(t){t.processData(e.min!==e.oldMin||e.max!==e.oldMax)}),e.setAxisTranslation(!0),e.beforeSetTickPositions&&e.beforeSetTickPositions(),e.postProcessTickInterval&&(e.tickInterval=e.postProcessTickInterval(e.tickInterval)),e.pointRange&&(e.tickInterval=ct(e.pointRange,e.tickInterval)),t=Gt(n.minTickInterval,e.isDatetimeAxis&&e.closestPointRange),!u&&e.tickInterval<t&&(e.tickInterval=t),a||s||u||(e.tickInterval=x(e.tickInterval,null,v(e.tickInterval),Gt(n.allowDecimals,!(e.tickInterval>.5&&e.tickInterval<5&&e.max>1e3&&e.max<9999)),!!this.tickAmount)),!this.tickAmount&&this.len&&(e.tickInterval=e.unsquish()),this.setTickPositions()},setTickPositions:function(){var t,e,i=this.options,n=i.tickPositions,s=i.tickPositioner,o=i.startOnTick,r=i.endOnTick;this.tickmarkOffset=this.categories&&"between"===i.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===i.minorTickInterval&&this.tickInterval?this.tickInterval/5:i.minorTickInterval,this.tickPositions=t=n&&n.slice(),!t&&(t=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,i.units),this.min,this.max,i.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),t.length>this.len&&(t=[t[0],t.pop()]),this.tickPositions=t,s&&(s=s.apply(this,[this.min,this.max])))&&(this.tickPositions=t=s),this.isLinked||(this.trimTicks(t,o,r),this.min===this.max&&l(this.min)&&!this.tickAmount&&(e=!0,this.min-=.5,this.max+=.5),this.single=e,!n&&!s&&this.adjustTickAmount())},trimTicks:function(t,e,i){var n=t[0],s=t[t.length-1],o=this.minPointOffset||0;e?this.min=n:this.min-o>n&&t.shift(),i?this.max=s:this.max+o<s&&t.pop(),0===t.length&&l(n)&&t.push((s+n)/2)},getTickAmount:function(){var t,e={},i=this.options,n=i.tickAmount,s=i.tickPixelInterval;!l(i.tickInterval)&&this.len<s&&!this.isRadial&&!this.isLog&&i.startOnTick&&i.endOnTick&&(n=2),!n&&this.chart.options.chart.alignTicks!==!1&&i.alignTicks!==!1&&(Ut(this.chart[this.coll],function(i){var n=i.options,s=i.horiz,n=[s?n.left:n.top,s?n.width:n.height,n.pane].join(",");e[n]?i.series.length&&(t=!0):e[n]=1}),t&&(n=lt(this.len/s)+1)),4>n&&(this.finalTickAmt=n,n=5),this.tickAmount=n},adjustTickAmount:function(){var t=this.tickInterval,e=this.tickPositions,i=this.tickAmount,n=this.finalTickAmt,s=e&&e.length;if(i>s){for(;e.length<i;)e.push(P(e[e.length-1]+t));this.transA*=(s-1)/(i-1),this.max=e[e.length-1]}else s>i&&(this.tickInterval*=2,this.setTickPositions());if(l(n)){for(t=i=e.length;t--;)(3===n&&t%2===1||2>=n&&t>0&&i-1>t)&&e.splice(t,1);this.finalTickAmt=z}},setScale:function(){var t,e;this.oldMin=this.min,this.oldMax=this.max,this.oldAxisLength=this.len,this.setAxisSize(),e=this.len!==this.oldAxisLength,Ut(this.series,function(e){(e.isDirtyData||e.isDirty||e.xAxis.isDirty)&&(t=!0)}),e||t||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax?(this.resetStacks&&this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=e||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks()},setExtremes:function(t,e,i,n,s){var o=this,r=o.chart,i=Gt(i,!0);Ut(o.series,function(t){delete t.kdTree}),s=Wt(s,{min:t,max:e}),Qt(o,"setExtremes",s,function(){o.userMin=t,o.userMax=e,o.eventArgs=s,i&&r.redraw(n)})},zoom:function(t,e){var i=this.dataMin,n=this.dataMax,s=this.options,o=dt(i,Gt(s.min,i)),s=ct(n,Gt(s.max,n));return this.allowZoomOutside||(l(i)&&o>=t&&(t=o),l(n)&&e>=s&&(e=s)), this.displayBtn=t!==z||e!==z,this.setExtremes(t,e,!1,z,{trigger:"zoom"}),!0},setAxisSize:function(){var t=this.chart,e=this.options,i=e.offsetLeft||0,n=this.horiz,s=Gt(e.width,t.plotWidth-i+(e.offsetRight||0)),o=Gt(e.height,t.plotHeight),r=Gt(e.top,t.plotTop),e=Gt(e.left,t.plotLeft+i),i=/%$/;i.test(o)&&(o=parseFloat(o)/100*t.plotHeight),i.test(r)&&(r=parseFloat(r)/100*t.plotHeight+t.plotTop),this.left=e,this.top=r,this.width=s,this.height=o,this.bottom=t.chartHeight-o-r,this.right=t.chartWidth-s-e,this.len=ct(n?s:o,0),this.pos=n?e:r},getExtremes:function(){var t=this.isLog;return{min:t?P(a(this.min)):this.min,max:t?P(a(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(t){var e=this.isLog,i=e?a(this.min):this.min,e=e?a(this.max):this.max;return null===t?t=0>e?e:i:i>t?t=i:t>e&&(t=e),this.translate(t,0,1,0,1)},autoLabelAlign:function(t){return t=(Gt(t,0)-90*this.side+720)%360,t>15&&165>t?"right":t>195&&345>t?"left":"center"},unsquish:function(){var t,e,i,n=this.ticks,s=this.options.labels,o=this.horiz,r=this.tickInterval,a=r,h=this.len/(((this.categories?1:0)+this.max-this.min)/r),c=s.rotation,d=this.chart.renderer.fontMetrics(s.style.fontSize,n[0]&&n[0].label),p=Number.MAX_VALUE,u=function(t){return t/=h||1,t=t>1?lt(t):1,t*r};return o?(i=l(c)?[c]:h<Gt(s.autoRotationLimit,80)&&!s.staggerLines&&!s.step&&s.autoRotation)&&Ut(i,function(i){var n;(i===c||i&&i>=-90&&90>=i)&&(e=u(pt(d.h/ft(mt*i))),n=e+pt(i/360),p>n&&(p=n,t=i,a=e))}):s.step||(a=u(d.h)),this.autoRotation=i,this.labelRotation=t,a},renderUnsquish:function(){var e,n=this.chart,s=n.renderer,o=this.tickPositions,r=this.ticks,a=this.options.labels,h=this.horiz,l=n.margin,c=this.categories?o.length:o.length-1,d=this.slotWidth=h&&!a.step&&!a.rotation&&(this.staggerLines||1)*n.plotWidth/c||!h&&(l[3]&&l[3]-n.spacing[3]||.33*n.chartWidth),p=ct(1,at(d-2*(a.padding||5))),u={},l=s.fontMetrics(a.style.fontSize,r[0]&&r[0].label),c=a.style.textOverflow,f=0;if(i(a.rotation)||(u.rotation=a.rotation||0),this.autoRotation)Ut(o,function(t){(t=r[t])&&t.labelLength>f&&(f=t.labelLength)}),f>p&&f>l.h?u.rotation=this.labelRotation:this.labelRotation=0;else if(d&&(e={width:p+"px"},!c))for(e.textOverflow="clip",d=o.length;!h&&d--;)p=o[d],(p=r[p].label)&&("ellipsis"===p.styles.textOverflow&&p.css({textOverflow:"clip"}),p.getBBox().height>this.len/o.length-(l.h-l.f)&&(p.specCss={textOverflow:"ellipsis"}));u.rotation&&(e={width:(f>.5*n.chartHeight?.33*n.chartHeight:n.chartHeight)+"px"},!c)&&(e.textOverflow="ellipsis"),this.labelAlign=u.align=a.align||this.autoLabelAlign(this.labelRotation),Ut(o,function(i){var n=(i=r[i])&&i.label;n&&(e&&n.css(t(e,n.specCss)),delete n.specCss,n.attr(u),i.rotation=u.rotation)}),this.tickRotCorr=s.rotCorr(l.b,this.labelRotation||0,2===this.side)},hasData:function(){return this.hasVisibleSeries||l(this.min)&&l(this.max)&&!!this.tickPositions},getOffset:function(){var t,e,i,n,s=this,o=s.chart,r=o.renderer,a=s.options,h=s.tickPositions,c=s.ticks,d=s.horiz,p=s.side,u=o.inverted?[1,0,3,2][p]:p,f=0,g=0,m=a.title,y=a.labels,v=0,x=o.axisOffset,o=o.clipOffset,b=[-1,1,1,-1][p];if(t=s.hasData(),s.showAxis=e=t||Gt(a.showEmpty,!0),s.staggerLines=s.horiz&&y.staggerLines,s.axisGroup||(s.gridGroup=r.g("grid").attr({zIndex:a.gridZIndex||1}).add(),s.axisGroup=r.g("axis").attr({zIndex:a.zIndex||2}).add(),s.labelGroup=r.g("axis-labels").attr({zIndex:y.zIndex||7}).addClass("highcharts-"+s.coll.toLowerCase()+"-labels").add()),t||s.isLinked)Ut(h,function(t){c[t]?c[t].addLabel():c[t]=new D(s,t)}),s.renderUnsquish(),Ut(h,function(t){(0===p||2===p||{1:"left",3:"right"}[p]===s.labelAlign)&&(v=ct(c[t].getLabelSize(),v))}),s.staggerLines&&(v*=s.staggerLines,s.labelOffset=v);else for(n in c)c[n].destroy(),delete c[n];m&&m.text&&m.enabled!==!1&&(s.axisTitle||(s.axisTitle=r.text(m.text,0,0,m.useHTML).attr({zIndex:7,rotation:m.rotation||0,align:m.textAlign||{low:"left",middle:"center",high:"right"}[m.align]}).addClass("highcharts-"+this.coll.toLowerCase()+"-title").css(m.style).add(s.axisGroup),s.axisTitle.isNew=!0),e&&(f=s.axisTitle.getBBox()[d?"height":"width"],i=m.offset,g=l(i)?0:Gt(m.margin,d?5:10)),s.axisTitle[e?"show":"hide"]()),s.offset=b*Gt(a.offset,x[p]),s.tickRotCorr=s.tickRotCorr||{x:0,y:0},r=2===p?s.tickRotCorr.y:0,d=v+g+(v&&b*(d?Gt(y.y,s.tickRotCorr.y+8):y.x)-r),s.axisTitleMargin=Gt(i,d),x[p]=ct(x[p],s.axisTitleMargin+f+b*s.offset,d),a=a.offset?0:2*ht(a.lineWidth/2),o[u]=ct(o[u],a)},getLinePath:function(t){var e=this.chart,i=this.opposite,n=this.offset,s=this.horiz,o=this.left+(i?this.width:0)+n,n=e.chartHeight-this.bottom-(i?this.height:0)+n;return i&&(t*=-1),e.renderer.crispLine(["M",s?this.left:o,s?n:this.top,"L",s?e.chartWidth-this.right:o,s?n:e.chartHeight-this.bottom],t)},getTitlePosition:function(){var t=this.horiz,i=this.left,n=this.top,s=this.len,o=this.options.title,r=t?i:n,a=this.opposite,h=this.offset,l=o.x||0,c=o.y||0,d=e(o.style.fontSize||12),s={low:r+(t?0:s),middle:r+s/2,high:r+(t?s:0)}[o.align],i=(t?n+this.height:i)+(t?1:-1)*(a?-1:1)*this.axisTitleMargin+(2===this.side?d:0);return{x:t?s+l:i+(a?this.width:0)+h+l,y:t?i+c-(a?this.height:0)+h:s+c}},render:function(){var t,e,i,n=this,s=n.chart,o=s.renderer,r=n.options,h=n.isLog,c=n.isLinked,d=n.tickPositions,p=n.axisTitle,u=n.ticks,f=n.minorTicks,g=n.alternateBands,m=r.stackLabels,y=r.alternateGridColor,v=n.tickmarkOffset,x=r.lineWidth,b=s.hasRendered&&l(n.oldMin)&&!isNaN(n.oldMin),k=n.showAxis,w=o.globalAnimation;n.labelEdge.length=0,n.overlap=!1,Ut([u,f,g],function(t){for(var e in t)t[e].isActive=!1}),(n.hasData()||c)&&(n.minorTickInterval&&!n.categories&&Ut(n.getMinorTickPositions(),function(t){f[t]||(f[t]=new D(n,t,"minor")),b&&f[t].isNew&&f[t].render(null,!0),f[t].render(null,!1,1)}),d.length&&(Ut(d,function(t,e){(!c||t>=n.min&&t<=n.max)&&(u[t]||(u[t]=new D(n,t)),b&&u[t].isNew&&u[t].render(e,!0,.1),u[t].render(e))}),v&&(0===n.min||n.single))&&(u[-1]||(u[-1]=new D(n,-1,null,!0)),u[-1].render(-1)),y&&Ut(d,function(t,s){s%2===0&&t<n.max&&(g[t]||(g[t]=new nt.PlotLineOrBand(n)),e=t+v,i=d[s+1]!==z?d[s+1]+v:n.max,g[t].options={from:h?a(e):e,to:h?a(i):i,color:y},g[t].render(),g[t].isActive=!0)}),n._addedPlotLB||(Ut((r.plotLines||[]).concat(r.plotBands||[]),function(t){n.addPlotBandOrLine(t)}),n._addedPlotLB=!0)),Ut([u,f,g],function(t){var e,i,n=[],o=w?w.duration||500:0,r=function(){for(i=n.length;i--;)t[n[i]]&&!t[n[i]].isActive&&(t[n[i]].destroy(),delete t[n[i]])};for(e in t)t[e].isActive||(t[e].render(e,!1,0),t[e].isActive=!1,n.push(e));t!==g&&s.hasRendered&&o?o&&setTimeout(r,o):r()}),x&&(t=n.getLinePath(x),n.axisLine?n.axisLine.animate({d:t}):n.axisLine=o.path(t).attr({stroke:r.lineColor,"stroke-width":x,zIndex:7}).add(n.axisGroup),n.axisLine[k?"show":"hide"]()),p&&k&&(p[p.isNew?"attr":"animate"](n.getTitlePosition()),p.isNew=!1),m&&m.enabled&&n.renderStackTotals(),n.isDirty=!1},redraw:function(){this.render(),Ut(this.plotLinesAndBands,function(t){t.render()}),Ut(this.series,function(t){t.isDirty=!0})},destroy:function(t){var e,i=this,n=i.stacks,s=i.plotLinesAndBands;t||Jt(i);for(e in n)S(n[e]),n[e]=null;for(Ut([i.ticks,i.minorTicks,i.alternateBands],function(t){S(t)}),t=s.length;t--;)s[t].destroy();Ut("stackTotalGroup,axisLine,axisTitle,axisGroup,cross,gridGroup,labelGroup".split(","),function(t){i[t]&&(i[t]=i[t].destroy())}),this.cross&&this.cross.destroy()},drawCrosshair:function(t,e){var i,n=this.crosshair,s=n.animation;!this.crosshair||(l(e)||!Gt(this.crosshair.snap,!0))===!1||e&&e.series&&e.series[this.coll]!==this?this.hideCrosshair():(Gt(n.snap,!0)?l(e)&&(i=this.isXAxis?e.plotX:this.len-e.plotY):i=this.horiz?t.chartX-this.pos:this.len-t.chartY+this.pos,i=this.isRadial?this.getPlotLinePath(this.isXAxis?e.x:Gt(e.stackY,e.y))||null:this.getPlotLinePath(null,null,null,null,i)||null,null===i?this.hideCrosshair():this.cross?this.cross.attr({visibility:"visible"})[s?"animate":"attr"]({d:i},s):(s=this.categories&&!this.isRadial,s={"stroke-width":n.width||(s?this.transA:1),stroke:n.color||(s?"rgba(155,200,255,0.2)":"#C0C0C0"),zIndex:n.zIndex||2},n.dashStyle&&(s.dashstyle=n.dashStyle),this.cross=this.chart.renderer.path(i).attr(s).add()))},hideCrosshair:function(){this.cross&&this.cross.hide()}},Wt(de.prototype,{getPlotBandPath:function(t,e){var i=this.getPlotLinePath(e,null,null,!0),n=this.getPlotLinePath(t,null,null,!0);return n&&i&&n.toString()!==i.toString()?n.push(i[4],i[5],i[1],i[2]):n=null,n},addPlotBand:function(t){return this.addPlotBandOrLine(t,"plotBands")},addPlotLine:function(t){return this.addPlotBandOrLine(t,"plotLines")},addPlotBandOrLine:function(t,e){var i=new nt.PlotLineOrBand(this,t).render(),n=this.userOptions;return i&&(e&&(n[e]=n[e]||[],n[e].push(t)),this.plotLinesAndBands.push(i)),i},removePlotBandOrLine:function(t){for(var e=this.plotLinesAndBands,i=this.options,n=this.userOptions,s=e.length;s--;)e[s].id===t&&e[s].destroy();Ut([i.plotLines||[],n.plotLines||[],i.plotBands||[],n.plotBands||[]],function(e){for(s=e.length;s--;)e[s].id===t&&h(e,e[s])})}}),de.prototype.getTimeTicks=function(t,e,i,n){var s,o=[],r={},a=X.global.useUTC,h=new G(e-m(e)),c=t.unitRange,d=t.count;if(l(e)){h[q](c>=W.second?0:d*ht(h.getMilliseconds()/d)),c>=W.second&&h[$](c>=W.minute?0:d*ht(h.getSeconds()/d)),c>=W.minute&&h[J](c>=W.hour?0:d*ht(h[V]()/d)),c>=W.hour&&h[Q](c>=W.day?0:d*ht(h[j]()/d)),c>=W.day&&h[tt](c>=W.month?1:d*ht(h[U]()/d)),c>=W.month&&(h[et](c>=W.year?0:d*ht(h[Z]()/d)),s=h[K]()),c>=W.year&&(s-=s%d,h[it](s)),c===W.week&&h[tt](h[U]()-h[_]()+Gt(n,1)),e=1,(Y||N)&&(h=h.getTime(),h=new G(h+m(h))),s=h[K]();for(var n=h.getTime(),p=h[Z](),u=h[U](),f=(W.day+(a?m(h):6e4*h.getTimezoneOffset()))%W.day;i>n;)o.push(n),c===W.year?n=F(s+e*d,0):c===W.month?n=F(s,p+e*d):a||c!==W.day&&c!==W.week?n+=c*d:n=F(s,p,u+e*d*(c===W.day?1:7)),e++;o.push(n),Ut(Zt(o,function(t){return c<=W.hour&&t%W.day===f}),function(t){r[t]="day"})}return o.info=Wt(t,{higherRanks:r,totalRange:c*d}),o},de.prototype.normalizeTimeTickInterval=function(t,e){var i,n=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]],s=n[n.length-1],o=W[s[0]],r=s[1];for(i=0;i<n.length&&(s=n[i],o=W[s[0]],r=s[1],!(n[i+1]&&t<=(o*r[r.length-1]+W[n[i+1][0]])/2));i++);return o===W.year&&5*o>t&&(r=[1,2,5]),n=x(t/o,r,"year"===s[0]?ct(v(t/o),1):1),{unitRange:o,count:n,unitName:s[0]}},de.prototype.getLogTickPositions=function(t,e,i,n){var s=this.options,o=this.len,h=[];if(n||(this._minorAutoInterval=null),t>=.5)t=at(t),h=this.getLinearTickPositions(t,e,i);else if(t>=.08)for(var l,c,d,p,u,o=ht(e),s=t>.3?[1,2,4]:t>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];i+1>o&&!u;o++)for(c=s.length,l=0;c>l&&!u;l++)d=r(a(o)*s[l]),d>e&&(!n||i>=p)&&p!==z&&h.push(p),p>i&&(u=!0),p=d;else e=a(e),i=a(i),t=s[n?"minorTickInterval":"tickInterval"],t=Gt("auto"===t?null:t,this._minorAutoInterval,(i-e)*(s.tickPixelInterval/(n?5:1))/((n?o/this.tickPositions.length:o)||1)),t=x(t,null,v(t)),h=qt(this.getLinearTickPositions(t,e,i),r),n||(this._minorAutoInterval=t/5);return n||(this.tickInterval=t),h};var pe=nt.Tooltip=function(){this.init.apply(this,arguments)};pe.prototype={init:function(t,i){var n=i.borderWidth,s=i.style,o=e(s.padding);this.chart=t,this.options=i,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.label=t.renderer.label("",0,0,i.shape||"callout",null,null,i.useHTML,null,"tooltip").attr({padding:o,fill:i.backgroundColor,"stroke-width":n,r:i.borderRadius,zIndex:8}).css(s).css({padding:0}).add().attr({y:-9999}),Ct||this.label.shadow(i.shadow),this.shared=i.shared},destroy:function(){this.label&&(this.label=this.label.destroy()),clearTimeout(this.hideTimer),clearTimeout(this.tooltipTimeout)},move:function(t,e,i,n){var s=this,o=s.now,r=s.options.animation!==!1&&!s.isHidden&&(pt(t-o.x)>1||pt(e-o.y)>1),a=s.followPointer||s.len>1;Wt(o,{x:r?(2*o.x+t)/3:t,y:r?(o.y+e)/2:e,anchorX:a?z:r?(2*o.anchorX+i)/3:i,anchorY:a?z:r?(o.anchorY+n)/2:n}),s.label.attr(o),r&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){s&&s.move(t,e,i,n)},32))},hide:function(t){var e=this;clearTimeout(this.hideTimer),this.isHidden||(this.hideTimer=setTimeout(function(){e.label.fadeOut(),e.isHidden=!0},Gt(t,this.options.hideDelay,500)))},getAnchor:function(t,e){var i,n,s,o=this.chart,r=o.inverted,a=o.plotTop,h=o.plotLeft,l=0,c=0,t=d(t);return i=t[0].tooltipPos,this.followPointer&&e&&(e.chartX===z&&(e=o.pointer.normalize(e)),i=[e.chartX-o.plotLeft,e.chartY-a]),i||(Ut(t,function(t){n=t.series.yAxis,s=t.series.xAxis,l+=t.plotX+(!r&&s?s.left-h:0),c+=(t.plotLow?(t.plotLow+t.plotHigh)/2:t.plotY)+(!r&&n?n.top-a:0)}),l/=t.length,c/=t.length,i=[r?o.plotWidth-c:l,this.shared&&!r&&t.length>1&&e?e.chartY-a:r?o.plotHeight-l:c]),qt(i,at)},getPosition:function(t,e,i){var n,s=this.chart,o=this.distance,r={},a=i.h||0,h=["y",s.chartHeight,e,i.plotY+s.plotTop,s.plotTop,s.plotTop+s.plotHeight],l=["x",s.chartWidth,t,i.plotX+s.plotLeft,s.plotLeft,s.plotLeft+s.plotWidth],c=Gt(i.ttBelow,s.inverted&&!i.negative||!s.inverted&&i.negative),d=function(t,e,i,n,s,h){var l=n-o>i,d=e>n+o+i,p=n-o-i;if(n+=o,c&&d)r[t]=n;else if(!c&&l)r[t]=p;else if(l)r[t]=dt(h-i,0>p-a?p:p-a);else{if(!d)return!1;r[t]=ct(s,n+a+i>e?n:n+a)}},p=function(t,e,i,n){return o>n||n>e-o?!1:void(r[t]=i/2>n?1:n>e-i/2?e-i-2:n-i/2)},u=function(t){var e=h;h=l,l=e,n=t},f=function(){d.apply(0,h)!==!1?p.apply(0,l)===!1&&!n&&(u(!0),f()):n?r.x=r.y=0:(u(!0),f())};return(s.inverted||this.len>1)&&u(),f(),r},defaultFormatter:function(t){var e,i=this.points||d(this);return e=[t.tooltipFooterHeaderFormatter(i[0])],e=e.concat(t.bodyFormatter(i)),e.push(t.tooltipFooterHeaderFormatter(i[0],!0)),e.join("")},refresh:function(t,e){var i,n,s,o,r=this.chart,a=this.label,h=this.options,l={},c=[];o=h.formatter||this.defaultFormatter;var p,l=r.hoverPoints,u=this.shared;clearTimeout(this.hideTimer),this.followPointer=d(t)[0].series.tooltipOptions.followPointer,s=this.getAnchor(t,e),i=s[0],n=s[1],!u||t.series&&t.series.noSharedTooltip?l=t.getLabelConfig():(r.hoverPoints=t,l&&Ut(l,function(t){t.setState()}),Ut(t,function(t){t.setState("hover"),c.push(t.getLabelConfig())}),l={x:t[0].category,y:t[0].y},l.points=c,this.len=c.length,t=t[0]),o=o.call(l,this),l=t.series,this.distance=Gt(l.tooltipOptions.distance,16),o===!1?this.hide():(this.isHidden&&(ie(a),a.attr("opacity",1).show()),a.attr({text:o}),p=h.borderColor||t.color||l.color||"#606060",a.attr({stroke:p}),this.updatePosition({plotX:i,plotY:n,negative:t.negative,ttBelow:t.ttBelow,h:s[2]||0}),this.isHidden=!1),Qt(r,"tooltipRefresh",{text:o,x:i+r.plotLeft,y:n+r.plotTop,borderColor:p})},updatePosition:function(t){var e=this.chart,i=this.label,i=(this.options.positioner||this.getPosition).call(this,i.width,i.height,t);this.move(at(i.x),at(i.y||0),t.plotX+e.plotLeft,t.plotY+e.plotTop)},getXDateFormat:function(t,e,i){var n,s,o,e=e.dateTimeLabelFormats,r=i&&i.closestPointRange,a={millisecond:15,second:12,minute:9,hour:6,day:3},h="millisecond";if(r){o=H("%m-%d %H:%M:%S.%L",t.x);for(s in W){if(r===W.week&&+H("%w",t.x)===i.options.startOfWeek&&"00:00:00.000"===o.substr(6)){s="week";break}if(W[s]>r){s=h;break}if(a[s]&&o.substr(a[s])!=="01-01 00:00:00.000".substr(a[s]))break;"week"!==s&&(h=s)}s&&(n=e[s])}else n=e.day;return n||e.year},tooltipFooterHeaderFormatter:function(t,e){var i=e?"footer":"header",n=t.series,s=n.tooltipOptions,r=s.xDateFormat,a=n.xAxis,h=a&&"datetime"===a.options.type&&o(t.key),i=s[i+"Format"];return h&&!r&&(r=this.getXDateFormat(t,s,a)),h&&r&&(i=i.replace("{point.key}","{point.key:"+r+"}")),y(i,{point:t,series:n})},bodyFormatter:function(t){return qt(t,function(t){var e=t.series.tooltipOptions;return(e.pointFormatter||t.point.tooltipFormatter).call(t.point,e.pointFormat)})}};var ue;R=st.documentElement.ontouchstart!==z;var fe=nt.Pointer=function(t,e){this.init(t,e)};if(fe.prototype={init:function(t,e){var i,n=e.chart,s=n.events,o=Ct?"":n.zoomType,n=t.inverted;this.options=e,this.chart=t,this.zoomX=i=/x/.test(o),this.zoomY=o=/y/.test(o),this.zoomHor=i&&!n||o&&n,this.zoomVert=o&&!n||i&&n,this.hasZoom=i||o,this.runChartClick=s&&!!s.click,this.pinchDown=[],this.lastValidTouch={},nt.Tooltip&&e.tooltip.enabled&&(t.tooltip=new pe(t,e.tooltip),this.followTouchMove=Gt(e.tooltip.followTouchMove,!0)),this.setDOMEvents()},normalize:function(t,e){var i,n,t=t||window.event,t=te(t);return t.target||(t.target=t.srcElement),n=t.touches?t.touches.length?t.touches.item(0):t.changedTouches[0]:t,e||(this.chartPosition=e=Kt(this.chart.container)),n.pageX===z?(i=ct(t.x,t.clientX-e.left),n=t.y):(i=n.pageX-e.left,n=n.pageY-e.top),Wt(t,{chartX:at(i),chartY:at(n)})},getCoordinates:function(t){var e={xAxis:[],yAxis:[]};return Ut(this.chart.axes,function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},runPointActions:function(t){var e,i,n,s,o,r=this.chart,a=r.series,h=r.tooltip,l=h?h.shared:!1,c=r.hoverPoint,d=r.hoverSeries,p=r.chartWidth,u=[];if(!l&&!d)for(e=0;e<a.length;e++)(a[e].directTouch||!a[e].options.stickyTracking)&&(a=[]);if(!l&&d&&d.directTouch&&c?s=c:(Ut(a,function(e){i=e.noSharedTooltip&&l,n=!l&&e.directTouch,e.visible&&!i&&!n&&Gt(e.options.enableMouseTracking,!0)&&(o=e.searchPoint(t,!i&&1===e.kdDimensions))&&u.push(o)}),Ut(u,function(t){t&&"number"==typeof t.dist&&t.dist<p&&(p=t.dist,s=t)})),s&&(s!==this.prevKDPoint||h&&h.isHidden)){if(l&&!s.series.noSharedTooltip){for(e=u.length;e--;)(u[e].clientX!==s.clientX||u[e].series.noSharedTooltip)&&u.splice(e,1);u.length&&h&&h.refresh(u,t),Ut(u,function(e){e.onMouseOver(t,e!==(d&&d.directTouch&&c||s))})}else h&&h.refresh(s,t),d&&d.directTouch||s.onMouseOver(t);this.prevKDPoint=s}else a=d&&d.tooltipOptions.followPointer,h&&a&&!h.isHidden&&(a=h.getAnchor([{}],t),h.updatePosition({plotX:a[0],plotY:a[1]}));h&&!this._onDocumentMouseMove&&(this._onDocumentMouseMove=function(t){Ot[ue]&&Ot[ue].pointer.onDocumentMouseMove(t)},$t(st,"mousemove",this._onDocumentMouseMove)),Ut(r.axes,function(e){e.drawCrosshair(t,Gt(s,c))})},reset:function(t,e){var i=this.chart,n=i.hoverSeries,s=i.hoverPoint,o=i.hoverPoints,r=i.tooltip,a=r&&r.shared?o:s;(t=t&&r&&a)&&d(a)[0].plotX===z&&(t=!1),t?(r.refresh(a),s&&(s.setState(s.state,!0),Ut(i.axes,function(t){Gt(t.options.crosshair&&t.options.crosshair.snap,!0)?t.drawCrosshair(null,s):t.hideCrosshair()}))):(s&&s.onMouseOut(),o&&Ut(o,function(t){t.setState()}),n&&n.onMouseOut(),r&&r.hide(e),this._onDocumentMouseMove&&(Jt(st,"mousemove",this._onDocumentMouseMove),this._onDocumentMouseMove=null),Ut(i.axes,function(t){t.hideCrosshair()}),this.hoverX=i.hoverPoints=i.hoverPoint=null)},scaleGroups:function(t,e){var i,n=this.chart;Ut(n.series,function(s){i=t||s.getPlotBox(),s.xAxis&&s.xAxis.zoomEnabled&&(s.group.attr(i),s.markerGroup&&(s.markerGroup.attr(i),s.markerGroup.clip(e?n.clipRect:null)),s.dataLabelsGroup&&s.dataLabelsGroup.attr(i))}),n.clipRect.attr(e||n.clipBox)},dragStart:function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},drag:function(t){var e,i=this.chart,n=i.options.chart,s=t.chartX,o=t.chartY,r=this.zoomHor,a=this.zoomVert,h=i.plotLeft,l=i.plotTop,c=i.plotWidth,d=i.plotHeight,p=this.selectionMarker,u=this.mouseDownX,f=this.mouseDownY,g=n.panKey&&t[n.panKey+"Key"];p&&p.touch||(h>s?s=h:s>h+c&&(s=h+c),l>o?o=l:o>l+d&&(o=l+d),this.hasDragged=Math.sqrt(Math.pow(u-s,2)+Math.pow(f-o,2)),this.hasDragged>10&&(e=i.isInsidePlot(u-h,f-l),i.hasCartesianSeries&&(this.zoomX||this.zoomY)&&e&&!g&&!p&&(this.selectionMarker=p=i.renderer.rect(h,l,r?1:c,a?1:d,0).attr({fill:n.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add()),p&&r&&(s-=u,p.attr({width:pt(s),x:(s>0?0:s)+u})),p&&a&&(s=o-f,p.attr({height:pt(s),y:(s>0?0:s)+f})),e&&!p&&n.panning&&i.pan(t,n.panning)))},drop:function(t){var e=this,i=this.chart,n=this.hasPinched;if(this.selectionMarker){var s,o={xAxis:[],yAxis:[],originalEvent:t.originalEvent||t},r=this.selectionMarker,a=r.attr?r.attr("x"):r.x,h=r.attr?r.attr("y"):r.y,c=r.attr?r.attr("width"):r.width,d=r.attr?r.attr("height"):r.height;(this.hasDragged||n)&&(Ut(i.axes,function(i){if(i.zoomEnabled&&l(i.min)&&(n||e[{xAxis:"zoomX",yAxis:"zoomY"}[i.coll]])){var r=i.horiz,p="touchend"===t.type?i.minPixelPadding:0,u=i.toValue((r?a:h)+p),r=i.toValue((r?a+c:h+d)-p);o[i.coll].push({axis:i,min:dt(u,r),max:ct(u,r)}),s=!0}}),s&&Qt(i,"selection",o,function(t){i.zoom(Wt(t,n?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),n&&this.scaleGroups()}i&&(p(i.container,{cursor:i._cursor}),i.cancelClick=this.hasDragged>10,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(t){t=this.normalize(t),t.preventDefault&&t.preventDefault(),this.dragStart(t)},onDocumentMouseUp:function(t){Ot[ue]&&Ot[ue].pointer.drop(t)},onDocumentMouseMove:function(t){var e=this.chart,i=this.chartPosition,t=this.normalize(t,i);i&&!this.inClass(t.target,"highcharts-tracker")&&!e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)&&this.reset()},onContainerMouseLeave:function(){var t=Ot[ue];t&&(t.pointer.reset(),t.pointer.chartPosition=null)},onContainerMouseMove:function(t){var e=this.chart;ue=e.index,t=this.normalize(t),t.returnValue=!1,"mousedown"===e.mouseIsDown&&this.drag(t),(this.inClass(t.target,"highcharts-tracker")||e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop))&&!e.openMenu&&this.runPointActions(t)},inClass:function(t,e){for(var i;t;){if(i=c(t,"class")){if(-1!==i.indexOf(e))return!0;if(-1!==i.indexOf("highcharts-container"))return!1}t=t.parentNode}},onTrackerMouseOut:function(t){var e=this.chart.hoverSeries,i=(t=t.relatedTarget||t.toElement)&&t.point&&t.point.series;!e||e.options.stickyTracking||this.inClass(t,"highcharts-tooltip")||i===e||e.onMouseOut()},onContainerClick:function(t){var e=this.chart,i=e.hoverPoint,n=e.plotLeft,s=e.plotTop,t=this.normalize(t);t.originalEvent=t,e.cancelClick||(i&&this.inClass(t.target,"highcharts-tracker")?(Qt(i.series,"click",Wt(t,{point:i})),e.hoverPoint&&i.firePointEvent("click",t)):(Wt(t,this.getCoordinates(t)),e.isInsidePlot(t.chartX-n,t.chartY-s)&&Qt(e,"click",t)))},setDOMEvents:function(){var t=this,e=t.chart.container;e.onmousedown=function(e){t.onContainerMouseDown(e)},e.onmousemove=function(e){t.onContainerMouseMove(e)},e.onclick=function(e){t.onContainerClick(e)},$t(e,"mouseleave",t.onContainerMouseLeave),1===zt&&$t(st,"mouseup",t.onDocumentMouseUp),R&&(e.ontouchstart=function(e){t.onContainerTouchStart(e)},e.ontouchmove=function(e){t.onContainerTouchMove(e)},1===zt&&$t(st,"touchend",t.onDocumentTouchEnd))},destroy:function(){var t;Jt(this.chart.container,"mouseleave",this.onContainerMouseLeave),zt||(Jt(st,"mouseup",this.onDocumentMouseUp),Jt(st,"touchend",this.onDocumentTouchEnd)),clearInterval(this.tooltipTimeout);for(t in this)this[t]=null}},Wt(nt.Pointer.prototype,{pinchTranslate:function(t,e,i,n,s,o){(this.zoomHor||this.pinchHor)&&this.pinchTranslateDirection(!0,t,e,i,n,s,o),(this.zoomVert||this.pinchVert)&&this.pinchTranslateDirection(!1,t,e,i,n,s,o)},pinchTranslateDirection:function(t,e,i,n,s,o,r,a){var h,l,c,d=this.chart,p=t?"x":"y",u=t?"X":"Y",f="chart"+u,g=t?"width":"height",m=d["plot"+(t?"Left":"Top")],y=a||1,v=d.inverted,x=d.bounds[t?"h":"v"],b=1===e.length,k=e[0][f],w=i[0][f],S=!b&&e[1][f],A=!b&&i[1][f],i=function(){!b&&pt(k-S)>20&&(y=a||pt(w-A)/pt(k-S)),l=(m-w)/y+k,h=d["plot"+(t?"Width":"Height")]/y};i(),e=l,e<x.min?(e=x.min,c=!0):e+h>x.max&&(e=x.max-h,c=!0),c?(w-=.8*(w-r[p][0]),b||(A-=.8*(A-r[p][1])),i()):r[p]=[w,A],v||(o[p]=l-m,o[g]=h),o=v?1/y:y,s[g]=h,s[p]=e,n[v?t?"scaleY":"scaleX":"scale"+u]=y,n["translate"+u]=o*m+(w-o*k)},pinch:function(t){var e=this,i=e.chart,n=e.pinchDown,s=t.touches,o=s.length,r=e.lastValidTouch,a=e.hasZoom,h=e.selectionMarker,l={},c=1===o&&(e.inClass(t.target,"highcharts-tracker")&&i.runTrackerClick||e.runChartClick),d={};o>1&&(e.initiated=!0),a&&e.initiated&&!c&&t.preventDefault(),qt(s,function(t){return e.normalize(t)}),"touchstart"===t.type?(Ut(s,function(t,e){n[e]={chartX:t.chartX,chartY:t.chartY}}),r.x=[n[0].chartX,n[1]&&n[1].chartX],r.y=[n[0].chartY,n[1]&&n[1].chartY],Ut(i.axes,function(t){if(t.zoomEnabled){var e=i.bounds[t.horiz?"h":"v"],n=t.minPixelPadding,s=t.toPixels(Gt(t.options.min,t.dataMin)),o=t.toPixels(Gt(t.options.max,t.dataMax)),r=dt(s,o),s=ct(s,o);e.min=dt(t.pos,r-n),e.max=ct(t.pos+t.len,s+n)}}),e.res=!0):n.length&&(h||(e.selectionMarker=h=Wt({destroy:Dt,touch:!0},i.plotBox)),e.pinchTranslate(n,s,l,h,d,r),e.hasPinched=a,e.scaleGroups(l,d),!a&&e.followTouchMove&&1===o?this.runPointActions(e.normalize(t)):e.res&&(e.res=!1,this.reset(!1,0)))},touch:function(t,e){var i=this.chart;ue=i.index,1===t.touches.length?(t=this.normalize(t),i.isInsidePlot(t.chartX-i.plotLeft,t.chartY-i.plotTop)&&!i.openMenu?(e&&this.runPointActions(t),this.pinch(t)):e&&this.reset()):2===t.touches.length&&this.pinch(t)},onContainerTouchStart:function(t){this.touch(t,!0)},onContainerTouchMove:function(t){this.touch(t)},onDocumentTouchEnd:function(t){Ot[ue]&&Ot[ue].pointer.drop(t)}}),ot.PointerEvent||ot.MSPointerEvent){var ge={},me=!!ot.PointerEvent,ye=function(){var t,e=[];e.item=function(t){return this[t]};for(t in ge)ge.hasOwnProperty(t)&&e.push({pageX:ge[t].pageX,pageY:ge[t].pageY,target:ge[t].target});return e},ve=function(t,e,i,n){t=t.originalEvent||t,"touch"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_TOUCH||!Ot[ue]||(n(t),n=Ot[ue].pointer,n[e]({type:i,target:t.currentTarget,preventDefault:Dt,touches:ye()}))};Wt(fe.prototype,{onContainerPointerDown:function(t){ve(t,"onContainerTouchStart","touchstart",function(t){ge[t.pointerId]={pageX:t.pageX,pageY:t.pageY,target:t.currentTarget}})},onContainerPointerMove:function(t){ve(t,"onContainerTouchMove","touchmove",function(t){ge[t.pointerId]={pageX:t.pageX,pageY:t.pageY},ge[t.pointerId].target||(ge[t.pointerId].target=t.currentTarget)})},onDocumentPointerUp:function(t){ve(t,"onDocumentTouchEnd","touchend",function(t){delete ge[t.pointerId]})},batchMSEvents:function(t){t(this.chart.container,me?"pointerdown":"MSPointerDown",this.onContainerPointerDown),t(this.chart.container,me?"pointermove":"MSPointerMove",this.onContainerPointerMove),t(st,me?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}}),Ft(fe.prototype,"init",function(t,e,i){t.call(this,e,i),this.hasZoom&&p(e.container,{"-ms-touch-action":Rt,"touch-action":Rt})}),Ft(fe.prototype,"setDOMEvents",function(t){t.apply(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents($t)}),Ft(fe.prototype,"destroy",function(t){this.batchMSEvents(Jt),t.call(this)})}var xe=nt.Legend=function(t,e){this.init(t,e)};xe.prototype={init:function(e,i){var n=this,s=i.itemStyle,o=i.itemMarginTop||0;this.options=i,i.enabled&&(n.itemStyle=s,n.itemHiddenStyle=t(s,i.itemHiddenStyle),n.itemMarginTop=o,n.padding=s=Gt(i.padding,8),n.initialItemX=s,n.initialItemY=s-5,n.maxItemWidth=0,n.chart=e,n.itemHeight=0,n.symbolWidth=Gt(i.symbolWidth,16),n.pages=[],n.render(),$t(n.chart,"endResize",function(){n.positionCheckboxes()}))},colorizeItem:function(t,e){var i,n=this.options,s=t.legendItem,o=t.legendLine,r=t.legendSymbol,a=this.itemHiddenStyle.color,n=e?n.itemStyle.color:a,h=e?t.legendColor||t.color||"#CCC":a,a=t.options&&t.options.marker,l={fill:h};if(s&&s.css({fill:n,color:n}),o&&o.attr({stroke:h}),r){if(a&&r.isMarker)for(i in l.stroke=h,a=t.convertAttribs(a))s=a[i],s!==z&&(l[i]=s);r.attr(l)}},positionItem:function(t){var e=this.options,i=e.symbolPadding,e=!e.rtl,n=t._legendItemPos,s=n[0],n=n[1],o=t.checkbox;(t=t.legendGroup)&&t.element&&t.translate(e?s:this.legendWidth-s-2*i-4,n),o&&(o.x=s,o.y=n)},destroyItem:function(t){var e=t.checkbox;Ut(["legendItem","legendLine","legendSymbol","legendGroup"],function(e){t[e]&&(t[e]=t[e].destroy())}),e&&A(t.checkbox)},destroy:function(){var t=this.group,e=this.box;e&&(this.box=e.destroy()),t&&(this.group=t.destroy())},positionCheckboxes:function(t){var e,i=this.group.alignAttr,n=this.clipHeight||this.legendHeight;i&&(e=i.translateY,Ut(this.allItems,function(s){var o,r=s.checkbox;r&&(o=e+r.y+(t||0)+3,p(r,{left:i.translateX+s.checkboxOffset+r.x-20+"px",top:o+"px",display:o>e-6&&e+n-6>o?"":Rt}))}))},renderTitle:function(){var t=this.padding,e=this.options.title,i=0;e.text&&(this.title||(this.title=this.chart.renderer.label(e.text,t-3,t-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(e.style).add(this.group)),t=this.title.getBBox(),i=t.height,this.offsetWidth=t.width,this.contentGroup.attr({translateY:i})),this.titleHeight=i},setText:function(t){var e=this.options;t.legendItem.attr({text:e.labelFormat?y(e.labelFormat,t):e.labelFormatter.call(t)})},renderItem:function(e){var i=this.chart,n=i.renderer,s=this.options,o="horizontal"===s.layout,r=this.symbolWidth,a=s.symbolPadding,h=this.itemStyle,l=this.itemHiddenStyle,c=this.padding,d=o?Gt(s.itemDistance,20):0,p=!s.rtl,u=s.width,f=s.itemMarginBottom||0,g=this.itemMarginTop,m=this.initialItemX,y=e.legendItem,v=e.series&&e.series.drawLegendSymbol?e.series:e,x=v.options,x=this.createCheckboxForItem&&x&&x.showCheckbox,b=s.useHTML;y||(e.legendGroup=n.g("legend-item").attr({zIndex:1}).add(this.scrollGroup),e.legendItem=y=n.text("",p?r+a:-a,this.baseline||0,b).css(t(e.visible?h:l)).attr({align:p?"left":"right",zIndex:2}).add(e.legendGroup),this.baseline||(this.fontMetrics=n.fontMetrics(h.fontSize,y),this.baseline=this.fontMetrics.f+3+g,y.attr("y",this.baseline)),v.drawLegendSymbol(this,e),this.setItemEvents&&this.setItemEvents(e,y,b,h,l),this.colorizeItem(e,e.visible),x&&this.createCheckboxForItem(e)),this.setText(e),n=y.getBBox(),r=e.checkboxOffset=s.itemWidth||e.legendItemWidth||r+a+n.width+d+(x?20:0),this.itemHeight=a=at(e.legendItemHeight||n.height),o&&this.itemX-m+r>(u||i.chartWidth-2*c-m-s.x)&&(this.itemX=m,this.itemY+=g+this.lastLineHeight+f,this.lastLineHeight=0),this.maxItemWidth=ct(this.maxItemWidth,r),this.lastItemY=g+this.itemY+f,this.lastLineHeight=ct(a,this.lastLineHeight),e._legendItemPos=[this.itemX,this.itemY],o?this.itemX+=r:(this.itemY+=g+a+f,this.lastLineHeight=a),this.offsetWidth=u||ct((o?this.itemX-m-d:r)+c,this.offsetWidth)},getAllItems:function(){var t=[];return Ut(this.chart.series,function(e){var i=e.options;Gt(i.showInLegend,l(i.linkedTo)?!1:z,!0)&&(t=t.concat(e.legendItems||("point"===i.legendType?e.data:e)))}),t},adjustMargins:function(t,e){var i=this.chart,n=this.options,s=n.align.charAt(0)+n.verticalAlign.charAt(0)+n.layout.charAt(0);this.display&&!n.floating&&Ut([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(o,r){o.test(s)&&!l(t[r])&&(i[Xt[r]]=ct(i[Xt[r]],i.legend[(r+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][r]*n[r%2?"x":"y"]+Gt(n.margin,12)+e[r]))})},render:function(){var t,e,i,n,s=this,o=s.chart,r=o.renderer,a=s.group,h=s.box,l=s.options,c=s.padding,d=l.borderWidth,p=l.backgroundColor;s.itemX=s.initialItemX,s.itemY=s.initialItemY,s.offsetWidth=0,s.lastItemY=0,a||(s.group=a=r.g("legend").attr({zIndex:7}).add(),s.contentGroup=r.g().attr({zIndex:1}).add(a),s.scrollGroup=r.g().add(s.contentGroup)),s.renderTitle(),t=s.getAllItems(),b(t,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),l.reversed&&t.reverse(),s.allItems=t,s.display=e=!!t.length,s.lastLineHeight=0,Ut(t,function(t){s.renderItem(t)}),i=(l.width||s.offsetWidth)+c,n=s.lastItemY+s.lastLineHeight+s.titleHeight,n=s.handleOverflow(n),n+=c,(d||p)&&(h?i>0&&n>0&&(h[h.isNew?"attr":"animate"](h.crisp({width:i,height:n})),h.isNew=!1):(s.box=h=r.rect(0,0,i,n,l.borderRadius,d||0).attr({stroke:l.borderColor,"stroke-width":d||0,fill:p||Rt}).add(a).shadow(l.shadow),h.isNew=!0),h[e?"show":"hide"]()),s.legendWidth=i,s.legendHeight=n,Ut(t,function(t){s.positionItem(t)}),e&&a.align(Wt({width:i,height:n},l),!0,"spacingBox"),o.isResizing||this.positionCheckboxes()},handleOverflow:function(t){var e,i,n=this,s=this.chart,o=s.renderer,r=this.options,a=r.y,a=s.spacingBox.height+("top"===r.verticalAlign?-a:a)-this.padding,h=r.maxHeight,l=this.clipRect,c=r.navigation,d=Gt(c.animation,!0),p=c.arrowSize||12,u=this.nav,f=this.pages,g=this.padding,m=this.allItems,y=function(t){ l.attr({height:t}),n.contentGroup.div&&(n.contentGroup.div.style.clip="rect("+g+"px,9999px,"+(g+t)+"px,0)")};return"horizontal"===r.layout&&(a/=2),h&&(a=dt(a,h)),f.length=0,t>a?(this.clipHeight=e=ct(a-20-this.titleHeight-g,0),this.currentPage=Gt(this.currentPage,1),this.fullHeight=t,Ut(m,function(t,n){var s=t._legendItemPos[1],o=at(t.legendItem.getBBox().height),r=f.length;(!r||s-f[r-1]>e&&(i||s)!==f[r-1])&&(f.push(i||s),r++),n===m.length-1&&s+o-f[r-1]>e&&f.push(s),s!==i&&(i=s)}),l||(l=n.clipRect=o.clipRect(0,g,9999,0),n.contentGroup.clip(l)),y(e),u||(this.nav=u=o.g().attr({zIndex:1}).add(this.group),this.up=o.symbol("triangle",0,0,p,p).on("click",function(){n.scroll(-1,d)}).add(u),this.pager=o.text("",15,10).css(c.style).add(u),this.down=o.symbol("triangle-down",0,0,p,p).on("click",function(){n.scroll(1,d)}).add(u)),n.scroll(0),t=a):u&&(y(s.chartHeight),u.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var i=this.pages,n=i.length,s=this.currentPage+t,o=this.clipHeight,r=this.options.navigation,a=r.activeColor,r=r.inactiveColor,h=this.pager,l=this.padding;s>n&&(s=n),s>0&&(e!==z&&C(e,this.chart),this.nav.attr({translateX:l,translateY:o+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:1===s?r:a}).css({cursor:1===s?"default":"pointer"}),h.attr({text:s+"/"+n}),this.down.attr({x:18+this.pager.getBBox().width,fill:s===n?r:a}).css({cursor:s===n?"default":"pointer"}),i=-i[s-1]+this.initialItemY,this.scrollGroup.animate({translateY:i}),this.currentPage=s,this.positionCheckboxes(i))}},le=nt.LegendSymbolMixin={drawRectangle:function(t,e){var i=t.options.symbolHeight||t.fontMetrics.f;e.legendSymbol=this.chart.renderer.rect(0,t.baseline-i+1,t.symbolWidth,i,t.options.symbolRadius||0).attr({zIndex:3}).add(e.legendGroup)},drawLineMarker:function(t){var e,i=this.options,n=i.marker;e=t.symbolWidth;var s,o=this.chart.renderer,r=this.legendGroup,t=t.baseline-at(.3*t.fontMetrics.b);i.lineWidth&&(s={"stroke-width":i.lineWidth},i.dashStyle&&(s.dashstyle=i.dashStyle),this.legendLine=o.path(["M",0,t,"L",e,t]).attr(s).add(r)),n&&n.enabled!==!1&&(i=n.radius,this.legendSymbol=e=o.symbol(this.symbol,e/2-i,t-i,2*i,2*i).add(r),e.isMarker=!0)}},(/Trident\/7\.0/.test(yt)||wt)&&Ft(xe.prototype,"positionItem",function(t,e){var i=this,n=function(){e._legendItemPos&&t.call(i,e)};n(),setTimeout(n)}),Nt=nt.Chart=function(){this.init.apply(this,arguments)},Nt.prototype={callbacks:[],init:function(e,i){var n,s=e.series;e.series=null,n=t(X,e),n.series=e.series=s,this.userOptions=e,s=n.chart,this.margin=this.splashArray("margin",s),this.spacing=this.splashArray("spacing",s);var o=s.events;this.bounds={h:{},v:{}},this.callback=i,this.isResizing=0,this.options=n,this.axes=[],this.series=[],this.hasCartesianSeries=s.showAxes;var r,a=this;if(a.index=Ot.length,Ot.push(a),zt++,s.reflow!==!1&&$t(a,"load",function(){a.initReflow()}),o)for(r in o)$t(a,r,o[r]);a.xAxis=[],a.yAxis=[],a.animation=Ct?!1:Gt(s.animation,!0),a.pointCount=a.colorCounter=a.symbolCounter=0,a.firstRender()},initSeries:function(t){var e=this.options.chart;return(e=Et[t.type||e.type||e.defaultSeriesType])||T(17,!0),e=new e,e.init(this,t),e},isInsidePlot:function(t,e,i){var n=i?e:t,t=i?t:e;return n>=0&&n<=this.plotWidth&&t>=0&&t<=this.plotHeight},redraw:function(t){var e,i,n=this.axes,s=this.series,o=this.pointer,r=this.legend,a=this.isDirtyLegend,h=this.hasCartesianSeries,l=this.isDirtyBox,c=s.length,d=c,p=this.renderer,u=p.isHidden(),f=[];for(C(t,this),u&&this.cloneRenderTo(),this.layOutTitles();d--;)if(t=s[d],t.options.stacking&&(e=!0,t.isDirty)){i=!0;break}if(i)for(d=c;d--;)t=s[d],t.options.stacking&&(t.isDirty=!0);Ut(s,function(t){t.isDirty&&"point"===t.options.legendType&&(t.updateTotals&&t.updateTotals(),a=!0)}),a&&r.options.enabled&&(r.render(),this.isDirtyLegend=!1),e&&this.getStacks(),h&&!this.isResizing&&(this.maxTicks=null,Ut(n,function(t){t.setScale()})),this.getMargins(),h&&(Ut(n,function(t){t.isDirty&&(l=!0)}),Ut(n,function(t){var i=t.min+","+t.max;t.extKey!==i&&(t.extKey=i,f.push(function(){Qt(t,"afterSetExtremes",Wt(t.eventArgs,t.getExtremes())),delete t.eventArgs})),(l||e)&&t.redraw()})),l&&this.drawChartBox(),Ut(s,function(t){t.isDirty&&t.visible&&(!t.isCartesian||t.xAxis)&&t.redraw()}),o&&o.reset(!0),p.draw(),Qt(this,"redraw"),u&&this.cloneRenderTo(!0),Ut(f,function(t){t.call()})},get:function(t){var e,i,n=this.axes,s=this.series;for(e=0;e<n.length;e++)if(n[e].options.id===t)return n[e];for(e=0;e<s.length;e++)if(s[e].options.id===t)return s[e];for(e=0;e<s.length;e++)for(i=s[e].points||[],n=0;n<i.length;n++)if(i[n].id===t)return i[n];return null},getAxes:function(){var t=this,e=this.options,i=e.xAxis=d(e.xAxis||{}),e=e.yAxis=d(e.yAxis||{});Ut(i,function(t,e){t.index=e,t.isX=!0}),Ut(e,function(t,e){t.index=e}),i=i.concat(e),Ut(i,function(e){new de(t,e)})},getSelectedPoints:function(){var t=[];return Ut(this.series,function(e){t=t.concat(Zt(e.points||[],function(t){return t.selected}))}),t},getSelectedSeries:function(){return Zt(this.series,function(t){return t.selected})},setTitle:function(e,i,n){var s,o,r=this,a=r.options;o=a.title=t(a.title,e),s=a.subtitle=t(a.subtitle,i),a=s,Ut([["title",e,o],["subtitle",i,a]],function(t){var e=t[0],i=r[e],n=t[1],t=t[2];i&&n&&(r[e]=i=i.destroy()),t&&t.text&&!i&&(r[e]=r.renderer.text(t.text,0,0,t.useHTML).attr({align:t.align,"class":"highcharts-"+e,zIndex:t.zIndex||4}).css(t.style).add())}),r.layOutTitles(n)},layOutTitles:function(t){var e=0,i=this.title,n=this.subtitle,s=this.options,o=s.title,s=s.subtitle,r=this.renderer,a=this.spacingBox.width-44;!i||(i.css({width:(o.width||a)+"px"}).align(Wt({y:r.fontMetrics(o.style.fontSize,i).b-3},o),!1,"spacingBox"),o.floating||o.verticalAlign)||(e=i.getBBox().height),n&&(n.css({width:(s.width||a)+"px"}).align(Wt({y:e+(o.margin-13)+r.fontMetrics(o.style.fontSize,n).b},s),!1,"spacingBox"),!s.floating&&!s.verticalAlign&&(e=lt(e+n.getBBox().height))),i=this.titleOffset!==e,this.titleOffset=e,!this.isDirtyBox&&i&&(this.isDirtyBox=i,this.hasRendered&&Gt(t,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var t=this.options.chart,e=t.width,t=t.height,i=this.renderToClone||this.renderTo;l(e)||(this.containerWidth=Vt(i,"width")),l(t)||(this.containerHeight=Vt(i,"height")),this.chartWidth=ct(0,e||this.containerWidth||600),this.chartHeight=ct(0,Gt(t,this.containerHeight>19?this.containerHeight:400))},cloneRenderTo:function(t){var e=this.renderToClone,i=this.container;t?e&&(this.renderTo.appendChild(i),A(e),delete this.renderToClone):(i&&i.parentNode===this.renderTo&&this.renderTo.removeChild(i),this.renderToClone=e=this.renderTo.cloneNode(0),p(e,{position:"absolute",top:"-9999px",display:"block"}),e.style.setProperty&&e.style.setProperty("display","block","important"),st.body.appendChild(e),i&&e.appendChild(i))},getContainer:function(){var t,n,s,o,r=this.options.chart;this.renderTo=t=r.renderTo,o="highcharts-"+Mt++,i(t)&&(this.renderTo=t=st.getElementById(t)),t||T(13,!0),n=e(c(t,"data-highcharts-chart")),!isNaN(n)&&Ot[n]&&Ot[n].hasRendered&&Ot[n].destroy(),c(t,"data-highcharts-chart",this.index),t.innerHTML="",!r.skipClone&&!t.offsetWidth&&this.cloneRenderTo(),this.getChartSize(),n=this.chartWidth,s=this.chartHeight,this.container=t=u(It,{className:"highcharts-container"+(r.className?" "+r.className:""),id:o},Wt({position:"relative",overflow:"hidden",width:n+"px",height:s+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},r.style),this.renderToClone||t),this._cursor=t.style.cursor,this.renderer=r.forExport?new he(t,n,s,r.style,!0):new I(t,n,s,r.style),Ct&&this.renderer.create(this,t,n,s),this.renderer.chartIndex=this.index},getMargins:function(t){var e=this.spacing,i=this.margin,n=this.titleOffset;this.resetMargins(),n&&!l(i[0])&&(this.plotTop=ct(this.plotTop,n+this.options.title.margin+e[0])),this.legend.adjustMargins(i,e),this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin),this.extraTopMargin&&(this.plotTop+=this.extraTopMargin),t||this.getAxisMargins()},getAxisMargins:function(){var t=this,e=t.axisOffset=[0,0,0,0],i=t.margin;t.hasCartesianSeries&&Ut(t.axes,function(t){t.getOffset()}),Ut(Xt,function(n,s){l(i[s])||(t[n]+=e[s])}),t.setChartSize()},reflow:function(t){var e=this,i=e.options.chart,n=e.renderTo,s=i.width||Vt(n,"width"),o=i.height||Vt(n,"height"),i=t?t.target:ot,n=function(){e.container&&(e.setSize(s,o,!1),e.hasUserSize=null)};e.hasUserSize||e.isPrinting||!s||!o||i!==ot&&i!==st||((s!==e.containerWidth||o!==e.containerHeight)&&(clearTimeout(e.reflowTimeout),t?e.reflowTimeout=setTimeout(n,100):n()),e.containerWidth=s,e.containerHeight=o)},initReflow:function(){var t=this,e=function(e){t.reflow(e)};$t(ot,"resize",e),$t(t,"destroy",function(){Jt(ot,"resize",e)})},setSize:function(t,e,i){var n,s,o,r=this,a=r.renderer,h=a.globalAnimation;r.isResizing+=1,o=function(){r&&Qt(r,"endResize",null,function(){r.isResizing-=1})},C(i,r),r.oldChartHeight=r.chartHeight,r.oldChartWidth=r.chartWidth,l(t)&&(r.chartWidth=n=ct(0,at(t)),r.hasUserSize=!!n),l(e)&&(r.chartHeight=s=ct(0,at(e))),(h?ee:p)(r.container,{width:n+"px",height:s+"px"},h),r.setChartSize(!0),a.setSize(n,s,i),r.maxTicks=null,Ut(r.axes,function(t){t.isDirty=!0,t.setScale()}),Ut(r.series,function(t){t.isDirty=!0}),r.isDirtyLegend=!0,r.isDirtyBox=!0,r.layOutTitles(),r.getMargins(),r.redraw(i),r.oldChartHeight=null,Qt(r,"resize"),h===!1?o():setTimeout(o,h&&h.duration||500)},setChartSize:function(t){var e,i,n,s,o=this.inverted,r=this.renderer,a=this.chartWidth,h=this.chartHeight,l=this.options.chart,c=this.spacing,d=this.clipOffset;this.plotLeft=e=at(this.plotLeft),this.plotTop=i=at(this.plotTop),this.plotWidth=n=ct(0,at(a-e-this.marginRight)),this.plotHeight=s=ct(0,at(h-i-this.marginBottom)),this.plotSizeX=o?s:n,this.plotSizeY=o?n:s,this.plotBorderWidth=l.plotBorderWidth||0,this.spacingBox=r.spacingBox={x:c[3],y:c[0],width:a-c[3]-c[1],height:h-c[0]-c[2]},this.plotBox=r.plotBox={x:e,y:i,width:n,height:s},a=2*ht(this.plotBorderWidth/2),o=lt(ct(a,d[3])/2),r=lt(ct(a,d[0])/2),this.clipBox={x:o,y:r,width:ht(this.plotSizeX-ct(a,d[1])/2-o),height:ct(0,ht(this.plotSizeY-ct(a,d[2])/2-r))},t||Ut(this.axes,function(t){t.setAxisSize(),t.setAxisTranslation()})},resetMargins:function(){var t=this;Ut(Xt,function(e,i){t[e]=Gt(t.margin[i],t.spacing[i])}),t.axisOffset=[0,0,0,0],t.clipOffset=[0,0,0,0]},drawChartBox:function(){var t,e=this.options.chart,i=this.renderer,n=this.chartWidth,s=this.chartHeight,o=this.chartBackground,r=this.plotBackground,a=this.plotBorder,h=this.plotBGImage,l=e.borderWidth||0,c=e.backgroundColor,d=e.plotBackgroundColor,p=e.plotBackgroundImage,u=e.plotBorderWidth||0,f=this.plotLeft,g=this.plotTop,m=this.plotWidth,y=this.plotHeight,v=this.plotBox,x=this.clipRect,b=this.clipBox;t=l+(e.shadow?8:0),(l||c)&&(o?o.animate(o.crisp({width:n-t,height:s-t})):(o={fill:c||Rt},l&&(o.stroke=e.borderColor,o["stroke-width"]=l),this.chartBackground=i.rect(t/2,t/2,n-t,s-t,e.borderRadius,l).attr(o).addClass("highcharts-background").add().shadow(e.shadow))),d&&(r?r.animate(v):this.plotBackground=i.rect(f,g,m,y,0).attr({fill:d}).add().shadow(e.plotShadow)),p&&(h?h.animate(v):this.plotBGImage=i.image(p,f,g,m,y).add()),x?x.animate({width:b.width,height:b.height}):this.clipRect=i.clipRect(b),u&&(a?a.animate(a.crisp({x:f,y:g,width:m,height:y,strokeWidth:-u})):this.plotBorder=i.rect(f,g,m,y,0,-u).attr({stroke:e.plotBorderColor,"stroke-width":u,fill:Rt,zIndex:1}).add()),this.isDirtyBox=!1},propFromSeries:function(){var t,e,i,n=this,s=n.options.chart,o=n.options.series;Ut(["inverted","angular","polar"],function(r){for(t=Et[s.type||s.defaultSeriesType],i=n[r]||s[r]||t&&t.prototype[r],e=o&&o.length;!i&&e--;)(t=Et[o[e].type])&&t.prototype[r]&&(i=!0);n[r]=i})},linkSeries:function(){var t=this,e=t.series;Ut(e,function(t){t.linkedSeries.length=0}),Ut(e,function(e){var n=e.options.linkedTo;i(n)&&(n=":previous"===n?t.series[e.index-1]:t.get(n))&&(n.linkedSeries.push(e),e.linkedParent=n,e.visible=Gt(e.options.visible,n.options.visible,e.visible))})},renderSeries:function(){Ut(this.series,function(t){t.translate(),t.render()})},renderLabels:function(){var t=this,i=t.options.labels;i.items&&Ut(i.items,function(n){var s=Wt(i.style,n.style),o=e(s.left)+t.plotLeft,r=e(s.top)+t.plotTop+12;delete s.left,delete s.top,t.renderer.text(n.html,o,r).attr({zIndex:2}).css(s).add()})},render:function(){var t,e,i,n,s=this.axes,o=this.renderer,r=this.options;this.setTitle(),this.legend=new xe(this,r.legend),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize(),t=this.plotWidth,e=this.plotHeight-=13,Ut(s,function(t){t.setScale()}),this.getAxisMargins(),i=t/this.plotWidth>1.1,n=e/this.plotHeight>1.1,(i||n)&&(this.maxTicks=null,Ut(s,function(t){(t.horiz&&i||!t.horiz&&n)&&t.setTickInterval(!0)}),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries&&Ut(s,function(t){t.render()}),this.seriesGroup||(this.seriesGroup=o.g("series-group").attr({zIndex:3}).add()),this.renderSeries(),this.renderLabels(),this.showCredits(r.credits),this.hasRendered=!0},showCredits:function(t){t.enabled&&!this.credits&&(this.credits=this.renderer.text(t.text,0,0).on("click",function(){t.href&&(location.href=t.href)}).attr({align:t.position.align,zIndex:8}).css(t.style).add().align(t.position))},destroy:function(){var t,e=this,i=e.axes,n=e.series,s=e.container,o=s&&s.parentNode;for(Qt(e,"destroy"),Ot[e.index]=z,zt--,e.renderTo.removeAttribute("data-highcharts-chart"),Jt(e),t=i.length;t--;)i[t]=i[t].destroy();for(t=n.length;t--;)n[t]=n[t].destroy();Ut("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(t){var i=e[t];i&&i.destroy&&(e[t]=i.destroy())}),s&&(s.innerHTML="",Jt(s),o&&A(s));for(t in e)delete e[t]},isReadyToRender:function(){var t=this;return!Tt&&ot==ot.top&&"complete"!==st.readyState||Ct&&!ot.canvg?(Ct?ce.push(function(){t.firstRender()},t.options.global.canvasToolsURL):st.attachEvent("onreadystatechange",function(){st.detachEvent("onreadystatechange",t.firstRender),"complete"===st.readyState&&t.firstRender()}),!1):!0},firstRender:function(){var t=this,e=t.options,i=t.callback;t.isReadyToRender()&&(t.getContainer(),Qt(t,"init"),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes(),Ut(e.series||[],function(e){t.initSeries(e)}),t.linkSeries(),Qt(t,"beforeRender"),nt.Pointer&&(t.pointer=new fe(t,e)),t.render(),t.renderer.draw(),i&&i.apply(t,[t]),Ut(t.callbacks,function(e){t.index!==z&&e.apply(t,[t])}),Qt(t,"load"),t.cloneRenderTo(!0))},splashArray:function(t,e){var i=e[t],i=n(i)?i:[i,i,i,i];return[Gt(e[t+"Top"],i[0]),Gt(e[t+"Right"],i[1]),Gt(e[t+"Bottom"],i[2]),Gt(e[t+"Left"],i[3])]}};var be=nt.CenteredSeriesMixin={getCenter:function(){var t,e,i=this.options,n=this.chart,s=2*(i.slicedOffset||0),o=n.plotWidth-2*s,n=n.plotHeight-2*s,r=i.center,r=[Gt(r[0],"50%"),Gt(r[1],"50%"),i.size||"100%",i.innerSize||0],a=dt(o,n);for(t=0;4>t;++t)e=r[t],i=2>t||2===t&&/%$/.test(e),r[t]=(/%$/.test(e)?[o,n,a,r[2]][t]*parseFloat(e)/100:parseFloat(e))+(i?s:0);return r}},ke=function(){};ke.prototype={init:function(t,e,i){return this.series=t,this.color=t.color,this.applyOptions(e,i),this.pointAttr={},t.options.colorByPoint&&(e=t.options.colors||t.chart.options.colors,this.color=this.color||e[t.colorCounter++],t.colorCounter===e.length)&&(t.colorCounter=0),t.chart.pointCount++,this},applyOptions:function(t,e){var i=this.series,n=i.options.pointValKey||i.pointValKey,t=ke.prototype.optionsToObject.call(this,t);return Wt(this,t),this.options=this.options?Wt(this.options,t):t,n&&(this.y=this[n]),this.x===z&&i&&(this.x=e===z?i.autoIncrement():e),this},optionsToObject:function(t){var e={},i=this.series,n=i.options.keys,o=n||i.pointArrayMap||["y"],r=o.length,a=0,h=0;if("number"==typeof t||null===t)e[o[0]]=t;else if(s(t))for(!n&&t.length>r&&(i=typeof t[0],"string"===i?e.name=t[0]:"number"===i&&(e.x=t[0]),a++);r>h;)e[o[h++]]=t[a++];else"object"==typeof t&&(e=t,t.dataLabels&&(i._hasPointLabels=!0),t.marker&&(i._hasPointMarkers=!0));return e},destroy:function(){var t,e=this.series.chart,i=e.hoverPoints;e.pointCount--,i&&(this.setState(),h(i,this),!i.length)&&(e.hoverPoints=null),this===e.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel)&&(Jt(this),this.destroyElements()),this.legendItem&&e.legend.destroyItem(this);for(t in this)this[t]=null},destroyElements:function(){for(var t,e="graphic,dataLabel,dataLabelUpper,group,connector,shadowGroup".split(","),i=6;i--;)t=e[i],this[t]&&(this[t]=this[t].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(t){var e=this.series,i=e.tooltipOptions,n=Gt(i.valueDecimals,""),s=i.valuePrefix||"",o=i.valueSuffix||"";return Ut(e.pointArrayMap||["y"],function(e){e="{point."+e,(s||o)&&(t=t.replace(e+"}",s+e+"}"+o)),t=t.replace(e+"}",e+":,."+n+"f}")}),y(t,{point:this,series:this.series})},firePointEvent:function(t,e,i){var n=this,s=this.series.options;(s.point.events[t]||n.options&&n.options.events&&n.options.events[t])&&this.importEvents(),"click"===t&&s.allowPointSelect&&(i=function(t){n.select&&n.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),Qt(this,t,e,i)}};var we=nt.Series=function(){};we.prototype={isCartesian:!0,type:"line",pointClass:ke,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],init:function(t,e){var i,n,s=this,o=t.series,r=function(t,e){return Gt(t.options.index,t._i)-Gt(e.options.index,e._i)};s.chart=t,s.options=e=s.setOptions(e),s.linkedSeries=[],s.bindAxes(),Wt(s,{name:e.name,state:"",pointAttr:{},visible:e.visible!==!1,selected:e.selected===!0}),Ct&&(e.animation=!1),n=e.events;for(i in n)$t(s,i,n[i]);(n&&n.click||e.point&&e.point.events&&e.point.events.click||e.allowPointSelect)&&(t.runTrackerClick=!0),s.getColor(),s.getSymbol(),Ut(s.parallelArrays,function(t){s[t+"Data"]=[]}),s.setData(e.data,!1),s.isCartesian&&(t.hasCartesianSeries=!0),o.push(s),s._i=o.length-1,b(o,r),this.yAxis&&b(this.yAxis.series,r),Ut(o,function(t,e){t.index=e,t.name=t.name||"Series "+(e+1)})},bindAxes:function(){var t,e=this,i=e.options,n=e.chart;Ut(e.axisTypes||[],function(s){Ut(n[s],function(n){t=n.options,(i[s]===t.index||i[s]!==z&&i[s]===t.id||i[s]===z&&0===t.index)&&(n.series.push(e),e[s]=n,n.isDirty=!0)}),!e[s]&&e.optionalAxis!==s&&T(18,!0)})},updateParallelArrays:function(t,e){var i=t.series,n=arguments;Ut(i.parallelArrays,"number"==typeof e?function(n){var s="y"===n&&i.toYData?i.toYData(t):t[n];i[n+"Data"][e]=s}:function(t){Array.prototype[e].apply(i[t+"Data"],Array.prototype.slice.call(n,2))})},autoIncrement:function(){var t,e=this.options,i=this.xIncrement,n=e.pointIntervalUnit,i=Gt(i,e.pointStart,0);return this.pointInterval=t=Gt(this.pointInterval,e.pointInterval,1),("month"===n||"year"===n)&&(e=new G(i),e="month"===n?+e[et](e[Z]()+t):+e[it](e[K]()+t),t=e-i),this.xIncrement=i+t,i},getSegments:function(){var t,e=-1,i=[],n=this.points,s=n.length;if(s)if(this.options.connectNulls){for(t=s;t--;)null===n[t].y&&n.splice(t,1);n.length&&(i=[n])}else Ut(n,function(t,o){null===t.y?(o>e+1&&i.push(n.slice(e+1,o)),e=o):o===s-1&&i.push(n.slice(e+1,o+1))});this.segments=i},setOptions:function(e){var i=this.chart,n=i.options.plotOptions,i=i.userOptions||{},s=i.plotOptions||{},o=n[this.type];return this.userOptions=e,n=t(o,n.series,e),this.tooltipOptions=t(X.tooltip,X.plotOptions[this.type].tooltip,i.tooltip,s.series&&s.series.tooltip,s[this.type]&&s[this.type].tooltip,e.tooltip),null===o.marker&&delete n.marker,this.zoneAxis=n.zoneAxis,e=this.zones=(n.zones||[]).slice(),!n.negativeColor&&!n.negativeFillColor||n.zones||e.push({value:n[this.zoneAxis+"Threshold"]||n.threshold||0,color:n.negativeColor,fillColor:n.negativeFillColor}),e.length&&l(e[e.length-1].value)&&e.push({color:this.color,fillColor:this.fillColor}),n},getCyclic:function(t,e,i){var n=this.userOptions,s="_"+t+"Index",o=t+"Counter";e||(l(n[s])?e=n[s]:(n[s]=e=this.chart[o]%i.length,this.chart[o]+=1),e=i[e]),this[t]=e},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||ne[this.type].color,this.chart.options.colors)},getSymbol:function(){var t=this.options.marker;this.getCyclic("symbol",t.symbol,this.chart.options.symbols),/^url/.test(this.symbol)&&(t.radius=0)},drawLegendSymbol:le.drawLineMarker,setData:function(t,e,n,r){var a,h=this,c=h.points,d=c&&c.length||0,p=h.options,u=h.chart,f=null,g=h.xAxis,m=g&&!!g.categories,y=p.turboThreshold,v=this.xData,x=this.yData,b=(a=h.pointArrayMap)&&a.length,t=t||[];if(a=t.length,e=Gt(e,!0),r!==!1&&a&&d===a&&!h.cropped&&!h.hasGroupedData&&h.visible)Ut(t,function(t,e){c[e].update&&c[e].update(t,!1,null,!1)});else{if(h.xIncrement=null,h.pointRange=m?1:p.pointRange,h.colorCounter=0,Ut(this.parallelArrays,function(t){h[t+"Data"].length=0}),y&&a>y){for(n=0;null===f&&a>n;)f=t[n],n++;if(o(f)){for(m=Gt(p.pointStart,0),p=Gt(p.pointInterval,1),n=0;a>n;n++)v[n]=m,x[n]=t[n],m+=p;h.xIncrement=m}else if(s(f))if(b)for(n=0;a>n;n++)p=t[n],v[n]=p[0],x[n]=p.slice(1,b+1);else for(n=0;a>n;n++)p=t[n],v[n]=p[0],x[n]=p[1];else T(12)}else for(n=0;a>n;n++)t[n]!==z&&(p={series:h},h.pointClass.prototype.applyOptions.apply(p,[t[n]]),h.updateParallelArrays(p,n),m&&l(p.name))&&(g.names[p.x]=p.name);for(i(x[0])&&T(14,!0),h.data=[],h.options.data=t,n=d;n--;)c[n]&&c[n].destroy&&c[n].destroy();g&&(g.minRange=g.userMinRange),h.isDirty=h.isDirtyData=u.isDirtyBox=!0,n=!1}e&&u.redraw(n)},processData:function(t){var e,i=this.xData,n=this.yData,s=i.length;e=0;var o,r,a,h=this.xAxis,l=this.options;a=l.cropThreshold;var c,d,p=this.isCartesian;if(p&&!this.isDirty&&!h.isDirty&&!this.yAxis.isDirty&&!t)return!1;for(h&&(t=h.getExtremes(),c=t.min,d=t.max),p&&this.sorted&&(!a||s>a||this.forceCrop)&&(i[s-1]<c||i[0]>d?(i=[],n=[]):(i[0]<c||i[s-1]>d)&&(e=this.cropData(this.xData,this.yData,c,d),i=e.xData,n=e.yData,e=e.start,o=!0)),a=i.length-1;a>=0;a--)s=i[a]-i[a-1],s>0&&(r===z||r>s)?r=s:0>s&&this.requireSorting&&T(15);this.cropped=o,this.cropStart=e,this.processedXData=i,this.processedYData=n,null===l.pointRange&&(this.pointRange=r||1),this.closestPointRange=r},cropData:function(t,e,i,n){var s,o=t.length,r=0,a=o,h=Gt(this.cropShoulder,1);for(s=0;o>s;s++)if(t[s]>=i){r=ct(0,s-h);break}for(;o>s;s++)if(t[s]>n){a=s+h;break}return{xData:t.slice(r,a),yData:e.slice(r,a),start:r,end:a}},generatePoints:function(){var t,e,i,n,s=this.options.data,o=this.data,r=this.processedXData,a=this.processedYData,h=this.pointClass,l=r.length,c=this.cropStart||0,p=this.hasGroupedData,u=[];for(o||p||(o=[],o.length=s.length,o=this.data=o),n=0;l>n;n++)e=c+n,p?u[n]=(new h).init(this,[r[n]].concat(d(a[n]))):(o[e]?i=o[e]:s[e]!==z&&(o[e]=i=(new h).init(this,s[e],r[n])),u[n]=i),u[n].index=e;if(o&&(l!==(t=o.length)||p))for(n=0;t>n;n++)n===c&&!p&&(n+=l),o[n]&&(o[n].destroyElements(),o[n].plotX=z);this.data=o,this.points=u},getExtremes:function(t){var e,i=this.yAxis,n=this.processedXData,s=[],o=0;e=this.xAxis.getExtremes();var r,a,h,l,c=e.min,d=e.max,t=t||this.stackedYData||this.processedYData;for(e=t.length,l=0;e>l;l++)if(a=n[l],h=t[l],r=null!==h&&h!==z&&(!i.isLog||h.length||h>0),a=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(n[l+1]||a)>=c&&(n[l-1]||a)<=d,r&&a)if(r=h.length)for(;r--;)null!==h[r]&&(s[o++]=h[r]);else s[o++]=h;this.dataMin=k(s),this.dataMax=w(s)},translate:function(){this.processedXData||this.processData(),this.generatePoints();for(var t,e,i,n=this.options,s=n.stacking,r=this.xAxis,a=r.categories,h=this.yAxis,c=this.points,d=c.length,p=!!this.modifyValue,u=n.pointPlacement,f="between"===u||o(u),g=n.threshold,m=n.startFromThreshold?g:0,y=Number.MAX_VALUE,n=0;d>n;n++){var v=c[n],x=v.x,b=v.y;e=v.low;var k=s&&h.stacks[(this.negStacks&&(m?0:g)>b?"-":"")+this.stackKey];h.isLog&&null!==b&&0>=b&&(v.y=b=null,T(10)),v.plotX=t=dt(ct(-1e5,r.translate(x,0,0,0,1,u,"flags"===this.type)),1e5),s&&this.visible&&k&&k[x]&&(k=k[x],b=k.points[this.index+","+n],e=b[0],b=b[1],e===m&&(e=Gt(g,h.min)),h.isLog&&0>=e&&(e=null),v.total=v.stackTotal=k.total,v.percentage=k.total&&v.y/k.total*100,v.stackY=b,k.setOffset(this.pointXOffset||0,this.barW||0)),v.yBottom=l(e)?h.translate(e,0,1,0,1):null,p&&(b=this.modifyValue(b,v)),v.plotY=e="number"==typeof b&&b!==1/0?dt(ct(-1e5,h.translate(b,0,1,0,1)),1e5):z,v.isInside=e!==z&&e>=0&&e<=h.len&&t>=0&&t<=r.len,v.clientX=f?r.translate(x,0,0,0,1):t,v.negative=v.y<(g||0),v.category=a&&a[v.x]!==z?a[v.x]:v.x,n&&(y=dt(y,pt(t-i))),i=t}this.closestPointRangePx=y,this.getSegments()},setClip:function(t){var e=this.chart,i=e.renderer,n=e.inverted,s=this.clipBox,o=s||e.clipBox,r=this.sharedClipKey||["_sharedClip",t&&t.duration,t&&t.easing,o.height].join(","),a=e[r],h=e[r+"m"];a||(t&&(o.width=0,e[r+"m"]=h=i.clipRect(-99,n?-e.plotLeft:-e.plotTop,99,n?e.chartWidth:e.chartHeight)),e[r]=a=i.clipRect(o)),t&&(a.count+=1),this.options.clip!==!1&&(this.group.clip(t||s?a:e.clipRect),this.markerGroup.clip(h),this.sharedClipKey=r),t||(a.count-=1,a.count<=0&&r&&e[r]&&(s||(e[r]=e[r].destroy()),e[r+"m"]&&(e[r+"m"]=e[r+"m"].destroy())))},animate:function(t){var e,i=this.chart,s=this.options.animation;s&&!n(s)&&(s=ne[this.type].animation),t?this.setClip(s):(e=this.sharedClipKey,(t=i[e])&&t.animate({width:i.plotSizeX},s),i[e+"m"]&&i[e+"m"].animate({width:i.plotSizeX+99},s),this.animate=null)},afterAnimate:function(){this.setClip(),Qt(this,"afterAnimate")},drawPoints:function(){var t,e,i,n,s,o,r,a,h,l,c,d,p=this.points,u=this.chart,f=this.options.marker,g=this.pointAttr[""],m=this.markerGroup,y=Gt(f.enabled,this.xAxis.isRadial,this.closestPointRangePx>2*f.radius);if(f.enabled!==!1||this._hasPointMarkers)for(n=p.length;n--;)s=p[n],e=ht(s.plotX),i=s.plotY,h=s.graphic,l=s.marker||{},c=!!s.marker,t=y&&l.enabled===z||l.enabled,d=s.isInside,t&&i!==z&&!isNaN(i)&&null!==s.y?(t=s.pointAttr[s.selected?"select":""]||g,o=t.r,r=Gt(l.symbol,this.symbol),a=0===r.indexOf("url"),h?h[d?"show":"hide"](!0).animate(Wt({x:e-o,y:i-o},h.symbolName?{width:2*o,height:2*o}:{})):d&&(o>0||a)&&(s.graphic=u.renderer.symbol(r,e-o,i-o,2*o,2*o,c?l:f).attr(t).add(m))):h&&(s.graphic=h.destroy())},convertAttribs:function(t,e,i,n){var s,o,r=this.pointAttrToOptions,a={},t=t||{},e=e||{},i=i||{},n=n||{};for(s in r)o=r[s],a[s]=Gt(t[o],e[s],i[s],n[s]);return a},getAttribs:function(){var t,e=this,i=e.options,n=ne[e.type].marker?i.marker:i,s=n.states,o=s.hover,r=e.color,a=e.options.negativeColor;t={stroke:r,fill:r};var h,c,d=e.points||[],p=[],u=e.pointAttrToOptions;h=e.hasPointSpecificOptions;var f=n.lineColor,g=n.fillColor;c=i.turboThreshold;var m,y=e.zones,v=e.zoneAxis||"y";if(i.marker?(o.radius=o.radius||n.radius+o.radiusPlus,o.lineWidth=o.lineWidth||n.lineWidth+o.lineWidthPlus):(o.color=o.color||ae(o.color||r).brighten(o.brightness).get(),o.negativeColor=o.negativeColor||ae(o.negativeColor||a).brighten(o.brightness).get()),p[""]=e.convertAttribs(n,t),Ut(["hover","select"],function(t){p[t]=e.convertAttribs(s[t],p[""])}),e.pointAttr=p,r=d.length,!c||c>r||h)for(;r--;){if(c=d[r],(n=c.options&&c.options.marker||c.options)&&n.enabled===!1&&(n.radius=0),y.length){for(h=0,t=y[h];c[v]>=t.value;)t=y[++h];t.color&&(c.color=c.fillColor=t.color)}if(h=i.colorByPoint||c.color,c.options)for(m in u)l(n[u[m]])&&(h=!0);h?(n=n||{},h=[],s=n.states||{},t=s.hover=s.hover||{},i.marker||(t.color=t.color||!c.options.color&&o[c.negative&&a?"negativeColor":"color"]||ae(c.color).brighten(t.brightness||o.brightness).get()),t={color:c.color},g||(t.fillColor=c.color),f||(t.lineColor=c.color),n.hasOwnProperty("color")&&!n.color&&delete n.color,h[""]=e.convertAttribs(Wt(t,n),p[""]),h.hover=e.convertAttribs(s.hover,p.hover,h[""]),h.select=e.convertAttribs(s.select,p.select,h[""])):h=p,c.pointAttr=h}},destroy:function(){var t,e,i,n,s=this,o=s.chart,r=/AppleWebKit\/533/.test(yt),a=s.data||[];for(Qt(s,"destroy"),Jt(s),Ut(s.axisTypes||[],function(t){(n=s[t])&&(h(n.series,s),n.isDirty=n.forceRedraw=!0)}),s.legendItem&&s.chart.legend.destroyItem(s),t=a.length;t--;)(e=a[t])&&e.destroy&&e.destroy();s.points=null,clearTimeout(s.animationTimeout);for(i in s)s[i]instanceof M&&!s[i].survive&&(t=r&&"group"===i?"hide":"destroy",s[i][t]());o.hoverSeries===s&&(o.hoverSeries=null),h(o.series,s);for(i in s)delete s[i]},getSegmentPath:function(t){var e=this,i=[],n=e.options.step;return Ut(t,function(s,o){var r,a=s.plotX,h=s.plotY;e.getPointSpline?i.push.apply(i,e.getPointSpline(t,s,o)):(i.push(o?"L":"M"),n&&o&&(r=t[o-1],"right"===n?i.push(r.plotX,h):"center"===n?i.push((r.plotX+a)/2,r.plotY,(r.plotX+a)/2,h):i.push(a,r.plotY)),i.push(s.plotX,s.plotY))}),i},getGraphPath:function(){var t,e=this,i=[],n=[];return Ut(e.segments,function(s){t=e.getSegmentPath(s),s.length>1?i=i.concat(t):n.push(s[0])}),e.singlePoints=n,e.graphPath=i},drawGraph:function(){var t=this,e=this.options,i=[["graph",e.lineColor||this.color,e.dashStyle]],n=e.lineWidth,s="square"!==e.linecap,o=this.getGraphPath(),r=this.fillGraph&&this.color||Rt;Ut(this.zones,function(n,s){i.push(["zoneGraph"+s,n.color||t.color,n.dashStyle||e.dashStyle])}),Ut(i,function(i,a){var h=i[0],l=t[h];l?l.animate({d:o}):(n||r)&&o.length&&(l={stroke:i[1],"class":"animated liveStroke","stroke-width":n,fill:r,zIndex:1},i[2]?l.dashstyle=i[2]:s&&(l["stroke-linecap"]=l["stroke-linejoin"]="round"),t[h]=t.chart.renderer.path(o).attr(l).add(t.group).shadow(2>a&&e.shadow))})},applyZones:function(){var t,e,i,n,s,o,r,a=this,h=this.chart,l=h.renderer,c=this.zones,d=this.clips||[],p=this.graph,u=this.area,f=ct(h.chartWidth,h.chartHeight),g=this[(this.zoneAxis||"y")+"Axis"],m=g.reversed,y=h.inverted,v=g.horiz,x=!1;c.length&&(p||u)&&g.min!==z&&(p&&p.hide(),u&&u.hide(),n=g.getExtremes(),Ut(c,function(c,b){t=m?v?h.plotWidth:0:v?0:g.toPixels(n.min),t=dt(ct(Gt(e,t),0),f),e=dt(ct(at(g.toPixels(Gt(c.value,n.max),!0)),0),f),x&&(t=e=g.toPixels(n.max)),s=Math.abs(t-e),o=dt(t,e),r=ct(t,e),g.isXAxis?(i={x:y?r:o,y:0,width:s,height:f},v||(i.x=h.plotHeight-i.x)):(i={x:0,y:y?r:o,width:f,height:s},v&&(i.y=h.plotWidth-i.y)),h.inverted&&l.isVML&&(i=g.isXAxis?{x:0,y:m?o:r,height:i.width,width:h.chartWidth}:{x:i.y-h.plotLeft-h.spacingBox.x,y:0,width:i.height,height:h.chartHeight}),d[b]?d[b].animate(i):(d[b]=l.clipRect(i),p&&a["zoneGraph"+b].clip(d[b]),u&&a["zoneArea"+b].clip(d[b])),x=c.value>n.max}),this.clips=d)},invertGroups:function(){function t(){var t={width:e.yAxis.len,height:e.xAxis.len};Ut(["group","markerGroup"],function(i){e[i]&&e[i].attr(t).invert()})}var e=this,i=e.chart;e.xAxis&&($t(i,"resize",t),$t(e,"destroy",function(){Jt(i,"resize",t)}),t(),e.invertGroups=t)},plotGroup:function(t,e,i,n,s){var o=this[t],r=!o;return r&&(this[t]=o=this.chart.renderer.g(e).attr({visibility:i,zIndex:n||.1}).add(s)),o[r?"attr":"animate"](this.getPlotBox()),o},getPlotBox:function(){var t=this.chart,e=this.xAxis,i=this.yAxis;return t.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:t.plotLeft,translateY:i?i.top:t.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this,i=e.chart,n=e.options,s=(t=n.animation)&&!!e.animate&&i.renderer.isSVG&&Gt(t.duration,500)||0,o=e.visible?"visible":"hidden",r=n.zIndex,a=e.hasRendered,h=i.seriesGroup;t=e.plotGroup("group","series",o,r,h),e.markerGroup=e.plotGroup("markerGroup","markers",o,r,h),s&&e.animate(!0),e.getAttribs(),t.inverted=e.isCartesian?i.inverted:!1,e.drawGraph&&(e.drawGraph(),e.applyZones()),Ut(e.points,function(t){t.redraw&&t.redraw()}),e.drawDataLabels&&e.drawDataLabels(),e.visible&&e.drawPoints(),e.drawTracker&&e.options.enableMouseTracking!==!1&&e.drawTracker(),i.inverted&&e.invertGroups(),n.clip!==!1&&!e.sharedClipKey&&!a&&t.clip(i.clipRect),s&&e.animate(),a||(s?e.animationTimeout=setTimeout(function(){e.afterAnimate()},s):e.afterAnimate()),e.isDirty=e.isDirtyData=!1,e.hasRendered=!0},redraw:function(){var t=this.chart,e=this.isDirtyData,i=this.isDirty,n=this.group,s=this.xAxis,o=this.yAxis; n&&(t.inverted&&n.attr({width:t.plotWidth,height:t.plotHeight}),n.animate({translateX:Gt(s&&s.left,t.plotLeft),translateY:Gt(o&&o.top,t.plotTop)})),this.translate(),this.render(),e&&Qt(this,"updatedData"),(i||e)&&delete this.kdTree},kdDimensions:1,kdAxisArray:["clientX","plotY"],searchPoint:function(t,e){var i=this.xAxis,n=this.yAxis,s=this.chart.inverted;return this.searchKDTree({clientX:s?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:s?n.len-t.chartX+n.pos:t.chartY-n.pos},e)},buildKDTree:function(){function t(e,n,s){var o,r;return(r=e&&e.length)?(o=i.kdAxisArray[n%s],e.sort(function(t,e){return t[o]-e[o]}),r=Math.floor(r/2),{point:e[r],left:t(e.slice(0,r),n+1,s),right:t(e.slice(r+1),n+1,s)}):void 0}function e(){var e=Zt(i.points||[],function(t){return null!==t.y});i.kdTree=t(e,n,n)}var i=this,n=i.kdDimensions;delete i.kdTree,i.options.kdSync?e():setTimeout(e)},searchKDTree:function(t,e){function i(t,e,a,h){var c,d,p=e.point,u=n.kdAxisArray[a%h],f=p;return d=l(t[s])&&l(p[s])?Math.pow(t[s]-p[s],2):null,c=l(t[o])&&l(p[o])?Math.pow(t[o]-p[o],2):null,c=(d||0)+(c||0),p.dist=l(c)?Math.sqrt(c):Number.MAX_VALUE,p.distX=l(d)?Math.sqrt(d):Number.MAX_VALUE,u=t[u]-p[u],c=0>u?"left":"right",d=0>u?"right":"left",e[c]&&(c=i(t,e[c],a+1,h),f=c[r]<f[r]?c:p),e[d]&&Math.sqrt(u*u)<f[r]&&(t=i(t,e[d],a+1,h),f=t[r]<f[r]?t:f),f}var n=this,s=this.kdAxisArray[0],o=this.kdAxisArray[1],r=e?"distX":"dist";return this.kdTree||this.buildKDTree(),this.kdTree?i(t,this.kdTree,this.kdDimensions,this.kdDimensions):void 0}},O.prototype={destroy:function(){S(this,this.axis)},render:function(t){var e=this.options,i=e.format,i=i?y(i,this):e.formatter.call(this);this.label?this.label.attr({text:i,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(i,null,null,e.useHTML).css(e.style).attr({align:this.textAlign,rotation:e.rotation,visibility:"hidden"}).add(t)},setOffset:function(t,e){var i=this.axis,n=i.chart,s=n.inverted,o=i.reversed,o=this.isNegative&&!o||!this.isNegative&&o,r=i.translate(i.usePercentage?100:this.total,0,0,0,1),i=i.translate(0),i=pt(r-i),a=n.xAxis[0].translate(this.x)+t,h=n.plotHeight,o={x:s?o?r:r-i:a,y:s?h-a-e:o?h-r-i:h-r,width:s?i:e,height:s?e:i};(s=this.label)&&(s.align(this.alignOptions,null,o),o=s.alignAttr,s[this.options.crop===!1||n.isInsidePlot(o.x,o.y)?"show":"hide"](!0))}},Nt.prototype.getStacks=function(){var t=this;Ut(t.yAxis,function(t){t.stacks&&t.hasVisibleSeries&&(t.oldStacks=t.stacks)}),Ut(t.series,function(e){!e.options.stacking||e.visible!==!0&&t.options.chart.ignoreHiddenSeries!==!1||(e.stackKey=e.type+Gt(e.options.stack,""))})},de.prototype.buildStacks=function(){var t=this.series,e=Gt(this.options.reversedStacks,!0),i=t.length;if(!this.isXAxis){for(this.usePercentage=!1;i--;)t[e?i:t.length-i-1].setStackedPoints();if(this.usePercentage)for(i=0;i<t.length;i++)t[i].setPercentStacks()}},de.prototype.renderStackTotals=function(){var t,e,i=this.chart,n=i.renderer,s=this.stacks,o=this.stackTotalGroup;o||(this.stackTotalGroup=o=n.g("stack-labels").attr({visibility:"visible",zIndex:6}).add()),o.translate(i.plotLeft,i.plotTop);for(t in s)for(e in i=s[t])i[e].render(o)},de.prototype.resetStacks=function(){var t,e,i=this.stacks;if(!this.isXAxis)for(t in i)for(e in i[t])i[t][e].touched<this.stacksTouched?(i[t][e].destroy(),delete i[t][e]):(i[t][e].total=null,i[t][e].cum=0)},de.prototype.cleanStacks=function(){var t,e,i;if(!this.isXAxis){this.oldStacks&&(t=this.stacks=this.oldStacks);for(e in t)for(i in t[e])t[e][i].cum=t[e][i].total}},we.prototype.setStackedPoints=function(){if(this.options.stacking&&(this.visible===!0||this.chart.options.chart.ignoreHiddenSeries===!1)){var t,e,i,n,s,o,r=this.processedXData,a=this.processedYData,h=[],l=a.length,c=this.options,d=c.threshold,p=c.startFromThreshold?d:0,u=c.stack,c=c.stacking,f=this.stackKey,g="-"+f,m=this.negStacks,y=this.yAxis,v=y.stacks,x=y.oldStacks;for(y.stacksTouched+=1,n=0;l>n;n++)s=r[n],o=a[n],i=this.index+","+n,e=(t=m&&(p?0:d)>o)?g:f,v[e]||(v[e]={}),v[e][s]||(x[e]&&x[e][s]?(v[e][s]=x[e][s],v[e][s].total=null):v[e][s]=new O(y,y.options.stackLabels,t,s,u)),e=v[e][s],e.points[i]=[Gt(e.cum,p)],e.touched=y.stacksTouched,"percent"===c?(t=t?f:g,m&&v[t]&&v[t][s]?(t=v[t][s],e.total=t.total=ct(t.total,e.total)+pt(o)||0):e.total=P(e.total+(pt(o)||0))):e.total=P(e.total+(o||0)),e.cum=Gt(e.cum,p)+(o||0),e.points[i].push(e.cum),h[n]=e.cum;"percent"===c&&(y.usePercentage=!0),this.stackedYData=h,y.oldStacks={}}},we.prototype.setPercentStacks=function(){var t=this,e=t.stackKey,i=t.yAxis.stacks,n=t.processedXData;Ut([e,"-"+e],function(e){for(var s,o,r,a=n.length;a--;)o=n[a],s=(r=i[e]&&i[e][o])&&r.points[t.index+","+a],(o=s)&&(r=r.total?100/r.total:0,o[0]=P(o[0]*r),o[1]=P(o[1]*r),t.stackedYData[a]=o[1])})},Wt(Nt.prototype,{addSeries:function(t,e,i){var n,s=this;return t&&(e=Gt(e,!0),Qt(s,"addSeries",{options:t},function(){n=s.initSeries(t),s.isDirtyLegend=!0,s.linkSeries(),e&&s.redraw(i)})),n},addAxis:function(e,i,n,s){var o=i?"xAxis":"yAxis",r=this.options;new de(this,t(e,{index:this[o].length,isX:i})),r[o]=d(r[o]||{}),r[o].push(e),Gt(n,!0)&&this.redraw(s)},showLoading:function(t){var e=this,i=e.options,n=e.loadingDiv,s=i.loading,o=function(){n&&p(n,{left:e.plotLeft+"px",top:e.plotTop+"px",width:e.plotWidth+"px",height:e.plotHeight+"px"})};n||(e.loadingDiv=n=u(It,{className:"highcharts-loading"},Wt(s.style,{zIndex:10,display:Rt}),e.container),e.loadingSpan=u("span",null,s.labelStyle,n),$t(e,"redraw",o)),e.loadingSpan.innerHTML=t||i.lang.loading,e.loadingShown||(p(n,{opacity:0,display:""}),ee(n,{opacity:s.style.opacity},{duration:s.showDuration||0}),e.loadingShown=!0),o()},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&ee(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){p(e,{display:Rt})}}),this.loadingShown=!1}}),Wt(ke.prototype,{update:function(t,e,i,o){function r(){h.applyOptions(t),null===h.y&&c&&(h.graphic=c.destroy()),n(t)&&!s(t)&&(h.redraw=function(){c&&c.element&&t&&t.marker&&t.marker.symbol&&(h.graphic=c.destroy()),t&&t.dataLabels&&h.dataLabel&&(h.dataLabel=h.dataLabel.destroy()),h.redraw=null}),a=h.index,l.updateParallelArrays(h,a),u&&h.name&&(u[h.x]=h.name),p.data[a]=h.options,l.isDirty=l.isDirtyData=!0,!l.fixedBox&&l.hasCartesianSeries&&(d.isDirtyBox=!0),"point"===p.legendType&&(d.isDirtyLegend=!0),e&&d.redraw(i)}var a,h=this,l=h.series,c=h.graphic,d=l.chart,p=l.options,u=l.xAxis&&l.xAxis.names,e=Gt(e,!0);o===!1?r():h.firePointEvent("update",{options:t},r)},remove:function(t,e){this.series.removePoint(_t(this,this.series.data),t,e)}}),Wt(we.prototype,{addPoint:function(t,e,i,n){var s,o=this,r=o.options,a=o.data,h=o.graph,l=o.area,c=o.chart,d=o.xAxis&&o.xAxis.names,p=h&&h.shift||0,u=["graph","area"],h=r.data,f=o.xData;if(C(n,c),i){for(n=o.zones.length;n--;)u.push("zoneGraph"+n,"zoneArea"+n);Ut(u,function(t){o[t]&&(o[t].shift=p+1)})}if(l&&(l.isArea=!0),e=Gt(e,!0),l={series:o},o.pointClass.prototype.applyOptions.apply(l,[t]),u=l.x,n=f.length,o.requireSorting&&u<f[n-1])for(s=!0;n&&f[n-1]>u;)n--;o.updateParallelArrays(l,"splice",n,0,0),o.updateParallelArrays(l,n),d&&l.name&&(d[u]=l.name),h.splice(n,0,t),s&&(o.data.splice(n,0,null),o.processData()),"point"===r.legendType&&o.generatePoints(),i&&(a[0]&&a[0].remove?a[0].remove(!1):(a.shift(),o.updateParallelArrays(l,"shift"),h.shift())),o.isDirty=!0,o.isDirtyData=!0,e&&(o.getAttribs(),c.redraw())},removePoint:function(t,e,i){var n=this,s=n.data,o=s[t],r=n.points,a=n.chart,h=function(){s.length===r.length&&r.splice(t,1),s.splice(t,1),n.options.data.splice(t,1),n.updateParallelArrays(o||{series:n},"splice",t,1),o&&o.destroy(),n.isDirty=!0,n.isDirtyData=!0,e&&a.redraw()};C(i,a),e=Gt(e,!0),o?o.firePointEvent("remove",null,h):h()},remove:function(t,e){var i=this,n=i.chart,t=Gt(t,!0);i.isRemoving||(i.isRemoving=!0,Qt(i,"remove",null,function(){i.destroy(),n.isDirtyLegend=n.isDirtyBox=!0,n.linkSeries(),t&&n.redraw(e)})),i.isRemoving=!1},update:function(e,i){var n,s=this,o=this.chart,r=this.userOptions,a=this.type,h=Et[a].prototype,l=["group","markerGroup","dataLabelsGroup"];(e.type&&e.type!==a||void 0!==e.zIndex)&&(l.length=0),Ut(l,function(t){l[t]=s[t],delete s[t]}),e=t(r,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},e),this.remove(!1);for(n in h)this[n]=z;Wt(this,Et[e.type||a].prototype),Ut(l,function(t){s[t]=l[t]}),this.init(o,e),o.linkSeries(),Gt(i,!0)&&o.redraw(!1)}}),Wt(de.prototype,{update:function(e,i){var n=this.chart,e=n.options[this.coll][this.options.index]=t(this.userOptions,e);this.destroy(!0),this._addedPlotLB=this.chart._labelPanes=z,this.init(n,Wt(e,{events:z})),n.isDirtyBox=!0,Gt(i,!0)&&n.redraw()},remove:function(t){for(var e=this.chart,i=this.coll,n=this.series,s=n.length;s--;)n[s]&&n[s].remove(!1);h(e.axes,this),h(e[i],this),e.options[i].splice(this.options.index,1),Ut(e[i],function(t,e){t.options.index=e}),this.destroy(),e.isDirtyBox=!0,Gt(t,!0)&&e.redraw()},setTitle:function(t,e){this.update({title:t},e)},setCategories:function(t,e){this.update({categories:t},e)}});var Se=f(we);Et.line=Se,ne.area=t(Yt,{threshold:0});var Ae=f(we,{type:"area",getSegments:function(){var t,e,i,n,s=this,o=[],r=[],a=[],h=this.xAxis,l=this.yAxis,c=l.stacks[this.stackKey],d={},p=this.points,u=this.options.connectNulls;if(this.options.stacking&&!this.cropped){for(i=0;i<p.length;i++)d[p[i].x]=p[i];for(n in c)null!==c[n].total&&a.push(+n);a.sort(function(t,e){return t-e}),Ut(a,function(n){var o,a=0;if(!u||d[n]&&null!==d[n].y)if(d[n])r.push(d[n]);else{for(i=s.index;i<=l.series.length;i++)if(o=c[n].points[i+","+n]){a=o[1];break}t=h.translate(n),e=l.toPixels(a,!0),r.push({y:null,plotX:t,clientX:t,plotY:e,yBottom:e,onMouseOver:Dt})}}),r.length&&o.push(r)}else we.prototype.getSegments.call(this),o=this.segments;this.segments=o},getSegmentPath:function(t){var e,i=we.prototype.getSegmentPath.call(this,t),n=[].concat(i),s=this.options;e=i.length;var o,r=this.yAxis.getThreshold(s.threshold);if(3===e&&n.push("L",i[1],i[2]),s.stacking&&!this.closedStacks)for(e=t.length-1;e>=0;e--)o=Gt(t[e].yBottom,r),e<t.length-1&&s.step&&n.push(t[e+1].plotX,o),n.push(t[e].plotX,o);else this.closeSegment(n,t,r);return this.areaPath=this.areaPath.concat(n),i},closeSegment:function(t,e,i){t.push("L",e[e.length-1].plotX,i,"L",e[0].plotX,i)},drawGraph:function(){this.areaPath=[],we.prototype.drawGraph.apply(this);var t=this,e=this.areaPath,i=this.options,n=[["area",this.color,i.fillColor]];Ut(this.zones,function(e,s){n.push(["zoneArea"+s,e.color||t.color,e.fillColor||i.fillColor])}),Ut(n,function(n){var s=n[0],o=t[s];o?o.animate({d:e}):t[s]=t.chart.renderer.path(e).attr({fill:Gt(n[2],ae(n[1]).setOpacity(Gt(i.fillOpacity,.75)).get()),zIndex:0}).add(t.group)})},drawLegendSymbol:le.drawRectangle});Et.area=Ae,ne.spline=t(Yt),Se=f(we,{type:"spline",getPointSpline:function(t,e,i){var n,s,o,r,a=e.plotX,h=e.plotY,l=t[i-1],c=t[i+1];if(l&&c){t=l.plotY,o=c.plotX;var d,c=c.plotY;n=(1.5*a+l.plotX)/2.5,s=(1.5*h+t)/2.5,o=(1.5*a+o)/2.5,r=(1.5*h+c)/2.5,d=(r-s)*(o-a)/(o-n)+h-r,s+=d,r+=d,s>t&&s>h?(s=ct(t,h),r=2*h-s):t>s&&h>s&&(s=dt(t,h),r=2*h-s),r>c&&r>h?(r=ct(c,h),s=2*h-r):c>r&&h>r&&(r=dt(c,h),s=2*h-r),e.rightContX=o,e.rightContY=r}return i?(e=["C",l.rightContX||l.plotX,l.rightContY||l.plotY,n||a,s||h,a,h],l.rightContX=l.rightContY=null):e=["M",a,h],e}}),Et.spline=Se,ne.areaspline=t(ne.area),Ae=Ae.prototype,Se=f(Se,{type:"areaspline",closedStacks:!0,getSegmentPath:Ae.getSegmentPath,closeSegment:Ae.closeSegment,drawGraph:Ae.drawGraph,drawLegendSymbol:le.drawRectangle}),Et.areaspline=Se,ne.column=t(Yt,{borderColor:"#FFFFFF",borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:.1,shadow:!1,halo:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0}),Se=f(we,{type:"column",pointAttrToOptions:{stroke:"borderColor",fill:"color",r:"borderRadius"},cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){we.prototype.init.apply(this,arguments);var t=this,e=t.chart;e.hasRendered&&Ut(e.series,function(e){e.type===t.type&&(e.isDirty=!0)})},getColumnMetrics:function(){var t,e,i=this,n=i.options,s=i.xAxis,o=i.yAxis,r=s.reversed,a={},h=0;n.grouping===!1?h=1:Ut(i.chart.series,function(n){var s=n.options,r=n.yAxis;n.type===i.type&&n.visible&&o.len===r.len&&o.pos===r.pos&&(s.stacking?(t=n.stackKey,a[t]===z&&(a[t]=h++),e=a[t]):s.grouping!==!1&&(e=h++),n.columnIndex=e)});var l=dt(pt(s.transA)*(s.ordinalSlope||n.pointRange||s.closestPointRange||s.tickInterval||1),s.len),c=l*n.groupPadding,d=(l-2*c)/h,n=dt(n.maxPointWidth||s.len,Gt(n.pointWidth,d*(1-2*n.pointPadding)));return i.columnMetrics={width:n,offset:(d-n)/2+(c+((r?h-(i.columnIndex||0):i.columnIndex)||0)*d-l/2)*(r?-1:1)}},translate:function(){var t=this,e=t.chart,i=t.options,n=t.borderWidth=Gt(i.borderWidth,t.closestPointRange*t.xAxis.transA<2?0:1),s=t.yAxis,o=t.translatedThreshold=s.getThreshold(i.threshold),r=Gt(i.minPointLength,5),a=t.getColumnMetrics(),h=a.width,l=t.barW=ct(h,1+2*n),c=t.pointXOffset=a.offset,d=-(n%2?.5:0),p=n%2?.5:1;e.inverted&&(o-=.5,e.renderer.isVML&&(p+=1)),i.pointPadding&&(l=lt(l)),we.prototype.translate.apply(t),Ut(t.points,function(i){var n,a,u=Gt(i.yBottom,o),f=999+pt(u),f=dt(ct(-f,i.plotY),s.len+f),g=i.plotX+c,m=l,y=dt(f,u);n=ct(f,u)-y,pt(n)<r&&r&&(n=r,a=!s.reversed&&!i.negative||s.reversed&&i.negative,y=at(pt(y-o)>r?u-r:o-(a?r:0))),i.barX=g,i.pointWidth=h,m=at(g+m)+d,g=at(g)+d,m-=g,u=pt(y)<.5,n=dt(at(y+n)+p,9e4),y=at(y)+p,n-=y,u&&(y-=1,n+=1),i.tooltipPos=e.inverted?[s.len+s.pos-e.plotLeft-f,t.xAxis.len-g-m/2,n]:[g+m/2,f+s.pos-e.plotTop,n],i.shapeType="rect",i.shapeArgs={x:g,y:y,width:m,height:n}})},getSymbol:Dt,drawLegendSymbol:le.drawRectangle,drawGraph:Dt,drawPoints:function(){var e,i,n=this,s=this.chart,o=n.options,r=s.renderer,a=o.animationLimit||250;Ut(n.points,function(h){var c=h.plotY,d=h.graphic;c===z||isNaN(c)||null===h.y?d&&(h.graphic=d.destroy()):(e=h.shapeArgs,c=l(n.borderWidth)?{"stroke-width":n.borderWidth}:{},i=h.pointAttr[h.selected?"select":""]||n.pointAttr[""],d?(ie(d),d.attr(c)[s.pointCount<a?"animate":"attr"](t(e))):h.graphic=r[h.shapeType](e).attr(c).attr(i).add(n.group).shadow(o.shadow,null,o.stacking&&!o.borderRadius))})},animate:function(t){var e=this.yAxis,i=this.options,n=this.chart.inverted,s={};Tt&&(t?(s.scaleY=.001,t=dt(e.pos+e.len,ct(e.pos,e.toPixels(i.threshold))),n?s.translateX=t-e.len:s.translateY=t,this.group.attr(s)):(s.scaleY=1,s[n?"translateX":"translateY"]=e.pos,this.group.animate(s,this.options.animation),this.animate=null))},remove:function(){var t=this,e=t.chart;e.hasRendered&&Ut(e.series,function(e){e.type===t.type&&(e.isDirty=!0)}),we.prototype.remove.apply(t,arguments)}}),Et.column=Se,ne.bar=t(ne.column),Ae=f(Se,{type:"bar",inverted:!0}),Et.bar=Ae,ne.scatter=t(Yt,{lineWidth:0,marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">?</span> <span style="font-size: 10px;"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}}),Ae=f(we,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,kdDimensions:2,drawGraph:function(){this.options.lineWidth&&we.prototype.drawGraph.call(this)}}),Et.scatter=Ae,ne.pie=t(Yt,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return null===this.y?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}}),Yt={type:"pie",isCartesian:!1,pointClass:f(ke,{init:function(){ke.prototype.init.apply(this,arguments);var t,e=this;return Wt(e,{visible:e.visible!==!1,name:Gt(e.name,"Slice")}),t=function(t){e.slice("select"===t.type)},$t(e,"select",t),$t(e,"unselect",t),e},setVisible:function(t,e){var i=this,n=i.series,s=n.chart,o=n.options.ignoreHiddenPoint,e=Gt(e,o);t!==i.visible&&(i.visible=i.options.visible=t=t===z?!i.visible:t,n.options.data[_t(i,n.data)]=i.options,Ut(["graphic","dataLabel","connector","shadowGroup"],function(e){i[e]&&i[e][t?"show":"hide"](!0)}),i.legendItem&&s.legend.colorizeItem(i,t),!t&&"hover"===i.state&&i.setState(""),o&&(n.isDirty=!0),e&&s.redraw())},slice:function(t,e,i){var n=this.series;C(i,n.chart),Gt(e,!0),this.sliced=this.options.sliced=t=l(t)?t:!this.sliced,n.options.data[_t(this,n.data)]=this.options,t=t?this.slicedTranslation:{translateX:0,translateY:0},this.graphic.animate(t),this.shadowGroup&&this.shadowGroup.animate(t)},haloPath:function(t){var e=this.shapeArgs,i=this.series.chart;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(i.plotLeft+e.x,i.plotTop+e.y,e.r+t,e.r+t,{innerR:this.shapeArgs.r,start:e.start,end:e.end})}}),requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},animate:function(t){var e=this,i=e.points,n=e.startAngleRad;t||(Ut(i,function(t){var i=t.graphic,s=t.shapeArgs;i&&(i.attr({r:t.startR||e.center[3]/2,start:n,end:n}),i.animate({r:s.r,start:s.start,end:s.end},e.options.animation))}),e.animate=null)},setData:function(t,e,i,n){we.prototype.setData.call(this,t,!1,i,n),this.processData(),this.generatePoints(),Gt(e,!0)&&this.chart.redraw(i)},updateTotals:function(){var t,e,i=0,n=this.points,s=n.length,o=this.options.ignoreHiddenPoint;for(t=0;s>t;t++)e=n[t],i+=o&&!e.visible?0:e.y;for(this.total=i,t=0;s>t;t++)e=n[t],e.percentage=i>0&&(e.visible||!o)?e.y/i*100:0,e.total=i},generatePoints:function(){we.prototype.generatePoints.call(this),this.updateTotals()},translate:function(t){this.generatePoints();var e,i,n,s,o,r=0,a=this.options,h=a.slicedOffset,l=h+a.borderWidth,c=a.startAngle||0,d=this.startAngleRad=gt/180*(c-90),c=(this.endAngleRad=gt/180*(Gt(a.endAngle,c+360)-90))-d,p=this.points,u=a.dataLabels.distance,a=a.ignoreHiddenPoint,f=p.length;for(t||(this.center=t=this.getCenter()),this.getX=function(e,i){return n=rt.asin(dt((e-t[1])/(t[2]/2+u),1)),t[0]+(i?-1:1)*ut(n)*(t[2]/2+u)},s=0;f>s;s++)o=p[s],e=d+r*c,(!a||o.visible)&&(r+=o.percentage/100),i=d+r*c,o.shapeType="arc",o.shapeArgs={x:t[0],y:t[1],r:t[2]/2,innerR:t[3]/2,start:at(1e3*e)/1e3,end:at(1e3*i)/1e3},n=(i+e)/2,n>1.5*gt?n-=2*gt:-gt/2>n&&(n+=2*gt),o.slicedTranslation={translateX:at(ut(n)*h),translateY:at(ft(n)*h)},e=ut(n)*t[2]/2,i=ft(n)*t[2]/2,o.tooltipPos=[t[0]+.7*e,t[1]+.7*i],o.half=-gt/2>n||n>gt/2?1:0,o.angle=n,l=dt(l,u/2),o.labelPos=[t[0]+e+ut(n)*u,t[1]+i+ft(n)*u,t[0]+e+ut(n)*l,t[1]+i+ft(n)*l,t[0]+e,t[1]+i,0>u?"center":o.half?"right":"left",n]},drawGraph:null,drawPoints:function(){var t,e,i,n,s,o=this,r=o.chart.renderer,a=o.options.shadow;a&&!o.shadowGroup&&(o.shadowGroup=r.g("shadow").add(o.group)),Ut(o.points,function(h){null!==h.y&&(e=h.graphic,n=h.shapeArgs,i=h.shadowGroup,a&&!i&&(i=h.shadowGroup=r.g("shadow").add(o.shadowGroup)),t=h.sliced?h.slicedTranslation:{translateX:0,translateY:0},i&&i.attr(t),e?e.animate(Wt(n,t)):(s={"stroke-linejoin":"round"},h.visible||(s.visibility="hidden"),h.graphic=e=r[h.shapeType](n).setRadialReference(o.center).attr(h.pointAttr[h.selected?"select":""]).attr(s).attr(t).add(o.group).shadow(a,i)))})},searchPoint:Dt,sortByAngle:function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},drawLegendSymbol:le.drawRectangle,getCenter:be.getCenter,getSymbol:Dt},Yt=f(we,Yt),Et.pie=Yt,we.prototype.drawDataLabels=function(){var e,i,n,s,o=this,r=o.options,a=r.cursor,h=r.dataLabels,c=o.points,d=o.hasRendered||0,p=o.chart.renderer;(h.enabled||o._hasPointLabels)&&(o.dlProcessOptions&&o.dlProcessOptions(h),s=o.plotGroup("dataLabelsGroup","data-labels",h.defer?"hidden":"visible",h.zIndex||6),Gt(h.defer,!0)&&(s.attr({opacity:+d}),d||$t(o,"afterAnimate",function(){o.visible&&s.show(),s[r.animation?"animate":"attr"]({opacity:1},{duration:200})})),i=h,Ut(c,function(c){var d,u,f,g,m=c.dataLabel,v=c.connector,x=!0,b={};if(e=c.dlOptions||c.options&&c.options.dataLabels,d=Gt(e&&e.enabled,i.enabled),m&&!d)c.dataLabel=m.destroy();else if(d){if(h=t(i,e),g=h.style,d=h.rotation,u=c.getLabelConfig(),n=h.format?y(h.format,u):h.formatter.call(u,h),g.color=Gt(h.color,g.color,o.color,"black"),m)l(n)?(m.attr({text:n}),x=!1):(c.dataLabel=m=m.destroy(),v&&(c.connector=v.destroy()));else if(l(n)){m={fill:h.backgroundColor,stroke:h.borderColor,"stroke-width":h.borderWidth,r:h.borderRadius||0,rotation:d,padding:h.padding,zIndex:1},"contrast"===g.color&&(b.color=h.inside||h.distance<0||r.stacking?p.getContrast(c.color||o.color):"#000000"),a&&(b.cursor=a);for(f in m)m[f]===z&&delete m[f];m=c.dataLabel=p[d?"text":"label"](n,0,-999,h.shape,null,null,h.useHTML).attr(m).css(Wt(g,b)).add(s).shadow(h.shadow)}m&&o.alignDataLabel(c,m,h,null,x)}}))},we.prototype.alignDataLabel=function(t,e,i,n,s){var o=this.chart,r=o.inverted,a=Gt(t.plotX,-999),h=Gt(t.plotY,-999),l=e.getBBox(),c=o.renderer.fontMetrics(i.style.fontSize).b,d=this.visible&&(t.series.forceDL||o.isInsidePlot(a,at(h),r)||n&&o.isInsidePlot(a,r?n.x+1:n.y+n.height-1,r));d&&(n=Wt({x:r?o.plotWidth-h:a,y:at(r?o.plotHeight-a:h),width:0,height:0},n),Wt(i,{width:l.width,height:l.height}),i.rotation?(t=o.renderer.rotCorr(c,i.rotation),e[s?"attr":"animate"]({x:n.x+i.x+n.width/2+t.x,y:n.y+i.y+n.height/2}).attr({align:i.align})):(e.align(i,null,n),r=e.alignAttr,"justify"===Gt(i.overflow,"justify")?this.justifyDataLabel(e,i,r,l,n,s):Gt(i.crop,!0)&&(d=o.isInsidePlot(r.x,r.y)&&o.isInsidePlot(r.x+l.width,r.y+l.height)),i.shape&&e.attr({anchorX:t.plotX,anchorY:t.plotY}))),d||(e.attr({y:-999}),e.placed=!1)},we.prototype.justifyDataLabel=function(t,e,i,n,s,o){var r,a,h=this.chart,l=e.align,c=e.verticalAlign,d=t.box?0:t.padding||0;r=i.x+d,0>r&&("right"===l?e.align="left":e.x=-r,a=!0),r=i.x+n.width-d,r>h.plotWidth&&("left"===l?e.align="right":e.x=h.plotWidth-r,a=!0),r=i.y+d,0>r&&("bottom"===c?e.verticalAlign="top":e.y=-r,a=!0),r=i.y+n.height-d,r>h.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=h.plotHeight-r,a=!0),a&&(t.placed=!o,t.align(e,null,s))},Et.pie&&(Et.pie.prototype.drawDataLabels=function(){var t,e,i,n,s,o,r,a,h,l,c,d=this,p=d.data,u=d.chart,f=d.options.dataLabels,g=Gt(f.connectorPadding,10),m=Gt(f.connectorWidth,1),y=u.plotWidth,v=u.plotHeight,x=Gt(f.softConnector,!0),b=f.distance,k=d.center,S=k[2]/2,A=k[1],T=b>0,P=[[],[]],C=[0,0,0,0],L=function(t,e){return e.y-t.y};if(d.visible&&(f.enabled||d._hasPointLabels)){for(we.prototype.drawDataLabels.apply(d),Ut(p,function(t){t.dataLabel&&t.visible&&P[t.half].push(t)}),l=2;l--;){var M,D=[],O=[],z=P[l],I=z.length;if(I){for(d.sortByAngle(z,l-.5),c=p=0;!p&&z[c];)p=z[c]&&z[c].dataLabel&&(z[c].dataLabel.getBBox().height||21),c++;if(b>0){for(s=dt(A+S+b,u.plotHeight),c=ct(0,A-S-b);s>=c;c+=p)D.push(c);if(s=D.length,I>s){for(t=[].concat(z),t.sort(L),c=I;c--;)t[c].rank=c;for(c=I;c--;)z[c].rank>=s&&z.splice(c,1);I=z.length}for(c=0;I>c;c++){t=z[c],o=t.labelPos,t=9999;var R,B;for(B=0;s>B;B++)R=pt(D[B]-o[1]),t>R&&(t=R,M=B);if(c>M&&null!==D[c])M=c;else for(I-c+M>s&&null!==D[c]&&(M=s-I+c);null===D[M];)M++;O.push({i:M,y:D[M]}),D[M]=null}O.sort(L)}for(c=0;I>c;c++)t=z[c],o=t.labelPos,n=t.dataLabel,h=t.visible===!1?"hidden":"inherit",t=o[1],b>0?(s=O.pop(),M=s.i,a=s.y,(t>a&&null!==D[M+1]||a>t&&null!==D[M-1])&&(a=dt(ct(0,t),u.plotHeight))):a=t,r=f.justify?k[0]+(l?-1:1)*(S+b):d.getX(a===A-S-b||a===A+S+b?t:a,l),n._attr={visibility:h,align:o[6]},n._pos={x:r+f.x+({left:g,right:-g}[o[6]]||0),y:a+f.y-10},n.connX=r,n.connY=a,null===this.options.size&&(s=n.width,g>r-s?C[3]=ct(at(s-r+g),C[3]):r+s>y-g&&(C[1]=ct(at(r+s-y+g),C[1])),0>a-p/2?C[0]=ct(at(-a+p/2),C[0]):a+p/2>v&&(C[2]=ct(at(a+p/2-v),C[2])))}}(0===w(C)||this.verifyDataLabelOverflow(C))&&(this.placeDataLabels(),T&&m&&Ut(this.points,function(t){e=t.connector,o=t.labelPos,(n=t.dataLabel)&&n._pos&&t.visible?(h=n._attr.visibility,r=n.connX,a=n.connY,i=x?["M",r+("left"===o[6]?5:-5),a,"C",r,a,2*o[2]-o[4],2*o[3]-o[5],o[2],o[3],"L",o[4],o[5]]:["M",r+("left"===o[6]?5:-5),a,"L",o[2],o[3],"L",o[4],o[5]],e?(e.animate({d:i}),e.attr("visibility",h)):t.connector=e=d.chart.renderer.path(i).attr({"stroke-width":m,stroke:f.connectorColor||t.color||"#606060",visibility:h}).add(d.dataLabelsGroup)):e&&(t.connector=e.destroy())}))}},Et.pie.prototype.placeDataLabels=function(){Ut(this.points,function(t){var e=t.dataLabel;e&&t.visible&&((t=e._pos)?(e.attr(e._attr),e[e.moved?"animate":"attr"](t),e.moved=!0):e&&e.attr({y:-999}))})},Et.pie.prototype.alignDataLabel=Dt,Et.pie.prototype.verifyDataLabelOverflow=function(t){var e,i=this.center,n=this.options,s=n.center,o=n.minSize||80,r=o;return null!==s[0]?r=ct(i[2]-ct(t[1],t[3]),o):(r=ct(i[2]-t[1]-t[3],o),i[0]+=(t[3]-t[1])/2),null!==s[1]?r=ct(dt(r,i[2]-ct(t[0],t[2])),o):(r=ct(dt(r,i[2]-t[0]-t[2]),o),i[1]+=(t[0]-t[2])/2),r<i[2]?(i[2]=r,i[3]=/%$/.test(n.innerSize||0)?r*parseFloat(n.innerSize||0)/100:parseFloat(n.innerSize||0),this.translate(i),Ut(this.points,function(t){t.dataLabel&&(t.dataLabel._pos=null)}),this.drawDataLabels&&this.drawDataLabels()):e=!0,e}),Et.column&&(Et.column.prototype.alignDataLabel=function(e,i,n,s,o){var r=this.chart.inverted,a=e.series,h=e.dlBox||e.shapeArgs,l=Gt(e.below,e.plotY>Gt(this.translatedThreshold,a.yAxis.len)),c=Gt(n.inside,!!this.options.stacking);h&&(s=t(h),r&&(s={x:a.yAxis.len-s.y-s.height,y:a.xAxis.len-s.x-s.width,width:s.height,height:s.width}),!c)&&(r?(s.x+=l?0:s.width,s.width=0):(s.y+=l?s.height:0,s.height=0)),n.align=Gt(n.align,!r||c?"center":l?"right":"left"),n.verticalAlign=Gt(n.verticalAlign,r||c?"middle":l?"top":"bottom"),we.prototype.alignDataLabel.call(this,e,i,n,s,o)}),function(t){var e=t.Chart,i=t.each,n=t.pick,s=HighchartsAdapter.addEvent;e.prototype.callbacks.push(function(t){function e(){var e=[];i(t.series,function(t){var s=t.options.dataLabels,o=t.dataLabelCollections||["dataLabel"];(s.enabled||t._hasPointLabels)&&!s.allowOverlap&&t.visible&&i(o,function(s){i(t.points,function(t){t[s]&&(t[s].labelrank=n(t.labelrank,t.shapeArgs&&t.shapeArgs.height),e.push(t[s]))})})}),t.hideOverlappingLabels(e)}e(),s(t,"redraw",e)}),e.prototype.hideOverlappingLabels=function(t){var e,n,s,o,r,a,h,l=t.length;for(n=0;l>n;n++)(e=t[n])&&(e.oldOpacity=e.opacity,e.newOpacity=1);for(t.sort(function(t,e){return(e.labelrank||0)-(t.labelrank||0)}),n=0;l>n;n++)for(s=t[n],e=n+1;l>e;++e)o=t[e],s&&o&&s.placed&&o.placed&&0!==s.newOpacity&&0!==o.newOpacity&&(r=s.alignAttr,a=o.alignAttr,h=2*(s.box?0:s.padding),r=!(a.x>r.x+(s.width-h)||a.x+(o.width-h)<r.x||a.y>r.y+(s.height-h)||a.y+(o.height-h)<r.y))&&((s.labelrank<o.labelrank?s:o).newOpacity=0);i(t,function(t){var e,i;t&&(i=t.newOpacity,t.oldOpacity!==i&&t.placed&&(i?t.show(!0):e=function(){t.hide()},t.alignAttr.opacity=i,t[t.isOld?"animate":"attr"](t.alignAttr,null,e)),t.isOld=!0)})}}(nt),Yt=nt.TrackerMixin={drawTrackerPoint:function(){var t=this,e=t.chart,i=e.pointer,n=t.options.cursor,s=n&&{cursor:n},o=function(t){for(var i,n=t.target;n&&!i;)i=n.point,n=n.parentNode;i!==z&&i!==e.hoverPoint&&i.onMouseOver(t)};Ut(t.points,function(t){t.graphic&&(t.graphic.element.point=t),t.dataLabel&&(t.dataLabel.element.point=t)}),t._hasTracking||(Ut(t.trackerGroups,function(e){t[e]&&(t[e].addClass("highcharts-tracker").on("mouseover",o).on("mouseout",function(t){i.onTrackerMouseOut(t)}).css(s),R)&&t[e].on("touchstart",o)}),t._hasTracking=!0)},drawTrackerGraph:function(){var t,e=this,i=e.options,n=i.trackByArea,s=[].concat(n?e.areaPath:e.graphPath),o=s.length,r=e.chart,a=r.pointer,h=r.renderer,l=r.options.tooltip.snap,c=e.tracker,d=i.cursor,p=d&&{cursor:d},d=e.singlePoints,u=function(){r.hoverSeries!==e&&e.onMouseOver()},f="rgba(192,192,192,"+(Tt?1e-4:.002)+")";if(o&&!n)for(t=o+1;t--;)"M"===s[t]&&s.splice(t+1,0,s[t+1]-l,s[t+2],"L"),(t&&"M"===s[t]||t===o)&&s.splice(t,0,"L",s[t-2]+l,s[t-1]);for(t=0;t<d.length;t++)o=d[t],s.push("M",o.plotX-l,o.plotY,"L",o.plotX+l,o.plotY);c?c.attr({d:s}):(e.tracker=h.path(s).attr({"stroke-linejoin":"round",visibility:e.visible?"visible":"hidden",stroke:f,fill:n?f:Rt,"stroke-width":i.lineWidth+(n?0:2*l),zIndex:2}).add(e.group),Ut([e.tracker,e.markerGroup],function(t){t.addClass("highcharts-tracker").on("mouseover",u).on("mouseout",function(t){a.onTrackerMouseOut(t)}).css(p),R&&t.on("touchstart",u)}))}},Et.column&&(Se.prototype.drawTracker=Yt.drawTrackerPoint),Et.pie&&(Et.pie.prototype.drawTracker=Yt.drawTrackerPoint),Et.scatter&&(Ae.prototype.drawTracker=Yt.drawTrackerPoint),Wt(xe.prototype,{setItemEvents:function(t,e,i,n,s){var o=this;(i?e:t.legendGroup).on("mouseover",function(){t.setState("hover"),e.css(o.options.itemHoverStyle)}).on("mouseout",function(){e.css(t.visible?n:s),t.setState()}).on("click",function(e){var i=function(){t.setVisible()},e={browserEvent:e};t.firePointEvent?t.firePointEvent("legendItemClick",e,i):Qt(t,"legendItemClick",e,i)})},createCheckboxForItem:function(t){t.checkbox=u("input",{type:"checkbox",checked:t.selected,defaultChecked:t.selected},this.options.itemCheckboxStyle,this.chart.container),$t(t.checkbox,"click",function(e){Qt(t.series||t,"checkboxClick",{checked:e.target.checked,item:t},function(){t.select()})})}}),X.legend.itemStyle.cursor="pointer",Wt(Nt.prototype,{showResetZoom:function(){var t=this,e=X.lang,i=t.options.chart.resetZoomButton,n=i.theme,s=n.states,o="chart"===i.relativeTo?null:"plotBox";this.resetZoomButton=t.renderer.button(e.resetZoom,null,null,function(){t.zoomOut()},n,s&&s.hover).attr({align:i.position.align,title:e.resetZoomTitle}).add().align(i.position,!1,o)},zoomOut:function(){var t=this;Qt(t,"selection",{resetSelection:!0},function(){t.zoom()})},zoom:function(t){var e,i,s=this.pointer,o=!1;!t||t.resetSelection?Ut(this.axes,function(t){e=t.zoom()}):Ut(t.xAxis.concat(t.yAxis),function(t){var i=t.axis,n=i.isXAxis;(s[n?"zoomX":"zoomY"]||s[n?"pinchX":"pinchY"])&&(e=i.zoom(t.min,t.max),i.displayBtn&&(o=!0))}),i=this.resetZoomButton,o&&!i?this.showResetZoom():!o&&n(i)&&(this.resetZoomButton=i.destroy()),e&&this.redraw(Gt(this.options.chart.animation,t&&t.animation,this.pointCount<100))},pan:function(t,e){var i,n=this,s=n.hoverPoints;s&&Ut(s,function(t){t.setState()}),Ut("xy"===e?[1,0]:[1],function(e){var s=t[e?"chartX":"chartY"],o=n[e?"xAxis":"yAxis"][0],r=n[e?"mouseDownX":"mouseDownY"],a=(o.pointRange||0)/2,h=o.getExtremes(),l=o.toValue(r-s,!0)+a,a=o.toValue(r+n[e?"plotWidth":"plotHeight"]-s,!0)-a,r=r>s;o.series.length&&(r||l>dt(h.dataMin,h.min))&&(!r||a<ct(h.dataMax,h.max))&&(o.setExtremes(l,a,!1,!1,{trigger:"pan"}),i=!0),n[e?"mouseDownX":"mouseDownY"]=s}),i&&n.redraw(!1),p(n.container,{cursor:"move"})}}),Wt(ke.prototype,{select:function(t,e){var i=this,n=i.series,s=n.chart,t=Gt(t,!i.selected);i.firePointEvent(t?"select":"unselect",{accumulate:e},function(){i.selected=i.options.selected=t,n.options.data[_t(i,n.data)]=i.options,i.setState(t&&"select"),e||Ut(s.getSelectedPoints(),function(t){t.selected&&t!==i&&(t.selected=t.options.selected=!1,n.options.data[_t(t,n.data)]=t.options,t.setState(""),t.firePointEvent("unselect"))})})},onMouseOver:function(t,e){var i=this.series,n=i.chart,s=n.tooltip,o=n.hoverPoint;n.hoverSeries!==i&&i.onMouseOver(),o&&o!==this&&o.onMouseOut(),this.series&&(this.firePointEvent("mouseOver"),s&&(!s.shared||i.noSharedTooltip)&&s.refresh(this,t),this.setState("hover"),!e)&&(n.hoverPoint=this)},onMouseOut:function(){var t=this.series.chart,e=t.hoverPoints;this.firePointEvent("mouseOut"),e&&-1!==_t(this,e)||(this.setState(),t.hoverPoint=null)},importEvents:function(){if(!this.hasImportedEvents){var e,i=t(this.series.options.point,this.options).events;this.events=i;for(e in i)$t(this,e,i[e]);this.hasImportedEvents=!0}},setState:function(e,i){var n,s=this.plotX,o=this.plotY,r=this.series,a=r.options.states,h=ne[r.type].marker&&r.options.marker,l=h&&!h.enabled,c=h&&h.states[e],d=c&&c.enabled===!1,p=r.stateMarkerGraphic,u=this.marker||{},f=r.chart,g=r.halo,e=e||""; n=this.pointAttr[e]||r.pointAttr[e],e===this.state&&!i||this.selected&&"select"!==e||a[e]&&a[e].enabled===!1||e&&(d||l&&c.enabled===!1)||e&&u.states&&u.states[e]&&u.states[e].enabled===!1||(this.graphic?(h=h&&this.graphic.symbolName&&n.r,this.graphic.attr(t(n,h?{x:s-h,y:o-h,width:2*h,height:2*h}:{})),p&&p.hide()):(e&&c&&(h=c.radius,u=u.symbol||r.symbol,p&&p.currentSymbol!==u&&(p=p.destroy()),p?p[i?"animate":"attr"]({x:s-h,y:o-h}):u&&(r.stateMarkerGraphic=p=f.renderer.symbol(u,s-h,o-h,2*h,2*h).attr(n).add(r.markerGroup),p.currentSymbol=u)),p&&(p[e&&f.isInsidePlot(s,o,f.inverted)?"show":"hide"](),p.element.point=this)),(s=a[e]&&a[e].halo)&&s.size?(g||(r.halo=g=f.renderer.path().add(f.seriesGroup)),g.attr(Wt({fill:ae(this.color||r.color).setOpacity(s.opacity).get()},s.attributes))[i?"animate":"attr"]({d:this.haloPath(s.size)})):g&&g.attr({d:[]}),this.state=e)},haloPath:function(t){var e=this.series,i=e.chart,n=e.getPlotBox(),s=i.inverted;return i.renderer.symbols.circle(n.translateX+(s?e.yAxis.len-this.plotY:this.plotX)-t,n.translateY+(s?e.xAxis.len-this.plotX:this.plotY)-t,2*t,2*t)}}),Wt(we.prototype,{onMouseOver:function(){var t=this.chart,e=t.hoverSeries;e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&Qt(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this},onMouseOut:function(){var t=this.options,e=this.chart,i=e.tooltip,n=e.hoverPoint;e.hoverSeries=null,n&&n.onMouseOut(),this&&t.events.mouseOut&&Qt(this,"mouseOut"),i&&!t.stickyTracking&&(!i.shared||this.noSharedTooltip)&&i.hide(),this.setState()},setState:function(t){var e=this.options,i=this.graph,n=e.states,s=e.lineWidth,e=0,t=t||"";if(this.state!==t&&(this.state=t,!(n[t]&&n[t].enabled===!1)&&(t&&(s=n[t].lineWidth||s+(n[t].lineWidthPlus||0)),i&&!i.dashstyle)))for(t={"stroke-width":s},i.attr(t);this["zoneGraph"+e];)this["zoneGraph"+e].attr(t),e+=1},setVisible:function(t,e){var i,n=this,s=n.chart,o=n.legendItem,r=s.options.chart.ignoreHiddenSeries,a=n.visible;i=(n.visible=t=n.userOptions.visible=t===z?!a:t)?"show":"hide",Ut(["group","dataLabelsGroup","markerGroup","tracker"],function(t){n[t]&&n[t][i]()}),(s.hoverSeries===n||(s.hoverPoint&&s.hoverPoint.series)===n)&&n.onMouseOut(),o&&s.legend.colorizeItem(n,t),n.isDirty=!0,n.options.stacking&&Ut(s.series,function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)}),Ut(n.linkedSeries,function(e){e.setVisible(t,!1)}),r&&(s.isDirtyBox=!0),e!==!1&&s.redraw(),Qt(n,i)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(t){this.selected=t=t===z?!this.selected:t,this.checkbox&&(this.checkbox.checked=t),Qt(this,t?"select":"unselect")},drawTracker:Yt.drawTrackerGraph}),Wt(nt,{Color:ae,Point:ke,Tick:D,Renderer:I,SVGElement:M,SVGRenderer:he,arrayMin:k,arrayMax:w,charts:Ot,dateFormat:H,error:T,format:y,pathAnim:E,getOptions:function(){return X},hasBidiBug:Pt,isTouchDevice:St,setOptions:function(e){return X=t(!0,X,e),L(),X},addEvent:$t,removeEvent:Jt,createElement:u,discardElement:A,css:p,each:Ut,map:qt,merge:t,splat:d,extendClass:f,pInt:e,svg:Tt,canvas:Ct,vml:!Tt&&!Ct,product:"Highcharts",version:"4.1.8"})}();