UNPKG

@highcharts/highcharts-react-native

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