highcharts
Version:
JavaScript charting framework
105 lines (103 loc) • 382 kB
JavaScript
/*
Highstock JS v9.0.1 (2021-02-15)
(c) 2009-2021 Torstein Honsi
License: www.highcharts.com/license
*/
(function(W,S){"object"===typeof module&&module.exports?(S["default"]=S,module.exports=W.document?S(W):S):"function"===typeof define&&define.amd?define("highcharts/highstock",function(){return S(W)}):(W.Highcharts&&W.Highcharts.error(16,!0),W.Highcharts=S(W))})("undefined"!==typeof window?window:this,function(W){function S(O,m,a,C){O.hasOwnProperty(m)||(O[m]=C.apply(null,a))}var a={};S(a,"Core/Globals.js",[],function(){var a="undefined"!==typeof W?W:"undefined"!==typeof window?window:{},m=a.document,
A=a.navigator&&a.navigator.userAgent||"",C=m&&m.createElementNS&&!!m.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,F=/(edge|msie|trident)/i.test(A)&&!a.opera,N=-1!==A.indexOf("Firefox"),E=-1!==A.indexOf("Chrome"),I=N&&4>parseInt(A.split("Firefox/")[1],10),B=function(){};return{product:"Highcharts",version:"9.0.1",deg2rad:2*Math.PI/360,doc:m,hasBidiBug:I,hasTouch:!!a.TouchEvent,isMS:F,isWebKit:-1!==A.indexOf("AppleWebKit"),isFirefox:N,isChrome:E,isSafari:!E&&-1!==A.indexOf("Safari"),
isTouchDevice:/(Mobile|Android|Windows Phone)/.test(A),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},supportsPassiveEvents:function(){var z=!1;if(!F){var r=Object.defineProperty({},"passive",{get:function(){z=!0}});a.addEventListener&&a.removeEventListener&&(a.addEventListener("testPassive",B,r),a.removeEventListener("testPassive",B,r))}return z}(),symbolSizes:{},svg:C,win:a,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:B,charts:[],dateFormats:{}}});S(a,"Core/Utilities.js",
[a["Core/Globals.js"]],function(a){function m(f,b,u,R){var t=b?"Highcharts error":"Highcharts warning";32===f&&(f=t+": Deprecated member");var P=r(f),g=P?t+" #"+f+": www.highcharts.com/errors/"+f+"/":f.toString();t=function(){if(b)throw Error(g);d.console&&-1===m.messages.indexOf(g)&&console.warn(g)};if("undefined"!==typeof R){var H="";P&&(g+="?");h(R,function(t,u){H+="\n - "+u+": "+t;P&&(g+=encodeURI(u)+"="+encodeURI(t))});g+=H}u?q(u,"displayError",{code:f,message:g,params:R},t):t();m.messages.push(g)}
function O(){var f,b=arguments,u={},R=function(t,u){"object"!==typeof t&&(t={});h(u,function(f,D){"__proto__"!==D&&"constructor"!==D&&(!I(f,!0)||z(f)||B(f)?t[D]=u[D]:t[D]=R(t[D]||{},f))});return t};!0===b[0]&&(u=b[1],b=Array.prototype.slice.call(b,2));var t=b.length;for(f=0;f<t;f++)u=R(u,b[f]);return u}function C(f,b){var u={};h(f,function(R,t){if(I(f[t],!0)&&!f.nodeType&&b[t])R=C(f[t],b[t]),Object.keys(R).length&&(u[t]=R);else if(I(f[t])||f[t]!==b[t])u[t]=f[t]});return u}function F(f,b){return parseInt(f,
b||10)}function N(f){return"string"===typeof f}function E(f){f=Object.prototype.toString.call(f);return"[object Array]"===f||"[object Array Iterator]"===f}function I(f,b){return!!f&&"object"===typeof f&&(!b||!E(f))}function B(f){return I(f)&&"number"===typeof f.nodeType}function z(f){var b=f&&f.constructor;return!(!I(f,!0)||B(f)||!b||!b.name||"Object"===b.name)}function r(f){return"number"===typeof f&&!isNaN(f)&&Infinity>f&&-Infinity<f}function v(f){return"undefined"!==typeof f&&null!==f}function c(f,
b,u){var R;N(b)?v(u)?f.setAttribute(b,u):f&&f.getAttribute&&((R=f.getAttribute(b))||"class"!==b||(R=f.getAttribute(b+"Name"))):h(b,function(t,u){f.setAttribute(u,t)});return R}function l(f,b){var u;f||(f={});for(u in b)f[u]=b[u];return f}function e(){for(var f=arguments,b=f.length,u=0;u<b;u++){var R=f[u];if("undefined"!==typeof R&&null!==R)return R}}function n(f,b){a.isMS&&!a.svg&&b&&"undefined"!==typeof b.opacity&&(b.filter="alpha(opacity="+100*b.opacity+")");l(f.style,b)}function y(f,d,u,R,t){f=
b.createElement(f);d&&l(f,d);t&&n(f,{padding:"0",border:"none",margin:"0"});u&&n(f,u);R&&R.appendChild(f);return f}function k(f,b){return parseFloat(f.toPrecision(b||14))}function Q(f,b,u,R){f=+f||0;b=+b;var t=a.defaultOptions.lang,P=(f.toString().split(".")[1]||"").split("e")[0].length,d=f.toString().split("e"),g=b;if(-1===b)b=Math.min(P,20);else if(!r(b))b=2;else if(b&&d[1]&&0>d[1]){var D=b+ +d[1];0<=D?(d[0]=(+d[0]).toExponential(D).split("e")[0],b=D):(d[0]=d[0].split(".")[0]||0,f=20>b?(d[0]*Math.pow(10,
d[1])).toFixed(b):0,d[1]=0)}var q=(Math.abs(d[1]?d[0]:f)+Math.pow(10,-Math.max(b,P)-1)).toFixed(b);P=String(F(q));D=3<P.length?P.length%3:0;u=e(u,t.decimalPoint);R=e(R,t.thousandsSep);f=(0>f?"-":"")+(D?P.substr(0,D)+R:"");f=0>+d[1]&&!g?"0":f+P.substr(D).replace(/(\d{3})(?=\d)/g,"$1"+R);b&&(f+=u+q.slice(-b));d[1]&&0!==+f&&(f+="e"+d[1]);return f}function w(f,b){if(!f)return b;var u=f.split(".").reverse();if(1===u.length)return b[f];for(f=u.pop();"undefined"!==typeof f&&"undefined"!==typeof b&&null!==
b;)b=b[f],f=u.pop();return b}function h(f,b,u){for(var d in f)Object.hasOwnProperty.call(f,d)&&b.call(u||f[d],f[d],d,f)}function G(f,b,u){function d(t,u){var b=f.removeEventListener||a.removeEventListenerPolyfill;b&&b.call(f,t,u,!1)}function t(t){var u;if(f.nodeName){if(b){var P={};P[b]=!0}else P=t;h(P,function(f,b){if(t[b])for(u=t[b].length;u--;)d(b,t[b][u].fn)})}}var P="function"===typeof f&&f.prototype||f;if(Object.hasOwnProperty.call(P,"hcEvents")){var g=P.hcEvents;b?(P=g[b]||[],u?(g[b]=P.filter(function(t){return u!==
t.fn}),d(b,u)):(t(g),g[b]=[])):(t(g),delete P.hcEvents)}}function q(f,d,u,R){u=u||{};if(b.createEvent&&(f.dispatchEvent||f.fireEvent)){var t=b.createEvent("Events");t.initEvent(d,!0,!0);l(t,u);f.dispatchEvent?f.dispatchEvent(t):f.fireEvent(d,t)}else if(f.hcEvents){u.target||l(u,{preventDefault:function(){u.defaultPrevented=!0},target:f,type:d});t=[];for(var P=f,g=!1;P.hcEvents;)Object.hasOwnProperty.call(P,"hcEvents")&&P.hcEvents[d]&&(t.length&&(g=!0),t.unshift.apply(t,P.hcEvents[d])),P=Object.getPrototypeOf(P);
g&&t.sort(function(t,u){return t.order-u.order});t.forEach(function(t){!1===t.fn.call(f,u)&&u.preventDefault()})}R&&!u.defaultPrevented&&R.call(f,u)}var x=a.charts,b=a.doc,d=a.win;"";(m||(m={})).messages=[];var L;Math.easeInOutSine=function(f){return-.5*(Math.cos(Math.PI*f)-1)};var M=Array.prototype.find?function(f,b){return f.find(b)}:function(f,b){var u,d=f.length;for(u=0;u<d;u++)if(b(f[u],u))return f[u]};h({map:"map",each:"forEach",grep:"filter",reduce:"reduce",some:"some"},function(f,b){a[b]=
function(u){var d;m(32,!1,void 0,(d={},d["Highcharts."+b]="use Array."+f,d));return Array.prototype[f].apply(u,[].slice.call(arguments,1))}});var K,g=function(){var f=Math.random().toString(36).substring(2,9)+"-",b=0;return function(){return"highcharts-"+(K?"":f)+b++}}(),J=a.getOptions=function(){return a.defaultOptions},p=a.setOptions=function(f){a.defaultOptions=O(!0,a.defaultOptions,f);(f.time||f.global)&&a.time.update(O(a.defaultOptions.global,a.defaultOptions.time,f.global,f.time));return a.defaultOptions};
d.jQuery&&(d.jQuery.fn.highcharts=function(){var f=[].slice.call(arguments);if(this[0])return f[0]?(new (a[N(f[0])?f.shift():"Chart"])(this[0],f[0],f[1]),this):x[c(this[0],"data-highcharts-chart")]});return{addEvent:function(f,b,u,d){void 0===d&&(d={});var t="function"===typeof f&&f.prototype||f;Object.hasOwnProperty.call(t,"hcEvents")||(t.hcEvents={});t=t.hcEvents;a.Point&&f instanceof a.Point&&f.series&&f.series.chart&&(f.series.chart.runTrackerClick=!0);var P=f.addEventListener||a.addEventListenerPolyfill;
P&&P.call(f,b,u,a.supportsPassiveEvents?{passive:void 0===d.passive?-1!==b.indexOf("touch"):d.passive,capture:!1}:!1);t[b]||(t[b]=[]);t[b].push({fn:u,order:"number"===typeof d.order?d.order:Infinity});t[b].sort(function(t,u){return t.order-u.order});return function(){G(f,b,u)}},arrayMax:function(b){for(var f=b.length,u=b[0];f--;)b[f]>u&&(u=b[f]);return u},arrayMin:function(b){for(var f=b.length,u=b[0];f--;)b[f]<u&&(u=b[f]);return u},attr:c,clamp:function(b,d,u){return b>d?b<u?b:u:d},cleanRecursively:C,
clearTimeout:function(b){v(b)&&clearTimeout(b)},correctFloat:k,createElement:y,css:n,defined:v,destroyObjectProperties:function(b,d){h(b,function(u,f){u&&u!==d&&u.destroy&&u.destroy();delete b[f]})},discardElement:function(b){L||(L=y("div"));b&&L.appendChild(b);L.innerHTML=""},erase:function(b,d){for(var u=b.length;u--;)if(b[u]===d){b.splice(u,1);break}},error:m,extend:l,extendClass:function(b,d){var u=function(){};u.prototype=new b;l(u.prototype,d);return u},find:M,fireEvent:q,format:function(b,
d,u){var f="{",t=!1,P=[],g=/f$/,q=/\.([0-9])/,D=a.defaultOptions.lang,p=u&&u.time||a.time;for(u=u&&u.numberFormatter||Q;b;){var e=b.indexOf(f);if(-1===e)break;var h=b.slice(0,e);if(t){h=h.split(":");f=w(h.shift()||"",d);if(h.length&&"number"===typeof f)if(h=h.join(":"),g.test(h)){var x=parseInt((h.match(q)||["","-1"])[1],10);null!==f&&(f=u(f,x,D.decimalPoint,-1<h.indexOf(",")?D.thousandsSep:""))}else f=p.dateFormat(h,f);P.push(f)}else P.push(h);b=b.slice(e+1);f=(t=!t)?"}":"{"}P.push(b);return P.join("")},
getMagnitude:function(b){return Math.pow(10,Math.floor(Math.log(b)/Math.LN10))},getNestedProperty:w,getOptions:J,getStyle:function(b,g,u){if("width"===g)return g=Math.min(b.offsetWidth,b.scrollWidth),u=b.getBoundingClientRect&&b.getBoundingClientRect().width,u<g&&u>=g-1&&(g=Math.floor(u)),Math.max(0,g-a.getStyle(b,"padding-left")-a.getStyle(b,"padding-right"));if("height"===g)return Math.max(0,Math.min(b.offsetHeight,b.scrollHeight)-a.getStyle(b,"padding-top")-a.getStyle(b,"padding-bottom"));d.getComputedStyle||
m(27,!0);if(b=d.getComputedStyle(b,void 0))b=b.getPropertyValue(g),e(u,"opacity"!==g)&&(b=F(b));return b},inArray:function(b,d,u){m(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"});return d.indexOf(b,u)},isArray:E,isClass:z,isDOMElement:B,isFunction:function(b){return"function"===typeof b},isNumber:r,isObject:I,isString:N,keys:function(b){m(32,!1,void 0,{"Highcharts.keys":"use Object.keys"});return Object.keys(b)},merge:O,normalizeTickInterval:function(b,d,u,g,t){var P=b;u=e(u,1);var f=b/
u;d||(d=t?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===g&&(1===u?d=d.filter(function(t){return 0===t%1}):.1>=u&&(d=[1/u])));for(g=0;g<d.length&&!(P=d[g],t&&P*u>=b||!t&&f<=(d[g]+(d[g+1]||d[g]))/2);g++);return P=k(P*u,-Math.round(Math.log(.001)/Math.LN10))},numberFormat:Q,objectEach:h,offset:function(f){var g=b.documentElement;f=f.parentElement||f.parentNode?f.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:f.top+(d.pageYOffset||g.scrollTop)-(g.clientTop||0),left:f.left+(d.pageXOffset||
g.scrollLeft)-(g.clientLeft||0),width:f.width,height:f.height}},pad:function(b,d,u){return Array((d||2)+1-String(b).replace("-","").length).join(u||"0")+b},pick:e,pInt:F,relativeLength:function(b,d,u){return/%$/.test(b)?d*parseFloat(b)/100+(u||0):parseFloat(b)},removeEvent:G,setOptions:p,splat:function(b){return E(b)?b:[b]},stableSort:function(b,d){var u=b.length,f,t;for(t=0;t<u;t++)b[t].safeI=t;b.sort(function(t,b){f=d(t,b);return 0===f?t.safeI-b.safeI:f});for(t=0;t<u;t++)delete b[t].safeI},syncTimeout:function(b,
d,u){if(0<d)return setTimeout(b,d,u);b.call(0,u);return-1},timeUnits:{millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5},uniqueKey:g,useSerialIds:function(b){return K=e(b,K)},wrap:function(b,d,u){var f=b[d];b[d]=function(){var b=Array.prototype.slice.call(arguments),d=arguments,g=this;g.proceed=function(){f.apply(g,arguments.length?arguments:d)};b.unshift(f);b=u.apply(this,b);g.proceed=null;return b}}}});S(a,"Core/Renderer/HTML/AST.js",[a["Core/Globals.js"],
a["Core/Utilities.js"]],function(a,m){var O=a.SVG_NS,C=m.attr,F=m.createElement,N=m.discardElement,E=m.error,I=m.isString,B=m.objectEach,z=m.splat;"";var r=!1;try{r=!!(new DOMParser).parseFromString("","text/html")}catch(v){}return function(){function v(c){this.nodes="string"===typeof c?this.parseMarkup(c):c}v.filterUserAttributes=function(c){B(c,function(l,e){var n=!0;-1===v.allowedAttributes.indexOf(e)&&(n=!1);-1!==["background","dynsrc","href","lowsrc","src"].indexOf(e)&&(n=I(l)&&v.allowedReferences.some(function(e){return 0===
l.indexOf(e)}));n||(E("Highcharts warning: Invalid attribute '"+e+"' in config"),delete c[e])});return c};v.setElementHTML=function(c,l){c.innerHTML="";l&&(new v(l)).addToDOM(c)};v.prototype.addToDOM=function(c){function l(e,c){var n;z(e).forEach(function(e){var k=e.tagName,y=e.textContent?a.doc.createTextNode(e.textContent):void 0;if(k)if("#text"===k)var h=y;else if(-1!==v.allowedTags.indexOf(k)){k=a.doc.createElementNS("svg"===k?O:c.namespaceURI||O,k);var G=e.attributes||{};B(e,function(q,e){"tagName"!==
e&&"attributes"!==e&&"children"!==e&&"textContent"!==e&&(G[e]=q)});C(k,v.filterUserAttributes(G));y&&k.appendChild(y);l(e.children||[],k);h=k}else E("Highcharts warning: Invalid tagName '"+k+"' in config");h&&c.appendChild(h);n=h});return n}return l(this.nodes,c)};v.prototype.parseMarkup=function(c){var l=[];if(r)c=(new DOMParser).parseFromString(c,"text/html");else{var e=F("div");e.innerHTML=c;c={body:e}}var n=function(e,c){var k=e.nodeName.toLowerCase(),y={tagName:k};if("#text"===k){k=e.textContent||
"";if(/^[\s]*$/.test(k))return;y.textContent=k}if(k=e.attributes){var h={};[].forEach.call(k,function(e){h[e.name]=e.value});y.attributes=h}if(e.childNodes.length){var G=[];[].forEach.call(e.childNodes,function(e){n(e,G)});G.length&&(y.children=G)}c.push(y)};[].forEach.call(c.body.childNodes,function(e){return n(e,l)});e&&N(e);return l};v.allowedTags="a b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr ul #text".split(" ");
v.allowedAttributes="aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style result rowspan summary target tabindex text-align textAnchor textLength type valign width x x1 xy y y1 y2 zIndex".split(" ");
v.allowedReferences="https:// http:// mailto: / ../ ./ #".split(" ");return v}()});S(a,"Core/Color/Color.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,m){var O=m.isNumber,C=m.merge,F=m.pInt;"";m=function(){function m(E){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[F(a[1]),F(a[2]),F(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[F(a[1]),
F(a[2]),F(a[3]),1]}}];this.rgba=[];if(a.Color!==m)return new a.Color(E);if(!(this instanceof m))return new m(E);this.init(E)}m.parse=function(a){return new m(a)};m.prototype.init=function(a){var I,B;if((this.input=a=m.names[a&&a.toLowerCase?a.toLowerCase():""]||a)&&a.stops)this.stops=a.stops.map(function(r){return new m(r[1])});else{if(a&&a.charAt&&"#"===a.charAt()){var z=a.length;a=parseInt(a.substr(1),16);7===z?I=[(a&16711680)>>16,(a&65280)>>8,a&255,1]:4===z&&(I=[(a&3840)>>4|(a&3840)>>8,(a&240)>>
4|a&240,(a&15)<<4|a&15,1])}if(!I)for(B=this.parsers.length;B--&&!I;){var r=this.parsers[B];(z=r.regex.exec(a))&&(I=r.parse(z))}}this.rgba=I||[]};m.prototype.get=function(a){var m=this.input,B=this.rgba;if("undefined"!==typeof this.stops){var z=C(m);z.stops=[].concat(z.stops);this.stops.forEach(function(r,v){z.stops[v]=[z.stops[v][0],r.get(a)]})}else z=B&&O(B[0])?"rgb"===a||!a&&1===B[3]?"rgb("+B[0]+","+B[1]+","+B[2]+")":"a"===a?B[3]:"rgba("+B.join(",")+")":m;return z};m.prototype.brighten=function(a){var m,
B=this.rgba;if(this.stops)this.stops.forEach(function(z){z.brighten(a)});else if(O(a)&&0!==a)for(m=0;3>m;m++)B[m]+=F(255*a),0>B[m]&&(B[m]=0),255<B[m]&&(B[m]=255);return this};m.prototype.setOpacity=function(a){this.rgba[3]=a;return this};m.prototype.tweenTo=function(a,m){var B=this.rgba,z=a.rgba;z.length&&B&&B.length?(a=1!==z[3]||1!==B[3],m=(a?"rgba(":"rgb(")+Math.round(z[0]+(B[0]-z[0])*(1-m))+","+Math.round(z[1]+(B[1]-z[1])*(1-m))+","+Math.round(z[2]+(B[2]-z[2])*(1-m))+(a?","+(z[3]+(B[3]-z[3])*(1-
m)):"")+")"):m=a.input||"none";return m};m.names={white:"#ffffff",black:"#000000"};return m}();a.Color=m;a.color=m.parse;return m});S(a,"Core/Color/Palette.js",[],function(){return{colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),backgroundColor:"#ffffff",neutralColor100:"#000000",neutralColor80:"#333333",neutralColor60:"#666666",neutralColor40:"#999999",neutralColor20:"#cccccc",neutralColor10:"#e6e6e6",neutralColor5:"#f2f2f2",neutralColor3:"#f7f7f7",
highlightColor100:"#003399",highlightColor80:"#335cad",highlightColor60:"#6685c2",highlightColor20:"#ccd6eb",highlightColor10:"#e6ebf5",indicatorPositiveLine:"#06b535",indicatorNegativeLine:"#f21313"}});S(a,"Core/Animation/Fx.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,m){var O=a.win,C=m.isNumber,F=m.objectEach;m=function(){function m(a,m,B){this.pos=NaN;this.options=m;this.elem=a;this.prop=B}m.prototype.dSetter=function(){var a=this.paths,m=a&&a[0];a=a&&a[1];var B=[],z=this.now||
0;if(1!==z&&m&&a)if(m.length===a.length&&1>z)for(var r=0;r<a.length;r++){for(var v=m[r],c=a[r],l=[],e=0;e<c.length;e++){var n=v[e],y=c[e];C(n)&&C(y)&&("A"!==c[0]||4!==e&&5!==e)?l[e]=n+z*(y-n):l[e]=y}B.push(l)}else B=a;else B=this.toD||[];this.elem.attr("d",B,void 0,!0)};m.prototype.update=function(){var a=this.elem,m=this.prop,B=this.now,z=this.options.step;if(this[m+"Setter"])this[m+"Setter"]();else a.attr?a.element&&a.attr(m,B,null,!0):a.style[m]=B+this.unit;z&&z.call(a,B,this)};m.prototype.run=
function(a,I,B){var z=this,r=z.options,v=function(e){return v.stopped?!1:z.step(e)},c=O.requestAnimationFrame||function(e){setTimeout(e,13)},l=function(){for(var e=0;e<m.timers.length;e++)m.timers[e]()||m.timers.splice(e--,1);m.timers.length&&c(l)};a!==I||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=a,this.end=I,this.unit=B,this.now=this.start,this.pos=0,v.elem=this.elem,v.prop=this.prop,v()&&1===m.timers.push(v)&&c(l)):(delete r.curAnim[this.prop],r.complete&&0===Object.keys(r.curAnim).length&&
r.complete.call(this.elem))};m.prototype.step=function(a){var m=+new Date,B=this.options,z=this.elem,r=B.complete,v=B.duration,c=B.curAnim;if(z.attr&&!z.element)a=!1;else if(a||m>=v+this.startTime){this.now=this.end;this.pos=1;this.update();var l=c[this.prop]=!0;F(c,function(e){!0!==e&&(l=!1)});l&&r&&r.call(z);a=!1}else this.pos=B.easing((m-this.startTime)/v),this.now=this.start+(this.end-this.start)*this.pos,this.update(),a=!0;return a};m.prototype.initPath=function(a,m,B){function z(e,c){for(;e.length<
k;){var h=e[0],n=c[k-e.length];n&&"M"===h[0]&&(e[0]="C"===n[0]?["C",h[1],h[2],h[1],h[2],h[1],h[2]]:["L",h[1],h[2]]);e.unshift(h);l&&e.push(e[e.length-1])}}function r(c,n){for(;c.length<k;)if(n=c[c.length/e-1].slice(),"C"===n[0]&&(n[1]=n[5],n[2]=n[6]),l){var h=c[c.length/e].slice();c.splice(c.length/2,0,n,h)}else c.push(n)}var v=a.startX,c=a.endX;m=m&&m.slice();B=B.slice();var l=a.isArea,e=l?2:1;if(!m)return[B,B];if(v&&c){for(a=0;a<v.length;a++)if(v[a]===c[0]){var n=a;break}else if(v[0]===c[c.length-
v.length+a]){n=a;var y=!0;break}else if(v[v.length-1]===c[c.length-v.length+a]){n=v.length-a;break}"undefined"===typeof n&&(m=[])}if(m.length&&C(n)){var k=B.length+n*e;y?(z(m,B),r(B,m)):(z(B,m),r(m,B))}return[m,B]};m.prototype.fillSetter=function(){m.prototype.strokeSetter.apply(this,arguments)};m.prototype.strokeSetter=function(){this.elem.attr(this.prop,a.color(this.start).tweenTo(a.color(this.end),this.pos),null,!0)};m.timers=[];return m}();a.Fx=m;a.timers=m.timers;return m});S(a,"Core/Animation/AnimationUtilities.js",
[a["Core/Animation/Fx.js"],a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,m,A){var O=A.defined,F=A.getStyle,N=A.isArray,E=A.isNumber,I=A.isObject,B=A.merge,z=A.objectEach,r=A.pick;A=m.setAnimation=function(e,c){c.renderer.globalAnimation=r(e,c.options.chart.animation,!0)};var v=m.animObject=function(e){return I(e)?B({duration:500,defer:0},e):{duration:e?500:0,defer:0}},c=m.getDeferredAnimation=function(e,c,y){var k=v(c),n=0,w=0;(y?[y]:e.series).forEach(function(e){e=v(e.options.animation);
n=c&&O(c.defer)?k.defer:Math.max(n,e.duration+e.defer);w=Math.min(k.duration,e.duration)});e.renderer.forExport&&(n=0);return{defer:Math.max(0,n-w),duration:Math.min(n,w)}},l=m.stop=function(e,c){for(var n=a.timers.length;n--;)a.timers[n].elem!==e||c&&c!==a.timers[n].prop||(a.timers[n].stopped=!0)};return{animate:function(e,c,y){var k,n="",w,h;if(!I(y)){var G=arguments;y={duration:G[2],easing:G[3],complete:G[4]}}E(y.duration)||(y.duration=400);y.easing="function"===typeof y.easing?y.easing:Math[y.easing]||
Math.easeInOutSine;y.curAnim=B(c);z(c,function(q,x){l(e,x);h=new a(e,y,x);w=null;"d"===x&&N(c.d)?(h.paths=h.initPath(e,e.pathArray,c.d),h.toD=c.d,k=0,w=1):e.attr?k=e.attr(x):(k=parseFloat(F(e,x))||0,"opacity"!==x&&(n="px"));w||(w=q);w&&w.match&&w.match("px")&&(w=w.replace(/px/g,""));h.run(k,w,n)})},animObject:v,getDeferredAnimation:c,setAnimation:A,stop:l}});S(a,"Core/Renderer/SVG/SVGElement.js",[a["Core/Animation/AnimationUtilities.js"],a["Core/Renderer/HTML/AST.js"],a["Core/Color/Color.js"],a["Core/Globals.js"],
a["Core/Color/Palette.js"],a["Core/Utilities.js"]],function(a,m,A,C,F,N){var E=a.animate,I=a.animObject,B=a.stop,z=C.deg2rad,r=C.doc,v=C.hasTouch,c=C.noop,l=C.svg,e=C.SVG_NS,n=C.win,y=N.attr,k=N.createElement,Q=N.css,w=N.defined,h=N.erase,G=N.extend,q=N.fireEvent,x=N.isArray,b=N.isFunction,d=N.isNumber,L=N.isString,M=N.merge,K=N.objectEach,g=N.pick,J=N.pInt,p=N.syncTimeout,f=N.uniqueKey;"";a=function(){function H(){this.height=this.element=void 0;this.opacity=1;this.renderer=void 0;this.SVG_NS=e;
this.symbolCustomAttribs="x y width height r start end innerR anchorX anchorY rounded".split(" ");this.width=void 0}H.prototype._defaultGetter=function(b){b=g(this[b+"Value"],this[b],this.element?this.element.getAttribute(b):null,0);/^[\-0-9\.]+$/.test(b)&&(b=parseFloat(b));return b};H.prototype._defaultSetter=function(b,d,t){t.setAttribute(d,b)};H.prototype.add=function(b){var u=this.renderer,t=this.element;b&&(this.parentGroup=b);this.parentInverted=b&&b.inverted;"undefined"!==typeof this.textStr&&
"text"===this.element.nodeName&&u.buildText(this);this.added=!0;if(!b||b.handleZ||this.zIndex)var d=this.zIndexSetter();d||(b?b.element:u.box).appendChild(t);if(this.onAdd)this.onAdd();return this};H.prototype.addClass=function(b,d){var t=d?"":this.attr("class")||"";b=(b||"").split(/ /g).reduce(function(b,u){-1===t.indexOf(u)&&b.push(u);return b},t?[t]:[]).join(" ");b!==t&&this.attr("class",b);return this};H.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform=
!1)};H.prototype.align=function(b,d,t){var u,f={};var e=this.renderer;var D=e.alignedObjects;var R,p;if(b){if(this.alignOptions=b,this.alignByTranslate=d,!t||L(t))this.alignTo=u=t||"renderer",h(D,this),D.push(this),t=void 0}else b=this.alignOptions,d=this.alignByTranslate,u=this.alignTo;t=g(t,e[u],e);u=b.align;e=b.verticalAlign;D=(t.x||0)+(b.x||0);var q=(t.y||0)+(b.y||0);"right"===u?R=1:"center"===u&&(R=2);R&&(D+=(t.width-(b.width||0))/R);f[d?"translateX":"x"]=Math.round(D);"bottom"===e?p=1:"middle"===
e&&(p=2);p&&(q+=(t.height-(b.height||0))/p);f[d?"translateY":"y"]=Math.round(q);this[this.placed?"animate":"attr"](f);this.placed=!0;this.alignAttr=f;return this};H.prototype.alignSetter=function(b){var u={left:"start",center:"middle",right:"end"};u[b]&&(this.alignValue=b,this.element.setAttribute("text-anchor",u[b]))};H.prototype.animate=function(b,d,t){var u=this,f=I(g(d,this.renderer.globalAnimation,!0));d=f.defer;g(r.hidden,r.msHidden,r.webkitHidden,!1)&&(f.duration=0);0!==f.duration?(t&&(f.complete=
t),p(function(){u.element&&E(u,b,f)},d)):(this.attr(b,void 0,t),K(b,function(b,t){f.step&&f.step.call(this,b,{prop:t,pos:1,elem:this})},this));return this};H.prototype.applyTextOutline=function(b){var u=this.element;-1!==b.indexOf("contrast")&&(b=b.replace(/contrast/g,this.renderer.getContrast(u.style.fill)));var t=b.split(" ");b=t[t.length-1];if((t=t[0])&&"none"!==t&&C.svg){this.fakeTS=!0;this.ySetter=this.xSetter;t=t.replace(/(^[\d\.]+)(.*?)$/g,function(b,t,u){return 2*Number(t)+u});this.removeTextOutline();
var d=r.createElementNS(e,"tspan");y(d,{"class":"highcharts-text-outline",fill:b,stroke:b,"stroke-width":t,"stroke-linejoin":"round"});[].forEach.call(u.childNodes,function(b){var t=b.cloneNode(!0);t.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(function(b){return t.removeAttribute(b)});d.appendChild(t)});b=r.createElementNS(e,"tspan");b.textContent="\u200b";y(b,{x:u.getAttribute("x"),y:u.getAttribute("y")});d.appendChild(b);u.insertBefore(d,u.firstChild)}};H.prototype.attr=function(b,
d,t,f){var u=this.element,P,D=this,g,e,R=this.symbolCustomAttribs;if("string"===typeof b&&"undefined"!==typeof d){var p=b;b={};b[p]=d}"string"===typeof b?D=(this[b+"Getter"]||this._defaultGetter).call(this,b,u):(K(b,function(t,d){g=!1;f||B(this,d);this.symbolName&&-1!==R.indexOf(d)&&(P||(this.symbolAttr(b),P=!0),g=!0);!this.rotation||"x"!==d&&"y"!==d||(this.doTransform=!0);g||(e=this[d+"Setter"]||this._defaultSetter,e.call(this,t,d,u),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(d)&&
this.updateShadows(d,t,e))},this),this.afterSetters());t&&t.call(this);return D};H.prototype.clip=function(b){return this.attr("clip-path",b?"url("+this.renderer.url+"#"+b.id+")":"none")};H.prototype.crisp=function(b,d){d=d||b.strokeWidth||0;var t=Math.round(d)%2/2;b.x=Math.floor(b.x||this.x||0)+t;b.y=Math.floor(b.y||this.y||0)+t;b.width=Math.floor((b.width||this.width||0)-2*t);b.height=Math.floor((b.height||this.height||0)-2*t);w(b.strokeWidth)&&(b.strokeWidth=d);return b};H.prototype.complexColor=
function(b,d,t){var u=this.renderer,g,e,D,p,R,h,c,J,k,n,L=[],G;q(this.renderer,"complexColor",{args:arguments},function(){b.radialGradient?e="radialGradient":b.linearGradient&&(e="linearGradient");if(e){D=b[e];R=u.gradients;h=b.stops;k=t.radialReference;x(D)&&(b[e]=D={x1:D[0],y1:D[1],x2:D[2],y2:D[3],gradientUnits:"userSpaceOnUse"});"radialGradient"===e&&k&&!w(D.gradientUnits)&&(p=D,D=M(D,u.getRadialAttr(k,p),{gradientUnits:"userSpaceOnUse"}));K(D,function(b,t){"id"!==t&&L.push(t,b)});K(h,function(b){L.push(b)});
L=L.join(",");if(R[L])n=R[L].attr("id");else{D.id=n=f();var P=R[L]=u.createElement(e).attr(D).add(u.defs);P.radAttr=p;P.stops=[];h.forEach(function(b){0===b[1].indexOf("rgba")?(g=A.parse(b[1]),c=g.get("rgb"),J=g.get("a")):(c=b[1],J=1);b=u.createElement("stop").attr({offset:b[0],"stop-color":c,"stop-opacity":J}).add(P);P.stops.push(b)})}G="url("+u.url+"#"+n+")";t.setAttribute(d,G);t.gradient=L;b.toString=function(){return G}}})};H.prototype.css=function(b){var d=this.styles,t={},u=this.element,f="",
g=!d,D=["textOutline","textOverflow","width"];b&&b.color&&(b.fill=b.color);d&&K(b,function(b,u){d&&d[u]!==b&&(t[u]=b,g=!0)});if(g){d&&(b=G(d,t));if(b)if(null===b.width||"auto"===b.width)delete this.textWidth;else if("text"===u.nodeName.toLowerCase()&&b.width)var e=this.textWidth=J(b.width);this.styles=b;e&&!l&&this.renderer.forExport&&delete b.width;if(u.namespaceURI===this.SVG_NS){var p=function(b,t){return"-"+t.toLowerCase()};K(b,function(b,t){-1===D.indexOf(t)&&(f+=t.replace(/([A-Z])/g,p)+":"+
b+";")});f&&y(u,"style",f)}else Q(u,b);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),b&&b.textOutline&&this.applyTextOutline(b.textOutline))}return this};H.prototype.dashstyleSetter=function(b){var d=this["stroke-width"];"inherit"===d&&(d=1);if(b=b&&b.toLowerCase()){var t=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(b=t.length;b--;)t[b]=""+J(t[b])*g(d,NaN);b=t.join(",").replace(/NaN/g,"none");this.element.setAttribute("stroke-dasharray",b)}};H.prototype.destroy=function(){var b=this,d=b.element||{},t=b.renderer,f=t.isSVG&&"SPAN"===d.nodeName&&b.parentGroup||void 0,g=d.ownerSVGElement;d.onclick=d.onmouseout=d.onmouseover=d.onmousemove=d.point=null;B(b);if(b.clipPath&&g){var e=b.clipPath;[].forEach.call(g.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(g=0;g<b.stops.length;g++)b.stops[g].destroy();b.stops.length=0;b.stops=void 0}b.safeRemoveChild(d);for(t.styledMode||b.destroyShadows();f&&f.div&&0===f.div.childNodes.length;)d=f.parentGroup,b.safeRemoveChild(f.div),delete f.div,f=d;b.alignTo&&h(t.alignedObjects,b);K(b,function(t,d){b[d]&&b[d].parentGroup===b&&b[d].destroy&&b[d].destroy();delete b[d]})};H.prototype.destroyShadows=function(){(this.shadows||[]).forEach(function(b){this.safeRemoveChild(b)},
this);this.shadows=void 0};H.prototype.destroyTextPath=function(b,d){var t=b.getElementsByTagName("text")[0];if(t){if(t.removeAttribute("dx"),t.removeAttribute("dy"),d.element.setAttribute("id",""),this.textPathWrapper&&t.getElementsByTagName("textPath").length){for(b=this.textPathWrapper.element.childNodes;b.length;)t.appendChild(b[0]);t.removeChild(this.textPathWrapper.element)}}else if(b.getAttribute("dx")||b.getAttribute("dy"))b.removeAttribute("dx"),b.removeAttribute("dy");this.textPathWrapper&&
(this.textPathWrapper=this.textPathWrapper.destroy())};H.prototype.dSetter=function(b,d,t){x(b)&&("string"===typeof b[0]&&(b=this.renderer.pathToSegments(b)),this.pathArray=b,b=b.reduce(function(b,t,d){return t&&t.join?(d?b+" ":"")+t.join(" "):(t||"").toString()},""));/(NaN| {2}|^$)/.test(b)&&(b="M 0 0");this[d]!==b&&(t.setAttribute(d,b),this[d]=b)};H.prototype.fadeOut=function(b){var d=this;d.animate({opacity:0},{duration:g(b,150),complete:function(){d.attr({y:-9999}).hide()}})};H.prototype.fillSetter=
function(b,d,t){"string"===typeof b?t.setAttribute(d,b):b&&this.complexColor(b,d,t)};H.prototype.getBBox=function(d,f){var t,P=this.renderer,u=this.element,e=this.styles,D=this.textStr,p=P.cache,q=P.cacheKeys,h=u.namespaceURI===this.SVG_NS;f=g(f,this.rotation,0);var R=P.styledMode?u&&H.prototype.getStyle.call(u,"font-size"):e&&e.fontSize;if(w(D)){var c=D.toString();-1===c.indexOf("<")&&(c=c.replace(/[0-9]/g,"0"));c+=["",f,R,this.textWidth,e&&e.textOverflow,e&&e.fontWeight].join()}c&&!d&&(t=p[c]);
if(!t){if(h||P.forExport){try{var x=this.fakeTS&&function(b){var t=u.querySelector(".highcharts-text-outline");t&&Q(t,{display:b})};b(x)&&x("none");t=u.getBBox?G({},u.getBBox()):{width:u.offsetWidth,height:u.offsetHeight};b(x)&&x("")}catch(ca){""}if(!t||0>t.width)t={width:0,height:0}}else t=this.htmlGetBBox();P.isSVG&&(d=t.width,P=t.height,h&&(t.height=P={"11px,17":14,"13px,20":16}[e&&e.fontSize+","+Math.round(P)]||P),f&&(e=f*z,t.width=Math.abs(P*Math.sin(e))+Math.abs(d*Math.cos(e)),t.height=Math.abs(P*
Math.cos(e))+Math.abs(d*Math.sin(e))));if(c&&0<t.height){for(;250<q.length;)delete p[q.shift()];p[c]||q.push(c);p[c]=t}}return t};H.prototype.getStyle=function(b){return n.getComputedStyle(this.element||this,"").getPropertyValue(b)};H.prototype.hasClass=function(b){return-1!==(""+this.attr("class")).split(" ").indexOf(b)};H.prototype.hide=function(b){b?this.attr({y:-9999}):this.attr({visibility:"hidden"});return this};H.prototype.htmlGetBBox=function(){return{height:0,width:0,x:0,y:0}};H.prototype.init=
function(b,d){this.element="span"===d?k(d):r.createElementNS(this.SVG_NS,d);this.renderer=b;q(this,"afterInit")};H.prototype.invert=function(b){this.inverted=b;this.updateTransform();return this};H.prototype.on=function(b,d){var t,f,g=this.element,u;v&&"click"===b?(g.ontouchstart=function(b){t=b.touches[0].clientX;f=b.touches[0].clientY},g.ontouchend=function(b){t&&4<=Math.sqrt(Math.pow(t-b.changedTouches[0].clientX,2)+Math.pow(f-b.changedTouches[0].clientY,2))||d.call(g,b);u=!0;!1!==b.cancelable&&
b.preventDefault()},g.onclick=function(b){u||d.call(g,b)}):g["on"+b]=d;return this};H.prototype.opacitySetter=function(b,d,t){this.opacity=b=Number(Number(b).toFixed(3));t.setAttribute(d,b)};H.prototype.removeClass=function(b){return this.attr("class",(""+this.attr("class")).replace(L(b)?new RegExp("(^| )"+b+"( |$)"):b," ").replace(/ +/g," ").trim())};H.prototype.removeTextOutline=function(){var b=this.element.querySelector("tspan.highcharts-text-outline");b&&this.safeRemoveChild(b)};H.prototype.safeRemoveChild=
function(b){var d=b.parentNode;d&&d.removeChild(b)};H.prototype.setRadialReference=function(b){var d=this.element.gradient&&this.renderer.gradients[this.element.gradient];this.element.radialReference=b;d&&d.radAttr&&d.animate(this.renderer.getRadialAttr(b,d.radAttr));return this};H.prototype.setTextPath=function(b,g){var t=this.element,P=this.text?this.text.element:t,e={textAnchor:"text-anchor"},u=!1,D=this.textPathWrapper,p=!D;g=M(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},
g);var q=m.filterUserAttributes(g.attributes);if(b&&g&&g.enabled){D&&null===D.element.parentNode?(p=!0,D=D.destroy()):D&&this.removeTextOutline.call(D.parentGroup);this.options&&this.options.padding&&(q.dx=-this.options.padding);D||(this.textPathWrapper=D=this.renderer.createElement("textPath"),u=!0);var h=D.element;(g=b.element.getAttribute("id"))||b.element.setAttribute("id",g=f());if(p)for(P.setAttribute("y",0),d(q.dx)&&P.setAttribute("x",-q.dx),b=[].slice.call(P.childNodes),p=0;p<b.length;p++){var x=
b[p];x.nodeType!==Node.TEXT_NODE&&"tspan"!==x.nodeName||h.appendChild(x)}u&&D&&D.add({element:P});h.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+g);w(q.dy)&&(h.parentNode.setAttribute("dy",q.dy),delete q.dy);w(q.dx)&&(h.parentNode.setAttribute("dx",q.dx),delete q.dx);K(q,function(b,t){h.setAttribute(e[t]||t,b)});t.removeAttribute("transform");this.removeTextOutline.call(D);this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0});this.applyTextOutline=
this.updateTransform=c}else D&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(t,b),this.updateTransform(),this.options&&this.options.rotation&&this.applyTextOutline(this.options.style.textOutline));return this};H.prototype.shadow=function(b,d,t){var f=[],g=this.element,e=!1,D=this.oldShadowOptions;var u={color:F.neutralColor100,offsetX:1,offsetY:1,opacity:.15,width:3};var p;!0===b?p=u:"object"===typeof b&&(p=G(u,b));p&&(p&&D&&K(p,function(b,t){b!==D[t]&&(e=!0)}),e&&
this.destroyShadows(),this.oldShadowOptions=p);if(!p)this.destroyShadows();else if(!this.shadows){var q=p.opacity/p.width;var h=this.parentInverted?"translate(-1,-1)":"translate("+p.offsetX+", "+p.offsetY+")";for(u=1;u<=p.width;u++){var c=g.cloneNode(!1);var x=2*p.width+1-2*u;y(c,{stroke:b.color||F.neutralColor100,"stroke-opacity":q*u,"stroke-width":x,transform:h,fill:"none"});c.setAttribute("class",(c.getAttribute("class")||"")+" highcharts-shadow");t&&(y(c,"height",Math.max(y(c,"height")-x,0)),
c.cutHeight=x);d?d.element.appendChild(c):g.parentNode&&g.parentNode.insertBefore(c,g);f.push(c)}this.shadows=f}return this};H.prototype.show=function(b){return this.attr({visibility:b?"inherit":"visible"})};H.prototype.strokeSetter=function(b,d,t){this[d]=b;this.stroke&&this["stroke-width"]?(H.prototype.fillSetter.call(this,this.stroke,"stroke",t),t.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===d&&0===b&&this.hasStroke?(t.removeAttribute("stroke"),this.hasStroke=
!1):this.renderer.styledMode&&this["stroke-width"]&&(t.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)};H.prototype.strokeWidth=function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var b=this.getStyle("stroke-width"),d=0;if(b.indexOf("px")===b.length-2)d=J(b);else if(""!==b){var t=r.createElementNS(e,"rect");y(t,{width:b,"stroke-width":0});this.element.parentNode.appendChild(t);d=t.getBBox().width;t.parentNode.removeChild(t)}return d};H.prototype.symbolAttr=
function(b){var d=this;"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(t){d[t]=g(b[t],d[t])});d.attr({d:d.renderer.symbols[d.symbolName](d.x,d.y,d.width,d.height,d)})};H.prototype.textSetter=function(b){b!==this.textStr&&(delete this.textPxLength,this.textStr=b,this.added&&this.renderer.buildText(this))};H.prototype.titleSetter=function(b){var d=this.element,t=d.getElementsByTagName("title")[0]||r.createElementNS(this.SVG_NS,"title");d.insertBefore?d.insertBefore(t,
d.firstChild):d.appendChild(t);t.textContent=String(g(b,"")).replace(/<[^>]*>/g,"").replace(/</g,"<").replace(/>/g,">")};H.prototype.toFront=function(){var b=this.element;b.parentNode.appendChild(b);return this};H.prototype.translate=function(b,d){return this.attr({translateX:b,translateY:d})};H.prototype.updateShadows=function(b,d,t){var f=this.shadows;if(f)for(var g=f.length;g--;)t.call(f[g],"height"===b?Math.max(d-(f[g].cutHeight||0),0):"d"===b?this.d:d,b,f[g])};H.prototype.updateTransform=
function(){var b=this.translateX||0,d=this.translateY||0,t=this.scaleX,f=this.scaleY,e=this.inverted,p=this.rotation,D=this.matrix,q=this.element;e&&(b+=this.width,d+=this.height);b=["translate("+b+","+d+")"];w(D)&&b.push("matrix("+D.join(",")+")");e?b.push("rotate(90) scale(-1,1)"):p&&b.push("rotate("+p+" "+g(this.rotationOriginX,q.getAttribute("x"),0)+" "+g(this.rotationOriginY,q.getAttribute("y")||0)+")");(w(t)||w(f))&&b.push("scale("+g(t,1)+" "+g(f,1)+")");b.length&&q.setAttribute("transform",
b.join(" "))};H.prototype.visibilitySetter=function(b,d,t){"inherit"===b?t.removeAttribute(d):this[d]!==b&&t.setAttribute(d,b);this[d]=b};H.prototype.xGetter=function(b){"circle"===this.element.nodeName&&("x"===b?b="cx":"y"===b&&(b="cy"));return this._defaultGetter(b)};H.prototype.zIndexSetter=function(b,d){var t=this.renderer,f=this.parentGroup,g=(f||t).element||t.box,e=this.element,D=!1;t=g===t.box;var p=this.added;var q;w(b)?(e.setAttribute("data-z-index",b),b=+b,this[d]===b&&(p=!1)):w(this[d])&&
e.removeAttribute("data-z-index");this[d]=b;if(p){(b=this.zIndex)&&f&&(f.handleZ=!0);d=g.childNodes;for(q=d.length-1;0<=q&&!D;q--){f=d[q];p=f.getAttribute("data-z-index");var h=!w(p);if(f!==e)if(0>b&&h&&!t&&!q)g.insertBefore(e,d[q]),D=!0;else if(J(p)<=b||h&&(!w(b)||0<=b))g.insertBefore(e,d[q+1]||null),D=!0}D||(g.insertBefore(e,d[t?3:0]||null),D=!0)}return D};return H}();a.prototype["stroke-widthSetter"]=a.prototype.strokeSetter;a.prototype.yGetter=a.prototype.xGetter;a.prototype.matrixSetter=a.prototype.rotationOriginXSetter=
a.prototype.rotationOriginYSetter=a.prototype.rotationSetter=a.prototype.scaleXSetter=a.prototype.scaleYSetter=a.prototype.translateXSetter=a.prototype.translateYSetter=a.prototype.verticalAlignSetter=function(b,d){this[d]=b;this.doTransform=!0};C.SVGElement=a;return C.SVGElement});S(a,"Core/Renderer/SVG/SVGLabel.js",[a["Core/Renderer/SVG/SVGElement.js"],a["Core/Utilities.js"]],function(a,m){function A(r,v){E(r)?r!==this[v]&&(this[v]=r,this.updateTextPadding()):this[v]=void 0}var C=this&&this.__extends||
function(){var r=function(v,c){r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,e){c.__proto__=e}||function(c,e){for(var n in e)e.hasOwnProperty(n)&&(c[n]=e[n])};return r(v,c)};return function(v,c){function l(){this.constructor=v}r(v,c);v.prototype=null===c?Object.create(c):(l.prototype=c.prototype,new l)}}(),F=m.defined,O=m.extend,E=m.isNumber,I=m.merge,B=m.pick,z=m.removeEvent;return function(r){function v(c,l,e,n,y,k,Q,w,h,G){var q=r.call(this)||this;q.paddingSetter=A;q.paddingLeftSetter=
A;q.paddingRightSetter=A;q.init(c,"g");q.textStr=l;q.x=e;q.y=n;q.anchorX=k;q.anchorY=Q;q.baseline=h;q.className=G;"button"!==G&&q.addClass("highcharts-label");G&&q.addClass("highcharts-"+G);q.text=c.text("",0,0,w).attr({zIndex:1});if("string"===typeof y){var x=/^url\((.*?)\)$/.test(y);if(q.renderer.symbols[y]||x)q.symbolKey=y}q.bBox=v.emptyBBox;q.padding=3;q.baselineOffset=0;q.needsBox=c.styledMode||x;q.deferredAttr={};q.alignFactor=0;return q}C(v,r);v.prototype.alignSetter=function(c){c={left:0,
center:.5,right:1}[c];c!==this.alignFactor&&(this.alignFactor=c,this.bBox&&E(this.xSetting)&&this.attr({x:this.xSetting}))};v.prototype.anchorXSetter=function(c,l){this.anchorX=c;this.boxAttr(l,Math.round(c)-this.getCrispAdjust()-this.xSetting)};v.prototype.anchorYSetter=function(c,l){this.anchorY=c;this.boxAttr(l,c-this.ySetting)};v.prototype.boxAttr=function(c,l){this.box?this.box.attr(c,l):this.deferredAttr[c]=l};v.prototype.css=function(c){if(c){var l={};c=I(c);v.textProps.forEach(function(e){"undefined"!==
typeof c[e]&&(l[e]=c[e],delete c[e])});this.text.css(l);var e="width"in l;"fontSize"in l||"fontWeight"in l?this.updateTextPadding():e&&this.updateBoxSize()}return a.prototype.css.call(this,c)};v.prototype.destroy=function(){z(this.element,"mouseenter");z(this.element,"mouseleave");this.text&&this.text.destroy();this.box&&(this.box=this.box.destroy());a.prototype.destroy.call(this)};v.prototype.fillSetter=function(c,l){c&&(this.needsBox=!0);this.fill=c;this.boxAttr(l,c)};v.prototype.getBBox=function(){var c=
this.bBox,l=this.padding,e=B(this.paddingLeft,l);return{width:this.width,height:this.height,x:c.x-e,y:c.y-l}};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(c){this.heightSetting=c};v.prototype.on=function(c,l){var e=this,n=e.text,y=n&&"SPAN"===n.element.tagName?n:void 0;if(y){var k=function(k){("mouseenter"===c||"mouseleave"===c)&&k.relatedTarget instanceof
Element&&(e.element.compareDocumentPosition(k.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY||y.element.compareDocumentPosition(k.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY)||l.call(e.element,k)};y.on(c,k)}a.prototype.on.call(e,c,k||l);return e};v.prototype.onAdd=function(){var c=this.textStr;this.text.add(this);this.attr({text:F(c)?c:"",x:this.x,y:this.y});this.box&&F(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})};v.prototype.rSetter=function(c,l){this.boxAttr(l,
c)};v.prototype.shadow=function(c){c&&!this.renderer.styledMode&&(this.updateBoxSize(),this.box&&this.box.shadow(c));return this};v.prototype.strokeSetter=function(c,l){this.stroke=c;this.boxAttr(l,c)};v.prototype["stroke-widthSetter"]=function(c,l){c&&(this.needsBox=!0);this["stroke-width"]=c;this.boxAttr(l,c)};v.prototype["text-alignSetter"]=function(c){this.textAlign=c};v.prototype.textSetter=function(c){"undefined"!==typeof c&&this.text.attr({text:c});this.updateTextPadding()};v.prototype.updateBoxSize=
function(){var c=this.text.element.style,l={},e=this.padding,n=this.bBox=E(this.widthSetting)&&E(this.heightSetting)&&!this.textAlign||!F(this.text.textStr)?v.emptyBBox:this.text.getBBox();this.width=this.getPaddedWidth();this.height=(this.heightSetting||n.height||0)+2*e;this.baselineOffset=e+Math.min(this.renderer.fontMetrics(c&&c.fontSize,this.text).b,n.height||Infinity);this.needsBox&&(this.box||(c=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect(),c.addClass(("button"===
this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),c.add(this)),c=this.getCrispAdjust(),l.x=c,l.y=(this.baseline?-this.baselineOffset:0)+c,l.width=Math.round(this.width),l.height=Math.round(this.height),this.box.attr(O(l,this.deferredAttr)),this.deferredAttr={})};v.prototype.updateTextPadding=function(){var c=this.text;this.updateBoxSize();var l=this.baseline?0:this.baselineOffset,e=B(this.paddingLeft,this.padding);F(this.widthSetting)&&this.bBox&&
("center"===this.textAlign||"right"===this.textAlign)&&(e+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width));if(e!==c.x||l!==c.y)c.attr("x",e),c.hasBoxWidthChanged&&(this.bBox=c.getBBox(!0)),"undefined"!==typeof l&&c.attr("y",l);c.x=e;c.y=l};v.prototype.widthSetter=function(c){this.widthSetting=E(c)?c:void 0};v.prototype.getPaddedWidth=function(){var c=this.padding,l=B(this.paddingLeft,c);c=B(this.paddingRight,c);return(this.widthSetting||this.bBox.width||0)+l+c};v.prototype.xSetter=
function(c){this.x=c;this.alignFactor&&(c-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0);this.xSetting=Math.round(c);this.attr("translateX",this.xSetting)};v.prototype.ySetter=function(c){this.ySetting=this.y=Math.round(c);this.attr("translateY",this.ySetting)};v.emptyBBox={width:0,height:0,x:0,y:0};v.textProps="color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" ");return v}(a)});S(a,"Core/Renderer/SVG/TextBuilder.js",
[a["Core/Globals.js"],a["Core/Utilities.js"],a["Core/Renderer/HTML/AST.js"]],function(a,m,A){var C=a.doc,F=a.SVG_NS,O=m.attr,E=m.isString,I=m.objectEach,B=m.pick;return function(){function a(r){var a=r.styles;this.renderer=r.renderer;this.svgElement=r;this.width=r.textWidth;this.textLineHeight=a&&a.lineHeight;this.textOutline=a&&a.textOutline;this.ellipsis=!(!a||"ellipsis"!==a.textOverflow);this.noWrap=!(!a||"nowrap"!==a.whiteSpace);this.fontSize=a&&a.fontSize}a.prototype.buildSVG=function(){var r=
this.svgElement,a=r.element,c=r.renderer,l=B(r.textStr,"").toString(),e=-1!==l.indexOf("<"),n=a.childNodes,y=n.length;c=this.width&&!r.added&&c.box;var k=/<br.*?>/g;var Q=[l,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,this.fontSize,this.width].join();if(Q!==r.textCache){r.textCache=Q;for(delete r.actualWidth;y--;)a.removeChild(n[y]);e||this.ellipsis||this.width||-1!==l.indexOf(" ")&&(!this.noWrap||k.test(l))?""!==l&&(c&&c.appendChild(a),l=new A(l),this.modifyTree(l.nodes),l.addToDOM(r.element),
this.modifyDOM(),this.ellipsis&&-1!==(a.textContent||"").indexOf("\u2026")&&r.attr("title",this.unescapeEntities(r.textStr||"",["<",">"])),c&&c.removeChild(a)):a.appendChild(C.createTextNode(this.unescapeEntities(l)));E(this.textOutline)&&r.applyTextOutline&&r.applyTextOutline(this.textOutline)}};a.prototype.modifyDOM=function(){var a=this,v=this.svgElement,c=O(v.element,"x");[].forEach.call(v.element.querySelectorAll("tspan.highcharts-br"),function(e){e.nextSibling&&e.previousSibling&&O(e,
{dy:a.getLineHeight(e.nextSibling),x:c})});var l=this.width||0;if(l){var e=function(e,k){var n=e.textContent||"",y=n.replace(/([^\^])-/g,"$1- ").split(" "),h=!a.noWrap&&(1<y.length||1<v.element.childNodes.length),G=a.getLineHeight(k),q=0,x=v.actualWidth;if(a.ellipsis)n&&a.truncate(e,n,void 0,0,Math.max(0,l-parseInt(a.fontSize||12,10)),function(b,d){return b.substring(0,d)+"\u2026"});else if(h){n=[];for(h=[];k.firstChild&&k.firstChild!==e;)h.push(k.firstChild),k.removeChild(k.firstChild);for(;y.length;)y.length&&
!a.noWrap&&0<q&&(n.push(e.textContent||""),e.textContent=y.join(" ").replace(/- /g,"-")),a.truncate(e,void 0,y,0===q?x||0:0,l,function(b,d){return y.slice(0,d).join(" ").replace(/- /g,"-")}),x=v.actualWidth,q++;h.forEach(function(b){k.insertBefore(b,e)});n.forEach(function(b){k.insertBefore(C.createTextNode(b),e);b=C.createElementNS(F,"tspan");b.textContent="\u200b";O(b,{dy:G,x:c});k.insertBefore(b,e)})}},n=function(c){[].slice.call(c.childNodes).forEach(function(k){k.nodeType===Node.TEXT_NODE?e(k,
c):(-1!==k.className.baseVal.indexOf("highcharts-br")&&(v.actualWidth=0),n(k))})};n(v.element)}};a.prototype.getLineHeight=function(a){var r;a=a.nodeType===Node.TEXT_NODE?a.parentElement:a;this.renderer.styledMode||(r=a&&/(px|em)$/.test(a.style.fontSize)?a.style.fontSize:this.fontSize||this.renderer.style.fontSize||12);return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(r,a||this.svgElement.element).h};a.prototype.modifyTree=function(a){var r=this,c=function(l,
e){var n=l.tagName,y=r.renderer.styledMode,k=l.attributes||{};if("b"===n||"strong"===n)y?k["class"]="highcharts-strong":k.style="font-weight:bold;"+(k.style||"");else if("i"===n||"em"===n)y?k["class"]="highcharts-emphasized":k.style="font-style:italic;"+(k.style||"");E(k.style)&&(k.style=k.style.replace(/(;| |^)color([ :])/,"$1fill$2"));"br"===n&&(k["class"]="highcharts-br",l.textContent="\u200b",(e=a[e+1])&&e.textContent&&(e.textContent=e.textContent.replace(/^ +/gm,"")));"#text"!==n&&"a"!==n&&(l.tagName=
"tspan");l.attributes=k;l.children&&l.children.filter(function(e){return"#text"!==e.tagName}).forEach(c)};for(a.forEach(c);a[0]&&"tspan"===a[0].tagName&&!a[0].children;)a.splice(0,1)};a.prototype.truncate=function(a,v,c,l,e,n){var y=this.svgElement,k=y.renderer,Q=y.rotation,w=[],h=c?1:0,G=(v||c||"").length,q=G,x,b=function(b,d){d=d||b;var e=a.parentNode;if(e&&"undefined"===typeof w[d])if(e.getSubStringLength)try{w[d]=l+e.getSubStringLength(0,c?d+1:d)}catch(g){""}else k.getSpanWidth&&(a.textContent=
n(v||c,b),w[d]=l+k.getSpanWidth(y,a));return w[d]};y.rotation=0;var d=b(a.textContent.length);if(l+d>e){for(;h<=G;)q=Math.ceil((h+G)/2),c&&(x=n(c,q)),d=b(q,x&&x.length-1),h===G?h=G+1:d>e?G=q-1:h=q;0===G?a.textContent="":v&&G===v.length-1||(a.textContent=x||n(v||c,q))}c&&c.splice(0,q);y.actualWidth=d;y.rotation=Q};a.prototype.unescapeEntities=function(a,v){I(this.renderer.escapes,function(c,l){v&&-1!==v.indexOf(c)||(a=a.toString().replace(new RegExp(c,"g"),l))});return a};return a}()});S(a,"Core/Renderer/SVG/SVGRenderer.js",
[a["Core/Color/Color.js"],a["Core/Globals.js"],a["Core/Color/Palette.js"],a["Core/Renderer/SVG/SVGElement.js"],a["Core/Renderer/SVG/SVGLabel.js"],a["Core/Renderer/HTML/AST.js"],a["Core/Renderer/SVG/TextBuilder.js"],a["Core/Utilities.js"]],function(a,m,A,C,F,N,E,I){var B=I.addEvent,z=I.attr,r=I.createElement,v=I.css,c=I.defined,l=I.destroyObjectProperties,e=I.extend,n=I.isArray,y=I.isNumber,k=I.isObject,Q=I.isString,w=I.merge,h=I.pick,G=I.pInt,q=I.uniqueKey,x=m.charts,b=m.deg2rad,d=m.doc,L=m.isFirefox,
M=m.isMS,K=m.isWebKi