UNPKG

highcharts

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