(function(){function e(e,t){var n;e||(e={});for(n in t)e[n]=t[n];return e}function t(){for(var e=0,t=arguments,n=t.length,i={};n>e;e++)i[t[e++]]=t[e];return i}function n(e,t){return parseInt(e,t||10)}function i(e){return"string"==typeof e}function r(e){return"object"==typeof e}function o(e){return"[object Array]"===Object.prototype.toString.call(e)}function a(e){return"number"==typeof e}function s(e){return ct.log(e)/ct.LN10}function l(e){return ct.pow(10,e)}function c(e,t){for(var n=e.length;n--;)if(e[n]===t){e.splice(n,1);break}}function u(e){return e!==$&&null!==e}function d(e,t,n){var o,a;if(i(t))u(n)?e.setAttribute(t,n):e&&e.getAttribute&&(a=e.getAttribute(t));else if(u(t)&&r(t))for(o in t)e.setAttribute(o,t[o]);return a}function h(e){return o(e)?e:[e]}function p(){var e,t,n=arguments,i=n.length;for(e=0;i>e;e++)if(t=n[e],t!==void 0&&null!==t)return t}function f(t,n){kt&&n&&n.opacity!==$&&(n.filter="alpha(opacity="+100*n.opacity+")"),e(t.style,n)}function g(t,n,i,r,o){return t=st.createElement(t),n&&e(t,n),o&&f(t,{padding:0,border:Lt,margin:0}),i&&f(t,i),r&&r.appendChild(t),t}function m(t,n){var i=function(){};return i.prototype=new t,e(i.prototype,n),i}function v(e,t,i,r){var o=W.lang,a=e;-1===t?(t=""+(e||0),e=t.indexOf(".")>-1?t.split(".")[1].length:0):e=isNaN(t=gt(t))?2:t;var t=e,i=void 0===i?o.decimalPoint:i,r=void 0===r?o.thousandsSep:r,o=0>a?"-":"",e=n(a=gt(+a||0).toFixed(t))+"",s=e.length>3?e.length%3:0;return o+(s?e.substr(0,s)+r:"")+e.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+r)+(t?i+gt(a-e).toFixed(t).slice(2):"")}function b(e,t){return Array((t||2)+1-(e+"").length).join(0)+e}function y(e,t,n,i){var r,n=p(n,1);for(r=e/n,t||(t=[1,2,2.5,5,10],i&&i.allowDecimals===!1&&(1===n?t=[1,2,5,10]:.1>=n&&(t=[1/n]))),i=0;t.length>i&&(e=t[i],!((t[i]+(t[i+1]||t[i]))/2>=r));i++);return e*=n}function x(e,t){var n,i=t||[[Nt,[1,2,5,10,20,25,50,100,200,500]],[Pt,[1,2,5,10,15,30]],[Mt,[1,2,5,10,15,30]],[Bt,[1,2,3,4,6,8,12]],[jt,[1,2]],[zt,[1,2]],[$t,[1,2,3,4,6]],[Ht,null]],r=i[i.length-1],o=G[r[0]],a=r[1];for(n=0;i.length>n&&(r=i[n],o=G[r[0]],a=r[1],!(i[n+1]&&(o*a[a.length-1]+G[i[n+1][0]])/2>=e));n++);return o===G[Ht]&&5*o>e&&(a=[1,2,5]),o===G[Ht]&&5*o>e&&(a=[1,2,5]),i=y(e/o,a),{unitRange:o,count:i,unitName:r[0]}}function k(t,n,i,r){var o,a=[],s={},l=W.global.useUTC,c=new Date(n),n=t.unitRange,u=t.count;n>=G[Pt]&&(c.setMilliseconds(0),c.setSeconds(n>=G[Mt]?0:u*dt(c.getSeconds()/u))),n>=G[Mt]&&c[nt](n>=G[Bt]?0:u*dt(c[Y]()/u)),n>=G[Bt]&&c[it](n>=G[jt]?0:u*dt(c[J]()/u)),n>=G[jt]&&c[rt](n>=G[$t]?1:u*dt(c[Q]()/u)),n>=G[$t]&&(c[ot](n>=G[Ht]?0:u*dt(c[et]()/u)),o=c[tt]()),n>=G[Ht]&&(o-=o%u,c[at](o)),n===G[zt]&&c[rt](c[Q]()-c[Z]()+p(r,1)),r=1,o=c[tt]();for(var d=c.getTime(),h=c[et](),f=c[Q](),c=l?0:(864e5+6e4*c.getTimezoneOffset())%864e5;i>d;)a.push(d),n===G[Ht]?d=X(o+r*u,0):n===G[$t]?d=X(o,h+r*u):l||n!==G[jt]&&n!==G[zt]?(d+=n*u,G[Bt]>=n&&d%G[jt]===c&&(s[d]=jt)):d=X(o,h,f+r*u*(n===G[jt]?1:7)),r++;return a.push(d),a.info=e(t,{higherRanks:s,totalRange:n*u}),a}function w(){this.symbol=this.color=0}function _(e,t){var n,i,r=e.length;for(i=0;r>i;i++)e[i].ss_i=i;for(e.sort(function(e,i){return n=t(e,i),0===n?e.ss_i-i.ss_i:n}),i=0;r>i;i++)delete e[i].ss_i}function C(e){for(var t=e.length,n=e[0];t--;)n>e[t]&&(n=e[t]);return n}function T(e){for(var t=e.length,n=e[0];t--;)e[t]>n&&(n=e[t]);return n}function E(e,t){for(var n in e)e[n]&&e[n]!==t&&e[n].destroy&&e[n].destroy(),delete e[n]}function S(e){K||(K=g(Ot)),e&&K.appendChild(e),K.innerHTML=""}function A(e,t){var n="Highcharts error #"+e+": www.highcharts.com/errors/"+e;if(t)throw n;lt.console&&console.log(n)}function D(e){return parseFloat(e.toPrecision(14))}function I(e,t){U=p(e,t.animation)}function R(){var e=W.global.useUTC,t=e?"getUTC":"get",n=e?"setUTC":"set";X=e?Date.UTC:function(e,t,n,i,r,o){return new Date(e,t,p(n,1),p(i,0),p(r,0),p(o,0)).getTime()},Y=t+"Minutes",J=t+"Hours",Z=t+"Day",Q=t+"Date",et=t+"Month",tt=t+"FullYear",nt=n+"Minutes",it=n+"Hours",rt=n+"Date",ot=n+"Month",at=n+"FullYear"}function O(){}function L(e,t,n){this.axis=e,this.pos=t,this.type=n||"",this.isNew=!0,n||this.addLabel()}function F(e,t){return this.axis=e,t&&(this.options=t,this.id=t.id),this}function N(e,t,n,i,r){var o=e.chart.inverted;this.axis=e,this.isNegative=n,this.options=t,this.x=i,this.stack=r,this.alignOptions={align:t.align||(o?n?"left":"right":"center"),verticalAlign:t.verticalAlign||(o?"middle":n?"bottom":"top"),y:p(t.y,o?4:n?14:-6),x:p(t.x,o?n?-6:6:0)},this.textAlign=t.textAlign||(o?n?"right":"left":"center")}function P(){this.init.apply(this,arguments)}function M(e,t){var i=t.borderWidth,r=t.style,o=t.shared,a=n(r.padding);this.chart=e,this.options=t,r.padding=0,this.crosshairs=[],this.currentY=this.currentX=0,this.tooltipIsHidden=!0,this.label=e.renderer.label("",0,0,null,null,null,t.useHTML,null,"tooltip").attr({padding:a,fill:t.backgroundColor,"stroke-width":i,r:t.borderRadius,zIndex:8}).css(r).hide().add(),St||this.label.shadow(t.shadow),this.shared=o}function B(e,t){var n=St?"":t.chart.zoomType;this.zoomX=/x/.test(n),this.zoomY=/y/.test(n),this.options=t,this.chart=e,this.init(e,t.tooltip)}function j(e){this.init(e)}function z(e,t){var n,i=e.series;e.series=null,n=Zt(W,e),n.series=e.series=i;var i=n.chart,o=i.margin,o=r(o)?o:[o,o,o,o];this.optionsMarginTop=p(i.marginTop,o[0]),this.optionsMarginRight=p(i.marginRight,o[1]),this.optionsMarginBottom=p(i.marginBottom,o[2]),this.optionsMarginLeft=p(i.marginLeft,o[3]),this.runChartClick=(o=i.events)&&!!o.click,this.callback=t,this.isResizing=0,this.options=n,this.axes=[],this.series=[],this.hasCartesianSeries=i.showAxes,this.init(o)}var $,H,K,W,q,U,V,G,X,Y,J,Z,Q,et,tt,nt,it,rt,ot,at,st=document,lt=window,ct=Math,ut=ct.round,dt=ct.floor,ht=ct.ceil,pt=ct.max,ft=ct.min,gt=ct.abs,mt=ct.cos,vt=ct.sin,bt=ct.PI,yt=2*bt/360,xt=navigator.userAgent,kt=/msie/i.test(xt)&&!lt.opera,wt=8===st.documentMode,_t=/AppleWebKit/.test(xt),Ct=/Firefox/.test(xt),Tt=!!st.createElementNS&&!!st.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,Et=Ct&&4>parseInt(xt.split("Firefox/")[1],10),St=!Tt&&!kt&&!!st.createElement("canvas").getContext,At=st.documentElement.ontouchstart!==$,Dt={},It=0,Rt=function(){},Ot="div",Lt="none",Ft="rgba(192,192,192,"+(Tt?1e-6:.002)+")",Nt="millisecond",Pt="second",Mt="minute",Bt="hour",jt="day",zt="week",$t="month",Ht="year",Kt={};lt.Highcharts={},q=function(e,t,n){if(!u(t)||isNaN(t))return"Invalid date";var i,e=p(e,"%Y-%m-%d %H:%M:%S"),r=new Date(t),o=r[J](),a=r[Z](),s=r[Q](),l=r[et](),c=r[tt](),d=W.lang,h=d.weekdays,t={a:h[a].substr(0,3),A:h[a],d:b(s),e:s,b:d.shortMonths[l],B:d.months[l],m:b(l+1),y:(""+c).substr(2,2),Y:c,H:b(o),I:b(o%12||12),l:o%12||12,M:b(r[Y]()),p:12>o?"AM":"PM",P:12>o?"am":"pm",S:b(r.getSeconds()),L:b(ut(t%1e3),3)};for(i in t)e=e.replace("%"+i,t[i]);return n?e.substr(0,1).toUpperCase()+e.substr(1):e},w.prototype={wrapColor:function(e){this.color>=e&&(this.color=0)},wrapSymbol:function(e){this.symbol>=e&&(this.symbol=0)}},G=t(Nt,1,Pt,1e3,Mt,6e4,Bt,36e5,jt,864e5,zt,6048e5,$t,2592e6,Ht,31556952e3),V={init:function(e,t,n){var i,r,o,t=t||"",a=e.shift,s=t.indexOf("C")>-1,l=s?7:3,t=t.split(" "),n=[].concat(n),c=function(e){for(i=e.length;i--;)"M"===e[i]&&e.splice(i+1,0,e[i+1],e[i+2],e[i+1],e[i+2])};if(s&&(c(t),c(n)),e.isArea&&(r=t.splice(t.length-6,6),o=n.splice(n.length-6,6)),n.length/l>=a)for(;a--;)n=[].concat(n).splice(0,l).concat(n);if(e.shift=0,t.length)for(e=n.length;e>t.length;)a=[].concat(t).splice(t.length-l,l),s&&(a[l-6]=a[l-2],a[l-5]=a[l-1]),t=t.concat(a);return r&&(t=t.concat(r),n=n.concat(o)),[t,n]},step:function(e,t,n,i){var r=[],o=e.length;if(1===n)r=i;else if(o===t.length&&1>n)for(;o--;)i=parseFloat(e[o]),r[o]=isNaN(i)?e[o]:n*parseFloat(t[o]-i)+i;else r=t;return r}};var Wt=lt.HighchartsAdapter,qt=Wt||{},Ut=qt.adapterRun,Vt=qt.getScript,Gt=qt.each,Xt=qt.grep,Yt=qt.offset,Jt=qt.map,Zt=qt.merge,Qt=qt.addEvent,en=qt.removeEvent,tn=qt.fireEvent,nn=qt.washMouseEvent,rn=qt.animate,on=qt.stop;if(Wt&&Wt.init&&Wt.init(V),!Wt&<.jQuery){var an=jQuery,Vt=an.getScript,Ut=function(e,t){return an(e)[t]()},Gt=function(e,t){for(var n=0,i=e.length;i>n;n++)if(t.call(e[n],e[n],n,e)===!1)return n},Xt=an.grep,Jt=function(e,t){for(var n=[],i=0,r=e.length;r>i;i++)n[i]=t.call(e[i],e[i],i,e);return n},Zt=function(){var e=arguments;return an.extend(!0,null,e[0],e[1],e[2],e[3])},Yt=function(e){return an(e).offset()},Qt=function(e,t,n){an(e).bind(t,n)},en=function(e,t,n){var i=st.removeEventListener?"removeEventListener":"detachEvent";st[i]&&!e[i]&&(e[i]=function(){}),an(e).unbind(t,n)},tn=function(t,n,i,r){var o,a=an.Event(n),s="detached"+n;i&&(delete i.layerX,delete i.layerY),e(a,i),t[n]&&(t[s]=t[n],t[n]=null),Gt(["preventDefault","stopPropagation"],function(e){var t=a[e];a[e]=function(){try{t.call(a)}catch(n){"preventDefault"===e&&(o=!0)}}}),an(t).trigger(a),t[s]&&(t[n]=t[s],t[s]=null),r&&!a.isDefaultPrevented()&&!o&&r(a)},nn=function(e){return e},rn=function(e,t,n){var i=an(e);t.d&&(e.toD=t.d,t.d=1),i.stop(),i.animate(t,n)},on=function(e){an(e).stop()};an.extend(an.easing,{easeOutQuad:function(e,t,n,i,r){return-i*(t/=r)*(t-2)+n}});var sn=an.fx,ln=sn.step;Gt(["cur","_default","width","height"],function(e,t){var n,i,r=ln;"cur"===e?r=sn.prototype:"_default"===e&&an.Tween&&(r=an.Tween.propHooks[e],e="set"),(n=r[e])&&(r[e]=function(r){return r=t?r:this,i=r.elem,i.attr?i.attr(r.prop,"cur"===e?$:r.now):n.apply(this,arguments)})}),ln.d=function(e){var t=e.elem;if(!e.started){var n=V.init(t,t.d,t.toD);e.start=n[0],e.end=n[1],e.started=!0}t.attr("d",V.step(e.start,e.end,e.pos,t.toD))}}qt={enabled:!0,align:"center",x:0,y:15,style:{color:"#666",fontSize:"11px",lineHeight:"14px"}},W={colors:"#4572A7,#AA4643,#89A54E,#80699B,#3D96AE,#DB843D,#92A8CD,#A47D7C,#B5CA92".split(","),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),decimalPoint:".",resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/2.2.4/modules/canvas-tools.js"},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft: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",y:15,style:{color:"#3E576F",fontSize:"16px"}},subtitle:{text:"",align:"center",y:30,style:{color:"#6D869F"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},lineWidth:2,shadow:!0,marker:{enabled:!0,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:Zt(qt,{enabled:!1,y:-6,formatter:function(){return this.y}}),cropThreshold:300,pointRange:0,showInLegend:!0,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:!0}},labels:{style:{position:"absolute",color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,navigation:{activeColor:"#3E576F",inactiveColor:"#CCC"},shadow:!1,itemStyle:{cursor:"pointer",color:"#3E576F",fontSize:"12px"},itemHoverStyle:{color:"#000"},itemHiddenStyle:{color:"#CCC"},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"1em"},style:{position:"absolute",backgroundColor:"white",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:2,borderRadius:5,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:'{point.key}
',pointFormat:'{series.name}: {point.y}
',shadow:!0,shared:St,snap:At?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var cn=W.plotOptions,Wt=cn.line;R();var un=function(e){var t,i=[];return function(e){(t=/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(e))?i=[n(t[1]),n(t[2]),n(t[3]),parseFloat(t[4],10)]:(t=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))&&(i=[n(t[1],16),n(t[2],16),n(t[3],16),1])}(e),{get:function(t){return i&&!isNaN(i[0])?"rgb"===t?"rgb("+i[0]+","+i[1]+","+i[2]+")":"a"===t?i[3]:"rgba("+i.join(",")+")":e},brighten:function(e){if(a(e)&&0!==e){var t;for(t=0;3>t;t++)i[t]+=n(255*e),0>i[t]&&(i[t]=0),i[t]>255&&(i[t]=255)}return this},setOpacity:function(e){return i[3]=e,this}}};O.prototype={init:function(e,t){this.element="span"===t?g(t):st.createElementNS("http://www.w3.org/2000/svg",t),this.renderer=e,this.attrSetters={}},animate:function(e,t,n){t=p(t,U,!0),on(this),t?(t=Zt(t),n&&(t.complete=n),rn(this,e,t)):(this.attr(e),n&&n())},attr:function(e,t){var r,o,a,s,l,c,h,p=this.element,f=p.nodeName,g=this.renderer,m=this.attrSetters,v=this.shadows,b=this;if(i(e)&&u(t)&&(r=e,e={},e[r]=t),i(e))r=e,"circle"===f?r={x:"cx",y:"cy"}[r]||r:"strokeWidth"===r&&(r="stroke-width"),b=d(p,r)||this[r]||0,"d"!==r&&"visibility"!==r&&(b=parseFloat(b));else for(r in e)if(l=!1,o=e[r],a=m[r]&&m[r](o,r),a!==!1){if(a!==$&&(o=a),"d"===r)o&&o.join&&(o=o.join(" ")),/(NaN| {2}|^$)/.test(o)&&(o="M 0 0");else if("x"===r&&"text"===f){for(a=0;p.childNodes.length>a;a++)s=p.childNodes[a],d(s,"x")===d(p,"x")&&d(s,"x",o);this.rotation&&d(p,"transform","rotate("+this.rotation+" "+o+" "+n(e.y||d(p,"y"))+")")}else if("fill"===r)o=g.color(o,p,r);else if("circle"!==f||"x"!==r&&"y"!==r)if("rect"===f&&"r"===r)d(p,{rx:o,ry:o}),l=!0;else if("translateX"===r||"translateY"===r||"rotation"===r||"verticalAlign"===r)l=h=!0;else if("stroke"===r)o=g.color(o,p,r);else if("dashstyle"===r){if(r="stroke-dasharray",o=o&&o.toLowerCase(),"solid"===o)o=Lt;else if(o){for(o=o.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(","),a=o.length;a--;)o[a]=n(o[a])*e["stroke-width"];o=o.join(",")}}else"isTracker"===r?this[r]=o:"width"===r?o=n(o):"align"===r?(r="text-anchor",o={left:"start",center:"middle",right:"end"}[o]):"title"===r&&(a=p.getElementsByTagName("title")[0],a||(a=st.createElementNS("http://www.w3.org/2000/svg","title"),p.appendChild(a)),a.textContent=o);else r={x:"cx",y:"cy"}[r]||r;if("strokeWidth"===r&&(r="stroke-width"),_t&&"stroke-width"===r&&0===o&&(o=1e-6),this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(r)&&(c||(this.symbolAttr(e),c=!0),l=!0),v&&/^(width|height|visibility|x|y|d|transform)$/.test(r))for(a=v.length;a--;)d(v[a],r,"height"===r?pt(o-(v[a].cutHeight||0),0):o);("width"===r||"height"===r)&&"rect"===f&&0>o&&(o=0),this[r]=o,h&&this.updateTransform(),"text"===r?(this.textStr=o,this.added&&g.buildText(this)):l||d(p,r,o)}return _t&&/Chrome\/(18|19)/.test(xt)&&"text"===f&&(e.x!==$||e.y!==$)&&(r=p.parentNode,o=p.nextSibling,r&&(r.removeChild(p),o?r.insertBefore(p,o):r.appendChild(p))),b},symbolAttr:function(e){var t=this;Gt("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),function(n){t[n]=p(e[n],t[n])}),t.attr({d:t.renderer.symbols[t.symbolName](t.x,t.y,t.width,t.height,t)})},clip:function(e){return this.attr("clip-path","url("+this.renderer.url+"#"+e.id+")")},crisp:function(e,t,n,i,r){var o,a,s={},l={},e=e||this.strokeWidth||this.attr&&this.attr("stroke-width")||0;a=ut(e)%2/2,l.x=dt(t||this.x||0)+a,l.y=dt(n||this.y||0)+a,l.width=dt((i||this.width||0)-2*a),l.height=dt((r||this.height||0)-2*a),l.strokeWidth=e;for(o in l)this[o]!==l[o]&&(this[o]=s[o]=l[o]);return s},css:function(t){var n,i=this.element,i=t&&t.width&&"text"===i.nodeName,r="",o=function(e,t){return"-"+t.toLowerCase()};if(t&&t.color&&(t.fill=t.color),this.styles=t=e(this.styles,t),kt&&!Tt)i&&delete t.width,f(this.element,t);else{for(n in t)r+=n.replace(/([A-Z])/g,o)+":"+t[n]+";";this.attr({style:r})}return i&&this.added&&this.renderer.buildText(this),this},on:function(e,t){var n=t;return At&&"click"===e&&(e="touchstart",n=function(e){e.preventDefault(),t()}),this.element["on"+e]=n,this},setRadialReference:function(e){return this.element.radialReference=e,this},translate:function(e,t){return this.attr({translateX:e,translateY:t})},invert:function(){return this.inverted=!0,this.updateTransform(),this},htmlCss:function(t){var n=this.element;return(n=t&&"SPAN"===n.tagName&&t.width)&&(delete t.width,this.textWidth=n,this.updateTransform()),this.styles=e(this.styles,t),f(this.element,t),this},htmlGetBBox:function(e){var t=this.element,n=this.bBox;return(!n||e)&&("text"===t.nodeName&&(t.style.position="absolute"),n=this.bBox={x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}),n},htmlUpdateTransform:function(){if(this.added){var e=this.renderer,t=this.element,i=this.translateX||0,r=this.translateY||0,o=this.x||0,a=this.y||0,s=this.textAlign||"left",l={left:0,center:.5,right:1}[s],c=s&&"left"!==s,d=this.shadows;if((i||r)&&(f(t,{marginLeft:i,marginTop:r}),d&&Gt(d,function(e){f(e,{marginLeft:i+1,marginTop:r+1})})),this.inverted&&Gt(t.childNodes,function(n){e.invertChild(n,t)}),"SPAN"===t.tagName){var h,g,m,d=this.rotation;h=0;var v,b=1,y=0;m=n(this.textWidth);var x=this.xCorr||0,k=this.yCorr||0,w=[d,s,t.innerHTML,this.textWidth].join(",");w!==this.cTT&&(u(d)&&(h=d*yt,b=mt(h),y=vt(h),f(t,{filter:d?["progid:DXImageTransform.Microsoft.Matrix(M11=",b,", M12=",-y,", M21=",y,", M22=",b,", sizingMethod='auto expand')"].join(""):Lt})),h=p(this.elemWidth,t.offsetWidth),g=p(this.elemHeight,t.offsetHeight),h>m&&/[ \-]/.test(t.innerText)&&(f(t,{width:m+"px",display:"block",whiteSpace:"normal"}),h=m),m=e.fontMetrics(t.style.fontSize).b,x=0>b&&-h,k=0>y&&-g,v=0>b*y,x+=y*m*(v?1-l:l),k-=b*m*(d?v?l:1-l:1),c&&(x-=h*l*(0>b?-1:1),d&&(k-=g*l*(0>y?-1:1)),f(t,{textAlign:s})),this.xCorr=x,this.yCorr=k),f(t,{left:o+x+"px",top:a+k+"px"}),this.cTT=w}}else this.alignOnAdd=!0},updateTransform:function(){var e=this.translateX||0,t=this.translateY||0,n=this.inverted,i=this.rotation,r=[];n&&(e+=this.attr("width"),t+=this.attr("height")),(e||t)&&r.push("translate("+e+","+t+")"),n?r.push("rotate(90) scale(-1,1)"):i&&r.push("rotate("+i+" "+(this.x||0)+" "+(this.y||0)+")"),r.length&&d(this.element,"transform",r.join(" "))},toFront:function(){var e=this.element;return e.parentNode.appendChild(e),this},align:function(e,t,n){e?(this.alignOptions=e,this.alignByTranslate=t,n||this.renderer.alignedObjects.push(this)):(e=this.alignOptions,t=this.alignByTranslate);var n=p(n,this.renderer),i=e.align,r=e.verticalAlign,o=(n.x||0)+(e.x||0),a=(n.y||0)+(e.y||0),s={};return/^(right|center)$/.test(i)&&(o+=(n.width-(e.width||0))/{right:1,center:2}[i]),s[t?"translateX":"x"]=ut(o),/^(bottom|middle)$/.test(r)&&(a+=(n.height-(e.height||0))/({bottom:1,middle:2}[r]||1)),s[t?"translateY":"y"]=ut(a),this[this.placed?"animate":"attr"](s),this.placed=!0,this.alignAttr=s,this},getBBox:function(t){var n,i,r=this.rotation;i=this.element;var o=r*yt;if("http://www.w3.org/2000/svg"===i.namespaceURI){try{n=i.getBBox?e({},i.getBBox()):{width:i.offsetWidth,height:i.offsetHeight}}catch(a){}(!n||0>n.width)&&(n={width:0,height:0}),t=n.width,i=n.height,r&&(n.width=gt(i*vt(o))+gt(t*mt(o)),n.height=gt(i*mt(o))+gt(t*vt(o)))}else n=this.htmlGetBBox(t);return n},show:function(){return this.attr({visibility:"visible"})},hide:function(){return this.attr({visibility:"hidden"})},add:function(e){var t,i=this.renderer,r=e||i,o=r.element||i.box,a=o.childNodes,s=this.element,l=d(s,"zIndex");if(this.parentInverted=e&&e.inverted,void 0!==this.textStr&&i.buildText(this),l&&(r.handleZ=!0,l=n(l)),r.handleZ)for(r=0;a.length>r;r++)if(e=a[r],i=d(e,"zIndex"),e!==s&&(n(i)>l||!u(l)&&u(i))){o.insertBefore(s,e),t=!0;break}return t||o.appendChild(s),this.added=!0,tn(this,"add"),this},safeRemoveChild:function(e){var t=e.parentNode;t&&t.removeChild(e)},destroy:function(){var e,t,n=this,i=n.element||{},r=n.shadows,o=n.box;if(i.onclick=i.onmouseout=i.onmouseover=i.onmousemove=null,on(n),n.clipPath&&(n.clipPath=n.clipPath.destroy()),n.stops){for(t=0;n.stops.length>t;t++)n.stops[t]=n.stops[t].destroy();n.stops=null}n.safeRemoveChild(i),r&&Gt(r,function(e){n.safeRemoveChild(e)}),o&&o.destroy(),c(n.renderer.alignedObjects,n);for(e in n)delete n[e];return null},empty:function(){for(var e=this.element,t=e.childNodes,n=t.length;n--;)e.removeChild(t[n])},shadow:function(e,t,n){var i,r,o=[],a=this.element,s=this.parentInverted?"(-1,-1)":"(1,1)";if(e){for(e=1;3>=e;e++)i=a.cloneNode(0),r=7-2*e,d(i,{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":.05*e,"stroke-width":r,transform:"translate"+s,fill:Lt}),n&&(d(i,"height",pt(d(i,"height")-r,0)),i.cutHeight=r),t?t.element.appendChild(i):a.parentNode.insertBefore(i,a),o.push(i);this.shadows=o}return this}};var dn=function(){this.init.apply(this,arguments)};dn.prototype={Element:O,init:function(e,t,n,i){var r,o=location;r=this.createElement("svg").attr({xmlns:"http://www.w3.org/2000/svg",version:"1.1"}),e.appendChild(r.element),this.isSVG=!0,this.box=r.element,this.boxWrapper=r,this.alignedObjects=[],this.url=kt?"":o.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1"),this.defs=this.createElement("defs").add(),this.forExport=i,this.gradients={},this.setSize(t,n,!1);var a;Ct&&e.getBoundingClientRect&&(this.subPixelFix=t=function(){f(e,{left:0,top:0}),a=e.getBoundingClientRect(),f(e,{left:ht(a.left)-a.left+"px",top:ht(a.top)-a.top+"px"})},t(),Qt(lt,"resize",t))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var e=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),E(this.gradients||{}),this.gradients=null,e&&(this.defs=e.destroy()),this.subPixelFix&&en(lt,"resize",this.subPixelFix),this.alignedObjects=null},createElement:function(e){var t=new this.Element;return t.init(this,e),t},draw:function(){},buildText:function(e){for(var t,i=e.element,r=(""+p(e.textStr,"")).replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g,'').replace(//g,"").split(//g),o=i.childNodes,a=/style="([^"]+)"/,s=/href="([^"]+)"/,l=d(i,"x"),c=e.styles,u=c&&n(c.width),h=c&&c.lineHeight,c=o.length,g=[];c--;)i.removeChild(o[c]);u&&!e.added&&this.box.appendChild(i),""===r[r.length-1]&&r.pop(),Gt(r,function(r,o){var c,p,m=0,r=r.replace(//g,"|||");c=r.split("|||"),Gt(c,function(r){if(""!==r||1===c.length){var v={},b=st.createElementNS("http://www.w3.org/2000/svg","tspan");if(a.test(r)&&d(b,"style",r.match(a)[1].replace(/(;| |^)color([ :])/,"$1fill$2")),s.test(r)&&(d(b,"onclick",'location.href="'+r.match(s)[1]+'"'),f(b,{cursor:"pointer"})),r=(r.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">"),b.appendChild(st.createTextNode(r)),m?v.dx=3:v.x=l,!m){if(o){if(!Tt&&e.renderer.forExport&&f(b,{display:"block"}),p=lt.getComputedStyle&&n(lt.getComputedStyle(t,null).getPropertyValue("line-height")),!p||isNaN(p)){var y;(y=h)||(y=t.offsetHeight)||(g[o]=i.getBBox().height,y=ut(g[o]-(g[o-1]||0))||18),p=y}d(b,"dy",p)}t=b}if(d(b,v),i.appendChild(b),m++,u)for(var r=r.replace(/-/g,"- ").split(" "),x=[];r.length||x.length;)y=e.getBBox().width,v=y>u,v&&1!==r.length?(b.removeChild(b.firstChild),x.unshift(r.pop())):(r=x,x=[],r.length&&(b=st.createElementNS("http://www.w3.org/2000/svg","tspan"),d(b,{dy:h||16,x:l}),i.appendChild(b),y>u&&(u=y))),r.length&&b.appendChild(st.createTextNode(r.join(" ").replace(/- /g,"-")))}})})},button:function(n,i,r,o,a,s,l){var c,u,d,h,p,f=this.label(n,i,r),g=0,n={x1:0,y1:0,x2:0,y2:1},a=Zt(t("stroke-width",1,"stroke","#999","fill",t("linearGradient",n,"stops",[[0,"#FFF"],[1,"#DDD"]]),"r",3,"padding",3,"style",t("color","black")),a);return d=a.style,delete a.style,s=Zt(a,t("stroke","#68A","fill",t("linearGradient",n,"stops",[[0,"#FFF"],[1,"#ACF"]])),s),h=s.style,delete s.style,l=Zt(a,t("stroke","#68A","fill",t("linearGradient",n,"stops",[[0,"#9BD"],[1,"#CDF"]])),l),p=l.style,delete l.style,Qt(f.element,"mouseenter",function(){f.attr(s).css(h)}),Qt(f.element,"mouseleave",function(){c=[a,s,l][g],u=[d,h,p][g],f.attr(c).css(u)}),f.setState=function(e){(g=e)?2===e&&f.attr(l).css(p):f.attr(a).css(d)},f.on("click",function(){o.call(f)}).attr(a).css(e({cursor:"default"},d))},crispLine:function(e,t){return e[1]===e[4]&&(e[1]=e[4]=ut(e[1])+t%2/2),e[2]===e[5]&&(e[2]=e[5]=ut(e[2])+t%2/2),e},path:function(t){var n={fill:Lt};return o(t)?n.d=t:r(t)&&e(n,t),this.createElement("path").attr(n)},circle:function(e,t,n){return e=r(e)?e:{x:e,y:t,r:n},this.createElement("circle").attr(e)},arc:function(e,t,n,i,o,a){return r(e)&&(t=e.y,n=e.r,i=e.innerR,o=e.start,a=e.end,e=e.x),this.symbol("arc",e||0,t||0,n||0,n||0,{innerR:i||0,start:o||0,end:a||0})},rect:function(e,t,n,i,o,a){return o=r(e)?e.r:o,o=this.createElement("rect").attr({rx:o,ry:o,fill:Lt}),o.attr(r(e)?e:o.crisp(a,e,t,pt(n,0),pt(i,0)))},setSize:function(e,t,n){var i=this.alignedObjects,r=i.length;for(this.width=e,this.height=t,this.boxWrapper[p(n,!0)?"animate":"attr"]({width:e,height:t});r--;)i[r].align()},g:function(e){var t=this.createElement("g");return u(e)?t.attr({"class":"highcharts-"+e}):t},image:function(t,n,i,r,o){var a={preserveAspectRatio:Lt};return arguments.length>1&&e(a,{x:n,y:i,width:r,height:o}),a=this.createElement("image").attr(a),a.element.setAttributeNS?a.element.setAttributeNS("http://www.w3.org/1999/xlink","href",t):a.element.setAttribute("hc-svg-href",t),a},symbol:function(t,n,i,r,o,a){var s,l,c,u=this.symbols[t],u=u&&u(ut(n),ut(i),r,o,a),d=/^url\((.*?)\)$/;return u?(s=this.path(u),e(s,{symbolName:t,x:n,y:i,width:r,height:o}),a&&e(s,a)):d.test(t)&&(c=function(e,t){e.attr({width:t[0],height:t[1]}),e.alignByTranslate||e.translate(-ut(t[0]/2),-ut(t[1]/2))},l=t.match(d)[1],t=Dt[l],s=this.image(l).attr({x:n,y:i}),t?c(s,t):(s.attr({width:0,height:0}),g("img",{onload:function(){c(s,Dt[l]=[this.width,this.height])},src:l}))),s},symbols:{circle:function(e,t,n,i){var r=.166*n;return["M",e+n/2,t,"C",e+n+r,t,e+n+r,t+i,e+n/2,t+i,"C",e-r,t+i,e-r,t,e+n/2,t,"Z"]},square:function(e,t,n,i){return["M",e,t,"L",e+n,t,e+n,t+i,e,t+i,"Z"]},triangle:function(e,t,n,i){return["M",e+n/2,t,"L",e+n,t+i,e,t+i,"Z"]},"triangle-down":function(e,t,n,i){return["M",e,t,"L",e+n,t,e+n/2,t+i,"Z"]},diamond:function(e,t,n,i){return["M",e+n/2,t,"L",e+n,t+i/2,e+n/2,t+i,e,t+i/2,"Z"]},arc:function(e,t,n,i,r){var o=r.start,n=r.r||n||i,a=r.end-1e-6,i=r.innerR,s=r.open,l=mt(o),c=vt(o),u=mt(a),a=vt(a),r=bt>r.end-o?0:1;return["M",e+n*l,t+n*c,"A",n,n,0,r,1,e+n*u,t+n*a,s?"M":"L",e+i*u,t+i*a,"A",i,i,0,r,0,e+i*l,t+i*c,s?"":"Z"]}},clipRect:function(e,t,n,i){var r="highcharts-"+It++,o=this.createElement("clipPath").attr({id:r}).add(this.defs),e=this.rect(e,t,n,i,0).add(o);return e.id=r,e.clipPath=o,e},color:function(t,n,i){var r,a,s=this,l=/^rgba/;if(t&&t.linearGradient?a="linearGradient":t&&t.radialGradient&&(a="radialGradient"),a){var c,h,p,i=t[a],f=s.gradients,n=n.radialReference;return i.id&&f[i.id]||(o(i)&&(t[a]=i={x1:i[0],y1:i[1],x2:i[2],y2:i[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===a&&n&&!u(i.gradientUnits)&&e(i,{cx:n[0]-n[2]/2+i.cx*n[2],cy:n[1]-n[2]/2+i.cy*n[2],r:i.r*n[2],gradientUnits:"userSpaceOnUse"}),i.id="highcharts-"+It++,f[i.id]=c=s.createElement(a).attr(i).add(s.defs),c.stops=[],Gt(t.stops,function(e){l.test(e[1])?(r=un(e[1]),h=r.get("rgb"),p=r.get("a")):(h=e[1],p=1),e=s.createElement("stop").attr({offset:e[0],"stop-color":h,"stop-opacity":p}).add(c),c.stops.push(e)})),"url("+s.url+"#"+i.id+")"}return l.test(t)?(r=un(t),d(n,i+"-opacity",r.get("a")),r.get("rgb")):(n.removeAttribute(i+"-opacity"),t)},text:function(e,t,n,i){var r=W.chart.style;return i&&!this.forExport?this.html(e,t,n):(t=ut(p(t,0)),n=ut(p(n,0)),e=this.createElement("text").attr({x:t,y:n,text:e}).css({fontFamily:r.fontFamily,fontSize:r.fontSize}),e.x=t,e.y=n,e)},html:function(t,n,i){var r=W.chart.style,o=this.createElement("span"),a=o.attrSetters,s=o.element,l=o.renderer;return a.text=function(e){return s.innerHTML=e,!1},a.x=a.y=a.align=function(e,t){return"align"===t&&(t="textAlign"),o[t]=e,o.htmlUpdateTransform(),!1},o.attr({text:t,x:ut(n),y:ut(i)}).css({position:"absolute",whiteSpace:"nowrap",fontFamily:r.fontFamily,fontSize:r.fontSize}),o.css=o.htmlCss,l.isSVG&&(o.add=function(t){var n,i,r=l.box.parentNode;return t?(n=t.div)||(n=t.div=g(Ot,{className:d(t.element,"class")},{position:"absolute",left:t.attr("translateX")+"px",top:t.attr("translateY")+"px"},r),i=n.style,e(t.attrSetters,{translateX:function(e){i.left=e+"px"},translateY:function(e){i.top=e+"px"},visibility:function(e,t){i[t]=e}})):n=r,n.appendChild(s),o.added=!0,o.alignOnAdd&&o.htmlUpdateTransform(),o}),o},fontMetrics:function(e){var e=n(e||11),e=24>e?e+4:ut(1.2*e),t=ut(.8*e);return{h:e,b:t}},label:function(t,n,i,r,o,a,s,l,c){function d(){var e,t=w.styles,t=t&&t.textAlign,n=T*(1-C);e=l?0:x,!u(m)||"center"!==t&&"right"!==t||(n+={center:.5,right:1}[t]*(m-g.width)),(n!==_.x||e!==_.y)&&_.attr({x:n,y:e}),_.x=n,_.y=e}function h(e,t){f?f.attr(e,t):S[e]=t}function p(){w.attr({text:t,x:n,y:i}),w.symbolName&&w.attr({anchorX:o,anchorY:a})}var f,g,m,v,b,y,x,k=this,w=k.g(c),_=k.text("",0,0,s).attr({zIndex:1}).add(w),C=0,T=3,E=0,S={},s=w.attrSetters;Qt(w,"add",p),s.width=function(e){return m=e,!1},s.height=function(e){return v=e,!1},s.padding=function(e){return u(e)&&e!==T&&(T=e,d()),!1},s.align=function(e){return C={left:0,center:.5,right:1}[e],!1},s.text=function(e,t){_.attr(t,e);var n;return n=_.element.style,g=(void 0===m||void 0===v||w.styles.textAlign)&&_.getBBox(!0),w.width=(m||g.width||0)+2*T,w.height=(v||g.height||0)+2*T,x=T+k.fontMetrics(n&&n.fontSize).b,f||(n=l?-x:0,w.box=f=r?k.symbol(r,-C*T,n,w.width,w.height):k.rect(-C*T,n,w.width,w.height,0,S["stroke-width"]),f.add(w)),f.attr(Zt({width:w.width,height:w.height},S)),S=null,d(),!1},s["stroke-width"]=function(e,t){return E=e%2/2,h(t,e),!1},s.stroke=s.fill=s.r=function(e,t){return h(t,e),!1},s.anchorX=function(e,t){return o=e,h(t,e+E-b),!1},s.anchorY=function(e,t){return a=e,h(t,e-y),!1},s.x=function(e){return w.x=e,e-=C*((m||g.width)+T),b=ut(e),w.attr("translateX",b),!1},s.y=function(e){return y=w.y=ut(e),w.attr("translateY",e),!1};var A=w.css;return e(w,{css:function(e){if(e){var t={},e=Zt({},e);Gt("fontSize,fontWeight,fontFamily,color,lineHeight,width".split(","),function(n){e[n]!==$&&(t[n]=e[n],delete e[n])}),_.css(t)}return A.call(w,e)},getBBox:function(){return f.getBBox()},shadow:function(e){return f.shadow(e),w},destroy:function(){en(w,"add",p),en(w.element,"mouseenter"),en(w.element,"mouseleave"),_&&(_=_.destroy()),O.prototype.destroy.call(w)}})}},H=dn;var hn;if(!Tt&&!St){hn={init:function(e,t){var n=["<",t,' filled="f" stroked="f"'],i=["position: ","absolute",";"];("shape"===t||t===Ot)&&i.push("left:0;top:0;width:1px;height:1px;"),wt&&i.push("visibility: ",t===Ot?"hidden":"visible"),n.push(' style="',i.join(""),'"/>'),t&&(n=t===Ot||"span"===t||"img"===t?n.join(""):e.prepVML(n),this.element=g(n)),this.renderer=e,this.attrSetters={}},add:function(e){var t=this.renderer,n=this.element,i=t.box,i=e?e.element||e:i;return e&&e.inverted&&t.invertChild(n,i),wt&&"hidden"===i.gVis&&f(n,{visibility:"hidden"}),i.appendChild(n),this.added=!0,this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform(),tn(this,"add"),this
},toggleChildren:function(e,t){for(var n=e.childNodes,i=n.length;i--;)f(n[i],{visibility:t}),"DIV"===n[i].nodeName&&this.toggleChildren(n[i],t)},updateTransform:O.prototype.htmlUpdateTransform,attr:function(e,t){var n,r,o,s,l,c=this.element||{},h=c.style,p=c.nodeName,f=this.renderer,m=this.symbolName,v=this.shadows,b=this.attrSetters,y=this;if(i(e)&&u(t)&&(n=e,e={},e[n]=t),i(e))n=e,y="strokeWidth"===n||"stroke-width"===n?this.strokeweight:this[n];else for(n in e)if(r=e[n],l=!1,o=b[n]&&b[n](r,n),o!==!1&&null!==r){if(o!==$&&(r=o),m&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(n))s||(this.symbolAttr(e),s=!0),l=!0;else if("d"===n){for(r=r||[],this.d=r.join(" "),o=r.length,l=[];o--;)l[o]=a(r[o])?ut(10*r[o])-5:"Z"===r[o]?"x":r[o];if(r=l.join(" ")||"x",c.path=r,v)for(o=v.length;o--;)v[o].path=v[o].cutOff?this.cutOffPath(r,v[o].cutOff):r;l=!0}else"zIndex"===n||"visibility"===n?(wt&&"visibility"===n&&"DIV"===p&&(c.gVis=r,this.toggleChildren(c,r),"visible"===r&&(r=null)),r&&(h[n]=r),l=!0):"width"===n||"height"===n?(r=pt(0,r),this[n]=r,this.updateClipping?(this[n]=r,this.updateClipping()):h[n]=r,l=!0):"x"===n||"y"===n?(this[n]=r,h[{x:"left",y:"top"}[n]]=r):"class"===n?c.className=r:"stroke"===n?(r=f.color(r,c,n),n="strokecolor"):"stroke-width"===n||"strokeWidth"===n?(c.stroked=r?!0:!1,n="strokeweight",this[n]=r,a(r)&&(r+="px")):"dashstyle"===n?((c.getElementsByTagName("stroke")[0]||g(f.prepVML([""]),null,null,c))[n]=r||"solid",this.dashstyle=r,l=!0):"fill"===n?"SPAN"===p?h.color=r:(c.filled=r!==Lt?!0:!1,r=f.color(r,c,n),n="fillcolor"):"shape"===p&&"rotation"===n?this[n]=r:"translateX"===n||"translateY"===n||"rotation"===n?(this[n]=r,this.updateTransform(),l=!0):"text"===n&&(this.bBox=null,c.innerHTML=r,l=!0);if(v&&"visibility"===n)for(o=v.length;o--;)v[o].style[n]=r;l||(wt?c[n]=r:d(c,n,r))}return y},clip:function(e){var t=this,n=e.members,i=t.element,r=i.parentNode;return n.push(t),t.destroyClip=function(){c(n,t)},r&&"highcharts-tracker"===r.className&&!wt&&f(i,{visibility:"hidden"}),t.css(e.getCSS(t))},css:O.prototype.htmlCss,safeRemoveChild:function(e){e.parentNode&&S(e)},destroy:function(){return this.destroyClip&&this.destroyClip(),O.prototype.destroy.apply(this)},empty:function(){for(var e,t=this.element.childNodes,n=t.length;n--;)e=t[n],e.parentNode.removeChild(e)},on:function(e,t){return this.element["on"+e]=function(){var e=lt.event;e.target=e.srcElement,t(e)},this},cutOffPath:function(e,t){var i,e=e.split(/[ ,]/);return i=e.length,(9===i||11===i)&&(e[i-4]=e[i-2]=n(e[i-2])-10*t),e.join(" ")},shadow:function(e,t,i){var r,o,a,s,l=[],c=this.element,u=this.renderer,d=c.style,h=c.path;if(h&&"string"!=typeof h.value&&(h="x"),s=h,e){for(e=1;3>=e;e++)a=7-2*e,i&&(s=this.cutOffPath(h.value,a+.5)),o=[''],r=g(u.prepVML(o),null,{left:n(d.left)+1,top:n(d.top)+1}),i&&(r.cutOff=a+1),o=[''],g(u.prepVML(o),null,null,r),t?t.element.appendChild(r):c.parentNode.insertBefore(r,c),l.push(r);this.shadows=l}return this}},hn=m(O,hn);var pn={Element:hn,isIE8:xt.indexOf("MSIE 8.0")>-1,init:function(e,t,n){var i,r;this.alignedObjects=[],i=this.createElement(Ot),r=i.element,r.style.position="relative",e.appendChild(i.element),this.box=r,this.boxWrapper=i,this.setSize(t,n,!1),st.namespaces.hcv||(st.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),st.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,n,i,r){var o=this.createElement();return e(o,{members:[],left:t,top:n,width:i,height:r,getCSS:function(t){var n=t.inverted,i=this.top,r=this.left,o=r+this.width,a=i+this.height,i={clip:"rect("+ut(n?r:i)+"px,"+ut(n?a:o)+"px,"+ut(n?o:a)+"px,"+ut(n?i:r)+"px)"};return!n&&wt&&"IMG"!==t.element.nodeName&&e(i,{width:o+"px",height:a+"px"}),i},updateClipping:function(){Gt(o.members,function(e){e.css(o.getCSS(e))})}})},color:function(e,t,n){var i,r,o=/^rgba/,a=Lt;if(e&&e.linearGradient?r="gradient":e&&e.radialGradient&&(r="pattern"),r){var s,l,c,u,d,h,p,f,m,v=e.linearGradient||e.radialGradient,b="",e=e.stops,y=[];u=e[0],m=e[e.length-1],u[0]>0&&e.unshift([0,u[1]]),1>m[0]&&e.push([1,m[1]]),Gt(e,function(e,t){o.test(e[1])?(i=un(e[1]),s=i.get("rgb"),l=i.get("a")):(s=e[1],l=1),y.push(100*e[0]+"% "+s),t?(h=l,p=s):(d=l,f=s)}),"gradient"===r?(c=v.x1||v[0]||0,e=v.y1||v[1]||0,u=v.x2||v[2]||0,v=v.y2||v[3]||0,c=90-180*ct.atan((v-e)/(u-c))/bt):(a=2*v.r,b='src="http://code.highcharts.com/gfx/radial-gradient.png" size="'+a+","+a+'" origin="0.5,0.5" position="'+v.cx+","+v.cy+'" color2="'+f+'" ',a=p),"fill"===n?(n=[''],g(this.prepVML(n),null,null,t)):a=s}else o.test(e)&&"IMG"!==t.tagName?(i=un(e),n=["<",n,' opacity="',i.get("a"),'"/>'],g(this.prepVML(n),null,null,t),a=i.get("rgb")):(t=t.getElementsByTagName(n),t.length&&(t[0].opacity=1),a=e);return a},prepVML:function(e){var t=this.isIE8,e=e.join("");return t?(e=e.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),e=-1===e.indexOf('style="')?e.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):e.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):e=e.replace("<","1&&o.css({left:t,top:n,width:i,height:r}),o},rect:function(e,t,n,i,o,a){r(e)&&(t=e.y,n=e.width,i=e.height,a=e.strokeWidth,e=e.x);var s=this.symbol("rect");return s.r=o,s.attr(s.crisp(a,e,t,pt(n,0),pt(i,0)))},invertChild:function(e,t){var i=t.style;f(e,{flip:"x",left:n(i.width)-1,top:n(i.height)-1,rotation:-90})},symbols:{arc:function(e,t,n,i,r){var o=r.start,a=r.end,s=r.r||n||i,n=mt(o),i=vt(o),l=mt(a),c=vt(a),u=r.innerR,d=.08/s,h=u&&.1/u||0;return 0===a-o?["x"]:(d>2*bt-a+o?l=-d:h>a-o&&(l=mt(o+h)),o=["wa",e-s,t-s,e+s,t+s,e+s*n,t+s*i,e+s*l,t+s*c],r.open&&o.push("M",e-u,t-u),o.push("at",e-u,t-u,e+u,t+u,e+u*l,t+u*c,e+u*n,t+u*i,"x","e"),o)},circle:function(e,t,n,i){return["wa",e,t,e+n,t+i,e+n,t+i/2,e+n,t+i/2,"e"]},rect:function(e,t,n,i,r){var o,a=e+n,s=t+i;return u(r)&&r.r?(o=ft(r.r,n,i),a=["M",e+o,t,"L",a-o,t,"wa",a-2*o,t,a,t+2*o,a-o,t,a,t+o,"L",a,s-o,"wa",a-2*o,s-2*o,a,s,a,s-o,a-o,s,"L",e+o,s,"wa",e,s-2*o,e+2*o,s,e+o,s,e,s-o,"L",e,t+o,"wa",e,t,e+2*o,t+2*o,e,t+o,e+o,t,"x","e"]):a=dn.prototype.symbols.square.apply(0,arguments),a}}};hn=function(){this.init.apply(this,arguments)},hn.prototype=Zt(dn.prototype,pn),H=hn}var fn,gn;St&&(fn=function(){},gn=function(){function e(){var e,n=t.length;for(e=0;n>e;e++)t[e]();t=[]}var t=[];return{push:function(n,i){0===t.length&&Vt(i,e),t.push(n)}}}()),H=hn||fn||dn,L.prototype={addLabel:function(){var t,n=this.axis,i=n.options,r=n.chart,o=n.horiz,s=n.categories,c=this.pos,d=i.labels,h=n.tickPositions,o=s&&o&&s.length&&!d.step&&!d.staggerLines&&!d.rotation&&r.plotWidth/h.length||!o&&r.plotWidth/2,p=c===h[0],f=c===h[h.length-1],g=s&&u(s[c])?s[c]:c,s=this.label,h=h.info;n.isDatetimeAxis&&h&&(t=i.dateTimeLabelFormats[h.higherRanks[c]||h.unitName]),this.isFirst=p,this.isLast=f,i=n.labelFormatter.call({axis:n,chart:r,isFirst:p,isLast:f,dateTimeLabelFormat:t,value:n.isLog?D(l(g)):g}),c=o&&{width:pt(1,ut(o-2*(d.padding||10)))+"px"},c=e(c,d.style),u(s)?s&&s.attr({text:i}).css(c):(o={align:d.align},a(d.rotation)&&(o.rotation=d.rotation),this.label=u(i)&&d.enabled?r.renderer.text(i,0,0,d.useHTML).attr(o).css(c).add(n.axisGroup):null)},getLabelSize:function(){var e=this.label,t=this.axis;return e?(this.labelBBox=e.getBBox(!0))[t.horiz?"height":"width"]:0},getLabelSides:function(){var e=this.axis.options.labels,t=this.labelBBox.width,e=t*{left:0,center:.5,right:1}[e.align]-e.x;return[-e,t-e]},handleOverflow:function(e,t){var n=!0,i=this.axis,r=i.chart,o=this.isFirst,a=this.isLast,s=t.x,l=i.reversed,c=i.tickPositions;if(o||a){var u=this.getLabelSides(),d=u[0],u=u[1],r=r.plotLeft,h=r+i.len,c=(i=i.ticks[c[e+(o?1:-1)]])&&i.label.xy.x+i.getLabelSides()[o?0:1];o&&!l||a&&l?r>s+d&&(s=r-d,i&&s+u>c&&(n=!1)):s+u>h&&(s=h-u,i&&c>s+d&&(n=!1)),t.x=s}return n},getPosition:function(e,t,n,i){var r=this.axis,o=r.chart,a=i&&o.oldChartHeight||o.chartHeight;return{x:e?r.translate(t+n,null,null,i)+r.transB:r.left+r.offset+(r.opposite?(i&&o.oldChartWidth||o.chartWidth)-r.right-r.left:0),y:e?a-r.bottom+r.offset-(r.opposite?r.height:0):a-r.translate(t+n,null,null,i)-r.transB}},getLabelPosition:function(e,t,i,r,o,a,s,l){var c=this.axis,d=c.transA,h=c.reversed,c=c.staggerLines,e=e+o.x-(a&&r?a*d*(h?-1:1):0),t=t+o.y-(a&&!r?a*d*(h?1:-1):0);return u(o.y)||(t+=.9*n(i.styles.lineHeight)-i.getBBox().height/2),c&&(t+=16*(s/(l||1)%c)),{x:e,y:t}},getMarkPath:function(e,t,n,i,r,o){return o.crispLine(["M",e,t,"L",e+(r?0:-n),t+(r?n:0)],i)},render:function(e,t){var n=this.axis,i=n.options,r=n.chart.renderer,o=n.horiz,a=this.type,s=this.label,l=this.pos,c=i.labels,u=this.gridLine,d=a?a+"Grid":"grid",h=a?a+"Tick":"tick",f=i[d+"LineWidth"],g=i[d+"LineColor"],m=i[d+"LineDashStyle"],v=i[h+"Length"],d=i[h+"Width"]||0,b=i[h+"Color"],y=i[h+"Position"],h=this.mark,x=c.step,k=!0,w=i.categories&&"between"===i.tickmarkPlacement?.5:0,_=this.getPosition(o,l,w,t),C=_.x,_=_.y,T=n.staggerLines;f&&(l=n.getPlotLinePath(l+w,f,t),u===$&&(u={stroke:g,"stroke-width":f},m&&(u.dashstyle=m),a||(u.zIndex=1),this.gridLine=u=f?r.path(l).attr(u).add(n.gridGroup):null),!t&&u&&l&&u[this.isNew?"attr":"animate"]({d:l})),d&&("inside"===y&&(v=-v),n.opposite&&(v=-v),a=this.getMarkPath(C,_,v,d,o,r),h?h.animate({d:a}):this.mark=r.path(a).attr({stroke:b,"stroke-width":d}).add(n.axisGroup)),s&&!isNaN(C)&&(s.xy=_=this.getLabelPosition(C,_,s,o,c,w,e,x),this.isFirst&&!p(i.showFirstLabel,1)||this.isLast&&!p(i.showLastLabel,1)?k=!1:!T&&o&&"justify"===c.overflow&&!this.handleOverflow(e,_)&&(k=!1),x&&e%x&&(k=!1),k?(s[this.isNew?"attr":"animate"](_),s.show(),this.isNew=!1):s.hide())},destroy:function(){E(this,this.axis)}},F.prototype={render:function(){var e,t=this,n=t.axis,i=n.horiz,r=(n.pointRange||0)/2,o=t.options,a=o.label,l=t.label,c=o.width,d=o.to,h=o.from,f=u(h)&&u(d),g=o.value,m=o.dashStyle,v=t.svgElem,b=[],y=o.color,x=o.zIndex,k=o.events,w=n.chart.renderer;if(n.isLog&&(h=s(h),d=s(d),g=s(g)),c)b=n.getPlotLinePath(g,c),r={stroke:y,"stroke-width":c},m&&(r.dashstyle=m);else{if(!f)return;h=pt(h,n.min-r),d=ft(d,n.max+r),b=n.getPlotBandPath(h,d,o),r={fill:y},o.borderWidth&&(r.stroke=o.borderColor,r["stroke-width"]=o.borderWidth)}if(u(x)&&(r.zIndex=x),v)b?v.animate({d:b},null,v.onGetPath):(v.hide(),v.onGetPath=function(){v.show()});else if(b&&b.length&&(t.svgElem=v=w.path(b).attr(r).add(),k))for(e in o=function(e){v.on(e,function(n){k[e].apply(t,[n])})},k)o(e);return a&&u(a.text)&&b&&b.length&&n.width>0&&n.height>0?(a=Zt({align:i&&f&&"center",x:i?!f&&4:10,verticalAlign:!i&&f&&"middle",y:i?f?16:10:f?6:-4,rotation:i&&!f&&90},a),l||(t.label=l=w.text(a.text,0,0).attr({align:a.textAlign||a.align,rotation:a.rotation,zIndex:x}).css(a.style).add()),n=[b[1],b[4],p(b[6],b[1])],b=[b[2],b[5],p(b[7],b[2])],i=C(n),f=C(b),l.align(a,!1,{x:i,y:f,width:T(n)-i,height:T(b)-f}),l.show()):l&&l.hide(),t},destroy:function(){c(this.axis.plotLinesAndBands,this),E(this,this.axis)}},N.prototype={destroy:function(){E(this,this.axis)},setTotal:function(e){this.cum=this.total=e},render:function(e){var t=this.options.formatter.call(this);this.label?this.label.attr({text:t,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(t,0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation,visibility:"hidden"}).add(e)},setOffset:function(e,t){var n=this.axis,i=n.chart,r=i.inverted,o=this.isNegative,a=n.translate(this.total,0,0,0,1),n=n.translate(0),n=gt(a-n),s=i.xAxis[0].translate(this.x)+e,i=i.plotHeight,r={x:r?o?a:a-n:s,y:r?i-s-t:o?i-a-n:i-a,width:r?n:t,height:r?t:n};this.label&&this.label.align(this.alignOptions,null,r).attr({visibility:"visible"})}},P.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:qt,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:"#6D869F",fontWeight:"bold"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{align:"right",x:-8,y:3},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Y-values"},stackLabels:{enabled:!1,formatter:function(){return this.total},style:qt.style}},defaultLeftAxisOptions:{labels:{align:"right",x:-8,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{align:"left",x:8,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{align:"center",x:0,y:14},title:{rotation:0}},defaultTopAxisOptions:{labels:{align:"center",x:0,y:-5},title:{rotation:0}},init:function(e,t){var n=t.isX;this.horiz=e.inverted?!n:n,this.xOrY=(this.isXAxis=n)?"x":"y",this.opposite=t.opposite,this.side=this.horiz?this.opposite?0:2:this.opposite?1:3,this.setOptions(t);var i=this.options,r=i.type,o="datetime"===r;this.labelFormatter=i.labels.formatter||this.defaultLabelFormatter,this.staggerLines=this.horiz&&i.labels.staggerLines,this.userOptions=t,this.minPixelPadding=0,this.chart=e,this.reversed=i.reversed,this.categories=i.categories,this.isLog="logarithmic"===r,this.isLinked=u(i.linkedTo),this.isDatetimeAxis=o,this.ticks={},this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=i.minRange||i.maxZoom,this.range=i.range,this.offset=i.offset||0,this.stacks={},this.min=this.max=null;var a,i=this.options.events;e.axes.push(this),e[n?"xAxis":"yAxis"].push(this),this.series=[],e.inverted&&n&&this.reversed===$&&(this.reversed=!0),this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine,this.addPlotLine=this.addPlotBand=this.addPlotBandOrLine;for(a in i)Qt(this,a,i[a]);this.isLog&&(this.val2lin=s,this.lin2val=l)},setOptions:function(e){this.options=Zt(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],e)},defaultLabelFormatter:function(){var e=this.axis,t=this.value,n=e.tickInterval,i=this.dateTimeLabelFormat;return e.categories?t:i?q(i,t):0===n%1e6?t/1e6+"M":0===n%1e3?t/1e3+"k":t>=1e3?v(t,0):v(t,-1)},getSeriesExtremes:function(){var e,t=this,n=t.chart,i=t.stacks,r=[],o=[];t.dataMin=t.dataMax=null,Gt(t.series,function(a){if(a.visible||!n.options.chart.ignoreHiddenSeries){var s,l,c,d,h,f,g,m,v,b,y=a.options,x=y.threshold,k=[],w=0;if(t.isLog&&0>=x&&(x=y.threshold=null),t.isXAxis)y=a.xData,y.length&&(t.dataMin=ft(p(t.dataMin,y[0]),C(y)),t.dataMax=pt(p(t.dataMax,y[0]),T(y)));else{var _,E,S,A=a.cropped,D=a.xAxis.getExtremes(),I=!!a.modifyValue;for(s=y.stacking,t.usePercentage="percent"===s,s&&(h=y.stack,d=a.type+p(h,""),f="-"+d,a.stackKey=d,l=r[d]||[],r[d]=l,c=o[f]||[],o[f]=c),t.usePercentage&&(t.dataMin=0,t.dataMax=99),y=a.processedXData,g=a.processedYData,b=g.length,e=0;b>e;e++)if(m=y[e],v=g[e],null!==v&&v!==$&&(s?(E=(_=x>v)?c:l,S=_?f:d,v=E[m]=u(E[m])?E[m]+v:v,i[S]||(i[S]={}),i[S][m]||(i[S][m]=new N(t,t.options.stackLabels,_,m,h)),i[S][m].setTotal(v)):I&&(v=a.modifyValue(v)),A||(y[e+1]||m)>=D.min&&(y[e-1]||m)<=D.max))if(m=v.length)for(;m--;)null!==v[m]&&(k[w++]=v[m]);else k[w++]=v;!t.usePercentage&&k.length&&(t.dataMin=ft(p(t.dataMin,k[0]),C(k)),t.dataMax=pt(p(t.dataMax,k[0]),T(k))),u(x)&&(t.dataMin>=x?(t.dataMin=x,t.ignoreMinPadding=!0):x>t.dataMax&&(t.dataMax=x,t.ignoreMaxPadding=!0))}}})},translate:function(e,t,n,i,r){var o=this.len,a=1,s=0,l=i?this.oldTransA:this.transA,i=i?this.oldMin:this.min,r=this.options.ordinal||this.isLog&&r;return l||(l=this.transA),n&&(a*=-1,s=o),this.reversed&&(a*=-1,s-=a*o),t?(this.reversed&&(e=o-e),e=e/l+i,r&&(e=this.lin2val(e))):(r&&(e=this.val2lin(e)),e=a*(e-i)*l+s+a*this.minPixelPadding),e},getPlotLinePath:function(e,t,n){var i,r,o,a,s=this.chart,l=this.left,c=this.top,e=this.translate(e,null,null,n),u=n&&s.oldChartHeight||s.chartHeight,d=n&&s.oldChartWidth||s.chartWidth;return i=this.transB,n=r=ut(e+i),i=o=ut(u-e-i),isNaN(e)?a=!0:this.horiz?(i=c,o=u-this.bottom,(l>n||n>l+this.width)&&(a=!0)):(n=l,r=d-this.right,(c>i||i>c+this.height)&&(a=!0)),a?null:s.renderer.crispLine(["M",n,i,"L",r,o],t||0)},getPlotBandPath:function(e,t){var n=this.getPlotLinePath(t),i=this.getPlotLinePath(e);return i&&n?i.push(n[4],n[5],n[1],n[2]):i=null,i},getLinearTickPositions:function(e,t,n){for(var i,t=D(dt(t/e)*e),n=D(ht(n/e)*e),r=[];n>=t&&(r.push(t),t=D(t+e),t!==i);)i=t;return r},getLogTickPositions:function(e,t,n,i){var r=this.options,o=this.len,a=[];if(i||(this._minorAutoInterval=null),e>=.5)e=ut(e),a=this.getLinearTickPositions(e,t,n);else if(e>=.08)for(var c,u,d,h,f,o=dt(t),r=e>.3?[1,2,4]:e>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];n+1>o&&!f;o++)for(u=r.length,c=0;u>c&&!f;c++)d=s(l(o)*r[c]),d>t&&a.push(h),h>n&&(f=!0),h=d;else t=l(t),n=l(n),e=r[i?"minorTickInterval":"tickInterval"],e=p("auto"===e?null:e,this._minorAutoInterval,(n-t)*(r.tickPixelInterval/(i?5:1))/((i?o/this.tickPositions.length:o)||1)),e=y(e,null,ct.pow(10,dt(ct.log(e)/ct.LN10))),a=Jt(this.getLinearTickPositions(e,t,n),s),i||(this._minorAutoInterval=e/5);return i||(this.tickInterval=e),a},getMinorTickPositions:function(){var e,t,n=this.tickPositions,i=this.minorTickInterval,r=[];if(this.isLog)for(t=n.length,e=1;t>e;e++)r=r.concat(this.getLogTickPositions(i,n[e-1],n[e],!0));else for(n=this.min+(n[0]-this.min)%i;this.max>=n;n+=i)r.push(n);return r},adjustForMinRange:function(){var e,t,n,i,r,o,a=this.options,s=this.min,l=this.max,c=this.dataMax-this.dataMin>=this.minRange;if(this.isXAxis&&this.minRange===$&&!this.isLog&&(u(a.min)||u(a.max)?this.minRange=null:(Gt(this.series,function(e){for(r=e.xData,n=o=e.xIncrement?1:r.length-1;n>0;n--)i=r[n]-r[n-1],(t===$||t>i)&&(t=i)}),this.minRange=ft(5*t,this.dataMax-this.dataMin))),this.minRange>l-s){var d=this.minRange;e=(d-l+s)/2,e=[s-e,p(a.min,s-e)],c&&(e[2]=this.dataMin),s=T(e),l=[s+d,p(a.max,s+d)],c&&(l[2]=this.dataMax),l=C(l),d>l-s&&(e[0]=l-d,e[1]=p(a.min,l-d),s=T(e))}this.min=s,this.max=l},setAxisTranslation:function(){var e,t,n=this.max-this.min,i=0,r=this.transA;this.isXAxis&&(this.isLinked?i=this.linkedParent.pointRange:Gt(this.series,function(n){i=pt(i,n.pointRange),t=n.closestPointRange,!n.noSharedTooltip&&u(t)&&(e=u(e)?ft(e,t):t)}),this.pointRange=i,this.closestPointRange=e),this.oldTransA=r,this.translationSlope=this.transA=r=this.len/(n+i||1),this.transB=this.horiz?this.left:this.bottom,this.minPixelPadding=r*(i/2)},setTickPositions:function(e){var t=this,n=t.chart,i=t.options,r=t.isLog,o=t.isDatetimeAxis,a=t.isXAxis,l=t.isLinked,c=t.options.tickPositioner,d=i.maxPadding,h=i.minPadding,f=i.tickInterval,g=i.tickPixelInterval,m=t.categories;l?(t.linkedParent=n[a?"xAxis":"yAxis"][i.linkedTo],n=t.linkedParent.getExtremes(),t.min=p(n.min,n.dataMin),t.max=p(n.max,n.dataMax),i.type!==t.linkedParent.options.type&&A(11,1)):(t.min=p(t.userMin,i.min,t.dataMin),t.max=p(t.userMax,i.max,t.dataMax)),r&&(!e&&0>=ft(t.min,t.dataMin)&&A(10,1),t.min=D(s(t.min)),t.max=D(s(t.max))),t.range&&(t.userMin=t.min=pt(t.min,t.max-t.range),t.userMax=t.max,e)&&(t.range=null),t.adjustForMinRange(),m||t.usePercentage||l||!u(t.min)||!u(t.max)||(n=t.max-t.min||1,u(i.min)||u(t.userMin)||!h||!(0>t.dataMin)&&t.ignoreMinPadding||(t.min-=n*h),u(i.max)||u(t.userMax)||!d||!(t.dataMax>0)&&t.ignoreMaxPadding||(t.max+=n*d)),t.tickInterval=t.min===t.max||void 0===t.min||void 0===t.max?1:l&&!f&&g===t.linkedParent.options.tickPixelInterval?t.linkedParent.tickInterval:p(f,m?1:(t.max-t.min)*g/(t.len||1)),a&&!e&&Gt(t.series,function(e){e.processData(t.min!==t.oldMin||t.max!==t.oldMax)}),t.setAxisTranslation(),t.beforeSetTickPositions&&t.beforeSetTickPositions(),t.postProcessTickInterval&&(t.tickInterval=t.postProcessTickInterval(t.tickInterval)),o||r||(e=ct.pow(10,dt(ct.log(t.tickInterval)/ct.LN10)),u(i.tickInterval))||(t.tickInterval=y(t.tickInterval,null,e,i)),t.minorTickInterval="auto"===i.minorTickInterval&&t.tickInterval?t.tickInterval/5:i.minorTickInterval,t.tickPositions=c=i.tickPositions||c&&c.apply(t,[t.min,t.max]),c||(c=o?(t.getNonLinearTimeTicks||k)(x(t.tickInterval,i.units),t.min,t.max,i.startOfWeek,t.ordinalPositions,t.closestPointRange,!0):r?t.getLogTickPositions(t.tickInterval,t.min,t.max):t.getLinearTickPositions(t.tickInterval,t.min,t.max),t.tickPositions=c),l||(r=c[0],o=c[c.length-1],i.startOnTick?t.min=r:t.min>r&&c.shift(),i.endOnTick?t.max=o:o>t.max&&c.pop())},setMaxTicks:function(){var e=this.chart,t=e.maxTicks,n=this.tickPositions,i=this.xOrY;t||(t={x:0,y:0}),!this.isLinked&&!this.isDatetimeAxis&&n.length>t[i]&&this.options.alignTicks!==!1&&(t[i]=n.length),e.maxTicks=t},adjustTickAmount:function(){var e=this.xOrY,t=this.tickPositions,n=this.chart.maxTicks;if(n&&n[e]&&!this.isDatetimeAxis&&!this.categories&&!this.isLinked&&this.options.alignTicks!==!1){var i=this.tickAmount,r=t.length;if(this.tickAmount=e=n[e],e>r){for(;e>t.length;)t.push(D(t[t.length-1]+this.tickInterval));this.transA*=(r-1)/(e-1),this.max=t[t.length-1]}u(i)&&e!==i&&(this.isDirty=!0)}},setScale:function(){var e,t,n,i,r=this.stacks;if(this.oldMin=this.min,this.oldMax=this.max,this.oldAxisLength=this.len,this.setAxisSize(),i=this.len!==this.oldAxisLength,Gt(this.series,function(e){(e.isDirtyData||e.isDirty||e.xAxis.isDirty)&&(n=!0)}),(i||n||this.isLinked||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax)&&(this.getSeriesExtremes(),this.setTickPositions(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=i||this.min!==this.oldMin||this.max!==this.oldMax)),!this.isXAxis)for(e in r)for(t in r[e])r[e][t].cum=r[e][t].total;this.setMaxTicks()},setExtremes:function(t,n,i,r,o){var a=this,s=a.chart,i=p(i,!0),o=e(o,{min:t,max:n});tn(a,"setExtremes",o,function(){a.userMin=t,a.userMax=n,a.isDirtyExtremes=!0,i&&s.redraw(r)})},setAxisSize:function(){var e=this.chart,t=this.options,n=t.offsetLeft||0,i=t.offsetRight||0;this.left=p(t.left,e.plotLeft+n),this.top=p(t.top,e.plotTop),this.width=p(t.width,e.plotWidth-n+i),this.height=p(t.height,e.plotHeight),this.bottom=e.chartHeight-this.height-this.top,this.right=e.chartWidth-this.width-this.left,this.len=pt(this.horiz?this.width:this.height,0)},getExtremes:function(){var e=this.isLog;return{min:e?D(l(this.min)):this.min,max:e?D(l(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(e){var t=this.isLog,n=t?l(this.min):this.min,t=t?l(this.max):this.max;return n>e||null===e?e=n:e>t&&(e=t),this.translate(e,0,1,0,1)},addPlotBandOrLine:function(e){return e=new F(this,e).render(),this.plotLinesAndBands.push(e),e},getOffset:function(){var e,t,n,i=this,r=i.chart,o=r.renderer,a=i.options,s=i.tickPositions,l=i.ticks,c=i.horiz,d=i.side,h=0,f=0,g=a.title,m=a.labels,v=0,b=r.axisOffset,y=[-1,1,1,-1][d];if(i.hasData=r=i.series.length&&u(i.min)&&u(i.max),i.showAxis=e=r||p(a.showEmpty,!0),i.axisGroup||(i.axisGroup=o.g("axis").attr({zIndex:a.zIndex||7}).add(),i.gridGroup=o.g("grid").attr({zIndex:a.gridZIndex||1}).add()),r||i.isLinked)Gt(s,function(e){l[e]?l[e].addLabel():l[e]=new L(i,e)}),Gt(s,function(e){(0===d||2===d||{1:"left",3:"right"}[d]===m.align)&&(v=pt(l[e].getLabelSize(),v))}),i.staggerLines&&(v+=16*(i.staggerLines-1));else for(n in l)l[n].destroy(),delete l[n];g&&g.text&&(i.axisTitle||(i.axisTitle=o.text(g.text,0,0,g.useHTML).attr({zIndex:7,rotation:g.rotation||0,align:g.textAlign||{low:"left",middle:"center",high:"right"}[g.align]}).css(g.style).add(i.axisGroup),i.axisTitle.isNew=!0),e&&(h=i.axisTitle.getBBox()[c?"height":"width"],f=p(g.margin,c?5:10),t=g.offset),i.axisTitle[e?"show":"hide"]()),i.offset=y*p(a.offset,b[d]),i.axisTitleMargin=p(t,v+f+(2!==d&&v&&y*a.labels[c?"y":"x"])),b[d]=pt(b[d],i.axisTitleMargin+h+y*i.offset)},getLinePath:function(e){var t=this.chart,n=this.opposite,i=this.offset,r=this.horiz,o=this.left+(n?this.width:0)+i,n=t.chartHeight-this.bottom-(n?this.height:0)+i;return t.renderer.crispLine(["M",r?this.left:o,r?n:this.top,"L",r?t.chartWidth-this.right:o,r?n:t.chartHeight-this.bottom],e)},getTitlePosition:function(){var e=this.horiz,t=this.left,i=this.top,r=this.len,o=this.options.title,a=e?t:i,s=this.opposite,l=this.offset,c=n(o.style.fontSize||12),r={low:a+(e?0:r),middle:a+r/2,high:a+(e?r:0)}[o.align],t=(e?i+this.height:t)+(e?1:-1)*(s?-1:1)*this.axisTitleMargin+(2===this.side?c:0);return{x:e?r:t+(s?this.width:0)+l+(o.x||0),y:e?t-(s?this.height:0)+l:r+(o.y||0)}},render:function(){var e,t,n,i=this,r=i.chart,o=r.renderer,a=i.options,s=i.isLog,c=i.isLinked,d=i.tickPositions,h=i.axisTitle,p=i.stacks,f=i.ticks,g=i.minorTicks,m=i.alternateBands,v=a.stackLabels,b=a.alternateGridColor,y=a.lineWidth,x=r.hasRendered&&u(i.oldMin)&&!isNaN(i.oldMin),k=i.showAxis;if((i.hasData||c)&&(i.minorTickInterval&&!i.categories&&Gt(i.getMinorTickPositions(),function(e){g[e]||(g[e]=new L(i,e,"minor")),x&&g[e].isNew&&g[e].render(null,!0),g[e].isActive=!0,g[e].render()}),Gt(d.slice(1).concat([d[0]]),function(e,t){t=t===d.length-1?0:t+1,(!c||e>=i.min&&i.max>=e)&&(f[e]||(f[e]=new L(i,e)),x&&f[e].isNew&&f[e].render(t,!0),f[e].isActive=!0,f[e].render(t))}),b&&Gt(d,function(e,r){0===r%2&&i.max>e&&(m[e]||(m[e]=new F(i)),t=e,n=d[r+1]!==$?d[r+1]:i.max,m[e].options={from:s?l(t):t,to:s?l(n):n,color:b},m[e].render(),m[e].isActive=!0)}),i._addedPlotLB||(Gt((a.plotLines||[]).concat(a.plotBands||[]),function(e){i.addPlotBandOrLine(e)}),i._addedPlotLB=!0)),Gt([f,g,m],function(e){for(var t in e)e[t].isActive?e[t].isActive=!1:(e[t].destroy(),delete e[t])}),y&&(e=i.getLinePath(y),i.axisLine?i.axisLine.animate({d:e}):i.axisLine=o.path(e).attr({stroke:a.lineColor,"stroke-width":y,zIndex:7}).add(),i.axisLine[k?"show":"hide"]()),h&&k&&(h[h.isNew?"attr":"animate"](i.getTitlePosition()),h.isNew=!1),v&&v.enabled){var w,_,a=i.stackTotalGroup;a||(i.stackTotalGroup=a=o.g("stack-labels").attr({visibility:"visible",zIndex:6}).add()),a.translate(r.plotLeft,r.plotTop);for(w in p)for(_ in r=p[w])r[_].render(a)}i.isDirty=!1},removePlotBandOrLine:function(e){for(var t=this.plotLinesAndBands,n=t.length;n--;)t[n].id===e&&t[n].destroy()},setTitle:function(e,t){var n=this.chart,i=this.options;i.title=Zt(i.title,e),this.axisTitle=void 0,this.isDirty=!0,p(t,!0)&&n.redraw()},redraw:function(){var e=this.chart;e.tracker.resetTracker&&e.tracker.resetTracker(!0),this.render(),Gt(this.plotLinesAndBands,function(e){e.render()}),Gt(this.series,function(e){e.isDirty=!0})},setCategories:function(e,t){var n=this.chart;this.categories=this.userOptions.categories=e,Gt(this.series,function(e){e.translate(),e.setTooltipPoints(!0)}),this.isDirty=!0,p(t,!0)&&n.redraw()},destroy:function(){var e,t=this,n=t.stacks;en(t);for(e in n)E(n[e]),n[e]=null;Gt([t.ticks,t.minorTicks,t.alternateBands,t.plotLinesAndBands],function(e){E(e)}),Gt(["stackTotalGroup","axisLine","axisGroup","gridGroup","axisTitle"],function(e){t[e]&&(t[e]=t[e].destroy())})}},M.prototype={destroy:function(){Gt(this.crosshairs,function(e){e&&e.destroy()}),this.label&&(this.label=this.label.destroy())},move:function(e,t){var n=this;n.currentX=n.tooltipIsHidden?e:(2*n.currentX+e)/3,n.currentY=n.tooltipIsHidden?t:(n.currentY+t)/2,n.label.attr({x:n.currentX,y:n.currentY}),n.tooltipTick=gt(e-n.currentX)>1||gt(t-n.currentY)>1?function(){n.move(e,t)}:null},hide:function(){if(!this.tooltipIsHidden){var e=this.chart.hoverPoints;this.label.hide(),e&&Gt(e,function(e){e.setState()}),this.chart.hoverPoints=null,this.tooltipIsHidden=!0}},hideCrosshairs:function(){Gt(this.crosshairs,function(e){e&&e.hide()})},getAnchor:function(e,t){var n,i=this.chart,r=i.inverted,o=0,a=0,e=h(e);return n=e[0].tooltipPos,n||(Gt(e,function(e){o+=e.plotX,a+=e.plotLow?(e.plotLow+e.plotHigh)/2:e.plotY}),o/=e.length,a/=e.length,n=[r?i.plotWidth-a:o,this.shared&&!r&&e.length>1&&t?t.chartY-i.plotTop:r?i.plotHeight-o:a]),Jt(n,ut)},getPosition:function(e,t,n){var i,r=this.chart,o=r.plotLeft,a=r.plotTop,s=r.plotWidth,l=r.plotHeight,c=p(this.options.distance,12),u=n.plotX,n=n.plotY,r=u+o+(r.inverted?c:-e-c),d=n-t+a+15;return 7>r&&(r=o+u+c),r+e>o+s&&(r-=r+e-(o+s),d=n-t+a-c,i=!0),a+5>d&&(d=a+5,i&&n>=d&&d+t>=n&&(d=n+a+c)),d+t>a+l&&(d=a+l-t-c),{x:r,y:d}},refresh:function(e,t){function n(){var e,t=this.points||h(this),n=t[0].series;return e=[n.tooltipHeaderFormatter(t[0].key)],Gt(t,function(t){n=t.series,e.push(n.tooltipFormatter&&n.tooltipFormatter(t)||t.point.tooltipFormatter(n.tooltipOptions.pointFormat))}),e.push(c.footerFormat||""),e.join("")}var i,r,o,a,s=this.chart,l=this.label,c=this.options,u={},d=[];a=c.formatter||n;var f,u=s.hoverPoints,g=c.crosshairs;if(o=this.shared,r=this.getAnchor(e,t),i=r[0],r=r[1],!o||e.series&&e.series.noSharedTooltip?u=e.getLabelConfig():(u&&Gt(u,function(e){e.setState()}),s.hoverPoints=e,Gt(e,function(e){e.setState("hover"),d.push(e.getLabelConfig())}),u={x:e[0].category},u.points=d,e=e[0]),a=a.call(u),u=e.series,o=o||!u.isCartesian||u.tooltipOutsidePlot||s.isInsidePlot(i,r),a!==!1&&o?(this.tooltipIsHidden&&l.show(),l.attr({text:a}),f=c.borderColor||e.color||u.color||"#606060",l.attr({stroke:f}),l=(c.positioner||this.getPosition).call(this,l.width,l.height,{plotX:i,plotY:r}),this.move(ut(l.x),ut(l.y)),this.tooltipIsHidden=!1):this.hide(),g)for(g=h(g),l=g.length;l--;)o=e.series[l?"yAxis":"xAxis"],g[l]&&o&&(o=o.getPlotLinePath(l?p(e.stackY,e.y):e.x,1),this.crosshairs[l]?this.crosshairs[l].attr({d:o,visibility:"visible"}):(u={"stroke-width":g[l].width||1,stroke:g[l].color||"#C0C0C0",zIndex:g[l].zIndex||2},g[l].dashStyle&&(u.dashstyle=g[l].dashStyle),this.crosshairs[l]=s.renderer.path(o).attr(u).add()));tn(s,"tooltipRefresh",{text:a,x:i+s.plotLeft,y:r+s.plotTop,borderColor:f})},tick:function(){this.tooltipTick&&this.tooltipTick()}},B.prototype={normalizeMouseEvent:function(t){var n,i,r,t=t||lt.event;return t.target||(t.target=t.srcElement),t.originalEvent&&(t=t.originalEvent),t.event&&(t=t.event),r=t.touches?t.touches.item(0):t,this.chartPosition=n=Yt(this.chart.container),r.pageX===$?(i=t.x,n=t.y):(i=r.pageX-n.left,n=r.pageY-n.top),e(t,{chartX:ut(i),chartY:ut(n)})},getMouseCoordinates:function(e){var t={xAxis:[],yAxis:[]},n=this.chart;return Gt(n.axes,function(i){var r=i.isXAxis;t[r?"xAxis":"yAxis"].push({axis:i,value:i.translate((n.inverted?!r:r)?e.chartX-n.plotLeft:n.plotHeight-e.chartY+n.plotTop,!0)})}),t},onmousemove:function(e){var t,n,i,r,o=this.chart,a=o.series,s=o.hoverPoint,l=o.hoverSeries,c=o.chartWidth,u=o.inverted?o.plotHeight+o.plotTop-e.chartY:e.chartX-o.plotLeft;if(o.tooltip&&this.options.tooltip.shared&&(!l||!l.noSharedTooltip)){for(n=[],i=a.length,r=0;i>r;r++)a[r].visible&&a[r].options.enableMouseTracking!==!1&&!a[r].noSharedTooltip&&a[r].tooltipPoints.length&&(t=a[r].tooltipPoints[u],t._dist=gt(u-t.plotX),c=ft(c,t._dist),n.push(t));for(i=n.length;i--;)n[i]._dist>c&&n.splice(i,1);n.length&&n[0].plotX!==this.hoverX&&(o.tooltip.refresh(n,e),this.hoverX=n[0].plotX)}l&&l.tracker&&(t=l.tooltipPoints[u])&&t!==s&&t.onMouseOver()},resetTracker:function(e){var t=this.chart,n=t.hoverSeries,i=t.hoverPoint,r=t.hoverPoints||i,t=t.tooltip;e&&t&&r?t.refresh(r):(i&&i.onMouseOut(),n&&n.onMouseOut(),t&&(t.hide(),t.hideCrosshairs()),this.hoverX=null)
},setDOMEvents:function(){function t(){if(i.selectionMarker){var e,a={xAxis:[],yAxis:[]},s=i.selectionMarker.getBBox(),l=s.x-r.plotLeft,c=s.y-r.plotTop;n&&(Gt(r.axes,function(t){if(t.options.zoomEnabled!==!1){var n=t.isXAxis,i=r.inverted?!n:n,o=t.translate(i?l:r.plotHeight-c-s.height,!0,0,0,1),i=t.translate(i?l+s.width:r.plotHeight-c,!0,0,0,1);!isNaN(o)&&!isNaN(i)&&(a[n?"xAxis":"yAxis"].push({axis:t,min:ft(o,i),max:pt(o,i)}),e=!0)}}),e&&tn(r,"selection",a,function(e){r.zoom(e)})),i.selectionMarker=i.selectionMarker.destroy()}r&&(f(o,{cursor:"auto"}),r.cancelClick=n,r.mouseIsDown=n=!1),en(st,At?"touchend":"mouseup",t)}var n,i=this,r=i.chart,o=r.container,a=i.zoomX&&!r.inverted||i.zoomY&&r.inverted,s=i.zoomY&&!r.inverted||i.zoomX&&r.inverted;i.hideTooltipOnMouseMove=function(e){nn(e),i.chartPosition&&r.hoverSeries&&r.hoverSeries.isCartesian&&!r.isInsidePlot(e.pageX-i.chartPosition.left-r.plotLeft,e.pageY-i.chartPosition.top-r.plotTop)&&i.resetTracker()},i.hideTooltipOnMouseLeave=function(){i.resetTracker(),i.chartPosition=null},o.onmousedown=function(e){e=i.normalizeMouseEvent(e),!At&&e.preventDefault&&e.preventDefault(),r.mouseIsDown=!0,r.cancelClick=!1,r.mouseDownX=i.mouseDownX=e.chartX,i.mouseDownY=e.chartY,Qt(st,At?"touchend":"mouseup",t)};var l=function(e){if(!(e&&e.touches&&e.touches.length>1)){e=i.normalizeMouseEvent(e),At||(e.returnValue=!1);var t=e.chartX,o=e.chartY,l=!r.isInsidePlot(t-r.plotLeft,o-r.plotTop);if(At&&"touchstart"===e.type&&(d(e.target,"isTracker")?r.runTrackerClick||e.preventDefault():!r.runChartClick&&!l&&e.preventDefault()),l&&(r.plotLeft>t?t=r.plotLeft:t>r.plotLeft+r.plotWidth&&(t=r.plotLeft+r.plotWidth),r.plotTop>o?o=r.plotTop:o>r.plotTop+r.plotHeight&&(o=r.plotTop+r.plotHeight)),r.mouseIsDown&&"touchstart"!==e.type){if(n=Math.sqrt(Math.pow(i.mouseDownX-t,2)+Math.pow(i.mouseDownY-o,2)),n>10){if(e=r.isInsidePlot(i.mouseDownX-r.plotLeft,i.mouseDownY-r.plotTop),r.hasCartesianSeries&&(i.zoomX||i.zoomY)&&e&&!i.selectionMarker&&(i.selectionMarker=r.renderer.rect(r.plotLeft,r.plotTop,a?1:r.plotWidth,s?1:r.plotHeight,0).attr({fill:i.options.chart.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add()),i.selectionMarker&&a){var c=t-i.mouseDownX;i.selectionMarker.attr({width:gt(c),x:(c>0?0:c)+i.mouseDownX})}i.selectionMarker&&s&&(o-=i.mouseDownY,i.selectionMarker.attr({height:gt(o),y:(o>0?0:o)+i.mouseDownY})),e&&!i.selectionMarker&&i.options.chart.panning&&r.pan(t)}}else l||i.onmousemove(e);return l||!r.hasCartesianSeries}};o.onmousemove=l,Qt(o,"mouseleave",i.hideTooltipOnMouseLeave),Qt(st,"mousemove",i.hideTooltipOnMouseMove),o.ontouchstart=function(e){(i.zoomX||i.zoomY)&&o.onmousedown(e),l(e)},o.ontouchmove=l,o.ontouchend=function(){n&&i.resetTracker()},o.onclick=function(t){var n,o,a=r.hoverPoint,t=i.normalizeMouseEvent(t);t.cancelBubble=!0,r.cancelClick||(a&&(d(t.target,"isTracker")||d(t.target.parentNode,"isTracker"))?(n=a.plotX,o=a.plotY,e(a,{pageX:i.chartPosition.left+r.plotLeft+(r.inverted?r.plotWidth-o:n),pageY:i.chartPosition.top+r.plotTop+(r.inverted?r.plotHeight-n:o)}),tn(a.series,"click",e(t,{point:a})),a.firePointEvent("click",t)):(e(t,i.getMouseCoordinates(t)),r.isInsidePlot(t.chartX-r.plotLeft,t.chartY-r.plotTop)&&tn(r,"click",t)))}},destroy:function(){var e=this.chart,t=e.container;e.trackerGroup&&(e.trackerGroup=e.trackerGroup.destroy()),en(t,"mouseleave",this.hideTooltipOnMouseLeave),en(st,"mousemove",this.hideTooltipOnMouseMove),t.onclick=t.onmousedown=t.onmousemove=t.ontouchstart=t.ontouchend=t.ontouchmove=null,clearInterval(this.tooltipInterval)},init:function(e,t){e.trackerGroup||(e.trackerGroup=e.renderer.g("tracker").attr({zIndex:9}).add()),t.enabled&&(e.tooltip=new M(e,t),this.tooltipInterval=setInterval(function(){e.tooltip.tick()},32)),this.setDOMEvents()}},j.prototype={init:function(e){var t=this,i=t.options=e.options.legend;if(i.enabled){var r=i.itemStyle,o=p(i.padding,8),a=i.itemMarginTop||0;t.baseline=n(r.fontSize)+3+a,t.itemStyle=r,t.itemHiddenStyle=Zt(r,i.itemHiddenStyle),t.itemMarginTop=a,t.padding=o,t.initialItemX=o,t.initialItemY=o-5,t.maxItemWidth=0,t.chart=e,t.itemHeight=0,t.lastLineHeight=0,t.render(),Qt(t.chart,"endResize",function(){t.positionCheckboxes()})}},colorizeItem:function(e,t){var n=this.options,i=e.legendItem,r=e.legendLine,o=e.legendSymbol,a=this.itemHiddenStyle.color,n=t?n.itemStyle.color:a,a=t?e.color:a;i&&i.css({fill:n}),r&&r.attr({stroke:a}),o&&o.attr({stroke:a,fill:a})},positionItem:function(e){var t=this.options,n=t.symbolPadding,t=!t.rtl,i=e._legendItemPos,r=i[0],i=i[1],o=e.checkbox;e.legendGroup&&e.legendGroup.translate(t?r:this.legendWidth-r-2*n-4,i),o&&(o.x=r,o.y=i)},destroyItem:function(e){var t=e.checkbox;Gt(["legendItem","legendLine","legendSymbol","legendGroup"],function(t){e[t]&&e[t].destroy()}),t&&S(e.checkbox)},destroy:function(){var e=this.group,t=this.box;t&&(this.box=t.destroy()),e&&(this.group=e.destroy())},positionCheckboxes:function(){var e=this;Gt(e.allItems,function(t){var n=t.checkbox,i=e.group.alignAttr;n&&f(n,{left:i.translateX+t.legendItemWidth+n.x-20+"px",top:i.translateY+n.y+3+"px"})})},renderItem:function(e){var t,n=this,i=n.chart,r=i.renderer,o=n.options,a="horizontal"===o.layout,s=o.symbolWidth,l=o.symbolPadding,c=n.itemStyle,u=n.itemHiddenStyle,d=n.padding,h=!o.rtl,p=o.width,f=o.itemMarginBottom||0,m=n.itemMarginTop,v=n.initialItemX,b=e.legendItem,y=e.series||e,x=y.options,k=x.showCheckbox;!b&&(e.legendGroup=r.g("legend-item").attr({zIndex:1}).add(n.scrollGroup),y.drawLegendSymbol(n,e),e.legendItem=b=r.text(o.labelFormatter.call(e),h?s+l:-l,n.baseline,o.useHTML).css(e.visible?c:u).attr({align:h?"left":"right",zIndex:2}).add(e.legendGroup),e.legendGroup.on("mouseover",function(){e.setState("hover"),b.css(n.options.itemHoverStyle)}).on("mouseout",function(){b.css(e.visible?c:u),e.setState()}).on("click",function(){var t=function(){e.setVisible()};e.firePointEvent?e.firePointEvent("legendItemClick",null,t):tn(e,"legendItemClick",null,t)}),n.colorizeItem(e,e.visible),x&&k)&&(e.checkbox=g("input",{type:"checkbox",checked:e.selected,defaultChecked:e.selected},o.itemCheckboxStyle,i.container),Qt(e.checkbox,"click",function(t){tn(e,"checkboxClick",{checked:t.target.checked},function(){e.select()})})),r=b.getBBox(),t=e.legendItemWidth=o.itemWidth||s+l+r.width+d+(k?20:0),o=t,n.itemHeight=s=r.height,a&&n.itemX-v+o>(p||i.chartWidth-2*d-v)&&(n.itemX=v,n.itemY+=m+n.lastLineHeight+f,n.lastLineHeight=0),n.maxItemWidth=pt(n.maxItemWidth,o),n.lastItemY=m+n.itemY+f,n.lastLineHeight=pt(s,n.lastLineHeight),e._legendItemPos=[n.itemX,n.itemY],a?n.itemX+=o:(n.itemY+=m+s+f,n.lastLineHeight=s),n.offsetWidth=p||pt(a?n.itemX-v:o,n.offsetWidth)},render:function(){var t,n,i,r,o=this,a=o.chart,s=a.renderer,l=o.group,c=o.box,u=o.options,d=o.padding,h=u.borderWidth,p=u.backgroundColor;o.itemX=o.initialItemX,o.itemY=o.initialItemY,o.offsetWidth=0,o.lastItemY=0,l||(o.group=l=s.g("legend").attr({zIndex:7}).add(),o.contentGroup=s.g().attr({zIndex:1}).add(l),o.scrollGroup=s.g().add(o.contentGroup),o.clipRect=s.clipRect(0,0,a.chartWidth,a.chartHeight),o.contentGroup.clip(o.clipRect)),t=[],Gt(a.series,function(e){var n=e.options;n.showInLegend&&(t=t.concat(e.legendItems||("point"===n.legendType?e.data:e)))}),_(t,function(e,t){return(e.options.legendIndex||0)-(t.options.legendIndex||0)}),u.reversed&&t.reverse(),o.allItems=t,o.display=n=!!t.length,Gt(t,function(e){o.renderItem(e)}),i=u.width||o.offsetWidth,r=o.lastItemY+o.lastLineHeight,r=o.handleOverflow(r),(h||p)&&(i+=d,r+=d,c?i>0&&r>0&&(c[c.isNew?"attr":"animate"](c.crisp(null,null,null,i,r)),c.isNew=!1):(o.box=c=s.rect(0,0,i,r,u.borderRadius,h||0).attr({stroke:u.borderColor,"stroke-width":h||0,fill:p||Lt}).add(l).shadow(u.shadow),c.isNew=!0),c[n?"show":"hide"]()),o.legendWidth=i,o.legendHeight=r,Gt(t,function(e){o.positionItem(e)}),n&&l.align(e({width:i,height:r},u),!0,a.spacingBox),a.isResizing||this.positionCheckboxes()},handleOverflow:function(e){var t=this,n=this.chart,i=n.renderer,r=this.options,o=r.y,o=n.spacingBox.height+("top"===r.verticalAlign?-o:o)-this.padding,a=this.clipRect,s=r.navigation,l=p(s.animation,!0),c=s.arrowSize||12,u=this.nav;return"horizontal"===r.layout&&(o/=2),e>o?(this.clipHeight=n=o-20,this.pageCount=ht(e/n),this.currentPage=p(this.currentPage,1),this.fullHeight=e,a.attr({height:n}),u||(this.nav=u=i.g().attr({zIndex:1}).add(this.group),this.up=i.symbol("triangle",0,0,c,c).on("click",function(){t.scroll(-1,l)}).add(u),this.pager=i.text("",15,10).css(s.style).add(u),this.down=i.symbol("triangle-down",0,0,c,c).on("click",function(){t.scroll(1,l)}).add(u)),t.scroll(0),e=o):u&&(a.attr({height:n.chartHeight}),u.hide(),this.scrollGroup.attr({translateY:1})),e},scroll:function(e,t){var n=this.pageCount,i=this.currentPage+e,r=this.clipHeight,o=this.options.navigation,a=o.activeColor,o=o.inactiveColor,s=this.pager,l=this.padding;i>n&&(i=n),i>0&&(t!==$&&I(t,this.chart),this.nav.attr({translateX:l,translateY:r+7,visibility:"visible"}),this.up.attr({fill:1===i?o:a}).css({cursor:1===i?"default":"pointer"}),s.attr({text:i+"/"+this.pageCount}),this.down.attr({x:18+this.pager.getBBox().width,fill:i===n?o:a}).css({cursor:i===n?"default":"pointer"}),this.scrollGroup.animate({translateY:-ft(r*(i-1),this.fullHeight-r+l)+1}),s.attr({text:i+"/"+n}),this.currentPage=i)}},z.prototype={initSeries:function(e){var t=this.options.chart,t=new Kt[e.type||t.type||t.defaultSeriesType];return t.init(this,e),t},addSeries:function(e,t,n){var i=this;e&&(I(n,i),t=p(t,!0),tn(i,"addSeries",{options:e},function(){i.initSeries(e),i.isDirtyLegend=!0,t&&i.redraw()}))},isInsidePlot:function(e,t){return e>=0&&this.plotWidth>=e&&t>=0&&this.plotHeight>=t},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&Gt(this.axes,function(e){e.adjustTickAmount()}),this.maxTicks=null},redraw:function(e){var t,n=this.axes,i=this.series,r=this.tracker,o=this.legend,a=this.isDirtyLegend,s=this.isDirtyBox,l=i.length,c=l,u=this.clipRect,d=this.renderer,h=d.isHidden();for(I(e,this),h&&this.cloneRenderTo();c--;)if(e=i[c],e.isDirty&&e.options.stacking){t=!0;break}if(t)for(c=l;c--;)e=i[c],e.options.stacking&&(e.isDirty=!0);Gt(i,function(e){e.isDirty&&"point"===e.options.legendType&&(a=!0)}),a&&o.options.enabled&&(o.render(),this.isDirtyLegend=!1),this.hasCartesianSeries&&(this.isResizing||(this.maxTicks=null,Gt(n,function(e){e.setScale()})),this.adjustTickAmounts(),this.getMargins(),Gt(n,function(e){e.isDirtyExtremes&&(e.isDirtyExtremes=!1,tn(e,"afterSetExtremes",e.getExtremes())),(e.isDirty||s||t)&&(e.redraw(),s=!0)})),s&&(this.drawChartBox(),u&&(on(u),u.animate({width:this.plotSizeX,height:this.plotSizeY+1}))),Gt(i,function(e){e.isDirty&&e.visible&&(!e.isCartesian||e.xAxis)&&e.redraw()}),r&&r.resetTracker&&r.resetTracker(!0),d.draw(),tn(this,"redraw"),h&&this.cloneRenderTo(!0)},showLoading:function(t){var n=this.options,i=this.loadingDiv,r=n.loading;i||(this.loadingDiv=i=g(Ot,{className:"highcharts-loading"},e(r.style,{left:this.plotLeft+"px",top:this.plotTop+"px",width:this.plotWidth+"px",height:this.plotHeight+"px",zIndex:10,display:Lt}),this.container),this.loadingSpan=g("span",null,r.labelStyle,i)),this.loadingSpan.innerHTML=t||n.lang.loading,this.loadingShown||(f(i,{opacity:0,display:""}),rn(i,{opacity:r.style.opacity},{duration:r.showDuration||0}),this.loadingShown=!0)},hideLoading:function(){var e=this.options,t=this.loadingDiv;t&&rn(t,{opacity:0},{duration:e.loading.hideDuration||100,complete:function(){f(t,{display:Lt})}}),this.loadingShown=!1},get:function(e){var t,n,i=this.axes,r=this.series;for(t=0;i.length>t;t++)if(i[t].options.id===e)return i[t];for(t=0;r.length>t;t++)if(r[t].options.id===e)return r[t];for(t=0;r.length>t;t++)for(n=r[t].points||[],i=0;n.length>i;i++)if(n[i].id===e)return n[i];return null},getAxes:function(){var e=this,t=this.options,n=t.xAxis||{},t=t.yAxis||{},n=h(n);Gt(n,function(e,t){e.index=t,e.isX=!0}),t=h(t),Gt(t,function(e,t){e.index=t}),n=n.concat(t),Gt(n,function(t){new P(e,t)}),e.adjustTickAmounts()},getSelectedPoints:function(){var e=[];return Gt(this.series,function(t){e=e.concat(Xt(t.points,function(e){return e.selected}))}),e},getSelectedSeries:function(){return Xt(this.series,function(e){return e.selected})},showResetZoom:function(){var e=this,t=W.lang,n=e.options.chart.resetZoomButton,i=n.theme,r=i.states,o="chart"===n.relativeTo?null:{x:e.plotLeft,y:e.plotTop,width:e.plotWidth,height:e.plotHeight};this.resetZoomButton=e.renderer.button(t.resetZoom,null,null,function(){e.zoomOut()},i,r&&r.hover).attr({align:n.position.align,title:t.resetZoomTitle}).add().align(n.position,!1,o)},zoomOut:function(){var e=this,t=e.resetZoomButton;tn(e,"selection",{resetSelection:!0},function(){e.zoom()}),t&&(e.resetZoomButton=t.destroy())},zoom:function(e){var t,n=this,i=n.options.chart;n.resetZoomEnabled!==!1&&!n.resetZoomButton&&n.showResetZoom(),!e||e.resetSelection?Gt(n.axes,function(e){e.options.zoomEnabled!==!1&&(e.setExtremes(null,null,!1),t=!0)}):Gt(e.xAxis.concat(e.yAxis),function(e){var i=e.axis;n.tracker[i.isXAxis?"zoomX":"zoomY"]&&(i.setExtremes(e.min,e.max,!1),t=!0)}),t&&n.redraw(p(i.animation,100>n.pointCount))},pan:function(e){var t=this.xAxis[0],n=this.mouseDownX,i=t.pointRange/2,r=t.getExtremes(),o=t.translate(n-e,!0)+i,n=t.translate(n+this.plotWidth-e,!0)-i;(i=this.hoverPoints)&&Gt(i,function(e){e.setState()}),o>ft(r.dataMin,r.min)&&pt(r.dataMax,r.max)>n&&t.setExtremes(o,n,!0,!1),this.mouseDownX=e,f(this.container,{cursor:"move"})},setTitle:function(e,t){var n,i=this,r=i.options;i.chartTitleOptions=n=Zt(r.title,e),i.chartSubtitleOptions=r=Zt(r.subtitle,t),Gt([["title",e,n],["subtitle",t,r]],function(e){var t=e[0],n=i[t],r=e[1],e=e[2];n&&r&&(n=n.destroy()),e&&e.text&&!n&&(i[t]=i.renderer.text(e.text,0,0,e.useHTML).attr({align:e.align,"class":"highcharts-"+t,zIndex:e.zIndex||4}).css(e.style).add().align(e,!1,i.spacingBox))})},getChartSize:function(){var e=this.options.chart,t=this.renderToClone||this.renderTo;this.containerWidth=Ut(t,"width"),this.containerHeight=Ut(t,"height"),this.chartWidth=e.width||this.containerWidth||600,this.chartHeight=e.height||(this.containerHeight>19?this.containerHeight:400)},cloneRenderTo:function(e){var t=this.renderToClone,n=this.container;e?t&&(this.renderTo.appendChild(n),S(t),delete this.renderToClone):(n&&this.renderTo.removeChild(n),this.renderToClone=t=this.renderTo.cloneNode(0),f(t,{position:"absolute",top:"-9999px",display:"block"}),st.body.appendChild(t),n&&t.appendChild(n))},getContainer:function(){var t,n,r,o,a=this.options.chart;this.renderTo=t=a.renderTo,o="highcharts-"+It++,i(t)&&(this.renderTo=t=st.getElementById(t)),t||A(13,!0),t.innerHTML="",t.offsetWidth||this.cloneRenderTo(),this.getChartSize(),n=this.chartWidth,r=this.chartHeight,this.container=t=g(Ot,{className:"highcharts-container"+(a.className?" "+a.className:""),id:o},e({position:"relative",overflow:"hidden",width:n+"px",height:r+"px",textAlign:"left",lineHeight:"normal"},a.style),this.renderToClone||t),this.renderer=a.forExport?new dn(t,n,r,!0):new H(t,n,r),St&&this.renderer.create(this,t,n,r)},getMargins:function(){var e,t=this.options.chart,n=t.spacingTop,i=t.spacingRight,r=t.spacingBottom,t=t.spacingLeft,o=this.legend,a=this.optionsMarginTop,s=this.optionsMarginLeft,l=this.optionsMarginRight,c=this.optionsMarginBottom,d=this.chartTitleOptions,h=this.chartSubtitleOptions,f=this.options.legend,g=p(f.margin,10),m=f.x,v=f.y,b=f.align,y=f.verticalAlign;this.resetMargins(),e=this.axisOffset,!this.title&&!this.subtitle||u(this.optionsMarginTop)||(h=pt(this.title&&!d.floating&&!d.verticalAlign&&d.y||0,this.subtitle&&!h.floating&&!h.verticalAlign&&h.y||0))&&(this.plotTop=pt(this.plotTop,h+p(d.margin,15)+n)),o.display&&!f.floating&&("right"===b?u(l)||(this.marginRight=pt(this.marginRight,o.legendWidth-m+g+i)):"left"===b?u(s)||(this.plotLeft=pt(this.plotLeft,o.legendWidth+m+g+t)):"top"===y?u(a)||(this.plotTop=pt(this.plotTop,o.legendHeight+v+g+n)):"bottom"!==y||u(c)||(this.marginBottom=pt(this.marginBottom,o.legendHeight-v+g+r))),this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin),this.extraTopMargin&&(this.plotTop+=this.extraTopMargin),this.hasCartesianSeries&&Gt(this.axes,function(e){e.getOffset()}),u(s)||(this.plotLeft+=e[3]),u(a)||(this.plotTop+=e[0]),u(c)||(this.marginBottom+=e[2]),u(l)||(this.marginRight+=e[1]),this.setChartSize()},initReflow:function(){function e(e){var o=i.width||Ut(r,"width"),a=i.height||Ut(r,"height"),e=e?e.target:lt;o&&a&&(e===lt||e===st)&&((o!==n.containerWidth||a!==n.containerHeight)&&(clearTimeout(t),t=setTimeout(function(){n.resize(o,a,!1)},100)),n.containerWidth=o,n.containerHeight=a)}var t,n=this,i=n.options.chart,r=n.renderTo;Qt(lt,"resize",e),Qt(n,"destroy",function(){en(lt,"resize",e)})},fireEndResize:function(){var e=this;e&&tn(e,"endResize",null,function(){e.isResizing-=1})},resize:function(e,t,n){var i,r,o=this.spacingBox,a=this.title,s=this.subtitle;this.isResizing+=1,I(n,this),this.oldChartHeight=this.chartHeight,this.oldChartWidth=this.chartWidth,u(e)&&(this.chartWidth=i=ut(e)),u(t)&&(this.chartHeight=r=ut(t)),f(this.container,{width:i+"px",height:r+"px"}),this.renderer.setSize(i,r,n),this.plotWidth=i-this.plotLeft-this.marginRight,this.plotHeight=r-this.plotTop-this.marginBottom,this.maxTicks=null,Gt(this.axes,function(e){e.isDirty=!0,e.setScale()}),Gt(this.series,function(e){e.isDirty=!0}),this.isDirtyBox=this.isDirtyLegend=!0,this.getMargins(),a&&a.align(null,null,o),s&&s.align(null,null,o),this.redraw(n),this.oldChartHeight=null,tn(this,"resize"),U===!1?this.fireEndResize():setTimeout(this.fireEndResize,U&&U.duration||500)},setChartSize:function(){var e=this.inverted,t=this.chartWidth,n=this.chartHeight,i=this.options.chart,r=i.spacingTop,o=i.spacingRight,a=i.spacingBottom,i=i.spacingLeft;this.plotLeft=ut(this.plotLeft),this.plotTop=ut(this.plotTop),this.plotWidth=ut(t-this.plotLeft-this.marginRight),this.plotHeight=ut(n-this.plotTop-this.marginBottom),this.plotSizeX=e?this.plotHeight:this.plotWidth,this.plotSizeY=e?this.plotWidth:this.plotHeight,this.spacingBox={x:i,y:r,width:t-i-o,height:n-r-a},Gt(this.axes,function(e){e.setAxisSize(),e.setAxisTranslation()})},resetMargins:function(){var e=this.options.chart,t=e.spacingRight,n=e.spacingBottom,i=e.spacingLeft;this.plotTop=p(this.optionsMarginTop,e.spacingTop),this.marginRight=p(this.optionsMarginRight,t),this.marginBottom=p(this.optionsMarginBottom,n),this.plotLeft=p(this.optionsMarginLeft,i),this.axisOffset=[0,0,0,0]},drawChartBox:function(){var e,t=this.options.chart,n=this.renderer,i=this.chartWidth,r=this.chartHeight,o=this.chartBackground,a=this.plotBackground,s=this.plotBorder,l=this.plotBGImage,c=t.borderWidth||0,u=t.backgroundColor,d=t.plotBackgroundColor,h=t.plotBackgroundImage,p={x:this.plotLeft,y:this.plotTop,width:this.plotWidth,height:this.plotHeight};e=c+(t.shadow?8:0),(c||u)&&(o?o.animate(o.crisp(null,null,null,i-e,r-e)):(o={fill:u||Lt},c&&(o.stroke=t.borderColor,o["stroke-width"]=c),this.chartBackground=n.rect(e/2,e/2,i-e,r-e,t.borderRadius,c).attr(o).add().shadow(t.shadow))),d&&(a?a.animate(p):this.plotBackground=n.rect(this.plotLeft,this.plotTop,this.plotWidth,this.plotHeight,0).attr({fill:d}).add().shadow(t.plotShadow)),h&&(l?l.animate(p):this.plotBGImage=n.image(h,this.plotLeft,this.plotTop,this.plotWidth,this.plotHeight).add()),t.plotBorderWidth&&(s?s.animate(s.crisp(null,this.plotLeft,this.plotTop,this.plotWidth,this.plotHeight)):this.plotBorder=n.rect(this.plotLeft,this.plotTop,this.plotWidth,this.plotHeight,0,t.plotBorderWidth).attr({stroke:t.plotBorderColor,"stroke-width":t.plotBorderWidth,zIndex:4}).add()),this.isDirtyBox=!1},propFromSeries:function(){var e,t,n,i=this,r=i.options.chart,o=i.options.series;Gt(["inverted","angular","polar"],function(a){for(e=Kt[r.type||r.defaultSeriesType],n=i[a]||r[a]||e&&e.prototype[a],t=o&&o.length;!n&&t--;)(e=Kt[o[t].type])&&e.prototype[a]&&(n=!0);i[a]=n})},render:function(){var t,i=this,r=i.axes,o=i.renderer,a=i.options,s=a.labels,a=a.credits;i.setTitle(),i.legend=new j(i),Gt(r,function(e){e.setScale()}),i.getMargins(),i.maxTicks=null,Gt(r,function(e){e.setTickPositions(!0),e.setMaxTicks()}),i.adjustTickAmounts(),i.getMargins(),i.drawChartBox(),i.hasCartesianSeries&&Gt(r,function(e){e.render()}),i.seriesGroup||(i.seriesGroup=o.g("series-group").attr({zIndex:3}).add()),Gt(i.series,function(e){e.translate(),e.setTooltipPoints(),e.render()}),s.items&&Gt(s.items,function(){var t=e(s.style,this.style),r=n(t.left)+i.plotLeft,a=n(t.top)+i.plotTop+12;delete t.left,delete t.top,o.text(this.html,r,a).attr({zIndex:2}).css(t).add()}),a.enabled&&!i.credits&&(t=a.href,i.credits=o.text(a.text,0,0).on("click",function(){t&&(location.href=t)}).attr({align:a.position.align,zIndex:8}).css(a.style).add().align(a.position)),i.hasRendered=!0},destroy:function(){var e,t=this,n=t.axes,i=t.series,r=t.container,o=r&&r.parentNode;if(null!==t){for(tn(t,"destroy"),en(t),e=n.length;e--;)n[e]=n[e].destroy();for(e=i.length;e--;)i[e]=i[e].destroy();Gt("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,tracker,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(e){var n=t[e];n&&(t[e]=n.destroy())}),r&&(r.innerHTML="",en(r),o&&S(r),r=null);for(e in t)delete t[e];t=t.options=null}},firstRender:function(){var e=this,t=e.options,n=e.callback;!Tt&<==lt.top&&"complete"!==st.readyState||St&&!lt.canvg?St?gn.push(e.firstRender,t.global.canvasToolsURL):st.attachEvent("onreadystatechange",function(){st.detachEvent("onreadystatechange",e.firstRender),"complete"===st.readyState&&e.firstRender()}):(e.getContainer(),tn(e,"init"),Highcharts.RangeSelector&&t.rangeSelector.enabled&&(e.rangeSelector=new Highcharts.RangeSelector(e)),e.resetMargins(),e.setChartSize(),e.propFromSeries(),e.getAxes(),Gt(t.series||[],function(t){e.initSeries(t)}),Highcharts.Scroller&&(t.navigator.enabled||t.scrollbar.enabled)&&(e.scroller=new Highcharts.Scroller(e)),e.tracker=new B(e,t),e.render(),e.renderer.draw(),n&&n.apply(e,[e]),Gt(e.callbacks,function(t){t.apply(e,[e])}),e.cloneRenderTo(!0),tn(e,"load"))},init:function(e){var t,n=this.options.chart;if(n.reflow!==!1&&Qt(this,"load",this.initReflow),e)for(t in e)Qt(this,t,e[t]);this.xAxis=[],this.yAxis=[],this.animation=St?!1:p(n.animation,!0),this.setSize=this.resize,this.pointCount=0,this.counters=new w,this.firstRender()}},z.prototype.callbacks=[];var mn=function(){};mn.prototype={init:function(e,t,n){var i=e.chart.counters;return this.series=e,this.applyOptions(t,n),this.pointAttr={},e.options.colorByPoint&&(t=e.chart.options.colors,this.options||(this.options={}),this.color=this.options.color=this.color||t[i.color++],i.wrapColor(t.length)),e.chart.pointCount++,this},applyOptions:function(t,n){var i=this.series,r=typeof t;this.config=t,"number"===r||null===t?this.y=t:"number"==typeof t[0]?(this.x=t[0],this.y=t[1]):"object"===r&&"number"!=typeof t.length?(e(this,t),this.options=t,t.dataLabels&&(i._hasPointLabels=!0)):"string"==typeof t[0]&&(this.name=t[0],this.y=t[1]),this.x===$&&(this.x=n===$?i.autoIncrement():n)},destroy:function(){var e,t=this.series.chart,n=t.hoverPoints;t.pointCount--,n&&(this.setState(),c(n,this),!n.length)&&(t.hoverPoints=null),this===t.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel)&&(en(this),this.destroyElements()),this.legendItem&&t.legend.destroyItem(this);for(e in this)this[e]=null},destroyElements:function(){for(var e,t="graphic,tracker,dataLabel,group,connector,shadowGroup".split(","),n=6;n--;)e=t[n],this[e]&&(this[e]=this[e].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},select:function(e,t){var n=this,i=n.series.chart,e=p(e,!n.selected);n.firePointEvent(e?"select":"unselect",{accumulate:t},function(){n.selected=e,n.setState(e&&"select"),t||Gt(i.getSelectedPoints(),function(e){e.selected&&e!==n&&(e.selected=!1,e.setState(""),e.firePointEvent("unselect"))})})},onMouseOver:function(){var e=this.series,t=e.chart,n=t.tooltip,i=t.hoverPoint;i&&i!==this&&i.onMouseOut(),this.firePointEvent("mouseOver"),n&&(!n.shared||e.noSharedTooltip)&&n.refresh(this),this.setState("hover"),t.hoverPoint=this},onMouseOut:function(){this.firePointEvent("mouseOut"),this.setState(),this.series.chart.hoverPoint=null},tooltipFormatter:function(e){var t,n,r,o,a=this.series,s=a.tooltipOptions,l=e.match(/\{(series|point)\.[a-zA-Z]+\}/g),c=/[{\.}]/;for(o in l)n=l[o],i(n)&&n!==e&&(r=(" "+n).split(c),t={point:this,series:a}[r[1]],r=r[2],t=t!==this||"y"!==r&&"open"!==r&&"high"!==r&&"low"!==r&&"close"!==r?t[r]:(s.valuePrefix||s.yPrefix||"")+v(this[r],p(s.valueDecimals,s.yDecimals,-1))+(s.valueSuffix||s.ySuffix||""),e=e.replace(n,t));return e},update:function(e,t,n){var i,o=this,a=o.series,s=o.graphic,l=a.data,c=l.length,u=a.chart,t=p(t,!0);o.firePointEvent("update",{options:e},function(){for(o.applyOptions(e),r(e)&&(a.getAttribs(),s&&s.attr(o.pointAttr[a.state])),i=0;c>i;i++)if(l[i]===o){a.xData[i]=o.x,a.yData[i]=o.y,a.options.data[i]=e;break}a.isDirty=!0,a.isDirtyData=!0,t&&u.redraw(n)})},remove:function(e,t){var n,i=this,r=i.series,o=r.chart,a=r.data,s=a.length;I(t,o),e=p(e,!0),i.firePointEvent("remove",null,function(){for(n=0;s>n;n++)if(a[n]===i){a.splice(n,1),r.options.data.splice(n,1),r.xData.splice(n,1),r.yData.splice(n,1);break}i.destroy(),r.isDirty=!0,r.isDirtyData=!0,e&&o.redraw()})},firePointEvent:function(e,t,n){var i=this,r=this.series.options;(r.point.events[e]||i.options&&i.options.events&&i.options.events[e])&&this.importEvents(),"click"===e&&r.allowPointSelect&&(n=function(e){i.select(null,e.ctrlKey||e.metaKey||e.shiftKey)}),tn(this,e,t,n)},importEvents:function(){if(!this.hasImportedEvents){var e,t=Zt(this.series.options.point,this.options).events;this.events=t;for(e in t)Qt(this,e,t[e]);this.hasImportedEvents=!0}},setState:function(e){var t=this.plotX,n=this.plotY,i=this.series,r=i.options.states,o=cn[i.type].marker&&i.options.marker,a=o&&!o.enabled,s=o&&o.states[e],l=s&&s.enabled===!1,c=i.stateMarkerGraphic,u=i.chart,d=this.pointAttr,e=e||"";e===this.state||this.selected&&"select"!==e||r[e]&&r[e].enabled===!1||e&&(l||a&&!s.enabled)||(this.graphic?(r=o&&this.graphic.symbolName&&d[e].r,this.graphic.attr(Zt(d[e],r?{x:t-r,y:n-r,width:2*r,height:2*r}:{}))):(e&&(c||(r=s.radius,i.stateMarkerGraphic=c=u.renderer.symbol(i.symbol,-r,-r,2*r,2*r).attr(d[e]).add(i.group)),c.translate(t,n)),c&&c[e?"show":"hide"]()),this.state=e)}};var vn=function(){};vn.prototype={isCartesian:!0,type:"line",pointClass:mn,sorted:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},init:function(t,n){var i,r;r=t.series.length,this.chart=t,this.options=n=this.setOptions(n),this.bindAxes(),e(this,{index:r,name:n.name||"Series "+(r+1),state:"",pointAttr:{},visible:n.visible!==!1,selected:n.selected===!0}),St&&(n.animation=!1),r=n.events;for(i in r)Qt(this,i,r[i]);(r&&r.click||n.point&&n.point.events&&n.point.events.click||n.allowPointSelect)&&(t.runTrackerClick=!0),this.getColor(),this.getSymbol(),this.setData(n.data,!1),this.isCartesian&&(t.hasCartesianSeries=!0),t.series.push(this)},bindAxes:function(){var e,t=this,n=t.options,i=t.chart;t.isCartesian&&Gt(["xAxis","yAxis"],function(r){Gt(i[r],function(i){e=i.options,(n[r]===e.index||n[r]===$&&0===e.index)&&(i.series.push(t),t[r]=i,i.isDirty=!0)})})},autoIncrement:function(){var e=this.options,t=this.xIncrement,t=p(t,e.pointStart,0);return this.pointInterval=p(this.pointInterval,e.pointInterval,1),this.xIncrement=t+this.pointInterval,t},getSegments:function(){var e,t=-1,n=[],i=this.points,r=i.length;if(r)if(this.options.connectNulls){for(e=r;e--;)null===i[e].y&&i.splice(e,1);i.length&&(n=[i])}else Gt(i,function(e,o){null===e.y?(o>t+1&&n.push(i.slice(t+1,o)),t=o):o===r-1&&n.push(i.slice(t+1,o+1))});this.segments=n},setOptions:function(e){var t=this.chart.options,n=t.plotOptions,i=e.data;return e.data=null,n=Zt(n[this.type],n.series,e),n.data=e.data=i,this.tooltipOptions=Zt(t.tooltip,n.tooltip),n},getColor:function(){var e=this.chart.options.colors,t=this.chart.counters;this.color=this.options.color||e[t.color++]||"#0000ff",t.wrapColor(e.length)},getSymbol:function(){var e=this.options.marker,t=this.chart,n=t.options.symbols,t=t.counters;this.symbol=e.symbol||n[t.symbol++],/^url/.test(this.symbol)&&(e.radius=0),t.wrapSymbol(n.length)},drawLegendSymbol:function(e){var t,n=this.options,i=n.marker,r=e.options.symbolWidth,o=this.chart.renderer,a=this.legendGroup,e=e.baseline;n.lineWidth&&(t={"stroke-width":n.lineWidth},n.dashStyle&&(t.dashstyle=n.dashStyle),this.legendLine=o.path(["M",0,e-4,"L",r,e-4]).attr(t).add(a)),i&&i.enabled&&(n=i.radius,this.legendSymbol=o.symbol(this.symbol,r/2-n,e-4-n,2*n,2*n).attr(this.pointAttr[""]).add(a))},addPoint:function(e,t,n,i){var r=this.data,o=this.graph,a=this.area,s=this.chart,l=this.xData,c=this.yData,u=o&&o.shift||0,d=this.options.data;I(i,s),o&&n&&(o.shift=u+1),a&&(n&&(a.shift=u+1),a.isArea=!0),t=p(t,!0),i={series:this},this.pointClass.prototype.applyOptions.apply(i,[e]),l.push(i.x),c.push(4===this.valueCount?[i.open,i.high,i.low,i.close]:i.y),d.push(e),n&&(r[0]&&r[0].remove?r[0].remove(!1):(r.shift(),l.shift(),c.shift(),d.shift())),this.getAttribs(),this.isDirtyData=this.isDirty=!0,t&&s.redraw()},setData:function(e,t){var n=this.points,i=this.options,r=this.initialColor,s=this.chart,l=null,c=this.xAxis,d=this.pointClass.prototype;this.xIncrement=null,this.pointRange=c&&c.categories&&1||i.pointRange,u(r)&&(s.counters.color=r);var h=[],f=[],g=e?e.length:[],m=this.valueCount;if(g>(i.turboThreshold||1e3)){for(r=0;null===l&&g>r;)l=e[r],r++;if(a(l)){for(d=p(i.pointStart,0),i=p(i.pointInterval,1),r=0;g>r;r++)h[r]=d,f[r]=e[r],d+=i;this.xIncrement=d}else if(o(l))if(m)for(r=0;g>r;r++)i=e[r],h[r]=i[0],f[r]=i.slice(1,m+1);else for(r=0;g>r;r++)i=e[r],h[r]=i[0],f[r]=i[1]}else for(r=0;g>r;r++)i={series:this},d.applyOptions.apply(i,[e[r]]),h[r]=i.x,f[r]=d.toYData?d.toYData.apply(i):i.y;for(this.data=[],this.options.data=e,this.xData=h,this.yData=f,r=n&&n.length||0;r--;)n[r]&&n[r].destroy&&n[r].destroy();c&&(c.minRange=$),this.isDirty=this.isDirtyData=s.isDirtyBox=!0,p(t,!0)&&s.redraw(!1)},remove:function(e,t){var n=this,i=n.chart,e=p(e,!0);n.isRemoving||(n.isRemoving=!0,tn(n,"remove",null,function(){n.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,e&&i.redraw(t)})),n.isRemoving=!1},processData:function(e){var t,n,i=this.xData,r=this.yData,o=i.length,a=0,s=o,l=this.xAxis,c=this.options,u=c.cropThreshold,d=this.isCartesian;if(d&&!this.isDirty&&!l.isDirty&&!this.yAxis.isDirty&&!e)return!1;if(d&&this.sorted&&(!u||o>u||this.forceCrop))if(e=l.getExtremes(),l=e.min,u=e.max,l>i[o-1]||i[0]>u)i=[],r=[];else if(l>i[0]||i[o-1]>u){for(e=0;o>e;e++)if(i[e]>=l){a=pt(0,e-1);break}for(;o>e;e++)if(i[e]>u){s=e+1;break}i=i.slice(a,s),r=r.slice(a,s),t=!0}for(e=i.length-1;e>0;e--)o=i[e]-i[e-1],o>0&&(n===$||n>o)&&(n=o);this.cropped=t,this.cropStart=a,this.processedXData=i,this.processedYData=r,null===c.pointRange&&(this.pointRange=n||1),this.closestPointRange=n},generatePoints:function(){var e,t,n,i,r=this.options.data,o=this.data,a=this.processedXData,s=this.processedYData,l=this.pointClass,c=a.length,u=this.cropStart||0,d=this.hasGroupedData,p=[];for(o||d||(o=[],o.length=r.length,o=this.data=o),i=0;c>i;i++)t=u+i,d?p[i]=(new l).init(this,[a[i]].concat(h(s[i]))):(o[t]?n=o[t]:o[t]=n=(new l).init(this,r[t],a[i]),p[i]=n);if(o&&(c!==(e=o.length)||d))for(i=0;e>i;i++)i===u&&!d&&(i+=c),o[i]&&o[i].destroyElements();this.data=o,this.points=p},translate:function(){this.processedXData||this.processData(),this.generatePoints();for(var e,t=this.chart,n=this.options,i=n.stacking,r=this.xAxis,o=r.categories,a=this.yAxis,s=this.points,l=s.length,c=!!this.modifyValue,d=a.series,h=d.length;h--;)if(d[h].visible){h===this.index&&(e=!0);break}for(h=0;l>h;h++){var d=s[h],p=d.x,f=d.y,g=d.low,m=a.stacks[(n.threshold>f?"-":"")+this.stackKey];d.plotX=r.translate(p,0,0,0,1),i&&this.visible&&m&&m[p]&&(g=m[p],p=g.total,g.cum=g=g.cum-f,f=g+f,e&&(g=n.threshold),"percent"===i&&(g=p?100*g/p:0,f=p?100*f/p:0),d.percentage=p?100*d.y/p:0,d.stackTotal=p,d.stackY=f),d.yBottom=u(g)?a.translate(g,0,1,0,1):null,c&&(f=this.modifyValue(f,d)),d.plotY="number"==typeof f?ut(10*a.translate(f,0,1,0,1))/10:$,d.clientX=t.inverted?t.plotHeight-d.plotX:d.plotX,d.category=o&&o[d.x]!==$?o[d.x]:d.x
}this.getSegments()},setTooltipPoints:function(e){var t,n,i=[],r=this.chart.plotSizeX;t=this.xAxis;var o,a,s=[];if(this.options.enableMouseTracking!==!1){for(e&&(this.tooltipPoints=null),Gt(this.segments||this.points,function(e){i=i.concat(e)}),t&&t.reversed&&(i=i.reverse()),e=i.length,a=0;e>a;a++)for(o=i[a],t=i[a-1]?i[a-1]._high+1:0,o._high=n=i[a+1]?dt((o.plotX+(i[a+1]?i[a+1].plotX:r))/2):r;t>=0&&n>=t;)s[t++]=o;this.tooltipPoints=s}},tooltipHeaderFormatter:function(e){var t,n=this.tooltipOptions,i=n.xDateFormat,r=this.xAxis,o=r&&"datetime"===r.options.type;if(o&&!i)for(t in G)if(G[t]>=r.closestPointRange){i=n.dateTimeLabelFormats[t];break}return n.headerFormat.replace("{point.key}",o?q(i,e):e).replace("{series.name}",this.name).replace("{series.color}",this.color)},onMouseOver:function(){var e=this.chart,t=e.hoverSeries;(At||!e.mouseIsDown)&&(t&&t!==this&&t.onMouseOut(),this.options.events.mouseOver&&tn(this,"mouseOver"),this.setState("hover"),e.hoverSeries=this)},onMouseOut:function(){var e=this.options,t=this.chart,n=t.tooltip,i=t.hoverPoint;i&&i.onMouseOut(),this&&e.events.mouseOut&&tn(this,"mouseOut"),n&&!e.stickyTracking&&!n.shared&&n.hide(),this.setState(),t.hoverSeries=null},animate:function(e){var t=this.chart,n=this.clipRect,i=this.options.animation;i&&!r(i)&&(i={}),e?n.isAnimating||(n.attr("width",0),n.isAnimating=!0):(n.animate({width:t.plotSizeX},i),this.animate=null)},drawPoints:function(){var t,n,i,r,o,a,s,l,c,u=this.points,d=this.chart;if(this.options.marker.enabled)for(r=u.length;r--;)o=u[r],n=o.plotX,i=o.plotY,c=o.graphic,i===$||isNaN(i)||(t=o.pointAttr[o.selected?"select":""],a=t.r,s=p(o.marker&&o.marker.symbol,this.symbol),l=0===s.indexOf("url"),c?c.animate(e({x:n-a,y:i-a},c.symbolName?{width:2*a,height:2*a}:{})):(a>0||l)&&(o.graphic=d.renderer.symbol(s,n-a,i-a,2*a,2*a).attr(t).add(this.group)))},convertAttribs:function(e,t,n,i){var r,o,a=this.pointAttrToOptions,s={},e=e||{},t=t||{},n=n||{},i=i||{};for(r in a)o=a[r],s[r]=p(e[o],t[r],n[r],i[r]);return s},getAttribs:function(){var e,t,n,i=this,r=cn[i.type].marker?i.options.marker:i.options,o=r.states,a=o.hover,s=i.color,l={stroke:s,fill:s},c=i.points||[],d=[],h=i.pointAttrToOptions;for(i.options.marker?(a.radius=a.radius||r.radius+2,a.lineWidth=a.lineWidth||r.lineWidth+1):a.color=a.color||un(a.color||s).brighten(a.brightness).get(),d[""]=i.convertAttribs(r,l),Gt(["hover","select"],function(e){d[e]=i.convertAttribs(o[e],d[""])}),i.pointAttr=d,s=c.length;s--;){if(l=c[s],(r=l.options&&l.options.marker||l.options)&&r.enabled===!1&&(r.radius=0),e=!1,l.options)for(n in h)u(r[h[n]])&&(e=!0);e?(t=[],o=r.states||{},e=o.hover=o.hover||{},i.options.marker||(e.color=un(e.color||l.options.color).brighten(e.brightness||a.brightness).get()),t[""]=i.convertAttribs(r,d[""]),t.hover=i.convertAttribs(o.hover,d.hover,t[""]),t.select=i.convertAttribs(o.select,d.select,t[""])):t=d,l.pointAttr=t}},destroy:function(){var e,t,n,i,r,o=this,a=o.chart,s=o.clipRect,l=/AppleWebKit\/533/.test(xt),u=o.data||[];for(tn(o,"destroy"),en(o),Gt(["xAxis","yAxis"],function(e){(r=o[e])&&(c(r.series,o),r.isDirty=!0)}),o.legendItem&&o.chart.legend.destroyItem(o),t=u.length;t--;)(n=u[t])&&n.destroy&&n.destroy();o.points=null,s&&s!==a.clipRect&&(o.clipRect=s.destroy()),Gt("area,graph,dataLabelsGroup,group,tracker,trackerGroup".split(","),function(t){o[t]&&(e=l&&"group"===t?"hide":"destroy",o[t][e]())}),a.hoverSeries===o&&(a.hoverSeries=null),c(a.series,o);for(i in o)delete o[i]},drawDataLabels:function(){var e=this,t=e.options,n=t.dataLabels;if(n.enabled||e._hasPointLabels){var i,r,o,a,s,l,c,d=e.points,h=e.dataLabelsGroup,f=e.chart,g=e.xAxis,g=g?g.left:f.plotLeft,m=e.yAxis,m=m?m.top:f.plotTop,v=f.renderer,b=f.inverted,y=e.type,x=t.stacking,k="column"===y||"bar"===y,w=null===n.verticalAlign,_=null===n.y,C=v.fontMetrics(n.style.fontSize),T=C.h,E=C.b;k&&(C={top:E,middle:E-T/2,bottom:-T+E},x?(w&&(n=Zt(n,{verticalAlign:"middle"})),_&&(n=Zt(n,{y:C[n.verticalAlign]}))):w?n=Zt(n,{verticalAlign:"top"}):_&&(n=Zt(n,{y:C[n.verticalAlign]}))),h?h.translate(g,m):h=e.dataLabelsGroup=v.g("data-labels").attr({visibility:e.visible?"visible":"hidden",zIndex:6}).translate(g,m).add(),a=n,Gt(d,function(d){if(l=d.dataLabel,n=a,(o=d.options)&&o.dataLabels&&(n=Zt(n,o.dataLabels)),c=n.enabled){var g=d.barX&&d.barX+d.barW/2||p(d.plotX,-999),m=p(d.plotY,-999),w=null===n.y?d.y>=t.threshold?-T+E:E:n.y;i=(b?f.plotWidth-m:g)+n.x,r=ut((b?f.plotHeight-g:m)+w)}if(!l||!e.isCartesian||f.isInsidePlot(i,r)&&c){if(c){var _,g=n.align;if(s=n.formatter.call(d.getLabelConfig(),n),"column"===y&&(i+={left:-1,right:1}[g]*d.barW/2||0),!x&&b&&0>d.y&&(g="right",i-=10),n.style.color=p(n.color,n.style.color,e.color,"black"),l)l.attr({text:s}).animate({x:i,y:r});else if(u(s)){g={align:g,fill:n.backgroundColor,stroke:n.borderColor,"stroke-width":n.borderWidth,r:n.borderRadius||0,rotation:n.rotation,padding:n.padding,zIndex:1};for(_ in g)g[_]===$&&delete g[_];l=d.dataLabel=v[n.rotation?"text":"label"](s,i,r,null,null,null,n.useHTML,!0).attr(g).css(n.style).add(h).shadow(n.shadow)}k&&t.stacking&&l&&(_=d.barX,g=d.barY,m=d.barW,d=d.barH,l.align(n,null,{x:b?f.plotWidth-g-d:_,y:b?f.plotHeight-_-m:g,width:b?d:m,height:b?m:d}))}}else d.dataLabel=l.destroy()})}},getSegmentPath:function(e){var t=this,n=[];return Gt(e,function(i,r){t.getPointSpline?n.push.apply(n,t.getPointSpline(e,i,r)):(n.push(r?"L":"M"),r&&t.options.step&&n.push(i.plotX,e[r-1].plotY),n.push(i.plotX,i.plotY))}),n},drawGraph:function(){var e,t=this,n=t.options,i=t.graph,r=[],o=t.group,a=n.lineColor||t.color,s=n.lineWidth,l=n.dashStyle,c=t.chart.renderer,u=[];Gt(t.segments,function(n){e=t.getSegmentPath(n),n.length>1?r=r.concat(e):u.push(n[0])}),t.graphPath=r,t.singlePoints=u,i?(on(i),i.animate({d:r})):(s||n.states.hover.lineWidth)&&(i={stroke:a,"stroke-width":s},l&&(i.dashstyle=l),t.graph=c.path(r).attr(i).add(o).shadow(n.shadow))},invertGroups:function(){function e(){var e={width:t.yAxis.len,height:t.xAxis.len};n.attr(e).invert(),i&&i.attr(e).invert()}var t=this,n=t.group,i=t.trackerGroup,r=t.chart;Qt(r,"resize",e),Qt(t,"destroy",function(){en(r,"resize",e)}),e(),t.invertGroups=e},createGroup:function(e){var t=this.chart,n=this.group=t.renderer.g("series");e&&n.clip(this.clipRect),n.attr({visibility:this.visible?"visible":"hidden",zIndex:this.options.zIndex}).translate(this.xAxis.left,this.yAxis.top).add(t.seriesGroup),this.createGroup=Rt},render:function(){var e,t=this,n=t.chart,i=t.options,r=i.clip!==!1,o=i.animation,a=o&&t.animate,o=a?o&&o.duration||500:0,s=t.clipRect,l=n.renderer;s||(s=t.clipRect=!n.hasRendered&&n.clipRect?n.clipRect:l.clipRect(0,0,n.plotSizeX,n.plotSizeY+1),n.clipRect)||(n.clipRect=s),t.createGroup(r),t.group?e=t.group:(e=t.group=l.g("series"),e.attr({visibility:t.visible?"visible":"hidden",zIndex:i.zIndex}).translate(t.xAxis.left,t.yAxis.top).add(n.seriesGroup)),t.drawDataLabels(),a&&t.animate(!0),t.getAttribs(),t.drawGraph&&t.drawGraph(),t.drawPoints(),t.options.enableMouseTracking!==!1&&t.drawTracker(),n.inverted&&t.invertGroups(),r&&!t.hasRendered&&(e.clip(s),t.trackerGroup&&t.trackerGroup.clip(n.clipRect)),a&&t.animate(),setTimeout(function(){s.isAnimating=!1,(e=t.group)&&s!==n.clipRect&&s.renderer&&(r&&e.clip(t.clipRect=n.clipRect),s.destroy())},o),t.isDirty=t.isDirtyData=!1,t.hasRendered=!0},redraw:function(){var e=this.chart,t=this.isDirtyData,n=this.group;n&&(e.inverted&&n.attr({width:e.plotWidth,height:e.plotHeight}),n.animate({translateX:this.xAxis.left,translateY:this.yAxis.top})),this.translate(),this.setTooltipPoints(!0),this.render(),t&&tn(this,"updatedData")},setState:function(e){var t=this.options,n=this.graph,i=t.states,t=t.lineWidth,e=e||"";this.state!==e&&(this.state=e,i[e]&&i[e].enabled===!1||(e&&(t=i[e].lineWidth||t+1),n&&!n.dashstyle&&n.attr({"stroke-width":t},e?0:500)))},setVisible:function(e,t){var n,i=this.chart,r=this.legendItem,o=this.group,a=this.tracker,s=this.dataLabelsGroup,l=this.points,c=i.options.chart.ignoreHiddenSeries;if(n=this.visible,n=(this.visible=e=e===$?!n:e)?"show":"hide",o&&o[n](),a)a[n]();else if(l)for(o=l.length;o--;)a=l[o],a.tracker&&a.tracker[n]();s&&s[n](),r&&i.legend.colorizeItem(this,e),this.isDirty=!0,this.options.stacking&&Gt(i.series,function(e){e.options.stacking&&e.visible&&(e.isDirty=!0)}),c&&(i.isDirtyBox=!0),t!==!1&&i.redraw(),tn(this,n)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(e){this.selected=e=e===$?!this.selected:e,this.checkbox&&(this.checkbox.checked=e),tn(this,e?"select":"unselect")},drawTrackerGroup:function(){var e=this.trackerGroup,t=this.chart;return this.isCartesian&&(e||(this.trackerGroup=e=t.renderer.g().attr({zIndex:this.options.zIndex||1}).add(t.trackerGroup)),e.translate(this.xAxis.left,this.yAxis.top)),e},drawTracker:function(){var e,t=this,n=t.options,i=n.trackByArea,r=[].concat(i?t.areaPath:t.graphPath),o=r.length,a=t.chart,s=a.renderer,l=a.options.tooltip.snap,c=t.tracker,u=n.cursor,u=u&&{cursor:u},d=t.singlePoints,h=t.drawTrackerGroup();if(o&&!i)for(e=o+1;e--;)"M"===r[e]&&r.splice(e+1,0,r[e+1]-l,r[e+2],"L"),(e&&"M"===r[e]||e===o)&&r.splice(e,0,"L",r[e-2]+l,r[e-1]);for(e=0;d.length>e;e++)o=d[e],r.push("M",o.plotX-l,o.plotY,"L",o.plotX+l,o.plotY);c?c.attr({d:r}):t.tracker=s.path(r).attr({isTracker:!0,"stroke-linejoin":"bevel",visibility:t.visible?"visible":"hidden",stroke:Ft,fill:i?Ft:Lt,"stroke-width":n.lineWidth+(i?0:2*l)}).on(At?"touchstart":"mouseover",function(){a.hoverSeries!==t&&t.onMouseOver()}).on("mouseout",function(){n.stickyTracking||t.onMouseOut()}).css(u).add(h)}},qt=m(vn),Kt.line=qt,cn.area=Zt(Wt,{threshold:0}),qt=m(vn,{type:"area",getSegmentPath:function(e){var t,n=vn.prototype.getSegmentPath.call(this,e),i=[].concat(n),r=this.options;t=n.length;var o=this.yAxis.getThreshold(r.threshold);if(3===t&&i.push("L",n[1],n[2]),r.stacking&&"areaspline"!==this.type)for(t=e.length-1;t>=0;t--)e.length-1>t&&r.step&&i.push(e[t+1].plotX,e[t].yBottom),i.push(e[t].plotX,e[t].yBottom);else i.push("L",e[e.length-1].plotX,o,"L",e[0].plotX,o);return this.areaPath=this.areaPath.concat(i),n},drawGraph:function(){this.areaPath=[],vn.prototype.drawGraph.apply(this);var e=this.areaPath,t=this.options,n=this.area;n?n.animate({d:e}):this.area=this.chart.renderer.path(e).attr({fill:p(t.fillColor,un(this.color).setOpacity(t.fillOpacity||.75).get())}).add(this.group)},drawLegendSymbol:function(e,t){t.legendSymbol=this.chart.renderer.rect(0,e.baseline-11,e.options.symbolWidth,12,2).attr({zIndex:3}).add(t.legendGroup)}}),Kt.area=qt,cn.spline=Zt(Wt),pn=m(vn,{type:"spline",getPointSpline:function(e,t,n){var i,r,o,a,s=t.plotX,l=t.plotY,c=e[n-1],u=e[n+1];if(n&&e.length-1>n){e=c.plotY,o=u.plotX;var d,u=u.plotY;i=(1.5*s+c.plotX)/2.5,r=(1.5*l+e)/2.5,o=(1.5*s+o)/2.5,a=(1.5*l+u)/2.5,d=(a-r)*(o-s)/(o-i)+l-a,r+=d,a+=d,r>e&&r>l?(r=pt(e,l),a=2*l-r):e>r&&l>r&&(r=ft(e,l),a=2*l-r),a>u&&a>l?(a=pt(u,l),r=2*l-a):u>a&&l>a&&(a=ft(u,l),r=2*l-a),t.rightContX=o,t.rightContY=a}return n?(t=["C",c.rightContX||c.plotX,c.rightContY||c.plotY,i||s,r||l,s,l],c.rightContX=c.rightContY=null):t=["M",s,l],t}}),Kt.spline=pn,cn.areaspline=Zt(cn.area);var bn=qt.prototype,pn=m(pn,{type:"areaspline",getSegmentPath:bn.getSegmentPath,drawGraph:bn.drawGraph});Kt.areaspline=pn,cn.column=Zt(Wt,{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:{y:null,verticalAlign:null},threshold:0}),pn=m(vn,{type:"column",tooltipOutsidePlot:!0,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},init:function(){vn.prototype.init.apply(this,arguments);var e=this,t=e.chart;t.hasRendered&&Gt(t.series,function(t){t.type===e.type&&(t.isDirty=!0)})},translate:function(){var t,n,i=this,r=i.chart,o=i.options,a=o.stacking,s=o.borderWidth,l=0,c=i.xAxis,d=c.reversed,h={};vn.prototype.translate.apply(i),Gt(r.series,function(e){e.type===i.type&&e.visible&&i.options.group===e.options.group&&(e.options.stacking?(t=e.stackKey,h[t]===$&&(h[t]=l++),n=h[t]):n=l++,e.columnIndex=n)});var f=i.points,c=gt(c.transA)*(c.ordinalSlope||c.closestPointRange||1),g=c*o.groupPadding,m=(c-2*g)/l,v=o.pointWidth,b=u(v)?(m-v)/2:m*o.pointPadding,y=p(v,m-2*b),x=ht(pt(y,1+2*s)),k=b+(g+((d?l-i.columnIndex:i.columnIndex)||0)*m-c/2)*(d?-1:1),w=i.yAxis.getThreshold(o.threshold),_=p(o.minPointLength,5);Gt(f,function(t){var n=t.plotY,o=p(t.yBottom,w),l=t.plotX+k,c=ht(ft(n,o)),u=ht(pt(n,o)-c),d=i.yAxis.stacks[(0>t.y?"-":"")+i.stackKey];a&&i.visible&&d&&d[t.x]&&d[t.x].setOffset(k,x),_>gt(u)&&_&&(u=_,c=gt(c-w)>_?o-_:w-(w>=n?_:0)),e(t,{barX:l,barY:c,barW:x,barH:u,pointWidth:y}),t.shapeType="rect",t.shapeArgs=n=r.renderer.Element.prototype.crisp.call(0,s,l,c,x,u),s%2&&(n.y-=1,n.height+=1),t.trackerArgs=3>gt(u)&&Zt(t.shapeArgs,{height:6,y:c-3})})},getSymbol:function(){},drawLegendSymbol:qt.prototype.drawLegendSymbol,drawGraph:function(){},drawPoints:function(){var e,t,n=this,i=n.options,r=n.chart.renderer;Gt(n.points,function(o){var a=o.plotY;a===$||isNaN(a)||null===o.y||(e=o.graphic,t=o.shapeArgs,e?(on(e),e.animate(Zt(t))):o.graphic=e=r[o.shapeType](t).attr(o.pointAttr[o.selected?"select":""]).add(n.group).shadow(i.shadow,null,i.stacking&&!i.borderRadius))})},drawTracker:function(){var e,t,n,i,r,o=this,a=o.chart,s=a.renderer,l=+new Date,c=o.options,u=c.cursor,h=u&&{cursor:u},p=o.drawTrackerGroup();Gt(o.points,function(u){t=u.tracker,e=u.trackerArgs||u.shapeArgs,i=u.plotY,r=!o.isCartesian||i!==$&&!isNaN(i),delete e.strokeWidth,null!==u.y&&r&&(t?t.attr(e):u.tracker=s[u.shapeType](e).attr({isTracker:l,fill:Ft,visibility:o.visible?"visible":"hidden"}).on(At?"touchstart":"mouseover",function(e){n=e.relatedTarget||e.fromElement,a.hoverSeries!==o&&d(n,"isTracker")!==l&&o.onMouseOver(),u.onMouseOver()}).on("mouseout",function(e){c.stickyTracking||(n=e.relatedTarget||e.toElement,d(n,"isTracker")===l)||o.onMouseOut()}).css(h).add(u.group||p))})},animate:function(e){var t=this,n=t.points,i=t.options;e||(Gt(n,function(e){var n=e.graphic,e=e.shapeArgs,r=t.yAxis,o=i.threshold;n&&(n.attr({height:0,y:u(o)?r.getThreshold(o):r.translate(r.getExtremes().min,0,1,0,1)}),n.animate({height:e.height,y:e.y},i.animation))}),t.animate=null)},remove:function(){var e=this,t=e.chart;t.hasRendered&&Gt(t.series,function(t){t.type===e.type&&(t.isDirty=!0)}),vn.prototype.remove.apply(e,arguments)}}),Kt.column=pn,cn.bar=Zt(cn.column,{dataLabels:{align:"left",x:5,y:null,verticalAlign:"middle"}}),bn=m(pn,{type:"bar",inverted:!0}),Kt.bar=bn,cn.scatter=Zt(Wt,{lineWidth:0,states:{hover:{lineWidth:0}},tooltip:{headerFormat:'{series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"}}),bn=m(vn,{type:"scatter",sorted:!1,translate:function(){var e=this;vn.prototype.translate.apply(e),Gt(e.points,function(t){t.shapeType="circle",t.shapeArgs={x:t.plotX,y:t.plotY,r:e.chart.options.tooltip.snap}})},drawTracker:function(){for(var e,t=this,n=t.options.cursor,n=n&&{cursor:n},i=t.points,r=i.length;r--;)(e=i[r].graphic)&&(e.element._i=r);t._hasTracking?t._hasTracking=!0:t.group.attr({isTracker:!0}).on(At?"touchstart":"mouseover",function(e){t.onMouseOver(),e.target._i!==$&&i[e.target._i].onMouseOver()}).on("mouseout",function(){t.options.stickyTracking||t.onMouseOut()}).css(n)}}),Kt.scatter=bn,cn.pie=Zt(Wt,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name},y:5},legendType:"point",marker:null,size:"75%",showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}}}),Wt={type:"pie",isCartesian:!1,pointClass:m(mn,{init:function(){mn.prototype.init.apply(this,arguments);var t,n=this;return e(n,{visible:n.visible!==!1,name:p(n.name,"Slice")}),t=function(){n.slice()},Qt(n,"select",t),Qt(n,"unselect",t),n},setVisible:function(e){var t,n=this.series.chart,i=this.tracker,r=this.dataLabel,o=this.connector,a=this.shadowGroup;t=(this.visible=e=e===$?!this.visible:e)?"show":"hide",this.group[t](),i&&i[t](),r&&r[t](),o&&o[t](),a&&a[t](),this.legendItem&&n.legend.colorizeItem(this,e)},slice:function(e,t,n){var i=this.series.chart,r=this.slicedTranslation;I(n,i),p(t,!0),e=this.sliced=u(e)?e:!this.sliced,e={translateX:e?r[0]:i.plotLeft,translateY:e?r[1]:i.plotTop},this.group.animate(e),this.shadowGroup&&this.shadowGroup.animate(e)}}),pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=this.chart.counters.color},animate:function(){var e=this;Gt(e.points,function(t){var n=t.graphic,t=t.shapeArgs,i=-bt/2;n&&(n.attr({r:0,start:i,end:i}),n.animate({r:t.r,start:t.start,end:t.end},e.options.animation))}),e.animate=null},setData:function(e,t){vn.prototype.setData.call(this,e,!1),this.processData(),this.generatePoints(),p(t,!0)&&this.chart.redraw()},getCenter:function(){var e,t=this.options,i=this.chart,r=i.plotWidth,o=i.plotHeight,t=t.center.concat([t.size,t.innerSize||0]),a=ft(r,o);return Jt(t,function(t,i){return(e=/%$/.test(t))?[r,o,a,a][i]*n(t)/100:t})},translate:function(){this.generatePoints();var e,t,n,i,r,o,a,s=0,l=-.25,c=this.options,u=c.slicedOffset,d=u+c.borderWidth,h=this.chart,p=this.points,f=2*bt,g=c.dataLabels.distance;this.center=e=this.getCenter(),this.getX=function(t,n){return i=ct.asin((t-e[1])/(e[2]/2+g)),e[0]+(n?-1:1)*mt(i)*(e[2]/2+g)},Gt(p,function(e){s+=e.y}),Gt(p,function(c){r=s?c.y/s:0,t=ut(1e3*l*f)/1e3,l+=r,n=ut(1e3*l*f)/1e3,c.shapeType="arc",c.shapeArgs={x:e[0],y:e[1],r:e[2]/2,innerR:e[3]/2,start:t,end:n},i=(n+t)/2,c.slicedTranslation=Jt([mt(i)*u+h.plotLeft,vt(i)*u+h.plotTop],ut),o=mt(i)*e[2]/2,a=vt(i)*e[2]/2,c.tooltipPos=[e[0]+.7*o,e[1]+.7*a],c.labelPos=[e[0]+o+mt(i)*g,e[1]+a+vt(i)*g,e[0]+o+mt(i)*d,e[1]+a+vt(i)*d,e[0]+o,e[1]+a,0>g?"center":f/4>i?"left":"right",i],c.percentage=100*r,c.total=s}),this.setTooltipPoints()},render:function(){this.getAttribs(),this.drawPoints(),this.options.enableMouseTracking!==!1&&this.drawTracker(),this.drawDataLabels(),this.options.animation&&this.animate&&this.animate(),this.isDirty=!1},drawPoints:function(){var t,n,i,r,o,a=this,s=a.chart,l=s.renderer,c=a.options.shadow;Gt(a.points,function(u){n=u.graphic,o=u.shapeArgs,i=u.group,r=u.shadowGroup,c&&!r&&(r=u.shadowGroup=l.g("shadow").attr({zIndex:4}).add()),i||(i=u.group=l.g("point").attr({zIndex:5}).add()),t=u.sliced?u.slicedTranslation:[s.plotLeft,s.plotTop],i.translate(t[0],t[1]),r&&r.translate(t[0],t[1]),n?n.animate(o):u.graphic=n=l.arc(o).setRadialReference(a.center).attr(e(u.pointAttr[""],{"stroke-linejoin":"round"})).add(u.group).shadow(c,r),u.visible===!1&&u.setVisible(!1)})},drawDataLabels:function(){var e,t,n,i,r,o,a,s,l=this.data,c=this.chart,u=this.options.dataLabels,d=p(u.connectorPadding,10),h=p(u.connectorWidth,1),f=p(u.softConnector,!0),g=u.distance,m=this.center,v=m[2]/2,b=m[1],y=g>0,x=[[],[]],k=2;if(u.enabled)for(vn.prototype.drawDataLabels.apply(this),Gt(l,function(e){e.dataLabel&&x[bt/2>e.labelPos[7]?0:1].push(e)}),x[1].reverse(),a=function(e,t){return t.y-e.y},l=x[0][0]&&x[0][0].dataLabel&&(x[0][0].dataLabel.getBBox().height||21);k--;){var w,_=[],C=[],T=x[k],E=T.length;if(g>0){for(s=b-v-g;b+v+g>=s;s+=l)_.push(s);if(o=_.length,E>o){for(n=[].concat(T),n.sort(a),s=E;s--;)n[s].rank=s;for(s=E;s--;)T[s].rank>=o&&T.splice(s,1);E=T.length}for(s=0;E>s;s++){for(e=T[s],n=e.labelPos,e=9999,r=0;o>r;r++)t=gt(_[r]-n[1]),e>t&&(e=t,w=r);if(s>w&&null!==_[s])w=s;else for(E-s+w>o&&null!==_[s]&&(w=o-E+s);null===_[w];)w++;C.push({i:w,y:_[w]}),_[w]=null}C.sort(a)}for(s=0;E>s;s++)e=T[s],n=e.labelPos,t=e.dataLabel,o=e.visible===!1?"hidden":"visible",i=n[1],g>0?(r=C.pop(),w=r.i,r=r.y,(i>r&&null!==_[w+1]||r>i&&null!==_[w-1])&&(r=i)):r=i,i=u.justify?m[0]+(k?-1:1)*(v+g):this.getX(0===w||w===_.length-1?i:r,k),t.attr({visibility:o,align:n[6]})[t.moved?"animate":"attr"]({x:i+u.x+({left:d,right:-d}[n[6]]||0),y:r+u.y}),t.moved=!0,y&&h&&(t=e.connector,n=f?["M",i+("left"===n[6]?5:-5),r,"C",i,r,2*n[2]-n[4],2*n[3]-n[5],n[2],n[3],"L",n[4],n[5]]:["M",i+("left"===n[6]?5:-5),r,"L",n[2],n[3],"L",n[4],n[5]],t?(t.animate({d:n}),t.attr("visibility",o)):e.connector=t=this.chart.renderer.path(n).attr({"stroke-width":h,stroke:u.connectorColor||e.color||"#606060",visibility:o,zIndex:3}).translate(c.plotLeft,c.plotTop).add())}},drawTracker:pn.prototype.drawTracker,drawLegendSymbol:qt.prototype.drawLegendSymbol,getSymbol:function(){}},Wt=m(vn,Wt),Kt.pie=Wt,e(Highcharts,{Axis:P,CanVGRenderer:fn,Chart:z,Color:un,Legend:j,Point:mn,Tick:L,Tooltip:M,Renderer:H,Series:vn,SVGRenderer:dn,VMLRenderer:hn,dateFormat:q,pathAnim:V,getOptions:function(){return W},hasBidiBug:Et,numberFormat:v,seriesTypes:Kt,setOptions:function(e){return W=Zt(W,e),R(),W},addEvent:Qt,removeEvent:en,createElement:g,discardElement:S,css:f,each:Gt,extend:e,map:Jt,merge:Zt,pick:p,splat:h,extendClass:m,pInt:n,product:"Highcharts",version:"2.2.4"})})();