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