UNPKG

highcharts

Version:
105 lines (103 loc) 331 kB
/* Highstock JS v8.0.1 (2020-03-02) (c) 2009-2018 Torstein Honsi License: www.highcharts.com/license */ (function(V,Q){"object"===typeof module&&module.exports?(Q["default"]=Q,module.exports=V.document?Q(V):Q):"function"===typeof define&&define.amd?define("highcharts/highstock",function(){return Q(V)}):(V.Highcharts&&V.Highcharts.error(16,!0),V.Highcharts=Q(V))})("undefined"!==typeof window?window:this,function(V){function Q(f,k,F,q){f.hasOwnProperty(k)||(f[k]=q.apply(null,F))}var u={};Q(u,"parts/Globals.js",[],function(){var f="undefined"!==typeof V?V:"undefined"!==typeof window?window:{},k=f.document, F=f.navigator&&f.navigator.userAgent||"",q=k&&k.createElementNS&&!!k.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,K=/(edge|msie|trident)/i.test(F)&&!f.opera,D=-1!==F.indexOf("Firefox"),L=-1!==F.indexOf("Chrome"),B=D&&4>parseInt(F.split("Firefox/")[1],10);return{product:"Highcharts",version:"8.0.1",deg2rad:2*Math.PI/360,doc:k,hasBidiBug:B,hasTouch:!!f.TouchEvent,isMS:K,isWebKit:-1!==F.indexOf("AppleWebKit"),isFirefox:D,isChrome:L,isSafari:!L&&-1!==F.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(F), SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:q,win:f,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[],dateFormats:{}}});Q(u,"parts/Utilities.js",[u["parts/Globals.js"]],function(f){function k(){var a,g=arguments,b={},c=function(a,g){"object"!==typeof a&&(a={});Y(g,function(b,d){!G(b,!0)||l(b)||n(b)?a[d]=g[d]:a[d]=c(a[d]||{},b)});return a};!0===g[0]&&(b=g[1],g=Array.prototype.slice.call(g,2));var d=g.length;for(a=0;a< d;a++)b=c(b,g[a]);return b}function F(a,g,b){var c;v(g)?d(b)?a.setAttribute(g,b):a&&a.getAttribute&&((c=a.getAttribute(g))||"class"!==g||(c=a.getAttribute(g+"Name"))):Y(g,function(g,b){a.setAttribute(b,g)});return c}function q(){for(var a=arguments,g=a.length,b=0;b<g;b++){var c=a[b];if("undefined"!==typeof c&&null!==c)return c}}function K(a,g){if(!a)return g;var b=a.split(".").reverse();if(1===b.length)return g[a];for(a=b.pop();"undefined"!==typeof a&&"undefined"!==typeof g&&null!==g;)g=g[a],a=b.pop(); return g}f.timers=[];var D=f.charts,L=f.doc,B=f.win,x=f.error=function(a,g,b,c){var d=r(a),e=d?"Highcharts error #"+a+": www.highcharts.com/errors/"+a+"/":a.toString(),J=function(){if(g)throw Error(e);B.console&&console.log(e)};if("undefined"!==typeof c){var h="";d&&(e+="?");f.objectEach(c,function(a,g){h+="\n"+g+": "+a;d&&(e+=encodeURI(g)+"="+encodeURI(a))});e+=h}b?f.fireEvent(b,"displayError",{code:a,message:e,params:c},J):J()},M=function(){function a(a,g,b){this.options=g;this.elem=a;this.prop= b}a.prototype.dSetter=function(){var a=this.paths[0],g=this.paths[1],b=[],c=this.now,d=a.length;if(1===c)b=this.toD;else if(d===g.length&&1>c)for(;d--;){var e=parseFloat(a[d]);b[d]=isNaN(e)||"A"===g[d-4]||"A"===g[d-5]?g[d]:c*parseFloat(""+(g[d]-e))+e}else b=g;this.elem.attr("d",b,null,!0)};a.prototype.update=function(){var a=this.elem,g=this.prop,b=this.now,c=this.options.step;if(this[g+"Setter"])this[g+"Setter"]();else a.attr?a.element&&a.attr(g,b,null,!0):a.style[g]=b+this.unit;c&&c.call(a,b,this)}; a.prototype.run=function(a,g,b){var c=this,d=c.options,e=function(a){return e.stopped?!1:c.step(a)},J=B.requestAnimationFrame||function(a){setTimeout(a,13)},h=function(){for(var a=0;a<f.timers.length;a++)f.timers[a]()||f.timers.splice(a--,1);f.timers.length&&J(h)};a!==g||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=a,this.end=g,this.unit=b,this.now=this.start,this.pos=0,e.elem=this.elem,e.prop=this.prop,e()&&1===f.timers.push(e)&&J(h)):(delete d.curAnim[this.prop],d.complete&& 0===Object.keys(d.curAnim).length&&d.complete.call(this.elem))};a.prototype.step=function(a){var g=+new Date,b=this.options,c=this.elem,d=b.complete,e=b.duration,J=b.curAnim;if(c.attr&&!c.element)a=!1;else if(a||g>=e+this.startTime){this.now=this.end;this.pos=1;this.update();var h=J[this.prop]=!0;Y(J,function(a){!0!==a&&(h=!1)});h&&d&&d.call(c);a=!1}else this.pos=b.easing((g-this.startTime)/e),this.now=this.start+(this.end-this.start)*this.pos,this.update(),a=!0;return a};a.prototype.initPath=function(a, g,b){function c(a){for(m=a.length;m--;){var g="M"===a[m]||"L"===a[m];var b=/[a-zA-Z]/.test(a[m+3]);g&&b&&a.splice(m+1,0,a[m+1],a[m+2],a[m+1],a[m+2])}}function d(a,g){for(;a.length<y;){a[0]=g[y-a.length];var b=a.slice(0,p);[].splice.apply(a,[0,0].concat(b));w&&(b=a.slice(a.length-p),[].splice.apply(a,[a.length,0].concat(b)),m--)}a[0]="M"}function e(a,g){for(var b=(y-a.length)/p;0<b&&b--;)H=a.slice().splice(a.length/N-p,p*N),H[0]=g[y-p-b*p],z&&(H[p-6]=H[p-2],H[p-5]=H[p-1]),[].splice.apply(a,[a.length/ N,0].concat(H)),w&&b--}g=g||"";var J=a.startX,h=a.endX,z=-1<g.indexOf("C"),p=z?7:3,H,m;g=g.split(" ");b=b.slice();var w=a.isArea,N=w?2:1;z&&(c(g),c(b));if(J&&h){for(m=0;m<J.length;m++)if(J[m]===h[0]){var t=m;break}else if(J[0]===h[h.length-J.length+m]){t=m;var S=!0;break}else if(J[J.length-1]===h[h.length-J.length+m]){t=J.length-m;break}"undefined"===typeof t&&(g=[])}if(g.length&&r(t)){var y=b.length+t*N*p;S?(d(g,b),e(b,g)):(d(b,g),e(g,b))}return[g,b]};a.prototype.fillSetter=function(){f.Fx.prototype.strokeSetter.apply(this, arguments)};a.prototype.strokeSetter=function(){this.elem.attr(this.prop,f.color(this.start).tweenTo(f.color(this.end),this.pos),null,!0)};return a}();f.Fx=M;f.merge=k;var A=f.pInt=function(a,g){return parseInt(a,g||10)},v=f.isString=function(a){return"string"===typeof a},C=f.isArray=function(a){a=Object.prototype.toString.call(a);return"[object Array]"===a||"[object Array Iterator]"===a},G=f.isObject=function(a,g){return!!a&&"object"===typeof a&&(!g||!C(a))},n=f.isDOMElement=function(a){return G(a)&& "number"===typeof a.nodeType},l=f.isClass=function(a){var g=a&&a.constructor;return!(!G(a,!0)||n(a)||!g||!g.name||"Object"===g.name)},r=f.isNumber=function(a){return"number"===typeof a&&!isNaN(a)&&Infinity>a&&-Infinity<a},e=f.erase=function(a,g){for(var b=a.length;b--;)if(a[b]===g){a.splice(b,1);break}},d=f.defined=function(a){return"undefined"!==typeof a&&null!==a};f.attr=F;var h=f.splat=function(a){return C(a)?a:[a]},m=f.syncTimeout=function(a,g,b){if(0<g)return setTimeout(a,g,b);a.call(0,b);return-1}, c=f.clearTimeout=function(a){d(a)&&clearTimeout(a)},b=f.extend=function(a,g){var b;a||(a={});for(b in g)a[b]=g[b];return a};f.pick=q;var w=f.css=function(a,g){f.isMS&&!f.svg&&g&&"undefined"!==typeof g.opacity&&(g.filter="alpha(opacity="+100*g.opacity+")");b(a.style,g)},E=f.createElement=function(a,g,c,d,e){a=L.createElement(a);g&&b(a,g);e&&w(a,{padding:"0",border:"none",margin:"0"});c&&w(a,c);d&&d.appendChild(a);return a},t=f.extendClass=function(a,g){var c=function(){};c.prototype=new a;b(c.prototype, g);return c},a=f.pad=function(a,g,b){return Array((g||2)+1-String(a).replace("-","").length).join(b||"0")+a},p=f.relativeLength=function(a,g,b){return/%$/.test(a)?g*parseFloat(a)/100+(b||0):parseFloat(a)},y=f.wrap=function(a,g,b){var c=a[g];a[g]=function(){var a=Array.prototype.slice.call(arguments),g=arguments,d=this;d.proceed=function(){c.apply(d,arguments.length?arguments:g)};a.unshift(c);a=b.apply(this,a);d.proceed=null;return a}},I=f.format=function(a,g,b){var c="{",d=!1,e=[],J=/f$/,h=/\.([0-9])/, z=f.defaultOptions.lang,p=b&&b.time||f.time;for(b=b&&b.numberFormatter||X;a;){var m=a.indexOf(c);if(-1===m)break;var H=a.slice(0,m);if(d){H=H.split(":");c=K(H.shift()||"",g);if(H.length&&"number"===typeof c)if(H=H.join(":"),J.test(H)){var w=parseInt((H.match(h)||["","-1"])[1],10);null!==c&&(c=b(c,w,z.decimalPoint,-1<H.indexOf(",")?z.thousandsSep:""))}else c=p.dateFormat(H,c);e.push(c)}else e.push(H);a=a.slice(m+1);c=(d=!d)?"}":"{"}e.push(a);return e.join("")},O=f.getMagnitude=function(a){return Math.pow(10, Math.floor(Math.log(a)/Math.LN10))},P=f.normalizeTickInterval=function(a,g,b,c,d){var e=a;b=q(b,1);var J=a/b;g||(g=d?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===c&&(1===b?g=g.filter(function(a){return 0===a%1}):.1>=b&&(g=[1/b])));for(c=0;c<g.length&&!(e=g[c],d&&e*b>=a||!d&&J<=(g[c]+(g[c+1]||g[c]))/2);c++);return e=T(e*b,-Math.round(Math.log(.001)/Math.LN10))},z=f.stableSort=function(a,g){var b=a.length,c,d;for(d=0;d<b;d++)a[d].safeI=d;a.sort(function(a,b){c=g(a,b);return 0===c?a.safeI-b.safeI: c});for(d=0;d<b;d++)delete a[d].safeI},g=f.arrayMin=function(a){for(var g=a.length,b=a[0];g--;)a[g]<b&&(b=a[g]);return b},N=f.arrayMax=function(a){for(var g=a.length,b=a[0];g--;)a[g]>b&&(b=a[g]);return b},H=f.destroyObjectProperties=function(a,g){Y(a,function(b,c){b&&b!==g&&b.destroy&&b.destroy();delete a[c]})},U=f.discardElement=function(a){var g=f.garbageBin;g||(g=E("div"));a&&g.appendChild(a);g.innerHTML=""},T=f.correctFloat=function(a,g){return parseFloat(a.toPrecision(g||14))},W=f.setAnimation= function(a,g){g.renderer.globalAnimation=q(a,g.options.chart.animation,!0)},R=f.animObject=function(a){return G(a)?k(a):{duration:a?500:0}},J=f.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5},X=f.numberFormat=function(a,g,b,c){a=+a||0;g=+g;var d=f.defaultOptions.lang,e=(a.toString().split(".")[1]||"").split("e")[0].length,J=a.toString().split("e");if(-1===g)g=Math.min(e,20);else if(!r(g))g=2;else if(g&&J[1]&&0>J[1]){var h=g+ +J[1];0<=h?(J[0]= (+J[0]).toExponential(h).split("e")[0],g=h):(J[0]=J[0].split(".")[0]||0,a=20>g?(J[0]*Math.pow(10,J[1])).toFixed(g):0,J[1]=0)}var z=(Math.abs(J[1]?J[0]:a)+Math.pow(10,-Math.max(g,e)-1)).toFixed(g);e=String(A(z));h=3<e.length?e.length%3:0;b=q(b,d.decimalPoint);c=q(c,d.thousandsSep);a=(0>a?"-":"")+(h?e.substr(0,h)+c:"");a+=e.substr(h).replace(/(\d{3})(?=\d)/g,"$1"+c);g&&(a+=b+z.slice(-g));J[1]&&0!==+a&&(a+="e"+J[1]);return a};Math.easeInOutSine=function(a){return-.5*(Math.cos(Math.PI*a)-1)};var ea=f.getStyle= function(a,g,b){if("width"===g)return g=Math.min(a.offsetWidth,a.scrollWidth),b=a.getBoundingClientRect&&a.getBoundingClientRect().width,b<g&&b>=g-1&&(g=Math.floor(b)),Math.max(0,g-f.getStyle(a,"padding-left")-f.getStyle(a,"padding-right"));if("height"===g)return Math.max(0,Math.min(a.offsetHeight,a.scrollHeight)-f.getStyle(a,"padding-top")-f.getStyle(a,"padding-bottom"));B.getComputedStyle||x(27,!0);if(a=B.getComputedStyle(a,void 0))a=a.getPropertyValue(g),q(b,"opacity"!==g)&&(a=A(a));return a}, Z=f.inArray=function(a,g,b){return g.indexOf(a,b)},S=f.find=Array.prototype.find?function(a,g){return a.find(g)}:function(a,g){var b,c=a.length;for(b=0;b<c;b++)if(g(a[b],b))return a[b]};f.keys=Object.keys;var ba=f.offset=function(a){var g=L.documentElement;a=a.parentElement||a.parentNode?a.getBoundingClientRect():{top:0,left:0};return{top:a.top+(B.pageYOffset||g.scrollTop)-(g.clientTop||0),left:a.left+(B.pageXOffset||g.scrollLeft)-(g.clientLeft||0)}},ca=f.stop=function(a,g){for(var b=f.timers.length;b--;)f.timers[b].elem!== a||g&&g!==f.timers[b].prop||(f.timers[b].stopped=!0)},Y=f.objectEach=function(a,g,b){for(var c in a)Object.hasOwnProperty.call(a,c)&&g.call(b||a[c],a[c],c,a)};Y({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(a,g){f[g]=function(g){return Array.prototype[a].apply(g,[].slice.call(arguments,1))}});var ha=f.addEvent=function(a,g,b,c){void 0===c&&(c={});var d=a.addEventListener||f.addEventListenerPolyfill;var e="function"===typeof a&&a.prototype?a.prototype.protoEvents=a.prototype.protoEvents|| {}:a.hcEvents=a.hcEvents||{};f.Point&&a instanceof f.Point&&a.series&&a.series.chart&&(a.series.chart.runTrackerClick=!0);d&&d.call(a,g,b,!1);e[g]||(e[g]=[]);e[g].push({fn:b,order:"number"===typeof c.order?c.order:Infinity});e[g].sort(function(a,g){return a.order-g.order});return function(){aa(a,g,b)}},aa=f.removeEvent=function(a,g,b){function c(g,b){var c=a.removeEventListener||f.removeEventListenerPolyfill;c&&c.call(a,g,b,!1)}function d(b){var d;if(a.nodeName){if(g){var e={};e[g]=!0}else e=b;Y(e, function(a,g){if(b[g])for(d=b[g].length;d--;)c(g,b[g][d].fn)})}}var e;["protoEvents","hcEvents"].forEach(function(J,h){var z=(h=h?a:a.prototype)&&h[J];z&&(g?(e=z[g]||[],b?(z[g]=e.filter(function(a){return b!==a.fn}),c(g,b)):(d(z),z[g]=[])):(d(z),h[J]={}))})},da=f.fireEvent=function(a,g,c,d){var e;c=c||{};if(L.createEvent&&(a.dispatchEvent||a.fireEvent)){var J=L.createEvent("Events");J.initEvent(g,!0,!0);b(J,c);a.dispatchEvent?a.dispatchEvent(J):a.fireEvent(g,J)}else c.target||b(c,{preventDefault:function(){c.defaultPrevented= !0},target:a,type:g}),function(g,b){void 0===g&&(g=[]);void 0===b&&(b=[]);var d=0,J=0,h=g.length+b.length;for(e=0;e<h;e++)!1===(g[d]?b[J]?g[d].order<=b[J].order?g[d++]:b[J++]:g[d++]:b[J++]).fn.call(a,c)&&c.preventDefault()}(a.protoEvents&&a.protoEvents[g],a.hcEvents&&a.hcEvents[g]);d&&!c.defaultPrevented&&d.call(a,c)},ia=f.animate=function(a,g,b){var c,d="",e,J;if(!G(b)){var h=arguments;b={duration:h[2],easing:h[3],complete:h[4]}}r(b.duration)||(b.duration=400);b.easing="function"===typeof b.easing? b.easing:Math[b.easing]||Math.easeInOutSine;b.curAnim=k(g);Y(g,function(h,z){ca(a,z);J=new M(a,b,z);e=null;"d"===z?(J.paths=J.initPath(a,a.d,g.d),J.toD=g.d,c=0,e=1):a.attr?c=a.attr(z):(c=parseFloat(ea(a,z))||0,"opacity"!==z&&(d="px"));e||(e=h);e&&e.match&&e.match("px")&&(e=e.replace(/px/g,""));J.run(c,e,d)})},u=f.seriesType=function(a,g,b,c,d){var e=f.getOptions(),J=f.seriesTypes;e.plotOptions[a]=k(e.plotOptions[g],b);J[a]=t(J[g]||function(){},c);J[a].prototype.type=a;d&&(J[a].prototype.pointClass= t(f.Point,d));return J[a]},fa=f.uniqueKey=function(){var a=Math.random().toString(36).substring(2,9),g=0;return function(){return"highcharts-"+a+"-"+g++}}(),ja=f.isFunction=function(a){return"function"===typeof a};B.jQuery&&(B.jQuery.fn.highcharts=function(){var a=[].slice.call(arguments);if(this[0])return a[0]?(new (f[v(a[0])?a.shift():"Chart"])(this[0],a[0],a[1]),this):D[F(this[0],"data-highcharts-chart")]});return{Fx:M,addEvent:ha,animate:ia,animObject:R,arrayMax:N,arrayMin:g,attr:F,clamp:function(a, g,b){return a>g?a<b?a:b:g},clearTimeout:c,correctFloat:T,createElement:E,css:w,defined:d,destroyObjectProperties:H,discardElement:U,erase:e,error:x,extend:b,extendClass:t,find:S,fireEvent:da,format:I,getMagnitude:O,getNestedProperty:K,getStyle:ea,inArray:Z,isArray:C,isClass:l,isDOMElement:n,isFunction:ja,isNumber:r,isObject:G,isString:v,merge:k,normalizeTickInterval:P,numberFormat:X,objectEach:Y,offset:ba,pad:a,pick:q,pInt:A,relativeLength:p,removeEvent:aa,seriesType:u,setAnimation:W,splat:h,stableSort:z, stop:ca,syncTimeout:m,timeUnits:J,uniqueKey:fa,wrap:y}});Q(u,"parts/Color.js",[u["parts/Globals.js"],u["parts/Utilities.js"]],function(f,k){var F=k.isNumber,q=k.merge,K=k.pInt;k=function(){function f(f){this.parsers=[{regex:/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,parse:function(f){return[K(f[1]),K(f[2]),K(f[3]),parseFloat(f[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(f){return[K(f[1]),K(f[2]), K(f[3]),1]}}];this.rgba=[];this.init(f)}f.parse=function(k){return new f(k)};f.prototype.init=function(k){var B,x;if((this.input=k=f.names[k&&k.toLowerCase?k.toLowerCase():""]||k)&&k.stops)this.stops=k.stops.map(function(v){return new f(v[1])});else{if(k&&k.charAt&&"#"===k.charAt()){var q=k.length;k=parseInt(k.substr(1),16);7===q?B=[(k&16711680)>>16,(k&65280)>>8,k&255,1]:4===q&&(B=[(k&3840)>>4|(k&3840)>>8,(k&240)>>4|k&240,(k&15)<<4|k&15,1])}if(!B)for(x=this.parsers.length;x--&&!B;){var A=this.parsers[x]; (q=A.regex.exec(k))&&(B=A.parse(q))}}this.rgba=B||[]};f.prototype.get=function(f){var k=this.input,x=this.rgba;if("undefined"!==typeof this.stops){var D=q(k);D.stops=[].concat(D.stops);this.stops.forEach(function(A,v){D.stops[v]=[D.stops[v][0],A.get(f)]})}else D=x&&F(x[0])?"rgb"===f||!f&&1===x[3]?"rgb("+x[0]+","+x[1]+","+x[2]+")":"a"===f?x[3]:"rgba("+x.join(",")+")":k;return D};f.prototype.brighten=function(f){var k,x=this.rgba;if(this.stops)this.stops.forEach(function(k){k.brighten(f)});else if(F(f)&& 0!==f)for(k=0;3>k;k++)x[k]+=K(255*f),0>x[k]&&(x[k]=0),255<x[k]&&(x[k]=255);return this};f.prototype.setOpacity=function(f){this.rgba[3]=f;return this};f.prototype.tweenTo=function(f,k){var x=this.rgba,q=f.rgba;q.length&&x&&x.length?(f=1!==q[3]||1!==x[3],k=(f?"rgba(":"rgb(")+Math.round(q[0]+(x[0]-q[0])*(1-k))+","+Math.round(q[1]+(x[1]-q[1])*(1-k))+","+Math.round(q[2]+(x[2]-q[2])*(1-k))+(f?","+(q[3]+(x[3]-q[3])*(1-k)):"")+")"):k=f.input||"none";return k};f.names={white:"#ffffff",black:"#000000"};return f}(); f.Color=k;f.color=k.parse;return f.Color});Q(u,"parts/SvgRenderer.js",[u["parts/Globals.js"],u["parts/Color.js"],u["parts/Utilities.js"]],function(f,k,F){var q=k.parse,K=F.addEvent,D=F.animate,L=F.animObject,B=F.attr,x=F.createElement,M=F.css,A=F.defined,v=F.destroyObjectProperties,C=F.erase,G=F.extend,n=F.inArray,l=F.isArray,r=F.isNumber,e=F.isObject,d=F.isString,h=F.merge,m=F.objectEach,c=F.pick,b=F.pInt,w=F.removeEvent,E=F.splat,t=F.stop,a=F.uniqueKey,p=f.charts,y=f.deg2rad,I=f.doc,O=f.hasTouch, P=f.isFirefox,z=f.isMS,g=f.isWebKit,N=f.noop,H=f.svg,U=f.SVG_NS,T=f.symbolSizes,W=f.win;var R=f.SVGElement=function(){return this};G(R.prototype,{opacity:1,SVG_NS:U,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline cursor".split(" "),init:function(a,g){this.element="span"===g?x(g):I.createElementNS(this.SVG_NS,g);this.renderer=a;f.fireEvent(this,"afterInit")},animate:function(a,g,b){var d=L(c(g,this.renderer.globalAnimation, !0));c(I.hidden,I.msHidden,I.webkitHidden,!1)&&(d.duration=0);0!==d.duration?(b&&(d.complete=b),D(this,a,d)):(this.attr(a,void 0,b),m(a,function(a,g){d.step&&d.step.call(this,a,{prop:g,pos:1})},this));return this},complexColor:function(g,b,c){var d=this.renderer,e,J,z,p,H,w,N,t,y,X,E,n=[],r;f.fireEvent(this.renderer,"complexColor",{args:arguments},function(){g.radialGradient?J="radialGradient":g.linearGradient&&(J="linearGradient");J&&(z=g[J],H=d.gradients,N=g.stops,X=c.radialReference,l(z)&&(g[J]= z={x1:z[0],y1:z[1],x2:z[2],y2:z[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===J&&X&&!A(z.gradientUnits)&&(p=z,z=h(z,d.getRadialAttr(X,p),{gradientUnits:"userSpaceOnUse"})),m(z,function(a,g){"id"!==g&&n.push(g,a)}),m(N,function(a){n.push(a)}),n=n.join(","),H[n]?E=H[n].attr("id"):(z.id=E=a(),H[n]=w=d.createElement(J).attr(z).add(d.defs),w.radAttr=p,w.stops=[],N.forEach(function(a){0===a[1].indexOf("rgba")?(e=q(a[1]),t=e.get("rgb"),y=e.get("a")):(t=a[1],y=1);a=d.createElement("stop").attr({offset:a[0], "stop-color":t,"stop-opacity":y}).add(w);w.stops.push(a)})),r="url("+d.url+"#"+E+")",c.setAttribute(b,r),c.gradient=n,g.toString=function(){return r})})},applyTextOutline:function(a){var g=this.element,b;-1!==a.indexOf("contrast")&&(a=a.replace(/contrast/g,this.renderer.getContrast(g.style.fill)));a=a.split(" ");var c=a[a.length-1];if((b=a[0])&&"none"!==b&&f.svg){this.fakeTS=!0;a=[].slice.call(g.getElementsByTagName("tspan"));this.ySetter=this.xSetter;b=b.replace(/(^[\d\.]+)(.*?)$/g,function(a,g, b){return 2*g+b});this.removeTextOutline(a);var d=g.textContent?/^[\u0591-\u065F\u066A-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/.test(g.textContent):!1;var e=g.firstChild;a.forEach(function(a,J){0===J&&(a.setAttribute("x",g.getAttribute("x")),J=g.getAttribute("y"),a.setAttribute("y",J||0),null===J&&g.setAttribute("y",0));J=a.cloneNode(!0);B(d&&!P?a:J,{"class":"highcharts-text-outline",fill:c,stroke:c,"stroke-width":b,"stroke-linejoin":"round"});g.insertBefore(J,e)});d&&P&&a[0]&&(a=a[0].cloneNode(!0),a.textContent= " ",g.insertBefore(a,e))}},removeTextOutline:function(a){for(var g=a.length,b;g--;)b=a[g],"highcharts-text-outline"===b.getAttribute("class")&&C(a,this.element.removeChild(b))},symbolCustomAttribs:"x y width height r start end innerR anchorX anchorY rounded".split(" "),attr:function(a,g,b,c){var d=this.element,e,J=this,h,z,p=this.symbolCustomAttribs;if("string"===typeof a&&"undefined"!==typeof g){var H=a;a={};a[H]=g}"string"===typeof a?J=(this[a+"Getter"]||this._defaultGetter).call(this,a,d):(m(a, function(g,b){h=!1;c||t(this,b);this.symbolName&&-1!==n(b,p)&&(e||(this.symbolAttr(a),e=!0),h=!0);!this.rotation||"x"!==b&&"y"!==b||(this.doTransform=!0);h||(z=this[b+"Setter"]||this._defaultSetter,z.call(this,g,b,d),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(b)&&this.updateShadows(b,g,z))},this),this.afterSetters());b&&b.call(this);return J},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},updateShadows:function(a, g,b){for(var c=this.shadows,d=c.length;d--;)b.call(c[d],"height"===a?Math.max(g-(c[d].cutHeight||0),0):"d"===a?this.d:g,a,c[d])},addClass:function(a,g){var b=g?"":this.attr("class")||"";a=(a||"").split(/ /g).reduce(function(a,g){-1===b.indexOf(g)&&a.push(g);return a},b?[b]:[]).join(" ");a!==b&&this.attr("class",a);return this},hasClass:function(a){return-1!==(this.attr("class")||"").split(" ").indexOf(a)},removeClass:function(a){return this.attr("class",(this.attr("class")||"").replace(d(a)?new RegExp(" ?"+ a+" ?"):a,""))},symbolAttr:function(a){var g=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(b){g[b]=c(a[b],g[b])});g.attr({d:g.renderer.symbols[g.symbolName](g.x,g.y,g.width,g.height,g)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":"none")},crisp:function(a,g){g=g||a.strokeWidth||0;var b=Math.round(g)%2/2;a.x=Math.floor(a.x||this.x||0)+b;a.y=Math.floor(a.y||this.y||0)+b;a.width=Math.floor((a.width||this.width|| 0)-2*b);a.height=Math.floor((a.height||this.height||0)-2*b);A(a.strokeWidth)&&(a.strokeWidth=g);return a},css:function(a){var g=this.styles,c={},d=this.element,e="",h=!g,z=["textOutline","textOverflow","width"];a&&a.color&&(a.fill=a.color);g&&m(a,function(a,b){a!==g[b]&&(c[b]=a,h=!0)});if(h){g&&(a=G(g,c));if(a)if(null===a.width||"auto"===a.width)delete this.textWidth;else if("text"===d.nodeName.toLowerCase()&&a.width)var p=this.textWidth=b(a.width);this.styles=a;p&&!H&&this.renderer.forExport&&delete a.width; if(d.namespaceURI===this.SVG_NS){var J=function(a,g){return"-"+g.toLowerCase()};m(a,function(a,g){-1===z.indexOf(g)&&(e+=g.replace(/([A-Z])/g,J)+":"+a+";")});e&&B(d,"style",e)}else M(d,a);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),a&&a.textOutline&&this.applyTextOutline(a.textOutline))}return this},getStyle:function(a){return W.getComputedStyle(this.element||this,"").getPropertyValue(a)},strokeWidth:function(){if(!this.renderer.styledMode)return this["stroke-width"]|| 0;var a=this.getStyle("stroke-width"),g=0;if(a.indexOf("px")===a.length-2)g=b(a);else if(""!==a){var c=I.createElementNS(U,"rect");B(c,{width:a,"stroke-width":0});this.element.parentNode.appendChild(c);g=c.getBBox().width;c.parentNode.removeChild(c)}return g},on:function(a,g){var b=this,c=b.element;O&&"click"===a?(c.ontouchstart=function(a){b.touchEventFired=Date.now();a.preventDefault();g.call(c,a)},c.onclick=function(a){(-1===W.navigator.userAgent.indexOf("Android")||1100<Date.now()-(b.touchEventFired|| 0))&&g.call(c,a)}):c["on"+a]=g;return this},setRadialReference:function(a){var g=this.renderer.gradients[this.element.gradient];this.element.radialReference=a;g&&g.radAttr&&g.animate(this.renderer.getRadialAttr(a,g.radAttr));return this},translate:function(a,g){return this.attr({translateX:a,translateY:g})},invert:function(a){this.inverted=a;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,g=this.translateY||0,b=this.scaleX,d=this.scaleY,e=this.inverted,h=this.rotation, z=this.matrix,p=this.element;e&&(a+=this.width,g+=this.height);a=["translate("+a+","+g+")"];A(z)&&a.push("matrix("+z.join(",")+")");e?a.push("rotate(90) scale(-1,1)"):h&&a.push("rotate("+h+" "+c(this.rotationOriginX,p.getAttribute("x"),0)+" "+c(this.rotationOriginY,p.getAttribute("y")||0)+")");(A(b)||A(d))&&a.push("scale("+c(b,1)+" "+c(d,1)+")");a.length&&p.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,g,b){var e, h={};var z=this.renderer;var p=z.alignedObjects;var H,J;if(a){if(this.alignOptions=a,this.alignByTranslate=g,!b||d(b))this.alignTo=e=b||"renderer",C(p,this),p.push(this),b=null}else a=this.alignOptions,g=this.alignByTranslate,e=this.alignTo;b=c(b,z[e],z);e=a.align;z=a.verticalAlign;p=(b.x||0)+(a.x||0);var m=(b.y||0)+(a.y||0);"right"===e?H=1:"center"===e&&(H=2);H&&(p+=(b.width-(a.width||0))/H);h[g?"translateX":"x"]=Math.round(p);"bottom"===z?J=1:"middle"===z&&(J=2);J&&(m+=(b.height-(a.height||0))/ J);h[g?"translateY":"y"]=Math.round(m);this[this.placed?"animate":"attr"](h);this.placed=!0;this.alignAttr=h;return this},getBBox:function(a,g){var b,d=this.renderer,e=this.element,z=this.styles,h=this.textStr,p,H=d.cache,m=d.cacheKeys,J=e.namespaceURI===this.SVG_NS;g=c(g,this.rotation,0);var w=d.styledMode?e&&R.prototype.getStyle.call(e,"font-size"):z&&z.fontSize;if(A(h)){var N=h.toString();-1===N.indexOf("<")&&(N=N.replace(/[0-9]/g,"0"));N+=["",g,w,this.textWidth,z&&z.textOverflow].join()}N&&!a&& (b=H[N]);if(!b){if(J||d.forExport){try{(p=this.fakeTS&&function(a){[].forEach.call(e.querySelectorAll(".highcharts-text-outline"),function(g){g.style.display=a})})&&p("none"),b=e.getBBox?G({},e.getBBox()):{width:e.offsetWidth,height:e.offsetHeight},p&&p("")}catch(fa){""}if(!b||0>b.width)b={width:0,height:0}}else b=this.htmlGetBBox();d.isSVG&&(a=b.width,d=b.height,J&&(b.height=d={"11px,17":14,"13px,20":16}[z&&z.fontSize+","+Math.round(d)]||d),g&&(z=g*y,b.width=Math.abs(d*Math.sin(z))+Math.abs(a*Math.cos(z)), b.height=Math.abs(d*Math.cos(z))+Math.abs(a*Math.sin(z))));if(N&&0<b.height){for(;250<m.length;)delete H[m.shift()];H[N]||m.push(N);H[N]=b}}return b},show:function(a){return this.attr({visibility:a?"inherit":"visible"})},hide:function(a){a?this.attr({y:-9999}):this.attr({visibility:"hidden"});return this},fadeOut:function(a){var g=this;g.animate({opacity:0},{duration:a||150,complete:function(){g.attr({y:-9999})}})},add:function(a){var g=this.renderer,b=this.element;a&&(this.parentGroup=a);this.parentInverted= a&&a.inverted;"undefined"!==typeof this.textStr&&g.buildText(this);this.added=!0;if(!a||a.handleZ||this.zIndex)var c=this.zIndexSetter();c||(a?a.element:g.box).appendChild(b);if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var g=a.parentNode;g&&g.removeChild(a)},destroy:function(){var a=this,g=a.element||{},b=a.renderer,c=b.isSVG&&"SPAN"===g.nodeName&&a.parentGroup,d=g.ownerSVGElement,e=a.clipPath;g.onclick=g.onmouseout=g.onmouseover=g.onmousemove=g.point=null;t(a);e&&d&&([].forEach.call(d.querySelectorAll("[clip-path],[CLIP-PATH]"), function(a){-1<a.getAttribute("clip-path").indexOf(e.element.id)&&a.removeAttribute("clip-path")}),a.clipPath=e.destroy());if(a.stops){for(d=0;d<a.stops.length;d++)a.stops[d]=a.stops[d].destroy();a.stops=null}a.safeRemoveChild(g);for(b.styledMode||a.destroyShadows();c&&c.div&&0===c.div.childNodes.length;)g=c.parentGroup,a.safeRemoveChild(c.div),delete c.div,c=g;a.alignTo&&C(b.alignedObjects,a);m(a,function(g,b){a[b]&&a[b].parentGroup===a&&a[b].destroy&&a[b].destroy();delete a[b]})},shadow:function(a, g,b){var d=[],e,z=this.element;if(!a)this.destroyShadows();else if(!this.shadows){var h=c(a.width,3);var p=(a.opacity||.15)/h;var H=this.parentInverted?"(-1,-1)":"("+c(a.offsetX,1)+", "+c(a.offsetY,1)+")";for(e=1;e<=h;e++){var m=z.cloneNode(0);var w=2*h+1-2*e;B(m,{stroke:a.color||"#000000","stroke-opacity":p*e,"stroke-width":w,transform:"translate"+H,fill:"none"});m.setAttribute("class",(m.getAttribute("class")||"")+" highcharts-shadow");b&&(B(m,"height",Math.max(B(m,"height")-w,0)),m.cutHeight=w); g?g.element.appendChild(m):z.parentNode&&z.parentNode.insertBefore(m,z);d.push(m)}this.shadows=d}return this},destroyShadows:function(){(this.shadows||[]).forEach(function(a){this.safeRemoveChild(a)},this);this.shadows=void 0},xGetter:function(a){"circle"===this.element.nodeName&&("x"===a?a="cx":"y"===a&&(a="cy"));return this._defaultGetter(a)},_defaultGetter:function(a){a=c(this[a+"Value"],this[a],this.element?this.element.getAttribute(a):null,0);/^[\-0-9\.]+$/.test(a)&&(a=parseFloat(a));return a}, dSetter:function(a,g,b){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");this[g]!==a&&(b.setAttribute(g,a),this[g]=a)},dashstyleSetter:function(a){var g,c=this["stroke-width"];"inherit"===c&&(c=1);if(a=a&&a.toLowerCase()){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(",");for(g=a.length;g--;)a[g]=b(a[g])* c;a=a.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",a)}},alignSetter:function(a){var g={left:"start",center:"middle",right:"end"};g[a]&&(this.alignValue=a,this.element.setAttribute("text-anchor",g[a]))},opacitySetter:function(a,g,b){this[g]=a;b.setAttribute(g,a)},titleSetter:function(a){var g=this.element.getElementsByTagName("title")[0];g||(g=I.createElementNS(this.SVG_NS,"title"),this.element.appendChild(g));g.firstChild&&g.removeChild(g.firstChild);g.appendChild(I.createTextNode(String(c(a, "")).replace(/<[^>]*>/g,"").replace(/&lt;/g,"<").replace(/&gt;/g,">")))},textSetter:function(a){a!==this.textStr&&(delete this.bBox,delete this.textPxLength,this.textStr=a,this.added&&this.renderer.buildText(this))},setTextPath:function(g,b){var c=this.element,d={textAnchor:"text-anchor"},e=!1,z=this.textPathWrapper,p=!z;b=h(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},b);var H=b.attributes;if(g&&b&&b.enabled){z&&null===z.element.parentNode?(p=!0,z=z.destroy()):z&&this.removeTextOutline.call(z.parentGroup, [].slice.call(c.getElementsByTagName("tspan")));this.options&&this.options.padding&&(H.dx=-this.options.padding);z||(this.textPathWrapper=z=this.renderer.createElement("textPath"),e=!0);var w=z.element;(b=g.element.getAttribute("id"))||g.element.setAttribute("id",b=a());if(p)for(g=c.getElementsByTagName("tspan");g.length;)g[0].setAttribute("y",0),r(H.dx)&&g[0].setAttribute("x",-H.dx),w.appendChild(g[0]);e&&z.add({element:this.text?this.text.element:c});w.setAttributeNS("http://www.w3.org/1999/xlink", "href",this.renderer.url+"#"+b);A(H.dy)&&(w.parentNode.setAttribute("dy",H.dy),delete H.dy);A(H.dx)&&(w.parentNode.setAttribute("dx",H.dx),delete H.dx);m(H,function(a,g){w.setAttribute(d[g]||g,a)});c.removeAttribute("transform");this.removeTextOutline.call(z,[].slice.call(c.getElementsByTagName("tspan")));this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0});this.applyTextOutline=this.updateTransform=N}else z&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(c, g),this.updateTransform(),this.options.rotation&&this.applyTextOutline(this.options.style.textOutline));return this},destroyTextPath:function(a,g){var b=a.getElementsByTagName("text")[0];if(b){if(b.removeAttribute("dx"),b.removeAttribute("dy"),g.element.setAttribute("id",""),b.getElementsByTagName("textPath").length){for(a=this.textPathWrapper.element.childNodes;a.length;)b.appendChild(a[0]);b.removeChild(this.textPathWrapper.element)}}else if(a.getAttribute("dx")||a.getAttribute("dy"))a.removeAttribute("dx"), a.removeAttribute("dy");this.textPathWrapper=this.textPathWrapper.destroy()},fillSetter:function(a,g,b){"string"===typeof a?b.setAttribute(g,a):a&&this.complexColor(a,g,b)},visibilitySetter:function(a,g,b){"inherit"===a?b.removeAttribute(g):this[g]!==a&&b.setAttribute(g,a);this[g]=a},zIndexSetter:function(a,g){var c=this.renderer,d=this.parentGroup,e=(d||c).element||c.box,z=this.element,h=!1;c=e===c.box;var p=this.added;var H;A(a)?(z.setAttribute("data-z-index",a),a=+a,this[g]===a&&(p=!1)):A(this[g])&& z.removeAttribute("data-z-index");this[g]=a;if(p){(a=this.zIndex)&&d&&(d.handleZ=!0);g=e.childNodes;for(H=g.length-1;0<=H&&!h;H--){d=g[H];p=d.getAttribute("data-z-index");var m=!A(p);if(d!==z)if(0>a&&m&&!c&&!H)e.insertBefore(z,g[H]),h=!0;else if(b(p)<=a||m&&(!A(a)||0<=a))e.insertBefore(z,g[H+1]||null),h=!0}h||(e.insertBefore(z,g[c?3:0]||null),h=!0)}return h},_defaultSetter:function(a,g,b){b.setAttribute(g,a)}});R.prototype.yGetter=R.prototype.xGetter;R.prototype.translateXSetter=R.prototype.translateYSetter= R.prototype.rotationSetter=R.prototype.verticalAlignSetter=R.prototype.rotationOriginXSetter=R.prototype.rotationOriginYSetter=R.prototype.scaleXSetter=R.prototype.scaleYSetter=R.prototype.matrixSetter=function(a,g){this[g]=a;this.doTransform=!0};R.prototype["stroke-widthSetter"]=R.prototype.strokeSetter=function(a,g,b){this[g]=a;this.stroke&&this["stroke-width"]?(R.prototype.fillSetter.call(this,this.stroke,"stroke",b),b.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"=== g&&0===a&&this.hasStroke?(b.removeAttribute("stroke"),this.hasStroke=!1):this.renderer.styledMode&&this["stroke-width"]&&(b.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)};k=f.SVGRenderer=function(){this.init.apply(this,arguments)};G(k.prototype,{Element:R,SVG_NS:U,init:function(a,b,c,d,e,z,h){var p=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"});h||p.css(this.getStyle(d));d=p.element;a.appendChild(d);B(a,"dir","ltr");-1===a.innerHTML.indexOf("xmlns")&& B(d,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=d;this.boxWrapper=p;this.alignedObjects=[];this.url=(P||g)&&I.getElementsByTagName("base").length?W.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(I.createTextNode("Created with Highcharts 8.0.1"));this.defs=this.createElement("defs").add();this.allowHTML=z;this.forExport=e;this.styledMode=h;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount= 0;this.setSize(b,c,!1);var H;P&&a.getBoundingClientRect&&(b=function(){M(a,{left:0,top:0});H=a.getBoundingClientRect();M(a,{left:Math.ceil(H.left)-H.left+"px",top:Math.ceil(H.top)-H.top+"px"})},b(),this.unSubPixelFix=K(W,"resize",b))},definition:function(a){function g(a,c){var d;E(a).forEach(function(a){var e=b.createElement(a.tagName),z={};m(a,function(a,g){"tagName"!==g&&"children"!==g&&"textContent"!==g&&(z[g]=a)});e.attr(z);e.add(c||b.defs);a.textContent&&e.element.appendChild(I.createTextNode(a.textContent)); g(a.children||[],e);d=e});return d}var b=this;return g(a)},getStyle:function(a){return this.style=G({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},setStyle:function(a){this.boxWrapper.css(this.getStyle(a))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();v(this.gradients||{});this.gradients=null;a&&(this.defs=a.destroy());this.unSubPixelFix&& this.unSubPixelFix();return this.alignedObjects=null},createElement:function(a){var g=new this.Element;g.init(this,a);return g},draw:N,getRadialAttr:function(a,g){return{cx:a[0]-a[2]/2+g.cx*a[2],cy:a[1]-a[2]/2+g.cy*a[2],r:g.r*a[2]}},truncate:function(a,g,b,c,d,e,z){var h=this,p=a.rotation,H,m=c?1:0,w=(b||c).length,N=w,t=[],y=function(a){g.firstChild&&g.removeChild(g.firstChild);a&&g.appendChild(I.createTextNode(a))},E=function(e,p){p=p||e;if("undefined"===typeof t[p])if(g.getSubStringLength)try{t[p]= d+g.getSubStringLength(0,c?p+1:p)}catch(ka){""}else h.getSpanWidth&&(y(z(b||c,e)),t[p]=d+h.getSpanWidth(a,g));return t[p]},l;a.rotation=0;var n=E(g.textContent.length);if(l=d+n>e){for(;m<=w;)N=Math.ceil((m+w)/2),c&&(H=z(c,N)),n=E(N,H&&H.length-1),m===w?m=w+1:n>e?w=N-1:m=N;0===w?y(""):b&&w===b.length-1||y(H||z(b||c,N))}c&&c.splice(0,N);a.actualWidth=n;a.rotation=p;return l},escapes:{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},buildText:function(a){var g=a.element,d=this,e=d.forExport, z=c(a.textStr,"").toString(),h=-1!==z.indexOf("<"),p=g.childNodes,w,N=B(g,"x"),t=a.styles,y=a.textWidth,E=t&&t.lineHeight,l=t&&t.textOutline,n=t&&"ellipsis"===t.textOverflow,r=t&&"nowrap"===t.whiteSpace,J=t&&t.fontSize,T,f=p.length;t=y&&!a.added&&this.box;var O=function(a){var c;d.styledMode||(c=/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:J||d.style.fontSize||12);return E?b(E):d.fontMetrics(c,a.getAttribute("style")?a:g).h},v=function(a,g){m(d.escapes,function(b,c){g&&-1!==g.indexOf(b)|| (a=a.toString().replace(new RegExp(b,"g"),c))});return a},W=function(a,g){var b=a.indexOf("<");a=a.substring(b,a.indexOf(">")-b);b=a.indexOf(g+"=");if(-1!==b&&(b=b+g.length+1,g=a.charAt(b),'"'===g||"'"===g))return a=a.substring(b+1),a.substring(0,a.indexOf(g))},P=/<br.*?>/g;var A=[z,n,r,E,l,J,y].join();if(A!==a.textCache){for(a.textCache=A;f--;)g.removeChild(p[f]);h||l||n||y||-1!==z.indexOf(" ")&&(!r||P.test(z))?(t&&t.appendChild(g),h?(z=d.styledMode?z.replace(/<(b|strong)>/g,'<span class="highcharts-strong">').replace(/<(i|em)>/g, '<span class="highcharts-emphasized">'):z.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">'),z=z.replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(P)):z=[z],z=z.filter(function(a){return""!==a}),z.forEach(function(b,c){var z=0,h=0;b=b.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");var p=b.split("|||");p.forEach(function(b){if(""!==b||1===p.length){var m={},t=I.createElementNS(d.SVG_NS, "tspan"),l,E;(l=W(b,"class"))&&B(t,"class",l);if(l=W(b,"style"))l=l.replace(/(;| |^)color([ :])/,"$1fill$2"),B(t,"style",l);(E=W(b,"href"))&&!e&&(B(t,"onclick",'location.href="'+E+'"'),B(t,"class","highcharts-anchor"),d.styledMode||M(t,{cursor:"pointer"}));b=v(b.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==b){t.appendChild(I.createTextNode(b));z?m.dx=0:c&&null!==N&&(m.x=N);B(t,m);g.appendChild(t);!z&&T&&(!H&&e&&M(t,{display:"block"}),B(t,"dy",O(t)));if(y){var S=b.replace(/([^\^])-/g,"$1- ").split(" "); m=!r&&(1<p.length||c||1<S.length);E=0;var f=O(t);if(n)w=d.truncate(a,t,b,void 0,0,Math.max(0,y-parseInt(J||12,10)),function(a,g){return a.substring(0,g)+"\u2026"});else if(m)for(;S.length;)S.length&&!r&&0<E&&(t=I.createElementNS(U,"tspan"),B(t,{dy:f,x:N}),l&&B(t,"style",l),t.appendChild(I.createTextNode(S.join(" ").replace(/- /g,"-"))),g.appendChild(t)),d.truncate(a,t,null,S,0===E?h:0,y,function(a,g){return S.slice(0,g).join(" ").replace(/- /g,"-")}),h=a.actualWidth,E++}z++}}});T=T||g.childNodes.length}), n&&w&&a.attr("title",v(a.textStr,["&lt;","&gt;"])),t&&t.removeChild(g),l&&a.applyTextOutline&&a.applyTextOutline(l)):g.appendChild(I.createTextNode(v(z)))}},getContrast:function(a){a=q(a).rgba;a[0]*=1;a[1]*=1.2;a[2]*=.5;return 459<a[0]+a[1]+a[2]?"#000000":"#FFFFFF"},button:function(a,g,b,c,d,e,p,H,m,w){var N=this.label(a,g,b,m,null,null,w,null,"button"),t=0,y=this.styledMode;N.attr(h({padding:8,r:2},d));if(!y){d=h({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer", fontWeight:"normal"}},d);var l=d.style;delete d.style;e=h(d,{fill:"#e6e6e6"},e);var E=e.style;delete e.style;p=h(d,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},p);var n=p.style;delete p.style;H=h(d,{style:{color:"#cccccc"}},H);var r=H.style;delete H.style}K(N.element,z?"mouseover":"mouseenter",function(){3!==t&&N.setState(1)});K(N.element,z?"mouseout":"mouseleave",function(){3!==t&&N.setState(t)});N.setState=function(a){1!==a&&(N.state=t=a);N.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+ ["normal","hover","pressed","disabled"][a||0]);y||N.attr([d,e,p,H][a||0]).css([l,E,n,r][a||0])};y||N.attr(d).css(G({cursor:"default"},l));return N.on("click",function(a){3!==t&&c.call(N,a)})},crispLine:function(a,g){a[1]===a[4]&&(a[1]=a[4]=Math.round(a[1])-g%2/2);a[2]===a[5]&&(a[2]=a[5]=Math.round(a[2])+g%2/2);return a},path:function(a){var g=this.styledMode?{}:{fill:"none"};l(a)?g.d=a:e(a)&&G(g,a);return this.createElement("path").attr(g)},circle:function(a,g,b){a=e(a)?a:"undefined"===typeof a?{}: {x:a,y:g,r:b};g=this.createElement("circle");g.xSetter=g.ySetter=function(a,g,b){b.setAttribute("c"+g,a)};return g.attr(a)},arc:function(a,g,b,c,d,z){e(a)?(c=a,g=c.y,b=c.r,a=c.x):c={innerR:c,start:d,end:z};a=this.symbol("arc",a,g,b,b,c);a.r=b;return a},rect:function(a,g,b,c,d,z){d=e(a)?a.r:d;var h=this.createElement("rect");a=e(a)?a:"undefined"===typeof a?{}:{x:a,y:g,width:Math.max(b,0),height:Math.max(c,0)};this.styledMode||("undefined"!==typeof z&&(a.strokeWidth=z,a=h.crisp(a)),a.fill="none");d&& (a.r=d);h.rSetter=function(a,g,b){h.r=a;B(b,{rx:a,ry:a})};h.rGetter=function(){return h.r};return h.attr(a)},setSize:function(a,g,b){var d=this.alignedObjects,e=d.length;this.width=a;this.height=g;for(this.boxWrapper.animate({width:a,height:g},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:c(b,!0)?void 0:0});e--;)d[e].align()},g:function(a){var g=this.createElement("g");return a?g.attr({"class":"highcharts-"+a}):g},image:function(a,g,b,c,d,e){var z= {preserveAspectRatio:"none"},h=function(a,g){a.setAttributeNS?a.setAttributeNS("http://www.w3.org/1999/xlink","href",g):a.setAttribute("hc-svg-href",g)},p=function(g){h(H.element,a);e.call(H,g)};1<arguments.length&&G(z,{x:g,y:b,width:c,height:d});var H=this.createElement("image").attr(z);e?(h(H.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),z=new W.Image,K(z,"load",p),z.src=a,z.complete&&p({})):h(H.element,a);return H},symbol:function(a,g,b,d,e,z){var h=this, H=/^url\((.*?)\)$/,m=H.test(a),w=!m&&(this.symbols[a]?a:"circle"),N=w&&this.symbols[w],t=A(g)&&N&&N.call(this.symbols,Math.round(g),Math.round(b),d,e,z);if(N){var y=this.path(t);h.styledMode||y.attr("fill","none");G(y,{symbolName:w,x:g,y:b,width:d,height:e});z&&G(y,z)}else if(m){var l=a.match(H)[1];y=this.image(l);y.imgwidth=c(T[l]&&T[l].width,z&&z.width);y.imgheight=c(T[l]&&T[l].height,z&&z.height);var E=function(){y.attr({width:y.width,height:y.height})};["width","height"].forEach(function(a){y[a+ "Setter"]=function(a,g){var b={},c=this["img"+g],d="width"===g?"translateX":"translateY";this[g]=a;A(c)&&(z&&"within"===z.backgroundSize&&this.width&&this.height&&(c=Math.round(c*Math.min(this.width/this.imgwidth,this.height/this.imgheight))),this.element&&this.element.setAttribute(g,c),this.alignByTranslate||(b[d]=((this[g]||0)-c)/2,this.attr(b)))}});A(g)&&y.attr({x:g,y:b});y.isImg=!0;A(y.imgwidth)&&A(y.imgheight)?E():(y.attr({width:0,height:0}),x("img",{onload:function(){var a=p[h.chartIndex];0=== this.width&&(M(this,{position:"absolute",top:"-999em"}),I.body.appendChild(this));T[l]={width:this.width,height:this.height};y.imgwidth=this.width;y.imgheight=this.height;y.element&&E();this.parentNode&&this.parentNode.removeChild(this);h.imgCount--;if(!h.imgCount&&a&&!a.hasLoaded)a.onload()},src:l}),this.imgCount++)}return y},symbols:{circle:function(a,g,b,c){return this.arc(a+b/2,g+c/2,b/2,c/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},square:function(a,g,b,c){return["M",a,g,"L",a+b,g,a+b,g+c, a,g+c,"Z"]},triangle:function(a,g,b,c){return["M",a+b/2,g,"L",a+b,g+c,a,g+c,"Z"]},"triangle-down":function(a,g,b,c){return["M",a,g,"L",a+b,g,a+b/2,g+c,"Z"]},diamond:function(a,g,b,c){return["M",a+b/2,g,"L",a+b,g+c/2,a+b/2,g+c,a,g+c/2,"Z"]},arc:function(a,g,b,d,e){var z=e.start,h=e.r||b,p=e.r||d||b,H=e.end-.001;b=e.innerR;d=c(e.open,.001>Math.abs(e.end-e.start-2*Math.PI));var m=Math.cos(z),w=Math.sin(z),N=Math.cos(H);H=Math.sin(H);z=c(e.longArc,.001>e.end-z-Math.PI?0:1);h=["M",a+h*m,g+p*w,"A",h,p, 0,z,c(e.clockwise,1),a+h*N,g+p*H];A(b)&&h.push(d?"M":"L",a+b*N,g+b*H,"A",b,b,0,z,A(e.clockwise)?1-e.clockwise:0,a+b*m,g+b*w);h.push(d?"":"Z");return h},callout:function(a,g,b,c,d){var e=Math.min(d&&d.r||0,b,c),z=e+6,h=d&&d.anchorX;d=d&&d.anchorY;var p=["M",a+e,g,"L",a+b-e,g,"C",a+b,g,a+b,g,a+b,g+e,"L",a+b,g+c-e,"C",a+b,g+c,a+b,g+c,a+b-e,g+c,"L",a+e,g+c,"C",a,g+c,a,g+c,a,g+c-e,"L",a,g+e,"C",a,g,a,g,a+e,g];h&&h>b?d>g+z&&d<g+c-z?p.splice(13,3,"L",a+b,d-6,a+b+6,d,a+b,d+6,a+b,g+c-e):p.splice(13,3,"L", a+b,c/2,h,d,a+b,c/2,a+b,g+c-e):h&&0>h?d>g+z&&d<g+c-z?p.splice(33,3,"L",a,d+6,a-6,d,a,d-6,a,g+e):p.splice(33,3,"L",a,c/2,h,d,a,c/2,a,g+e):d&&d>c&&h>a+z&&h<a+b-z?p.splice(23,3,"L",h+6,g+c,h,g+c+6,h-6,g+c,a+e,g+c):d&&0>d&&h>a+z&&h<a+b-z&&p.splice(3,3,"L",h-6,g,h,g-6,h+6,g,b-e,g);return p}},clipRect:function(g,b,c,d){var e=a()+"-",z=this.createElement("clipPath").attr({id:e}).add(this.defs);g=this.rect(g,b,c,d,0).add(z);g.id=e;g.clipPath=z;g.count=0;return g},text:function(a,g,b,c){var d={};if(c&&(this.allowHTML|| !this.forExport))return this.html(a,g,b);d.x=Math.round(g||0);b&&(d.y=Math.round(b));A(a)&&(d.text=a);a=this.createElement("text").attr(d);c||(a.xSetter=function(a,g,b){var c=b.getElementsByTagName("tspan"),d=b.getAttribute(g),e;for(e=0;e<c.length;e++){var z=c[e];z.getAttribute(g)===d&&z.setAttribute(g,a)}b.setAttribute(g,a)});return a},fontMetrics:function(a,g){a=!this.styledMode&&/px/.test(a)||!W.getComputedStyle?a||g&&g.style&&g.style.fontSize||this.style&&this.style.fontSize:g&&R.prototype.getStyle.call(g, "font-size");a=/px/.test(a)?b(a):12;g=24>a?a+3:Math.round(1.2*a);return{h:g,b:Math.round(.8*g),f:a}},rotCorr:function(a,g,b){var c=a;g&&b&&(c=Math.max(c*Math.cos(g*y),4));return{x:-a/3*Math.sin(g*y),y:c}},label:function(a,g,b,c,d,e,z,p,H){var m=this,N=m.styledMode,t=m.g("button"!==H&&"label"),y=t.text=m.text("",0,0,z).attr({zIndex:1}),l,E,n=0,I=3,T=0,U,f,O,S,v,W={},P,C,J=/^url\((.*?)\)$/.test(c),k=N||J,ba=function(){return N?l.strokeWidth()%2/2:(P?parseInt(P,10):0)%2/2};H&&t.addClass("highcharts-"+ H);var q=function(){var a=y.element.style,g={};E=("undefined"===typeof U||"undefined"===typeof f||v)&&A(y.textStr)&&y.getBBox();t.width=(U||E.width||0)+2*I+T;t.height=(f||E.height||0)+2*I;C=I+Math.min(m.fontMetrics(a&&a.fontSize,y).b,E?E.height:Infinity);k&&(l||(t.box=l=m.symbols[c]||J?m.symbol(c):m.rect(),l.addClass(("button"===H?"":"highcharts-label-box")+(H?" highcharts-"+H+"-box":"")),l.add(t),a=ba(),g.x=a,g.y=(p?-C:0)+a),g.width=Math.round(t.width),g.height=Math.round(t.height),l.attr(G(g,W)), W={})};var x=function(){var a=T+I;var g=p?0:C;A(U)&&E&&("center"===v||"right"===v)&&(a+={center:.5,right:1}[v]*(U-E.width));if(a!==y.x||g!==y.y)y.attr("x",a),y.hasBoxWidthChanged&&(E=y.getBBox(!0),q()),"undefined"!==typeof g&&y.attr("y",g);y.x=a;y.y=g};var X=function(a,g){l?l.attr(a,g):W[a]=g};t.onAdd=function(){y.add(t);t.attr({text:a||0===a?a:"",x:g,y:b});l&&A(d)&&t.attr({anchorX:d,anchorY:e})};t.widthSetter=function(a){U=r(a)?a:null};t.heightSetter=function(a){f=a};t["text-alignSetter"]=function(a){v= a};t.paddingSetter=function(a){A(a)&&a!==I&&(I=t.padding=a,x())};t.paddingLeftSetter=function(a){A(a)&&a!==T&&(T=a,x())};t.alignSetter=function(a){a={left:0,center:.5,right:1}[a];a!==n&&(n=a,E&&t.attr({x:O}))};t.textSetter=function(a){"undefined"!==typeof a&&y.attr({text:a});q();x()};t["stroke-widthSetter"]=function(a,g){a&&(k=!0);P=this["stroke-width"]=a;X(g,a)};N?t.rSetter=function(a,g){X(g,a)}:t.strokeSetter=t.fillSetter=t.rSetter=function(a,g){"r"!==g&&("fill"===g&&a&&(k=!0),t[g]=a);X(g,a)};t.anchorXSetter= function(a,g){d=t.anchorX=a;X(g,Math.round(a)-ba()-O)};t.anchorYSetter=function(a,g){e=t.anchorY=a;X(g,a-S)};t.xSetter=function(a){t.x=a;n&&(a-=n*((U||E.width)+2*I),t["forceAnimate:x"]=!0);O=Math.round(a);t.attr("translateX",O)};t.ySetter=function(a){S=t.y=Math.round(a);t.attr("translateY",S)};var B=t.css;z={css:function(a){if(a){var g={};a=h(a);t.textProps.forEach(function(b){"undefined"!==typeof a[b]&&(g[b]=a[b],delete a[b])});y.css(g);"width"in g&&q();"fontSize"in g&&(q(),x())}return B.call(t, a)},getBBox:function(){return{width:E.width+2*I,height:E.height+2*I,x:E.x-I,y:E.y-I}},destroy:function(){w(t.element,"mouseenter");w(t.element,"mouseleave");y&&(y=y.destroy());l&&(l=l.destroy());R.prototype.destroy.call(t);t=m=q=x=X=null}};N||(z.shadow=function(a){a&&(q(),l&&l.shadow(a));return t});return G(t,z)}});f.Renderer=k});Q(u,"parts/Html.js",[u["parts/Globals.js"],u["parts/Utilities.js"]],function(f,k){var F=k.attr,q=k.createElement,K=k.css,D=k.defined,L=k.extend,B=k.pick,x=k.pInt,M=f.isFirefox, A=f.isMS,v=f.isWebKit,C=f.SVGElement;k=f.SVGRenderer;var G=f.win;L(C.prototype,{htmlCss:function(n){var l="SPAN"===this.element.tagName&&n&&"width"in n,r=B(l&&n.width,void 0);if(l){delete n.width;this.textWidth=r;var e=!0}n&&"ellipsis"===n.textOverflow&&(n.whiteSpace="nowrap",n.overflow="hidden");this.styles=L(this.styles,n);K(this.element,n);e&&this.htmlUpdateTransform();return this},htmlGetBBox:function(){var n=this.element;return{x:n.offsetLeft,y:n.offsetTop,width:n.offsetWidth,height:n.offsetHeight}}, htmlUpdateTransform:function(){if(this.added){var n=this.renderer,l=this.element,r=this.translateX||0,e=this.translateY||0,d=this.x||0,h=this.y||0,m=this.textAlign||"left",c={left:0,center:.5,right:1}[m],b=this.styles,w=b&&b.whiteSpace;K(l,{marginLeft:r,marginTop:e});!n.styledMode&&this.shadows&&this.shadows.forEach(function(a){K(a,{marginLeft:r+1,marginTop:e+1})});this.inverted&&[].forEach.call(l.childNodes,function(a){n.invertChild(a,l)});if("SPAN"===l.tagName){b=this.rotation;var E=this.textWidth&& x(this.textWidth),t=[b,m,l.innerHTML,this.textWidth,this.textAlign].join(),a;(a=E!==this.oldTextWidth)&&!(a=E>this.oldTextWidth)&&((a=this.textPxLength)||(K(l,{width:"",whiteSpace:w||"nowrap"}),a=l.offsetWidth),a=a>E);a&&(/[ \-]/.test(l.textContent||l.innerText)||"ellipsis"===l.style.textOverflow)?(K(l,{width:E+"px",display:"block",whiteSpace:w||"normal"}),this.oldTextWidth=E,this.hasBoxWidthChanged=!0):this.hasBoxWidthChanged=!1;t!==this.cTT&&(w=n.fontMetrics(l.style.fontSize,l).b,!D(b)||b===(this.oldRotation|| 0)&&m===this.oldAlign||this.setSpanRotation(b,c,w),this.getSpanCorrection(!D(b)&&this.textPxLength||l.offsetWidth,w,c,b,m));K(l,{left:d+(this.xCorr||0)+"px",top:h+(this.yCorr||0)+"px"});this.cTT=t;this.oldRotation=b;this.oldAlign=m}}else this.alignOnAdd=!0},setSpanRotatio