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