UNPKG

highcharts

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