!function(){function g(){}var O,h,e,H,m,A,t,y,x,v,b,k,w,T,S,P,L,C,M,D,c,I=document,d=window,X=Math,N=X.round,z=X.floor,B=X.ceil,F=X.max,R=X.min,V=X.abs,W=X.cos,Y=X.sin,E=X.PI,G=2*E/360,p=navigator.userAgent,i=d.opera,j=/msie/i.test(p)&&!i,_=8===I.documentMode,U=/AppleWebKit/.test(p),u=/Firefox/.test(p),n=/(Mobile|Android|Windows Phone)/.test(p),Z="http://www.w3.org/2000/svg",K=!!I.createElementNS&&!!I.createElementNS(Z,"svg").createSVGRect,o=u&&parseInt(p.split("Firefox/")[1],10)<4,f=!K&&!j&&!!I.createElement("canvas").getContext,$=I.documentElement.ontouchstart!==O,q={},J=0,Q=[],tt="Highcharts",et="3.0.6",it="div",l="absolute",nt="relative",ot="hidden",rt="highcharts-",st="visible",at="px",lt="none",ht="M",ct="L",dt="rgba(192,192,192,"+(K?1e-4:.002)+")",pt="",ut="hover",ft="select",a="millisecond",gt="second",mt="minute",yt="hour",xt="day",vt="week",bt="month",kt="year",wt="stroke-width",Tt={};function St(t,e){var i;for(i in t=t||{},e)t[i]=e[i];return t}function Pt(){var t,e=arguments.length,i={},o=function(t,e){var i,n;for(n in"object"!=typeof t&&(t={}),e)e.hasOwnProperty(n)&&((i=e[n])&&"object"==typeof i&&"[object Array]"!==Object.prototype.toString.call(i)&&"number"!=typeof i.nodeType?t[n]=o(t[n]||{},i):t[n]=e[n]);return t};for(t=0;t<e;t++)i=o(i,arguments[t]);return i}function At(t,e){return parseInt(t,e||10)}function Lt(t){return"string"==typeof t}function Ct(t){return"object"==typeof t}function Mt(t){return"[object Array]"===Object.prototype.toString.call(t)}function Dt(t){return"number"==typeof t}function It(t){return X.log(t)/X.LN10}function zt(t){return X.pow(10,t)}function Bt(t,e){for(var i=t.length;i--;)if(t[i]===e){t.splice(i,1);break}}function Ot(t){return t!==O&&null!==t}function Rt(t,e,i){var n,o,r="setAttribute";if(Lt(e))Ot(i)?t[r](e,i):t&&t.getAttribute&&(o=t.getAttribute(e));else if(Ot(e)&&Ct(e))for(n in e)t[r](n,e[n]);return o}function Ht(t){return Mt(t)?t:[t]}function Xt(){var t,e,i=arguments,n=i.length;for(t=0;t<n;t++)if(null!=(e=i[t]))return e}function Wt(t,e){j&&e&&e.opacity!==O&&(e.filter="alpha(opacity="+100*e.opacity+")"),St(t.style,e)}function Yt(t,e,i,n,o){var r=I.createElement(t);return e&&St(r,e),o&&Wt(r,{padding:0,border:lt,margin:0}),i&&Wt(r,i),n&&n.appendChild(r),r}function r(t,e){function i(){}return St(i.prototype=new t,e),i}function Et(t,e,i,n){var o=H.lang,r=+t||0,s=-1===e?(r.toString().split(".")[1]||"").length:isNaN(e=V(e))?2:e,a=void 0===i?o.decimalPoint:i,l=void 0===n?o.thousandsSep:n,h=r<0?"-":"",c=String(At(r=V(r).toFixed(s))),d=3<c.length?c.length%3:0;return h+(d?c.substr(0,d)+l:"")+c.substr(d).replace(/(\d{3})(?=\d)/g,"$1"+l)+(s?a+V(r-c).toFixed(s).slice(2):"")}function Gt(t,e){return new Array((e||2)+1-String(t).length).join(0)+t}function Nt(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)}}function Ft(t,e){for(var i,n,o,r,s,a,l,h,c,d,p,u="{",f=!1,g=[];-1!==(l=t.indexOf(u));){if(i=t.slice(0,l),f){for(s=(o=(n=i.split(":")).shift().split(".")).length,a=e,r=0;r<s;r++)a=a[o[r]];n.length&&(h=n.join(":"),c=a,d=void 0,p=H.lang,a=c=/f$/.test(h)?Et(c,d=(d=h.match(/\.([0-9])/))?d[1]:-1,p.decimalPoint,-1<h.indexOf(",")?p.thousandsSep:""):m(h,c)),g.push(a)}else g.push(i);t=t.slice(l+1),u=(f=!f)?"}":"{"}return g.push(t),g.join("")}function Vt(t){return X.pow(10,z(X.log(t)/X.LN10))}function jt(t,e,i,n){var o,r;for(o=t/(i=Xt(i,1)),e||(e=[1,2,2.5,5,10],n&&!1===n.allowDecimals&&(1===i?e=[1,2,5,10]:i<=.1&&(e=[1/i]))),r=0;r<e.length&&(t=e[r],!(o<=(e[r]+(e[r+1]||e[r]))/2));r++);return t*=i}function _t(t,e){var i,n=e||[[a,[1,2,5,10,20,25,50,100,200,500]],[gt,[1,2,5,10,15,30]],[mt,[1,2,5,10,15,30]],[yt,[1,2,3,4,6,8,12]],[xt,[1,2]],[vt,[1,2]],[bt,[1,2,3,4,6]],[kt,null]],o=n[n.length-1],r=y[o[0]],s=o[1];for(i=0;i<n.length;i++){if(r=y[(o=n[i])[0]],s=o[1],n[i+1])if(t<=(r*s[s.length-1]+y[n[i+1][0]])/2)break}return r===y[kt]&&t<5*r&&(s=[1,2,5]),{unitRange:r,count:jt(t/r,s,o[0]===kt?Vt(t/r):1),unitName:o[0]}}function Ut(t,e,i,n){var o,r,s=[],a={},l=H.global.useUTC,h=new Date(e),c=t.unitRange,d=t.count;if(Ot(e)){c>=y[gt]&&(h.setMilliseconds(0),h.setSeconds(c>=y[mt]?0:d*z(h.getSeconds()/d))),c>=y[mt]&&h[P](c>=y[yt]?0:d*z(h[v]()/d)),c>=y[yt]&&h[L](c>=y.day?0:d*z(h[b]()/d)),c>=y.day&&h[C](c>=y[bt]?1:d*z(h[w]()/d)),c>=y[bt]&&(h[M](c>=y[kt]?0:d*z(h[T]()/d)),r=h[S]()),c>=y[kt]&&(r-=r%d,h[D](r)),c===y[vt]&&h[C](h[w]()-h[k]()+Xt(n,1)),o=1,r=h[S]();for(var p=h.getTime(),u=h[T](),f=h[w](),g=l?0:(864e5+60*h.getTimezoneOffset()*1e3)%864e5;p<i;)s.push(p),c===y[kt]?p=x(r+o*d,0):c===y[bt]?p=x(r,u+o*d):l||c!==y.day&&c!==y[vt]?p+=c*d:p=x(r,u,f+o*d*(c===y.day?1:7)),o++;s.push(p),ae(le(s,function(t){return c<=y[yt]&&t%y.day==g}),function(t){a[t]=xt})}return s.info=St(t,{higherRanks:a,totalRange:c*d}),s}function Zt(){this.color=0,this.symbol=0}function Kt(t,i){var n,e,o=t.length;for(e=0;e<o;e++)t[e].ss_i=e;for(t.sort(function(t,e){return 0===(n=i(t,e))?t.ss_i-e.ss_i:n}),e=0;e<o;e++)delete t[e].ss_i}function $t(t){for(var e=t.length,i=t[0];e--;)t[e]<i&&(i=t[e]);return i}function qt(t){for(var e=t.length,i=t[0];e--;)t[e]>i&&(i=t[e]);return i}function s(t,e){var i;for(i in t)t[i]&&t[i]!==e&&t[i].destroy&&t[i].destroy(),delete t[i]}function Jt(t){e=e||Yt(it),t&&e.appendChild(t),e.innerHTML=""}function Qt(t,e){var i="Highcharts error #"+t+": www.highcharts.com/errors/"+t;if(e)throw i;d.console&&console.log(i)}function te(t){return parseFloat(t.toPrecision(14))}function ee(t,e){A=Xt(t,e.animation)}d.Highcharts=d.Highcharts?Qt(16,!0):{},m=function(t,e,i){if(!Ot(e)||isNaN(e))return"Invalid date";t=Xt(t,"%Y-%m-%d %H:%M:%S");var n,o=new Date(e),r=o[b](),s=o[k](),a=o[w](),l=o[T](),h=o[S](),c=H.lang,d=c.weekdays,p=St({a:d[s].substr(0,3),A:d[s],d:Gt(a),e:a,b:c.shortMonths[l],B:c.months[l],m:Gt(l+1),y:h.toString().substr(2,2),Y:h,H:Gt(r),I:Gt(r%12||12),l:r%12||12,M:Gt(o[v]()),p:r<12?"AM":"PM",P:r<12?"am":"pm",S:Gt(o.getSeconds()),L:Gt(N(e%1e3),3)},Highcharts.dateFormats);for(n in p)for(;-1!==t.indexOf("%"+n);)t=t.replace("%"+n,"function"==typeof p[n]?p[n](e):p[n]);return i?t.substr(0,1).toUpperCase()+t.substr(1):t},Zt.prototype={wrapColor:function(t){this.color>=t&&(this.color=0)},wrapSymbol:function(t){this.symbol>=t&&(this.symbol=0)}},y=function(){for(var t=0,e=arguments,i=e.length,n={};t<i;t++)n[e[t++]]=e[t];return n}(a,1,gt,1e3,mt,6e4,yt,36e5,xt,864e5,vt,6048e5,bt,26784e5,kt,31556952e3),t={init:function(t,e,i){e=e||"";function n(t){for(s=t.length;s--;)t[s]===ht&&t.splice(s+1,0,t[s+1],t[s+2],t[s+1],t[s+2])}var o,r,s,a,l,h=t.shift,c=-1<e.indexOf("C"),d=c?7:3,p=e.split(" "),u=[].concat(i);if(c&&(n(p),n(u)),t.isArea&&(a=p.splice(p.length-6,6),l=u.splice(u.length-6,6)),h<=u.length/d&&p.length===u.length)for(;h--;)u=[].concat(u).splice(0,d).concat(u);if(t.shift=0,p.length)for(o=u.length;p.length<o;)r=[].concat(p).splice(p.length-d,d),c&&(r[d-6]=r[d-2],r[d-5]=r[d-1]),p=p.concat(r);return a&&(p=p.concat(a),u=u.concat(l)),[p,u]},step:function(t,e,i,n){var o,r=[],s=t.length;if(1===i)r=n;else if(s===e.length&&i<1)for(;s--;)o=parseFloat(t[s]),r[s]=isNaN(o)?t[s]:i*parseFloat(e[s]-o)+o;else r=e;return r}},c=d.jQuery,d.HighchartsAdapter=d.HighchartsAdapter||c&&{init:function(n){var t,r=c.fx,s=r.step,a=c.Tween,l=a&&a.propHooks,e=c.cssHooks.opacity;c.extend(c.easing,{easeOutQuad:function(t,e,i,n,o){return-n*(e/=o)*(e-2)+i}}),c.each(["cur","_default","width","height","opacity"],function(e,i){var n,o,t=s;"cur"===i?t=r.prototype:"_default"===i&&a&&(t=l[i],i="set"),(n=t[i])&&(t[i]=function(t){if("align"!==(t=e?t:this).prop)return(o=t.elem).attr?o.attr(t.prop,"cur"===i?O:t.now):n.apply(this,arguments)})}),Nt(e,"get",function(t,e,i){return e.attr?e.opacity||0:t.call(this,e,i)}),t=function(t){var e,i=t.elem;t.started||(e=n.init(i,i.d,i.toD),t.start=e[0],t.end=e[1],t.started=!0),i.attr("d",n.step(t.start,t.end,t.pos,i.toD))},a?l.d={set:t}:s.d=t,this.each=Array.prototype.forEach?function(t,e){return Array.prototype.forEach.call(t,e)}:function(t,e){for(var i=0,n=t.length;i<n;i++)if(!1===e.call(t[i],t[i],i,t))return i},c.fn.highcharts=function(){var t,e,i="Chart",n=arguments;return Lt(n[0])&&(i=n[0],n=Array.prototype.slice.call(n,1)),(t=n[0])!==O&&(t.chart=t.chart||{},t.chart.renderTo=this[0],new Highcharts[i](t,n[1]),e=this),t===O&&(e=Q[Rt(this[0],"data-highcharts-chart")]),e}},getScript:c.getScript,inArray:c.inArray,adapterRun:function(t,e){return c(t)[e]()},grep:c.grep,map:function(t,e){for(var i=[],n=0,o=t.length;n<o;n++)i[n]=e.call(t[n],t[n],n,t);return i},offset:function(t){return c(t).offset()},addEvent:function(t,e,i){c(t).bind(e,i)},removeEvent:function(t,e,i){var n=I.removeEventListener?"removeEventListener":"detachEvent";I[n]&&t&&!t[n]&&(t[n]=function(){}),c(t).unbind(e,i)},fireEvent:function(t,e,i,n){var o,r=c.Event(e),s="detached"+e;!j&&i&&(delete i.layerX,delete i.layerY),St(r,i),t[e]&&(t[s]=t[e],t[e]=null),c.each(["preventDefault","stopPropagation"],function(t,e){var i=r[e];r[e]=function(){try{i.call(r)}catch(t){"preventDefault"===e&&(o=!0)}}}),c(t).trigger(r),t[s]&&(t[e]=t[s],t[s]=null),!n||r.isDefaultPrevented()||o||n(r)},washMouseEvent:function(t){var e=t.originalEvent||t;return e.pageX===O&&(e.pageX=t.pageX,e.pageY=t.pageY),e},animate:function(t,e,i){var n=c(t);t.style||(t.style={}),e.d&&(t.toD=e.d,e.d=1),n.stop(),e.opacity!==O&&t.attr&&(e.opacity+="px"),n.animate(e,i)},stop:function(t){c(t).stop()}};var ie=d.HighchartsAdapter,ne=ie||{};ie&&ie.init.call(ie,t);var oe=ne.adapterRun,re=ne.getScript,se=ne.inArray,ae=ne.each,le=ne.grep,he=ne.offset,ce=ne.map,de=ne.addEvent,pe=ne.removeEvent,ue=ne.fireEvent,fe=ne.washMouseEvent,ge=ne.animate,me=ne.stop,ye={enabled:!0,x:0,y:15,style:{color:"#666",cursor:"default",fontSize:"11px",lineHeight:"14px"}},xe=(H={colors:["#2f7ed8","#0d233a","#8bbc21","#910000","#1aadce","#492970","#f28f43","#77a1e5","#c42525","#a6c96a"],symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",numericSymbols:["k","M","G","T","P","E"],resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/3.0.6/modules/canvas-tools.js",VMLRadialGradientURL:"http://code.highcharts.com/3.0.6/gfx/vml-radial-gradient.png"},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:"12px"},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:"#274b6d",fontSize:"16px"}},subtitle:{text:"",align:"center",style:{color:"#4d759e"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},lineWidth:2,marker:{enabled:!0,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{enabled:!0},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:Pt(ye,{align:"center",enabled:!1,formatter:function(){return null===this.y?"":Et(this.y,-1)},verticalAlign:"bottom",y:0}),cropThreshold:300,pointRange:0,showInLegend:!0,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:!0}},labels:{style:{position:l,color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,navigation:{activeColor:"#274b6d",inactiveColor:"#CCC"},shadow:!1,itemStyle:{cursor:"pointer",color:"#274b6d",fontSize:"12px"},itemHoverStyle:{color:"#000"},itemHiddenStyle:{color:"#CCC"},itemCheckboxStyle:{position:l,width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:nt,top:"1em"},style:{position:l,backgroundColor:"white",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:K,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:1,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>',shadow:!0,snap:n?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"}}}).plotOptions,ve=xe.line;function be(){var t=H.global.useUTC,e=t?"getUTC":"get",i=t?"setUTC":"set";x=t?Date.UTC:function(t,e,i,n,o,r){return new Date(t,e,Xt(i,1),Xt(n,0),Xt(o,0),Xt(r,0)).getTime()},v=e+"Minutes",b=e+"Hours",k=e+"Day",w=e+"Date",T=e+"Month",S=e+"FullYear",P=i+"Minutes",L=i+"Hours",C=i+"Date",M=i+"Month",D=i+"FullYear"}be();var ke=function(t){var e,o,i,r=[];return(i=t)&&i.stops?o=ce(i.stops,function(t){return ke(t[1])}):(e=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(i))?r=[At(e[1]),At(e[2]),At(e[3]),parseFloat(e[4],10)]:(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(i))?r=[At(e[1],16),At(e[2],16),At(e[3],16),1]:(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(i))&&(r=[At(e[1]),At(e[2]),At(e[3]),1]),{get:function(i){var n;return o?((n=Pt(t)).stops=[].concat(n.stops),ae(o,function(t,e){n.stops[e]=[n.stops[e][0],t.get(i)]})):n=r&&!isNaN(r[0])?"rgb"===i?"rgb("+r[0]+","+r[1]+","+r[2]+")":"a"===i?r[3]:"rgba("+r.join(",")+")":t,n},brighten:function(e){if(o)ae(o,function(t){t.brighten(e)});else if(Dt(e)&&0!==e){var t;for(t=0;t<3;t++)r[t]+=At(255*e),r[t]<0&&(r[t]=0),255<r[t]&&(r[t]=255)}return this},rgba:r,setOpacity:function(t){return r[3]=t,this}}};function we(){}we.prototype={init:function(t,e){this.element="span"===e?Yt(e):I.createElementNS(Z,e),this.renderer=t,this.attrSetters={}},opacity:1,animate:function(t,e,i){var n=Xt(e,A,!0);me(this),n?(n=Pt(n),i&&(n.complete=i),ge(this,t,n)):(this.attr(t),i&&i())},attr:function(t,e){var i,n,o,r,s,a,l,h,c,d=this,p=d.element,u=p.nodeName.toLowerCase(),f=d.renderer,g=d.attrSetters,m=d.shadows,y=d;if(Lt(t)&&Ot(e)&&(i=t,(t={})[i]=e),Lt(t))i=t,"circle"===u?i={x:"cx",y:"cy"}[i]||i:"strokeWidth"===i&&(i="stroke-width"),y=Rt(p,i)||d[i]||0,"d"!==i&&"visibility"!==i&&"fill"!==i&&(y=parseFloat(y));else{for(i in t)if(a=!1,n=t[i],!1!==(o=g[i]&&g[i].call(d,n,i))){if(o!==O&&(n=o),"d"===i)n&&n.join&&(n=n.join(" ")),/(NaN| {2}|^$)/.test(n)&&(n="M 0 0");else if("x"===i&&"text"===u)for(r=0;r<p.childNodes.length;r++)Rt(s=p.childNodes[r],"x")===Rt(p,"x")&&Rt(s,"x",n);else if(!d.rotation||"x"!==i&&"y"!==i)if("fill"===i)n=f.color(n,p,i);else if("circle"!==u||"x"!==i&&"y"!==i)if("rect"===u&&"r"===i)Rt(p,{rx:n,ry:n}),a=!0;else if("translateX"===i||"translateY"===i||"rotation"===i||"verticalAlign"===i||"scaleX"===i||"scaleY"===i)a=c=!0;else if("stroke"===i)n=f.color(n,p,i);else if("dashstyle"===i){if(i="stroke-dasharray","solid"===(n=n&&n.toLowerCase()))n=lt;else if(n){for(r=(n=n.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(",")).length;r--;)n[r]=At(n[r])*Xt(t["stroke-width"],d["stroke-width"]);n=n.join(",")}}else"width"===i?n=At(n):"align"===i?(i="text-anchor",n={left:"start",center:"middle",right:"end"}[n]):"title"===i&&((l=p.getElementsByTagName("title")[0])||(l=I.createElementNS(Z,"title"),p.appendChild(l)),l.textContent=n);else i={x:"cx",y:"cy"}[i]||i;else c=!0;if("strokeWidth"===i&&(i="stroke-width"),"stroke-width"!==i&&"stroke"!==i||(d[i]=n,d.stroke&&d["stroke-width"]?(Rt(p,"stroke",d.stroke),Rt(p,"stroke-width",d["stroke-width"]),d.hasStroke=!0):"stroke-width"===i&&0===n&&d.hasStroke&&(p.removeAttribute("stroke"),d.hasStroke=!1),a=!0),d.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(i)&&(h||(d.symbolAttr(t),h=!0),a=!0),m&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(i))for(r=m.length;r--;)Rt(m[r],i,"height"===i?F(n-(m[r].cutHeight||0),0):n);("width"===i||"height"===i)&&"rect"===u&&n<0&&(n=0),d[i]=n,"text"===i?(n!==d.textStr&&delete d.bBox,d.textStr=n,d.added&&f.buildText(d)):a||Rt(p,i,n)}c&&d.updateTransform()}return y},addClass:function(t){var e=this.element,i=Rt(e,"class")||"";return-1===i.indexOf(t)&&Rt(e,"class",i+" "+t),this},symbolAttr:function(e){var i=this;ae(["x","y","r","start","end","width","height","innerR","anchorX","anchorY"],function(t){i[t]=Xt(e[t],i[t])}),i.attr({d:i.renderer.symbols[i.symbolName](i.x,i.y,i.width,i.height,i)})},clip:function(t){return this.attr("clip-path",t?"url("+this.renderer.url+"#"+t.id+")":lt)},crisp:function(t,e,i,n,o){var r,s,a=this,l={},h={};for(r in t=t||a.strokeWidth||a.attr&&a.attr("stroke-width")||0,s=N(t)%2/2,h.x=z(e||a.x||0)+s,h.y=z(i||a.y||0)+s,h.width=z((n||a.width||0)-2*s),h.height=z((o||a.height||0)-2*s),h.strokeWidth=t,h)a[r]!==h[r]&&(a[r]=l[r]=h[r]);return l},css:function(t){function e(t,e){return"-"+e.toLowerCase()}var i,n=this,o=n.element,r=t&&t.width&&"text"===o.nodeName.toLowerCase(),s="";if(t&&t.color&&(t.fill=t.color),t=St(n.styles,t),n.styles=t,f&&r&&delete t.width,j&&!K)r&&delete t.width,Wt(n.element,t);else{for(i in t)s+=i.replace(/([A-Z])/g,e)+":"+t[i]+";";Rt(o,"style",s)}return r&&n.added&&n.renderer.buildText(n),n},on:function(t,e){var i=this,n=i.element;return $&&"click"===t?(n.ontouchstart=function(t){i.touchEventFired=Date.now(),t.preventDefault(),e.call(n,t)},n.onclick=function(t){(-1===p.indexOf("Android")||1100<Date.now()-(i.touchEventFired||0))&&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},htmlCss:function(t){var e=this,i=e.element,n=t&&"SPAN"===i.tagName&&t.width;return n&&(delete t.width,e.textWidth=n,e.updateTransform()),e.styles=St(e.styles,t),Wt(e.element,t),e},htmlGetBBox:function(){var t=this.element,e=this.bBox;return e||("text"===t.nodeName&&(t.style.position=l),e=this.bBox={x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}),e},htmlUpdateTransform:function(){if(this.added){var t=this,e=t.renderer,i=t.element,n=t.translateX||0,o=t.translateY||0,r=t.x||0,s=t.y||0,a=t.textAlign||"left",l={left:0,center:.5,right:1}[a],h=a&&"left"!==a,c=t.shadows;if(Wt(i,{marginLeft:n,marginTop:o}),c&&ae(c,function(t){Wt(t,{marginLeft:n+1,marginTop:o+1})}),t.inverted&&ae(i.childNodes,function(t){e.invertChild(t,i)}),"SPAN"===i.tagName){var d,p,u,f,g=t.rotation,m=0,y=1,x=0,v=At(t.textWidth),b=t.xCorr||0,k=t.yCorr||0,w=[g,a,i.innerHTML,t.textWidth].join(",");w!==t.cTT&&(Ot(g)&&(y=W(m=g*G),x=Y(m),t.setSpanRotation(g,x,y)),d=Xt(t.elemWidth,i.offsetWidth),p=Xt(t.elemHeight,i.offsetHeight),v<d&&/[ \-]/.test(i.textContent||i.innerText)&&(Wt(i,{width:v+at,display:"block",whiteSpace:"normal"}),d=v),b=y<0&&-d,k=x<0&&-p,b+=x*(u=e.fontMetrics(i.style.fontSize).b)*((f=y*x<0)?1-l:l),k-=y*u*(g?f?l:1-l:1),h&&(b-=d*l*(y<0?-1:1),g&&(k-=p*l*(x<0?-1:1)),Wt(i,{textAlign:a})),t.xCorr=b,t.yCorr=k),Wt(i,{left:r+b+at,top:s+k+at}),U&&(p=i.offsetHeight),t.cTT=w}}else this.alignOnAdd=!0},setSpanRotation:function(t){var e={};e[j?"-ms-transform":U?"-webkit-transform":u?"MozTransform":i?"-o-transform":""]=e.transform="rotate("+t+"deg)",Wt(this.element,e)},updateTransform:function(){var t,e=this,i=e.translateX||0,n=e.translateY||0,o=e.scaleX,r=e.scaleY,s=e.inverted,a=e.rotation;s&&(i+=e.attr("width"),n+=e.attr("height")),t=["translate("+i+","+n+")"],s?t.push("rotate(90) scale(-1,1)"):a&&t.push("rotate("+a+" "+(e.x||0)+" "+(e.y||0)+")"),(Ot(o)||Ot(r))&&t.push("scale("+Xt(o,1)+" "+Xt(r,1)+")"),t.length&&Rt(e.element,"transform",t.join(" "))},toFront:function(){var t=this.element;return t.parentNode.appendChild(t),this},align:function(t,e,i){var n,o,r,s,a,l={},h=this.renderer,c=h.alignedObjects;return t?(this.alignOptions=t,this.alignByTranslate=e,i&&!Lt(i)||(this.alignTo=a=i||"renderer",Bt(c,this),c.push(this),i=null)):(t=this.alignOptions,e=this.alignByTranslate,a=this.alignTo),i=Xt(i,h[a],h),n=t.align,o=t.verticalAlign,r=(i.x||0)+(t.x||0),s=(i.y||0)+(t.y||0),"right"!==n&&"center"!==n||(r+=(i.width-(t.width||0))/{right:1,center:2}[n]),l[e?"translateX":"x"]=N(r),"bottom"!==o&&"middle"!==o||(s+=(i.height-(t.height||0))/({bottom:1,middle:2}[o]||1)),l[e?"translateY":"y"]=N(s),this[this.placed?"animate":"attr"](l),this.placed=!0,this.alignAttr=l,this},getBBox:function(){var t,e,i=this,n=i.bBox,o=i.renderer,r=i.rotation,s=i.element,a=i.styles,l=r*G;if(!n){if(s.namespaceURI===Z||o.forExport){try{n=s.getBBox?St({},s.getBBox()):{width:s.offsetWidth,height:s.offsetHeight}}catch(t){}(!n||n.width<0)&&(n={width:0,height:0})}else n=i.htmlGetBBox();o.isSVG&&(t=n.width,e=n.height,j&&a&&"11px"===a.fontSize&&"22.7"===e.toPrecision(3)&&(n.height=e=14),r&&(n.width=V(e*Y(l))+V(t*W(l)),n.height=V(e*W(l))+V(t*Y(l)))),i.bBox=n}return n},show:function(){return this.attr({visibility:st})},hide:function(){return this.attr({visibility:ot})},fadeOut:function(t){var e=this;e.animate({opacity:0},{duration:t||150,complete:function(){e.hide()}})},add:function(t){var e,i,n,o,r=this.renderer,s=t||r,a=s.element||r.box,l=a.childNodes,h=this.element,c=Rt(h,"zIndex");if(t&&(this.parentGroup=t),this.parentInverted=t&&t.inverted,void 0!==this.textStr&&r.buildText(this),c&&(s.handleZ=!0,c=At(c)),s.handleZ)for(n=0;n<l.length;n++)if(i=Rt(e=l[n],"zIndex"),e!==h&&(At(i)>c||!Ot(c)&&Ot(i))){a.insertBefore(h,e),o=!0;break}return o||a.appendChild(h),this.added=!0,ue(this,"add"),this},safeRemoveChild:function(t){var e=t.parentNode;e&&e.removeChild(t)},destroy:function(){var t,e,i,n=this,o=n.element||{},r=n.shadows,s=n.renderer.isSVG&&"SPAN"===o.nodeName&&o.parentNode;if(o.onclick=o.onmouseout=o.onmouseover=o.onmousemove=o.point=null,me(n),n.clipPath&&(n.clipPath=n.clipPath.destroy()),n.stops){for(i=0;i<n.stops.length;i++)n.stops[i]=n.stops[i].destroy();n.stops=null}for(n.safeRemoveChild(o),r&&ae(r,function(t){n.safeRemoveChild(t)});s&&0===s.childNodes.length;)t=s.parentNode,n.safeRemoveChild(s),s=t;for(e in n.alignTo&&Bt(n.renderer.alignedObjects,n),n)delete n[e];return null},shadow:function(t,e,i){var n,o,r,s,a,l,h=[],c=this.element;if(t){for(s=Xt(t.width,3),a=(t.opacity||.15)/s,l=this.parentInverted?"(-1,-1)":"("+Xt(t.offsetX,1)+", "+Xt(t.offsetY,1)+")",n=1;n<=s;n++)r=2*s+1-2*n,Rt(o=c.cloneNode(0),{isShadow:"true",stroke:t.color||"black","stroke-opacity":a*n,"stroke-width":r,transform:"translate"+l,fill:lt}),i&&(Rt(o,"height",F(Rt(o,"height")-r,0)),o.cutHeight=r),e?e.element.appendChild(o):c.parentNode.insertBefore(o,c),h.push(o);this.shadows=h}return this}};function Te(){this.init.apply(this,arguments)}var Se,Pe,Ae,Le,Ce;if(Te.prototype={Element:we,init:function(t,e,i,n){var o,r,s,a,l=this,h=location;r=(o=l.createElement("svg").attr({version:"1.1"})).element,t.appendChild(r),-1===t.innerHTML.indexOf("xmlns")&&Rt(r,"xmlns",Z),l.isSVG=!0,l.box=r,l.boxWrapper=o,l.alignedObjects=[],l.url=(u||U)&&I.getElementsByTagName("base").length?h.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(I.createTextNode("Created with "+tt+" "+et)),l.defs=this.createElement("defs").add(),l.forExport=n,l.gradients={},l.setSize(e,i,!1),u&&t.getBoundingClientRect&&(l.subPixelFix=s=function(){Wt(t,{left:0,top:0}),a=t.getBoundingClientRect(),Wt(t,{left:B(a.left)-a.left+at,top:B(a.top)-a.top+at})},s(),de(d,"resize",s))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var t=this,e=t.defs;return t.box=null,t.boxWrapper=t.boxWrapper.destroy(),s(t.gradients||{}),t.gradients=null,e&&(t.defs=e.destroy()),t.subPixelFix&&pe(d,"resize",t.subPixelFix),t.alignedObjects=null},createElement:function(t){var e=new this.Element;return e.init(this,t),e},draw:function(){},buildText:function(u){for(var f=u.element,g=this,m=g.forExport,t=Xt(u.textStr,"").toString().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),e=f.childNodes,y=/style="([^"]+)"/,x=/href="(http[^"]+)"/,v=Rt(f,"x"),b=u.styles,k=b&&b.width&&At(b.width),w=b&&b.lineHeight,i=e.length;i--;)f.removeChild(e[i]);k&&!u.added&&this.box.appendChild(f),""===t[t.length-1]&&t.pop(),ae(t,function(t,c){var d,p=0;t=t.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||"),d=t.split("|||"),ae(d,function(t){if(""!==t||1===d.length){var e,i={},n=I.createElementNS(Z,"tspan");if(y.test(t)&&Rt(n,"style",e=t.match(y)[1].replace(/(;| |^)color([ :])/,"$1fill$2")),x.test(t)&&!m&&(Rt(n,"onclick",'location.href="'+t.match(x)[1]+'"'),Wt(n,{cursor:"pointer"}))," "!==(t=(t.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">"))&&(n.appendChild(I.createTextNode(t)),p?i.dx=0:i.x=v,Rt(n,i),!p&&c&&(!K&&m&&Wt(n,{display:"block"}),Rt(n,"dy",w||g.fontMetrics(/px$/.test(n.style.fontSize)?n.style.fontSize:b.fontSize).h,U&&n.offsetHeight)),f.appendChild(n),p++,k))for(var o,r=t.replace(/([^\^])-/g,"$1- ").split(" "),s=u._clipHeight,a=[],l=At(w||16),h=1;r.length||a.length;)delete u.bBox,o=u.getBBox().width,k<o&&1!==r.length?(n.removeChild(n.firstChild),a.unshift(r.pop())):(r=a,a=[],r.length&&(h++,s&&s<h*l?(r=["..."],u.attr("title",u.textStr)):(Rt(n=I.createElementNS(Z,"tspan"),{dy:l,x:v}),e&&Rt(n,"style",e),f.appendChild(n),k<o&&(k=o)))),r.length&&n.appendChild(I.createTextNode(r.join(" ").replace(/- /g,"-")))}})})},button:function(t,e,i,n,o,r,s,a){var l,h,c,d,p,u,f=this.label(t,e,i,null,null,null,null,null,"button"),g=0,m="style",y={x1:0,y1:0,x2:0,y2:1};return o=Pt({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:y,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},o),c=o[m],delete o[m],r=Pt(o,{stroke:"#68A",fill:{linearGradient:y,stops:[[0,"#FFF"],[1,"#ACF"]]}},r),d=r[m],delete r[m],s=Pt(o,{stroke:"#68A",fill:{linearGradient:y,stops:[[0,"#9BD"],[1,"#CDF"]]}},s),p=s[m],delete s[m],a=Pt(o,{style:{color:"#CCC"}},a),u=a[m],delete a[m],de(f.element,j?"mouseover":"mouseenter",function(){3!==g&&f.attr(r).css(d)}),de(f.element,j?"mouseout":"mouseleave",function(){3!==g&&(l=[o,r,s][g],h=[c,d,p][g],f.attr(l).css(h))}),f.setState=function(t){f.state=g=t,t?2===t?f.attr(s).css(p):3===t&&f.attr(a).css(u):f.attr(o).css(c)},f.on("click",function(){3!==g&&n.call(f)}).attr(o).css(St({cursor:"default"},c))},crispLine:function(t,e){return t[1]===t[4]&&(t[1]=t[4]=N(t[1])-e%2/2),t[2]===t[5]&&(t[2]=t[5]=N(t[2])+e%2/2),t},path:function(t){var e={fill:lt};return Mt(t)?e.d=t:Ct(t)&&St(e,t),this.createElement("path").attr(e)},circle:function(t,e,i){var n=Ct(t)?t:{x:t,y:e,r:i};return this.createElement("circle").attr(n)},arc:function(t,e,i,n,o,r){var s;return Ct(t)&&(e=t.y,i=t.r,n=t.innerR,o=t.start,r=t.end,t=t.x),(s=this.symbol("arc",t||0,e||0,i||0,i||0,{innerR:n||0,start:o||0,end:r||0})).r=i,s},rect:function(t,e,i,n,o,r){o=Ct(t)?t.r:o;var s=this.createElement("rect").attr({rx:o,ry:o,fill:lt});return s.attr(Ct(t)?t:s.crisp(r,t,e,F(i,0),F(n,0)))},setSize:function(t,e,i){var n=this.alignedObjects,o=n.length;for(this.width=t,this.height=e,this.boxWrapper[Xt(i,!0)?"animate":"attr"]({width:t,height:e});o--;)n[o].align()},g:function(t){var e=this.createElement("g");return Ot(t)?e.attr({class:rt+t}):e},image:function(t,e,i,n,o){var r,s={preserveAspectRatio:lt};return 1<arguments.length&&St(s,{x:e,y:i,width:n,height:o}),(r=this.createElement("image").attr(s)).element.setAttributeNS?r.element.setAttributeNS("http://www.w3.org/1999/xlink","href",t):r.element.setAttribute("hc-svg-href",t),r},symbol:function(t,e,i,n,o,r){var s,a,l,h,c=this.symbols[t],d=c&&c(N(e),N(i),n,o,r),p=/^url\((.*?)\)$/;return d?(St(s=this.path(d),{symbolName:t,x:e,y:i,width:n,height:o}),r&&St(s,r)):p.test(t)&&(h=function(t,e){t.element&&(t.attr({width:e[0],height:e[1]}),t.alignByTranslate||t.translate(N((n-e[0])/2),N((o-e[1])/2)))},a=t.match(p)[1],l=q[a],(s=this.image(a).attr({x:e,y:i})).isImg=!0,l?h(s,l):(s.attr({width:0,height:0}),Yt("img",{onload:function(){h(s,q[a]=[this.width,this.height])},src:a}))),s},symbols:{circle:function(t,e,i,n){var o=.166*i;return[ht,t+i/2,e,"C",t+i+o,e,t+i+o,e+n,t+i/2,e+n,"C",t-o,e+n,t-o,e,t+i/2,e,"Z"]},square:function(t,e,i,n){return[ht,t,e,ct,t+i,e,t+i,e+n,t,e+n,"Z"]},triangle:function(t,e,i,n){return[ht,t+i/2,e,ct,t+i,e+n,t,e+n,"Z"]},"triangle-down":function(t,e,i,n){return[ht,t,e,ct,t+i,e,t+i/2,e+n,"Z"]},diamond:function(t,e,i,n){return[ht,t+i/2,e,ct,t+i,e+n/2,t+i/2,e+n,t,e+n/2,"Z"]},arc:function(t,e,i,n,o){var r=o.start,s=o.r||i||n,a=o.end-.001,l=o.innerR,h=o.open,c=W(r),d=Y(r),p=W(a),u=Y(a),f=o.end-r<E?0:1;return[ht,t+s*c,e+s*d,"A",s,s,0,f,1,t+s*p,e+s*u,h?ht:ct,t+l*p,e+l*u,"A",l,l,0,f,0,t+l*c,e+l*d,h?"":"Z"]}},clipRect:function(t,e,i,n){var o,r=rt+J++,s=this.createElement("clipPath").attr({id:r}).add(this.defs);return(o=this.rect(t,e,i,n,0).add(s)).id=r,o.clipPath=s,o},color:function(t,e,i){var n,o,r,s,a,l,h,c,d,p,u,f=this,g=/^rgba/,m=[];if(t&&t.linearGradient?o="linearGradient":t&&t.radialGradient&&(o="radialGradient"),o){for(p in r=t[o],s=f.gradients,l=t.stops,d=e.radialReference,Mt(r)&&(t[o]=r={x1:r[0],y1:r[1],x2:r[2],y2:r[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===o&&d&&!Ot(r.gradientUnits)&&(r=Pt(r,{cx:d[0]-d[2]/2+r.cx*d[2],cy:d[1]-d[2]/2+r.cy*d[2],r:r.r*d[2],gradientUnits:"userSpaceOnUse"})),r)"id"!==p&&m.push(p,r[p]);for(p in l)m.push(l[p]);return s[m=m.join(",")]?u=s[m].id:(r.id=u=rt+J++,s[m]=a=f.createElement(o).attr(r).add(f.defs),a.stops=[],ae(l,function(t){var e;c=g.test(t[1])?(n=ke(t[1]),h=n.get("rgb"),n.get("a")):(h=t[1],1),e=f.createElement("stop").attr({offset:t[0],"stop-color":h,"stop-opacity":c}).add(a),a.stops.push(e)})),"url("+f.url+"#"+u+")"}return g.test(t)?(Rt(e,i+"-opacity",(n=ke(t)).get("a")),n.get("rgb")):(e.removeAttribute(i+"-opacity"),t)},text:function(t,e,i,n){var o,r=H.chart.style,s=f||!K&&this.forExport;return n&&!this.forExport?this.html(t,e,i):(e=N(Xt(e,0)),i=N(Xt(i,0)),o=this.createElement("text").attr({x:e,y:i,text:t}).css({fontFamily:r.fontFamily,fontSize:r.fontSize}),s&&o.css({position:l}),o.x=e,o.y=i,o)},html:function(t,e,i){var n=H.chart.style,r=this.createElement("span"),o=r.attrSetters,s=r.element,a=r.renderer;return o.text=function(t){return t!==s.innerHTML&&delete this.bBox,s.innerHTML=t,!1},o.x=o.y=o.align=function(t,e){return"align"===e&&(e="textAlign"),r[e]=t,r.htmlUpdateTransform(),!1},r.attr({text:t,x:N(e),y:N(i)}).css({position:l,whiteSpace:"nowrap",fontFamily:n.fontFamily,fontSize:n.fontSize}),r.css=r.htmlCss,a.isSVG&&(r.add=function(t){var e,i,n=a.box.parentNode,o=[];if(t){if(!(e=t.div)){for(i=t;i;)o.push(i),i=i.parentGroup;ae(o.reverse(),function(t){var i;e=t.div=t.div||Yt(it,{className:Rt(t.element,"class")},{position:l,left:(t.translateX||0)+at,top:(t.translateY||0)+at},e||n),i=e.style,St(t.attrSetters,{translateX:function(t){i.left=t+at},translateY:function(t){i.top=t+at},visibility:function(t,e){i[e]=t}})})}}else e=n;return e.appendChild(s),r.added=!0,r.alignOnAdd&&r.htmlUpdateTransform(),r}),r},fontMetrics:function(t){var e=(t=At(t||11))<24?t+4:N(1.2*t);return{h:e,b:N(.8*e)}},label:function(t,e,i,n,o,r,s,a,l){var h,c,d,p,u,f,g,m,y=this,x=y.g(l),v=y.text("",0,0,s).attr({zIndex:1}),b=0,k=3,w=0,T=0,S={},P=x.attrSetters;function A(){var t,e,i=v.element.style;c=(void 0===d||void 0===p||x.styles.textAlign)&&v.getBBox(),x.width=(d||c.width||0)+2*k+w,x.height=(p||c.height||0)+2*k,g=k+y.fontMetrics(i&&i.fontSize).b,m&&(h||(t=N(-b*k),e=a?-g:0,x.box=h=n?y.symbol(n,t,e,x.width,x.height):y.rect(t,e,x.width,x.height,0,S[wt]),h.add(x)),h.isImg||h.attr(Pt({width:x.width,height:x.height},S)),S=null)}function L(){var t,e=x.styles,i=e&&e.textAlign,n=w+k*(1-b);t=a?0:g,!Ot(d)||"center"!==i&&"right"!==i||(n+={center:.5,right:1}[i]*(d-c.width)),n===v.x&&t===v.y||v.attr({x:n,y:t}),v.x=n,v.y=t}function C(t,e){h?h.attr(t,e):S[t]=e}function M(){v.add(x),x.attr({text:t,x:e,y:i}),h&&Ot(o)&&x.attr({anchorX:o,anchorY:r})}de(x,"add",M),P.width=function(t){return d=t,!1},P.height=function(t){return p=t,!1},P.padding=function(t){return Ot(t)&&t!==k&&(k=t,L()),!1},P.paddingLeft=function(t){return Ot(t)&&t!==w&&(w=t,L()),!1},P.align=function(t){return b={left:0,center:.5,right:1}[t],!1},P.text=function(t,e){return v.attr(e,t),A(),L(),!1},P[wt]=function(t,e){return m=!0,T=t%2/2,C(e,t),!1},P.stroke=P.fill=P.r=function(t,e){return"fill"===e&&(m=!0),C(e,t),!1},P.anchorX=function(t,e){return C(e,(o=t)+T-u),!1},P.anchorY=function(t,e){return C(e,(r=t)-f),!1},P.x=function(t){return x.x=t,t-=b*((d||c.width)+k),u=N(t),x.attr("translateX",u),!1},P.y=function(t){return f=x.y=N(t),x.attr("translateY",f),!1};var D=x.css;return St(x,{css:function(e){if(e){var i={};e=Pt(e),ae(["fontSize","fontWeight","fontFamily","color","lineHeight","width","textDecoration","textShadow"],function(t){e[t]!==O&&(i[t]=e[t],delete e[t])}),v.css(i)}return D.call(x,e)},getBBox:function(){return{width:c.width+2*k,height:c.height+2*k,x:c.x-k,y:c.y-k}},shadow:function(t){return h&&h.shadow(t),x},destroy:function(){pe(x,"add",M),pe(x.element,"mouseenter"),pe(x.element,"mouseleave"),v=v&&v.destroy(),h=h&&h.destroy(),we.prototype.destroy.call(x),x=y=A=L=C=M=null}})}},h=Te,!K&&!f){Highcharts.VMLElement=Pe={init:function(t,e){var i=["<",e,' filled="f" stroked="f"'],n=["position: ",l,";"],o=e===it;"shape"!==e&&!o||n.push("left:0;top:0;width:1px;height:1px;"),n.push("visibility: ",o?ot:st),i.push(' style="',n.join(""),'"/>'),e&&(i=o||"span"===e||"img"===e?i.join(""):t.prepVML(i),this.element=Yt(i)),this.renderer=t,this.attrSetters={}},add:function(t){var e=this,i=e.renderer,n=e.element,o=i.box,r=t&&t.inverted,s=t?t.element||t:o;return r&&i.invertChild(n,s),s.appendChild(n),e.added=!0,e.alignOnAdd&&!e.deferUpdateTransform&&e.updateTransform(),ue(e,"add"),e},updateTransform:we.prototype.htmlUpdateTransform,setSpanRotation:function(t,e,i){Wt(this.element,{filter:t?["progid:DXImageTransform.Microsoft.Matrix(M11=",i,", M12=",-e,", M21=",e,", M22=",i,", sizingMethod='auto expand')"].join(""):lt})},pathToVML:function(t){for(var e,i=t.length,n=[];i--;)Dt(t[i])?n[i]=N(10*t[i])-5:"Z"===t[i]?n[i]="x":(n[i]=t[i],!t.isArc||"wa"!==t[i]&&"at"!==t[i]||(e="wa"===t[i]?1:-1,n[i+5]===n[i+7]&&(n[i+7]-=e),n[i+6]===n[i+8]&&(n[i+8]-=e)));return n.join(" ")||"x"},attr:function(t,e){var i,n,o,r,s,a,l=this,h=l.element||{},c=h.style,d=h.nodeName,p=l.renderer,u=l.symbolName,f=l.shadows,g=l.attrSetters,m=l;if(Lt(t)&&Ot(e)&&(i=t,(t={})[i]=e),Lt(t))m="strokeWidth"===(i=t)||"stroke-width"===i?l.strokeweight:l[i];else for(i in t)if(n=t[i],(a=!1)!==(r=g[i]&&g[i].call(l,n,i))&&null!==n){if(r!==O&&(n=r),u&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(i))s||(l.symbolAttr(t),s=!0),a=!0;else if("d"===i){if(n=n||[],l.d=n.join(" "),h.path=n=l.pathToVML(n),f)for(o=f.length;o--;)f[o].path=f[o].cutOff?this.cutOffPath(n,f[o].cutOff):n;a=!0}else if("visibility"===i){if(f)for(o=f.length;o--;)f[o].style[i]=n;"DIV"===d&&(n=n===ot?"-999em":0,_||(c[i]=n?st:ot),i="top"),c[i]=n,a=!0}else if("zIndex"===i)n&&(c[i]=n),a=!0;else if(-1!==se(i,["x","y","width","height"]))l[i]=n,"x"===i||"y"===i?i={x:"left",y:"top"}[i]:n=F(0,n),l.updateClipping?(l[i]=n,l.updateClipping()):c[i]=n,a=!0;else if("class"===i&&"DIV"===d)h.className=n;else if("stroke"===i)n=p.color(n,h,i),i="strokecolor";else if("stroke-width"===i||"strokeWidth"===i)h.stroked=!!n,Dt(l[i="strokeweight"]=n)&&(n+=at);else if("dashstyle"===i){(h.getElementsByTagName("stroke")[0]||Yt(p.prepVML(["<stroke/>"]),null,null,h))[i]=n||"solid",l.dashstyle=n,a=!0}else"fill"===i?"SPAN"===d?c.color=n:"IMG"!==d&&(h.filled=n!==lt,n=p.color(n,h,i,l),i="fillcolor"):"opacity"===i?a=!0:"shape"===d&&"rotation"===i?(l[i]=h.style[i]=n,h.style.left=-N(Y(n*G)+1)+at,h.style.top=N(W(n*G))+at):"translateX"===i||"translateY"===i||"rotation"===i?(l[i]=n,l.updateTransform(),a=!0):"text"===i&&(this.bBox=null,h.innerHTML=n,a=!0);a||(_?h[i]=n:Rt(h,i,n))}return m},clip:function(t){var e,i,n=this;return i=t?(Bt(e=t.members,n),e.push(n),n.destroyClip=function(){Bt(e,n)},t.getCSS(n)):(n.destroyClip&&n.destroyClip(),{clip:_?"inherit":"rect(auto)"}),n.css(i)},css:we.prototype.htmlCss,safeRemoveChild:function(t){t.parentNode&&Jt(t)},destroy:function(){return this.destroyClip&&this.destroyClip(),we.prototype.destroy.apply(this)},on:function(t,e){return this.element["on"+t]=function(){var t=d.event;t.target=t.srcElement,e(t)},this},cutOffPath:function(t,e){var i;return 9!==(i=(t=t.split(/[ ,]/)).length)&&11!==i||(t[i-4]=t[i-2]=At(t[i-2])-10*e),t.join(" ")},shadow:function(t,e,i){var n,o,r,s,a,l,h,c=[],d=this.element,p=this.renderer,u=d.style,f=d.path;if(f&&"string"!=typeof f.value&&(f="x"),a=f,t){for(l=Xt(t.width,3),h=(t.opacity||.15)/l,n=1;n<=3;n++)s=2*l+1-2*n,i&&(a=this.cutOffPath(f.value,.5+s)),r=['<shape isShadow="true" strokeweight="',s,'" filled="false" path="',a,'" coordsize="10 10" style="',d.style.cssText,'" />'],o=Yt(p.prepVML(r),null,{left:At(u.left)+Xt(t.offsetX,1),top:At(u.top)+Xt(t.offsetY,1)}),i&&(o.cutOff=1+s),r=['<stroke color="',t.color||"black",'" opacity="',h*n,'"/>'],Yt(p.prepVML(r),null,null,o),e?e.element.appendChild(o):d.parentNode.insertBefore(o,d),c.push(o);this.shadows=c}return this}};var Me={Element:Pe=r(we,Pe),isIE8:-1<p.indexOf("MSIE 8.0"),init:function(t,e,i){var n,o,r=this;r.alignedObjects=[],(o=(n=r.createElement(it)).element).style.position=nt,t.appendChild(n.element),r.isVML=!0,r.box=o,r.boxWrapper=n,r.setSize(e,i,!1),I.namespaces.hcv||(I.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),(I.styleSheets.length?I.styleSheets[0]:I.createStyleSheet()).cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } ")},isHidden:function(){return!this.box.offsetWidth},clipRect:function(t,e,i,n){var o=this.createElement(),r=Ct(t);return St(o,{members:[],left:(r?t.x:t)+1,top:(r?t.y:e)+1,width:(r?t.width:i)-1,height:(r?t.height:n)-1,getCSS:function(t){var e=t.element,i=e.nodeName,n="shape"===i,o=t.inverted,r=this.top-(n?e.offsetTop:0),s=this.left,a=s+this.width,l=r+this.height,h={clip:"rect("+N(o?s:r)+"px,"+N(o?l:a)+"px,"+N(o?a:l)+"px,"+N(o?r:s)+"px)"};return!o&&_&&"DIV"===i&&St(h,{width:a+at,height:l+at}),h},updateClipping:function(){ae(o.members,function(t){t.css(o.getCSS(t))})}})},color:function(t,e,i,n){var o,r,s,a=this,l=/^rgba/,h=lt;if(t&&t.linearGradient?s="gradient":t&&t.radialGradient&&(s="pattern"),s){function c(){r=['<fill colors="'+A.join(",")+'" opacity="',x,'" o:opacity2="',y,'" type="',s,'" ',S,'focus="100%" method="any" />'],Yt(a.prepVML(r),null,null,e)}var d,p,u,f,g,m,y,x,v,b,k,w,T=t.linearGradient||t.radialGradient,S="",P=t.stops,A=[];if(k=P[0],w=P[P.length-1],0<k[0]&&P.unshift([0,k[1]]),w[0]<1&&P.push([1,w[1]]),ae(P,function(t,e){p=l.test(t[1])?(o=ke(t[1]),d=o.get("rgb"),o.get("a")):(d=t[1],1),A.push(100*t[0]+"% "+d),e?(x=p,v=d):(y=p,b=d)}),"fill"===i)if("gradient"===s)u=T.x1||T[0]||0,f=T.y1||T[1]||0,g=T.x2||T[2]||0,m=T.y2||T[3]||0,S='angle="'+(90-180*X.atan((m-f)/(g-u))/E)+'"',c();else{function L(){O&&(C=n.getBBox(),z+=(O[0]-C.x)/C.width-.5,B+=(O[1]-C.y)/C.height-.5,D*=O[2]/C.width,I*=O[2]/C.height),S='src="'+H.global.VMLRadialGradientURL+'" size="'+D+","+I+'" origin="0.5,0.5" position="'+z+","+B+'" color2="'+b+'" ',c()}var C,M=T.r,D=2*M,I=2*M,z=T.cx,B=T.cy,O=e.radialReference;n.added?L():de(n,"add",L),h=v}else h=d}else if(l.test(t)&&"IMG"!==e.tagName)o=ke(t),r=["<",i,' opacity="',o.get("a"),'"/>'],Yt(this.prepVML(r),null,null,e),h=o.get("rgb");else{var R=e.getElementsByTagName(i);R.length&&(R[0].opacity=1,R[0].type="solid"),h=t}return h},prepVML:function(t){var e="display:inline-block;behavior:url(#default#VML);",i=this.isIE8;return t=t.join(""),t=i?-1===(t=t.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />')).indexOf('style="')?t.replace("/>",' style="'+e+'" />'):t.replace('style="','style="'+e):t.replace("<","<hcv:")},text:Te.prototype.html,path:function(t){var e={coordsize:"10 10"};return Mt(t)?e.d=t:Ct(t)&&St(e,t),this.createElement("shape").attr(e)},circle:function(t,e,i){var n=this.symbol("circle");return Ct(t)&&(i=t.r,e=t.y,t=t.x),n.isCircle=!0,n.r=i,n.attr({x:t,y:e})},g:function(t){var e;return t&&(e={className:rt+t,class:rt+t}),this.createElement(it).attr(e)},image:function(t,e,i,n,o){var r=this.createElement("img").attr({src:t});return 1<arguments.length&&r.attr({x:e,y:i,width:n,height:o}),r},rect:function(t,e,i,n,o,r){var s=this.symbol("rect");return s.r=Ct(t)?t.r:o,s.attr(Ct(t)?t:s.crisp(r,t,e,F(i,0),F(n,0)))},invertChild:function(t,e){var i=e.style;Wt(t,{flip:"x",left:At(i.width)-1,top:At(i.height)-1,rotation:-90})},symbols:{arc:function(t,e,i,n,o){var r,s=o.start,a=o.end,l=o.r||i||n,h=o.innerR,c=W(s),d=Y(s),p=W(a),u=Y(a);return a-s==0?["x"]:(r=["wa",t-l,e-l,t+l,e+l,t+l*c,e+l*d,t+l*p,e+l*u],o.open&&!h&&r.push("e",ht,t,e),r.push("at",t-h,e-h,t+h,e+h,t+h*p,e+h*u,t+h*c,e+h*d,"x","e"),r.isArc=!0,r)},circle:function(t,e,i,n,o){return o&&(i=n=2*o.r),o&&o.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,o){var r,s=t+i,a=e+n;return Ot(o)&&o.r?(r=R(o.r,i,n),[ht,t+r,e,ct,s-r,e,"wa",s-2*r,e,s,e+2*r,s-r,e,s,e+r,ct,s,a-r,"wa",s-2*r,a-2*r,s,a,s,a-r,s-r,a,ct,t+r,a,"wa",t,a-2*r,t+2*r,a,t+r,a,t,a-r,ct,t,e+r,"wa",t,e,t+2*r,e+2*r,t,e+r,t+r,e,"x","e"]):Te.prototype.symbols.square.apply(0,arguments)}}};Highcharts.VMLRenderer=Se=function(){this.init.apply(this,arguments)},Se.prototype=Pt(Te.prototype,Me),h=Se}function De(){var t,e=Ce.length;for(t=0;t<e;t++)Ce[t]();Ce=[]}function Ie(t,e,i,n){this.axis=t,this.pos=e,this.type=i||"",this.isNew=!0,i||n||this.addLabel()}function ze(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)}function Be(t,e,i,n,o,r){var s=t.chart.inverted;this.axis=t,this.isNegative=i,this.options=e,this.x=n,this.total=null,this.points={},this.stack=o,this.percent="percent"===r,this.alignOptions={align:e.align||(s?i?"left":"right":"center"),verticalAlign:e.verticalAlign||(s?"middle":i?"bottom":"top"),y:Xt(e.y,s?4:i?14:-6),x:Xt(e.x,s?i?-6:6:0)},this.textAlign=e.textAlign||(s?i?"right":"left":"center")}function Oe(){this.init.apply(this,arguments)}function Re(){this.init.apply(this,arguments)}function He(t,e){this.init(t,e)}function Xe(t,e){this.init(t,e)}function We(){this.init.apply(this,arguments)}f&&(Highcharts.CanVGRenderer=Ae=function(){Z="http://www.w3.org/1999/xhtml"},Ae.prototype.symbols={},Ce=[],Le={push:function(t,e){0===Ce.length&&re(e,De),Ce.push(t)}},h=Ae),Ie.prototype={addLabel:function(){var t,e,i,n,o=this,r=o.axis,s=r.options,a=r.chart,l=r.horiz,h=r.categories,c=r.series[0]&&r.series[0].names,d=o.pos,p=s.labels,u=r.tickPositions,f=l&&h&&!p.step&&!p.staggerLines&&!p.rotation&&a.plotWidth/u.length||!l&&(a.margin[3]||.33*a.chartWidth),g=d===u[0],m=d===u[u.length-1],y=h?Xt(h[d],c&&c[d],d):d,x=o.label,v=u.info;r.isDatetimeAxis&&v&&(n=s.dateTimeLabelFormats[v.higherRanks[d]||v.unitName]),o.isFirst=g,o.isLast=m,t=r.labelFormatter.call({axis:r,chart:a,isFirst:g,isLast:m,dateTimeLabelFormat:n,value:r.isLog?te(zt(y)):y}),e=St(e=f&&{width:F(1,N(f-2*(p.padding||10)))+at},p.style),Ot(x)?x&&x.attr({text:t}).css(e):(i={align:r.labelAlign},Dt(p.rotation)&&(i.rotation=p.rotation),f&&p.ellipsis&&(i._clipHeight=r.len/u.length),o.label=Ot(t)&&p.enabled?a.renderer.text(t,0,0,p.useHTML).attr(i).css(e).add(r.labelGroup):null)},getLabelSize:function(){var t=this.label,e=this.axis;return t?(this.labelBBox=t.getBBox())[e.horiz?"height":"width"]:0},getLabelSides:function(){var t=this.labelBBox,e=this.axis,i=e.options.labels,n=t.width,o=n*{left:0,center:.5,right:1}[e.labelAlign]-i.x;return[-o,n-o]},handleOverflow:function(t,e){var i=!0,n=this.axis,o=n.chart,r=this.isFirst,s=this.isLast,a=e.x,l=n.reversed,h=n.tickPositions;if(r||s){var c=this.getLabelSides(),d=c[0],p=c[1],u=o.plotLeft,f=u+n.len,g=n.ticks[h[t+(r?1:-1)]],m=g&&g.label.xy&&g.label.xy.x+g.getLabelSides()[r?0:1];r&&!l||s&&l?a+d<u&&(a=u-d,g&&m<a+p&&(i=!1)):f<a+p&&(a=f-p,g&&a+d<m&&(i=!1)),e.x=a}return i},getPosition:function(t,e,i,n){var o=this.axis,r=o.chart,s=n&&r.oldChartHeight||r.chartHeight;return{x:t?o.translate(e+i,null,null,n)+o.transB:o.left+o.offset+(o.opposite?(n&&r.oldChartWidth||r.chartWidth)-o.right-o.left:0),y:t?s-o.bottom+o.offset-(o.opposite?o.height:0):s-o.translate(e+i,null,null,n)-o.transB}},getLabelPosition:function(t,e,i,n,o,r,s,a){var l=this.axis,h=l.transA,c=l.reversed,d=l.staggerLines,p=l.chart.renderer.fontMetrics(o.style.fontSize).b,u=o.rotation;return t=t+o.x-(r&&n?r*h*(c?-1:1):0),e=e+o.y-(r&&!n?r*h*(c?1:-1):0),u&&2===l.side&&(e-=p-p*W(u*G)),Ot(o.y)||u||(e+=p-i.getBBox().height/2),d&&(e+=s/(a||1)%d*(l.labelOffset/d)),{x:t,y:e}},getMarkPath:function(t,e,i,n,o,r){return r.crispLine([ht,t,e,ct,t+(o?0:-i),e+(o?i:0)],n)},render:function(t,e,i){var n,o,r,s=this,a=s.axis,l=a.options,h=a.chart.renderer,c=a.horiz,d=s.type,p=s.label,u=s.pos,f=l.labels,g=s.gridLine,m=d?d+"Grid":"grid",y=d?d+"Tick":"tick",x=l[m+"LineWidth"],v=l[m+"LineColor"],b=l[m+"LineDashStyle"],k=l[y+"Length"],w=l[y+"Width"]||0,T=l[y+"Color"],S=l[y+"Position"],P=s.mark,A=f.step,L=!0,C=a.tickmarkOffset,M=s.getPosition(c,u,C,e),D=M.x,I=M.y,z=c&&D===a.pos+a.len||!c&&I===a.pos?-1:1,B=a.staggerLines;this.isActive=!0,x&&(n=a.getPlotLinePath(u+C,x*z,e,!0),g===O&&(r={stroke:v,"stroke-width":x},b&&(r.dashstyle=b),d||(r.zIndex=1),e&&(r.opacity=0),s.gridLine=g=x?h.path(n).attr(r).add(a.gridGroup):null),!e&&g&&n&&g[s.isNew?"attr":"animate"]({d:n,opacity:i})),w&&k&&("inside"===S&&(k=-k),a.opposite&&(k=-k),o=s.getMarkPath(D,I,k,w*z,c,h),P?P.animate({d:o,opacity:i}):s.mark=h.path(o).attr({stroke:T,"stroke-width":w,opacity:i}).add(a.axisGroup)),p&&!isNaN(D)&&(p.xy=M=s.getLabelPosition(D,I,p,c,f,C,t,A),(s.isFirst&&!s.isLast&&!Xt(l.showFirstLabel,1)||s.isLast&&!s.isFirst&&!Xt(l.showLastLabel,1)||!B&&c&&"justify"===f.overflow&&!s.handleOverflow(t,M))&&(L=!1),A&&t%A&&(L=!1),L&&!isNaN(M.y)?(M.opacity=i,p[s.isNew?"attr":"animate"](M),s.isNew=!1):p.attr("y",-9999))},destroy:function(){s(this,this.axis)}},ze.prototype={render:function(){var t,e,i,n,o,r,s,a=this,l=a.axis,h=l.horiz,c=(l.pointRange||0)/2,d=a.options,p=d.label,u=a.label,f=d.width,g=d.to,m=d.from,y=Ot(m)&&Ot(g),x=d.value,v=d.dashStyle,b=a.svgElem,k=[],w=d.color,T=d.zIndex,S=d.events,P=l.chart.renderer;if(l.isLog&&(m=It(m),g=It(g),x=It(x)),f)k=l.getPlotLinePath(x,f),s={stroke:w,"stroke-width":f},v&&(s.dashstyle=v);else{if(!y)return;m=F(m,l.min-c),g=R(g,l.max+c),k=l.getPlotBandPath(m,g,d),s={fill:w},d.borderWidth&&(s.stroke=d.borderColor,s["stroke-width"]=d.borderWidth)}if(Ot(T)&&(s.zIndex=T),b)k?b.animate({d:k},null,b.onGetPath):(b.hide(),b.onGetPath=function(){b.show()});else if(k&&k.length&&(a.svgElem=b=P.path(k).attr(s).add(),S))for(e in t=function(e){b.on(e,function(t){S[e].apply(a,[t])})},S)t(e);return p&&Ot(p.text)&&k&&k.length&&0<l.width&&0<l.height?(p=Pt({align:h&&y&&"center",x:h?!y&&4:10,verticalAlign:!h&&y&&"middle",y:h?y?16:10:y?6:-4,rotation:h&&!y&&90},p),u||(a.label=u=P.text(p.text,0,0,p.useHTML).attr({align:p.textAlign||p.align,rotation:p.rotation,zIndex:T}).css(p.style).add()),i=[k[1],k[4],Xt(k[6],k[1])],n=[k[2],k[5],Xt(k[7],k[2])],o=$t(i),r=$t(n),u.align(p,!1,{x:o,y:r,width:qt(i)-o,height:qt(n)-r}),u.show()):u&&u.hide(),a},destroy:function(){Bt(this.axis.plotLinesAndBands,this),delete this.axis,s(this)}},Oe.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:!(Be.prototype={destroy:function(){s(this,this.axis)},render:function(t){var e=this.options,i=e.format,n=i?Ft(i,this):e.formatter.call(this);this.label?this.label.attr({text:n,visibility:ot}):this.label=this.axis.chart.renderer.text(n,0,0,e.useHTML).css(e.style).attr({align:this.textAlign,rotation:e.rotation,visibility:ot}).add(t)},setOffset:function(t,e){var i,n=this.axis,o=n.chart,r=o.inverted,s=this.isNegative,a=n.translate(this.percent?100:this.total,0,0,0,1),l=n.translate(0),h=V(a-l),c=o.xAxis[0].translate(this.x)+t,d=o.plotHeight,p={x:r?s?a:a-h:c,y:r?d-c-e:s?d-a-h:d-a,width:r?h:e,height:r?e:h},u=this.label;u&&(u.align(this.alignOptions,null,p),i=u.alignAttr,u.attr({visibility:!1===this.options.crop||o.isInsidePlot(i.x,i.y)?K?"inherit":st:ot}))}}),gridLineColor:"#C0C0C0",labels:ye,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:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#4d759e",fontWeight:"bold"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return Et(this.total,-1)},style:ye.style}},defaultLeftAxisOptions:{labels:{x:-8,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:8,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{x:0,y:14},title:{rotation:0}},defaultTopAxisOptions:{labels:{x:0,y:-5},title:{rotation:0}},init:function(t,e){var i=e.isX,n=this;n.horiz=t.inverted?!i:i,n.isXAxis=i,n.xOrY=i?"x":"y",n.opposite=e.opposite,n.side=n.horiz?n.opposite?0:2:n.opposite?1:3,n.setOptions(e);var o=this.options,r=o.type,s="datetime"===r;n.labelFormatter=o.labels.formatter||n.defaultLabelFormatter,n.userOptions=e,n.minPixelPadding=0,n.chart=t,n.reversed=o.reversed,n.zoomEnabled=!1!==o.zoomEnabled,n.categories=o.categories||"category"===r,n.isLog="logarithmic"===r,n.isDatetimeAxis=s,n.isLinked=Ot(o.linkedTo),n.tickmarkOffset=n.categories&&"between"===o.tickmarkPlacement?.5:0,n.ticks={},n.minorTicks={},n.plotLinesAndBands=[],n.alternateBands={},n.len=0,n.minRange=n.userMinRange=o.minRange||o.maxZoom,n.range=o.range,n.offset=o.offset||0,n.stacks={},n.oldStacks={},n.stackExtremes={},n.max=null,n.min=null;var a,l=n.options.events;for(a in-1===se(n,t.axes)&&(t.axes.push(n),t[i?"xAxis":"yAxis"].push(n)),n.series=n.series||[],t.inverted&&i&&n.reversed===O&&(n.reversed=!0),n.removePlotBand=n.removePlotBandOrLine,n.removePlotLine=n.removePlotBandOrLine,l)de(n,a,l[a]);n.isLog&&(n.val2lin=It,n.lin2val=zt)},setOptions:function(t){this.options=Pt(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],Pt(H[this.isXAxis?"xAxis":"yAxis"],t))},update:function(t,e){var i=this.chart;t=i.options[this.xOrY+"Axis"][this.options.index]=Pt(this.userOptions,t),this.destroy(!0),this._addedPlotLB=this.userMin=this.userMax=O,this.init(i,St(t,{events:O})),Xt(e,i.isDirtyBox=!0)&&i.redraw()},remove:function(t){var e=this.chart,i=this.xOrY+"Axis";ae(this.series,function(t){t.remove(!1)}),Bt(e.axes,this),Bt(e[i],this),e.options[i].splice(this.options.index,1),ae(e[i],function(t,e){t.options.index=e}),this.destroy(),Xt(t,e.isDirtyBox=!0)&&e.redraw()},defaultLabelFormatter:function(){var t,e,i=this.axis,n=this.value,o=i.categories,r=this.dateTimeLabelFormat,s=H.lang.numericSymbols,a=s&&s.length,l=i.options.labels.format,h=i.isLog?n:i.tickInterval;if(l)e=Ft(l,this);else if(o)e=n;else if(r)e=m(r,n);else if(a&&1e3<=h)for(;a--&&e===O;)(t=Math.pow(1e3,a+1))<=h&&null!==s[a]&&(e=Et(n/t,-1)+s[a]);return e===O&&(e=Et(n,1e3<=n?0:-1)),e},getSeriesExtremes:function(){var r=this,s=r.chart;r.hasVisibleSeries=!1,r.dataMin=r.dataMax=null,r.stackExtremes={},r.buildStacks(),ae(r.series,function(t){if(t.visible||!s.options.chart.ignoreHiddenSeries){var e,i,n,o=t.options.threshold;r.hasVisibleSeries=!0,r.isLog&&o<=0&&(o=null),r.isXAxis?(e=t.xData).length&&(r.dataMin=R(Xt(r.dataMin,e[0]),$t(e)),r.dataMax=F(Xt(r.dataMax,e[0]),qt(e))):(t.getExtremes(),n=t.dataMax,Ot(i=t.dataMin)&&Ot(n)&&(r.dataMin=R(Xt(r.dataMin,i),i),r.dataMax=F(Xt(r.dataMax,n),n)),Ot(o)&&(r.dataMin>=o?(r.dataMin=o,r.ignoreMinPadding=!0):r.dataMax<o&&(r.dataMax=o,r.ignoreMaxPadding=!0)))}})},translate:function(t,e,i,n,o,r){var s,a=this,l=a.len,h=1,c=0,d=n?a.oldTransA:a.transA,p=n?a.oldMin:a.min,u=a.minPixelPadding,f=(a.options.ordinal||a.isLog&&o)&&a.lin2val;return d=d||a.transA,i&&(h*=-1,c=l),a.reversed&&(c-=(h*=-1)*l),e?(t=t*h+c,s=(t-=u)/d+p,f&&(s=a.lin2val(s))):(f&&(t=a.val2lin(t)),"between"===r&&(r=.5),s=h*(t-p)*d+c+h*u+(Dt(r)?d*r*a.pointRange:0)),s},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){var o,r,s,a,l,h=this,c=h.chart,d=h.left,p=h.top,u=h.translate(t,null,null,i),f=i&&c.oldChartHeight||c.chartHeight,g=i&&c.oldChartWidth||c.chartWidth,m=h.transB;return o=s=N(u+m),r=a=N(f-u-m),isNaN(u)?l=!0:h.horiz?(r=p,a=f-h.bottom,(o<d||o>d+h.width)&&(l=!0)):(o=d,s=g-h.right,(r<p||r>p+h.height)&&(l=!0)),l&&!n?null:c.renderer.crispLine([ht,o,r,ct,s,a],e||0)},getPlotBandPath:function(t,e){var i=this.getPlotLinePath(e),n=this.getPlotLinePath(t);return n&&i?n.push(i[4],i[5],i[1],i[2]):n=null,n},getLinearTickPositions:function(t,e,i){var n,o,r=te(z(e/t)*t),s=te(B(i/t)*t),a=[];for(n=r;n<=s&&(a.push(n),(n=te(n+t))!==o);)o=n;return a},getLogTickPositions:function(t,e,i,n){var o=this,r=o.options,s=o.len,a=[];if(n||(o._minorAutoInterval=null),.5<=t)t=N(t),a=o.getLinearTickPositions(t,e,i);else if(.08<=t){var l,h,c,d,p,u,f;for(l=.3<t?[1,2,4]:.15<t?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9],h=z(e);h<i+1&&!f;h++)for(d=l.length,c=0;c<d&&!f;c++)e<(p=It(zt(h)*l[c]))&&(!n||u<=i)&&a.push(u),i<u&&(f=!0),u=p}else{var g=zt(e),m=zt(i),y=r[n?"minorTickInterval":"tickInterval"],x="auto"===y?null:y,v=r.tickPixelInterval/(n?5:1),b=n?s/o.tickPositions.length:s;t=jt(t=Xt(x,o._minorAutoInterval,(m-g)*v/(b||1)),null,Vt(t)),a=ce(o.getLinearTickPositions(t,g,m),It),n||(o._minorAutoInterval=t/5)}return n||(o.tickInterval=t),a},getMinorTickPositions:function(){var t,e,i,n=this,o=n.options,r=n.tickPositions,s=n.minorTickInterval,a=[];if(n.isLog)for(i=r.length,e=1;e<i;e++)a=a.concat(n.getLogTickPositions(s,r[e-1],r[e],!0));else if(n.isDatetimeAxis&&"auto"===o.minorTickInterval)(a=a.concat(Ut(_t(s),n.min,n.max,o.startOfWeek)))[0]<n.min&&a.shift();else for(t=n.min+(r[0]-n.min)%s;t<=n.max;t+=s)a.push(t);return a},adjustForMinRange:function(){var t,e,i,n,o,r,s,a,l=this,h=l.options,c=l.min,d=l.max,p=l.dataMax-l.dataMin>=l.minRange;if(l.isXAxis&&l.minRange===O&&!l.isLog&&(Ot(h.min)||Ot(h.max)?l.minRange=null:(ae(l.series,function(t){for(o=t.xData,r=t.xIncrement?1:o.length-1,i=r;0<i;i--)n=o[i]-o[i-1],(e===O||n<e)&&(e=n)}),l.minRange=R(5*e,l.dataMax-l.dataMin))),d-c<l.minRange){var u=l.minRange;s=[c-(t=(u-d+c)/2),Xt(h.min,c-t)],p&&(s[2]=l.dataMin),a=[(c=qt(s))+u,Xt(h.max,c+u)],p&&(a[2]=l.dataMax),(d=$t(a))-c<u&&(s[0]=d-u,s[1]=Xt(h.min,d-u),c=qt(s))}l.min=c,l.max=d},setAxisTranslation:function(t){var o,e,i=this,r=i.max-i.min,s=0,a=0,l=0,n=i.linkedParent,h=i.transA;i.isXAxis&&(n?(a=n.minPointOffset,l=n.pointRangePadding):ae(i.series,function(t){var e=t.pointRange,i=t.options.pointPlacement,n=t.closestPointRange;r<e&&(e=0),s=F(s,e),a=F(a,Lt(i)?0:e/2),l=F(l,"on"===i?0:e),!t.noSharedTooltip&&Ot(n)&&(o=Ot(o)?R(o,n):n)}),e=i.ordinalSlope&&o?i.ordinalSlope/o:1,i.minPointOffset=a*=e,i.pointRangePadding=l*=e,i.pointRange=R(s,r),i.closestPointRange=o),t&&(i.oldTransA=h),i.translationSlope=i.transA=h=i.len/(r+l||1),i.transB=i.horiz?i.left:i.bottom,i.minPixelPadding=h*a},setTickPositions:function(t){var e,i,n,o,r=this,s=r.chart,a=r.options,l=r.isLog,h=r.isDatetimeAxis,c=r.isXAxis,d=r.isLinked,p=r.options.tickPositioner,u=a.maxPadding,f=a.minPadding,g=a.tickInterval,m=a.minTickInterval,y=a.tickPixelInterval,x=r.categories;if(d?(r.linkedParent=s[c?"xAxis":"yAxis"][a.linkedTo],i=r.linkedParent.getExtremes(),r.min=Xt(i.min,i.dataMin),r.max=Xt(i.max,i.dataMax),a.type!==r.linkedParent.options.type&&Qt(11,1)):(r.min=Xt(r.userMin,a.min,r.dataMin),r.max=Xt(r.userMax,a.max,r.dataMax)),l&&(!t&&R(r.min,Xt(r.dataMin,r.min))<=0&&Qt(10,1),r.min=te(It(r.min)),r.max=te(It(r.max))),r.range&&(r.userMin=r.min=F(r.min,r.max-r.range),r.userMax=r.max,t&&(r.range=null)),r.beforePadding&&r.beforePadding(),r.adjustForMinRange(),x||r.usePercentage||d||!Ot(r.min)||!Ot(r.max)||(e=r.max-r.min)&&(Ot(a.min)||Ot(r.userMin)||!f||!(r.dataMin<0)&&r.ignoreMinPadding||(r.min-=e*f),Ot(a.max)||Ot(r.userMax)||!u||!(0<r.dataMax)&&r.ignoreMaxPadding||(r.max+=e*u)),r.min===r.max||void 0===r.min||void 0===r.max?r.tickInterval=1:d&&!g&&y===r.linkedParent.options.tickPixelInterval?r.tickInterval=r.linkedParent.tickInterval:(r.tickInterval=Xt(g,x?1:(r.max-r.min)*y/F(r.len,y)),!Ot(g)&&r.len<y&&!this.isRadial&&(o=!0,r.tickInterval/=4)),c&&!t&&ae(r.series,function(t){t.processData(r.min!==r.oldMin||r.max!==r.oldMax)}),r.setAxisTranslation(!0),r.beforeSetTickPositions&&r.beforeSetTickPositions(),r.postProcessTickInterval&&(r.tickInterval=r.postProcessTickInterval(r.tickInterval)),r.pointRange&&(r.tickInterval=F(r.pointRange,r.tickInterval)),!g&&r.tickInterval<m&&(r.tickInterval=m),h||l||g||(r.tickInterval=jt(r.tickInterval,null,Vt(r.tickInterval),a)),r.minorTickInterval="auto"===a.minorTickInterval&&r.tickInterval?r.tickInterval/5:a.minorTickInterval,r.tickPositions=n=a.tickPositions?[].concat(a.tickPositions):p&&p.apply(r,[r.min,r.max]),n||(!r.ordinalPositions&&(r.max-r.min)/r.tickInterval>F(2*r.len,200)&&Qt(19,!0),n=h?(r.getNonLinearTimeTicks||Ut)(_t(r.tickInterval,a.units),r.min,r.max,a.startOfWeek,r.ordinalPositions,r.closestPointRange,!0):l?r.getLogTickPositions(r.tickInterval,r.min,r.max):r.getLinearTickPositions(r.tickInterval,r.min,r.max),o&&n.splice(1,n.length-2),r.tickPositions=n),!d){var v=n[0],b=n[n.length-1],k=r.minPointOffset||0;a.startOnTick?r.min=v:r.min-k>v&&n.shift(),a.endOnTick?r.max=b:r.max+k<b&&n.pop(),1===n.length&&(r.min-=.001,r.max+=.001)}},setMaxTicks:function(){var t=this.chart,e=t.maxTicks||{},i=this.tickPositions,n=this._maxTicksKey=[this.xOrY,this.pos,this.len].join("-");!this.isLinked&&!this.isDatetimeAxis&&i&&i.length>(e[n]||0)&&!1!==this.options.alignTicks&&(e[n]=i.length),t.maxTicks=e},adjustTickAmount:function(){var t=this,e=t.chart,i=t._maxTicksKey,n=t.tickPositions,o=e.maxTicks;if(o&&o[i]&&!t.isDatetimeAxis&&!t.categories&&!t.isLinked&&!1!==t.options.alignTicks){var r,s=t.tickAmount,a=n.length;if(t.tickAmount=r=o[i],a<r){for(;n.length<r;)n.push(te(n[n.length-1]+t.tickInterval));t.transA*=(a-1)/(r-1),t.max=n[n.length-1]}Ot(s)&&r!==s&&(t.isDirty=!0)}},setScale:function(){var t,e,i,n,o=this,r=o.stacks;if(o.oldMin=o.min,o.oldMax=o.max,o.oldAxisLength=o.len,o.setAxisSize(),n=o.len!==o.oldAxisLength,ae(o.series,function(t){(t.isDirtyData||t.isDirty||t.xAxis.isDirty)&&(i=!0)}),n||i||o.isLinked||o.forceRedraw||o.userMin!==o.oldUserMin||o.userMax!==o.oldUserMax){if(!o.isXAxis)for(t in r)delete r[t];o.forceRedraw=!1,o.getSeriesExtremes(),o.setTickPositions(),o.oldUserMin=o.userMin,o.oldUserMax=o.userMax,o.isDirty||(o.isDirty=n||o.min!==o.oldMin||o.max!==o.oldMax)}else if(!o.isXAxis)for(t in o.oldStacks&&(r=o.stacks=o.oldStacks),r)for(e in r[t])r[t][e].cum=r[t][e].total;o.setMaxTicks()},setExtremes:function(t,e,i,n,o){var r=this,s=r.chart;i=Xt(i,!0),o=St(o,{min:t,max:e}),ue(r,"setExtremes",o,function(){r.userMin=t,r.userMax=e,r.eventArgs=o,r.isDirtyExtremes=!0,i&&s.redraw(n)})},zoom:function(t,e){return this.allowZoomOutside||(Ot(this.dataMin)&&t<=this.dataMin&&(t=O),Ot(this.dataMax)&&e>=this.dataMax&&(e=O)),this.displayBtn=t!==O||e!==O,this.setExtremes(t,e,!1,O,{trigger:"zoom"}),!0},setAxisSize:function(){var t,e,i,n,o=this.chart,r=this.options,s=r.offsetLeft||0,a=r.offsetRight||0,l=this.horiz;this.left=n=Xt(r.left,o.plotLeft+s),this.top=i=Xt(r.top,o.plotTop),this.width=t=Xt(r.width,o.plotWidth-s+a),this.height=e=Xt(r.height,o.plotHeight),this.bottom=o.chartHeight-e-i,this.right=o.chartWidth-t-n,this.len=F(l?t:e,0),this.pos=l?n:i},getExtremes:function(){var t=this,e=t.isLog;return{min:e?te(zt(t.min)):t.min,max:e?te(zt(t.max)):t.max,dataMin:t.dataMin,dataMax:t.dataMax,userMin:t.userMin,userMax:t.userMax}},getThreshold:function(t){var e=this,i=e.isLog,n=i?zt(e.min):e.min,o=i?zt(e.max):e.max;return t<n||null===t?t=n:o<t&&(t=o),e.translate(t,0,1,0,1)},addPlotBand:function(t){this.addPlotBandOrLine(t,"plotBands")},addPlotLine:function(t){this.addPlotBandOrLine(t,"plotLines")},addPlotBandOrLine:function(t,e){var i=new ze(this,t).render(),n=this.userOptions;return i&&(e&&(n[e]=n[e]||[],n[e].push(t)),this.plotLinesAndBands.push(i)),i},autoLabelAlign:function(t){var e=(Xt(t,0)-90*this.side+720)%360;return 15<e&&e<165?"right":195<e&&e<345?"left":"center"},getOffset:function(){var t,e,i,n,o,r,s,a,l,h,c,d,p,u=this,f=u.chart,g=f.renderer,m=u.options,y=u.tickPositions,x=u.ticks,v=u.horiz,b=u.side,k=f.inverted?[1,0,3,2][b]:b,w=0,T=0,S=m.title,P=m.labels,A=0,L=f.axisOffset,C=f.clipOffset,M=[-1,1,1,-1][b],D=1,I=Xt(P.maxStaggerLines,5);if(u.hasData=t=u.hasVisibleSeries||Ot(u.min)&&Ot(u.max)&&!!y,u.showAxis=e=t||Xt(m.showEmpty,!0),u.staggerLines=u.horiz&&P.staggerLines,u.axisGroup||(u.gridGroup=g.g("grid").attr({zIndex:m.gridZIndex||1}).add(),u.axisGroup=g.g("axis").attr({zIndex:m.zIndex||2}).add(),u.labelGroup=g.g("axis-labels").attr({zIndex:P.zIndex||7}).add()),t||u.isLinked){if(u.labelAlign=Xt(P.align||u.autoLabelAlign(P.rotation)),ae(y,function(t){x[t]?x[t].addLabel():x[t]=new Ie(u,t)}),u.horiz&&!u.staggerLines&&I&&!P.rotation){for(r=u.reversed?[].concat(y).reverse():y;D<I;){for(a=!(s=[]),o=0;o<r.length;o++)l=r[o],p=o%D,(d=(h=x[l].label&&x[l].label.getBBox())?h.width:0)&&(c=u.translate(l),s[p]!==O&&c<s[p]&&(a=!0),s[p]=c+d);if(!a)break;D++}1<D&&(u.staggerLines=D)}ae(y,function(t){0!==b&&2!==b&&{1:"left",3:"right"}[b]!==u.labelAlign||(A=F(x[t].getLabelSize(),A))}),u.staggerLines&&(A*=u.staggerLines,u.labelOffset=A)}else for(n in x)x[n].destroy(),delete x[n];S&&S.text&&!1!==S.enabled&&(u.axisTitle||(u.axisTitle=g.text(S.text,0,0,S.useHTML).attr({zIndex:7,rotation:S.rotation||0,align:S.textAlign||{low:"left",middle:"center",high:"right"}[S.align]}).css(S.style).add(u.axisGroup),u.axisTitle.isNew=!0),e&&(w=u.axisTitle.getBBox()[v?"height":"width"],T=Xt(S.margin,v?5:10),i=S.offset),u.axisTitle[e?"show":"hide"]()),u.offset=M*Xt(m.offset,L[b]),u.axisTitleMargin=Xt(i,A+T+(2!==b&&A&&M*m.labels[v?"y":"x"])),L[b]=F(L[b],u.axisTitleMargin+w+M*u.offset),C[k]=F(C[k],2*z(m.lineWidth/2))},getLinePath:function(t){var e=this.chart,i=this.opposite,n=this.offset,o=this.horiz,r=this.left+(i?this.width:0)+n,s=e.chartHeight-this.bottom-(i?this.height:0)+n;return i&&(t*=-1),e.renderer.crispLine([ht,o?this.left:r,o?s:this.top,ct,o?e.chartWidth-this.right:r,o?s:e.chartHeight-this.bottom],t)},getTitlePosition:function(){var t=this.horiz,e=this.left,i=this.top,n=this.len,o=this.options.title,r=t?e:i,s=this.opposite,a=this.offset,l=At(o.style.fontSize||12),h={low:r+(t?0:n),middle:r+n/2,high:r+(t?n:0)}[o.align],c=(t?i+this.height:e)+(t?1:-1)*(s?-1:1)*this.axisTitleMargin+(2===this.side?l:0);return{x:t?h:c+(s?this.width:0)+a+(o.x||0),y:t?c-(s?this.height:0)+a:h+(o.y||0)}},render:function(){var t,i,n,o=this,s=o.chart,e=s.renderer,r=o.options,a=o.isLog,l=o.isLinked,h=o.tickPositions,c=o.axisTitle,d=o.stacks,p=o.ticks,u=o.minorTicks,f=o.alternateBands,g=r.stackLabels,m=r.alternateGridColor,y=o.tickmarkOffset,x=r.lineWidth,v=s.hasRendered&&Ot(o.oldMin)&&!isNaN(o.oldMin),b=o.hasData,k=o.showAxis;if(ae([p,u,f],function(t){var e;for(e in t)t[e].isActive=!1}),(b||l)&&(o.minorTickInterval&&!o.categories&&ae(o.getMinorTickPositions(),function(t){u[t]||(u[t]=new Ie(o,t,"minor")),v&&u[t].isNew&&u[t].render(null,!0),u[t].render(null,!1,1)}),h.length&&(ae(h.slice(1).concat([h[0]]),function(t,e){e=e===h.length-1?0:e+1,(!l||t>=o.min&&t<=o.max)&&(p[t]||(p[t]=new Ie(o,t)),v&&p[t].isNew&&p[t].render(e,!0),p[t].render(e,!1,1))}),y&&0===o.min&&(p[-1]||(p[-1]=new Ie(o,-1,null,!0)),p[-1].render(-1))),m&&ae(h,function(t,e){e%2==0&&t<o.max&&(f[t]||(f[t]=new ze(o)),i=t+y,n=h[e+1]!==O?h[e+1]+y:o.max,f[t].options={from:a?zt(i):i,to:a?zt(n):n,color:m},f[t].render(),f[t].isActive=!0)}),o._addedPlotLB||(ae((r.plotLines||[]).concat(r.plotBands||[]),function(t){o.addPlotBandOrLine(t)}),o._addedPlotLB=!0)),ae([p,u,f],function(t){function e(){for(n=o.length;n--;)t[o[n]]&&!t[o[n]].isActive&&(t[o[n]].destroy(),delete t[o[n]])}var i,n,o=[],r=A?A.duration||500:0;for(i in t)t[i].isActive||(t[i].render(i,!1,0),t[i].isActive=!1,o.push(i));t!==f&&s.hasRendered&&r?r&&setTimeout(e,r):e()}),x&&(t=o.getLinePath(x),o.axisLine?o.axisLine.animate({d:t}):o.axisLine=e.path(t).attr({stroke:r.lineColor,"stroke-width":x,zIndex:7}).add(o.axisGroup),o.axisLine[k?"show":"hide"]()),c&&k&&(c[c.isNew?"attr":"animate"](o.getTitlePosition()),c.isNew=!1),g&&g.enabled){var w,T,S,P=o.stackTotalGroup;for(w in P||(o.stackTotalGroup=P=e.g("stack-labels").attr({visibility:st,zIndex:6}).add()),P.translate(s.plotLeft,s.plotTop),d)for(S in T=d[w])T[S].render(P)}o.isDirty=!1},removePlotBandOrLine:function(e){for(var t=this.plotLinesAndBands,i=this.options,n=this.userOptions,o=t.length;o--;)t[o].id===e&&t[o].destroy();ae([i.plotLines||[],n.plotLines||[],i.plotBands||[],n.plotBands||[]],function(t){for(o=t.length;o--;)t[o].id===e&&Bt(t,t[o])})},setTitle:function(t,e){this.update({title:t},e)},redraw:function(){var t=this.chart.pointer;t.reset&&t.reset(!0),this.render(),ae(this.plotLinesAndBands,function(t){t.render()}),ae(this.series,function(t){t.isDirty=!0})},buildStacks:function(){var t=this.series,e=t.length;if(!this.isXAxis){for(;e--;)t[e].setStackedPoints();if(this.usePercentage)for(e=0;e<t.length;e++)t[e].setPercentStacks()}},setCategories:function(t,e){this.update({categories:t},e)},destroy:function(t){var e,i,n=this,o=n.stacks,r=n.plotLinesAndBands;for(e in t||pe(n),o)s(o[e]),o[e]=null;for(ae([n.ticks,n.minorTicks,n.alternateBands],function(t){s(t)}),i=r.length;i--;)r[i].destroy();ae(["stackTotalGroup","axisLine","axisGroup","gridGroup","labelGroup","axisTitle"],function(t){n[t]&&(n[t]=n[t].destroy())})}},Re.prototype={init:function(t,e){var i=e.borderWidth,n=e.style,o=At(n.padding);this.chart=t,this.options=e,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.label=t.renderer.label("",0,0,e.shape,null,null,e.useHTML,null,"tooltip").attr({padding:o,fill:e.backgroundColor,"stroke-width":i,r:e.borderRadius,zIndex:8}).css(n).css({padding:0}).add().attr({y:-999}),f||this.label.shadow(e.shadow),this.shared=e.shared},destroy:function(){ae(this.crosshairs,function(t){t&&t.destroy()}),this.label&&(this.label=this.label.destroy()),clearTimeout(this.hideTimer),clearTimeout(this.tooltipTimeout)},move:function(t,e,i,n){var o=this,r=o.now,s=!1!==o.options.animation&&!o.isHidden;St(r,{x:s?(2*r.x+t)/3:t,y:s?(r.y+e)/2:e,anchorX:s?(2*r.anchorX+i)/3:i,anchorY:s?(r.anchorY+n)/2:n}),o.label.attr(r),s&&(1<V(t-r.x)||1<V(e-r.y))&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){o&&o.move(t,e,i,n)},32))},hide:function(){var t,e=this;clearTimeout(this.hideTimer),this.isHidden||(t=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){e.label.fadeOut(),e.isHidden=!0},Xt(this.options.hideDelay,500)),t&&ae(t,function(t){t.setState()}),this.chart.hoverPoints=null)},hideCrosshairs:function(){ae(this.crosshairs,function(t){t&&t.hide()})},getAnchor:function(t,e){var i,n,o=this.chart,r=o.inverted,s=o.plotTop,a=0,l=0;return i=(t=Ht(t))[0].tooltipPos,this.followPointer&&e&&(e.chartX===O&&(e=o.pointer.normalize(e)),i=[e.chartX-o.plotLeft,e.chartY-s]),i||(ae(t,function(t){n=t.series.yAxis,a+=t.plotX,l+=(t.plotLow?(t.plotLow+t.plotHigh)/2:t.plotY)+(!r&&n?n.top-s:0)}),a/=t.length,l/=t.length,i=[r?o.plotWidth-l:a,this.shared&&!r&&1<t.length&&e?e.chartY-s:r?o.plotHeight-a:l]),ce(i,N)},getPosition:function(t,e,i){var n,o=this.chart,r=o.plotLeft,s=o.plotTop,a=o.plotWidth,l=o.plotHeight,h=Xt(this.options.distance,12),c=i.plotX,d=i.plotY,p=c+r+(o.inverted?h:-t-h),u=d-e+s+15;return p<7&&(p=r+F(c,0)+h),r+a<p+t&&(p-=p+t-(r+a),u=d-e+s-h,n=!0),u<s+5&&(u=s+5,n&&u<=d&&d<=u+e&&(u=d+s+h)),s+l<u+e&&(u=F(s,s+l-e-h)),{x:p,y:u}},defaultFormatter:function(t){var e,i=this.points||Ht(this),n=i[0].series;return e=[n.tooltipHeaderFormatter(i[0])],ae(i,function(t){n=t.series,e.push(n.tooltipFormatter&&n.tooltipFormatter(t)||t.point.tooltipFormatter(n.tooltipOptions.pointFormat))}),e.push(t.options.footerFormat||""),e.join("")},refresh:function(t,e){var i,n,o,r,s,a,l=this,h=l.chart,c=l.label,d=l.options,p={},u=[],f=d.formatter||l.defaultFormatter,g=h.hoverPoints,m=d.crosshairs,y=l.shared;if(clearTimeout(this.hideTimer),l.followPointer=Ht(t)[0].series.tooltipOptions.followPointer,i=(o=l.getAnchor(t,e))[0],n=o[1],!y||t.series&&t.series.noSharedTooltip?p=t.getLabelConfig():(h.hoverPoints=t,g&&ae(g,function(t){t.setState()}),ae(t,function(t){t.setState(ut),u.push(t.getLabelConfig())}),(p={x:t[0].category,y:t[0].y}).points=u,t=t[0]),r=f.call(p,l),a=t.series,!1===r?this.hide():(l.isHidden&&(me(c),c.attr("opacity",1).show()),c.attr({text:r}),s=d.borderColor||t.color||a.color||"#606060",c.attr({stroke:s}),l.updatePosition({plotX:i,plotY:n}),this.isHidden=!1),m)for(var x,v,b,k,w,T=(m=Ht(m)).length;T--;)b=(w=t.series)[T?"yAxis":"xAxis"],m[T]&&b&&(k=T?Xt(t.stackY,t.y):t.x,b.isLog&&(k=It(k)),1===T&&w.modifyValue&&(k=w.modifyValue(k)),x=b.getPlotLinePath(k,1),l.crosshairs[T]?l.crosshairs[T].attr({d:x,visibility:st}):(v={"stroke-width":m[T].width||1,stroke:m[T].color||"#C0C0C0",zIndex:m[T].zIndex||2},m[T].dashStyle&&(v.dashstyle=m[T].dashStyle),l.crosshairs[T]=h.renderer.path(x).attr(v).add()));ue(h,"tooltipRefresh",{text:r,x:i+h.plotLeft,y:n+h.plotTop,borderColor:s})},updatePosition:function(t){var e=this.chart,i=this.label,n=(this.options.positioner||this.getPosition).call(this,i.width,i.height,t);this.move(N(n.x),N(n.y),t.plotX+e.plotLeft,t.plotY+e.plotTop)}},He.prototype={init:function(t,e){var i,n,o=e.chart,r=o.events,s=f?"":o.zoomType,a=t.inverted;this.options=e,this.chart=t,this.zoomX=i=/x/.test(s),this.zoomY=n=/y/.test(s),this.zoomHor=i&&!a||n&&a,this.zoomVert=n&&!a||i&&a,this.runChartClick=r&&!!r.click,this.pinchDown=[],this.lastValidTouch={},e.tooltip.enabled&&(t.tooltip=new Re(t,e.tooltip)),this.setDOMEvents()},normalize:function(t,e){var i,n,o;return(t=t||d.event).target||(t.target=t.srcElement),o=(t=fe(t)).touches?t.touches.item(0):t,e||(this.chartPosition=e=he(this.chart.container)),n=o.pageX===O?(i=F(t.x,t.clientX-e.left),t.y):(i=o.pageX-e.left,o.pageY-e.top),St(t,{chartX:N(i),chartY:N(n)})},getCoordinates:function(e){var i={xAxis:[],yAxis:[]};return ae(this.chart.axes,function(t){i[t.isXAxis?"xAxis":"yAxis"].push({axis:t,value:t.toValue(e[t.horiz?"chartX":"chartY"])})}),i},getIndex:function(t){var e=this.chart;return e.inverted?e.plotHeight+e.plotTop-t.chartY:t.chartX-e.plotLeft},runPointActions:function(t){var e,i,n,o,r,s=this,a=s.chart,l=a.series,h=a.tooltip,c=a.hoverPoint,d=a.hoverSeries,p=a.chartWidth,u=s.getIndex(t);if(h&&s.options.tooltip.shared&&(!d||!d.noSharedTooltip)){for(i=[],n=l.length,o=0;o<n;o++)l[o].visible&&!1!==l[o].options.enableMouseTracking&&!l[o].noSharedTooltip&&l[o].tooltipPoints.length&&(e=l[o].tooltipPoints[u])&&e.series&&(e._dist=V(u-e.clientX),p=R(p,e._dist),i.push(e));for(n=i.length;n--;)i[n]._dist>p&&i.splice(n,1);i.length&&i[0].clientX!==s.hoverX&&(h.refresh(i,t),s.hoverX=i[0].clientX)}d&&d.tracker?(e=d.tooltipPoints[u])&&e!==c&&e.onMouseOver(t):h&&h.followPointer&&!h.isHidden&&(r=h.getAnchor([{}],t),h.updatePosition({plotX:r[0],plotY:r[1]}))},reset:function(t){var e=this.chart,i=e.hoverSeries,n=e.hoverPoint,o=e.tooltip,r=o&&o.shared?e.hoverPoints:n;(t=t&&o&&r)&&Ht(r)[0].plotX===O&&(t=!1),t?o.refresh(r):(n&&n.onMouseOut(),i&&i.onMouseOut(),o&&(o.hide(),o.hideCrosshairs()),this.hoverX=null)},scaleGroups:function(e,i){var n,o=this.chart;ae(o.series,function(t){n=e||t.getPlotBox(),t.xAxis&&t.xAxis.zoomEnabled&&(t.group.attr(n),t.markerGroup&&(t.markerGroup.attr(n),t.markerGroup.clip(i?o.clipRect:null)),t.dataLabelsGroup&&t.dataLabelsGroup.attr(n))}),o.clipRect.attr(i||o.clipBox)},pinchTranslateDirection:function(t,e,i,n,o,r,s){function a(){!T&&20<V(S-A)&&(b=V(P-L)/V(S-A)),c=(v-P)/b+S,l=f["plot"+(t?"Width":"Height")]/b}var l,h,c,d,p,u,f=this.chart,g=t?"x":"y",m=t?"X":"Y",y="chart"+m,x=t?"width":"height",v=f["plot"+(t?"Left":"Top")],b=1,k=f.inverted,w=f.bounds[t?"h":"v"],T=1===e.length,S=e[0][y],P=i[0][y],A=!T&&e[1][y],L=!T&&i[1][y];a(),(h=c)<w.min?(h=w.min,d=!0):h+l>w.max&&(h=w.max-l,d=!0),d?(P-=.8*(P-s[g][0]),T||(L-=.8*(L-s[g][1])),a()):s[g]=[P,L],k||(r[g]=c-v,r[x]=l),u=k?t?"scaleY":"scaleX":"scale"+m,p=k?1/b:b,o[x]=l,o[g]=h,n[u]=b,n["translate"+m]=p*v+(P-p*S)},pinch:function(t){var e=this,a=e.chart,i=e.pinchDown,n=a.tooltip&&a.tooltip.options.followTouchMove,o=t.touches,r=o.length,s=e.lastValidTouch,l=e.zoomHor||e.pinchHor,h=e.zoomVert||e.pinchVert,c=l||h,d=e.selectionMarker,p={},u=1===r&&(e.inClass(t.target,rt+"tracker")&&a.runTrackerClick||a.runChartClick),f={};!c&&!n||u||t.preventDefault(),ce(o,function(t){return e.normalize(t)}),"touchstart"===t.type?(ae(o,function(t,e){i[e]={chartX:t.chartX,chartY:t.chartY}}),s.x=[i[0].chartX,i[1]&&i[1].chartX],s.y=[i[0].chartY,i[1]&&i[1].chartY],ae(a.axes,function(t){if(t.zoomEnabled){var e=a.bounds[t.horiz?"h":"v"],i=t.minPixelPadding,n=t.toPixels(t.dataMin),o=t.toPixels(t.dataMax),r=R(n,o),s=F(n,o);e.min=R(t.pos,r-i),e.max=F(t.pos+t.len,s+i)}})):i.length&&(d||(e.selectionMarker=d=St({destroy:g},a.plotBox)),l&&e.pinchTranslateDirection(!0,i,o,p,d,f,s),h&&e.pinchTranslateDirection(!1,i,o,p,d,f,s),e.hasPinched=c,e.scaleGroups(p,f),!c&&n&&1===r&&this.runPointActions(e.normalize(t)))},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,n=this.chart,o=n.options.chart,r=t.chartX,s=t.chartY,a=this.zoomHor,l=this.zoomVert,h=n.plotLeft,c=n.plotTop,d=n.plotWidth,p=n.plotHeight,u=this.mouseDownX,f=this.mouseDownY;r<h?r=h:h+d<r&&(r=h+d),s<c?s=c:c+p<s&&(s=c+p),this.hasDragged=Math.sqrt(Math.pow(u-r,2)+Math.pow(f-s,2)),10<this.hasDragged&&(e=n.isInsidePlot(u-h,f-c),n.hasCartesianSeries&&(this.zoomX||this.zoomY)&&e&&(this.selectionMarker||(this.selectionMarker=n.renderer.rect(h,c,a?1:d,l?1:p,0).attr({fill:o.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add())),this.selectionMarker&&a&&(i=r-u,this.selectionMarker.attr({width:V(i),x:(0<i?0:i)+u})),this.selectionMarker&&l&&(i=s-f,this.selectionMarker.attr({height:V(i),y:(0<i?0:i)+f})),e&&!this.selectionMarker&&o.panning&&n.pan(t,o.panning))},drop:function(t){var e=this.chart,i=this.hasPinched;if(this.selectionMarker){var o,r={xAxis:[],yAxis:[],originalEvent:t.originalEvent||t},s=this.selectionMarker,a=s.x,l=s.y;(this.hasDragged||i)&&(ae(e.axes,function(t){if(t.zoomEnabled){var e=t.horiz,i=t.toValue(e?a:l),n=t.toValue(e?a+s.width:l+s.height);isNaN(i)||isNaN(n)||(r[t.xOrY+"Axis"].push({axis:t,min:R(i,n),max:F(i,n)}),o=!0)}}),o&&ue(e,"selection",r,function(t){e.zoom(St(t,i?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),i&&this.scaleGroups()}e&&(Wt(e.container,{cursor:e._cursor}),e.cancelClick=10<this.hasDragged,e.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(t){(t=this.normalize(t)).preventDefault&&t.preventDefault(),this.dragStart(t)},onDocumentMouseUp:function(t){this.drop(t)},onDocumentMouseMove:function(t){var e=this.chart,i=this.chartPosition,n=e.hoverSeries;t=this.normalize(t,i),i&&n&&!this.inClass(t.target,"highcharts-tracker")&&!e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)&&this.reset()},onContainerMouseLeave:function(){this.reset(),this.chartPosition=null},onContainerMouseMove:function(t){var e=this.chart;(t=this.normalize(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=Rt(t,"class")){if(-1!==i.indexOf(e))return!0;if(-1!==i.indexOf(rt+"container"))return!1}t=t.parentNode}},onTrackerMouseOut:function(t){var e=this.chart.hoverSeries;!e||e.options.stickyTracking||this.inClass(t.toElement||t.relatedTarget,rt+"tooltip")||e.onMouseOut()},onContainerClick:function(t){var e,i,n,o=this.chart,r=o.hoverPoint,s=o.plotLeft,a=o.plotTop,l=o.inverted;(t=this.normalize(t)).cancelBubble=!0,o.cancelClick||(r&&this.inClass(t.target,rt+"tracker")?(e=this.chartPosition,i=r.plotX,n=r.plotY,St(r,{pageX:e.left+s+(l?o.plotWidth-n:i),pageY:e.top+a+(l?o.plotHeight-i:n)}),ue(r.series,"click",St(t,{point:r})),o.hoverPoint&&r.firePointEvent("click",t)):(St(t,this.getCoordinates(t)),o.isInsidePlot(t.chartX-s,t.chartY-a)&&ue(o,"click",t)))},onContainerTouchStart:function(t){var e=this.chart;1===t.touches.length?(t=this.normalize(t),e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)?(this.runPointActions(t),this.pinch(t)):this.reset()):2===t.touches.length&&this.pinch(t)},onContainerTouchMove:function(t){1!==t.touches.length&&2!==t.touches.length||this.pinch(t)},onDocumentTouchEnd:function(t){this.drop(t)},setDOMEvents:function(){var t,i=this,e=i.chart.container;this._events=t=[[e,"onmousedown","onContainerMouseDown"],[e,"onmousemove","onContainerMouseMove"],[e,"onclick","onContainerClick"],[e,"mouseleave","onContainerMouseLeave"],[I,"mousemove","onDocumentMouseMove"],[I,"mouseup","onDocumentMouseUp"]],$&&t.push([e,"ontouchstart","onContainerTouchStart"],[e,"ontouchmove","onContainerTouchMove"],[I,"touchend","onDocumentTouchEnd"]),ae(t,function(e){i["_"+e[2]]=function(t){i[e[2]](t)},0===e[1].indexOf("on")?e[0][e[1]]=i["_"+e[2]]:de(e[0],e[1],i["_"+e[2]])})},destroy:function(){var e=this;ae(e._events,function(t){0===t[1].indexOf("on")?t[0][t[1]]=null:pe(t[0],t[1],e["_"+t[2]])}),delete e._events,clearInterval(e.tooltipTimeout)}},Xe.prototype={init:function(t,e){var i=this,n=e.itemStyle,o=Xt(e.padding,8),r=e.itemMarginTop||0;(this.options=e).enabled&&(i.baseline=At(n.fontSize)+3+r,i.itemStyle=n,i.itemHiddenStyle=Pt(n,e.itemHiddenStyle),i.itemMarginTop=r,i.padding=o,i.initialItemX=o,i.initialItemY=o-5,i.maxItemWidth=0,i.chart=t,i.itemHeight=0,i.lastLineHeight=0,i.render(),de(i.chart,"endResize",function(){i.positionCheckboxes()}))},colorizeItem:function(t,e){var i,n,o=this.options,r=t.legendItem,s=t.legendLine,a=t.legendSymbol,l=this.itemHiddenStyle.color,h=e?o.itemStyle.color:l,c=e?t.color:l,d=t.options&&t.options.marker,p={stroke:c,fill:c};if(r&&r.css({fill:h,color:h}),s&&s.attr({stroke:c}),a){if(d&&a.isMarker)for(i in d=t.convertAttribs(d))(n=d[i])!==O&&(p[i]=n);a.attr(p)}},positionItem:function(t){var e=this.options,i=e.symbolPadding,n=!e.rtl,o=t._legendItemPos,r=o[0],s=o[1],a=t.checkbox;t.legendGroup&&t.legendGroup.translate(n?r:this.legendWidth-r-2*i-4,s),a&&(a.x=r,a.y=s)},destroyItem:function(e){var t=e.checkbox;ae(["legendItem","legendLine","legendSymbol","legendGroup"],function(t){e[t]&&(e[t]=e[t].destroy())}),t&&Jt(e.checkbox)},destroy:function(){var t=this.group,e=this.box;e&&(this.box=e.destroy()),t&&(this.group=t.destroy())},positionCheckboxes:function(n){var o,r=this.group.alignAttr,s=this.clipHeight||this.legendHeight;r&&(o=r.translateY,ae(this.allItems,function(t){var e,i=t.checkbox;i&&(e=o+i.y+(n||0)+3,Wt(i,{left:r.translateX+t.legendItemWidth+i.x-20+at,top:e+at,display:o-6<e&&e<o+s-6?"":lt}))}))},renderTitle:function(){var t,e=this.options,i=this.padding,n=e.title,o=0;n.text&&(this.title||(this.title=this.chart.renderer.label(n.text,i-3,i-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(n.style).add(this.group)),o=(t=this.title.getBBox()).height,this.offsetWidth=t.width,this.contentGroup.attr({translateY:o})),this.titleHeight=o},renderItem:function(n){var t,e,i,o=this,r=o.chart,s=r.renderer,a=o.options,l="horizontal"===a.layout,h=a.symbolWidth,c=a.symbolPadding,d=o.itemStyle,p=o.itemHiddenStyle,u=o.padding,f=l?Xt(a.itemDistance,8):0,g=!a.rtl,m=a.width,y=a.itemMarginBottom||0,x=o.itemMarginTop,v=o.initialItemX,b=n.legendItem,k=n.series||n,w=k.options,T=w.showCheckbox,S=a.useHTML;b||(n.legendGroup=s.g("legend-item").attr({zIndex:1}).add(o.scrollGroup),k.drawLegendSymbol(o,n),n.legendItem=b=s.text(a.labelFormat?Ft(a.labelFormat,n):a.labelFormatter.call(n),g?h+c:-c,o.baseline,S).css(Pt(n.visible?d:p)).attr({align:g?"left":"right",zIndex:2}).add(n.legendGroup),(S?b:n.legendGroup).on("mouseover",function(){n.setState(ut),b.css(o.options.itemHoverStyle)}).on("mouseout",function(){b.css(n.visible?d:p),n.setState()}).on("click",function(t){function e(){n.setVisible()}var i="legendItemClick";t={browserEvent:t},n.firePointEvent?n.firePointEvent(i,t,e):ue(n,i,t,e)}),o.colorizeItem(n,n.visible),w&&T&&(n.checkbox=Yt("input",{type:"checkbox",checked:n.selected,defaultChecked:n.selected},a.itemCheckboxStyle,r.container),de(n.checkbox,"click",function(t){var e=t.target;ue(n,"checkboxClick",{checked:e.checked},function(){n.select()})}))),e=b.getBBox(),i=n.legendItemWidth=a.itemWidth||h+c+e.width+f+(T?20:0),o.itemHeight=t=e.height,l&&o.itemX-v+i>(m||r.chartWidth-2*u-v)&&(o.itemX=v,o.itemY+=x+o.lastLineHeight+y,o.lastLineHeight=0),o.maxItemWidth=F(o.maxItemWidth,i),o.lastItemY=x+o.itemY+y,o.lastLineHeight=F(t,o.lastLineHeight),n._legendItemPos=[o.itemX,o.itemY],l?o.itemX+=i:(o.itemY+=x+t+y,o.lastLineHeight=t),o.offsetWidth=m||F((l?o.itemX-v-f:i)+u,o.offsetWidth)},render:function(){var i,t,e,n,o=this,r=o.chart,s=r.renderer,a=o.group,l=o.box,h=o.options,c=o.padding,d=h.borderWidth,p=h.backgroundColor;o.itemX=o.initialItemX,o.itemY=o.initialItemY,o.offsetWidth=0,o.lastItemY=0,a||(o.group=a=s.g("legend").attr({zIndex:7}).add(),o.contentGroup=s.g().attr({zIndex:1}).add(a),o.scrollGroup=s.g().add(o.contentGroup)),o.renderTitle(),i=[],ae(r.series,function(t){var e=t.options;e.showInLegend&&!Ot(e.linkedTo)&&(i=i.concat(t.legendItems||("point"===e.legendType?t.data:t)))}),Kt(i,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),h.reversed&&i.reverse(),o.allItems=i,o.display=t=!!i.length,ae(i,function(t){o.renderItem(t)}),e=h.width||o.offsetWidth,n=o.lastItemY+o.lastLineHeight+o.titleHeight,n=o.handleOverflow(n),(d||p)&&(e+=c,n+=c,l?0<e&&0<n&&(l[l.isNew?"attr":"animate"](l.crisp(null,null,null,e,n)),l.isNew=!1):(o.box=l=s.rect(0,0,e,n,h.borderRadius,d||0).attr({stroke:h.borderColor,"stroke-width":d||0,fill:p||lt}).add(a).shadow(h.shadow),l.isNew=!0),l[t?"show":"hide"]()),o.legendWidth=e,o.legendHeight=n,ae(i,function(t){o.positionItem(t)}),t&&a.align(St({width:e,height:n},h),!0,"spacingBox"),r.isResizing||this.positionCheckboxes()},handleOverflow:function(t){var e,i=this,n=this.chart,o=n.renderer,r=this.options,s=r.y,a="top"===r.verticalAlign,l=n.spacingBox.height+(a?-s:s)-this.padding,h=r.maxHeight,c=this.clipRect,d=r.navigation,p=Xt(d.animation,!0),u=d.arrowSize||12,f=this.nav;return"horizontal"===r.layout&&(l/=2),h&&(l=R(l,h)),l<t&&!r.useHTML?(this.clipHeight=e=l-20-this.titleHeight,this.pageCount=B(t/e),this.currentPage=Xt(this.currentPage,1),this.fullHeight=t,c||(c=i.clipRect=o.clipRect(0,0,9999,0),i.contentGroup.clip(c)),c.attr({height:e}),f||(this.nav=f=o.g().attr({zIndex:1}).add(this.group),this.up=o.symbol("triangle",0,0,u,u).on("click",function(){i.scroll(-1,p)}).add(f),this.pager=o.text("",15,10).css(d.style).add(f),this.down=o.symbol("triangle-down",0,0,u,u).on("click",function(){i.scroll(1,p)}).add(f)),i.scroll(0),t=l):f&&(c.attr({height:n.chartHeight}),f.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},scroll:function(t,e){var i,n=this.pageCount,o=this.currentPage+t,r=this.clipHeight,s=this.options.navigation,a=s.activeColor,l=s.inactiveColor,h=this.pager,c=this.padding;n<o&&(o=n),0<o&&(e!==O&&ee(e,this.chart),this.nav.attr({translateX:c,translateY:r+7+this.titleHeight,visibility:st}),this.up.attr({fill:1===o?l:a}).css({cursor:1===o?"default":"pointer"}),h.attr({text:o+"/"+this.pageCount}),this.down.attr({x:18+this.pager.getBBox().width,fill:o===n?l:a}).css({cursor:o===n?"default":"pointer"}),i=1-R(r*(o-1),this.fullHeight-r+c),this.scrollGroup.animate({translateY:i}),h.attr({text:o+"/"+n}),this.currentPage=o,this.positionCheckboxes(i))}},/Trident.*?11\.0/.test(p)&&Nt(Xe.prototype,"positionItem",function(t,e){var i=this;setTimeout(function(){t.call(i,e)})}),(We.prototype={init:function(t,e){var i,n=t.series;t.series=null,(i=Pt(H,t)).series=t.series=n;var o=i.chart;this.margin=this.splashArray("margin",o),this.spacing=this.splashArray("spacing",o);var r=o.events;this.bounds={h:{},v:{}},this.callback=e,this.isResizing=0,this.options=i,this.axes=[],this.series=[],this.hasCartesianSeries=o.showAxes;var s,a=this;if(a.index=Q.length,Q.push(a),!1!==o.reflow&&de(a,"load",function(){a.initReflow()}),r)for(s in r)de(a,s,r[s]);a.xAxis=[],a.yAxis=[],a.animation=!f&&Xt(o.animation,!0),a.pointCount=0,a.counters=new Zt,a.firstRender()},initSeries:function(t){var e,i=this.options.chart,n=t.type||i.type||i.defaultSeriesType,o=Tt[n];return o||Qt(17,!0),(e=new o).init(this,t),e},addSeries:function(t,e,i){var n,o=this;return t&&(e=Xt(e,!0),ue(o,"addSeries",{options:t},function(){n=o.initSeries(t),o.isDirtyLegend=!0,o.linkSeries(),e&&o.redraw(i)})),n},addAxis:function(t,e,i,n){var o=e?"xAxis":"yAxis",r=this.options;new Oe(this,Pt(t,{index:this[o].length,isX:e})),r[o]=Ht(r[o]||{}),r[o].push(t),Xt(i,!0)&&this.redraw(n)},isInsidePlot:function(t,e,i){var n=i?e:t,o=i?t:e;return 0<=n&&n<=this.plotWidth&&0<=o&&o<=this.plotHeight},adjustTickAmounts:function(){!1!==this.options.chart.alignTicks&&ae(this.axes,function(t){t.adjustTickAmount()}),this.maxTicks=null},redraw:function(t){var e,i,n,o=this,r=o.axes,s=o.series,a=o.pointer,l=o.legend,h=o.isDirtyLegend,c=o.isDirtyBox,d=s.length,p=d,u=o.renderer,f=u.isHidden(),g=[];for(ee(t,o),f&&o.cloneRenderTo(),o.layOutTitles();p--;)if((n=s[p]).options.stacking&&(e=!0,n.isDirty)){i=!0;break}if(i)for(p=d;p--;)(n=s[p]).options.stacking&&(n.isDirty=!0);ae(s,function(t){t.isDirty&&"point"===t.options.legendType&&(h=!0)}),h&&l.options.enabled&&(l.render(),o.isDirtyLegend=!1),e&&o.getStacks(),o.hasCartesianSeries&&(o.isResizing||(o.maxTicks=null,ae(r,function(t){t.setScale()})),o.adjustTickAmounts(),o.getMargins(),ae(r,function(t){t.isDirty&&(c=!0)}),ae(r,function(t){t.isDirtyExtremes&&(t.isDirtyExtremes=!1,g.push(function(){ue(t,"afterSetExtremes",St(t.eventArgs,t.getExtremes())),delete t.eventArgs})),(c||e)&&t.redraw()})),c&&o.drawChartBox(),ae(s,function(t){t.isDirty&&t.visible&&(!t.isCartesian||t.xAxis)&&t.redraw()}),a&&a.reset&&a.reset(!0),u.draw(),ue(o,"redraw"),f&&o.cloneRenderTo(!0),ae(g,function(t){t.call()})},showLoading:function(t){var e=this,i=e.options,n=e.loadingDiv,o=i.loading;n||(e.loadingDiv=n=Yt(it,{className:rt+"loading"},St(o.style,{zIndex:10,display:lt}),e.container),e.loadingSpan=Yt("span",null,o.labelStyle,n)),e.loadingSpan.innerHTML=t||i.lang.loading,e.loadingShown||(Wt(n,{opacity:0,display:"",left:e.plotLeft+at,top:e.plotTop+at,width:e.plotWidth+at,height:e.plotHeight+at}),ge(n,{opacity:o.style.opacity},{duration:o.showDuration||0}),e.loadingShown=!0)},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&ge(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){Wt(e,{display:lt})}}),this.loadingShown=!1},get:function(t){var e,i,n,o=this.axes,r=this.series;for(e=0;e<o.length;e++)if(o[e].options.id===t)return o[e];for(e=0;e<r.length;e++)if(r[e].options.id===t)return r[e];for(e=0;e<r.length;e++)for(n=r[e].points||[],i=0;i<n.length;i++)if(n[i].id===t)return n[i];return null},getAxes:function(){var t,e=this,i=this.options,n=i.xAxis=Ht(i.xAxis||{}),o=i.yAxis=Ht(i.yAxis||{});ae(n,function(t,e){t.index=e,t.isX=!0}),ae(o,function(t,e){t.index=e}),t=n.concat(o),ae(t,function(t){new Oe(e,t)}),e.adjustTickAmounts()},getSelectedPoints:function(){var e=[];return ae(this.series,function(t){e=e.concat(le(t.points||[],function(t){return t.selected}))}),e},getSelectedSeries:function(){return le(this.series,function(t){return t.selected})},getStacks:function(){var e=this;ae(e.yAxis,function(t){t.stacks&&t.hasVisibleSeries&&(t.oldStacks=t.stacks)}),ae(e.series,function(t){!t.options.stacking||!0!==t.visible&&!1!==e.options.chart.ignoreHiddenSeries||(t.stackKey=t.type+Xt(t.options.stack,""))})},showResetZoom:function(){var t=this,e=H.lang,i=t.options.chart.resetZoomButton,n=i.theme,o=n.states,r="chart"===i.relativeTo?null:"plotBox";this.resetZoomButton=t.renderer.button(e.resetZoom,null,null,function(){t.zoomOut()},n,o&&o.hover).attr({align:i.position.align,title:e.resetZoomTitle}).add().align(i.position,!1,r)},zoomOut:function(){var t=this;ue(t,"selection",{resetSelection:!0},function(){t.zoom()})},zoom:function(t){var n,e,i=this,o=i.pointer,r=!1;!t||t.resetSelection?ae(i.axes,function(t){n=t.zoom()}):ae(t.xAxis.concat(t.yAxis),function(t){var e=t.axis,i=e.isXAxis;(o[i?"zoomX":"zoomY"]||o[i?"pinchX":"pinchY"])&&(n=e.zoom(t.min,t.max),e.displayBtn&&(r=!0))}),e=i.resetZoomButton,r&&!e?i.showResetZoom():!r&&Ct(e)&&(i.resetZoomButton=e.destroy()),n&&i.redraw(Xt(i.options.chart.animation,t&&t.animation,i.pointCount<100))},pan:function(l,t){var h,c=this,e=c.hoverPoints;e&&ae(e,function(t){t.setState()}),ae("xy"===t?[1,0]:[1],function(t){var e=l[t?"chartX":"chartY"],i=c[t?"xAxis":"yAxis"][0],n=c[t?"mouseDownX":"mouseDownY"],o=(i.pointRange||0)/2,r=i.getExtremes(),s=i.toValue(n-e,!0)+o,a=i.toValue(n+c[t?"plotWidth":"plotHeight"]-e,!0)-o;i.series.length&&s>R(r.dataMin,r.min)&&a<F(r.dataMax,r.max)&&(i.setExtremes(s,a,!1,!1,{trigger:"pan"}),h=!0),c[t?"mouseDownX":"mouseDownY"]=e}),h&&c.redraw(!1),Wt(c.container,{cursor:"move"})},setTitle:function(t,e){var i,n,r=this,o=r.options;i=o.title=Pt(o.title,t),n=o.subtitle=Pt(o.subtitle,e),ae([["title",t,i],["subtitle",e,n]],function(t){var e=t[0],i=r[e],n=t[1],o=t[2];i&&n&&(r[e]=i=i.destroy()),o&&o.text&&!i&&(r[e]=r.renderer.text(o.text,0,0,o.useHTML).attr({align:o.align,class:rt+e,zIndex:o.zIndex||4}).css(o.style).add())}),r.layOutTitles()},layOutTitles:function(){var t=0,e=this.title,i=this.subtitle,n=this.options,o=n.title,r=n.subtitle,s=this.spacingBox.width-44;e&&(e.css({width:(o.width||s)+at}).align(St({y:15},o),!1,"spacingBox"),o.floating||o.verticalAlign||18<=(t=e.getBBox().height)&&t<=25&&(t=15)),i&&(i.css({width:(r.width||s)+at}).align(St({y:t+o.margin},r),!1,"spacingBox"),r.floating||r.verticalAlign||(t=B(t+i.getBBox().height))),this.titleOffset=t},getChartSize:function(){var t=this,e=t.options.chart,i=t.renderToClone||t.renderTo;t.containerWidth=oe(i,"width"),t.containerHeight=oe(i,"height"),t.chartWidth=F(0,e.width||t.containerWidth||600),t.chartHeight=F(0,Xt(e.height,19<t.containerHeight?t.containerHeight:400))},cloneRenderTo:function(t){var e=this.renderToClone,i=this.container;t?e&&(this.renderTo.appendChild(i),Jt(e),delete this.renderToClone):(i&&i.parentNode===this.renderTo&&this.renderTo.removeChild(i),this.renderToClone=e=this.renderTo.cloneNode(0),Wt(e,{position:l,top:"-9999px",display:"block"}),I.body.appendChild(e),i&&e.appendChild(i))},getContainer:function(){var t,e,i,n,o,r,s=this,a=s.options.chart,l="data-highcharts-chart";s.renderTo=n=a.renderTo,r=rt+J++,Lt(n)&&(s.renderTo=n=I.getElementById(n)),n||Qt(13,!0),o=At(Rt(n,l)),!isNaN(o)&&Q[o]&&Q[o].destroy(),Rt(n,l,s.index),n.innerHTML="",n.offsetWidth||s.cloneRenderTo(),s.getChartSize(),e=s.chartWidth,i=s.chartHeight,s.container=t=Yt(it,{className:rt+"container"+(a.className?" "+a.className:""),id:r},St({position:nt,overflow:ot,width:e+at,height:i+at,textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},a.style),s.renderToClone||n),s._cursor=t.style.cursor,s.renderer=a.forExport?new Te(t,e,i,!0):new h(t,e,i),f&&s.renderer.create(s,t,e,i)},getMargins:function(){var t,e=this,i=e.spacing,n=e.legend,o=e.margin,r=e.options.legend,s=Xt(r.margin,10),a=r.x,l=r.y,h=r.align,c=r.verticalAlign,d=e.titleOffset;e.resetMargins(),t=e.axisOffset,d&&!Ot(o[0])&&(e.plotTop=F(e.plotTop,d+e.options.title.margin+i[0])),n.display&&!r.floating&&("right"===h?Ot(o[1])||(e.marginRight=F(e.marginRight,n.legendWidth-a+s+i[1])):"left"===h?Ot(o[3])||(e.plotLeft=F(e.plotLeft,n.legendWidth+a+s+i[3])):"top"===c?Ot(o[0])||(e.plotTop=F(e.plotTop,n.legendHeight+l+s+i[0])):"bottom"===c&&(Ot(o[2])||(e.marginBottom=F(e.marginBottom,n.legendHeight-l+s+i[2])))),e.extraBottomMargin&&(e.marginBottom+=e.extraBottomMargin),e.extraTopMargin&&(e.plotTop+=e.extraTopMargin),e.hasCartesianSeries&&ae(e.axes,function(t){t.getOffset()}),Ot(o[3])||(e.plotLeft+=t[3]),Ot(o[0])||(e.plotTop+=t[0]),Ot(o[2])||(e.marginBottom+=t[2]),Ot(o[1])||(e.marginRight+=t[1]),e.setChartSize()},initReflow:function(){var o,r=this,s=r.options.chart,a=r.renderTo;function t(t){var e=s.width||oe(a,"width"),i=s.height||oe(a,"height"),n=t?t.target:d;r.hasUserSize||!e||!i||n!==d&&n!==I||(e===r.containerWidth&&i===r.containerHeight||(clearTimeout(o),r.reflowTimeout=o=setTimeout(function(){r.container&&(r.setSize(e,i,!1),r.hasUserSize=null)},100)),r.containerWidth=e,r.containerHeight=i)}r.reflow=t,de(d,"resize",t),de(r,"destroy",function(){pe(d,"resize",t)})},setSize:function(t,e,i){var n,o,r,s=this;s.isResizing+=1,r=function(){s&&ue(s,"endResize",null,function(){--s.isResizing})},ee(i,s),s.oldChartHeight=s.chartHeight,s.oldChartWidth=s.chartWidth,Ot(t)&&(s.chartWidth=n=F(0,N(t)),s.hasUserSize=!!n),Ot(e)&&(s.chartHeight=o=F(0,N(e))),Wt(s.container,{width:n+at,height:o+at}),s.setChartSize(!0),s.renderer.setSize(n,o,i),s.maxTicks=null,ae(s.axes,function(t){t.isDirty=!0,t.setScale()}),ae(s.series,function(t){t.isDirty=!0}),s.isDirtyLegend=!0,s.isDirtyBox=!0,s.getMargins(),s.redraw(i),s.oldChartHeight=null,ue(s,"resize"),!1===A?r():setTimeout(r,A&&A.duration||500)},setChartSize:function(t){var e,i,n,o,r,s,a,l=this,h=l.inverted,c=l.renderer,d=l.chartWidth,p=l.chartHeight,u=l.options.chart,f=l.spacing,g=l.clipOffset;l.plotLeft=n=N(l.plotLeft),l.plotTop=o=N(l.plotTop),l.plotWidth=r=F(0,N(d-n-l.marginRight)),l.plotHeight=s=F(0,N(p-o-l.marginBottom)),l.plotSizeX=h?s:r,l.plotSizeY=h?r:s,l.plotBorderWidth=u.plotBorderWidth||0,l.spacingBox=c.spacingBox={x:f[3],y:f[0],width:d-f[3]-f[1],height:p-f[0]-f[2]},l.plotBox=c.plotBox={x:n,y:o,width:r,height:s},a=2*z(l.plotBorderWidth/2),e=B(F(a,g[3])/2),i=B(F(a,g[0])/2),l.clipBox={x:e,y:i,width:z(l.plotSizeX-F(a,g[1])/2-e),height:z(l.plotSizeY-F(a,g[2])/2-i)},t||ae(l.axes,function(t){t.setAxisSize(),t.setAxisTranslation()})},resetMargins:function(){var t=this,e=t.spacing,i=t.margin;t.plotTop=Xt(i[0],e[0]),t.marginRight=Xt(i[1],e[1]),t.marginBottom=Xt(i[2],e[2]),t.plotLeft=Xt(i[3],e[3]),t.axisOffset=[0,0,0,0],t.clipOffset=[0,0,0,0]},drawChartBox:function(){var t,e,i=this,n=i.options.chart,o=i.renderer,r=i.chartWidth,s=i.chartHeight,a=i.chartBackground,l=i.plotBackground,h=i.plotBorder,c=i.plotBGImage,d=n.borderWidth||0,p=n.backgroundColor,u=n.plotBackgroundColor,f=n.plotBackgroundImage,g=n.plotBorderWidth||0,m=i.plotLeft,y=i.plotTop,x=i.plotWidth,v=i.plotHeight,b=i.plotBox,k=i.clipRect,w=i.clipBox;t=d+(n.shadow?8:0),(d||p)&&(a?a.animate(a.crisp(null,null,null,r-t,s-t)):(e={fill:p||lt},d&&(e.stroke=n.borderColor,e["stroke-width"]=d),i.chartBackground=o.rect(t/2,t/2,r-t,s-t,n.borderRadius,d).attr(e).add().shadow(n.shadow))),u&&(l?l.animate(b):i.plotBackground=o.rect(m,y,x,v,0).attr({fill:u}).add().shadow(n.plotShadow)),f&&(c?c.animate(b):i.plotBGImage=o.image(f,m,y,x,v).add()),k?k.animate({width:w.width,height:w.height}):i.clipRect=o.clipRect(w),g&&(h?h.animate(h.crisp(null,m,y,x,v)):i.plotBorder=o.rect(m,y,x,v,0,-g).attr({stroke:n.plotBorderColor,"stroke-width":g,zIndex:1}).add()),i.isDirtyBox=!1},propFromSeries:function(){var e,i,n,o=this,r=o.options.chart,s=o.options.series;ae(["inverted","angular","polar"],function(t){for(e=Tt[r.type||r.defaultSeriesType],n=o[t]||r[t]||e&&e.prototype[t],i=s&&s.length;!n&&i--;)(e=Tt[s[i].type])&&e.prototype[t]&&(n=!0);o[t]=n})},linkSeries:function(){var i=this,t=i.series;ae(t,function(t){t.linkedSeries.length=0}),ae(t,function(t){var e=t.options.linkedTo;Lt(e)&&(e=":previous"===e?i.series[t.index-1]:i.get(e))&&(e.linkedSeries.push(t),t.linkedParent=e)})},render:function(){var t,o=this,e=o.axes,r=o.renderer,i=o.options,s=i.labels,n=i.credits;o.setTitle(),o.legend=new Xe(o,i.legend),o.getStacks(),ae(e,function(t){t.setScale()}),o.getMargins(),o.maxTicks=null,ae(e,function(t){t.setTickPositions(!0),t.setMaxTicks()}),o.adjustTickAmounts(),o.getMargins(),o.drawChartBox(),o.hasCartesianSeries&&ae(e,function(t){t.render()}),o.seriesGroup||(o.seriesGroup=r.g("series-group").attr({zIndex:3}).add()),ae(o.series,function(t){t.translate(),t.setTooltipPoints(),t.render()}),s.items&&ae(s.items,function(t){var e=St(s.style,t.style),i=At(e.left)+o.plotLeft,n=At(e.top)+o.plotTop+12;delete e.left,delete e.top,r.text(t.html,i,n).attr({zIndex:2}).css(e).add()}),n.enabled&&!o.credits&&(t=n.href,o.credits=r.text(n.text,0,0).on("click",function(){t&&(location.href=t)}).attr({align:n.position.align,zIndex:8}).css(n.style).add().align(n.position)),o.hasRendered=!0},destroy:function(){var t,i=this,e=i.axes,n=i.series,o=i.container,r=o&&o.parentNode;for(ue(i,"destroy"),Q[i.index]=O,i.renderTo.removeAttribute("data-highcharts-chart"),pe(i),t=e.length;t--;)e[t]=e[t].destroy();for(t=n.length;t--;)n[t]=n[t].destroy();for(t in ae(["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","pointer","scroller","rangeSelector","legend","resetZoomButton","tooltip","renderer"],function(t){var e=i[t];e&&e.destroy&&(i[t]=e.destroy())}),o&&(o.innerHTML="",pe(o),r&&Jt(o)),i)delete i[t]},isReadyToRender:function(){var t=this;return!(!K&&d==d.top&&"complete"!==I.readyState||f&&!d.canvg)||(f?Le.push(function(){t.firstRender()},t.options.global.canvasToolsURL):I.attachEvent("onreadystatechange",function(){I.detachEvent("onreadystatechange",t.firstRender),"complete"===I.readyState&&t.firstRender()}),!1)},firstRender:function(){var e=this,t=e.options,i=e.callback;e.isReadyToRender()&&(e.getContainer(),ue(e,"init"),e.resetMargins(),e.setChartSize(),e.propFromSeries(),e.getAxes(),ae(t.series||[],function(t){e.initSeries(t)}),e.linkSeries(),ue(e,"beforeRender"),e.pointer=new He(e,t),e.render(),e.renderer.draw(),i&&i.apply(e,[e]),ae(e.callbacks,function(t){t.apply(e,[e])}),e.cloneRenderTo(!0),ue(e,"load"))},splashArray:function(t,e){var i=e[t],n=Ct(i)?i:[i,i,i,i];return[Xt(e[t+"Top"],n[0]),Xt(e[t+"Right"],n[1]),Xt(e[t+"Bottom"],n[2]),Xt(e[t+"Left"],n[3])]}}).callbacks=[];function Ye(){}Ye.prototype={init:function(t,e,i){var n,o=this;return o.series=t,o.applyOptions(e,i),o.pointAttr={},t.options.colorByPoint&&(n=t.options.colors||t.chart.options.colors,o.color=o.color||n[t.colorCounter++],t.colorCounter===n.length&&(t.colorCounter=0)),t.chart.pointCount++,o},applyOptions:function(t,e){var i=this,n=i.series,o=n.pointValKey;return St(i,t=Ye.prototype.optionsToObject.call(this,t)),i.options=i.options?St(i.options,t):t,o&&(i.y=i[o]),i.x===O&&n&&(i.x=e===O?n.autoIncrement():e),i},optionsToObject:function(t){var e,i,n=this.series,o=n.pointArrayMap||["y"],r=o.length,s=0,a=0;if("number"==typeof t||null===t)e={y:t};else if(Mt(t))for(e={},t.length>r&&("string"==(i=typeof t[0])?e.name=t[0]:"number"==i&&(e.x=t[0]),s++);a<r;)e[o[a++]]=t[s++];else"object"==typeof t&&((e=t).dataLabels&&(n._hasPointLabels=!0),t.marker&&(n._hasPointMarkers=!0));return e},destroy:function(){var t,e=this,i=e.series.chart,n=i.hoverPoints;for(t in i.pointCount--,n&&(e.setState(),Bt(n,e),n.length||(i.hoverPoints=null)),e===i.hoverPoint&&e.onMouseOut(),(e.graphic||e.dataLabel)&&(pe(e),e.destroyElements()),e.legendItem&&i.legend.destroyItem(e),e)e[t]=null},destroyElements:function(){for(var t,e=["graphic","dataLabel","dataLabelUpper","group","connector","shadowGroup"],i=6;i--;)this[t=e[i]]&&(this[t]=this[t].destroy())},getLabelConfig:function(){var t=this;return{x:t.category,y:t.y,key:t.name||t.category,series:t.series,point:t,percentage:t.percentage,total:t.total||t.stackTotal}},select:function(t,e){var i=this,n=i.series,o=n.chart;t=Xt(t,!i.selected),i.firePointEvent(t?"select":"unselect",{accumulate:e},function(){i.selected=i.options.selected=t,n.options.data[se(i,n.data)]=i.options,i.setState(t&&ft),e||ae(o.getSelectedPoints(),function(t){t.selected&&t!==i&&(t.selected=t.options.selected=!1,n.options.data[se(t,n.data)]=t.options,t.setState(pt),t.firePointEvent("unselect"))})})},onMouseOver:function(t){var e=this,i=e.series,n=i.chart,o=n.tooltip,r=n.hoverPoint;r&&r!==e&&r.onMouseOut(),e.firePointEvent("mouseOver"),!o||o.shared&&!i.noSharedTooltip||o.refresh(e,t),e.setState(ut),n.hoverPoint=e},onMouseOut:function(){var t=this.series.chart,e=t.hoverPoints;e&&-1!==se(this,e)||(this.firePointEvent("mouseOut"),this.setState(),t.hoverPoint=null)},tooltipFormatter:function(e){var t=this.series,i=t.tooltipOptions,n=Xt(i.valueDecimals,""),o=i.valuePrefix||"",r=i.valueSuffix||"";return ae(t.pointArrayMap||["y"],function(t){t="{point."+t,(o||r)&&(e=e.replace(t+"}",o+t+"}"+r)),e=e.replace(t+"}",t+":,."+n+"f}")}),Ft(e,{point:this,series:this.series})},update:function(t,e,i){var n,o=this,r=o.series,s=o.graphic,a=r.data,l=r.chart,h=r.options;e=Xt(e,!0),o.firePointEvent("update",{options:t},function(){o.applyOptions(t),Ct(t)&&(r.getAttribs(),s&&(t.marker&&t.marker.symbol?o.graphic=s.destroy():s.attr(o.pointAttr[o.state||""]))),n=se(o,a),r.xData[n]=o.x,r.yData[n]=r.toYData?r.toYData(o):o.y,r.zData[n]=o.z,h.data[n]=o.options,r.isDirty=r.isDirtyData=!0,!r.fixedBox&&r.hasCartesianSeries&&(l.isDirtyBox=!0),"point"===h.legendType&&l.legend.destroyItem(o),e&&l.redraw(i)})},remove:function(t,e){var i,n=this,o=n.series,r=o.points,s=o.chart,a=o.data;ee(e,s),t=Xt(t,!0),n.firePointEvent("remove",null,function(){i=se(n,a),a.length===r.length&&r.splice(i,1),a.splice(i,1),o.options.data.splice(i,1),o.xData.splice(i,1),o.yData.splice(i,1),o.zData.splice(i,1),n.destroy(),o.isDirty=!0,o.isDirtyData=!0,t&&s.redraw()})},firePointEvent:function(t,e,i){var n=this,o=this.series.options;(o.point.events[t]||n.options&&n.options.events&&n.options.events[t])&&this.importEvents(),"click"===t&&o.allowPointSelect&&(i=function(t){n.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),ue(this,t,e,i)},importEvents:function(){if(!this.hasImportedEvents){var t,e=Pt(this.series.options.point,this.options).events;for(t in this.events=e)de(this,t,e[t]);this.hasImportedEvents=!0}},setState:function(t){var e,i,n=this,o=n.plotX,r=n.plotY,s=n.series,a=s.options.states,l=xe[s.type].marker&&s.options.marker,h=l&&!l.enabled,c=l&&l.states[t],d=c&&!1===c.enabled,p=s.stateMarkerGraphic,u=n.marker||{},f=s.chart,g=n.pointAttr;(t=t||pt)===n.state||n.selected&&t!==ft||a[t]&&!1===a[t].enabled||t&&(d||h&&!c.enabled)||(n.graphic?(e=l&&n.graphic.symbolName&&g[t].r,n.graphic.attr(Pt(g[t],e?{x:o-e,y:r-e,width:2*e,height:2*e}:{}))):(t&&c&&(e=c.radius,i=u.symbol||s.symbol,p&&p.currentSymbol!==i&&(p=p.destroy()),p?p.attr({x:o-e,y:r-e}):(s.stateMarkerGraphic=p=f.renderer.symbol(i,o-e,r-e,2*e,2*e).attr(g[t]).add(s.markerGroup),p.currentSymbol=i)),p&&p[t&&f.isInsidePlot(o,r)?"show":"hide"]()),n.state=t)}};function Ee(){}Ee.prototype={isCartesian:!0,type:"line",pointClass:Ye,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},colorCounter:0,init:function(t,e){var i,n,o=this,r=t.series;for(i in o.chart=t,o.options=e=o.setOptions(e),o.linkedSeries=[],o.bindAxes(),St(o,{name:e.name,state:pt,pointAttr:{},visible:!1!==e.visible,selected:!0===e.selected}),f&&(e.animation=!1),n=e.events)de(o,i,n[i]);(n&&n.click||e.point&&e.point.events&&e.point.events.click||e.allowPointSelect)&&(t.runTrackerClick=!0),o.getColor(),o.getSymbol(),o.setData(e.data,!1),o.isCartesian&&(t.hasCartesianSeries=!0),r.push(o),o._i=r.length-1,Kt(r,function(t,e){return Xt(t.options.index,t._i)-Xt(e.options.index,t._i)}),ae(r,function(t,e){t.index=e,t.name=t.name||"Series "+(e+1)})},bindAxes:function(){var i,n=this,o=n.options,t=n.chart;n.isCartesian&&ae(["xAxis","yAxis"],function(e){ae(t[e],function(t){i=t.options,(o[e]===i.index||o[e]!==O&&o[e]===i.id||o[e]===O&&0===i.index)&&(t.series.push(n),(n[e]=t).isDirty=!0)}),n[e]||Qt(18,!0)})},autoIncrement:function(){var t=this,e=t.options,i=t.xIncrement;return i=Xt(i,e.pointStart,0),t.pointInterval=Xt(t.pointInterval,e.pointInterval,1),t.xIncrement=i+t.pointInterval,i},getSegments:function(){var t,i=-1,n=[],o=this.points,r=o.length;if(r)if(this.options.connectNulls){for(t=r;t--;)null===o[t].y&&o.splice(t,1);o.length&&(n=[o])}else ae(o,function(t,e){null===t.y?(i+1<e&&n.push(o.slice(i+1,e)),i=e):e===r-1&&n.push(o.slice(i+1,e+1))});this.segments=n},setOptions:function(t){var e,i=this.chart.options,n=i.plotOptions,o=n[this.type];return this.userOptions=t,e=Pt(o,n.series,t),this.tooltipOptions=Pt(i.tooltip,e.tooltip),null===o.marker&&delete e.marker,e},getColor:function(){var t,e=this.options,i=this.userOptions,n=this.chart.options.colors,o=this.chart.counters;(t=e.color||xe[this.type].color)||e.colorByPoint||(t=n[Ot(i._colorIndex)?i._colorIndex:(i._colorIndex=o.color,o.color++)]),this.color=t,o.wrapColor(n.length)},getSymbol:function(){var t,e=this,i=e.userOptions,n=e.options.marker,o=e.chart,r=o.options.symbols,s=o.counters;e.symbol=n.symbol,e.symbol||(t=Ot(i._symbolIndex)?i._symbolIndex:(i._symbolIndex=s.symbol,s.symbol++),e.symbol=r[t]),/^url/.test(e.symbol)&&(n.radius=0),s.wrapSymbol(r.length)},drawLegendSymbol:function(t){var e,i,n,o=this.options,r=o.marker,s=t.options,a=s.symbolWidth,l=this.chart.renderer,h=this.legendGroup,c=t.baseline-N(.3*l.fontMetrics(s.itemStyle.fontSize).b);o.lineWidth&&(n={"stroke-width":o.lineWidth},o.dashStyle&&(n.dashstyle=o.dashStyle),this.legendLine=l.path([ht,0,c,ct,a,c]).attr(n).add(h)),r&&r.enabled&&(e=r.radius,this.legendSymbol=i=l.symbol(this.symbol,a/2-e,c-e,2*e,2*e).add(h),i.isMarker=!0)},addPoint:function(t,e,i,n){var o,r,s,a,l=this,h=l.options,c=l.data,d=l.graph,p=l.area,u=l.chart,f=l.xData,g=l.yData,m=l.zData,y=l.names,x=d&&d.shift||0,v=h.data;if(ee(n,u),i&&ae([d,p,l.graphNeg,l.areaNeg],function(t){t&&(t.shift=x+1)}),p&&(p.isArea=!0),e=Xt(e,!0),o={series:l},l.pointClass.prototype.applyOptions.apply(o,[t]),s=o.x,a=f.length,l.requireSorting&&s<f[a-1])for(r=!0;a&&f[a-1]>s;)a--;f.splice(a,0,s),g.splice(a,0,l.toYData?l.toYData(o):o.y),m.splice(a,0,o.z),y&&(y[s]=o.name),v.splice(a,0,t),r&&(l.data.splice(a,0,null),l.processData()),"point"===h.legendType&&l.generatePoints(),i&&(c[0]&&c[0].remove?c[0].remove(!1):(c.shift(),f.shift(),g.shift(),m.shift(),v.shift())),l.isDirty=!0,l.isDirtyData=!0,e&&(l.getAttribs(),u.redraw())},setData:function(t,e){var i,n=this,o=n.points,r=n.options,s=n.chart,a=null,l=n.xAxis,h=l&&l.categories&&!l.categories.length?[]:null;n.xIncrement=null,n.pointRange=l&&l.categories?1:r.pointRange,n.colorCounter=0;var c,d=[],p=[],u=[],f=t?t.length:[],g=Xt(r.turboThreshold,1e3),m=n.pointArrayMap,y=m&&m.length,x=!!n.toYData;if(g&&g<f){for(i=0;null===a&&i<f;)a=t[i],i++;if(Dt(a)){var v=Xt(r.pointStart,0),b=Xt(r.pointInterval,1);for(i=0;i<f;i++)d[i]=v,p[i]=t[i],v+=b;n.xIncrement=v}else if(Mt(a))if(y)for(i=0;i<f;i++)c=t[i],d[i]=c[0],p[i]=c.slice(1,y+1);else for(i=0;i<f;i++)c=t[i],d[i]=c[0],p[i]=c[1];else Qt(12)}else for(i=0;i<f;i++)t[i]!==O&&(c={series:n},n.pointClass.prototype.applyOptions.apply(c,[t[i]]),d[i]=c.x,p[i]=x?n.toYData(c):c.y,u[i]=c.z,h&&c.name&&(h[c.x]=c.name));for(Lt(p[0])&&Qt(14,!0),n.data=[],n.options.data=t,n.xData=d,n.yData=p,n.zData=u,n.names=h,i=o&&o.length||0;i--;)o[i]&&o[i].destroy&&o[i].destroy();l&&(l.minRange=l.userMinRange),n.isDirty=n.isDirtyData=s.isDirtyBox=!0,Xt(e,!0)&&s.redraw(!1)},remove:function(t,e){var i=this,n=i.chart;t=Xt(t,!0),i.isRemoving||(i.isRemoving=!0,ue(i,"remove",null,function(){i.destroy(),n.isDirtyLegend=n.isDirtyBox=!0,n.linkSeries(),t&&n.redraw(e)})),i.isRemoving=!1},processData:function(t){var e,i,n,o,r,s=this,a=s.xData,l=s.yData,h=a.length,c=0,d=s.xAxis,p=s.options,u=p.cropThreshold,f=s.isCartesian;if(f&&!s.isDirty&&!d.isDirty&&!s.yAxis.isDirty&&!t)return!1;if(f&&s.sorted&&(!u||u<h||s.forceCrop)){var g=d.min,m=d.max;a[h-1]<g||a[0]>m?(a=[],l=[]):(a[0]<g||a[h-1]>m)&&(a=(e=this.cropData(s.xData,s.yData,g,m)).xData,l=e.yData,c=e.start,i=!0)}for(r=a.length-1;0<=r;r--)0<(n=a[r]-a[r-1])&&(o===O||n<o)?o=n:n<0&&s.requireSorting&&Qt(15);s.cropped=i,s.cropStart=c,s.processedXData=a,s.processedYData=l,null===p.pointRange&&(s.pointRange=o||1),s.closestPointRange=o},cropData:function(t,e,i,n){var o,r=t.length,s=0,a=r,l=Xt(this.cropShoulder,1);for(o=0;o<r;o++)if(t[o]>=i){s=F(0,o-l);break}for(;o<r;o++)if(t[o]>n){a=o+l;break}return{xData:t.slice(s,a),yData:e.slice(s,a),start:s,end:a}},generatePoints:function(){var t,e,i,n,o=this,r=o.options.data,s=o.data,a=o.processedXData,l=o.processedYData,h=o.pointClass,c=a.length,d=o.cropStart||0,p=o.hasGroupedData,u=[];if(!s&&!p){var f=[];f.length=r.length,s=o.data=f}for(n=0;n<c;n++)e=d+n,p?u[n]=(new h).init(o,[a[n]].concat(Ht(l[n]))):(s[e]?i=s[e]:r[e]!==O&&(s[e]=i=(new h).init(o,r[e],a[n])),u[n]=i);if(s&&(c!==(t=s.length)||p))for(n=0;n<t;n++)n!==d||p||(n+=c),s[n]&&(s[n].destroyElements(),s[n].plotX=O);o.data=s,o.points=u},setStackedPoints:function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var t,e,i,n,o,r,s,a=this,l=a.processedXData,h=a.processedYData,c=[],d=h.length,p=a.options,u=p.threshold,f=p.stack,g=p.stacking,m=a.stackKey,y="-"+m,x=a.negStacks,v=a.yAxis,b=v.stacks,k=v.oldStacks;for(o=0;o<d;o++)r=l[o],s=h[o],b[n=(t=x&&s<u)?y:m]||(b[n]={}),b[n][r]||(k[n]&&k[n][r]?(b[n][r]=k[n][r],b[n][r].total=null):b[n][r]=new Be(v,v.options.stackLabels,t,r,f,g)),(e=b[n][r]).points[a.index]=[e.cum||0],"percent"===g?(i=t?m:y,x&&b[i]&&b[i][r]?(i=b[i][r],e.total=i.total=F(i.total,e.total)+V(s)||0):e.total+=V(s)||0):e.total+=s||0,e.cum=(e.cum||0)+(s||0),e.points[a.index].push(e.cum),c[o]=e.cum;"percent"===g&&(v.usePercentage=!0),this.stackedYData=c,v.oldStacks={}}},setPercentStacks:function(){var s=this,t=s.stackKey,a=s.yAxis.stacks;ae([t,"-"+t],function(t){for(var e,i,n,o,r=s.xData.length;r--;)e=s.xData[r],(n=(i=a[t]&&a[t][e])&&i.points[s.index])&&(o=i.total?100/i.total:0,n[0]=te(n[0]*o),n[1]=te(n[1]*o),s.stackedYData[r]=n[1])})},getExtremes:function(){var t,e,i,n,o,r,s=this.xAxis,a=this.yAxis,l=this.processedXData,h=this.stackedYData||this.processedYData,c=h.length,d=[],p=0,u=s.getExtremes(),f=u.min,g=u.max;for(o=0;o<c;o++)if(i=l[o],t=null!==(n=h[o])&&n!==O&&(!a.isLog||n.length||0<n),e=this.getExtremesFromAll||this.cropped||(l[o+1]||i)>=f&&(l[o-1]||i)<=g,t&&e)if(r=n.length)for(;r--;)null!==n[r]&&(d[p++]=n[r]);else d[p++]=n;this.dataMin=Xt(void 0,$t(d)),this.dataMax=Xt(void 0,qt(d))},translate:function(){this.processedXData||this.processData(),this.generatePoints();var t,e=this,i=e.options,n=i.stacking,o=e.xAxis,r=o.categories,s=e.yAxis,a=e.points,l=a.length,h=!!e.modifyValue,c=i.pointPlacement,d="between"===c||Dt(c),p=i.threshold;for(t=0;t<l;t++){var u,f,g=a[t],m=g.x,y=g.y,x=g.low,v=s.stacks[(e.negStacks&&y<p?"-":"")+e.stackKey];s.isLog&&y<=0&&(g.y=y=null),g.plotX=o.translate(m,0,0,0,1,c,"flags"===this.type),n&&e.visible&&v&&v[m]&&(x=(f=(u=v[m]).points[e.index])[0],y=f[1],0===x&&(x=Xt(p,s.min)),s.isLog&&x<=0&&(x=null),g.percentage="percent"===n&&y,g.total=g.stackTotal=u.total,g.stackY=y,u.setOffset(e.pointXOffset||0,e.barW||0)),g.yBottom=Ot(x)?s.translate(x,0,1,0,1):null,h&&(y=e.modifyValue(y,g)),g.plotY="number"==typeof y&&y!==1/0?s.translate(y,0,1,0,1):O,g.clientX=d?o.translate(m,0,0,0,1):g.plotX,g.negative=g.y<(p||0),g.category=r&&r[g.x]!==O?r[g.x]:g.x}e.getSegments()},setTooltipPoints:function(t){var e,i,n,o,r,s,a,l=this,h=[],c=l.xAxis,d=c&&c.getExtremes(),p=c?c.tooltipLen||c.len:l.chart.plotSizeX,u=[];if(!1!==l.options.enableMouseTracking){for(t&&(l.tooltipPoints=null),ae(l.segments||l.points,function(t){h=h.concat(t)}),c&&c.reversed&&(h=h.reverse()),l.orderTooltipPoints&&l.orderTooltipPoints(h),e=h.length,a=0;a<e;a++)if((r=(o=h[a]).x)>=d.min&&r<=d.max)for(s=h[a+1],i=n===O?0:n+1,n=h[a+1]?R(F(0,z((o.clientX+(s?s.wrappedClientX||s.clientX:p))/2)),p):p;0<=i&&i<=n;)u[i++]=o;l.tooltipPoints=u}},tooltipHeaderFormatter:function(t){var e,i=this.tooltipOptions,n=i.xDateFormat,o=i.dateTimeLabelFormats,r=this.xAxis,s=r&&"datetime"===r.options.type,a=i.headerFormat,l=r&&r.closestPointRange;if(s&&!n)if(l){for(e in y)if(y[e]>=l){n=o[e];break}}else n=o.day;return s&&n&&Dt(t.key)&&(a=a.replace("{point.key}","{point.key:"+n+"}")),Ft(a,{point:t,series:this})},onMouseOver:function(){var t=this,e=t.chart,i=e.hoverSeries;i&&i!==t&&i.onMouseOut(),t.options.events.mouseOver&&ue(t,"mouseOver"),t.setState(ut),e.hoverSeries=t},onMouseOut:function(){var t=this,e=t.options,i=t.chart,n=i.tooltip,o=i.hoverPoint;o&&o.onMouseOut(),t&&e.events.mouseOut&&ue(t,"mouseOut"),!n||e.stickyTracking||n.shared&&!t.noSharedTooltip||n.hide(),t.setState(),i.hoverSeries=null},animate:function(t){var e,i,n,o=this,r=o.chart,s=r.renderer,a=o.options.animation,l=r.clipBox,h=r.inverted;a&&!Ct(a)&&(a=xe[o.type].animation),n="_sharedClip"+a.duration+a.easing,t?(e=r[n],i=r[n+"m"],e||(r[n]=e=s.clipRect(St(l,{width:0})),r[n+"m"]=i=s.clipRect(-99,h?-r.plotLeft:-r.plotTop,99,h?r.chartWidth:r.chartHeight)),o.group.clip(e),o.markerGroup.clip(i),o.sharedClipKey=n):((e=r[n])&&(e.animate({width:r.plotSizeX},a),r[n+"m"].animate({width:r.plotSizeX+99},a)),o.animate=null,o.animationTimeout=setTimeout(function(){o.afterAnimate()},a.duration))},afterAnimate:function(){var t=this.chart,e=this.sharedClipKey,i=this.group;i&&!1!==this.options.clip&&(i.clip(t.clipRect),this.markerGroup.clip()),setTimeout(function(){e&&t[e]&&(t[e]=t[e].destroy(),t[e+"m"]=t[e+"m"].destroy())},100)},drawPoints:function(){var t,e,i,n,o,r,s,a,l,h,c,d,p=this,u=p.points,f=p.chart,g=p.options.marker,m=p.markerGroup;if(g.enabled||p._hasPointMarkers)for(n=u.length;n--;)o=u[n],e=z(o.plotX),i=o.plotY,l=o.graphic,h=o.marker||{},c=g.enabled&&h.enabled===O||h.enabled,d=f.isInsidePlot(N(e),i,f.inverted),c&&i!==O&&!isNaN(i)&&null!==o.y?(r=(t=o.pointAttr[o.selected?ft:pt]).r,a=0===(s=Xt(h.symbol,p.symbol)).indexOf("url"),l?l.attr({visibility:d?K?"inherit":st:ot}).animate(St({x:e-r,y:i-r},l.symbolName?{width:2*r,height:2*r}:{})):d&&(0<r||a)&&(o.graphic=l=f.renderer.symbol(s,e-r,i-r,2*r,2*r).attr(t).add(m))):l&&(o.graphic=l.destroy())},convertAttribs:function(t,e,i,n){var o,r,s=this.pointAttrToOptions,a={};for(o in t=t||{},e=e||{},i=i||{},n=n||{},s)r=s[o],a[o]=Xt(t[r],e[o],i[o],n[o]);return a},getAttribs:function(){var t,e,i,n,o,r,s=this,a=s.options,l=xe[s.type].marker?a.marker:a,h=l.states,c=h[ut],d=s.color,p={stroke:d,fill:d},u=s.points||[],f=[],g=s.pointAttrToOptions,m=a.negativeColor,y=l.lineColor;for(a.marker?(c.radius=c.radius||l.radius+2,c.lineWidth=c.lineWidth||l.lineWidth+1):c.color=c.color||ke(c.color||d).brighten(c.brightness).get(),f[pt]=s.convertAttribs(l,p),ae([ut,ft],function(t){f[t]=s.convertAttribs(h[t],f[pt])}),s.pointAttr=f,e=u.length;e--;){if((l=(i=u[e]).options&&i.options.marker||i.options)&&!1===l.enabled&&(l.radius=0),i.negative&&m&&(i.color=i.fillColor=m),o=a.colorByPoint||i.color,i.options)for(r in g)Ot(l[g[r]])&&(o=!0);o?(n=[],t=(h=(l=l||{}).states||{})[ut]=h[ut]||{},a.marker||(t.color=ke(t.color||i.color).brighten(t.brightness||c.brightness).get()),n[pt]=s.convertAttribs(St({color:i.color,fillColor:i.color,lineColor:null===y?i.color:O},l),f[pt]),n[ut]=s.convertAttribs(h[ut],f[ut],n[pt]),n[ft]=s.convertAttribs(h[ft],f[ft],n[pt])):n=f,i.pointAttr=n}},update:function(t,e){var i,n=this.chart,o=this.userOptions,r=this.type,s=Tt[r].prototype;for(i in t=Pt(o,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},t),this.remove(!1),s)s.hasOwnProperty(i)&&(this[i]=O);St(this,Tt[t.type||r].prototype),this.init(n,t),Xt(e,!0)&&n.redraw(!1)},destroy:function(){var e,t,i,n,o,r=this,s=r.chart,a=/AppleWebKit\/533/.test(p),l=r.data||[];for(ue(r,"destroy"),pe(r),ae(["xAxis","yAxis"],function(t){(o=r[t])&&(Bt(o.series,r),o.isDirty=o.forceRedraw=!0,o.stacks={})}),r.legendItem&&r.chart.legend.destroyItem(r),t=l.length;t--;)(i=l[t])&&i.destroy&&i.destroy();for(n in r.points=null,clearTimeout(r.animationTimeout),ae(["area","graph","dataLabelsGroup","group","markerGroup","tracker","graphNeg","areaNeg","posClip","negClip"],function(t){r[t]&&(e=a&&"group"===t?"hide":"destroy",r[t][e]())}),s.hoverSeries===r&&(s.hoverSeries=null),Bt(s.series,r),r)delete r[n]},drawDataLabels:function(){var h,c,d,p,u=this,f=u.options.dataLabels,t=u.points;(f.enabled||u._hasPointLabels)&&(u.dlProcessOptions&&u.dlProcessOptions(f),p=u.plotGroup("dataLabelsGroup","data-labels",u.visible?st:ot,f.zIndex||6),c=f,ae(t,function(t){var e,i,n,o,r,s=t.dataLabel,a=t.connector,l=!0;if(e=Xt((h=t.options&&t.options.dataLabels)&&h.enabled,c.enabled),s&&!e)t.dataLabel=s.destroy();else if(e){if(r=(f=Pt(c,h)).rotation,i=t.getLabelConfig(),d=f.format?Ft(f.format,i):f.formatter.call(i,f),f.style.color=Xt(f.color,f.style.color,u.color,"black"),s)Ot(d)?(s.attr({text:d}),l=!1):(t.dataLabel=s=s.destroy(),a&&(t.connector=a.destroy()));else if(Ot(d)){for(o in n={fill:f.backgroundColor,stroke:f.borderColor,"stroke-width":f.borderWidth,r:f.borderRadius||0,rotation:r,padding:f.padding,zIndex:1})n[o]===O&&delete n[o];s=t.dataLabel=u.chart.renderer[r?"text":"label"](d,0,-999,null,null,null,f.useHTML).attr(n).css(f.style).add(p).shadow(f.shadow)}s&&u.alignDataLabel(t,s,f,null,l)}}))},alignDataLabel:function(t,e,i,n,o){var r,s=this.chart,a=s.inverted,l=Xt(t.plotX,-999),h=Xt(t.plotY,-999),c=e.getBBox(),d=this.visible&&s.isInsidePlot(t.plotX,t.plotY,a);d&&(n=St({x:a?s.plotWidth-h:l,y:N(a?s.plotHeight-l:h),width:0,height:0},n),St(i,{width:c.width,height:c.height}),i.rotation?(r={align:i.align,x:n.x+i.x+n.width/2,y:n.y+i.y+n.height/2},e[o?"attr":"animate"](r)):(e.align(i,null,n),r=e.alignAttr,"justify"===Xt(i.overflow,"justify")?this.justifyDataLabel(e,i,r,c,n,o):Xt(i.crop,!0)&&(d=s.isInsidePlot(r.x,r.y)&&s.isInsidePlot(r.x+c.width,r.y+c.height)))),d||e.attr({y:-999})},justifyDataLabel:function(t,e,i,n,o,r){var s,a,l=this.chart,h=e.align,c=e.verticalAlign;(s=i.x)<0&&("right"===h?e.align="left":e.x=-s,a=!0),(s=i.x+n.width)>l.plotWidth&&("left"===h?e.align="right":e.x=l.plotWidth-s,a=!0),(s=i.y)<0&&("bottom"===c?e.verticalAlign="top":e.y=-s,a=!0),(s=i.y+n.height)>l.plotHeight&&("top"===c?e.verticalAlign="bottom":e.y=l.plotHeight-s,a=!0),a&&(t.placed=!r,t.align(e,null,o))},getSegmentPath:function(r){var s=this,a=[],l=s.options.step;return ae(r,function(t,e){var i,n=t.plotX,o=t.plotY;s.getPointSpline?a.push.apply(a,s.getPointSpline(r,t,e)):(a.push(e?ct:ht),l&&e&&(i=r[e-1],"right"===l?a.push(i.plotX,o):"center"===l?a.push((i.plotX+n)/2,i.plotY,(i.plotX+n)/2,o):a.push(n,i.plotY)),a.push(t.plotX,t.plotY))}),a},getGraphPath:function(){var e,i=this,n=[],o=[];return ae(i.segments,function(t){e=i.getSegmentPath(t),1<t.length?n=n.concat(e):o.push(t[0])}),i.singlePoints=o,i.graphPath=n},drawGraph:function(){var r=this,s=this.options,t=[["graph",s.lineColor||this.color]],a=s.lineWidth,l=s.dashStyle,h=this.getGraphPath(),e=s.negativeColor;e&&t.push(["graphNeg",e]),ae(t,function(t,e){var i,n=t[0],o=r[n];o?(me(o),o.animate({d:h})):a&&h.length&&(i={stroke:t[1],"stroke-width":a,zIndex:1},l?i.dashstyle=l:i["stroke-linecap"]=i["stroke-linejoin"]="round",r[n]=r.chart.renderer.path(h).attr(i).add(r.group).shadow(!e&&s.shadow))})},clipNeg:function(){var t,e,i,n,o,r=this.options,s=this.chart,a=s.renderer,l=r.negativeColor||r.negativeFillColor,h=this.graph,c=this.area,d=this.posClip,p=this.negClip,u=s.chartWidth,f=s.chartHeight,g=F(u,f),m=this.yAxis;l&&(h||c)&&(n={x:0,y:0,width:g,height:t=N(m.toPixels(r.threshold||0,!0))},o={x:0,y:t,width:g,height:g},s.inverted&&(n.height=o.y=s.plotWidth-t,a.isVML&&(n={x:s.plotWidth-t-s.plotLeft,y:0,width:u,height:f},o={x:t+s.plotLeft-u,y:0,width:s.plotLeft+t,height:u})),i=m.reversed?(e=o,n):(e=n,o),d?(d.animate(e),p.animate(i)):(this.posClip=d=a.clipRect(e),this.negClip=p=a.clipRect(i),h&&this.graphNeg&&(h.clip(d),this.graphNeg.clip(p)),c&&(c.clip(d),this.areaNeg.clip(p))))},invertGroups:function(){var i=this,t=i.chart;function e(){var e={width:i.yAxis.len,height:i.xAxis.len};ae(["group","markerGroup"],function(t){i[t]&&i[t].attr(e).invert()})}i.xAxis&&(de(t,"resize",e),de(i,"destroy",function(){pe(t,"resize",e)}),e(),i.invertGroups=e)},plotGroup:function(t,e,i,n,o){var r=this[t],s=!r;return s&&(this[t]=r=this.chart.renderer.g(e).attr({visibility:i,zIndex:n||.1}).add(o)),r[s?"attr":"animate"](this.getPlotBox()),r},getPlotBox:function(){return{translateX:this.xAxis?this.xAxis.left:this.chart.plotLeft,translateY:this.yAxis?this.yAxis.top:this.chart.plotTop,scaleX:1,scaleY:1}},render:function(){var t,e=this,i=e.chart,n=e.options,o=n.animation&&!!e.animate&&i.renderer.isSVG,r=e.visible?st:ot,s=n.zIndex,a=e.hasRendered,l=i.seriesGroup;t=e.plotGroup("group","series",r,s,l),e.markerGroup=e.plotGroup("markerGroup","markers",r,s,l),o&&e.animate(!0),e.getAttribs(),t.inverted=!!e.isCartesian&&i.inverted,e.drawGraph&&(e.drawGraph(),e.clipNeg()),e.drawDataLabels(),e.drawPoints(),!1!==e.options.enableMouseTracking&&e.drawTracker(),i.inverted&&e.invertGroups(),!1===n.clip||e.sharedClipKey||a||t.clip(i.clipRect),o?e.animate():a||e.afterAnimate(),e.isDirty=e.isDirtyData=!1,e.hasRendered=!0},redraw:function(){var t=this,e=t.chart,i=t.isDirtyData,n=t.group,o=t.xAxis,r=t.yAxis;n&&(e.inverted&&n.attr({width:e.plotWidth,height:e.plotHeight}),n.animate({translateX:Xt(o&&o.left,e.plotLeft),translateY:Xt(r&&r.top,e.plotTop)})),t.translate(),t.setTooltipPoints(!0),t.render(),i&&ue(t,"updatedData")},setState:function(t){var e,i=this,n=i.options,o=i.graph,r=i.graphNeg,s=n.states,a=n.lineWidth;if(t=t||pt,i.state!==t){if(s[i.state=t]&&!1===s[t].enabled)return;t&&(a=s[t].lineWidth||a+1),o&&!o.dashstyle&&(e={"stroke-width":a},o.attr(e),r&&r.attr(e))}},setVisible:function(e,t){var i,n=this,o=n.chart,r=n.legendItem,s=o.options.chart.ignoreHiddenSeries,a=n.visible;n.visible=e=n.userOptions.visible=e===O?!a:e,i=e?"show":"hide",ae(["group","dataLabelsGroup","markerGroup","tracker"],function(t){n[t]&&n[t][i]()}),o.hoverSeries===n&&n.onMouseOut(),r&&o.legend.colorizeItem(n,e),n.isDirty=!0,n.options.stacking&&ae(o.series,function(t){t.options.stacking&&t.visible&&(t.isDirty=!0)}),ae(n.linkedSeries,function(t){t.setVisible(e,!1)}),s&&(o.isDirtyBox=!0),!1!==t&&o.redraw(),ue(n,i)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(t){var e=this;e.selected=t=t===O?!e.selected:t,e.checkbox&&(e.checkbox.checked=t),ue(e,t?"select":"unselect")},drawTracker:function(){function e(){l.hoverSeries!==n&&n.onMouseOver()}var t,i,n=this,o=n.options,r=o.trackByArea,s=[].concat(r?n.areaPath:n.graphPath),a=s.length,l=n.chart,h=l.pointer,c=l.renderer,d=l.options.tooltip.snap,p=n.tracker,u=o.cursor,f=u&&{cursor:u},g=n.singlePoints;if(a&&!r)for(i=a+1;i--;)s[i]===ht&&s.splice(i+1,0,s[i+1]-d,s[i+2],ct),(i&&s[i]===ht||i===a)&&s.splice(i,0,ct,s[i-2]+d,s[i-1]);for(i=0;i<g.length;i++)t=g[i],s.push(ht,t.plotX-d,t.plotY,ct,t.plotX+d,t.plotY);p?p.attr({d:s}):(n.tracker=c.path(s).attr({"stroke-linejoin":"round",visibility:n.visible?st:ot,stroke:dt,fill:r?dt:lt,"stroke-width":o.lineWidth+(r?0:2*d),zIndex:2}).add(n.group),ae([n.tracker,n.markerGroup],function(t){t.addClass(rt+"tracker").on("mouseover",e).on("mouseout",function(t){h.onTrackerMouseOut(t)}).css(f),$&&t.on("touchstart",e)}))}};var Ge=r(Ee);Tt.line=Ge,xe.area=Pt(ve,{threshold:0});var Ne=r(Ee,{type:"area",getSegments:function(){var e,i,n,t,o,r=[],s=[],a=[],l=this.xAxis,h=this.yAxis,c=h.stacks[this.stackKey],d={},p=this.points,u=this.options.connectNulls;if(this.options.stacking&&!this.cropped){for(t=0;t<p.length;t++)d[p[t].x]=p[t];for(o in c)a.push(+o);a.sort(function(t,e){return t-e}),ae(a,function(t){(!u||d[t]&&null!==d[t].y)&&(d[t]?s.push(d[t]):(e=l.translate(t),n=c[t].percent?c[t].total?100*c[t].cum/c[t].total:0:c[t].cum,i=h.toPixels(n,!0),s.push({y:null,plotX:e,clientX:e,plotY:i,yBottom:i,onMouseOver:g})))}),s.length&&r.push(s)}else Ee.prototype.getSegments.call(this),r=this.segments;this.segments=r},getSegmentPath:function(t){var e,i,n=Ee.prototype.getSegmentPath.call(this,t),o=[].concat(n),r=this.options,s=n.length,a=this.yAxis.getThreshold(r.threshold);if(3===s&&o.push(ct,n[1],n[2]),r.stacking&&!this.closedStacks)for(e=t.length-1;0<=e;e--)i=Xt(t[e].yBottom,a),e<t.length-1&&r.step&&o.push(t[e+1].plotX,i),o.push(t[e].plotX,i);else this.closeSegment(o,t,a);return this.areaPath=this.areaPath.concat(o),n},closeSegment:function(t,e,i){t.push(ct,e[e.length-1].plotX,i,ct,e[0].plotX,i)},drawGraph:function(){this.areaPath=[],Ee.prototype.drawGraph.apply(this);var n=this,o=this.areaPath,r=this.options,t=r.negativeColor,e=r.negativeFillColor,i=[["area",this.color,r.fillColor]];(t||e)&&i.push(["areaNeg",t,e]),ae(i,function(t){var e=t[0],i=n[e];i?i.animate({d:o}):n[e]=n.chart.renderer.path(o).attr({fill:Xt(t[2],ke(t[1]).setOpacity(Xt(r.fillOpacity,.75)).get()),zIndex:0}).add(n.group)})},drawLegendSymbol:function(t,e){e.legendSymbol=this.chart.renderer.rect(0,t.baseline-11,t.options.symbolWidth,12,2).attr({zIndex:3}).add(e.legendGroup)}});Tt.area=Ne,xe.spline=Pt(ve);var Fe=r(Ee,{type:"spline",getPointSpline:function(t,e,i){var n,o,r,s,a,l=e.plotX,h=e.plotY,c=t[i-1],d=t[i+1];if(c&&d){var p,u=c.plotX,f=c.plotY,g=d.plotX,m=d.plotY;s=(1.5*h+m)/2.5,s+=p=(s-(o=(1.5*h+f)/2.5))*((r=(1.5*l+g)/2.5)-l)/(r-(n=(1.5*l+u)/2.5))+h-s,f<(o+=p)&&h<o?s=2*h-(o=F(f,h)):o<f&&o<h&&(s=2*h-(o=R(f,h))),m<s&&h<s?o=2*h-(s=F(m,h)):s<m&&s<h&&(o=2*h-(s=R(m,h))),e.rightContX=r,e.rightContY=s}return i?(a=["C",c.rightContX||c.plotX,c.rightContY||c.plotY,n||l,o||h,l,h],c.rightContX=c.rightContY=null):a=[ht,l,h],a}});Tt.spline=Fe,xe.areaspline=Pt(xe.area);var Ve=Ne.prototype,je=r(Fe,{type:"areaspline",closedStacks:!0,getSegmentPath:Ve.getSegmentPath,closeSegment:Ve.closeSegment,drawGraph:Ve.drawGraph,drawLegendSymbol:Ve.drawLegendSymbol});Tt.areaspline=je,xe.column=Pt(ve,{borderColor:"#FFFFFF",borderWidth:1,borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:.1,shadow:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},stickyTracking:!1,threshold:0});var _e=r(Ee,{type:"column",pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},cropShoulder:0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){Ee.prototype.init.apply(this,arguments);var e=this,t=e.chart;t.hasRendered&&ae(t.series,function(t){t.type===e.type&&(t.isDirty=!0)})},getColumnMetrics:function(){var n,o,r=this,t=r.options,e=r.xAxis,s=r.yAxis,i=e.reversed,a={},l=0;!1===t.grouping?l=1:ae(r.chart.series,function(t){var e=t.options,i=t.yAxis;t.type===r.type&&t.visible&&s.len===i.len&&s.pos===i.pos&&(e.stacking?(n=t.stackKey,a[n]===O&&(a[n]=l++),o=a[n]):!1!==e.grouping&&(o=l++),t.columnIndex=o)});var h=R(V(e.transA)*(e.ordinalSlope||t.pointRange||e.closestPointRange||1),e.len),c=h*t.groupPadding,d=(h-2*c)/l,p=t.pointWidth,u=Ot(p)?(d-p)/2:d*t.pointPadding,f=Xt(p,d-2*u),g=u+(c+((i?l-(r.columnIndex||0):r.columnIndex)||0)*d-h/2)*(i?-1:1);return r.columnMetrics={width:f,offset:g}},translate:function(){var t=this,e=t.chart,i=t.options,n=i.borderWidth,h=t.yAxis,o=i.threshold,c=t.translatedThreshold=h.getThreshold(o),d=Xt(i.minPointLength,5),r=t.getColumnMetrics(),p=r.width,u=t.barW=B(F(p,1+2*n)),f=t.pointXOffset=r.offset,g=-(n%2?.5:0),m=n%2?.5:1;e.renderer.isVML&&e.inverted&&(m+=1),Ee.prototype.translate.apply(t),ae(t.points,function(t){var e,i,n=Xt(t.yBottom,c),o=R(F(-999-n,t.plotY),h.len+999+n),r=t.plotX+f,s=u,a=R(o,n),l=F(o,n)-a;V(l)<d&&d&&(l=d,a=N(V(a-c)>d?n-d:c-(h.translate(t.y,0,1,0,1)<=c?d:0))),t.barX=r,t.pointWidth=p,i=V(r)<.5,s=N(r+s)+g-(r=N(r)+g),e=V(a)<.5,l=N(a+l)+m-(a=N(a)+m),i&&(r+=1,--s),e&&(--a,l+=1),t.shapeType="rect",t.shapeArgs={x:r,y:a,width:s,height:l}})},getSymbol:g,drawLegendSymbol:Ne.prototype.drawLegendSymbol,drawGraph:g,drawPoints:function(){var n,o=this,r=o.options,s=o.chart.renderer;ae(o.points,function(t){var e=t.plotY,i=t.graphic;e===O||isNaN(e)||null===t.y?i&&(t.graphic=i.destroy()):(n=t.shapeArgs,i?(me(i),i.animate(Pt(n))):t.graphic=i=s[t.shapeType](n).attr(t.pointAttr[t.selected?ft:pt]).add(o.group).shadow(r.shadow,null,r.stacking&&!r.borderRadius))})},drawTracker:function(){function e(t){var e,i=t.target;for(o.hoverSeries!==n&&n.onMouseOver();i&&!e;)e=i.point,i=i.parentNode;e!==O&&e!==o.hoverPoint&&e.onMouseOver(t)}var n=this,o=n.chart,i=o.pointer,t=n.options.cursor,r=t&&{cursor:t};ae(n.points,function(t){t.graphic&&(t.graphic.element.point=t),t.dataLabel&&(t.dataLabel.element.point=t)}),n._hasTracking||(ae(n.trackerGroups,function(t){n[t]&&(n[t].addClass(rt+"tracker").on("mouseover",e).on("mouseout",function(t){i.onTrackerMouseOut(t)}).css(r),$&&n[t].on("touchstart",e))}),n._hasTracking=!0)},alignDataLabel:function(t,e,i,n,o){var r=this.chart,s=r.inverted,a=t.dlBox||t.shapeArgs,l=t.below||t.plotY>Xt(this.translatedThreshold,r.plotSizeY),h=Xt(i.inside,!!this.options.stacking);a&&(n=Pt(a),s&&(n={x:r.plotWidth-n.y-n.height,y:r.plotHeight-n.x-n.width,width:n.height,height:n.width}),h||(s?(n.x+=l?0:n.width,n.width=0):(n.y+=l?n.height:0,n.height=0))),i.align=Xt(i.align,!s||h?"center":l?"right":"left"),i.verticalAlign=Xt(i.verticalAlign,s||h?"middle":l?"top":"bottom"),Ee.prototype.alignDataLabel.call(this,t,e,i,n,o)},animate:function(t){var e,i=this,n=this.yAxis,o=i.options,r=this.chart.inverted,s={};K&&(t?(s.scaleY=.001,e=R(n.pos+n.len,F(n.pos,n.toPixels(o.threshold))),r?s.translateX=e-n.len:s.translateY=e,i.group.attr(s)):(s.scaleY=1,s[r?"translateX":"translateY"]=n.pos,i.group.animate(s,i.options.animation),i.animate=null))},remove:function(){var e=this,t=e.chart;t.hasRendered&&ae(t.series,function(t){t.type===e.type&&(t.isDirty=!0)}),Ee.prototype.remove.apply(e,arguments)}});Tt.column=_e,xe.bar=Pt(xe.column);var Ue=r(_e,{type:"bar",inverted:!0});Tt.bar=Ue,xe.scatter=Pt(ve,{lineWidth:0,tooltip:{headerFormat:'<span style="font-size: 10px; color:{series.color}">{series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>",followPointer:!0},stickyTracking:!1});var Ze=r(Ee,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup"],drawTracker:_e.prototype.drawTracker,setTooltipPoints:g});Tt.scatter=Ze,xe.pie=Pt(ve,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}});var Ke={type:"pie",isCartesian:!1,pointClass:r(Ye,{init:function(){Ye.prototype.init.apply(this,arguments);var t,e=this;return e.y<0&&(e.y=null),St(e,{visible:!1!==e.visible,name:Xt(e.name,"Slice")}),t=function(t){e.slice("select"===t.type)},de(e,"select",t),de(e,"unselect",t),e},setVisible:function(t){var e,i=this,n=i.series,o=n.chart;i.visible=i.options.visible=t=t===O?!i.visible:t,n.options.data[se(i,n.data)]=i.options,e=t?"show":"hide",ae(["graphic","dataLabel","connector","shadowGroup"],function(t){i[t]&&i[t][e]()}),i.legendItem&&o.legend.colorizeItem(i,t),!n.isDirty&&n.options.ignoreHiddenPoint&&(n.isDirty=!0,o.redraw())},slice:function(t,e,i){var n,o=this,r=o.series;ee(i,r.chart),e=Xt(e,!0),o.sliced=o.options.sliced=t=Ot(t)?t:!o.sliced,r.options.data[se(o,r.data)]=o.options,n=t?o.slicedTranslation:{translateX:0,translateY:0},o.graphic.animate(n),o.shadowGroup&&o.shadowGroup.animate(n)}}),requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:g,animate:function(t){var n=this,e=n.points,o=n.startAngleRad;t||(ae(e,function(t){var e=t.graphic,i=t.shapeArgs;e&&(e.attr({r:n.center[3]/2,start:o,end:o}),e.animate({r:i.r,start:i.start,end:i.end},n.options.animation))}),n.animate=null)},setData:function(t,e){Ee.prototype.setData.call(this,t,!1),this.processData(),this.generatePoints(),Xt(e,!0)&&this.chart.redraw()},generatePoints:function(){var t,e,i,n,o=0,r=this.options.ignoreHiddenPoint;for(Ee.prototype.generatePoints.call(this),i=(e=this.points).length,t=0;t<i;t++)n=e[t],o+=r&&!n.visible?0:n.y;for(this.total=o,t=0;t<i;t++)(n=e[t]).percentage=0<o?n.y/o*100:0,n.total=o},getCenter:function(){var i,n,t=this.options,e=this.chart,o=2*(t.slicedOffset||0),r=e.plotWidth-2*o,s=e.plotHeight-2*o,a=t.center,l=[Xt(a[0],"50%"),Xt(a[1],"50%"),t.size||"100%",t.innerSize||0],h=R(r,s);return ce(l,function(t,e){return n=/%$/.test(t),i=e<2||2===e&&n,(n?[r,s,h,h][e]*At(t)/100:t)+(i?o:0)})},translate:function(i){this.generatePoints();var t,e,n,o,r,s,a,l=this,h=0,c=l.options,d=c.slicedOffset,p=d+c.borderWidth,u=c.startAngle||0,f=l.startAngleRad=E/180*(u-90),g=(l.endAngleRad=E/180*((c.endAngle||u+360)-90))-f,m=l.points,y=c.dataLabels.distance,x=c.ignoreHiddenPoint,v=m.length;for(i||(l.center=i=l.getCenter()),l.getX=function(t,e){return n=X.asin((t-i[1])/(i[2]/2+y)),i[0]+(e?-1:1)*(W(n)*(i[2]/2+y))},s=0;s<v;s++)a=m[s],t=f+h*g,x&&!a.visible||(h+=a.percentage/100),e=f+h*g,a.shapeType="arc",a.shapeArgs={x:i[0],y:i[1],r:i[2]/2,innerR:i[3]/2,start:N(1e3*t)/1e3,end:N(1e3*e)/1e3},.75*g<(n=(e+t)/2)&&(n-=2*E),a.slicedTranslation={translateX:N(W(n)*d),translateY:N(Y(n)*d)},o=W(n)*i[2]/2,r=Y(n)*i[2]/2,a.tooltipPos=[i[0]+.7*o,i[1]+.7*r],a.half=n<-E/2||E/2<n?1:0,a.angle=n,p=R(p,y/2),a.labelPos=[i[0]+o+W(n)*y,i[1]+r+Y(n)*y,i[0]+o+W(n)*p,i[1]+r+Y(n)*p,i[0]+o,i[1]+r,y<0?"center":a.half?"right":"left",n]},setTooltipPoints:g,drawGraph:null,drawPoints:function(){var e,i,n,o,r=this,s=r.chart.renderer,a=r.options.shadow;a&&!r.shadowGroup&&(r.shadowGroup=s.g("shadow").add(r.group)),ae(r.points,function(t){i=t.graphic,o=t.shapeArgs,n=t.shadowGroup,a&&!n&&(n=t.shadowGroup=s.g("shadow").add(r.shadowGroup)),e=t.sliced?t.slicedTranslation:{translateX:0,translateY:0},n&&n.attr(e),i?i.animate(St(o,e)):t.graphic=i=s.arc(o).setRadialReference(r.center).attr(t.pointAttr[t.selected?ft:pt]).attr({"stroke-linejoin":"round"}).attr(e).add(r.group).shadow(a,n),!1===t.visible&&t.setVisible(!1)})},sortByAngle:function(t,i){t.sort(function(t,e){return void 0!==t.angle&&(e.angle-t.angle)*i})},drawDataLabels:function(){function t(t,e){return e.y-t.y}var e,i,n,o,r,s,a,l,h,c,d,p,u,f=this,g=f.data,m=f.chart,y=f.options.dataLabels,x=Xt(y.connectorPadding,10),v=Xt(y.connectorWidth,1),b=m.plotWidth,k=m.plotHeight,w=Xt(y.softConnector,!0),T=y.distance,S=f.center,P=S[2]/2,A=S[1],L=0<T,C=[[],[]],M=[0,0,0,0];if(f.visible&&(y.enabled||f._hasPointLabels)){for(Ee.prototype.drawDataLabels.apply(f),ae(g,function(t){t.dataLabel&&C[t.half].push(t)}),p=0;!a&&g[p];)a=g[p]&&g[p].dataLabel&&(g[p].dataLabel.getBBox().height||21),p++;for(p=2;p--;){var D,I,z,B=[],O=[],R=C[p],H=R.length;if(f.sortByAngle(R,p-.5),0<T){for(I=A-P-T;I<=A+P+T;I+=a)B.push(I);if((D=B.length)<H){for((d=[].concat(R)).sort(t),u=H;u--;)d[u].rank=u;for(u=H;u--;)R[u].rank>=D&&R.splice(u,1);H=R.length}for(u=0;u<H;u++){e=R[u],s=e.labelPos;var X,W,Y=9999;for(W=0;W<D;W++)(X=V(B[W]-s[1]))<Y&&(Y=X,z=W);if(z<u&&null!==B[u])z=u;else if(D<H-u+z&&null!==B[u])for(z=D-H+u;null===B[z];)z++;else for(;null===B[z];)z++;O.push({i:z,y:B[z]}),B[z]=null}O.sort(t)}for(u=0;u<H;u++){var E,G;e=R[u],s=e.labelPos,o=e.dataLabel,c=!1===e.visible?ot:st,G=s[1],0<T?(z=(E=O.pop()).i,((h=E.y)<G&&null!==B[z+1]||G<h&&null!==B[z-1])&&(h=G)):h=G,l=y.justify?S[0]+(p?-1:1)*(P+T):f.getX(0===z||z===B.length-1?G:h,p),o._attr={visibility:c,align:s[6]},o._pos={x:l+y.x+({left:x,right:-x}[s[6]]||0),y:h+y.y-10},o.connX=l,o.connY=h,null===this.options.size&&(r=o.width,l-r<x?M[3]=F(N(r-l+x),M[3]):b-x<l+r&&(M[1]=F(N(l+r-b+x),M[1])),h-a/2<0?M[0]=F(N(a/2-h),M[0]):k<h+a/2&&(M[2]=F(N(h+a/2-k),M[2])))}}0!==qt(M)&&!this.verifyDataLabelOverflow(M)||(this.placeDataLabels(),L&&v&&ae(this.points,function(t){i=t.connector,s=t.labelPos,(o=t.dataLabel)&&o._pos?(c=o._attr.visibility,l=o.connX,h=o.connY,n=w?[ht,l+("left"===s[6]?5:-5),h,"C",l,h,2*s[2]-s[4],2*s[3]-s[5],s[2],s[3],ct,s[4],s[5]]:[ht,l+("left"===s[6]?5:-5),h,ct,s[2],s[3],ct,s[4],s[5]],i?(i.animate({d:n}),i.attr("visibility",c)):t.connector=i=f.chart.renderer.path(n).attr({"stroke-width":v,stroke:y.connectorColor||t.color||"#606060",visibility:c}).add(f.group)):i&&(t.connector=i.destroy())}))}},verifyDataLabelOverflow:function(t){var e,i=this.center,n=this.options,o=n.center,r=n.minSize||80,s=r;return null!==o[0]?s=F(i[2]-F(t[1],t[3]),r):(s=F(i[2]-t[1]-t[3],r),i[0]+=(t[3]-t[1])/2),null!==o[1]?s=F(R(s,i[2]-F(t[0],t[2])),r):(s=F(R(s,i[2]-t[0]-t[2]),r),i[1]+=(t[0]-t[2])/2),s<i[2]?(i[2]=s,this.translate(i),ae(this.points,function(t){t.dataLabel&&(t.dataLabel._pos=null)}),this.drawDataLabels()):e=!0,e},placeDataLabels:function(){ae(this.points,function(t){var e,i=t.dataLabel;i&&((e=i._pos)?(i.attr(i._attr),i[i.moved?"animate":"attr"](e),i.moved=!0):i&&i.attr({y:-999}))})},alignDataLabel:g,drawTracker:_e.prototype.drawTracker,drawLegendSymbol:Ne.prototype.drawLegendSymbol,getSymbol:g};Ke=r(Ee,Ke),Tt.pie=Ke,St(Highcharts,{Axis:Oe,Chart:We,Color:ke,Legend:Xe,Pointer:He,Point:Ye,Tick:Ie,Tooltip:Re,Renderer:h,Series:Ee,SVGElement:we,SVGRenderer:Te,arrayMin:$t,arrayMax:qt,charts:Q,dateFormat:m,format:Ft,pathAnim:t,getOptions:function(){return H},hasBidiBug:o,isTouchDevice:n,numberFormat:Et,seriesTypes:Tt,setOptions:function(t){return H=Pt(H,t),be(),H},addEvent:de,removeEvent:pe,createElement:Yt,discardElement:Jt,css:Wt,each:ae,extend:St,map:ce,merge:Pt,pick:Xt,splat:Ht,extendClass:r,pInt:At,wrap:Nt,svg:K,canvas:f,vml:!K&&!f,product:tt,version:et})}();
|