/** * Highmaps JS v11.2.0 (2023-10-30) * * (c) 2011-2021 Torstein Honsi * * License: www.highcharts.com/license */!function(t,e){"object"==typeof module&&module.exports?(e.default=e,module.exports=t.document?e(t):e):"function"==typeof define&&define.amd?define("highcharts/highmaps",function(){return e(t)}):(t.Highcharts&&t.Highcharts.error(16,!0),t.Highcharts=e(t))}("undefined"!=typeof window?window:this,function(t){"use strict";var e={};function i(e,i,o,r){e.hasOwnProperty(i)||(e[i]=r.apply(null,o),"function"==typeof CustomEvent&&t.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}return i(e,"Core/Globals.js",[],function(){var e,i;return(i=e||(e={})).SVG_NS="http://www.w3.org/2000/svg",i.product="Highcharts",i.version="11.2.0",i.win=void 0!==t?t:{},i.doc=i.win.document,i.svg=i.doc&&i.doc.createElementNS&&!!i.doc.createElementNS(i.SVG_NS,"svg").createSVGRect,i.userAgent=i.win.navigator&&i.win.navigator.userAgent||"",i.isChrome=-1!==i.userAgent.indexOf("Chrome"),i.isFirefox=-1!==i.userAgent.indexOf("Firefox"),i.isMS=/(edge|msie|trident)/i.test(i.userAgent)&&!i.win.opera,i.isSafari=!i.isChrome&&-1!==i.userAgent.indexOf("Safari"),i.isTouchDevice=/(Mobile|Android|Windows Phone)/.test(i.userAgent),i.isWebKit=-1!==i.userAgent.indexOf("AppleWebKit"),i.deg2rad=2*Math.PI/360,i.hasBidiBug=i.isFirefox&&4>parseInt(i.userAgent.split("Firefox/")[1],10),i.hasTouch=!!i.win.TouchEvent,i.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],i.noop=function(){},i.supportsPassiveEvents=function(){var t=!1;if(!i.isMS){var e=Object.defineProperty({},"passive",{get:function(){t=!0}});i.win.addEventListener&&i.win.removeEventListener&&(i.win.addEventListener("testPassive",i.noop,e),i.win.removeEventListener("testPassive",i.noop,e))}return t}(),i.charts=[],i.dateFormats={},i.seriesTypes={},i.symbolSizes={},i.chartCount=0,e}),i(e,"Core/Utilities.js",[e["Core/Globals.js"]],function(t){var e,i,o,r=t.charts,s=t.doc,n=t.win;function a(e,i,o,r){var s=i?"Highcharts error":"Highcharts warning";32===e&&(e="".concat(s,": Deprecated member"));var h=f(e),l=h?"".concat(s," #").concat(e,": www.highcharts.com/errors/").concat(e,"/"):e.toString();if(void 0!==r){var c="";h&&(l+="?"),w(r,function(t,e){c+="\n - ".concat(e,": ").concat(t),h&&(l+=encodeURI(e)+"="+encodeURI(t))}),l+=c}T(t,"displayError",{chart:o,code:e,message:l,params:r},function(){if(i)throw Error(l);n.console&&-1===a.messages.indexOf(l)&&console.warn(l)}),a.messages.push(l)}function h(t,e){return parseInt(t,e||10)}function l(t){return"string"==typeof t}function c(t){var e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function p(t,e){return!!t&&"object"==typeof t&&(!e||!c(t))}function d(t){return p(t)&&"number"==typeof t.nodeType}function u(t){var e=t&&t.constructor;return!!(p(t,!0)&&!d(t)&&e&&e.name&&"Object"!==e.name)}function f(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function g(t){return null!=t}function m(t,e,i){var o,r=l(e)&&!g(i),s=function(e,i){g(e)?t.setAttribute(i,e):r?(o=t.getAttribute(i))||"class"!==i||(o=t.getAttribute(i+"Name")):t.removeAttribute(i)};return l(e)?s(i,e):w(e,s),o}function v(t){return c(t)?t:[t]}function y(t,e){var i;for(i in t||(t={}),e)t[i]=e[i];return t}function x(){for(var t=arguments,e=t.length,i=0;i1e14?t:parseFloat(t.toPrecision(e||14))}(a||(a={})).messages=[],Math.easeInOutSine=function(t){return -.5*(Math.cos(Math.PI*t)-1)};var S=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){var i,o=t.length;for(i=0;ii&&(i=t[e]);return i},arrayMin:function(t){for(var e=t.length,i=t[0];e--;)t[e]e?t-1&&r[h]){i=v(i),s[h]=[];for(var l=0;l1)for(r=t.length-1;r>0;r--)(o=t[r]-t[r-1])<0&&!s?(null==e||e(),e=void 0):o&&(void 0===i||o=s-1&&(s=Math.floor(a)),Math.max(0,s-(t(e,"padding-left",!0)||0)-(t(e,"padding-right",!0)||0))}if("height"===i)return Math.max(0,Math.min(e.offsetHeight,e.scrollHeight)-(t(e,"padding-top",!0)||0)-(t(e,"padding-bottom",!0)||0));var l=n.getComputedStyle(e,void 0);return l&&(r=l.getPropertyValue(i),x(o,"opacity"!==i)&&(r=h(r))),r},inArray:function(t,e,i){return a(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"}),e.indexOf(t,i)},insertItem:function(t,e){var i,o=t.options.index,r=e.length;for(i=t.options.isInternal?r:0;i=t))&&(r||!(a<=(e[s]+(e[s+1]||e[s]))/2)));s++);return C(n*i,-Math.round(Math.log(.001)/Math.LN10))},objectEach:w,offset:function(t){var e=s.documentElement,i=t.parentElement||t.parentNode?t.getBoundingClientRect():{top:0,left:0,width:0,height:0};return{top:i.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0),width:i.width,height:i.height}},pad:function(t,e,i){return Array((e||2)+1-String(t).replace("-","").length).join(i||"0")+t},pick:x,pInt:h,pushUnique:function(t,e){return 0>t.indexOf(e)&&!!t.push(e)},relativeLength:function(t,e,i){return/%$/.test(t)?e*parseFloat(t)/100+(i||0):parseFloat(t)},removeEvent:k,splat:v,stableSort:function(t,e){var i,o,r=t.length;for(o=0;o0?setTimeout(t,e,i):(t.call(0,i),-1)},timeUnits:{millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},uniqueKey:A,useSerialIds:function(t){return o=x(t,o)},wrap:function(t,e,i){var o=t[e];t[e]=function(){var t=arguments,e=this;return i.apply(this,[function(){return o.apply(e,arguments.length?arguments:t)}].concat([].slice.call(arguments)))}}}}),i(e,"Core/Chart/ChartDefaults.js",[],function(){return{alignThresholds:!1,panning:{enabled:!1,type:"x"},styledMode:!1,borderRadius:0,colorCount:10,allowMutatingData:!0,ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{},position:{}},reflow:!0,type:"line",zooming:{singleTouch:!1,resetButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}}},width:null,height:null,borderColor:"#334eff",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"}}),i(e,"Core/Color/Palettes.js",[],function(){return{colors:["#2caffe","#544fc5","#00e272","#fe6a35","#6b8abc","#d568fb","#2ee0ca","#fa4b42","#feb56a","#91e8e1"]}}),i(e,"Core/Time.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){var i=t.win,o=e.defined,r=e.error,s=e.extend,n=e.isObject,a=e.merge,h=e.objectEach,l=e.pad,c=e.pick,p=e.splat,d=e.timeUnits,u=t.isSafari&&i.Intl&&i.Intl.DateTimeFormat.prototype.formatRange,f=t.isSafari&&i.Intl&&!i.Intl.DateTimeFormat.prototype.formatRange;return function(){function e(t){this.options={},this.useUTC=!1,this.variableTimezone=!1,this.Date=i.Date,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.update(t)}return e.prototype.get=function(t,e){if(this.variableTimezone||this.timezoneOffset){var i=e.getTime(),o=i-this.getTimezoneOffset(e);e.setTime(o);var r=e["getUTC"+t]();return e.setTime(i),r}return this.useUTC?e["getUTC"+t]():e["get"+t]()},e.prototype.set=function(t,e,i){if(this.variableTimezone||this.timezoneOffset){if("Milliseconds"===t||"Seconds"===t||"Minutes"===t&&this.getTimezoneOffset(e)%36e5==0)return e["setUTC"+t](i);var o=this.getTimezoneOffset(e),r=e.getTime()-o;e.setTime(r),e["setUTC"+t](i);var s=this.getTimezoneOffset(e);return r=e.getTime()+s,e.setTime(r)}return this.useUTC||u&&"FullYear"===t?e["setUTC"+t](i):e["set"+t](i)},e.prototype.update=function(t){void 0===t&&(t={});var e=c(t.useUTC,!0);this.options=t=a(!0,this.options,t),this.Date=t.Date||i.Date||Date,this.useUTC=e,this.timezoneOffset=e&&t.timezoneOffset||void 0,this.getTimezoneOffset=this.timezoneOffsetFunction(),this.variableTimezone=e&&!!(t.getTimezoneOffset||t.timezone)},e.prototype.makeTime=function(t,e,i,o,r,s){var n,a,h;return this.useUTC?(n=this.Date.UTC.apply(0,arguments),a=this.getTimezoneOffset(n),n+=a,a!==(h=this.getTimezoneOffset(n))?n+=h-a:a-36e5!==this.getTimezoneOffset(n-36e5)||f||(n-=36e5)):n=new this.Date(t,e,c(i,1),c(o,0),c(r,0),c(s,0)).getTime(),n},e.prototype.timezoneOffsetFunction=function(){var t=this,e=this.options,o=e.getTimezoneOffset,s=e.moment||i.moment;if(!this.useUTC)return function(t){return 6e4*new Date(t.toString()).getTimezoneOffset()};if(e.timezone){if(s)return function(t){return-(6e4*s.tz(t,e.timezone).utcOffset())};r(25)}return this.useUTC&&o?function(t){return 6e4*o(t.valueOf())}:function(){return 6e4*(t.timezoneOffset||0)}},e.prototype.dateFormat=function(e,i,r){if(!o(i)||isNaN(i))return t.defaultOptions.lang&&t.defaultOptions.lang.invalidDate||"";e=c(e,"%Y-%m-%d %H:%M:%S");var n=this,a=new this.Date(i),p=this.get("Hours",a),d=this.get("Day",a),u=this.get("Date",a),f=this.get("Month",a),g=this.get("FullYear",a),m=t.defaultOptions.lang,v=m&&m.weekdays,y=m&&m.shortWeekdays;return h(s({a:y?y[d]:v[d].substr(0,3),A:v[d],d:l(u),e:l(u,2," "),w:d,b:m.shortMonths[f],B:m.months[f],m:l(f+1),o:f+1,y:g.toString().substr(2,2),Y:g,H:l(p),k:p,I:l(p%12||12),l:p%12||12,M:l(this.get("Minutes",a)),p:p<12?"AM":"PM",P:p<12?"am":"pm",S:l(this.get("Seconds",a)),L:l(Math.floor(i%1e3),3)},t.dateFormats),function(t,o){for(;-1!==e.indexOf("%"+o);)e=e.replace("%"+o,"function"==typeof t?t.call(n,i):t)}),r?e.substr(0,1).toUpperCase()+e.substr(1):e},e.prototype.resolveDTLFormat=function(t){return n(t,!0)?t:{main:(t=p(t))[0],from:t[1],to:t[2]}},e.prototype.getTimeTicks=function(t,e,i,r){var n,a,h,l,p=this,u=p.Date,f=[],g={},m=new u(e),v=t.unitRange,y=t.count||1;if(r=c(r,1),o(e)){p.set("Milliseconds",m,v>=d.second?0:y*Math.floor(p.get("Milliseconds",m)/y)),v>=d.second&&p.set("Seconds",m,v>=d.minute?0:y*Math.floor(p.get("Seconds",m)/y)),v>=d.minute&&p.set("Minutes",m,v>=d.hour?0:y*Math.floor(p.get("Minutes",m)/y)),v>=d.hour&&p.set("Hours",m,v>=d.day?0:y*Math.floor(p.get("Hours",m)/y)),v>=d.day&&p.set("Date",m,v>=d.month?1:Math.max(1,y*Math.floor(p.get("Date",m)/y))),v>=d.month&&(p.set("Month",m,v>=d.year?0:y*Math.floor(p.get("Month",m)/y)),a=p.get("FullYear",m)),v>=d.year&&(a-=a%y,p.set("FullYear",m,a)),v===d.week&&(l=p.get("Day",m),p.set("Date",m,p.get("Date",m)-l+r+(l4*d.month||p.getTimezoneOffset(e)!==p.getTimezoneOffset(i));var C=m.getTime();for(n=1;C1?C=p.makeTime(a,x,b,M+n*y):C+=v*y,n++;f.push(C),v<=d.hour&&f.length<1e4&&f.forEach(function(t){t%18e5==0&&"000000000"===p.dateFormat("%H%M%S%L",t)&&(g[t]="day")})}return f.info=s(t,{higherRanks:g,totalRange:v*y}),f},e.prototype.getDateFormat=function(t,e,i,o){var r=this.dateFormat("%m-%d %H:%M:%S.%L",e),s="01-01 00:00:00.000",n={millisecond:15,second:12,minute:9,hour:6,day:3},a="millisecond",h=a;for(a in d){if(t===d.week&&+this.dateFormat("%w",e)===i&&r.substr(6)===s.substr(6)){a="week";break}if(d[a]>t){a=h;break}if(n[a]&&r.substr(n[a])!==s.substr(n[a]))break;"week"!==a&&(h=a)}return this.resolveDTLFormat(o[a]).main},e}()}),i(e,"Core/Defaults.js",[e["Core/Chart/ChartDefaults.js"],e["Core/Globals.js"],e["Core/Color/Palettes.js"],e["Core/Time.js"],e["Core/Utilities.js"]],function(t,e,i,o,r){var s=e.isTouchDevice,n=e.svg,a=r.merge,h={colors:i.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],decimalPoint:".",numericSymbols:["k","M","G","T","P","E"],resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},chart:t,title:{style:{color:"#333333",fontWeight:"bold"},text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{style:{color:"#666666",fontSize:"0.8em"},text:"",align:"center",widthAdjust:-44},caption:{margin:15,style:{color:"#666666",fontSize:"0.8em"},text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",layout:"horizontal",itemMarginBottom:2,itemMarginTop:2,labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{style:{fontSize:"0.8em"},activeColor:"#0022ff",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"0.8em",textDecoration:"none",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#666666",textDecoration:"line-through"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontSize:"0.8em",fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:n,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %e %b, %H:%M:%S.%L",second:"%A, %e %b, %H:%M:%S",minute:"%A, %e %b, %H:%M",hour:"%A, %e %b, %H:%M",day:"%A, %e %b %Y",week:"Week from %A, %e %b %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:s?25:10,headerFormat:'{point.key}
',pointFormat:' {series.name}: {point.y}
',backgroundColor:"#ffffff",borderWidth:void 0,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"0.8em"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"0.6em"},text:"Highcharts.com"}};h.chart.styledMode=!1;var l=new o(h.time);return{defaultOptions:h,defaultTime:l,getOptions:function(){return h},setOptions:function(t){return a(!0,h,t),(t.time||t.global)&&(e.time?e.time.update(a(h.global,h.time,t.global,t.time)):e.time=l),h}}}),i(e,"Core/Color/Color.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){var i=e.isNumber,o=e.merge,r=e.pInt;return function(){function e(i){this.rgba=[NaN,NaN,NaN,NaN],this.input=i;var o=t.Color;if(o&&o!==e)return new o(i);this.init(i)}return e.parse=function(t){return t?new e(t):e.None},e.prototype.init=function(t){var i,o,r,s;if("object"==typeof t&&void 0!==t.stops)this.stops=t.stops.map(function(t){return new e(t[1])});else if("string"==typeof t){if(this.input=t=e.names[t.toLowerCase()]||t,"#"===t.charAt(0)){var n=t.length,a=parseInt(t.substr(1),16);7===n?o=[(16711680&a)>>16,(65280&a)>>8,255&a,1]:4===n&&(o=[(3840&a)>>4|(3840&a)>>8,(240&a)>>4|240&a,(15&a)<<4|15&a,1])}if(!o)for(r=e.parsers.length;r--&&!o;)(i=(s=e.parsers[r]).regex.exec(t))&&(o=s.parse(i))}o&&(this.rgba=o)},e.prototype.get=function(t){var e=this.input,r=this.rgba;if("object"==typeof e&&void 0!==this.stops){var s=o(e);return s.stops=[].slice.call(s.stops),this.stops.forEach(function(e,i){s.stops[i]=[s.stops[i][0],e.get(t)]}),s}return r&&i(r[0])?"rgb"!==t&&(t||1!==r[3])?"a"===t?"".concat(r[3]):"rgba("+r.join(",")+")":"rgb("+r[0]+","+r[1]+","+r[2]+")":e},e.prototype.brighten=function(t){var e=this.rgba;if(this.stops)this.stops.forEach(function(e){e.brighten(t)});else if(i(t)&&0!==t)for(var o=0;o<3;o++)e[o]+=r(255*t),e[o]<0&&(e[o]=0),e[o]>255&&(e[o]=255);return this},e.prototype.setOpacity=function(t){return this.rgba[3]=t,this},e.prototype.tweenTo=function(t,e){var o=this.rgba,r=t.rgba;if(!i(o[0])||!i(r[0]))return t.input||"none";var s=1!==r[3]||1!==o[3];return(s?"rgba(":"rgb(")+Math.round(r[0]+(o[0]-r[0])*(1-e))+","+Math.round(r[1]+(o[1]-r[1])*(1-e))+","+Math.round(r[2]+(o[2]-r[2])*(1-e))+(s?","+(r[3]+(o[3]-r[3])*(1-e)):"")+")"},e.names={white:"#ffffff",black:"#000000"},e.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(t){return[r(t[1]),r(t[2]),r(t[3]),parseFloat(t[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(t){return[r(t[1]),r(t[2]),r(t[3]),1]}}],e.None=new e(""),e}()}),i(e,"Core/Animation/Fx.js",[e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){var o=t.parse,r=e.win,s=i.isNumber,n=i.objectEach;return function(){function t(t,e,i){this.pos=NaN,this.options=e,this.elem=t,this.prop=i}return t.prototype.dSetter=function(){var t=this.paths,e=t&&t[0],i=t&&t[1],o=this.now||0,r=[];if(1!==o&&e&&i){if(e.length===i.length&&o<1)for(var n=0;n=h+this.startTime?(this.now=this.end,this.pos=1,this.update(),l[this.prop]=!0,i=!0,n(l,function(t){!0!==t&&(i=!1)}),i&&a&&a.call(s),e=!1):(this.pos=r.easing((o-this.startTime)/h),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0),e},t.prototype.initPath=function(t,e,i){var o,r,n,a,h=t.startX,l=t.endX,c=i.slice(),p=t.isArea,d=p?2:1,u=e&&e.slice();if(!u)return[c,c];function f(t,e){for(;t.length=e},gt:function(t,e){return t>e},if:function(t){return!!t},le:function(t,e){return t<=e},lt:function(t,e){return t%_@"'= #\(\)]+)\}/g,f=/\(([a-zA-Z0-9\:\.\,;\-\/<>%_@"'= ]+)\)/g,g=[],m=/f$/,v=/\.([0-9])/,y=i.lang,x=r&&r.time||o,b=r&&r.numberFormatter||u,M=function(t){var i;return void 0===t&&(t=""),"true"===t||"false"!==t&&((i=Number(t)).toString()===t?i:s(t,e))},C=0;null!==(n=c.exec(t));){var S=f.exec(n[1]);S&&(n=S,h=!0),a&&a.isBlock||(a={ctx:e,expression:n[1],find:n[0],isBlock:"#"===n[1].charAt(0),start:n.index,startInner:n.index+n[0].length,length:n[0].length});var w=n[1].split(" ")[0].replace("#","");p[w]&&(a.isBlock&&w===a.fn&&C++,a.fn||(a.fn=w));var k="else"===n[1];if(a.isBlock&&a.fn&&(n[1]==="/".concat(a.fn)||k)){if(C)!k&&C--;else{var T=a.startInner,A=t.substr(T,n.index-T);void 0===a.body?(a.body=A,a.startInner=n.index+n[0].length):a.elseBody=A,a.find+=A+n[0],k||(g.push(a),a=void 0)}}else a.isBlock||g.push(a);if(S&&!(null==a?void 0:a.isBlock))break}return g.forEach(function(i){var o,r,s=i.body,n=i.elseBody,a=i.expression,h=i.fn;if(h){var c=[i],u=a.split(" ");for(r=p[h].length;r--;)c.unshift(M(u[r+1]));o=p[h].apply(e,c),i.isBlock&&"boolean"==typeof o&&(o=d(o?s:n,e))}else{var f=a.split(":");if(o=M(f.shift()||""),f.length&&"number"==typeof o){var g=f.join(":");if(m.test(g)){var C=parseInt((g.match(v)||["","-1"])[1],10);null!==o&&(o=b(o,C,y.decimalPoint,g.indexOf(",")>-1?y.thousandsSep:""))}else o=x.dateFormat(g,o)}}t=t.replace(i.find,l(o,""))}),h?d(t,e,r):t}function u(t,e,o,r){t=+t||0,e=+e;var s,n,h=i.lang,p=(t.toString().split(".")[1]||"").split("e")[0].length,d=t.toString().split("e"),u=e;-1===e?e=Math.min(p,20):a(e)?e&&d[1]&&d[1]<0&&((n=e+ +d[1])>=0?(d[0]=(+d[0]).toExponential(n).split("e")[0],e=n):(d[0]=d[0].split(".")[0]||0,t=e<20?(d[0]*Math.pow(10,d[1])).toFixed(e):0,d[1]=0)):e=2;var f=(Math.abs(d[1]?d[0]:t)+Math.pow(10,-Math.max(e,p)-1)).toFixed(e),g=String(c(f)),m=g.length>3?g.length%3:0;return o=l(o,h.decimalPoint),r=l(r,h.thousandsSep),s=(t<0?"-":"")+(m?g.substr(0,m)+r:""),0>+d[1]&&!u?s="0":s+=g.substr(m).replace(/(\d{3})(?=\d)/g,"$1"+r),e&&(s+=o+f.slice(-e)),d[1]&&0!=+s&&(s+="e"+d[1]),s}return{dateFormat:function(t,e,i){return o.dateFormat(t,e,i)},format:d,helpers:p,numberFormat:u}}),i(e,"Core/Renderer/RendererUtilities.js",[e["Core/Utilities.js"]],function(t){var e,i=t.clamp,o=t.pick,r=t.pushUnique,s=t.stableSort;return(e||(e={})).distribute=function t(e,n,a){var h,l,c,p,d,u,f=e,g=f.reducedLen||n,m=function(t,e){return t.target-e.target},v=[],y=e.length,x=[],b=v.push,M=!0,C=0;for(h=y;h--;)C+=e[h].size;if(C>g){for(s(e,function(t,e){return(e.rank||0)-(t.rank||0)}),c=(u=e[0].rank===e[e.length-1].rank)?y/2:-1,l=u?c:y-1;c&&C>g;)p=e[h=Math.floor(l)],r(x,h)&&(C-=p.size),l+=c,u&&l>=e.length&&(c/=2,l=c);x.sort(function(t,e){return e-t}).forEach(function(t){return b.apply(v,e.splice(t,1))})}for(s(e,m),e=e.map(function(t){return{size:t.size,targets:[t.target],align:o(t.align,.5)}});M;){for(h=e.length;h--;)p=e[h],d=(Math.min.apply(0,p.targets)+Math.max.apply(0,p.targets))/2,p.pos=i(d-p.size*p.align,0,n-p.size);for(h=e.length,M=!1;h--;)h>0&&e[h-1].pos+e[h-1].size>e[h].pos&&(e[h-1].size+=e[h].size,e[h-1].targets=e[h-1].targets.concat(e[h].targets),e[h-1].align=.5,e[h-1].pos+e[h-1].size>n&&(e[h-1].pos=n-e[h-1].size),e.splice(h,1),M=!0)}return b.apply(f,v),h=0,e.some(function(e){var i=0;return(e.targets||[]).some(function(){return(f[h].pos=e.pos+i,void 0!==a&&Math.abs(f[h].pos-f[h].target)>a)?(f.slice(0,h+1).forEach(function(t){return delete t.pos}),f.reducedLen=(f.reducedLen||n)-.1*n,f.reducedLen>.1*n&&t(f,n,a),!0):(i+=f[h].size,h++,!1)})}),s(f,m),f},e}),i(e,"Core/Renderer/SVG/SVGElement.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i,o){var r=t.animate,s=t.animObject,n=t.stop,a=i.deg2rad,h=i.doc,l=(i.noop,i.svg),c=i.SVG_NS,p=i.win,d=o.addEvent,u=o.attr,f=o.createElement,g=o.css,m=o.defined,v=o.erase,y=o.extend,x=o.fireEvent,b=o.isArray,M=o.isFunction,C=o.isObject,S=o.isString,w=o.merge,k=o.objectEach,T=o.pick,A=o.pInt,P=o.syncTimeout,O=o.uniqueKey,L=function(){function t(){this.element=void 0,this.onEvents={},this.opacity=1,this.renderer=void 0,this.SVG_NS=c}return t.prototype._defaultGetter=function(t){var e=T(this[t+"Value"],this[t],this.element?this.element.getAttribute(t):null,0);return/^[\-0-9\.]+$/.test(e)&&(e=parseFloat(e)),e},t.prototype._defaultSetter=function(t,e,i){i.setAttribute(e,t)},t.prototype.add=function(t){var e,i=this.renderer,o=this.element;return t&&(this.parentGroup=t),void 0!==this.textStr&&"text"===this.element.nodeName&&i.buildText(this),this.added=!0,(!t||t.handleZ||this.zIndex)&&(e=this.zIndexSetter()),e||(t?t.element:i.box).appendChild(o),this.onAdd&&this.onAdd(),this},t.prototype.addClass=function(t,e){var i=e?"":this.attr("class")||"";return(t=(t||"").split(/ /g).reduce(function(t,e){return -1===i.indexOf(e)&&t.push(e),t},i?[i]:[]).join(" "))!==i&&this.attr("class",t),this},t.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},t.prototype.align=function(t,e,i){var o,r,s,n,a,h={},l=this.renderer,c=l.alignedObjects;t?(this.alignOptions=t,this.alignByTranslate=e,(!i||S(i))&&(this.alignTo=s=i||"renderer",v(c,this),c.push(this),i=void 0)):(t=this.alignOptions,e=this.alignByTranslate,s=this.alignTo),i=T(i,l[s],"scrollablePlotBox"===s?l.plotBox:void 0,l);var p=t.align,d=t.verticalAlign;return o=(i.x||0)+(t.x||0),r=(i.y||0)+(t.y||0),"right"===p?n=1:"center"===p&&(n=2),n&&(o+=(i.width-(t.width||0))/n),h[e?"translateX":"x"]=Math.round(o),"bottom"===d?a=1:"middle"===d&&(a=2),a&&(r+=(i.height-(t.height||0))/a),h[e?"translateY":"y"]=Math.round(r),this[this.placed?"animate":"attr"](h),this.placed=!0,this.alignAttr=h,this},t.prototype.alignSetter=function(t){var e={left:"start",center:"middle",right:"end"};e[t]&&(this.alignValue=t,this.element.setAttribute("text-anchor",e[t]))},t.prototype.animate=function(t,e,i){var o=this,n=s(T(e,this.renderer.globalAnimation,!0)),a=n.defer;return h.hidden&&(n.duration=0),0!==n.duration?(i&&(n.complete=i),P(function(){o.element&&r(o,t,n)},a)):(this.attr(t,void 0,i||n.complete),k(t,function(t,e){n.step&&n.step.call(this,t,{prop:e,pos:1,elem:this})},this)),this},t.prototype.applyTextOutline=function(t){var e=this.element;-1!==t.indexOf("contrast")&&(t=t.replace(/contrast/g,this.renderer.getContrast(e.style.fill)));var o=t.split(" "),r=o[o.length-1],s=o[0];if(s&&"none"!==s&&i.svg){this.fakeTS=!0,s=s.replace(/(^[\d\.]+)(.*?)$/g,function(t,e,i){return 2*Number(e)+i}),this.removeTextOutline();var n=h.createElementNS(c,"tspan");u(n,{class:"highcharts-text-outline",fill:r,stroke:r,"stroke-width":s,"stroke-linejoin":"round"});var a=e.querySelector("textPath")||e;[].forEach.call(a.childNodes,function(t){var e=t.cloneNode(!0);e.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach(function(t){return e.removeAttribute(t)}),n.appendChild(e)});var l=0;[].forEach.call(a.querySelectorAll("text tspan"),function(t){l+=Number(t.getAttribute("dy"))});var p=h.createElementNS(c,"tspan");p.textContent="​",u(p,{x:Number(e.getAttribute("x")),dy:-l}),n.appendChild(p),a.insertBefore(n,a.firstChild)}},t.prototype.attr=function(e,i,o,r){var s,a,h,l=this.element,c=t.symbolCustomAttribs,p=this;return"string"==typeof e&&void 0!==i&&(s=e,(e={})[s]=i),"string"==typeof e?p=(this[e+"Getter"]||this._defaultGetter).call(this,e,l):(k(e,function(t,i){h=!1,r||n(this,i),this.symbolName&&-1!==c.indexOf(i)&&(a||(this.symbolAttr(e),a=!0),h=!0),this.rotation&&("x"===i||"y"===i)&&(this.doTransform=!0),h||(this[i+"Setter"]||this._defaultSetter).call(this,t,i,l)},this),this.afterSetters()),o&&o.call(this),p},t.prototype.clip=function(t){return this.attr("clip-path",t?"url("+this.renderer.url+"#"+t.id+")":"none")},t.prototype.crisp=function(t,e){var i=Math.round(e=e||t.strokeWidth||0)%2/2;return t.x=Math.floor(t.x||this.x||0)+i,t.y=Math.floor(t.y||this.y||0)+i,t.width=Math.floor((t.width||this.width||0)-2*i),t.height=Math.floor((t.height||this.height||0)-2*i),m(t.strokeWidth)&&(t.strokeWidth=e),t},t.prototype.complexColor=function(t,i,o){var r,s,n,a,h,l,c,p,d,u,f,g=this.renderer,v=[];x(this.renderer,"complexColor",{args:arguments},function(){if(t.radialGradient?s="radialGradient":t.linearGradient&&(s="linearGradient"),s){if(n=t[s],h=g.gradients,l=t.stops,d=o.radialReference,b(n)&&(t[s]=n={x1:n[0],y1:n[1],x2:n[2],y2:n[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===s&&d&&!m(n.gradientUnits)&&(a=n,n=w(n,g.getRadialAttr(d,a),{gradientUnits:"userSpaceOnUse"})),k(n,function(t,e){"id"!==e&&v.push(e,t)}),k(l,function(t){v.push(t)}),h[v=v.join(",")])u=h[v].attr("id");else{n.id=u=O();var y=h[v]=g.createElement(s).attr(n).add(g.defs);y.radAttr=a,y.stops=[],l.forEach(function(t){0===t[1].indexOf("rgba")?(c=(r=e.parse(t[1])).get("rgb"),p=r.get("a")):(c=t[1],p=1);var i=g.createElement("stop").attr({offset:t[0],"stop-color":c,"stop-opacity":p}).add(y);y.stops.push(i)})}f="url("+g.url+"#"+u+")",o.setAttribute(i,f),o.gradient=v,t.toString=function(){return f}}})},t.prototype.css=function(t){var e,i=this.styles,o={},r=this.element,s=!i;if(i&&k(t,function(t,e){i&&i[e]!==t&&(o[e]=t,s=!0)}),s){i&&(t=y(i,o)),null===t.width||"auto"===t.width?delete this.textWidth:"text"===r.nodeName.toLowerCase()&&t.width&&(e=this.textWidth=A(t.width)),this.styles=t,e&&!l&&this.renderer.forExport&&delete t.width;var n=w(t);r.namespaceURI===this.SVG_NS&&(["textOutline","textOverflow","width"].forEach(function(t){return n&&delete n[t]}),n.color&&(n.fill=n.color)),g(r,n)}return this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),t.textOutline&&this.applyTextOutline(t.textOutline)),this},t.prototype.dashstyleSetter=function(t){var e,i=this["stroke-width"];if("inherit"===i&&(i=1),t=t&&t.toLowerCase()){var o=t.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=o.length;e--;)o[e]=""+A(o[e])*T(i,NaN);t=o.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",t)}},t.prototype.destroy=function(){var t,e,i,o=this,r=o.element||{},s=o.renderer,a=r.ownerSVGElement,h="SPAN"===r.nodeName&&o.parentGroup||void 0;if(r.onclick=r.onmouseout=r.onmouseover=r.onmousemove=r.point=null,n(o),o.clipPath&&a){var l=o.clipPath;[].forEach.call(a.querySelectorAll("[clip-path],[CLIP-PATH]"),function(t){t.getAttribute("clip-path").indexOf(l.element.id)>-1&&t.removeAttribute("clip-path")}),o.clipPath=l.destroy()}if(o.connector=null===(t=o.connector)||void 0===t?void 0:t.destroy(),o.stops){for(i=0;i0)){for(;v.length>250;)delete f[v.shift()];f[h]||v.push(h),f[h]=o}return o},t.prototype.getStyle=function(t){return p.getComputedStyle(this.element||this,"").getPropertyValue(t)},t.prototype.hasClass=function(t){return -1!==(""+this.attr("class")).split(" ").indexOf(t)},t.prototype.hide=function(){return this.attr({visibility:"hidden"})},t.prototype.htmlGetBBox=function(){return{height:0,width:0,x:0,y:0}},t.prototype.init=function(t,e){this.element="span"===e?f(e):h.createElementNS(this.SVG_NS,e),this.renderer=t,x(this,"afterInit")},t.prototype.on=function(t,e){var i=this.onEvents;return i[t]&&i[t](),i[t]=d(this.element,t,e),this},t.prototype.opacitySetter=function(t,e,i){var o=Number(Number(t).toFixed(3));this.opacity=o,i.setAttribute(e,o)},t.prototype.removeClass=function(t){return this.attr("class",(""+this.attr("class")).replace(S(t)?new RegExp("(^| )".concat(t,"( |$)")):t," ").replace(/ +/g," ").trim())},t.prototype.removeTextOutline=function(){var t=this.element.querySelector("tspan.highcharts-text-outline");t&&this.safeRemoveChild(t)},t.prototype.safeRemoveChild=function(t){var e=t.parentNode;e&&e.removeChild(t)},t.prototype.setRadialReference=function(t){var e=this.element.gradient&&this.renderer.gradients[this.element.gradient];return this.element.radialReference=t,e&&e.radAttr&&e.animate(this.renderer.getRadialAttr(t,e.radAttr)),this},t.prototype.setTextPath=function(t,e){var i=this;e=w(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}},e);var o=this.renderer.url,r=this.text||this,s=r.textPath,n=e.attributes,a=e.enabled;if(t=t||s&&s.path,s&&s.undo(),t&&a){var h=d(r,"afterModifyTree",function(e){if(t&&a){var s=t.attr("id");s||t.attr("id",s=O());var h={x:0,y:0};m(n.dx)&&(h.dx=n.dx,delete n.dx),m(n.dy)&&(h.dy=n.dy,delete n.dy),r.attr(h),i.attr({transform:""}),i.box&&(i.box=i.box.destroy());var l=e.nodes.slice(0);e.nodes.length=0,e.nodes[0]={tagName:"textPath",attributes:y(n,{"text-anchor":n.textAnchor,href:"".concat(o,"#").concat(s)}),children:l}}});r.textPath={path:t,undo:h}}else r.attr({dx:0,dy:0}),delete r.textPath;return this.added&&(r.textCache="",this.renderer.buildText(r)),this},t.prototype.shadow=function(t){var e,i=this.renderer,o=w((null===(e=this.parentGroup)||void 0===e?void 0:e.rotation)===90?{offsetX:-1,offsetY:-1}:{},C(t)?t:{}),r=i.shadowDefinition(o);return this.attr({filter:t?"url(".concat(i.url,"#").concat(r,")"):"none"})},t.prototype.show=function(t){return void 0===t&&(t=!0),this.attr({visibility:t?"inherit":"visible"})},t.prototype["stroke-widthSetter"]=function(t,e,i){this[e]=t,i.setAttribute(e,t)},t.prototype.strokeWidth=function(){if(!this.renderer.styledMode)return this["stroke-width"]||0;var t,e=this.getStyle("stroke-width"),i=0;return e.indexOf("px")===e.length-2?i=A(e):""!==e&&(u(t=h.createElementNS(c,"rect"),{width:e,"stroke-width":0}),this.element.parentNode.appendChild(t),i=t.getBBox().width,t.parentNode.removeChild(t)),i},t.prototype.symbolAttr=function(e){var i=this;t.symbolCustomAttribs.forEach(function(t){i[t]=T(e[t],i[t])}),i.attr({d:i.renderer.symbols[i.symbolName](i.x,i.y,i.width,i.height,i)})},t.prototype.textSetter=function(t){t!==this.textStr&&(delete this.textPxLength,this.textStr=t,this.added&&this.renderer.buildText(this))},t.prototype.titleSetter=function(t){var e=this.element,i=e.getElementsByTagName("title")[0]||h.createElementNS(this.SVG_NS,"title");e.insertBefore?e.insertBefore(i,e.firstChild):e.appendChild(i),i.textContent=String(T(t,"")).replace(/<[^>]*>/g,"").replace(/</g,"<").replace(/>/g,">")},t.prototype.toFront=function(){var t=this.element;return t.parentNode.appendChild(t),this},t.prototype.translate=function(t,e){return this.attr({translateX:t,translateY:e})},t.prototype.updateTransform=function(){var t=this.element,e=this.matrix,i=this.rotation,o=void 0===i?0:i,r=this.scaleX,s=this.scaleY,n=this.translateX,a=this.translateY,h=["translate("+(void 0===n?0:n)+","+(void 0===a?0:a)+")"];m(e)&&h.push("matrix("+e.join(",")+")"),o&&h.push("rotate("+o+" "+T(this.rotationOriginX,t.getAttribute("x"),0)+" "+T(this.rotationOriginY,t.getAttribute("y")||0)+")"),(m(r)||m(s))&&h.push("scale("+T(r,1)+" "+T(s,1)+")"),h.length&&!(this.text||this).textPath&&t.setAttribute("transform",h.join(" "))},t.prototype.visibilitySetter=function(t,e,i){"inherit"===t?i.removeAttribute(e):this[e]!==t&&i.setAttribute(e,t),this[e]=t},t.prototype.xGetter=function(t){return"circle"===this.element.nodeName&&("x"===t?t="cx":"y"===t&&(t="cy")),this._defaultGetter(t)},t.prototype.zIndexSetter=function(t,e){var i,o,r,s,n,a=this.renderer,h=this.parentGroup,l=(h||a).element||a.box,c=this.element,p=l===a.box,d=!1,u=this.added;if(m(t)?(c.setAttribute("data-z-index",t),t=+t,this[e]===t&&(u=!1)):m(this[e])&&c.removeAttribute("data-z-index"),this[e]=t,u){for((t=this.zIndex)&&h&&(h.handleZ=!0),n=(i=l.childNodes).length-1;n>=0&&!d;n--)s=!m(r=(o=i[n]).getAttribute("data-z-index")),o!==c&&(t<0&&s&&!p&&!n?(l.insertBefore(c,i[n]),d=!0):(A(r)<=t||s&&(!m(t)||t>=0))&&(l.insertBefore(c,i[n+1]),d=!0));d||(l.insertBefore(c,i[p?3:0]),d=!0)}return d},t.symbolCustomAttribs=["anchorX","anchorY","clockwise","end","height","innerR","r","start","width","x","y"],t}();return L.prototype.strokeSetter=L.prototype.fillSetter,L.prototype.yGetter=L.prototype.xGetter,L.prototype.matrixSetter=L.prototype.rotationOriginXSetter=L.prototype.rotationOriginYSetter=L.prototype.rotationSetter=L.prototype.scaleXSetter=L.prototype.scaleYSetter=L.prototype.translateXSetter=L.prototype.translateYSetter=L.prototype.verticalAlignSetter=function(t,e){this[e]=t,this.doTransform=!0},L}),i(e,"Core/Renderer/RendererRegistry.js",[e["Core/Globals.js"]],function(t){var e,i,o;return(i=e||(e={})).rendererTypes={},i.getRendererType=function(t){return void 0===t&&(t=o),i.rendererTypes[t]||i.rendererTypes[o]},i.registerRendererType=function(e,r,s){i.rendererTypes[e]=r,(!o||s)&&(o=e,t.Renderer=r)},e}),i(e,"Core/Renderer/SVG/SVGLabel.js",[e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],function(t,e){var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),r=e.defined,s=e.extend,n=e.isNumber,a=e.merge,h=e.pick,l=e.removeEvent;return function(e){function i(t,o,r,s,n,a,h,l,c,p){var d,u=e.call(this)||this;return u.paddingLeftSetter=u.paddingSetter,u.paddingRightSetter=u.paddingSetter,u.init(t,"g"),u.textStr=o,u.x=r,u.y=s,u.anchorX=a,u.anchorY=h,u.baseline=c,u.className=p,u.addClass("button"===p?"highcharts-no-tooltip":"highcharts-label"),p&&u.addClass("highcharts-"+p),u.text=t.text(void 0,0,0,l).attr({zIndex:1}),"string"==typeof n&&((d=/^url\((.*?)\)$/.test(n))||u.renderer.symbols[n])&&(u.symbolKey=n),u.bBox=i.emptyBBox,u.padding=3,u.baselineOffset=0,u.needsBox=t.styledMode||d,u.deferredAttr={},u.alignFactor=0,u}return o(i,e),i.prototype.alignSetter=function(t){var e={left:0,center:.5,right:1}[t];e!==this.alignFactor&&(this.alignFactor=e,this.bBox&&n(this.xSetting)&&this.attr({x:this.xSetting}))},i.prototype.anchorXSetter=function(t,e){this.anchorX=t,this.boxAttr(e,Math.round(t)-this.getCrispAdjust()-this.xSetting)},i.prototype.anchorYSetter=function(t,e){this.anchorY=t,this.boxAttr(e,t-this.ySetting)},i.prototype.boxAttr=function(t,e){this.box?this.box.attr(t,e):this.deferredAttr[t]=e},i.prototype.css=function(e){if(e){var o={};e=a(e),i.textProps.forEach(function(t){void 0!==e[t]&&(o[t]=e[t],delete e[t])}),this.text.css(o),"fontSize"in o||"fontWeight"in o?this.updateTextPadding():("width"in o||"textOverflow"in o)&&this.updateBoxSize()}return t.prototype.css.call(this,e)},i.prototype.destroy=function(){l(this.element,"mouseenter"),l(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),t.prototype.destroy.call(this)},i.prototype.fillSetter=function(t,e){t&&(this.needsBox=!0),this.fill=t,this.boxAttr(e,t)},i.prototype.getBBox=function(){this.textStr&&0===this.bBox.width&&0===this.bBox.height&&this.updateBoxSize();var t=this.padding,e=h(this.paddingLeft,t);return{width:this.width||0,height:this.height||0,x:this.bBox.x-e,y:this.bBox.y-t}},i.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},i.prototype.heightSetter=function(t){this.heightSetting=t},i.prototype.onAdd=function(){this.text.add(this),this.attr({text:h(this.textStr,""),x:this.x||0,y:this.y||0}),this.box&&r(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})},i.prototype.paddingSetter=function(t,e){n(t)?t!==this[e]&&(this[e]=t,this.updateTextPadding()):this[e]=void 0},i.prototype.rSetter=function(t,e){this.boxAttr(e,t)},i.prototype.strokeSetter=function(t,e){this.stroke=t,this.boxAttr(e,t)},i.prototype["stroke-widthSetter"]=function(t,e){t&&(this.needsBox=!0),this["stroke-width"]=t,this.boxAttr(e,t)},i.prototype["text-alignSetter"]=function(t){this.textAlign=t},i.prototype.textSetter=function(t){void 0!==t&&this.text.attr({text:t}),this.updateTextPadding()},i.prototype.updateBoxSize=function(){var t,e=this.text,o={},a=this.padding,h=this.bBox=(!n(this.widthSetting)||!n(this.heightSetting)||this.textAlign)&&r(e.textStr)?e.getBBox():i.emptyBBox;this.width=this.getPaddedWidth(),this.height=(this.heightSetting||h.height||0)+2*a;var l=this.renderer.fontMetrics(e);if(this.baselineOffset=a+Math.min((this.text.firstLineMetrics||l).b,h.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-l.h)/2),this.needsBox&&!e.textPath){if(!this.box){var 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)}t=this.getCrispAdjust(),o.x=t,o.y=(this.baseline?-this.baselineOffset:0)+t,o.width=Math.round(this.width),o.height=Math.round(this.height),this.box.attr(s(o,this.deferredAttr)),this.deferredAttr={}}},i.prototype.updateTextPadding=function(){var t=this.text;if(!t.textPath){this.updateBoxSize();var e=this.baseline?0:this.baselineOffset,i=h(this.paddingLeft,this.padding);r(this.widthSetting)&&this.bBox&&("center"===this.textAlign||"right"===this.textAlign)&&(i+=({center:.5,right:1})[this.textAlign]*(this.widthSetting-this.bBox.width)),(i!==t.x||e!==t.y)&&(t.attr("x",i),t.hasBoxWidthChanged&&(this.bBox=t.getBBox(!0)),void 0!==e&&t.attr("y",e)),t.x=i,t.y=e}},i.prototype.widthSetter=function(t){this.widthSetting=n(t)?t:void 0},i.prototype.getPaddedWidth=function(){var t=this.padding,e=h(this.paddingLeft,t),i=h(this.paddingRight,t);return(this.widthSetting||this.bBox.width||0)+e+i},i.prototype.xSetter=function(t){this.x=t,this.alignFactor&&(t-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.xSetting=Math.round(t),this.attr("translateX",this.xSetting)},i.prototype.ySetter=function(t){this.ySetting=this.y=Math.round(t),this.attr("translateY",this.ySetting)},i.emptyBBox={width:0,height:0,x:0,y:0},i.textProps=["color","direction","fontFamily","fontSize","fontStyle","fontWeight","lineHeight","textAlign","textDecoration","textOutline","textOverflow","whiteSpace","width"],i}(t)}),i(e,"Core/Renderer/SVG/Symbols.js",[e["Core/Utilities.js"]],function(t){var e=t.defined,i=t.isNumber,o=t.pick;function r(t,i,r,s,n){var a=[];if(n){var h=n.start||0,l=o(n.r,r),c=o(n.r,s||r),p=.001>Math.abs((n.end||0)-h-2*Math.PI),d=(n.end||0)-.001,u=n.innerR,f=o(n.open,p),g=Math.cos(h),m=Math.sin(h),v=Math.cos(d),y=Math.sin(d),x=o(n.longArc,d-h-Math.PI<.001?0:1),b=["A",l,c,0,x,o(n.clockwise,1),t+l*v,i+c*y];b.params={start:h,end:d,cx:t,cy:i},a.push(["M",t+l*g,i+c*m],b),e(u)&&((b=["A",u,u,0,x,e(n.clockwise)?1-n.clockwise:0,t+u*g,i+u*m]).params={start:d,end:h,cx:t,cy:i},a.push(f?["M",t+u*v,i+u*y]:["L",t+u*v,i+u*y],b)),f||a.push(["Z"])}return a}function s(t,e,i,o,r){return r&&r.r?n(t,e,i,o,r):[["M",t,e],["L",t+i,e],["L",t+i,e+o],["L",t,e+o],["Z"]]}function n(t,e,i,o,r){var s=(null==r?void 0:r.r)||0;return[["M",t+s,e],["L",t+i-s,e],["A",s,s,0,0,1,t+i,e+s],["L",t+i,e+o-s],["A",s,s,0,0,1,t+i-s,e+o],["L",t+s,e+o],["A",s,s,0,0,1,t,e+o-s],["L",t,e+s],["A",s,s,0,0,1,t+s,e],["Z"]]}return{arc:r,callout:function(t,e,o,r,s){var a=Math.min(s&&s.r||0,o,r),h=a+6,l=s&&s.anchorX,c=s&&s.anchorY||0,p=n(t,e,o,r,{r:a});if(!i(l)||l0&&c0)return p;if(t+l>o-h){if(c>e+h&&ce+h&&c0){var d=cr&&lh&&p.splice(1,1,["L",l-6,e],["L",l,e-6],["L",l+6,e],["L",o-a,e]);return p},circle:function(t,e,i,o){return r(t+i/2,e+o/2,i/2,o/2,{start:.5*Math.PI,end:2.5*Math.PI,open:!1})},diamond:function(t,e,i,o){return[["M",t+i/2,e],["L",t+i,e+o/2],["L",t+i/2,e+o],["L",t,e+o/2],["Z"]]},rect:s,roundedRect:n,square:s,triangle:function(t,e,i,o){return[["M",t+i/2,e],["L",t+i,e+o],["L",t,e+o],["Z"]]},"triangle-down":function(t,e,i,o){return[["M",t,e],["L",t+i,e],["L",t+i/2,e+o],["Z"]]}}}),i(e,"Core/Renderer/SVG/TextBuilder.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){var o=e.doc,r=e.SVG_NS,s=e.win,n=i.attr,a=i.extend,h=i.fireEvent,l=i.isString,c=i.objectEach,p=i.pick;return function(){function e(t){var e=t.styles;this.renderer=t.renderer,this.svgElement=t,this.width=t.textWidth,this.textLineHeight=e&&e.lineHeight,this.textOutline=e&&e.textOutline,this.ellipsis=!!(e&&"ellipsis"===e.textOverflow),this.noWrap=!!(e&&"nowrap"===e.whiteSpace)}return e.prototype.buildSVG=function(){var e=this.svgElement,i=e.element,r=e.renderer,s=p(e.textStr,"").toString(),n=-1!==s.indexOf("<"),a=i.childNodes,h=!e.added&&r.box,c=[s,this.ellipsis,this.noWrap,this.textLineHeight,this.textOutline,e.getStyle("font-size"),this.width].join(",");if(c!==e.textCache){e.textCache=c,delete e.actualWidth;for(var d=a.length;d--;)i.removeChild(a[d]);if(n||this.ellipsis||this.width||e.textPath||-1!==s.indexOf(" ")&&(!this.noWrap||//g.test(s))){if(""!==s){h&&h.appendChild(i);var u=new t(s);this.modifyTree(u.nodes),u.addToDOM(i),this.modifyDOM(),this.ellipsis&&-1!==(i.textContent||"").indexOf("…")&&e.attr("title",this.unescapeEntities(e.textStr||"",["<",">"])),h&&h.removeChild(i)}}else i.appendChild(o.createTextNode(this.unescapeEntities(s)));l(this.textOutline)&&e.applyTextOutline&&e.applyTextOutline(this.textOutline)}},e.prototype.modifyDOM=function(){var t,e=this,i=this.svgElement,a=n(i.element,"x");for(i.firstLineMetrics=void 0;t=i.element.firstChild;)if(/^[\s\u200B]*$/.test(t.textContent||" "))i.element.removeChild(t);else break;[].forEach.call(i.element.querySelectorAll("tspan.highcharts-br"),function(t,o){t.nextSibling&&t.previousSibling&&(0===o&&1===t.previousSibling.nodeType&&(i.firstLineMetrics=i.renderer.fontMetrics(t.previousSibling)),n(t,{dy:e.getLineHeight(t.nextSibling),x:a}))});var h=this.width||0;if(h){var l=function(t,s){var l=t.textContent||"",c=l.replace(/([^\^])-/g,"$1- ").split(" "),p=!e.noWrap&&(c.length>1||i.element.childNodes.length>1),d=e.getLineHeight(s),u=0,f=i.actualWidth;if(e.ellipsis)l&&e.truncate(t,l,void 0,0,Math.max(0,h-.8*d),function(t,e){return t.substring(0,e)+"…"});else if(p){for(var g=[],m=[];s.firstChild&&s.firstChild!==t;)m.push(s.firstChild),s.removeChild(s.firstChild);for(;c.length;)c.length&&!e.noWrap&&u>0&&(g.push(t.textContent||""),t.textContent=c.join(" ").replace(/- /g,"-")),e.truncate(t,void 0,c,0===u&&f||0,h,function(t,e){return c.slice(0,e).join(" ").replace(/- /g,"-")}),f=i.actualWidth,u++;m.forEach(function(e){s.insertBefore(e,t)}),g.forEach(function(e){s.insertBefore(o.createTextNode(e),t);var i=o.createElementNS(r,"tspan");i.textContent="​",n(i,{dy:d,x:a}),s.insertBefore(i,t)})}},c=function(t){[].slice.call(t.childNodes).forEach(function(e){e.nodeType===s.Node.TEXT_NODE?l(e,t):(-1!==e.className.baseVal.indexOf("highcharts-br")&&(i.actualWidth=0),c(e))})};c(i.element)}},e.prototype.getLineHeight=function(t){var e=t.nodeType===s.Node.TEXT_NODE?t.parentElement:t;return this.textLineHeight?parseInt(this.textLineHeight.toString(),10):this.renderer.fontMetrics(e||this.svgElement.element).h},e.prototype.modifyTree=function(t){var e=this,i=function(o,r){var s=o.attributes,n=void 0===s?{}:s,h=o.children,l=o.style,c=void 0===l?{}:l,p=o.tagName,d=e.renderer.styledMode;if("b"===p||"strong"===p?d?n.class="highcharts-strong":c.fontWeight="bold":("i"===p||"em"===p)&&(d?n.class="highcharts-emphasized":c.fontStyle="italic"),c&&c.color&&(c.fill=c.color),"br"===p){n.class="highcharts-br",o.textContent="​";var u=t[r+1];u&&u.textContent&&(u.textContent=u.textContent.replace(/^ +/gm,""))}else"a"===p&&h&&h.some(function(t){return"#text"===t.tagName})&&(o.children=[{children:h,tagName:"tspan"}]);"#text"!==p&&"a"!==p&&(o.tagName="tspan"),a(o,{attributes:n,style:c}),h&&h.filter(function(t){return"#text"!==t.tagName}).forEach(i)};t.forEach(i),h(this.svgElement,"afterModifyTree",{nodes:t})},e.prototype.truncate=function(t,e,i,o,r,s){var n,a,h=this.svgElement;h.renderer;var l=h.rotation,c=[],p=i?1:0,d=(e||i||"").length,u=d,f=function(e,r){var s=r||e,n=t.parentNode;if(n&&void 0===c[s]&&n.getSubStringLength)try{c[s]=o+n.getSubStringLength(0,i?s+1:s)}catch(t){}return c[s]};if(h.rotation=0,o+(a=f(t.textContent.length))>r){for(;p<=d;)u=Math.ceil((p+d)/2),i&&(n=s(i,u)),a=f(u,n&&n.length-1),p===d?p=d+1:a>r?d=u-1:p=u;0===d?t.textContent="":e&&d===e.length-1||(t.textContent=n||s(e||i,u))}i&&i.splice(0,u),h.actualWidth=a,h.rotation=l},e.prototype.unescapeEntities=function(t,e){return c(this.renderer.escapes,function(i,o){e&&-1!==e.indexOf(i)||(t=t.toString().replace(RegExp(i,"g"),o))}),t},e}()}),i(e,"Core/Renderer/SVG/SVGRenderer.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Renderer/SVG/SVGLabel.js"],e["Core/Renderer/SVG/Symbols.js"],e["Core/Renderer/SVG/TextBuilder.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s,n,a,h){var l,c=this&&this.__spreadArray||function(t,e,i){if(i||2==arguments.length)for(var o,r=0,s=e.length;r]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20")}return""},i.prototype.getStyle=function(t){return this.style=A({fontFamily:"Helvetica, Arial, sans-serif",fontSize:"1rem"},t),this.style},i.prototype.setStyle=function(t){this.boxWrapper.css(this.getStyle(t))},i.prototype.isHidden=function(){return!this.boxWrapper.getBBox().width},i.prototype.destroy=function(){var t=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),T(this.gradients||{}),this.gradients=null,this.defs=t.destroy(),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null,null},i.prototype.createElement=function(t){var e=new this.Element;return e.init(this,t),e},i.prototype.getRadialAttr=function(t,e){return{cx:t[0]-t[2]/2+(e.cx||0)*t[2],cy:t[1]-t[2]/2+(e.cy||0)*t[2],r:(e.r||0)*t[2]}},i.prototype.shadowDefinition=function(t){var e=c(["highcharts-drop-shadow-".concat(this.chartIndex)],Object.keys(t).map(function(e){return"".concat(e,"-").concat(t[e])}),!0).join("-").toLowerCase().replace(/[^a-z0-9\-]/g,""),i=E({color:"#000000",offsetX:1,offsetY:1,opacity:.15,width:5},t);return this.defs.element.querySelector("#".concat(e))||this.definition({tagName:"filter",attributes:{id:e,filterUnits:i.filterUnits},children:[{tagName:"feDropShadow",attributes:{dx:i.offsetX,dy:i.offsetY,"flood-color":i.color,"flood-opacity":Math.min(5*i.opacity,1),stdDeviation:i.width/2}}]}),e},i.prototype.buildText=function(t){new a(t).buildSVG()},i.prototype.getContrast=function(t){var i=e.parse(t).rgba.map(function(t){var e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}),o=.2126*i[0]+.7152*i[1]+.0722*i[2];return 1.05/(o+.05)>(o+.05)/.05?"#FFFFFF":"#000000"},i.prototype.button=function(e,i,o,r,s,n,a,h,l,c){void 0===s&&(s={});var p,d,u,f=this.label(e,i,o,l,void 0,void 0,c,void 0,"button"),m=this.styledMode,v=s.states||{},y=0;s=E(s),delete s.states;var x=E({color:"#333333",cursor:"pointer",fontSize:"0.8em",fontWeight:"normal"},s.style);delete s.style;var b=t.filterUserAttributes(s);return f.attr(E({padding:8,r:2},b)),m||(b=E({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1},b),p=(n=E(b,{fill:"#e6e6e6"},t.filterUserAttributes(n||v.hover||{}))).style,delete n.style,d=(a=E(b,{fill:"#e6e9ff",style:{color:"#000000",fontWeight:"bold"}},t.filterUserAttributes(a||v.select||{}))).style,delete a.style,u=(h=E(b,{style:{color:"#cccccc"}},t.filterUserAttributes(h||v.disabled||{}))).style,delete h.style),M(f.element,g?"mouseover":"mouseenter",function(){3!==y&&f.setState(1)}),M(f.element,g?"mouseout":"mouseleave",function(){3!==y&&f.setState(y)}),f.setState=function(t){if(1!==t&&(f.state=y=t),f.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][t||0]),!m){f.attr([b,n,a,h][t||0]);var e=[x,p,d,u][t||0];L(e)&&f.css(e)}},!m&&(f.attr(b).css(A({cursor:"default"},x)),c&&f.text.css({pointerEvents:"none"})),f.on("touchstart",function(t){return t.stopPropagation()}).on("click",function(t){3!==y&&r.call(f,t)})},i.prototype.crispLine=function(t,e,i){void 0===i&&(i="round");var o=t[0],r=t[1];return k(o[1])&&o[1]===r[1]&&(o[1]=r[1]=Math[i](o[1])-e%2/2),k(o[2])&&o[2]===r[2]&&(o[2]=r[2]=Math[i](o[2])+e%2/2),t},i.prototype.path=function(t){var e=this.styledMode?{}:{fill:"none"};return P(t)?e.d=t:L(t)&&A(e,t),this.createElement("path").attr(e)},i.prototype.circle=function(t,e,i){var o=L(t)?t:void 0===t?{}:{x:t,y:e,r:i},r=this.createElement("circle");return r.xSetter=r.ySetter=function(t,e,i){i.setAttribute("c"+e,t)},r.attr(o)},i.prototype.arc=function(t,e,i,o,r,s){L(t)?(e=(n=t).y,i=n.r,o=n.innerR,r=n.start,s=n.end,t=n.x):n={innerR:o,start:r,end:s};var n,a=this.symbol("arc",t,e,i,i,n);return a.r=i,a},i.prototype.rect=function(t,e,i,o,r,s){var n=L(t)?t:void 0===t?{}:{x:t,y:e,r:r,width:Math.max(i||0,0),height:Math.max(o||0,0)},a=this.createElement("rect");return this.styledMode||(void 0!==s&&(n["stroke-width"]=s,A(n,a.crisp(n))),n.fill="none"),a.rSetter=function(t,e,i){a.r=t,C(i,{rx:t,ry:t})},a.rGetter=function(){return a.r||0},a.attr(n)},i.prototype.roundedRect=function(t){return this.symbol("roundedRect").attr(t)},i.prototype.setSize=function(t,e,i){this.width=t,this.height=e,this.boxWrapper.animate({width:t,height:e},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:D(i,!0)?void 0:0}),this.alignElements()},i.prototype.g=function(t){var e=this.createElement("g");return t?e.attr({class:"highcharts-"+t}):e},i.prototype.image=function(t,e,i,o,r,s){var n={preserveAspectRatio:"none"};O(e)&&(n.x=e),O(i)&&(n.y=i),O(o)&&(n.width=o),O(r)&&(n.height=r);var a=this.createElement("image").attr(n),h=function(e){a.attr({href:t}),s.call(a,e)};if(s){a.attr({href:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="});var l=new b.Image;M(l,"load",h),l.src=t,l.complete&&h({})}else a.attr({href:t});return a},i.prototype.symbol=function(t,e,i,o,r,s){var n,a,h,l,c=this,d=/^url\((.*?)\)$/,f=d.test(t),g=!f&&(this.symbols[t]?t:"circle"),m=g&&this.symbols[g];if(m)"number"==typeof e&&(a=m.call(this.symbols,Math.round(e||0),Math.round(i||0),o||0,r||0,s)),n=this.path(a),c.styledMode||n.attr("fill","none"),A(n,{symbolName:g||void 0,x:e,y:i,width:o,height:r}),s&&A(n,s);else if(f){h=t.match(d)[1];var v=n=this.image(h);v.imgwidth=D(s&&s.width,x[h]&&x[h].width),v.imgheight=D(s&&s.height,x[h]&&x[h].height),l=function(t){return t.attr({width:t.width,height:t.height})},["width","height"].forEach(function(t){v["".concat(t,"Setter")]=function(t,e){this[e]=t;var i=this.alignByTranslate,o=this.element,r=this.width,n=this.height,a=this.imgwidth,h=this.imgheight,l="width"===e?a:h,c=1;s&&"within"===s.backgroundSize&&r&&n&&a&&h?(c=Math.min(r/a,n/h),C(o,{width:Math.round(a*c),height:Math.round(h*c)})):o&&l&&o.setAttribute(e,l),!i&&a&&h&&this.translate(((r||0)-a*c)/2,((n||0)-h*c)/2)}}),k(e)&&v.attr({x:e,y:i}),v.isImg=!0,k(v.imgwidth)&&k(v.imgheight)?l(v):(v.attr({width:0,height:0}),S("img",{onload:function(){var t=p[c.chartIndex];0===this.width&&(w(this,{position:"absolute",top:"-999em"}),u.body.appendChild(this)),x[h]={width:this.width,height:this.height},v.imgwidth=this.width,v.imgheight=this.height,v.element&&l(v),this.parentNode&&this.parentNode.removeChild(this),c.imgCount--,c.imgCount||!t||t.hasLoaded||t.onload()},src:h}),this.imgCount++)}return n},i.prototype.clipRect=function(t,e,i,o){var r=I()+"-",s=this.createElement("clipPath").attr({id:r}).add(this.defs),n=this.rect(t,e,i,o,0).add(s);return n.id=r,n.clipPath=s,n.count=0,n},i.prototype.text=function(t,e,i,o){var r={};if(o&&(this.allowHTML||!this.forExport))return this.html(t,e,i);r.x=Math.round(e||0),i&&(r.y=Math.round(i)),k(t)&&(r.text=t);var s=this.createElement("text").attr(r);return o&&(!this.forExport||this.allowHTML)||(s.xSetter=function(t,e,i){for(var o=i.getElementsByTagName("tspan"),r=i.getAttribute(e),s=0,n=void 0;s":">","'":"'",'"':"""},symbols:n,draw:v}),o.registerRendererType("svg",z,!0),z}),i(e,"Core/Renderer/HTML/HTMLElement.js",[e["Core/Globals.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=t.isFirefox,n=t.isMS,a=t.isWebKit,h=t.win,l=i.css,c=i.defined,p=i.extend,d=i.pick,u=i.pInt,f=[];return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.compose=function(t){if(i.pushUnique(f,t)){var o=e.prototype,r=t.prototype;r.getSpanCorrection=o.getSpanCorrection,r.htmlCss=o.htmlCss,r.htmlGetBBox=o.htmlGetBBox,r.htmlUpdateTransform=o.htmlUpdateTransform,r.setSpanRotation=o.setSpanRotation}return t},e.prototype.getSpanCorrection=function(t,e,i){this.xCorr=-t*i,this.yCorr=-e},e.prototype.htmlCss=function(t){var e,i="SPAN"===this.element.tagName&&t&&"width"in t,o=d(i&&t.width,void 0);return i&&(delete t.width,this.textWidth=o,e=!0),t&&"ellipsis"===t.textOverflow&&(t.whiteSpace="nowrap",t.overflow="hidden"),this.styles=p(this.styles,t),l(this.element,t),e&&this.htmlUpdateTransform(),this},e.prototype.htmlGetBBox=function(){var t=this.element;return{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}},e.prototype.htmlUpdateTransform=function(){if(!this.added){this.alignOnAdd=!0;return}var t=this.renderer,e=this.element,i=this.translateX||0,o=this.translateY||0,r=this.x||0,s=this.y||0,n=this.textAlign||"left",a={left:0,center:.5,right:1}[n],h=this.styles,p=h&&h.whiteSpace;if(l(e,{marginLeft:i,marginTop:o}),"SPAN"===e.tagName){var d=this.rotation,f=this.textWidth&&u(this.textWidth),g=[d,n,e.innerHTML,this.textWidth,this.textAlign].join(","),m=void 0,v=!1;if(f!==this.oldTextWidth){var y=this.textPxLength?this.textPxLength:(l(e,{width:"",whiteSpace:p||"nowrap"}),e.offsetWidth);(f>this.oldTextWidth||y>f)&&(/[ \-]/.test(e.textContent||e.innerText)||"ellipsis"===e.style.textOverflow)&&(l(e,{width:y>f||d?f+"px":"auto",display:"block",whiteSpace:p||"normal"}),this.oldTextWidth=f,v=!0)}this.hasBoxWidthChanged=v,g!==this.cTT&&(m=t.fontMetrics(e).b,c(d)&&(d!==(this.oldRotation||0)||n!==this.oldAlign)&&this.setSpanRotation(d,a,m),this.getSpanCorrection(!c(d)&&this.textPxLength||e.offsetWidth,m,a,d,n)),l(e,{left:r+(this.xCorr||0)+"px",top:s+(this.yCorr||0)+"px"}),this.cTT=g,this.oldRotation=d,this.oldAlign=n}},e.prototype.setSpanRotation=function(t,e,i){var o={},r=n&&!/Edge/.test(h.navigator.userAgent)?"-ms-transform":a?"-webkit-transform":s?"MozTransform":h.opera?"-o-transform":void 0;r&&(o[r]=o.transform="rotate("+t+"deg)",o[r+(s?"Origin":"-origin")]=o.transformOrigin=100*e+"% "+i+"px",l(this.element,o))},e}(e)}),i(e,"Core/Renderer/HTML/HTMLRenderer.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"]],function(t,e,i,o){var r,s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),n=o.attr,a=o.createElement,h=o.extend,l=o.pick,c=[];return function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return s(r,i),r.compose=function(t){if(o.pushUnique(c,t)){var e=r.prototype;t.prototype.html=e.html}return t},r.prototype.html=function(i,o,r){var s=this.createElement("span"),c=s.element,p=s.renderer,d=function(t,i){["opacity","visibility"].forEach(function(o){t[o+"Setter"]=function(r,s,n){var a=t.div?t.div.style:i;e.prototype[o+"Setter"].call(this,r,s,n),a&&(a[s]=r)}}),t.addedSetters=!0};return s.textSetter=function(e){e!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,t.setElementHTML(this.element,l(e,"")),this.textStr=e,s.doTransform=!0)},d(s,s.element.style),s.xSetter=s.ySetter=s.alignSetter=s.rotationSetter=function(t,e){"align"===e?s.alignValue=s.textAlign=t:s[e]=t,s.doTransform=!0},s.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},s.attr({text:i,x:Math.round(o),y:Math.round(r)}).css({position:"absolute"}),p.styledMode||s.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),c.style.whiteSpace="nowrap",s.css=s.htmlCss,s.add=function(t){var e,i,o=p.box.parentNode,r=[];if(this.parentGroup=t,t){if(!(e=t.div)){for(i=t;i;)r.push(i),i=i.parentGroup;r.reverse().forEach(function(t){var i,l=n(t.element,"class"),c=t.css;function p(e,i){t[i]=e,"translateX"===i?f.left=e+"px":f.top=e+"px",t.doTransform=!0}var u=t.styles||{},f=(e=t.div=t.div||a("div",l?{className:l}:void 0,{position:"absolute",left:(t.translateX||0)+"px",top:(t.translateY||0)+"px",display:t.display,opacity:t.opacity,visibility:t.visibility},e||o)).style;h(t,{classSetter:(i=e,function(t){this.element.setAttribute("class",t),i.className=t}),css:function(e){return c.call(t,e),["cursor","pointerEvents"].forEach(function(t){e[t]&&(f[t]=e[t])}),t},on:function(){return r[0].div&&s.on.apply({element:r[0].div,onEvents:t.onEvents},arguments),t},translateXSetter:p,translateYSetter:p}),t.addedSetters||d(t),t.css(u)})}}else e=o;return e.appendChild(c),s.added=!0,s.alignOnAdd&&s.htmlUpdateTransform(),s},s},r}(i)}),i(e,"Core/Axis/AxisDefaults.js",[],function(){var t,e;return(e=t||(t={})).defaultXAxisOptions={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e %b"},week:{main:"%e %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotation:void 0,autoRotationLimit:80,distance:15,enabled:!0,indentation:10,overflow:"justify",padding:5,reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,zIndex:7,style:{color:"#333333",cursor:"default",fontSize:"0.8em"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minorTicksPerMajor:5,minPadding:.01,offset:void 0,opposite:!1,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",rotation:0,useHTML:!1,x:0,y:0,style:{color:"#666666",fontSize:"0.8em"}},type:"linear",uniqueNames:!0,visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#333333",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#333333"},e.defaultYAxisOptions={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:void 0},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){return(0,this.axis.chart.numberFormatter)(this.total||0,-1)},style:{color:"#000000",fontSize:"0.7em",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},e.defaultLeftAxisOptions={title:{rotation:270}},e.defaultRightAxisOptions={title:{rotation:90}},e.defaultBottomAxisOptions={labels:{autoRotation:[-45]},margin:15,title:{rotation:0}},e.defaultTopAxisOptions={labels:{autoRotation:[-45]},margin:15,title:{rotation:0}},t}),i(e,"Core/Foundation.js",[e["Core/Utilities.js"]],function(t){var e,i=t.addEvent,o=t.isFunction,r=t.objectEach,s=t.removeEvent;return(e||(e={})).registerEventOptions=function(t,e){t.eventOptions=t.eventOptions||{},r(e.events,function(e,r){t.eventOptions[r]!==e&&(t.eventOptions[r]&&(s(t,r,t.eventOptions[r]),delete t.eventOptions[r]),o(e)&&(t.eventOptions[r]=e,i(t,r,e,{order:0})))})},e}),i(e,"Core/Axis/Tick.js",[e["Core/Templating.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){var o=e.deg2rad,r=i.clamp,s=i.correctFloat,n=i.defined,a=i.destroyObjectProperties,h=i.extend,l=i.fireEvent,c=i.isNumber,p=i.merge,d=i.objectEach,u=i.pick;return function(){function e(t,e,i,o,r){this.isNew=!0,this.isNewLabel=!0,this.axis=t,this.pos=e,this.type=i||"",this.parameters=r||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,l(this,"init"),i||o||this.addLabel()}return e.prototype.addLabel=function(){var e,i,o,r=this,a=r.axis,p=a.options,d=a.chart,f=a.categories,g=a.logarithmic,m=a.names,v=r.pos,y=u(r.options&&r.options.labels,p.labels),x=a.tickPositions,b=v===x[0],M=v===x[x.length-1],C=(!y.step||1===y.step)&&1===a.tickInterval,S=x.info,w=r.label,k=this.parameters.category||(f?u(f[v],m[v],v):v);g&&c(k)&&(k=s(g.lin2log(k))),a.dateTime&&(S?e=(i=d.time.resolveDTLFormat(p.dateTimeLabelFormats[!p.grid&&S.higherRanks[v]||S.unitName])).main:c(k)&&(e=a.dateTime.getXDateFormat(k,p.dateTimeLabelFormats||{}))),r.isFirst=b,r.isLast=M;var T={axis:a,chart:d,dateTimeLabelFormat:e,isFirst:b,isLast:M,pos:v,tick:r,tickPositionInfo:S,value:k};l(this,"labelFormat",T);var A=function(e){return y.formatter?y.formatter.call(e,e):y.format?(e.text=a.defaultLabelFormatter.call(e,e),t.format(y.format,e,d)):a.defaultLabelFormatter.call(e,e)},P=A.call(T,T),O=i&&i.list;O?r.shortenLabel=function(){for(o=0;o0&&s+d*f>l&&(e=Math.round((n-s)/Math.cos(p*o))):(s-d*fl&&(v=l-t.x+v*d,y=-1),(v=Math.min(g,v))v||i.autoRotation&&(c.styles||{}).width)&&(e=v)),e&&(this.shortenLabel?this.shortenLabel():(m.width=Math.floor(e)+"px",(r.style||{}).textOverflow||(m.textOverflow="ellipsis"),c.css(m)))},e.prototype.moveLabel=function(t,e){var i,o=this,r=o.label,s=o.axis,n=!1;r&&r.textStr===t?(o.movedLabel=r,n=!0,delete o.label):d(s.ticks,function(e){n||e.isNew||e===o||!e.label||e.label.textStr!==t||(o.movedLabel=e.label,n=!0,e.labelPos=o.movedLabel.xy,delete e.label)}),!n&&(o.labelPos||r)&&(i=o.labelPos||r.xy,o.movedLabel=o.createLabel(i,t,e),o.movedLabel&&o.movedLabel.attr({opacity:0}))},e.prototype.render=function(t,e,i){var o=this.axis,r=o.horiz,s=this.pos,n=u(this.tickmarkOffset,o.tickmarkOffset),a=this.getPosition(r,s,n,e),h=a.x,c=a.y,p=r&&h===o.pos+o.len||!r&&c===o.pos?-1:1,d=u(i,this.label&&this.label.newOpacity,1);i=u(i,1),this.isActive=!0,this.renderGridLine(e,i,p),this.renderMark(a,i,p),this.renderLabel(a,e,d,t),this.isNew=!1,l(this,"afterRender")},e.prototype.renderGridLine=function(t,e,i){var o,r=this.axis,s=r.options,n={},a=this.pos,h=this.type,l=u(this.tickmarkOffset,r.tickmarkOffset),c=r.chart.renderer,p=this.gridLine,d=s.gridLineWidth,f=s.gridLineColor,g=s.gridLineDashStyle;"minor"===this.type&&(d=s.minorGridLineWidth,f=s.minorGridLineColor,g=s.minorGridLineDashStyle),p||(r.chart.styledMode||(n.stroke=f,n["stroke-width"]=d||0,n.dashstyle=g),h||(n.zIndex=1),t&&(e=0),this.gridLine=p=c.path().attr(n).addClass("highcharts-"+(h?h+"-":"")+"grid-line").add(r.gridGroup)),p&&(o=r.getPlotLinePath({value:a+l,lineWidth:p.strokeWidth()*i,force:"pass",old:t,acrossPanes:!1}))&&p[t||this.isNew?"attr":"animate"]({d:o,opacity:e})},e.prototype.renderMark=function(t,e,i){var o=this.axis,r=o.options,s=o.chart.renderer,n=this.type,a=o.tickSize(n?n+"Tick":"tick"),h=t.x,l=t.y,c=u(r["minor"!==n?"tickWidth":"minorTickWidth"],!n&&o.isXAxis?1:0),p=r["minor"!==n?"tickColor":"minorTickColor"],d=this.mark,f=!d;a&&(o.opposite&&(a[0]=-a[0]),d||(this.mark=d=s.path().addClass("highcharts-"+(n?n+"-":"")+"tick").add(o.axisGroup),o.chart.styledMode||d.attr({stroke:p,"stroke-width":c})),d[f?"attr":"animate"]({d:this.getMarkPath(h,l,a[0],d.strokeWidth()*i,o.horiz,s),opacity:e}))},e.prototype.renderLabel=function(t,e,i,o){var r=this.axis,s=r.horiz,n=r.options,a=this.label,h=n.labels,l=h.step,p=u(this.tickmarkOffset,r.tickmarkOffset),d=t.x,f=t.y,g=!0;a&&c(d)&&(a.xy=t=this.getLabelPosition(d,f,a,s,h,p,o,l),(!this.isFirst||this.isLast||n.showFirstLabel)&&(!this.isLast||this.isFirst||n.showLastLabel)?!s||h.step||h.rotation||e||0===i||this.handleOverflow(t):g=!1,l&&o%l&&(g=!1),g&&c(t.y)?(t.opacity=i,a[this.isNewLabel?"attr":"animate"](t).show(!0),this.isNewLabel=!1):(a.hide(),this.isNewLabel=!0))},e.prototype.replaceMovedLabel=function(){var t=this.label,e=this.axis;t&&!this.isNew&&(t.animate({opacity:0},void 0,t.destroy),delete this.label),e.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel},e}()}),i(e,"Core/Axis/Axis.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/AxisDefaults.js"],e["Core/Color/Color.js"],e["Core/Defaults.js"],e["Core/Foundation.js"],e["Core/Globals.js"],e["Core/Axis/Tick.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s,n,a){var h=t.animObject,l=o.defaultOptions,c=r.registerEventOptions,p=s.deg2rad,d=a.arrayMax,u=a.arrayMin,f=a.clamp,g=a.correctFloat,m=a.defined,v=a.destroyObjectProperties,y=a.erase,x=a.error,b=a.extend,M=a.fireEvent,C=a.getClosestDistance,S=a.insertItem,w=a.isArray,k=a.isNumber,T=a.isString,A=a.merge,P=a.normalizeTickInterval,O=a.objectEach,L=a.pick,j=a.relativeLength,E=a.removeEvent,D=a.splat,B=a.syncTimeout,I=function(t,e){return P(e,void 0,void 0,L(t.options.allowDecimals,e<.5||void 0!==t.tickAmount),!!t.tickAmount)};return function(){function t(t,e,i){this.alternateBands=void 0,this.bottom=void 0,this.chart=void 0,this.closestPointRange=void 0,this.coll=void 0,this.eventOptions=void 0,this.hasNames=void 0,this.hasVisibleSeries=void 0,this.height=void 0,this.index=void 0,this.isLinked=void 0,this.labelEdge=void 0,this.labelFormatter=void 0,this.left=void 0,this.len=void 0,this.max=void 0,this.maxLabelLength=void 0,this.min=void 0,this.minorTickInterval=void 0,this.minorTicks=void 0,this.minPixelPadding=void 0,this.names=void 0,this.offset=void 0,this.options=void 0,this.overlap=void 0,this.paddedTicks=void 0,this.plotLinesAndBands=void 0,this.plotLinesAndBandsGroups=void 0,this.pointRange=void 0,this.pointRangePadding=void 0,this.pos=void 0,this.positiveValuesOnly=void 0,this.right=void 0,this.series=void 0,this.side=void 0,this.tickAmount=void 0,this.tickInterval=void 0,this.tickmarkOffset=void 0,this.tickPositions=void 0,this.tickRotCorr=void 0,this.ticks=void 0,this.top=void 0,this.transA=void 0,this.transB=void 0,this.translationSlope=void 0,this.userOptions=void 0,this.visible=void 0,this.width=void 0,this.zoomEnabled=void 0,this.init(t,e,i)}return t.prototype.init=function(t,e,i){void 0===i&&(i=this.coll);var o="xAxis"===i;this.chart=t,this.horiz=this.isZAxis||(t.inverted?!o:o),this.isXAxis=o,this.coll=i,M(this,"init",{userOptions:e}),this.opposite=L(e.opposite,this.opposite),this.side=L(e.side,this.side,this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(e);var r=this.options,s=r.labels,n=r.type;this.userOptions=e,this.minPixelPadding=0,this.reversed=L(r.reversed,this.reversed),this.visible=r.visible,this.zoomEnabled=r.zoomEnabled,this.hasNames="category"===n||!0===r.categories,this.categories=r.categories||(this.hasNames?[]:void 0),this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=m(r.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=r.minRange||r.maxZoom,this.range=r.range,this.offset=r.offset||0,this.max=null,this.min=null;var a=L(r.crosshair,D(t.options.tooltip.crosshairs)[o?0:1]);this.crosshair=!0===a?{}:a,-1===t.axes.indexOf(this)&&(o?t.axes.splice(t.xAxis.length,0,this):t.axes.push(this),S(this,t[this.coll])),t.orderItems(this.coll),this.series=this.series||[],t.inverted&&!this.isZAxis&&o&&void 0===this.reversed&&(this.reversed=!0),this.labelRotation=k(s.rotation)?s.rotation:void 0,c(this,r),M(this,"afterInit")},t.prototype.setOptions=function(t){this.options=A(e.defaultXAxisOptions,"yAxis"===this.coll&&e.defaultYAxisOptions,[e.defaultTopAxisOptions,e.defaultRightAxisOptions,e.defaultBottomAxisOptions,e.defaultLeftAxisOptions][this.side],A(l[this.coll],t)),M(this,"afterSetOptions",{userOptions:t})},t.prototype.defaultLabelFormatter=function(t){var e,i,o=this.axis,r=this.chart.numberFormatter,s=k(this.value)?this.value:NaN,n=o.chart.time,a=o.categories,h=this.dateTimeLabelFormat,c=l.lang,p=c.numericSymbols,d=c.numericSymbolMagnitude||1e3,u=o.logarithmic?Math.abs(s):o.tickInterval,f=p&&p.length;if(a)i="".concat(this.value);else if(h)i=n.dateFormat(h,s);else if(f&&u>=1e3)for(;f--&&void 0===i;)u>=(e=Math.pow(d,f+1))&&10*s%e==0&&null!==p[f]&&0!==s&&(i=r(s/e,-1)+p[f]);return void 0===i&&(i=Math.abs(s)>=1e4?r(s,-1):r(s,-1,void 0,"")),i},t.prototype.getSeriesExtremes=function(){var t,e=this;e.chart,M(this,"getSeriesExtremes",null,function(){e.hasVisibleSeries=!1,e.dataMin=e.dataMax=e.threshold=null,e.softThreshold=!e.isXAxis,e.series.forEach(function(i){if(i.reserveSpace()){var o=i.options,r=void 0,s=o.threshold,n=void 0,a=void 0;if(e.hasVisibleSeries=!0,e.positiveValuesOnly&&s<=0&&(s=null),e.isXAxis)(r=i.xData)&&r.length&&(r=e.logarithmic?r.filter(function(t){return t>0}):r,n=(t=i.getXExtremes(r)).min,a=t.max,k(n)||n instanceof Date||(r=r.filter(k),n=(t=i.getXExtremes(r)).min,a=t.max),r.length&&(e.dataMin=Math.min(L(e.dataMin,n),n),e.dataMax=Math.max(L(e.dataMax,a),a)));else{var h=i.applyExtremes();k(h.dataMin)&&(n=h.dataMin,e.dataMin=Math.min(L(e.dataMin,n),n)),k(h.dataMax)&&(a=h.dataMax,e.dataMax=Math.max(L(e.dataMax,a),a)),m(s)&&(e.threshold=s),(!o.softThreshold||e.positiveValuesOnly)&&(e.softThreshold=!1)}}})}),M(this,"afterGetSeriesExtremes")},t.prototype.translate=function(t,e,i,o,r,s){var n=this.linkedParent||this,a=o&&n.old?n.old.min:n.min;if(!k(a))return NaN;var h=n.minPixelPadding,l=(n.isOrdinal||n.brokenAxis&&n.brokenAxis.hasBreaks||n.logarithmic&&r)&&n.lin2val,c=1,p=0,d=o&&n.old?n.old.transA:n.transA,u=0;if(d||(d=n.transA),i&&(c*=-1,p=n.len),n.reversed&&(c*=-1,p-=c*(n.sector||n.len)),e)u=(t=t*c+p-h)/d+a,l&&(u=n.lin2val(u));else{l&&(t=n.val2lin(t));var f=c*(t-a)*d;u=(n.isRadial?f:g(f))+p+c*h+(k(s)?d*s:0)}return u},t.prototype.toPixels=function(t,e){return this.translate(t,!1,!this.horiz,void 0,!0)+(e?0:this.pos)},t.prototype.toValue=function(t,e){return this.translate(t-(e?0:this.pos),!0,!this.horiz,void 0,!0)},t.prototype.getPlotLinePath=function(t){var e,i,o,r,s,n=this,a=n.chart,h=n.left,l=n.top,c=t.old,p=t.value,d=t.lineWidth,u=c&&a.oldChartHeight||a.chartHeight,g=c&&a.oldChartWidth||a.chartWidth,m=n.transB,v=t.translatedValue,y=t.force;function x(t,e,i){return"pass"!==y&&(ti)&&(y?t=f(t,e,i):s=!0),t}var b={value:p,lineWidth:d,old:c,force:y,acrossPanes:t.acrossPanes,translatedValue:v};return M(this,"getPlotLinePath",b,function(t){e=o=Math.round((v=f(v=L(v,n.translate(p,void 0,void 0,c)),-1e5,1e5))+m),i=r=Math.round(u-v-m),k(v)?n.horiz?(i=l,r=u-n.bottom,e=o=x(e,h,h+n.width)):(e=h,o=g-n.right,i=r=x(i,l,l+n.height)):(s=!0,y=!1),t.path=s&&!y?void 0:a.renderer.crispLine([["M",e,i],["L",o,r]],d||1)}),b.path||null},t.prototype.getLinearTickPositions=function(t,e,i){var o,r,s,n=g(Math.floor(e/t)*t),a=g(Math.ceil(i/t)*t),h=[];if(g(n+t)===n&&(s=20),this.single)return[e];for(o=n;o<=a&&(h.push(o),(o=g(o+t,s))!==r);)r=o;return h},t.prototype.getMinorTickInterval=function(){var t=this.options;return!0===t.minorTicks?L(t.minorTickInterval,"auto"):!1===t.minorTicks?null:t.minorTickInterval},t.prototype.getMinorTickPositions=function(){var t,e=this.options,i=this.tickPositions,o=this.minorTickInterval,r=this.pointRangePadding||0,s=this.min-r,n=this.max+r,a=n-s,h=[];if(a&&a/o=this.minRange,t=((s=this.minRange)-l+h)/2,o=[h-t,L(n.min,h-t)],e&&(o[2]=a?a.log2lin(this.dataMin):this.dataMin),r=[(h=d(o))+s,L(n.max,h+s)],e&&(r[2]=a?a.log2lin(this.dataMax):this.dataMax),(l=u(r))-h0&&(Object.keys(e.keys).forEach(function(t){delete e.keys[t]}),e.length=0,this.minRange=this.userMinRange,(this.series||[]).forEach(function(e){e.xIncrement=null,(!e.points||e.isDirtyData)&&(t.max=Math.max(t.max,e.xData.length-1),e.processData(),e.generatePoints()),e.data.forEach(function(i,o){var r;i&&i.options&&void 0!==i.name&&void 0!==(r=t.nameToX(i))&&r!==i.x&&(i.x=r,e.xData[o]=r)})}))},t.prototype.setAxisTranslation=function(){var t,e,i=this,o=i.max-i.min,r=i.linkedParent,s=!!i.categories,n=i.isXAxis,a=i.axisPointRange||0,h=0,l=0,c=i.transA;(n||s||a)&&(t=i.getClosest(),r?(h=r.minPointOffset,l=r.pointRangePadding):i.series.forEach(function(e){var o=s?1:n?L(e.options.pointRange,t,0):i.axisPointRange||0,r=e.options.pointPlacement;if(a=Math.max(a,o),!i.single||s){var c=e.is("xrange")?!n:n;h=Math.max(h,c&&T(r)?0:o/2),l=Math.max(l,c&&"on"===r?0:o)}}),e=i.ordinal&&i.ordinal.slope&&t?i.ordinal.slope/t:1,i.minPointOffset=h*=e,i.pointRangePadding=l*=e,i.pointRange=Math.min(a,i.single&&s?1:o),n&&t&&(i.closestPointRange=t)),i.translationSlope=i.transA=c=i.staticScale||i.len/(o+l||1),i.transB=i.horiz?i.left:i.bottom,i.minPixelPadding=c*h,M(this,"afterSetAxisTranslation")},t.prototype.minFromRange=function(){return this.max-this.range},t.prototype.setTickInterval=function(t){var e,i,o,r,s,n,a=this.chart,h=this.logarithmic,l=this.options,c=this.isXAxis,p=this.isLinked,d=l.tickPixelInterval,u=this.categories,f=this.softThreshold,v=l.maxPadding,y=l.minPadding,b=k(l.tickInterval)&&l.tickInterval>=0?l.tickInterval:void 0,C=k(this.threshold)?this.threshold:null;if(this.dateTime||u||p||this.getTickAmount(),s=L(this.userMin,l.min),n=L(this.userMax,l.max),p?(this.linkedParent=a[this.coll][l.linkedTo],i=this.linkedParent.getExtremes(),this.min=L(i.min,i.dataMin),this.max=L(i.max,i.dataMax),l.type!==this.linkedParent.options.type&&x(11,1,a)):(f&&m(C)&&(this.dataMin>=C?(o=C,y=0):this.dataMax<=C&&(r=C,v=0)),this.min=L(s,o,this.dataMin),this.max=L(n,r,this.dataMax)),h&&(this.positiveValuesOnly&&!t&&0>=Math.min(this.min,L(this.dataMin,this.min))&&x(10,1,a),this.min=g(h.log2lin(this.min),16),this.max=g(h.log2lin(this.max),16)),this.range&&m(this.max)&&(this.userMin=this.min=s=Math.max(this.dataMin,this.minFromRange()),this.userMax=n=this.max,this.range=null),M(this,"foundExtremes"),this.beforePadding&&this.beforePadding(),this.adjustForMinRange(),!k(this.userMin)&&k(l.softMin)&&l.softMinthis.max&&(this.max=n=l.softMax),!u&&!this.axisPointRange&&!(this.stacking&&this.stacking.usePercentage)&&!p&&m(this.min)&&m(this.max)&&(e=this.max-this.min)&&(!m(s)&&y&&(this.min-=e*y),!m(n)&&v&&(this.max+=e*v)),!k(this.userMin)&&k(l.floor)&&(this.min=Math.max(this.min,l.floor)),!k(this.userMax)&&k(l.ceiling)&&(this.max=Math.min(this.max,l.ceiling)),f&&m(this.dataMin)&&(C=C||0,!m(s)&&this.min=C?this.min=this.options.minRange?Math.min(C,this.max-this.minRange):C:!m(n)&&this.max>C&&this.dataMax<=C&&(this.max=this.options.minRange?Math.max(C,this.min+this.minRange):C)),k(this.min)&&k(this.max)&&!this.chart.polar&&this.min>this.max&&(m(this.options.min)?this.max=this.min:m(this.options.max)&&(this.min=this.max)),this.min===this.max||void 0===this.min||void 0===this.max?this.tickInterval=1:p&&this.linkedParent&&!b&&d===this.linkedParent.options.tickPixelInterval?this.tickInterval=b=this.linkedParent.tickInterval:this.tickInterval=L(b,this.tickAmount?(this.max-this.min)/Math.max(this.tickAmount-1,1):void 0,u?1:(this.max-this.min)*d/Math.max(this.len,d)),c&&!t){var S=this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max);this.series.forEach(function(t){t.forceCrop=t.forceCropping&&t.forceCropping(),t.processData(S)}),M(this,"postProcessData",{hasExtremesChanged:S})}this.setAxisTranslation(),M(this,"initialAxisTranslation"),this.pointRange&&!b&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval));var w=L(l.minTickInterval,this.dateTime&&!this.series.some(function(t){return t.noSharedTooltip})?this.closestPointRange:0);!b&&this.tickIntervalMath.max(2*this.len,200))l=[this.min,this.max],x(19,!1,this.chart);else if(this.dateTime)l=this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,e.units),this.min,this.max,e.startOfWeek,this.ordinal&&this.ordinal.positions,this.closestPointRange,!0);else if(this.logarithmic)l=this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max);else for(var c=this.tickInterval,p=c;p<=2*c;)if(l=this.getLinearTickPositions(this.tickInterval,this.min,this.max),this.tickAmount&&l.length>this.tickAmount)this.tickInterval=I(this,p*=1.1);else break;l.length>this.len&&(l=[l[0],l[l.length-1]])[0]===l[1]&&(l.length=1),o&&(this.tickPositions=l,(t=o.apply(this,[this.min,this.max]))&&(l=t))}this.tickPositions=l,this.paddedTicks=l.slice(0),this.trimTicks(l,a,h),!this.isLinked&&k(this.min)&&k(this.max)&&(this.single&&l.length<2&&!this.categories&&!this.series.some(function(t){return t.is("heatmap")&&"between"===t.options.pointPlacement})&&(this.min-=.5,this.max+=.5),i||t||this.adjustTickAmount()),M(this,"afterSetTickPositions")},t.prototype.trimTicks=function(t,e,i){var o=t[0],r=t[t.length-1],s=!this.isOrdinal&&this.minPointOffset||0;if(M(this,"trimTicks"),!this.isLinked){if(e&&o!==-1/0)this.min=o;else for(;this.min-s>t[0];)t.shift();if(i)this.max=r;else for(;this.max+s1?s.reduce(function(t,e){return t+e},0)/s.length:void 0;i.forEach(function(t){t.thresholdAlignment=h})}return t},t.prototype.getThresholdAlignment=function(t){if((!k(this.dataMin)||this!==t&&this.series.some(function(t){return t.isDirty||t.isDirtyData}))&&this.getSeriesExtremes(),k(this.threshold)){var e=f((this.threshold-(this.dataMin||0))/((this.dataMax||0)-(this.dataMin||0)),0,1);return this.options.reversed&&(e=1-e),e}},t.prototype.getTickAmount=function(){var t=this.options,e=t.tickPixelInterval,i=t.tickAmount;m(t.tickInterval)||i||!(this.lenn||h[h.length-1]o.threshold?v():f();if(u>8*o.tickInterval)break;u*=2}y()}else if(p0&&ea&&(e=a)),m(r)&&(sa&&(s=a))),i.displayBtn=void 0!==e||void 0!==s,i.setExtremes(e,s,!1,void 0,{trigger:"zoom"})),t.zoomed=!0}),h.zoomed},t.prototype.setAxisSize=function(){var t=this.chart,e=this.options,i=e.offsets||[0,0,0,0],o=this.horiz,r=this.width=Math.round(j(L(e.width,t.plotWidth-i[3]+i[1]),t.plotWidth)),s=this.height=Math.round(j(L(e.height,t.plotHeight-i[0]+i[2]),t.plotHeight)),n=this.top=Math.round(j(L(e.top,t.plotTop+i[0]),t.plotHeight,t.plotTop)),a=this.left=Math.round(j(L(e.left,t.plotLeft+i[3]),t.plotWidth,t.plotLeft));this.bottom=t.chartHeight-s-n,this.right=t.chartWidth-r-a,this.len=Math.max(o?r:s,0),this.pos=o?a:n},t.prototype.getExtremes=function(){var t=this.logarithmic;return{min:t?g(t.lin2log(this.min)):this.min,max:t?g(t.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},t.prototype.getThreshold=function(t){var e=this.logarithmic,i=e?e.lin2log(this.min):this.min,o=e?e.lin2log(this.max):this.max;return null===t||t===-1/0?t=i:t===1/0?t=o:i>t?t=i:o15&&e<165?t.align="right":e>195&&e<345&&(t.align="left")}),i.align},t.prototype.tickSize=function(t){var e,i=this.options,o=L(i["tick"===t?"tickWidth":"minorTickWidth"],"tick"===t&&this.isXAxis&&!this.categories?1:0),r=i["tick"===t?"tickLength":"minorTickLength"];o&&r&&("inside"===i[t+"Position"]&&(r=-r),e=[r,o]);var s={tickSize:e};return M(this,"afterTickSize",s),s.tickSize},t.prototype.labelMetrics=function(){var t=this.chart.renderer,e=this.ticks,i=e[Object.keys(e)[0]]||{};return this.chart.renderer.fontMetrics(i.label||i.movedLabel||t.box)},t.prototype.unsquish=function(){var t,e,i=this.options.labels,o=this.horiz,r=this.tickInterval,s=this.len/(((this.categories?1:0)+this.max-this.min)/r),n=i.rotation,a=.75*this.labelMetrics().h,h=Math.max(this.max-this.min,0),l=function(t){var e=t/(s||1);return(e=e>1?Math.ceil(e):1)*r>h&&t!==1/0&&s!==1/0&&h&&(e=Math.ceil(h/r)),g(e*r)},c=r,d=Number.MAX_VALUE;if(o){if(!i.staggerLines&&(k(n)?e=[n]:s=-90&&y<=90)&&(f=(u=l(Math.abs(a/Math.sin(p*y))))+Math.abs(y/360))m&&(m=e.label.textPxLength)}),this.maxLabelLength=m,this.autoRotation)m>d&&m>f.h?u.rotation=this.labelRotation:this.labelRotation=0;else if(p&&(t=d,!g))for(e="clip",o=n.length;!c&&o--;)(i=a[n[o]].label)&&(i.styles&&"ellipsis"===i.styles.textOverflow?i.css({textOverflow:"clip"}):i.textPxLength>p&&i.css({width:p+"px"}),i.getBBox().height>this.len/n.length-(f.h-f.f)&&(i.specificTextOverflow="ellipsis"));u.rotation&&(t=m>.5*r.chartHeight?.33*r.chartHeight:m,g||(e="ellipsis")),this.labelAlign=h.align||this.autoLabelAlign(this.labelRotation),this.labelAlign&&(u.align=this.labelAlign),n.forEach(function(i){var o=a[i],r=o&&o.label,s=l.width,n={};r&&(r.attr(u),o.shortenLabel?o.shortenLabel():t&&!s&&"nowrap"!==l.whiteSpace&&(t=this.min&&t<=this.max||this.grid&&this.grid.isColumn)&&(r[t]||(r[t]=new n(this,t)),i&&r[t].isNew&&r[t].render(e,!0,-1),r[t].render(e))},t.prototype.render=function(){var t,e,i=this,o=i.chart,r=i.logarithmic,a=o.renderer,l=i.options,c=i.isLinked,p=i.tickPositions,d=i.axisTitle,u=i.ticks,f=i.minorTicks,g=i.alternateBands,m=l.stackLabels,v=l.alternateGridColor,y=l.crossing,x=i.tickmarkOffset,b=i.axisLine,C=i.showAxis,S=h(a.globalAnimation);if(i.labelEdge.length=0,i.overlap=!1,[u,f,g].forEach(function(t){O(t,function(t){t.isActive=!1})}),k(y)){var w=this.isXAxis?o.yAxis[0]:o.xAxis[0],T=[1,-1,-1,1][this.side];if(w){var A=w.toPixels(y,!0);i.horiz&&(A=w.len-A),i.offset=T*A}}if(i.hasData()||c){var P=i.chart.hasRendered&&i.old&&k(i.old.min);i.minorTickInterval&&!i.categories&&i.getMinorTickPositions().forEach(function(t){i.renderMinorTick(t,P)}),p.length&&(p.forEach(function(t,e){i.renderTick(t,e,P)}),x&&(0===i.min||i.single)&&(u[-1]||(u[-1]=new n(i,-1,null,!0)),u[-1].render(-1))),v&&p.forEach(function(n,a){e=void 0!==p[a+1]?p[a+1]+x:i.max-x,a%2==0&&n=.5)t=Math.round(t),l=n.getLinearTickPositions(t,e,i);else if(t>=.08){var c=Math.floor(e),p=void 0,d=void 0,u=void 0,f=void 0,g=void 0,m=void 0,v=void 0;for(p=t>.3?[1,2,4]:t>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9],d=c;de&&(!s||m<=i)&&void 0!==m&&l.push(m),m>i&&(v=!0),m=g}else{var y=this.lin2log(e),x=this.lin2log(i),b=s?n.getMinorTickInterval():h.tickInterval,M="auto"===b?null:b,C=h.tickPixelInterval/(s?5:1),S=s?a/n.tickPositions.length:a;t=o(t=r(M,this.minorAutoInterval,(x-y)*C/(S||1))),l=n.getLinearTickPositions(t,y,x).map(this.log2lin),s||(this.minorAutoInterval=t/5)}return s||(n.tickInterval=t),l},t.prototype.lin2log=function(t){return Math.pow(10,t)},t.prototype.log2lin=function(t){return Math.log(t)/Math.LN10},t}();e.Additions=h}(e||(e={})),e}),i(e,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[e["Core/Utilities.js"]],function(t){var e,i=t.erase,o=t.extend,r=t.isNumber;return function(e){var s,n=[];function a(t){return this.addPlotBandOrLine(t,"plotBands")}function h(t,e){var i=this,o=this.userOptions,r=new s(this,t);if(this.visible&&(r=r.render()),r){if(this._addedPlotLB||(this._addedPlotLB=!0,(o.plotLines||[]).concat(o.plotBands||[]).forEach(function(t){i.addPlotBandOrLine(t)})),e){var n=o[e]||[];n.push(t),o[e]=n}this.plotLinesAndBands.push(r)}return r}function l(t){return this.addPlotBandOrLine(t,"plotLines")}function c(t,e,i){i=i||this.options;var o,s,n=this.getPlotLinePath({value:e,force:!0,acrossPanes:i.acrossPanes}),a=[],h=this.horiz,l=!r(this.min)||!r(this.max)||tthis.max&&e>this.max,c=this.getPlotLinePath({value:t,force:!0,acrossPanes:i.acrossPanes}),p=1;if(c&&n)for(l&&(s=c.toString()===n.toString(),p=0),o=0;o0&&i.height>0&&!C.isFlat?(m=h({align:o&&S&&"center",x:o?!S&&4:10,verticalAlign:!o&&S&&"middle",y:o?S?16:10:S?6:-4,rotation:o&&!S&&90},m),this.renderLabel(m,C,S,d)):v&&v.hide(),e},e.prototype.renderLabel=function(t,e,r,s){var n=this.axis,a=n.chart.renderer,l=this.label;l||(this.label=l=a.text(this.getLabelText(t),0,0,t.useHTML).attr({align:t.textAlign||t.align,rotation:t.rotation,class:"highcharts-plot-"+(r?"band":"line")+"-label "+(t.className||""),zIndex:s}),n.chart.styledMode||l.css(h({fontSize:"0.8em",textOverflow:"ellipsis"},t.style)),l.add());var c=e.xBounds||[e[0][1],e[1][1],r?e[2][1]:e[0][1]],p=e.yBounds||[e[0][2],e[1][2],r?e[2][2]:e[0][2]],d=o(c),u=o(p);if(l.align(t,!1,{x:d,y:u,width:i(c)-d,height:i(p)-u}),!l.alignValue||"left"===l.alignValue){var f=t.clip?n.width:n.chart.chartWidth;l.css({width:(90===l.rotation?n.height-(l.alignAttr.y-n.top):f-(l.alignAttr.x-n.left))+"px"})}l.show(!0)},e.prototype.getLabelText=function(t){return r(t.formatter)?t.formatter.call(this):t.text},e.prototype.destroy=function(){n(this.axis.plotLinesAndBands,this),delete this.axis,s(this)},e}()}),i(e,"Core/Tooltip.js",[e["Core/Templating.js"],e["Core/Globals.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,o,r){var s,n,a=t.format,h=e.doc,l=e.isSafari,c=i.distribute,p=r.addEvent,d=r.clamp,u=r.css,f=r.discardElement,g=r.extend,m=r.fireEvent,v=r.isArray,y=r.isNumber,x=r.isString,b=r.merge,M=r.pick,C=r.splat,S=r.syncTimeout,w=function(){function t(t,e){this.allowShared=!0,this.crosshairs=[],this.distance=0,this.isHidden=!0,this.isSticky=!1,this.now={},this.options={},this.outside=!1,this.chart=t,this.init(t,e)}return t.prototype.bodyFormatter=function(t){return t.map(function(t){var e=t.series.tooltipOptions;return(e[(t.point.formatPrefix||"point")+"Formatter"]||t.point.tooltipFormatter).call(t.point,e[(t.point.formatPrefix||"point")+"Format"]||"")})},t.prototype.cleanSplit=function(t){this.chart.series.forEach(function(e){var i=e&&e.tt;i&&(!i.isActive||t?e.tt=i.destroy():i.isActive=!1)})},t.prototype.defaultFormatter=function(t){var e,i=this.points||C(this);return(e=(e=[t.tooltipFooterHeaderFormatter(i[0])]).concat(t.bodyFormatter(i))).push(t.tooltipFooterHeaderFormatter(i[0],!0)),e},t.prototype.destroy=function(){this.label&&(this.label=this.label.destroy()),this.split&&(this.cleanSplit(!0),this.tt&&(this.tt=this.tt.destroy())),this.renderer&&(this.renderer=this.renderer.destroy(),f(this.container)),r.clearTimeout(this.hideTimer),r.clearTimeout(this.tooltipTimeout)},t.prototype.getAnchor=function(t,e){var i,o=this.chart,r=o.pointer,s=o.inverted,n=o.plotTop,a=o.plotLeft;if((t=C(t))[0].series&&t[0].series.yAxis&&!t[0].series.yAxis.options.reversedStacks&&(t=t.slice().reverse()),this.followPointer&&e)void 0===e.chartX&&(e=r.normalize(e)),i=[e.chartX-a,e.chartY-n];else if(t[0].tooltipPos)i=t[0].tooltipPos;else{var h=0,l=0;t.forEach(function(t){var e=t.pos(!0);e&&(h+=e[0],l+=e[1])}),h/=t.length,l/=t.length,this.shared&&t.length>1&&e&&(s?h=e.chartX:l=e.chartY),i=[h-a,l-n]}return i.map(Math.round)},t.prototype.getClassName=function(t,e,i){var o=this.options,r=t.series,s=r.options;return[o.className,"highcharts-label",i&&"highcharts-tooltip-header",e?"highcharts-tooltip-box":"highcharts-tooltip",!i&&"highcharts-color-"+M(t.colorIndex,r.colorIndex),s&&s.className].filter(x).join(" ")},t.prototype.getLabel=function(){var t=this,i=this.chart.styledMode,r=this.options,s=this.split&&this.allowShared,n=this.container,a=this.chart.renderer;if(this.label){var h=!this.label.hasClass("highcharts-label");(!s&&h||s&&!h)&&this.destroy()}if(!this.label){if(this.outside){var l=this.chart.options.chart.style,c=o.getRendererType();this.container=n=e.doc.createElement("div"),n.className="highcharts-tooltip-container",u(n,{position:"absolute",top:"1px",pointerEvents:"none",zIndex:Math.max(this.options.style.zIndex||0,(l&&l.zIndex||0)+3)}),this.renderer=a=new c(n,0,0,l,void 0,void 0,a.styledMode)}if(s?this.label=a.g("tooltip"):(this.label=a.label("",0,0,r.shape,void 0,void 0,r.useHTML,void 0,"tooltip").attr({padding:r.padding,r:r.borderRadius}),i||this.label.attr({fill:r.backgroundColor,"stroke-width":r.borderWidth||0}).css(r.style).css({pointerEvents:r.style.pointerEvents||(this.shouldStickOnContact()?"auto":"none")})),t.outside){var p=this.label,d=p.xSetter,f=p.ySetter;p.xSetter=function(e){d.call(p,t.distance),n&&(n.style.left=e+"px")},p.ySetter=function(e){f.call(p,t.distance),n&&(n.style.top=e+"px")}}this.label.attr({zIndex:8}).shadow(r.shadow).add()}return n&&!n.parentElement&&e.doc.body.appendChild(n),this.label},t.prototype.getPlayingField=function(){var t=h.body,e=h.documentElement,i=this.chart,o=this.distance,r=this.outside;return{width:r?Math.max(t.scrollWidth,e.scrollWidth,t.offsetWidth,e.offsetWidth,e.clientWidth)-2*o:i.chartWidth,height:r?Math.max(t.scrollHeight,e.scrollHeight,t.offsetHeight,e.offsetHeight,e.clientHeight):i.chartHeight}},t.prototype.getPosition=function(t,e,i){var o,r=this.chart,s=this.distance,n={},a=r.inverted&&i.h||0,h=this.outside,l=this.getPlayingField(),c=l.width,p=l.height,d=r.pointer.getChartPosition(),u=function(t){return t*d.scaleX},f=function(t){return t*d.scaleY},g=function(o){var n="x"===o;return[o,n?c:p,n?t:e].concat(h?[n?u(t):f(e),n?d.left-s+u(i.plotX+r.plotLeft):d.top-s+f(i.plotY+r.plotTop),0,n?c:p]:[n?t:e,n?i.plotX+r.plotLeft:i.plotY+r.plotTop,n?r.plotLeft:r.plotTop,n?r.plotLeft+r.plotWidth:r.plotTop+r.plotHeight])},m=g("y"),v=g("x"),y=!!i.negative;!r.polar&&r.hoverSeries&&r.hoverSeries.yAxis&&r.hoverSeries.yAxis.reversed&&(y=!y);var x=!this.followPointer&&M(i.ttBelow,!r.inverted===y),b=function(t,e,i,o,r,l,c){var p=h?"y"===t?f(s):u(s):s,d=(i-o)/2,g=oe?y:y+a)}},C=function(t,e,i,o,r){var a;return re-s?a=!1:re-o/2?n[t]=e-o-2:n[t]=r-i/2,a},S=function(t){var e=m;m=v,v=e,o=t},w=function(){!1!==b.apply(0,m)?!1!==C.apply(0,v)||o||(S(!0),w()):o?n.x=n.y=0:(S(!0),w())};return(r.inverted||this.len>1)&&S(),w(),n},t.prototype.hide=function(t){var e=this;r.clearTimeout(this.hideTimer),t=M(t,this.options.hideDelay),this.isHidden||(this.hideTimer=S(function(){var i=e.getLabel();e.getLabel().animate({opacity:0},{duration:t?150:t,complete:function(){i.hide(),e.container&&e.container.remove()}}),e.isHidden=!0},t))},t.prototype.init=function(t,e){this.chart=t,this.options=e,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.split=e.split&&!t.inverted&&!t.polar,this.shared=e.shared||this.split,this.outside=M(e.outside,!!(t.scrollablePixelsX||t.scrollablePixelsY))},t.prototype.shouldStickOnContact=function(t){return!!(!this.followPointer&&this.options.stickOnContact&&(!t||this.chart.pointer.inClass(t.target,"highcharts-tooltip")))},t.prototype.move=function(t,e,i,o){var s=this,n=s.now,a=!1!==s.options.animation&&!s.isHidden&&(Math.abs(t-n.x)>1||Math.abs(e-n.y)>1),h=s.followPointer||s.len>1;g(n,{x:a?(2*n.x+t)/3:t,y:a?(n.y+e)/2:e,anchorX:h?void 0:a?(2*n.anchorX+i)/3:i,anchorY:h?void 0:a?(n.anchorY+o)/2:o}),s.getLabel().attr(n),s.drawTracker(),a&&(r.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){s&&s.move(t,e,i,o)},32))},t.prototype.refresh=function(t,e){var i=this.chart,o=this.options,s=i.pointer,n=C(t),h=n[0],l=[],c=o.format,p=o.formatter||this.defaultFormatter,d=this.shared,u=i.styledMode,f={};if(o.enabled&&h.series){r.clearTimeout(this.hideTimer),this.allowShared=!(!v(t)&&t.series&&t.series.noSharedTooltip),this.followPointer=!this.split&&h.series.tooltipOptions.followPointer;var g=this.getAnchor(t,e),y=g[0],b=g[1];d&&this.allowShared?(s.applyInactiveState(n),n.forEach(function(t){t.setState("hover"),l.push(t.getLabelConfig())}),(f=h.getLabelConfig()).points=l):f=h.getLabelConfig(),this.len=l.length;var S=x(c)?a(c,f,i):p.call(f,this),w=h.series;if(this.distance=M(w.tooltipOptions.distance,16),!1===S)this.hide();else{if(this.split&&this.allowShared)this.renderSplit(S,n);else{var k=y,T=b;if(e&&s.isDirectTouch&&(k=e.chartX-i.plotLeft,T=e.chartY-i.plotTop),i.polar||!1===w.options.clip||n.some(function(t){return s.isDirectTouch||t.series.shouldShowTooltip(k,T)})){var A=this.getLabel();(!o.style.width||u)&&A.css({width:(this.outside?this.getPlayingField():i.spacingBox).width+"px"}),A.attr({text:S&&S.join?S.join(""):S}),A.addClass(this.getClassName(h),!0),u||A.attr({stroke:o.borderColor||h.color||w.color||"#666666"}),this.updatePosition({plotX:y,plotY:b,negative:h.negative,ttBelow:h.ttBelow,h:g[2]||0})}else{this.hide();return}}this.isHidden&&this.label&&this.label.attr({opacity:1}).show(),this.isHidden=!1}m(this,"refresh")}},t.prototype.renderSplit=function(t,e){var i=this,o=i.chart,r=i.chart,s=r.chartWidth,n=r.chartHeight,a=r.plotHeight,p=r.plotLeft,u=r.plotTop,f=r.pointer,m=r.scrollablePixelsY,v=r.scrollablePixelsX,y=r.scrollingContainer,b=void 0===y?{scrollLeft:0,scrollTop:0}:y,C=b.scrollLeft,S=b.scrollTop,w=r.styledMode,k=i.distance,T=i.options,A=i.options.positioner,P=i.outside&&"number"!=typeof v?h.documentElement.getBoundingClientRect():{left:C,right:C+s,top:S,bottom:S+n},O=i.getLabel(),L=this.renderer||o.renderer,j=!!(o.xAxis[0]&&o.xAxis[0].opposite),E=f.getChartPosition(),D=E.left,B=E.top,I=u+S,z=0,R=a-(void 0===m?0:m);function N(t,e,o,r,s){var n,a;return void 0===s&&(s=!0),o?(n=j?0:R,a=d(t-r/2,P.left,P.right-r-(i.outside?D:0))):(n=e-I,a=d(a=s?t-r-k:t+k,s?a:P.left,P.right)),{x:a,y:n}}x(t)&&(t=[!1,t]);var W=t.slice(0,e.length+1).reduce(function(t,o,r){if(!1!==o&&""!==o){var s=e[r-1]||{isHeader:!0,plotX:e[0].plotX,plotY:a,series:{}},n=s.isHeader,h=n?i:s.series,l=h.tt=function(t,e,o){var r,s=t,n=e.isHeader,a=e.series;if(!s){var h={padding:T.padding,r:T.borderRadius};w||(h.fill=T.backgroundColor,h["stroke-width"]=null!==(r=T.borderWidth)&&void 0!==r?r:1),s=L.label("",0,0,T[n?"headerShape":"shape"],void 0,void 0,T.useHTML).addClass(i.getClassName(e,!0,n)).attr(h).add(O)}return s.isActive=!0,s.attr({text:o}),w||s.css(T.style).attr({stroke:T.borderColor||e.color||a.color||"#333333"}),s}(h.tt,s,o.toString()),c=l.getBBox(),f=c.width+l.strokeWidth();n&&(z=c.height,R+=z,j&&(I-=z));var g=function(t){var e,i,o=t.isHeader,r=t.plotX,s=void 0===r?0:r,n=t.plotY,h=void 0===n?0:n,l=t.series;if(o)e=Math.max(p+s,p),i=u+a/2;else{var c=l.xAxis,f=l.yAxis;e=c.pos+d(s,-k,c.len+k),l.shouldShowTooltip(0,f.pos-u+h,{ignoreX:!0})&&(i=f.pos+h)}return{anchorX:e=d(e,P.left-k,P.right+k),anchorY:i}}(s),m=g.anchorX,v=g.anchorY;if("number"==typeof v){var y=c.height+1,x=A?A.call(i,f,y,s):N(m,v,n,f);t.push({align:A?0:void 0,anchorX:m,anchorY:v,boxWidth:f,point:s,rank:M(x.rank,n?1:0),size:y,target:x.y,tt:l,x:x.x})}else l.isActive=!1}return t},[]);!A&&W.some(function(t){var e=(i.outside?D:0)+t.anchorX;return ee})&&(W=W.map(function(t){var e=N(t.anchorX,t.anchorY,t.point.isHeader,t.boxWidth,!1),i=e.x;return g(t,{target:e.y,x:i})})),i.cleanSplit(),c(W,R);var _={left:D,right:D};W.forEach(function(t){var e=t.x,o=t.boxWidth,r=t.isHeader;!r&&(i.outside&&D+e<_.left&&(_.left=D+e),!r&&i.outside&&_.left+o>_.right&&(_.right=D+e))}),W.forEach(function(t){var e=t.x,o=t.anchorX,r=t.anchorY,s=t.pos,n=t.point.isHeader,a={visibility:void 0===s?"hidden":"inherit",x:e,y:(s||0)+I,anchorX:o,anchorY:r};if(i.outside&&e0&&(n||(a.x=e+h,a.anchorX=o+h),n&&(a.x=(_.right-_.left)/2,a.anchorX=o+h))}t.tt.attr(a)});var X=i.container,G=i.outside,H=i.renderer;if(G&&X&&H){var U=O.getBBox(),Y=U.width,F=U.height,V=U.x,Z=U.y;H.setSize(Y+V,F+Z,!1),X.style.left=_.left+"px",X.style.top=B+"px"}l&&O.attr({opacity:1===O.opacity?.999:1})},t.prototype.drawTracker=function(){if(!this.shouldStickOnContact()){this.tracker&&(this.tracker=this.tracker.destroy());return}var t=this.chart,e=this.label,i=this.shared?t.hoverPoints:t.hoverPoint;if(e&&i){var o={x:0,y:0,width:0,height:0},r=this.getAnchor(i),s=e.getBBox();r[0]+=t.plotLeft-(e.translateX||0),r[1]+=t.plotTop-(e.translateY||0),o.x=Math.min(0,r[0]),o.y=Math.min(0,r[1]),o.width=r[0]<0?Math.max(Math.abs(r[0]),s.width-r[0]):Math.max(Math.abs(r[0]),s.width),o.height=r[1]<0?Math.max(Math.abs(r[1]),s.height-Math.abs(r[1])):Math.max(Math.abs(r[1]),s.height),this.tracker?this.tracker.attr(o):(this.tracker=e.renderer.rect(o).addClass("highcharts-tracker").add(e),t.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}},t.prototype.styledModeFormat=function(t){return t.replace('style="font-size: 0.8em"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex} {series.options.className} {point.options.className}"')},t.prototype.tooltipFooterHeaderFormatter=function(t,e){var i=t.series,o=i.tooltipOptions,r=i.xAxis,s=r&&r.dateTime,n={isFooter:e,labelConfig:t},h=o.xDateFormat,l=o[e?"footerFormat":"headerFormat"];return m(this,"headerFormatter",n,function(e){s&&!h&&y(t.key)&&(h=s.getXDateFormat(t.key,o.dateTimeLabelFormats)),s&&h&&(t.point&&t.point.tooltipDateKeys||["key"]).forEach(function(t){l=l.replace("{point."+t+"}","{point."+t+":"+h+"}")}),i.chart.styledMode&&(l=this.styledModeFormat(l)),e.text=a(l,{point:t,series:i},this.chart)}),n.text},t.prototype.update=function(t){this.destroy(),this.init(this.chart,b(!0,this.options,t))},t.prototype.updatePosition=function(t){var e,i=this.chart,o=this.container,r=this.distance,s=this.options,n=this.renderer,a=this.getLabel(),h=a.height,l=void 0===h?0:h,c=a.width,p=void 0===c?0:c,d=i.pointer.getChartPosition(),f=d.left,g=d.top,m=d.scaleX,v=d.scaleY,y=(s.positioner||this.getPosition).call(this,p,l,t),x=(t.plotX||0)+i.plotLeft,b=(t.plotY||0)+i.plotTop;n&&o&&(s.positioner&&(y.x+=f-r,y.y+=g-r),e=(s.borderWidth||0)+2*r+2,n.setSize(p+e,l+e,!1),(1!==m||1!==v)&&(u(o,{transform:"scale(".concat(m,", ").concat(v,")")}),x*=m,b*=v),x+=f-y.x,b+=g-y.y),this.move(Math.round(y.x),Math.round(y.y||0),x,b)},t}();return n=[],(s=w||(w={})).compose=function(t){r.pushUnique(n,t)&&p(t,"afterInit",function(){var t=this.chart;t.options.tooltip&&(t.tooltip=new s(t,t.options.tooltip))})},w}),i(e,"Core/Series/Point.js",[e["Core/Renderer/HTML/AST.js"],e["Core/Animation/AnimationUtilities.js"],e["Core/Defaults.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],function(t,e,i,o,r){var s=e.animObject,n=i.defaultOptions,a=o.format,h=r.addEvent,l=r.defined,c=r.erase,p=r.extend,d=r.fireEvent,u=r.getNestedProperty,f=r.isArray,g=r.isFunction,m=r.isNumber,v=r.isObject,y=r.merge,x=r.objectEach,b=r.pick,M=r.syncTimeout,C=r.removeEvent,S=r.uniqueKey;return function(){function e(){this.category=void 0,this.destroyed=!1,this.formatPrefix="point",this.id=void 0,this.isNull=!1,this.name=void 0,this.options=void 0,this.percentage=void 0,this.selected=!1,this.series=void 0,this.shapeArgs=void 0,this.total=void 0,this.visible=!0,this.x=void 0}return e.prototype.animateBeforeDestroy=function(){var t=this,e={x:t.startXPos,opacity:0},i=t.getGraphicalProps();i.singular.forEach(function(i){t[i]=t[i].animate("dataLabel"===i?{x:t[i].startXPos,y:t[i].startYPos,opacity:0}:e)}),i.plural.forEach(function(e){t[e].forEach(function(e){e.element&&e.animate(p({x:t.startXPos},e.startYPos?{x:e.startXPos,y:e.startYPos}:{}))})})},e.prototype.applyOptions=function(t,i){var o=this.series,r=o.options.pointValKey||o.pointValKey;return p(this,t=e.prototype.optionsToObject.call(this,t)),this.options=this.options?p(this.options,t):t,t.group&&delete this.group,t.dataLabels&&delete this.dataLabels,r&&(this.y=e.prototype.getNestedProperty.call(this,r)),this.selected&&(this.state="select"),"name"in this&&void 0===i&&o.xAxis&&o.xAxis.hasNames&&(this.x=o.xAxis.nameToX(this)),void 0===this.x&&o?void 0===i?this.x=o.autoIncrement():this.x=i:m(t.x)&&o.options.relativeXValue&&(this.x=o.autoIncrement(t.x)),this.isNull=this.isValid&&!this.isValid(),this.formatPrefix=this.isNull?"null":"point",this},e.prototype.destroy=function(){if(!this.destroyed){var t=this,e=t.series,i=e.chart,o=e.options.dataSorting,r=i.hoverPoints,n=s(t.series.chart.renderer.globalAnimation),a=function(){for(var e in(t.graphic||t.graphics||t.dataLabel||t.dataLabels)&&(C(t),t.destroyElements()),t)delete t[e]};t.legendItem&&i.legend.destroyItem(t),r&&(t.setState(),c(r,t),r.length||(i.hoverPoints=null)),t===i.hoverPoint&&t.onMouseOut(),o&&o.enabled?(this.animateBeforeDestroy(),M(a,n.duration)):a(),i.pointCount--}this.destroyed=!0},e.prototype.destroyElements=function(t){var e=this,i=e.getGraphicalProps(t);i.singular.forEach(function(t){e[t]=e[t].destroy()}),i.plural.forEach(function(t){e[t].forEach(function(t){t&&t.element&&t.destroy()}),delete e[t]})},e.prototype.firePointEvent=function(t,e,i){var o=this,r=this.series.options;(r.point.events[t]||o.options&&o.options.events&&o.options.events[t])&&o.importEvents(),"click"===t&&r.allowPointSelect&&(i=function(t){!o.destroyed&&o.select&&o.select(null,t.ctrlKey||t.metaKey||t.shiftKey)}),d(o,t,e,i)},e.prototype.getClassName=function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},e.prototype.getGraphicalProps=function(t){var e,i,o=this,r=[],s={singular:[],plural:[]};for((t=t||{graphic:1,dataLabel:1}).graphic&&r.push("graphic","connector"),t.dataLabel&&r.push("dataLabel","dataLabelPath","dataLabelUpper"),i=r.length;i--;)o[e=r[i]]&&s.singular.push(e);return["graphic","dataLabel"].forEach(function(e){var i=e+"s";t[e]&&o[i]&&s.plural.push(i)}),s},e.prototype.getLabelConfig=function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},e.prototype.getNestedProperty=function(t){return t?0===t.indexOf("custom.")?u(t,this.options):this[t]:void 0},e.prototype.getZone=function(){var t,e=this.series,i=e.zones,o=e.zoneAxis||"y",r=0;for(t=i[0];this[o]>=t.value;)t=i[++r];return this.nonZonedColor||(this.nonZonedColor=this.color),t&&t.color&&!this.options.color?this.color=t.color:this.color=this.nonZonedColor,t},e.prototype.hasNewShapeType=function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType},e.prototype.init=function(t,e,i){return this.series=t,this.applyOptions(e,i),this.id=l(this.id)?this.id:S(),this.resolveColor(),t.chart.pointCount++,d(this,"afterInit"),this},e.prototype.isValid=function(){return(m(this.x)||this.x instanceof Date)&&m(this.y)},e.prototype.optionsToObject=function(t){var i,o=this.series,r=o.options.keys,s=r||o.pointArrayMap||["y"],n=s.length,a={},h=0,l=0;if(m(t)||null===t)a[s[0]]=t;else if(f(t))for(!r&&t.length>n&&("string"==(i=typeof t[0])?a.name=t[0]:"number"===i&&(a.x=t[0]),h++);l0?e.prototype.setNestedProperty(a,t[h],s[l]):a[s[l]]=t[h]),h++,l++;else"object"==typeof t&&(a=t,t.dataLabels&&(o.hasDataLabels=function(){return!0}),t.marker&&(o._hasPointMarkers=!0));return a},e.prototype.pos=function(t,e){if(void 0===e&&(e=this.plotY),!this.destroyed){var i=this.plotX,o=this.series,r=o.chart,s=o.xAxis,n=o.yAxis,a=0,h=0;if(m(i)&&m(e))return t&&(a=s?s.pos:r.plotLeft,h=n?n.pos:r.plotTop),r.inverted&&s&&n?[n.len-e+h,s.len-i+a]:[i+a,e+h]}},e.prototype.resolveColor=function(){var t,e,i,o=this.series,r=o.chart.options.chart,s=o.chart.styledMode,n=r.colorCount;delete this.nonZonedColor,o.options.colorByPoint?(s||(t=(e=o.options.colors||o.chart.options.colors)[o.colorCounter],n=e.length),i=o.colorCounter,o.colorCounter++,o.colorCounter===n&&(o.colorCounter=0)):(s||(t=o.color),i=o.colorIndex),this.colorIndex=b(this.options.colorIndex,i),this.color=b(this.options.color,t)},e.prototype.setNestedProperty=function(t,e,i){return i.split(".").reduce(function(t,i,o,r){var s=r.length-1===o;return t[i]=s?e:v(t[i],!0)?t[i]:{},t[i]},t),t},e.prototype.shouldDraw=function(){return!this.isNull},e.prototype.tooltipFormatter=function(t){var e=this.series,i=e.tooltipOptions,o=b(i.valueDecimals,""),r=i.valuePrefix||"",s=i.valueSuffix||"";return e.chart.styledMode&&(t=e.chart.tooltip.styledModeFormat(t)),(e.pointArrayMap||["y"]).forEach(function(e){e="{point."+e,(r||s)&&(t=t.replace(RegExp(e+"}","g"),r+e+"}"+s)),t=t.replace(RegExp(e+"}","g"),e+":,."+o+"f}")}),a(t,{point:this,series:this.series},e.chart)},e.prototype.update=function(t,e,i,o){var r,s=this,n=s.series,a=s.graphic,h=n.chart,l=n.options;function c(){s.applyOptions(t);var o=a&&s.hasMockGraphic,c=null===s.y?!o:o;a&&c&&(s.graphic=a.destroy(),delete s.hasMockGraphic),v(t,!0)&&(a&&a.element&&t&&t.marker&&void 0!==t.marker.symbol&&(s.graphic=a.destroy()),(null==t?void 0:t.dataLabels)&&s.dataLabel&&(s.dataLabel=s.dataLabel.destroy())),r=s.index,n.updateParallelArrays(s,r),l.data[r]=v(l.data[r],!0)||v(t,!0)?s.options:b(t,l.data[r]),n.isDirty=n.isDirtyData=!0,!n.fixedBox&&n.hasCartesianSeries&&(h.isDirtyBox=!0),"point"===l.legendType&&(h.isDirtyLegend=!0),e&&h.redraw(i)}e=b(e,!0),!1===o?c():s.firePointEvent("update",{options:t},c)},e.prototype.remove=function(t,e){this.series.removePoint(this.series.data.indexOf(this),t,e)},e.prototype.select=function(t,e){var i=this,o=i.series,r=o.chart;t=b(t,!i.selected),this.selectedStaging=t,i.firePointEvent(t?"select":"unselect",{accumulate:e},function(){i.selected=i.options.selected=t,o.options.data[o.data.indexOf(i)]=i.options,i.setState(t&&"select"),e||r.getSelectedPoints().forEach(function(t){var e=t.series;t.selected&&t!==i&&(t.selected=t.options.selected=!1,e.options.data[e.data.indexOf(t)]=t.options,t.setState(r.hoverPoints&&e.options.inactiveOtherPoints?"inactive":""),t.firePointEvent("unselect"))})}),delete this.selectedStaging},e.prototype.onMouseOver=function(t){var e=this.series.chart,i=e.pointer;t=t?i.normalize(t):i.getChartCoordinatesFromPoint(this,e.inverted),i.runPointActions(t,this)},e.prototype.onMouseOut=function(){var t=this.series.chart;this.firePointEvent("mouseOut"),this.series.options.inactiveOtherPoints||(t.hoverPoints||[]).forEach(function(t){t.setState()}),t.hoverPoints=t.hoverPoint=null},e.prototype.importEvents=function(){if(!this.hasImportedEvents){var t=this,e=y(t.series.options.point,t.options).events;t.events=e,x(e,function(e,i){g(e)&&h(t,i,e)}),this.hasImportedEvents=!0}},e.prototype.setState=function(e,i){var o,r,s,a,h=this.series,l=this.state,c=h.options.states[e||"normal"]||{},u=n.plotOptions[h.type].marker&&h.options.marker,f=u&&!1===u.enabled,g=u&&u.states&&u.states[e||"normal"]||{},v=!1===g.enabled,y=this.marker||{},x=h.chart,M=u&&h.markerAttribs,C=h.halo,S=h.stateMarkerGraphic;if(((e=e||"")!==this.state||i)&&(!this.selected||"select"===e)&&!1!==c.enabled&&(!e||!v&&(!f||!1!==g.enabled))&&(!e||!y.states||!y.states[e]||!1!==y.states[e].enabled)){if(this.state=e,M&&(o=h.markerAttribs(this,e)),this.graphic&&!this.hasMockGraphic){if(l&&this.graphic.removeClass("highcharts-point-"+l),e&&this.graphic.addClass("highcharts-point-"+e),!x.styledMode){r=h.pointAttribs(this,e),s=b(x.options.chart.animation,c.animation);var w=r.opacity;h.options.inactiveOtherPoints&&m(w)&&(this.dataLabels||[]).forEach(function(t){t&&!t.hasClass("highcharts-data-label-hidden")&&(t.animate({opacity:w},s),t.connector&&t.connector.animate({opacity:w},s))}),this.graphic.animate(r,s)}o&&this.graphic.animate(o,b(x.options.chart.animation,g.animation,u.animation)),S&&S.hide()}else e&&g&&(a=y.symbol||h.symbol,S&&S.currentSymbol!==a&&(S=S.destroy()),o&&(S?S[i?"animate":"attr"]({x:o.x,y:o.y}):a&&(h.stateMarkerGraphic=S=x.renderer.symbol(a,o.x,o.y,o.width,o.height).add(h.markerGroup),S.currentSymbol=a)),!x.styledMode&&S&&"inactive"!==this.state&&S.attr(h.pointAttribs(this,e))),S&&(S[e&&this.isInside?"show":"hide"](),S.element.point=this,S.addClass(this.getClassName(),!0));var k=c.halo,T=this.graphic||S,A=T&&T.visibility||"inherit";k&&k.size&&T&&"hidden"!==A&&!this.isCluster?(C||(h.halo=C=x.renderer.path().add(T.parentGroup)),C.show()[i?"animate":"attr"]({d:this.haloPath(k.size)}),C.attr({class:"highcharts-halo highcharts-color-"+b(this.colorIndex,h.colorIndex)+(this.className?" "+this.className:""),visibility:A,zIndex:-1}),C.point=this,x.styledMode||C.attr(p({fill:this.color||h.color,"fill-opacity":k.opacity},t.filterUserAttributes(k.attributes||{})))):C&&C.point&&C.point.haloPath&&C.animate({d:C.point.haloPath(0)},null,C.hide),d(this,"afterSetState",{state:e})}},e.prototype.haloPath=function(t){var e=this.pos();return e?this.series.chart.renderer.symbols.circle(Math.floor(e[0])-t,e[1]-t,2*t,2*t):[]},e}()}),i(e,"Core/Pointer.js",[e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r,s,n=t.parse,a=e.charts,h=e.noop,l=i.addEvent,c=i.attr,p=i.css,d=i.defined,u=i.extend,f=i.find,g=i.fireEvent,m=i.isNumber,v=i.isObject,y=i.objectEach,x=i.offset,b=i.pick,M=i.splat,C=function(){function t(t,e){this.lastValidTouch={},this.pinchDown=[],this.runChartClick=!1,this.eventsToUnbind=[],this.chart=t,this.hasDragged=!1,this.options=e,this.init(t,e)}return t.prototype.applyInactiveState=function(t){var e,i=[];(t||[]).forEach(function(t){e=t.series,i.push(e),e.linkedParent&&i.push(e.linkedParent),e.linkedSeries&&(i=i.concat(e.linkedSeries)),e.navigatorSeries&&i.push(e.navigatorSeries)}),this.chart.series.forEach(function(t){-1===i.indexOf(t)?t.setState("inactive",!0):t.options.inactiveOtherPoints&&t.setAllPointsToState("inactive")})},t.prototype.destroy=function(){var i=this;this.eventsToUnbind.forEach(function(t){return t()}),this.eventsToUnbind=[],!e.chartCount&&(t.unbindDocumentMouseUp&&(t.unbindDocumentMouseUp=t.unbindDocumentMouseUp()),t.unbindDocumentTouchEnd&&(t.unbindDocumentTouchEnd=t.unbindDocumentTouchEnd())),clearInterval(i.tooltipTimeout),y(i,function(t,e){i[e]=void 0})},t.prototype.getSelectionMarkerAttrs=function(t,e){var i=this,o={args:{chartX:t,chartY:e},attrs:{},shapeType:"rect"};return g(this,"getSelectionMarkerAttrs",o,function(o){var r,s=i.chart,n=i.mouseDownX,a=void 0===n?0:n,h=i.mouseDownY,l=void 0===h?0:h,c=i.zoomHor,p=i.zoomVert,d=o.attrs;d.x=s.plotLeft,d.y=s.plotTop,d.width=c?1:s.plotWidth,d.height=p?1:s.plotHeight,c&&(r=t-a,d.width=Math.abs(r),d.x=(r>0?0:r)+a),p&&(r=e-l,d.height=Math.abs(r),d.y=(r>0?0:r)+l)}),o},t.prototype.drag=function(t){var e,i=this.chart,o=i.options.chart,r=i.plotLeft,s=i.plotTop,a=i.plotWidth,h=i.plotHeight,l=this.mouseDownX||0,c=this.mouseDownY||0,p=v(o.panning)?o.panning&&o.panning.enabled:o.panning,d=o.panKey&&t[o.panKey+"Key"],u=t.chartX,f=t.chartY,g=this.selectionMarker;if((!g||!g.touch)&&(ur+a&&(u=r+a),fs+h&&(f=s+h),this.hasDragged=Math.sqrt(Math.pow(l-u,2)+Math.pow(c-f,2)),this.hasDragged>10)){e=i.isInsidePlot(l-r,c-s,{visiblePlotOnly:!0});var m=this.getSelectionMarkerAttrs(u,f),y=m.shapeType,x=m.attrs;(i.hasCartesianSeries||i.mapView)&&(this.zoomX||this.zoomY)&&e&&!d&&!g&&(this.selectionMarker=g=i.renderer[y](),g.attr({class:"highcharts-selection-marker",zIndex:7}).add(),i.styledMode||g.attr({fill:o.selectionMarkerFill||n("#334eff").setOpacity(.25).get()})),g&&g.attr(x),e&&!g&&p&&i.pan(t,o.panning)}},t.prototype.dragStart=function(t){var e=this.chart;e.mouseIsDown=t.type,e.cancelClick=!1,e.mouseDownX=this.mouseDownX=t.chartX,e.mouseDownY=this.mouseDownY=t.chartY},t.prototype.getSelectionBox=function(t){var e={args:{marker:t},result:{}};return g(this,"getSelectionBox",e,function(e){e.result={x:t.attr?+t.attr("x"):t.x,y:t.attr?+t.attr("y"):t.y,width:t.attr?t.attr("width"):t.width,height:t.attr?t.attr("height"):t.height}}),e.result},t.prototype.drop=function(t){var e=this,i=this.chart,o=this.hasPinched;if(this.selectionMarker){var r=this.getSelectionBox(this.selectionMarker),s=r.x,n=r.y,a=r.width,h=r.height,l={originalEvent:t,xAxis:[],yAxis:[],x:s,y:n,width:a,height:h},c=!!i.mapView;(this.hasDragged||o)&&(i.axes.forEach(function(i){if(i.zoomEnabled&&d(i.min)&&(o||e[({xAxis:"zoomX",yAxis:"zoomY"})[i.coll]])&&m(s)&&m(n)&&m(a)&&m(h)){var r=i.horiz,p="touchend"===t.type?i.minPixelPadding:0,u=i.toValue((r?s:n)+p),f=i.toValue((r?s+a:n+h)-p);l[i.coll].push({axis:i,min:Math.min(u,f),max:Math.max(u,f)}),c=!0}}),c&&g(i,"selection",l,function(t){i.zoom(u(t,o?{animation:!1}:null))})),m(i.index)&&(this.selectionMarker=this.selectionMarker.destroy()),o&&this.scaleGroups()}i&&m(i.index)&&(p(i.container,{cursor:i._cursor}),i.cancelClick=+this.hasDragged>10,i.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},t.prototype.findNearestKDPoint=function(t,e,i){var o;return t.forEach(function(t){var r,s,n,a,h=!(t.noSharedTooltip&&e)&&0>t.options.findNearestPointBy.indexOf("y"),l=t.searchPoint(i,h);v(l,!0)&&l.series&&(!v(o,!0)||(s=(r=o).distX-l.distX,n=r.dist-l.dist,a=(l.series.group&&l.series.group.zIndex)-(r.series.group&&r.series.group.zIndex),(0!==s&&e?s:0!==n?n:0!==a?a:r.series.index>l.series.index?-1:1)>0))&&(o=l)}),o},t.prototype.getChartCoordinatesFromPoint=function(t,e){var i=t.series,o=i.xAxis,r=i.yAxis,s=t.shapeArgs;if(o&&r){var n=b(t.clientX,t.plotX),a=t.plotY||0;return t.isNode&&s&&m(s.x)&&m(s.y)&&(n=s.x,a=s.y),e?{chartX:r.len+r.pos-a,chartY:o.len+o.pos-n}:{chartX:n+o.pos,chartY:a+r.pos}}if(s&&s.x&&s.y)return{chartX:s.x,chartY:s.y}},t.prototype.getChartPosition=function(){if(this.chartPosition)return this.chartPosition;var t=this.chart.container,e=x(t);this.chartPosition={left:e.left,top:e.top,scaleX:1,scaleY:1};var i=t.offsetWidth,o=t.offsetHeight;return i>2&&o>2&&(this.chartPosition.scaleX=e.width/i,this.chartPosition.scaleY=e.height/o),this.chartPosition},t.prototype.getCoordinates=function(t){var e={xAxis:[],yAxis:[]};return this.chart.axes.forEach(function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},t.prototype.getHoverData=function(t,e,i,o,r,s){var n,a=[],h=function(t){return t.visible&&!(!r&&t.directTouch)&&b(t.options.enableMouseTracking,!0)},l=e,c={chartX:s?s.chartX:void 0,chartY:s?s.chartY:void 0,shared:r};g(this,"beforeGetHoverData",c),n=l&&!l.stickyTracking?[l]:i.filter(function(t){return t.stickyTracking&&(c.filter||h)(t)});var p=o&&t||!s?t:this.findNearestKDPoint(n,r,s);return l=p&&p.series,p&&(r&&!l.noSharedTooltip?(n=i.filter(function(t){return c.filter?c.filter(t):h(t)&&!t.noSharedTooltip})).forEach(function(t){var e=f(t.points,function(t){return t.x===p.x&&!t.isNull});v(e)&&(t.boosted&&t.boost&&(e=t.boost.getPoint(e)),a.push(e))}):a.push(p)),g(this,"afterGetHoverData",c={hoverPoint:p}),{hoverPoint:c.hoverPoint,hoverSeries:l,hoverPoints:a}},t.prototype.getPointFromEvent=function(t){for(var e,i=t.target;i&&!e;)e=i.point,i=i.parentNode;return e},t.prototype.onTrackerMouseOut=function(t){var e=this.chart,i=t.relatedTarget,o=e.hoverSeries;this.isDirectTouch=!1,!o||!i||o.stickyTracking||this.inClass(i,"highcharts-tooltip")||this.inClass(i,"highcharts-series-"+o.index)&&this.inClass(i,"highcharts-tracker")||o.onMouseOut()},t.prototype.inClass=function(t,e){for(var i,o=t;o;){if(i=c(o,"class")){if(-1!==i.indexOf(e))return!0;if(-1!==i.indexOf("highcharts-container"))return!1}o=o.parentElement}},t.prototype.init=function(t,e){this.options=e,this.chart=t,this.runChartClick=!!(e.chart.events&&e.chart.events.click),this.pinchDown=[],this.lastValidTouch={},this.setDOMEvents(),g(this,"afterInit")},t.prototype.normalize=function(t,e){var i=t.touches,o=i?i.length?i.item(0):b(i.changedTouches,t.changedTouches)[0]:t;e||(e=this.getChartPosition());var r=o.pageX-e.left,s=o.pageY-e.top;return u(t,{chartX:Math.round(r/=e.scaleX),chartY:Math.round(s/=e.scaleY)})},t.prototype.onContainerClick=function(t){var e=this.chart,i=e.hoverPoint,o=this.normalize(t),r=e.plotLeft,s=e.plotTop;!e.cancelClick&&(i&&this.inClass(o.target,"highcharts-tracker")?(g(i.series,"click",u(o,{point:i})),e.hoverPoint&&i.firePointEvent("click",o)):(u(o,this.getCoordinates(o)),e.isInsidePlot(o.chartX-r,o.chartY-s,{visiblePlotOnly:!0})&&g(e,"click",o)))},t.prototype.onContainerMouseDown=function(t){var i=(1&(t.buttons||t.button))==1;t=this.normalize(t),e.isFirefox&&0!==t.button&&this.onContainerMouseMove(t),(void 0===t.button||i)&&(this.zoomOption(t),i&&t.preventDefault&&t.preventDefault(),this.dragStart(t))},t.prototype.onContainerMouseLeave=function(e){var i=a[b(t.hoverChartIndex,-1)];e=this.normalize(e),this.onContainerMouseMove(e),i&&e.relatedTarget&&!this.inClass(e.relatedTarget,"highcharts-tooltip")&&(i.pointer.reset(),i.pointer.chartPosition=void 0)},t.prototype.onContainerMouseEnter=function(t){delete this.chartPosition},t.prototype.onContainerMouseMove=function(t){var e=this.chart,i=e.tooltip,o=this.normalize(t);this.setHoverChartIndex(t),("mousedown"===e.mouseIsDown||this.touchSelect(o))&&this.drag(o),!e.openMenu&&(this.inClass(o.target,"highcharts-tracker")||e.isInsidePlot(o.chartX-e.plotLeft,o.chartY-e.plotTop,{visiblePlotOnly:!0}))&&!(i&&i.shouldStickOnContact(o))&&(this.inClass(o.target,"highcharts-no-tooltip")?this.reset(!1,0):this.runPointActions(o))},t.prototype.onDocumentTouchEnd=function(e){var i=a[b(t.hoverChartIndex,-1)];i&&i.pointer.drop(e)},t.prototype.onContainerTouchMove=function(t){this.touchSelect(t)?this.onContainerMouseMove(t):this.touch(t)},t.prototype.onContainerTouchStart=function(t){this.touchSelect(t)?this.onContainerMouseDown(t):(this.zoomOption(t),this.touch(t,!0))},t.prototype.onDocumentMouseMove=function(t){var e=this.chart,i=e.tooltip,o=this.chartPosition,r=this.normalize(t,o);!o||e.isInsidePlot(r.chartX-e.plotLeft,r.chartY-e.plotTop,{visiblePlotOnly:!0})||i&&i.shouldStickOnContact(r)||this.inClass(r.target,"highcharts-tracker")||this.reset()},t.prototype.onDocumentMouseUp=function(e){var i=a[b(t.hoverChartIndex,-1)];i&&i.pointer.drop(e)},t.prototype.pinch=function(t){var e=this,i=e.chart,o=e.pinchDown,r=t.touches||[],s=r.length,n=e.lastValidTouch,a=e.hasZoom,l={},c=1===s&&(e.inClass(t.target,"highcharts-tracker")&&i.runTrackerClick||e.runChartClick),p={},d=e.chart.tooltip,f=1===s&&b(d&&d.options.followTouchMove,!0),m=e.selectionMarker;s>1?e.initiated=!0:f&&(e.initiated=!1),a&&e.initiated&&!c&&!1!==t.cancelable&&t.preventDefault(),[].map.call(r,function(t){return e.normalize(t)}),"touchstart"===t.type?([].forEach.call(r,function(t,e){o[e]={chartX:t.chartX,chartY:t.chartY}}),n.x=[o[0].chartX,o[1]&&o[1].chartX],n.y=[o[0].chartY,o[1]&&o[1].chartY],i.axes.forEach(function(t){if(t.zoomEnabled){var e=i.bounds[t.horiz?"h":"v"],o=t.minPixelPadding,r=t.toPixels(Math.min(b(t.options.min,t.dataMin),t.dataMin)),s=t.toPixels(Math.max(b(t.options.max,t.dataMax),t.dataMax)),n=Math.min(r,s),a=Math.max(r,s);e.min=Math.min(t.pos,n-o),e.max=Math.max(t.pos+t.len,a+o)}}),e.res=!0):f?this.runPointActions(e.normalize(t)):o.length&&(g(i,"touchpan",{originalEvent:t},function(){m||(e.selectionMarker=m=u({destroy:h,touch:!0},i.plotBox)),e.pinchTranslate(o,r,l,m,p,n),e.hasPinched=a,e.scaleGroups(l,p)}),e.res&&(e.res=!1,this.reset(!1,0)))},t.prototype.pinchTranslate=function(t,e,i,o,r,s){this.zoomHor&&this.pinchTranslateDirection(!0,t,e,i,o,r,s),this.zoomVert&&this.pinchTranslateDirection(!1,t,e,i,o,r,s)},t.prototype.pinchTranslateDirection=function(t,e,i,o,r,s,n,a){var h,l,c,p,d=this.chart,u=t?"x":"y",f=t?"X":"Y",g="chart"+f,m=t?"width":"height",v=d["plot"+(t?"Left":"Top")],y=d.inverted,x=d.bounds[t?"h":"v"],b=1===e.length,M=e[0][g],C=!b&&e[1][g],S=function(){"number"==typeof T&&Math.abs(M-C)>20&&(w=a||Math.abs(k-T)/Math.abs(M-C)),c=(v-k)/w+M,h=d["plot"+(t?"Width":"Height")]/w},w=a||1,k=i[0][g],T=!b&&i[1][g];S(),(l=c)x.max&&(l=x.max-h,p=!0),p?(k-=.8*(k-n[u][0]),"number"==typeof T&&(T-=.8*(T-n[u][1])),S()):n[u]=[k,T],y||(s[u]=c-v,s[m]=h);var A=y?t?"scaleY":"scaleX":"scale"+f,P=y?1/w:w;r[m]=h,r[u]=l,o[A]=w*(y&&!t?-1:1),o["translate"+f]=P*v+(k-P*M)},t.prototype.reset=function(t,e){var i=this.chart,o=i.hoverSeries,r=i.hoverPoint,s=i.hoverPoints,n=i.tooltip,a=n&&n.shared?s:r;t&&a&&M(a).forEach(function(e){e.series.isCartesian&&void 0===e.plotX&&(t=!1)}),t?n&&a&&M(a).length&&(n.refresh(a),n.shared&&s?s.forEach(function(t){t.setState(t.state,!0),t.series.isCartesian&&(t.series.xAxis.crosshair&&t.series.xAxis.drawCrosshair(null,t),t.series.yAxis.crosshair&&t.series.yAxis.drawCrosshair(null,t))}):r&&(r.setState(r.state,!0),i.axes.forEach(function(t){t.crosshair&&r.series[t.coll]===t&&t.drawCrosshair(null,r)}))):(r&&r.onMouseOut(),s&&s.forEach(function(t){t.setState()}),o&&o.onMouseOut(),n&&n.hide(e),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),i.axes.forEach(function(t){t.hideCrosshair()}),this.hoverX=i.hoverPoints=i.hoverPoint=null)},t.prototype.runPointActions=function(e,i,o){var r=this.chart,s=r.series,n=r.tooltip&&r.tooltip.options.enabled?r.tooltip:void 0,h=!!n&&n.shared,c=i||r.hoverPoint,p=c&&c.series||r.hoverSeries,d=(!e||"touchmove"!==e.type)&&(!!i||p&&p.directTouch&&this.isDirectTouch),u=this.getHoverData(c,p,s,d,h,e);c=u.hoverPoint,p=u.hoverSeries;var g=u.hoverPoints,m=p&&p.tooltipOptions.followPointer&&!p.tooltipOptions.split,v=h&&p&&!p.noSharedTooltip;if(c&&(o||c!==r.hoverPoint||n&&n.isHidden)){if((r.hoverPoints||[]).forEach(function(t){-1===g.indexOf(t)&&t.setState()}),r.hoverSeries!==p&&p.onMouseOver(),this.applyInactiveState(g),(g||[]).forEach(function(t){t.setState("hover")}),r.hoverPoint&&r.hoverPoint.firePointEvent("mouseOut"),!c.series)return;r.hoverPoints=g,r.hoverPoint=c,c.firePointEvent("mouseOver",void 0,function(){n&&c&&n.refresh(v?g:c,e)})}else if(m&&n&&!n.isHidden){var y=n.getAnchor([{}],e);r.isInsidePlot(y[0],y[1],{visiblePlotOnly:!0})&&n.updatePosition({plotX:y[0],plotY:y[1]})}this.unDocMouseMove||(this.unDocMouseMove=l(r.container.ownerDocument,"mousemove",function(e){var i=a[t.hoverChartIndex];i&&i.pointer.onDocumentMouseMove(e)}),this.eventsToUnbind.push(this.unDocMouseMove)),r.axes.forEach(function(t){var i,o=b((t.crosshair||{}).snap,!0);!o||(i=r.hoverPoint)&&i.series[t.coll]===t||(i=f(g,function(e){return e.series&&e.series[t.coll]===t})),i||!o?t.drawCrosshair(e,i):t.hideCrosshair()})},t.prototype.scaleGroups=function(t,e){var i=this.chart;i.series.forEach(function(o){var r=t||o.getPlotBox("series");o.group&&(o.xAxis&&o.xAxis.zoomEnabled||i.mapView)&&(o.group.attr(r),o.markerGroup&&(o.markerGroup.attr(t||o.getPlotBox("marker")),o.markerGroup.clip(e?i.clipRect:null)),o.dataLabelsGroup&&o.dataLabelsGroup.attr(r))}),i.clipRect.attr(e||i.clipBox)},t.prototype.setDOMEvents=function(){var i=this,o=this.chart.container,r=o.ownerDocument;o.onmousedown=this.onContainerMouseDown.bind(this),o.onmousemove=this.onContainerMouseMove.bind(this),o.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(l(o,"mouseenter",this.onContainerMouseEnter.bind(this))),this.eventsToUnbind.push(l(o,"mouseleave",this.onContainerMouseLeave.bind(this))),t.unbindDocumentMouseUp||(t.unbindDocumentMouseUp=l(r,"mouseup",this.onDocumentMouseUp.bind(this)));for(var s=this.chart.renderTo.parentElement;s&&"BODY"!==s.tagName;)this.eventsToUnbind.push(l(s,"scroll",function(){delete i.chartPosition})),s=s.parentElement;e.hasTouch&&(this.eventsToUnbind.push(l(o,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1})),this.eventsToUnbind.push(l(o,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),t.unbindDocumentTouchEnd||(t.unbindDocumentTouchEnd=l(r,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})))},t.prototype.setHoverChartIndex=function(i){var o=this.chart,r=e.charts[b(t.hoverChartIndex,-1)];r&&r!==o&&r.pointer.onContainerMouseLeave(i||{relatedTarget:o.container}),r&&r.mouseIsDown||(t.hoverChartIndex=o.index)},t.prototype.touch=function(t,e){var i,o,r=this.chart;this.setHoverChartIndex(),1===t.touches.length?(t=this.normalize(t),r.isInsidePlot(t.chartX-r.plotLeft,t.chartY-r.plotTop,{visiblePlotOnly:!0})&&!r.openMenu?(e&&this.runPointActions(t),"touchmove"===t.type&&(i=!!(o=this.pinchDown)[0]&&Math.sqrt(Math.pow(o[0].chartX-t.chartX,2)+Math.pow(o[0].chartY-t.chartY,2))>=4),b(i,!0)&&this.pinch(t)):e&&this.reset()):2===t.touches.length&&this.pinch(t)},t.prototype.touchSelect=function(t){return!!(this.chart.zooming.singleTouch&&t.touches&&1===t.touches.length)},t.prototype.zoomOption=function(t){var e,i,o=this.chart,r=(o.options.chart,o.inverted),s=o.zooming.type||"";/touch/.test(t.type)&&(s=b(o.zooming.pinchType,s)),this.zoomX=e=/x/.test(s),this.zoomY=i=/y/.test(s),this.zoomHor=e&&!r||i&&r,this.zoomVert=i&&!r||e&&r,this.hasZoom=e||i},t}();return r=[],s=[],(o=C||(C={})).compose=function(t){i.pushUnique(s,t)&&l(t,"beforeRender",function(){this.pointer=new o(this,this.options)})},o.dissolve=function(){for(var t=0,e=r.length;tt-6&&s1.5*S?b.height:S))},t.prototype.layoutItem=function(t){var e=this.options,i=this.padding,o="horizontal"===e.layout,r=t.itemHeight,s=this.itemMarginBottom,n=this.itemMarginTop,a=o?C(e.itemDistance,20):0,h=this.maxLegendWidth,l=e.alignColumns&&this.totalItemWidth>h?this.maxItemWidth:t.itemWidth,c=t.legendItem||{};o&&this.itemX-i+l>h&&(this.itemX=i,this.lastLineHeight&&(this.itemY+=n+this.lastLineHeight+s),this.lastLineHeight=0),this.lastItemY=n+this.itemY+s,this.lastLineHeight=Math.max(r,this.lastLineHeight),c.x=this.itemX,c.y=this.itemY,o?this.itemX+=l:(this.itemY+=n+r+s,this.lastLineHeight=r),this.offsetWidth=this.widthOption||Math.max((o?this.itemX-i-(t.checkbox?0:a):l)+i,this.offsetWidth)},t.prototype.getAllItems=function(){var t=[];return this.chart.series.forEach(function(e){var i=e&&e.options;e&&C(i.showInLegend,!m(i.linkedTo)&&void 0,!0)&&(t=t.concat((e.legendItem||{}).labels||("point"===i.legendType?e.data:e)))}),x(this,"afterGetAllItems",{allItems:t}),t},t.prototype.getAlignment=function(){var t=this.options;return this.proximate?t.align.charAt(0)+"tv":t.floating?"":t.align.charAt(0)+t.verticalAlign.charAt(0)+t.layout.charAt(0)},t.prototype.adjustMargins=function(t,e){var i=this.chart,o=this.options,r=this.getAlignment();r&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(s,n){s.test(r)&&!m(t[n])&&(i[p[n]]=Math.max(i[p[n]],i.legend[(n+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][n]*o[n%2?"x":"y"]+C(o.margin,12)+e[n]+(i.titleOffset[n]||0)))})},t.prototype.proximatePositions=function(){var t,e=this.chart,i=[],o="left"===this.options.align;this.allItems.forEach(function(t){var r,s,n,a,h=o;t.yAxis&&(t.xAxis.options.reversed&&(h=!h),t.points&&(r=y(h?t.points:t.points.slice(0).reverse(),function(t){return b(t.plotY)})),s=this.itemMarginTop+t.legendItem.label.getBBox().height+this.itemMarginBottom,a=t.yAxis.top-e.plotTop,n=t.visible?(r?r.plotY:t.yAxis.height)+(a-.3*s):a+t.yAxis.height,i.push({target:n,size:s,item:t}))},this);for(var r=0,s=d(i,e.plotHeight);r-1&&(o/=2),this.maxLegendWidth=this.widthOption||o,l||(this.group=l=s.g("legend").addClass(n.className||"").attr({zIndex:7}).add(),this.contentGroup=s.g().attr({zIndex:1}).add(l),this.scrollGroup=s.g().add(this.contentGroup)),this.renderTitle(),w(h,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),n.reversed&&h.reverse(),this.allItems=h,this.display=t=!!h.length,this.lastLineHeight=0,this.maxItemWidth=0,this.totalItemWidth=0,this.itemHeight=0,h.forEach(this.renderItem,this),h.forEach(this.layoutItem,this),e=(this.widthOption||this.offsetWidth)+a,i=this.lastItemY+this.lastLineHeight+this.titleHeight,i=this.handleOverflow(i)+a,c||(this.box=c=s.rect().addClass("highcharts-legend-box").attr({r:n.borderRadius}).add(l)),r.styledMode||c.attr({stroke:n.borderColor,"stroke-width":n.borderWidth||0,fill:n.backgroundColor||"none"}).shadow(n.shadow),e>0&&i>0&&c[c.placed?"animate":"attr"](c.crisp.call({},{x:0,y:0,width:e,height:i},c.strokeWidth())),l[t?"show":"hide"](),r.styledMode&&"none"===l.getStyle("display")&&(e=i=0),this.legendWidth=e,this.legendHeight=i,t&&this.align(),this.proximate||this.positionItems(),x(this,"afterRender")},t.prototype.align=function(t){void 0===t&&(t=this.chart.spacingBox);var e=this.chart,i=this.options,o=t.y;/(lth|ct|rth)/.test(this.getAlignment())&&e.titleOffset[0]>0?o+=e.titleOffset[0]:/(lbh|cb|rbh)/.test(this.getAlignment())&&e.titleOffset[2]>0&&(o-=e.titleOffset[2]),o!==t.y&&(t=M(t,{y:o})),e.hasRendered||(this.group.placed=!1),this.group.align(M(i,{width:this.legendWidth,height:this.legendHeight,verticalAlign:this.proximate?"top":i.verticalAlign}),!0,t)},t.prototype.handleOverflow=function(t){var e,i,o,r=this,s=this.chart,n=s.renderer,a=this.options,h=a.y,l="top"===a.verticalAlign,c=this.padding,p=a.maxHeight,d=a.navigation,u=C(d.animation,!0),f=d.arrowSize||12,g=this.pages,m=this.allItems,v=function(t){"number"==typeof t?M.attr({height:t}):M&&(r.clipRect=M.destroy(),r.contentGroup.clip()),r.contentGroup.div&&(r.contentGroup.div.style.clip=t?"rect("+c+"px,9999px,"+(c+t)+"px,0)":"auto")},y=function(t){return r[t]=n.circle(0,0,1.3*f).translate(f/2,f/2).add(b),s.styledMode||r[t].attr("fill","rgba(0,0,0,0.0001)"),r[t]},x=s.spacingBox.height+(l?-h:h)-c,b=this.nav,M=this.clipRect;return"horizontal"!==a.layout||"middle"===a.verticalAlign||a.floating||(x/=2),p&&(x=Math.min(x,p)),g.length=0,t&&x>0&&t>x&&!1!==d.enabled?(this.clipHeight=e=Math.max(x-20-this.titleHeight-c,0),this.currentPage=C(this.currentPage,1),this.fullHeight=t,m.forEach(function(t,r){var s=(o=t.legendItem||{}).y||0,n=Math.round(o.label.getBBox().height),a=g.length;(!a||s-g[a-1]>e&&(i||s)!==g[a-1])&&(g.push(i||s),a++),o.pageIx=a-1,i&&((m[r-1].legendItem||{}).pageIx=a-1),r===m.length-1&&s+n-g[a-1]>e&&s>g[a-1]&&(g.push(s),o.pageIx=a),s!==i&&(i=s)}),M||(M=r.clipRect=n.clipRect(0,c-2,9999,0),r.contentGroup.clip(M)),v(e),b||(this.nav=b=n.g().attr({zIndex:1}).add(this.group),this.up=n.symbol("triangle",0,0,f,f).add(b),y("upTracker").on("click",function(){r.scroll(-1,u)}),this.pager=n.text("",15,10).addClass("highcharts-legend-navigation"),!s.styledMode&&d.style&&this.pager.css(d.style),this.pager.add(b),this.down=n.symbol("triangle-down",0,0,f,f).add(b),y("downTracker").on("click",function(){r.scroll(1,u)})),r.scroll(0),t=x):b&&(v(),this.nav=b.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},t.prototype.scroll=function(t,e){var i=this,o=this.chart,r=this.pages,s=r.length,n=this.clipHeight,a=this.options.navigation,c=this.pager,p=this.padding,d=this.currentPage+t;d>s&&(d=s),d>0&&(void 0!==e&&l(e,o),this.nav.attr({translateX:p,translateY:n+this.padding+7+this.titleHeight,visibility:"inherit"}),[this.up,this.upTracker].forEach(function(t){t.attr({class:1===d?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})}),c.attr({text:d+"/"+s}),[this.down,this.downTracker].forEach(function(t){t.attr({x:18+this.pager.getBBox().width,class:d===s?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"})},this),o.styledMode||(this.up.attr({fill:1===d?a.inactiveColor:a.activeColor}),this.upTracker.css({cursor:1===d?"default":"pointer"}),this.down.attr({fill:d===s?a.inactiveColor:a.activeColor}),this.downTracker.css({cursor:d===s?"default":"pointer"})),this.scrollOffset=-r[d-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=d,this.positionCheckboxes(),k(function(){x(i,"afterScroll",{currentPage:d})},h(C(e,o.renderer.globalAnimation,!0)).duration))},t.prototype.setItemEvents=function(t,e,i){for(var r=this,s=t.legendItem||{},n=r.chart.renderer.boxWrapper,a=t instanceof o,h="highcharts-legend-"+(a?"point":"series")+"-active",l=r.chart.styledMode,c=i?[e,s.symbol]:[s.group],p=function(e){r.allItems.forEach(function(i){t!==i&&[i].concat(i.linkedSeries||[]).forEach(function(t){t.setState(e,!a)})})},d=0;d0},t.prototype.hasMarkerChanged=function(t,e){var i=t.marker,o=e.marker||{};return i&&(o.enabled&&!i.enabled||o.symbol!==i.symbol||o.height!==i.height||o.width!==i.width)},t.prototype.autoIncrement=function(t){var e,i,o=this.options,r=o.pointIntervalUnit,s=o.relativeXValue,n=this.chart.time,a=this.xIncrement;return(a=R(a,o.pointStart,0),this.pointInterval=i=R(this.pointInterval,o.pointInterval,1),s&&D(t)&&(i*=t),r&&(e=new n.Date(a),"day"===r?n.set("Date",e,n.get("Date",e)+i):"month"===r?n.set("Month",e,n.get("Month",e)+i):"year"===r&&n.set("FullYear",e,n.get("FullYear",e)+i),i=e.getTime()-a),s&&D(t))?a+i:(this.xIncrement=a+i,a)},t.prototype.setDataSortingOptions=function(){var t=this.options;T(this,{requireSorting:!1,sorted:!1,enabledDataSorting:!0,allowDG:!1}),C(t.pointRange)||(t.pointRange=1)},t.prototype.setOptions=function(t){var e,i,o,r=this.chart,s=r.options.plotOptions,n=r.userOptions||{},a=I(t),h=r.styledMode,l={plotOptions:s,userOptions:a};P(this,"setOptions",l);var c=l.plotOptions[this.type],p=n.plotOptions||{},u=p.series||{},f=d.plotOptions[this.type]||{},g=p[this.type]||{};this.userOptions=l.userOptions;var m=I(c,s.series,g,a);this.tooltipOptions=I(d.tooltip,null===(e=d.plotOptions.series)||void 0===e?void 0:e.tooltip,null==f?void 0:f.tooltip,r.userOptions.tooltip,null===(i=p.series)||void 0===i?void 0:i.tooltip,g.tooltip,a.tooltip),this.stickyTracking=R(a.stickyTracking,g.stickyTracking,u.stickyTracking,!!this.tooltipOptions.shared&&!this.noSharedTooltip||m.stickyTracking),null===c.marker&&delete m.marker,this.zoneAxis=m.zoneAxis;var v=this.zones=(m.zones||[]).slice();return(m.negativeColor||m.negativeFillColor)&&!m.zones&&(o={value:m[this.zoneAxis+"Threshold"]||m.threshold||0,className:"highcharts-negative"},h||(o.color=m.negativeColor,o.fillColor=m.negativeFillColor),v.push(o)),v.length&&C(v[v.length-1].value)&&v.push(h?{}:{color:this.color,fillColor:this.fillColor}),P(this,"afterSetOptions",{options:m}),m},t.prototype.getName=function(){return R(this.options.name,"Series "+(this.index+1))},t.prototype.getCyclic=function(t,e,i){var o,r,s=this.chart,n="".concat(t,"Index"),a="".concat(t,"Counter"),h=(null==i?void 0:i.length)||s.options.chart.colorCount;!e&&(C(r=R("color"===t?this.options.colorIndex:void 0,this[n]))?o=r:(s.series.length||(s[a]=0),o=s[a]%h,s[a]+=1),i&&(e=i[o])),void 0!==o&&(this[n]=o),this[t]=e},t.prototype.getColor=function(){this.chart.styledMode?this.getCyclic("color"):this.options.colorByPoint?this.color="#cccccc":this.getCyclic("color",this.options.color||d.plotOptions[this.type].color,this.chart.options.colors)},t.prototype.getPointsCollection=function(){return(this.hasGroupedData?this.points:this.data)||[]},t.prototype.getSymbol=function(){var t=this.options.marker;this.getCyclic("symbol",t.symbol,this.chart.options.symbols)},t.prototype.findPointIndex=function(t,e){var i,o,r,n=t.id,a=t.x,h=this.points,l=this.options.dataSorting;if(n){var c=this.chart.get(n);c instanceof s&&(i=c)}else if(this.linkedParent||this.enabledDataSorting||this.options.relativeXValue){var p=function(e){return!e.touched&&e.index===t.index};if(l&&l.matchByName?p=function(e){return!e.touched&&e.name===t.name}:this.options.relativeXValue&&(p=function(e){return!e.touched&&e.options.x===t.x}),!(i=A(h,p)))return}return i&&void 0!==(r=i&&i.index)&&(o=!0),void 0===r&&D(a)&&(r=this.xData.indexOf(a,e)),-1!==r&&void 0!==r&&this.cropped&&(r=r>=this.cropStart?r-this.cropStart:r),!o&&D(r)&&h[r]&&h[r].touched&&(r=void 0),r},t.prototype.updateData=function(t,e){var i,o,r,s,n=this.options,a=n.dataSorting,h=this.points,l=[],c=this.requireSorting,p=t.length===h.length,d=!0;if(this.xIncrement=null,t.forEach(function(t,e){var o,r=C(t)&&this.pointClass.prototype.optionsToObject.call({series:this},t)||{},d=r.x;r.id||D(d)?(-1===(o=this.findPointIndex(r,s))||void 0===o?l.push(t):h[o]&&t!==n.data[o]?(h[o].update(t,!1,null,!1),h[o].touched=!0,c&&(s=o+1)):h[o]&&(h[o].touched=!0),(!p||e!==o||a&&a.enabled||this.hasDerivedData)&&(i=!0)):l.push(t)},this),i)for(o=h.length;o--;)(r=h[o])&&!r.touched&&r.remove&&r.remove(!1,e);else!p||a&&a.enabled?d=!1:(t.forEach(function(t,e){t===h[e].y||h[e].destroyed||h[e].update(t,!1,null,!1)}),l.length=0);return h.forEach(function(t){t&&(t.touched=!1)}),!!d&&(l.forEach(function(t){this.addPoint(t,!1,null,null,!1)},this),null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=y(this.xData),this.autoIncrement()),!0)},t.prototype.setData=function(t,e,i,o){void 0===e&&(e=!0);var r,s,n,a,h,l=this,c=l.points,p=c&&c.length||0,d=l.options,u=l.chart,f=d.dataSorting,g=l.xAxis,m=d.turboThreshold,v=this.xData,y=this.yData,x=l.pointArrayMap,b=x&&x.length,M=d.keys,C=0,S=1,w=null;u.options.chart.allowMutatingData||(d.data&&delete l.options.data,l.userOptions.data&&delete l.userOptions.data,h=I(!0,t));var T=(t=h||t||[]).length;if(f&&f.enabled&&(t=this.sortData(t)),u.options.chart.allowMutatingData&&!1!==o&&T&&p&&!l.cropped&&!l.hasGroupedData&&l.visible&&!l.boosted&&(a=this.updateData(t,i)),!a){if(l.xIncrement=null,l.colorCounter=0,this.parallelArrays.forEach(function(t){l[t+"Data"].length=0}),m&&T>m){if(D(w=l.getFirstValidPoint(t)))for(s=0;s=0?C:0,S=S>=0?S:1),1===w.length&&(S=0),C===S)for(s=0;so?1:0}).forEach(function(t,e){t.x=e},this),e.linkedSeries&&e.linkedSeries.forEach(function(e){var i=e.options,r=i.data;i.dataSorting&&i.dataSorting.enabled||!r||(r.forEach(function(i,s){r[s]=o(e,i),t[s]&&(r[s].x=t[s].x,r[s].index=s)}),e.setData(r,!1))}),t},t.prototype.getProcessedData=function(t){var e,i,o,r,s,n=this,a=n.xAxis,h=n.options,l=h.cropThreshold,c=t||n.getExtremesFromAll||h.getExtremesFromAll,p=null==a?void 0:a.logarithmic,d=n.isCartesian,u=0,f=n.xData,g=n.yData,m=!1,v=f.length;a&&(r=(o=a.getExtremes()).min,s=o.max,m=!!(a.categories&&!a.names.length)),d&&n.sorted&&!c&&(!l||v>l||n.forceCrop)&&(f[v-1]s?(f=[],g=[]):n.yData&&(f[0]s)&&(f=(e=this.cropData(n.xData,n.yData,r,s)).xData,g=e.yData,u=e.start,i=!0));var y=O([p?f.map(p.log2lin):f],function(){return n.requireSorting&&!m&&k(15,!1,n.chart)});return{xData:f,yData:g,cropped:i,cropStart:u,closestPointRange:y}},t.prototype.processData=function(t){var e=this.xAxis;if(this.isCartesian&&!this.isDirty&&!e.isDirty&&!this.yAxis.isDirty&&!t)return!1;var i=this.getProcessedData();this.cropped=i.cropped,this.cropStart=i.cropStart,this.processedXData=i.xData,this.processedYData=i.yData,this.closestPointRange=this.basePointRange=i.closestPointRange,P(this,"afterProcessData")},t.prototype.cropData=function(t,e,i,o){var r,s,n=t.length,a=0,h=n;for(r=0;r=i){a=Math.max(0,r-1);break}for(s=r;so){h=s+1;break}return{xData:t.slice(a,h),yData:e.slice(a,h),start:a,end:h}},t.prototype.generatePoints=function(){var t,e,i,o,r=this.options,s=this.processedData||r.data,n=this.processedXData,a=this.processedYData,h=this.pointClass,l=n.length,c=this.cropStart||0,p=this.hasGroupedData,d=r.keys,u=[],f=r.dataGrouping&&r.dataGrouping.groupAll?c:0,g=this.data;if(!g&&!p){var m=[];m.length=s.length,g=this.data=m}for(d&&p&&(this.options.keys=!1),o=0;o0:n.length)||!f),r=e||this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||!l||(p[a+u]||s)>=g&&(p[a-u]||s)<=m,o&&r){if(h=n.length)for(;h--;)D(n[h])&&(d[v++]=n[h]);else d[v++]=n}var M={activeYData:d,dataMin:x(d),dataMax:y(d)};return P(this,"afterGetExtremes",{dataExtremes:M}),M},t.prototype.applyExtremes=function(){var t=this.getExtremes();return this.dataMin=t.dataMin,this.dataMax=t.dataMax,t},t.prototype.getFirstValidPoint=function(t){for(var e=t.length,i=0,o=null;null===o&&i=p.enabledThreshold*p.radius);if(!1!==p.enabled||this._hasPointMarkers)for(e=0;e0||i.hasImage)&&(i.graphic=o=h.renderer.symbol(g,a.x,a.y,a.width,a.height,n?s:p).add(d),this.enabledDataSorting&&h.hasRendered&&(o.attr({x:i.startXPos}),r="animate")),o&&"animate"===r&&o[m?"show":"hide"](m).animate(a),o){var v=this.pointAttribs(i,l||!i.selected?void 0:"select");l?c&&o.css({fill:v.fill}):o[r](v)}o&&o.addClass(i.getClassName(),!0)}else o&&(i.graphic=o.destroy())},t.prototype.markerAttribs=function(t,e){var i,o,r=this.options,s=r.marker,n=t.marker||{},a=n.symbol||s.symbol,h={},l=R(n.radius,s&&s.radius);e&&(i=s.states[e],l=R((o=n.states&&n.states[e])&&o.radius,i&&i.radius,l&&l+(i&&i.radiusPlus||0))),t.hasImage=a&&0===a.indexOf("url"),t.hasImage&&(l=0);var c=t.pos();return D(l)&&c&&(h.x=c[0]-l,h.y=c[1]-l,r.crisp&&(h.x=Math.floor(h.x))),l&&(h.width=h.height=2*l),h},t.prototype.pointAttribs=function(t,e){var i,o,r,s,n=this.options.marker,a=t&&t.options,h=a&&a.marker||{},l=a&&a.color,c=t&&t.color,p=t&&t.zone&&t.zone.color,d=this.color,u=R(h.lineWidth,n.lineWidth),f=1;return d=l||p||c||d,r=h.fillColor||n.fillColor||d,s=h.lineColor||n.lineColor||d,e=e||"normal",i=n.states[e]||{},u=R((o=h.states&&h.states[e]||{}).lineWidth,i.lineWidth,u+R(o.lineWidthPlus,i.lineWidthPlus,0)),r=o.fillColor||i.fillColor||r,{stroke:s=o.lineColor||i.lineColor||s,"stroke-width":u,fill:r,opacity:f=R(o.opacity,i.opacity,f)}},t.prototype.destroy=function(t){var e,i,o,r=this,s=r.chart,n=/AppleWebKit\/533/.test(m.navigator.userAgent),a=r.data||[];for(P(r,"destroy",{keepEventsForUpdate:t}),this.removeEvents(t),(r.axisTypes||[]).forEach(function(t){(o=r[t])&&o.series&&(w(o.series,r),o.isDirty=o.forceRedraw=!0)}),r.legendItem&&r.chart.legend.destroyItem(r),e=a.length;e--;)(i=a[e])&&i.destroy&&i.destroy();r.clips&&r.clips.forEach(function(t){return t.destroy()}),l.clearTimeout(r.animationTimeout),z(r,function(t,e){t instanceof h&&!t.survive&&t[n&&"group"===e?"hide":"destroy"]()}),s.hoverSeries===r&&(s.hoverSeries=void 0),w(s.series,r),s.orderItems("series"),z(r,function(e,i){t&&"hcEvents"===i||delete r[i]})},t.prototype.applyZones=function(){var t,e,i,o,r,s,n,a,h,l,c,p=this,d=this.chart,u=d.renderer,f=this.zones,g=this.clips||[],m=this.graph,v=this.area,y=Math.max(d.plotWidth,d.plotHeight),x=this[(this.zoneAxis||"y")+"Axis"],M=d.inverted,C=!1;f.length&&(m||v)&&x&&void 0!==x.min?(r=x.reversed,s=x.horiz,m&&!this.showLine&&m.hide(),v&&v.hide(),o=x.getExtremes(),f.forEach(function(f,S){t=r?s?d.plotWidth:0:s?0:x.toPixels(o.min)||0,t=b(R(e,t),0,y),e=b(Math.round(x.toPixels(R(f.value,o.max),!0)||0),0,y),C&&(t=e=x.toPixels(o.max)),n=Math.abs(t-e),a=Math.min(t,e),h=Math.max(t,e),x.isXAxis?(i={x:M?h:a,y:0,width:n,height:y},s||(i.x=d.plotHeight-i.x)):(i={x:0,y:M?h:a,width:y,height:n},s&&(i.y=d.plotWidth-i.y)),g[S]?g[S].animate(i):g[S]=u.clipRect(i),l=p["zone-area-"+S],c=p["zone-graph-"+S],m&&c&&c.clip(g[S]),v&&l&&l.clip(g[S]),C=f.value>o.max,p.resetZones&&0===e&&(e=void 0)}),this.clips=g):p.visible&&(m&&m.show(),v&&v.show())},t.prototype.plotGroup=function(t,e,i,o,r){var s=this[t],n=!s,a={visibility:i,zIndex:o||.1};return void 0===this.opacity||this.chart.styledMode||"inactive"===this.state||(a.opacity=this.opacity),n&&(this[t]=s=this.chart.renderer.g().add(r)),s.addClass("highcharts-"+e+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(C(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(s.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),s.attr(a)[n?"attr":"animate"](this.getPlotBox(e)),s},t.prototype.getPlotBox=function(t){var e=this.xAxis,i=this.yAxis,o=this.chart,r=o.inverted&&!o.polar&&e&&!1!==this.invertible&&"series"===t;return o.inverted&&(e=i,i=this.xAxis),{translateX:e?e.left:o.plotLeft,translateY:i?i.top:o.plotTop,rotation:r?90:0,rotationOriginX:r?(e.len-i.len)/2:0,rotationOriginY:r?(e.len+i.len)/2:0,scaleX:r?-1:1,scaleY:1}},t.prototype.removeEvents=function(t){t||N(this),this.eventsToUnbind.length&&(this.eventsToUnbind.forEach(function(t){t()}),this.eventsToUnbind.length=0)},t.prototype.render=function(){var t=this,e=t.chart,i=t.options,o=c(i.animation),r=t.visible?"inherit":"hidden",s=i.zIndex,n=t.hasRendered,a=e.seriesGroup;e.inverted;var h=t.finishedAnimating?0:o.duration;P(this,"render"),t.plotGroup("group","series",r,s,a),t.markerGroup=t.plotGroup("markerGroup","markers",r,s,a),!1!==i.clip&&t.setClip(),t.animate&&h&&t.animate(!0),t.drawGraph&&(t.drawGraph(),t.applyZones()),t.visible&&t.drawPoints(),t.drawDataLabels&&t.drawDataLabels(),t.redrawPoints&&t.redrawPoints(),t.drawTracker&&i.enableMouseTracking&&t.drawTracker(),t.animate&&h&&t.animate(),n||(h&&o.defer&&(h+=o.defer),t.animationTimeout=_(function(){t.afterAnimate()},h||0)),t.isDirty=!1,t.hasRendered=!0,P(t,"afterRender")},t.prototype.redraw=function(){var t=this.isDirty||this.isDirtyData;this.translate(),this.render(),t&&delete this.kdTree},t.prototype.reserveSpace=function(){return this.visible||!this.chart.options.chart.ignoreHiddenSeries},t.prototype.searchPoint=function(t,e){var i=this.xAxis,o=this.yAxis,r=this.chart.inverted;return this.searchKDTree({clientX:r?i.len-t.chartY+i.pos:t.chartX-i.pos,plotY:r?o.len-t.chartX+o.pos:t.chartY-o.pos},e,t)},t.prototype.buildKDTree=function(t){this.buildingKdTree=!0;var e=this,i=e.options.findNearestPointBy.indexOf("y")>-1?2:1;delete e.kdTree,_(function(){e.kdTree=function t(i,o,r){var s,n,a=i&&i.length;if(a)return s=e.kdAxisArray[o%r],i.sort(function(t,e){return t[s]-e[s]}),{point:i[n=Math.floor(a/2)],left:t(i.slice(0,n),o+1,r),right:t(i.slice(n+1),o+1,r)}}(e.getValidPoints(null,!e.directTouch),i,i),e.buildingKdTree=!1},e.options.kdNow||t&&"touchstart"===t.type?0:1)},t.prototype.searchKDTree=function(t,e,i){var o=this,r=this.kdAxisArray,s=r[0],n=r[1],a=e?"distX":"dist",h=(o.options.findNearestPointBy||"").indexOf("y")>-1?2:1,l=!!o.isBubble;if(this.kdTree||this.buildingKdTree||this.buildKDTree(i),this.kdTree)return function t(e,i,r,h){var c,p,d,u,f,g,m,v,y,x,b,M=i.point,S=o.kdAxisArray[r%h],w=M;p=e[s],d=M[s],u=C(p)&&C(d)?p-d:null,f=e[n],g=M[n],m=C(f)&&C(g)?f-g:0,v=l&&(null===(c=M.marker)||void 0===c?void 0:c.radius)||0,M.dist=Math.sqrt((u&&u*u||0)+m*m)-v,M.distX=C(u)?Math.abs(u)-v:Number.MAX_VALUE;var k=(e[S]||0)-(M[S]||0)+(l&&(null===(y=M.marker)||void 0===y?void 0:y.radius)||0),T=k<0?"left":"right",A=k<0?"right":"left";return i[T]&&(w=(x=t(e,i[T],r+1,h))[a]=0&&t.plotY<=(o?o.len:e.plotHeight)&&t.plotX>=0&&t.plotX<=(i?i.len:e.plotWidth)},t.prototype.drawTracker=function(){var t=this,e=t.options,i=e.trackByArea,o=[].concat(i?t.areaPath:t.graphPath),r=t.chart,s=r.pointer,n=r.renderer,a=r.options.tooltip.snap,h=t.tracker,l=function(i){e.enableMouseTracking&&r.hoverSeries!==t&&t.onMouseOver()},c="rgba(192,192,192,"+(g?1e-4:.002)+")";h?h.attr({d:o}):t.graph&&(t.tracker=n.path(o).attr({visibility:t.visible?"inherit":"hidden",zIndex:2}).addClass(i?"highcharts-tracker-area":"highcharts-tracker-line").add(t.group),r.styledMode||t.tracker.attr({"stroke-linecap":"round","stroke-linejoin":"round",stroke:c,fill:i?c:"none","stroke-width":t.graph.strokeWidth()+(i?0:2*a)}),[t.tracker,t.markerGroup,t.dataLabelsGroup].forEach(function(t){t&&(t.addClass("highcharts-tracker").on("mouseover",l).on("mouseout",function(t){s.onTrackerMouseOut(t)}),e.cursor&&!r.styledMode&&t.css({cursor:e.cursor}),f&&t.on("touchstart",l))})),P(this,"afterDrawTracker")},t.prototype.addPoint=function(t,e,i,o,r){var s,n,a=this.options,h=this.data,l=this.chart,c=this.xAxis,p=c&&c.hasNames&&c.names,d=a.data,u=this.xData;e=R(e,!0);var f={series:this};this.pointClass.prototype.applyOptions.apply(f,[t]);var g=f.x;if(n=u.length,this.requireSorting&&gg;)n--;this.updateParallelArrays(f,"splice",[n,0,0]),this.updateParallelArrays(f,n),p&&f.name&&(p[g]=f.name),d.splice(n,0,t),(s||this.processedData)&&(this.data.splice(n,0,null),this.processData()),"point"===a.legendType&&this.generatePoints(),i&&(h[0]&&h[0].remove?h[0].remove(!1):(h.shift(),this.updateParallelArrays(f,"shift"),d.shift())),!1!==r&&P(this,"addPoint",{point:f}),this.isDirty=!0,this.isDirtyData=!0,e&&l.redraw(o)},t.prototype.removePoint=function(t,e,i){var o=this,r=o.data,s=r[t],n=o.points,a=o.chart,h=function(){n&&n.length===r.length&&n.splice(t,1),r.splice(t,1),o.options.data.splice(t,1),o.updateParallelArrays(s||{series:o},"splice",[t,1]),s&&s.destroy(),o.isDirty=!0,o.isDirtyData=!0,e&&a.redraw()};p(i,a),e=R(e,!0),s?s.firePointEvent("remove",null,h):h()},t.prototype.remove=function(t,e,i,o){var r=this,s=r.chart;function n(){r.destroy(o),s.isDirtyLegend=s.isDirtyBox=!0,s.linkSeries(o),R(t,!0)&&s.redraw(e)}!1!==i?P(r,"remove",null,n):n()},t.prototype.update=function(t,e){P(this,"update",{options:t=S(t,this.userOptions)});var i,o,r,s,n=this,a=n.chart,h=n.userOptions,l=n.initialType||n.type,c=a.options.plotOptions,p=v[l].prototype,d=n.finishedAnimating&&{animation:!1},u={},f=["colorIndex","eventOptions","navigatorSeries","symbolIndex","baseSeries"],g=t.type||h.type||a.options.chart.type,m=!(this.hasDerivedData||g&&g!==this.type||void 0!==t.pointStart||void 0!==t.pointInterval||void 0!==t.relativeXValue||t.joinBy||t.mapData||["dataGrouping","pointStart","pointInterval","pointIntervalUnit","keys"].some(function(t){return n.hasOptionChanged(t)}));g=g||l,m&&(f.push("data","isDirtyData","isDirtyCanvas","points","processedData","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","hasDataLabels","clips","nodes","layout","level","mapMap","mapData","minY","maxY","minX","maxX"),!1!==t.visible&&f.push("area","graph"),n.parallelArrays.forEach(function(t){f.push(t+"Data")}),t.data&&(t.dataSorting&&T(n.options.dataSorting,t.dataSorting),this.setData(t.data,!1))),t=I(h,d,{index:void 0===h.index?n.index:h.index,pointStart:R(null===(i=null==c?void 0:c.series)||void 0===i?void 0:i.pointStart,h.pointStart,n.xData[0])},!m&&{data:n.options.data},t),m&&t.data&&(t.data=n.options.data),(f=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(f)).forEach(function(t){f[t]=n[t],delete n[t]});var y=!1;if(v[g]){if(y=g!==n.type,n.remove(!1,!1,!1,!0),y){if(Object.setPrototypeOf)Object.setPrototypeOf(n,v[g].prototype);else{var x=Object.hasOwnProperty.call(n,"hcEvents")&&n.hcEvents;for(s in p)n[s]=void 0;T(n,v[g].prototype),x?n.hcEvents=x:delete n.hcEvents}}}else k(17,!0,a,{missingModuleFor:g});if(f.forEach(function(t){n[t]=f[t]}),n.init(a,t),m&&this.points){!1===(r=n.options).visible?(u.graphic=1,u.dataLabel=1):(this.hasMarkerChanged(r,h)&&(u.graphic=1),(null===(o=n.hasDataLabels)||void 0===o?void 0:o.call(n))||(u.dataLabel=1));for(var b=0,M=this.points;b=Math.max(l+n,m.pos)&&v<=Math.min(l+n+d.width,m.pos+m.len)||(g.isInsidePlot=!1)}if(!i.ignoreY&&g.isInsidePlot){var y=!r&&i.axis&&!i.axis.isXAxis&&i.axis||p&&(r?p.xAxis:p.yAxis)||{pos:a,len:1/0},x=i.paneCoordinates?y.pos+f:a+f;x>=Math.max(c+a,y.pos)&&x<=Math.min(c+a+d.height,y.pos+y.len)||(g.isInsidePlot=!1)}return N(this,"afterIsInsidePlot",g),g.isInsidePlot},t.prototype.redraw=function(t){N(this,"beforeRedraw");var e,i,o,r,s=this.hasCartesianSeries?this.axes:this.colorAxis||[],n=this.series,a=this.pointer,h=this.legend,l=this.userOptions.legend,c=this.renderer,p=c.isHidden(),d=[],u=this.isDirtyBox,f=this.isDirtyLegend;for(c.rootFontSize=c.boxWrapper.getStyle("font-size"),this.setResponsive&&this.setResponsive(!1),m(!!this.hasRendered&&t,this),p&&this.temporaryDisplay(),this.layOutTitles(!1),o=n.length;o--;)if(((r=n[o]).options.stacking||r.options.centerInCategory)&&(i=!0,r.isDirty)){e=!0;break}if(e)for(o=n.length;o--;)(r=n[o]).options.stacking&&(r.isDirty=!0);n.forEach(function(t){t.isDirty&&("point"===t.options.legendType?("function"==typeof t.updateTotals&&t.updateTotals(),f=!0):l&&(l.labelFormatter||l.labelFormat)&&(f=!0)),t.isDirtyData&&N(t,"updatedData")}),f&&h&&h.options.enabled&&(h.render(),this.isDirtyLegend=!1),i&&this.getStacks(),s.forEach(function(t){t.updateNames(),t.setScale()}),this.getMargins(),s.forEach(function(t){t.isDirty&&(u=!0)}),s.forEach(function(t){var e=t.min+","+t.max;t.extKey!==e&&(t.extKey=e,d.push(function(){N(t,"afterSetExtremes",z(t.eventArgs,t.getExtremes())),delete t.eventArgs})),(u||i)&&t.redraw()}),u&&this.drawChartBox(),N(this,"predraw"),n.forEach(function(t){(u||t.isDirty)&&t.visible&&t.redraw(),t.isDirtyData=!1}),a&&a.reset(!0),c.draw(),N(this,"redraw"),N(this,"render"),p&&this.temporaryDisplay(!0),d.forEach(function(t){t.call()})},t.prototype.get=function(t){var e=this.series;function i(e){return e.id===t||e.options&&e.options.id===t}for(var o=R(this.axes,i)||R(this.series,i),r=0;!o&&r1?o.height:400)),this.containerBox=o},t.prototype.temporaryDisplay=function(t){var e,i=this.renderTo;if(t)for(;i&&i.style;)i.hcOrigStyle&&(L(i,i.hcOrigStyle),delete i.hcOrigStyle),i.hcOrigDetached&&(C.body.removeChild(i),i.hcOrigDetached=!1),i=i.parentNode;else for(;i&&i.style&&(C.body.contains(i)||i.parentNode||(i.hcOrigDetached=!0,C.body.appendChild(i)),("none"===W(i,"display",!1)||i.hcOricDetached)&&(i.hcOrigStyle={display:i.style.display,height:i.style.height,overflow:i.style.overflow},e={display:"block",overflow:"hidden"},i!==this.renderTo&&(e.height=0),L(i,e),i.offsetWidth||i.style.setProperty("display","block","important")),(i=i.parentNode)!==C.body););},t.prototype.setClassName=function(t){this.container.className="highcharts-container "+(t||"")},t.prototype.getContainer=function(){var t,e=this.options,i=e.chart,o="data-highcharts-chart",r=J(),s=this.renderTo;s||(this.renderTo=s=i.renderTo),H(s)&&(this.renderTo=s=C.getElementById(s)),s||I(13,!0,this);var a=V(P(s,o));X(a)&&M[a]&&M[a].hasRendered&&M[a].destroy(),P(s,o,this.index),s.innerHTML=d.emptyHTML,i.skipClone||s.offsetWidth||this.temporaryDisplay(),this.getChartSize();var h=this.chartWidth,c=this.chartHeight;L(s,{overflow:"hidden"}),this.styledMode||(t=z({position:"relative",overflow:"hidden",width:h+"px",height:c+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)",userSelect:"none","touch-action":"manipulation",outline:"none"},i.style||{}));var p=O("div",{id:r},t,s);this.container=p,this._cursor=p.style.cursor;var u=i.renderer||!w?n.getRendererType(i.renderer):l;if(this.renderer=new u(p,h,c,void 0,i.forExport,e.exporting&&e.exporting.allowHTML,this.styledMode),this.containerBox=this.getContainerBox(),m(void 0,this),this.setClassName(i.className),this.styledMode)for(var f in e.defs)this.renderer.definition(e.defs[f]);else this.renderer.setStyle(i.style);this.renderer.chartIndex=this.index,N(this,"afterGetContainer")},t.prototype.getMargins=function(t){var e=this.spacing,i=this.margin,o=this.titleOffset;this.resetMargins(),o[0]&&!j(i[0])&&(this.plotTop=Math.max(this.plotTop,o[0]+e[0])),o[2]&&!j(i[2])&&(this.marginBottom=Math.max(this.marginBottom,o[2]+e[2])),this.legend&&this.legend.display&&this.legend.adjustMargins(i,e),N(this,"getMargins"),t||this.getAxisMargins()},t.prototype.getAxisMargins=function(){var t=this,e=t.axisOffset=[0,0,0,0],i=t.colorAxis,o=t.margin,r=function(t){t.forEach(function(t){t.visible&&t.getOffset()})};t.hasCartesianSeries?r(t.axes):i&&i.length&&r(i),S.forEach(function(i,r){j(o[r])||(t[i]+=e[r])}),t.setChartSize()},t.prototype.getOptions=function(){return E(this.userOptions,v)},t.prototype.reflow=function(t){var e=this,i=e.containerBox,o=e.getContainerBox();delete e.pointer.chartPosition,!e.isPrinting&&!e.isResizing&&i&&o.width&&((o.width!==i.width||o.height!==i.height)&&(p.clearTimeout(e.reflowTimeout),e.reflowTimeout=$(function(){e.container&&e.setSize(void 0,void 0,!1)},t?100:0)),e.containerBox=o)},t.prototype.setReflow=function(){var t=this,e=function(e){var i;(null===(i=t.options)||void 0===i?void 0:i.chart.reflow)&&t.hasLoaded&&t.reflow(e)};if("function"==typeof ResizeObserver)new ResizeObserver(e).observe(t.renderTo);else{var i=A(k,"resize",e);A(this,"destroy",i)}},t.prototype.setSize=function(t,e,i){var o=this,r=o.renderer;o.isResizing+=1,m(i,o);var s=r.globalAnimation;o.oldChartHeight=o.chartHeight,o.oldChartWidth=o.chartWidth,void 0!==t&&(o.options.chart.width=t),void 0!==e&&(o.options.chart.height=e),o.getChartSize(),o.styledMode||(s?f:L)(o.container,{width:o.chartWidth+"px",height:o.chartHeight+"px"},s),o.setChartSize(!0),r.setSize(o.chartWidth,o.chartHeight,s),o.axes.forEach(function(t){t.isDirty=!0,t.setScale()}),o.isDirtyLegend=!0,o.isDirtyBox=!0,o.layOutTitles(),o.getMargins(),o.redraw(s),o.oldChartHeight=null,N(o,"resize"),setTimeout(function(){o&&N(o,"endResize",void 0,function(){o.isResizing-=1})},g(s).duration)},t.prototype.setChartSize=function(t){var e,i,o,r,s=this.inverted,n=this.renderer,a=this.chartWidth,h=this.chartHeight,l=this.options.chart,c=this.spacing,p=this.clipOffset;this.plotLeft=e=Math.round(this.plotLeft),this.plotTop=i=Math.round(this.plotTop),this.plotWidth=o=Math.max(0,Math.round(a-e-this.marginRight)),this.plotHeight=r=Math.max(0,Math.round(h-i-this.marginBottom)),this.plotSizeX=s?r:o,this.plotSizeY=s?o:r,this.plotBorderWidth=l.plotBorderWidth||0,this.spacingBox=n.spacingBox={x:c[3],y:c[0],width:a-c[3]-c[1],height:h-c[0]-c[2]},this.plotBox=n.plotBox={x:e,y:i,width:o,height:r};var d=2*Math.floor(this.plotBorderWidth/2),u=Math.ceil(Math.max(d,p[3])/2),f=Math.ceil(Math.max(d,p[0])/2);this.clipBox={x:u,y:f,width:Math.floor(this.plotSizeX-Math.max(d,p[1])/2-u),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(d,p[2])/2-f))},t||(this.axes.forEach(function(t){t.setAxisSize(),t.setAxisTranslation()}),n.alignElements()),N(this,"afterSetChartSize",{skipAxes:t})},t.prototype.resetMargins=function(){N(this,"resetMargins");var t=this,e=t.options.chart;["margin","spacing"].forEach(function(i){var o=e[i],r=G(o)?o:[o,o,o,o];["Top","Right","Bottom","Left"].forEach(function(o,s){t[i][s]=F(e[i+o],r[s])})}),S.forEach(function(e,i){t[e]=F(t.margin[i],t.spacing[i])}),t.axisOffset=[0,0,0,0],t.clipOffset=[0,0,0,0]},t.prototype.drawChartBox=function(){var t,e,i,o=this.options.chart,r=this.renderer,s=this.chartWidth,n=this.chartHeight,a=this.styledMode,h=this.plotBGImage,l=o.backgroundColor,c=o.plotBackgroundColor,p=o.plotBackgroundImage,d=this.plotLeft,u=this.plotTop,f=this.plotWidth,g=this.plotHeight,m=this.plotBox,v=this.clipRect,y=this.clipBox,x=this.chartBackground,b=this.plotBackground,M=this.plotBorder,C="animate";x||(this.chartBackground=x=r.rect().addClass("highcharts-background").add(),C="attr"),a?t=e=x.strokeWidth():(e=(t=o.borderWidth||0)+(o.shadow?8:0),i={fill:l||"none"},(t||x["stroke-width"])&&(i.stroke=o.borderColor,i["stroke-width"]=t),x.attr(i).shadow(o.shadow)),x[C]({x:e/2,y:e/2,width:s-e-t%2,height:n-e-t%2,r:o.borderRadius}),C="animate",b||(C="attr",this.plotBackground=b=r.rect().addClass("highcharts-plot-background").add()),b[C](m),!a&&(b.attr({fill:c||"none"}).shadow(o.plotShadow),p&&(h?(p!==h.attr("href")&&h.attr("href",p),h.animate(m)):this.plotBGImage=r.image(p,d,u,f,g).add())),v?v.animate({width:y.width,height:y.height}):this.clipRect=r.clipRect(y),C="animate",M||(C="attr",this.plotBorder=M=r.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),a||M.attr({stroke:o.plotBorderColor,"stroke-width":o.plotBorderWidth||0,fill:"none"}),M[C](M.crisp({x:d,y:u,width:f,height:g},-M.strokeWidth())),this.isDirtyBox=!1,N(this,"afterDrawChartBox")},t.prototype.propFromSeries=function(){var t,e,i,o=this,r=o.options.chart,s=o.options.series;["inverted","angular","polar"].forEach(function(n){for(e=T[r.type],i=r[n]||e&&e.prototype[n],t=s&&s.length;!i&&t--;)(e=T[s[t].type])&&e.prototype[n]&&(i=!0);o[n]=i})},t.prototype.linkSeries=function(t){var e=this,i=e.series;i.forEach(function(t){t.linkedSeries.length=0}),i.forEach(function(t){var i=t.options.linkedTo;H(i)&&(i=":previous"===i?e.series[t.index-1]:e.get(i))&&i.linkedParent!==t&&(i.linkedSeries.push(t),t.linkedParent=i,i.enabledDataSorting&&t.setDataSortingOptions(),t.visible=F(t.options.visible,i.options.visible,t.visible))}),N(this,"afterLinkSeries",{isUpdating:t})},t.prototype.renderSeries=function(){this.series.forEach(function(t){t.translate(),t.render()})},t.prototype.render=function(){var t=this.axes,e=this.colorAxis,i=this.renderer,o=function(t){t.forEach(function(t){t.visible&&t.render()})},r=0;this.setTitle(),N(this,"beforeMargins"),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize();var s=this.plotWidth;t.some(function(t){if(t.horiz&&t.visible&&t.options.labels.enabled&&t.series.length)return r=21,!0}),this.plotHeight=Math.max(this.plotHeight-r,0);var n=this.plotHeight;t.forEach(function(t){t.setScale()}),this.getAxisMargins();var a=s/this.plotWidth>1.1,h=n/this.plotHeight>1.05;(a||h)&&(t.forEach(function(t){(t.horiz&&a||!t.horiz&&h)&&t.setTickInterval(!0)}),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries?o(t):e&&e.length&&o(e),this.seriesGroup||(this.seriesGroup=i.g("series-group").attr({zIndex:3}).shadow(this.options.chart.seriesGroupShadow).add()),this.renderSeries(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0},t.prototype.addCredits=function(t){var e=this,i=U(!0,this.options.credits,t);i.enabled&&!this.credits&&(this.credits=this.renderer.text(i.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){i.href&&(k.location.href=i.href)}).attr({align:i.position.align,zIndex:8}),e.styledMode||this.credits.css(i.style),this.credits.add().align(i.position),this.credits.update=function(t){e.credits=e.credits.destroy(),e.addCredits(t)})},t.prototype.destroy=function(){var t,e=this,i=e.axes,o=e.series,r=e.container,n=r&&r.parentNode;for(N(e,"destroy"),e.renderer.forExport?B(M,e):M[e.index]=void 0,s.chartCount--,e.renderTo.removeAttribute("data-highcharts-chart"),q(e),t=i.length;t--;)i[t]=i[t].destroy();for(this.scroller&&this.scroller.destroy&&this.scroller.destroy(),t=o.length;t--;)o[t]=o[t].destroy();["title","subtitle","chartBackground","plotBackground","plotBGImage","plotBorder","seriesGroup","clipRect","credits","pointer","rangeSelector","legend","resetZoomButton","tooltip","renderer"].forEach(function(t){var i=e[t];i&&i.destroy&&(e[t]=i.destroy())}),r&&(r.innerHTML=d.emptyHTML,q(r),n&&D(r)),Y(e,function(t,i){delete e[i]})},t.prototype.firstRender=function(){var t=this,e=t.options;t.getContainer(),t.resetMargins(),t.setChartSize(),t.propFromSeries(),t.getAxes();var i=_(e.series)?e.series:[];e.series=[],i.forEach(function(e){t.initSeries(e)}),t.linkSeries(),t.setSeriesData(),N(t,"beforeRender"),t.render(),t.pointer.getChartPosition(),t.renderer.imgCount||t.hasLoaded||t.onload(),t.temporaryDisplay(!0)},t.prototype.onload=function(){this.callbacks.concat([this.callback]).forEach(function(t){t&&void 0!==this.index&&t.apply(this,[this])},this),N(this,"load"),N(this,"render"),j(this.index)&&this.setReflow(),this.warnIfA11yModuleNotLoaded(),this.hasLoaded=!0},t.prototype.warnIfA11yModuleNotLoaded=function(){var t=this.options,e=this.title;!t||this.accessibility||(this.renderer.boxWrapper.attr({role:"img","aria-label":(e&&e.element.textContent||"").replace(/0&&(x+=r,y=M),(r=x-C)>0&&(x=C,y-=r),e.series.length&&y!==u.min&&x!==u.max&&y>=M&&x<=C&&(e.setExtremes(y,x,!1,!1,{trigger:"pan"}),!o.resetZoomButton&&y!==M&&x!==C&&a.match("y")&&(o.showResetZoom(),e.displayBtn=!1),i=!0),s[l]=h)}}),Y(s,function(t,e){o[e]=t}),i&&o.redraw(!1),L(o.container,{cursor:"move"})})},t}();return z(Q.prototype,{callbacks:[],collectionsWithInit:{xAxis:[Q.prototype.addAxis,[!0]],yAxis:[Q.prototype.addAxis,[!1]],series:[Q.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:["backgroundColor","borderColor","borderWidth","borderRadius","plotBackgroundColor","plotBackgroundImage","plotBorderColor","plotBorderWidth","plotShadow","shadow"],propsRequireReflow:["margin","marginTop","marginRight","marginBottom","marginLeft","spacing","spacingTop","spacingRight","spacingBottom","spacingLeft"],propsRequireUpdateSeries:["chart.inverted","chart.polar","chart.ignoreHiddenSeries","chart.type","colors","plotOptions","time","tooltip"]}),Q}),i(e,"Extensions/ScrollablePlotArea.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/Axis.js"],e["Core/Chart/Chart.js"],e["Core/Series/Series.js"],e["Core/Renderer/RendererRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s){var n=t.stop,a=s.addEvent,h=s.createElement,l=s.defined,c=s.merge,p=s.pick;a(i,"afterSetChartSize",function(t){var i,o,r,s=this.options.chart.scrollablePlotArea,n=s&&s.minWidth,a=s&&s.minHeight;this.renderer.forExport||(n?(this.scrollablePixelsX=i=Math.max(0,n-this.chartWidth),i&&(this.scrollablePlotBox=this.renderer.scrollablePlotBox=c(this.plotBox),this.plotBox.width=this.plotWidth+=i,this.inverted?this.clipBox.height+=i:this.clipBox.width+=i,r={1:{name:"right",value:i}})):a&&(this.scrollablePixelsY=o=Math.max(0,a-this.chartHeight),l(o)&&(this.scrollablePlotBox=this.renderer.scrollablePlotBox=c(this.plotBox),this.plotBox.height=this.plotHeight+=o,this.inverted?this.clipBox.width+=o:this.clipBox.height+=o,r={2:{name:"bottom",value:o}})),r&&!t.skipAxes&&this.axes.forEach(function(t){r[t.side]?t.getPlotLinePath=function(){var i,o=r[t.side].name,s=r[t.side].value,n=this[o];return this[o]=n-s,i=e.prototype.getPlotLinePath.apply(this,arguments),this[o]=n,i}:(t.setAxisSize(),t.setAxisTranslation())}))}),a(i,"render",function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()}),i.prototype.setUpScrolling=function(){var t,e=this,i={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(i.overflowX="auto"),this.scrollablePixelsY&&(i.overflowY="auto"),this.scrollingParent=h("div",{className:"highcharts-scrolling-parent"},{position:"relative"},this.renderTo),this.scrollingContainer=h("div",{className:"highcharts-scrolling"},i,this.scrollingParent),a(this.scrollingContainer,"scroll",function(){e.pointer&&(delete e.pointer.chartPosition,e.hoverPoint&&(t=e.hoverPoint),e.pointer.runPointActions(void 0,t,!0))}),this.innerContainer=h("div",{className:"highcharts-inner-container"},null,this.scrollingContainer),this.innerContainer.appendChild(this.container),this.setUpScrolling=null},i.prototype.moveFixedElements=function(){var t,e=this.container,i=this.fixedRenderer,o=[".highcharts-breadcrumbs-group",".highcharts-contextbutton",".highcharts-credits",".highcharts-legend",".highcharts-legend-checkbox",".highcharts-navigator-series",".highcharts-navigator-xaxis",".highcharts-navigator-yaxis",".highcharts-navigator",".highcharts-reset-zoom",".highcharts-drillup-button",".highcharts-scrollbar",".highcharts-subtitle",".highcharts-title"];this.scrollablePixelsX&&!this.inverted?t=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted?t=".highcharts-xaxis":this.scrollablePixelsY&&!this.inverted?t=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(t=".highcharts-yaxis"),t&&o.push("".concat(t,":not(.highcharts-radial-axis)"),"".concat(t,"-labels:not(.highcharts-radial-axis-labels)")),o.forEach(function(t){[].forEach.call(e.querySelectorAll(t),function(t){(t.namespaceURI===i.SVG_NS?i.box:i.box.parentNode).appendChild(t),t.style.pointerEvents="auto"})})},i.prototype.applyFixed=function(){var t=!this.fixedDiv,e=this.options.chart,i=e.scrollablePlotArea,o=r.getRendererType();t?(this.fixedDiv=h("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(e.style&&e.style.zIndex||0)+2,top:0},null,!0),this.scrollingContainer&&this.scrollingContainer.parentNode.insertBefore(this.fixedDiv,this.scrollingContainer),this.renderTo.style.overflow="visible",this.fixedRenderer=s=new o(this.fixedDiv,this.chartWidth,this.chartHeight,this.options.chart.style),this.scrollableMask=s.path().attr({fill:this.options.chart.backgroundColor||"#fff","fill-opacity":p(i.opacity,.85),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),a(this,"afterShowResetZoom",this.moveFixedElements),a(this,"afterApplyDrilldown",this.moveFixedElements),a(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight),(this.scrollableDirty||t)&&(this.scrollableDirty=!1,this.moveFixedElements()),l=this.chartWidth+(this.scrollablePixelsX||0),c=this.chartHeight+(this.scrollablePixelsY||0),n(this.container),this.container.style.width=l+"px",this.container.style.height=c+"px",this.renderer.boxWrapper.attr({width:l,height:c,viewBox:[0,0,l,c].join(" ")}),this.chartBackground.attr({width:l,height:c}),this.scrollingContainer.style.height=this.chartHeight+"px",t&&(i.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*i.scrollPositionX),i.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*i.scrollPositionY));var s,l,c,d,u=this.axisOffset,f=this.plotTop-u[0]-1,g=this.plotLeft-u[3]-1,m=this.plotTop+this.plotHeight+u[2]+1,v=this.plotLeft+this.plotWidth+u[1]+1,y=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),x=this.plotTop+this.plotHeight-(this.scrollablePixelsY||0);d=this.scrollablePixelsX?[["M",0,f],["L",this.plotLeft-1,f],["L",this.plotLeft-1,m],["L",0,m],["Z"],["M",y,f],["L",this.chartWidth,f],["L",this.chartWidth,m],["L",y,m],["Z"]]:this.scrollablePixelsY?[["M",g,0],["L",g,this.plotTop-1],["L",v,this.plotTop-1],["L",v,0],["Z"],["M",g,x],["L",g,this.chartHeight],["L",v,this.chartHeight],["L",v,x],["Z"]]:[["M",0,0]],"adjustHeight"!==this.redrawTrigger&&this.scrollableMask.attr({d:d})},a(e,"afterInit",function(){this.chart.scrollableDirty=!0}),a(o,"show",function(){this.chart.scrollableDirty=!0})}),i(e,"Core/Axis/Stacking/StackItem.js",[e["Core/Templating.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){var o=t.format,r=e.series,s=i.destroyObjectProperties,n=i.fireEvent,a=i.isNumber,h=i.pick;return function(){function t(t,e,i,o,r){var s=t.chart.inverted,n=t.reversed;this.axis=t;var a=this.isNegative=!!i!=!!n;this.options=e=e||{},this.x=o,this.total=null,this.cumulative=null,this.points={},this.hasValidPoints=!1,this.stack=r,this.leftCliff=0,this.rightCliff=0,this.alignOptions={align:e.align||(s?a?"left":"right":"center"),verticalAlign:e.verticalAlign||(s?"middle":a?"bottom":"top"),y:e.y,x:e.x},this.textAlign=e.textAlign||(s?a?"right":"left":"center")}return t.prototype.destroy=function(){s(this,this.axis)},t.prototype.render=function(t){var e=this.axis.chart,i=this.options,r=i.format,s=r?o(r,this,e):i.formatter.call(this);if(this.label)this.label.attr({text:s,visibility:"hidden"});else{this.label=e.renderer.label(s,null,void 0,i.shape,void 0,void 0,i.useHTML,!1,"stack-labels");var a={r:i.borderRadius||0,text:s,padding:h(i.padding,5),visibility:"hidden"};e.styledMode||(a.fill=i.backgroundColor,a.stroke=i.borderColor,a["stroke-width"]=i.borderWidth,this.label.css(i.style||{})),this.label.attr(a),this.label.added||this.label.add(t)}this.label.labelrank=e.plotSizeY,n(this,"afterRender")},t.prototype.setOffset=function(t,e,i,o,s,l){var c=this.alignOptions,p=this.axis,d=this.label,u=this.options,f=this.textAlign,g=p.chart,m=this.getStackBox({xOffset:t,width:e,boxBottom:i,boxTop:o,defaultX:s,xAxis:l}),v=c.verticalAlign;if(d&&m){var y=d.getBBox(),x=d.padding,b="justify"===h(u.overflow,"justify"),M=void 0;c.x=u.x||0,c.y=u.y||0;var C=this.adjustStackPosition({labelBox:y,verticalAlign:v,textAlign:f}),S=C.x,w=C.y;m.x-=S,m.y-=w,d.align(c,!1,m),(M=g.isInsidePlot(d.alignAttr.x+c.x+S,d.alignAttr.y+c.y+w))||(b=!1),b&&r.prototype.justifyDataLabel.call(p,d,c,d.alignAttr,y,m),d.attr({x:d.alignAttr.x,y:d.alignAttr.y,rotation:u.rotation,rotationOriginX:y.width/2,rotationOriginY:y.height/2}),h(!b&&u.crop,!0)&&(M=a(d.x)&&a(d.y)&&g.isInsidePlot(d.x-x+(d.width||0),d.y)&&g.isInsidePlot(d.x+x,d.y)),d[M?"show":"hide"]()}n(this,"afterSetOffset",{xOffset:t,width:e})},t.prototype.adjustStackPosition=function(t){var e=t.labelBox,i=t.verticalAlign,o=t.textAlign,r={bottom:0,middle:1,top:2,right:1,center:0,left:-1},s=r[i],n=r[o];return{x:e.width/2+e.width/2*n,y:e.height/2*s}},t.prototype.getStackBox=function(t){var e=this.axis,i=e.chart,o=t.boxTop,r=t.defaultX,s=t.xOffset,n=t.width,l=t.boxBottom,c=e.stacking.usePercentage?100:h(o,this.total,0),p=e.toPixels(c),d=t.xAxis||i.xAxis[0],u=h(r,d.translate(this.x))+s,f=Math.abs(p-e.toPixels(l||a(e.min)&&e.logarithmic&&e.logarithmic.lin2log(e.min)||0)),g=i.inverted,m=this.isNegative;return g?{x:(m?p:p-f)-i.plotLeft,y:d.height-u-n,width:f,height:n}:{x:u+d.transB-i.plotLeft,y:(m?p-f:p)-i.plotTop,width:n,height:f}},t}()}),i(e,"Core/Axis/Stacking/StackingAxis.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Axis/Axis.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Axis/Stacking/StackItem.js"],e["Core/Utilities.js"]],function(t,e,i,o,r){var s,n,a=t.getDeferredAnimation,h=i.series.prototype,l=r.addEvent,c=r.correctFloat,p=r.defined,d=r.destroyObjectProperties,u=r.fireEvent,f=r.isArray,g=r.isNumber,m=r.objectEach,v=r.pick;function y(){var t=this.inverted;this.axes.forEach(function(t){t.stacking&&t.stacking.stacks&&t.hasVisibleSeries&&(t.stacking.oldStacks=t.stacking.stacks)}),this.series.forEach(function(e){var i=e.xAxis&&e.xAxis.options||{};e.options.stacking&&e.reserveSpace()&&(e.stackKey=[e.type,v(e.options.stack,""),t?i.top:i.left,t?i.height:i.width].join(","))})}function x(){var t,e=this.stacking;if(e){var i=e.stacks;m(i,function(t,e){d(t),delete i[e]}),null===(t=e.stackTotalGroup)||void 0===t||t.destroy()}}function b(){this.stacking||(this.stacking=new T(this))}function M(t,e,i,o){return!p(t)||t.x!==e||o&&t.stackKey!==o?t={x:e,index:0,key:o,stackKey:o}:t.index++,t.key=[i,e,t.index].join(","),t}function C(){var t,e=this,i=e.yAxis,o=e.stackKey||"",r=i.stacking.stacks,s=e.processedXData,n=e.options.stacking,a=e[n+"Stacker"];a&&[o,"-"+o].forEach(function(i){for(var o,n,h,l,c=s.length;c--;)n=s[c],t=e.getStackIndicator(t,n,e.index,i),(l=null==(h=null===(o=r[i])||void 0===o?void 0:o[n])?void 0:h.points[t.key||""])&&a.call(e,l,h,c)})}function S(t,e,i){var o=e.total?100/e.total:0;t[0]=c(t[0]*o),t[1]=c(t[1]*o),this.stackedYData[i]=t[1]}function w(t){this.options.centerInCategory&&(this.is("column")||this.is("columnrange"))&&!this.options.stacking&&this.chart.series.length>1?h.setStackedPoints.call(this,t,"group"):t.stacking.resetStacks()}function k(t,e){var i,r,s,n,a,h,l,d,u,g,m,y=e||this.options.stacking;if(y&&this.reserveSpace()&&(({group:"xAxis"})[y]||"yAxis")===t.coll){var x=this.processedXData,b=this.processedYData,M=[],C=b.length,S=this.options,w=S.threshold||0,k=S.startFromThreshold?w:0,T=S.stack,A=e?"".concat(this.type,",").concat(y):this.stackKey||"",P="-"+A,O=this.negStacks,L=t.stacking,j=L.stacks,E=L.oldStacks;for(L.stacksTouched+=1,u=0;u0&&!1===this.singleStacks&&(a.points[d][0]=a.points[this.index+","+g+",0"][0])):(delete a.points[d],delete a.points[this.index]);var D=a.total||0;"percent"===y?(h=n?A:P,D=O&&(null===(r=j[h])||void 0===r?void 0:r[g])?(h=j[h][g]).total=Math.max(h.total||0,D)+Math.abs(m)||0:c(D+(Math.abs(m)||0))):"group"===y?(f(m)&&(m=m[0]),null!==m&&D++):D=c(D+(m||0)),"group"===y?a.cumulative=(D||1)-1:a.cumulative=c(v(a.cumulative,k)+(m||0)),a.total=D,null!==m&&(a.points[d].push(a.cumulative),M[u]=a.cumulative,a.hasValidPoints=!0)}"percent"===y&&(L.usePercentage=!0),"group"!==y&&(this.stackedYData=M),L.oldStacks={}}}var T=function(){function t(t){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=t}return t.prototype.buildStacks=function(){var t,e,i=this.axis,o=i.series,r="xAxis"===i.coll,s=i.options.reversedStacks,n=o.length;for(this.resetStacks(),this.usePercentage=!1,e=n;e--;)t=o[s?e:n-e-1],r&&t.setGroupedPoints(i),t.setStackedPoints(i);if(!r)for(e=0;e0?o=!n.connectNulls:m&&!e?o=!0:(0===p||o?d=[["M",c.plotX,c.plotY]]:r.getPointSpline?d=[r.getPointSpline(t,c,p)]:l?(d=1===l?[["L",g.plotX,f]]:2===l?[["L",(g.plotX+u)/2,g.plotY],["L",(g.plotX+u)/2,f]]:[["L",u,g.plotY]]).push(["L",u,f]):d=[["L",u,f]],h.push(c.x),l&&(h.push(c.x),2===l&&h.push(c.x)),a.push.apply(a,d),o=!1)}),a.xMap=h,r.graphPath=a,a},i.prototype.getZonesGraphs=function(t){return this.zones.forEach(function(e,i){var o=["zone-graph-"+i,"highcharts-graph highcharts-zone-graph-"+i+" "+(e.className||"")];this.chart.styledMode||o.push(e.color||this.color,e.dashStyle||this.options.dashStyle),t.push(o)},this),t},i.defaultOptions=n(t.defaultOptions,{legendSymbol:"lineMarker"}),i}(t);return e.registerSeriesType("line",h),h}),i(e,"Series/Area/AreaSeries.js",[e["Core/Color/Color.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});t.parse;var s=e.seriesTypes.line,n=i.extend,a=i.merge,h=i.objectEach,l=i.pick,c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.options=void 0,e.points=void 0,e}return r(e,t),e.prototype.drawGraph=function(){this.areaPath=[],t.prototype.drawGraph.apply(this);var e=this,i=this.areaPath,o=this.options,r=this.zones,s=[["area","highcharts-area",this.color,o.fillColor]];r.forEach(function(t,i){s.push(["zone-area-"+i,"highcharts-area highcharts-zone-area-"+i+" "+t.className,t.color||e.color,t.fillColor||o.fillColor])}),s.forEach(function(t){var r=t[0],s={},n=e[r],a=n?"animate":"attr";n?(n.endX=e.preventGraphAnimation?null:i.xMap,n.animate({d:i})):(s.zIndex=0,(n=e[r]=e.chart.renderer.path(i).addClass(t[1]).add(e.group)).isArea=!0),e.chart.styledMode||(t[3]?s.fill=t[3]:(s.fill=t[2],s["fill-opacity"]=l(o.fillOpacity,.75))),n[a](s),n.startX=i.xMap,n.shiftUnit=o.step?2:1})},e.prototype.getGraphPath=function(t){var e,i,o,r=s.prototype.getGraphPath,n=this.options,a=n.stacking,h=this.yAxis,c=[],p=[],d=this.index,u=h.stacking.stacks[this.stackKey],f=n.threshold,g=Math.round(h.getThreshold(n.threshold)),m=l(n.connectNulls,"percent"===a),v=function(i,o,r){var s,n,l=t[i],m=a&&u[l.x].points[d],v=l[r+"Null"]||0,y=l[r+"Cliff"]||0,x=!0;y||v?(s=(v?m[0]:m[1])+y,n=m[0]+y,x=!!v):!a&&t[o]&&t[o].isNull&&(s=n=f),void 0!==s&&(p.push({plotX:e,plotY:null===s?g:h.getThreshold(s),isNull:x,isCliff:!0}),c.push({plotX:e,plotY:null===n?g:h.getThreshold(n),doCurve:!1}))};t=t||this.points,a&&(t=this.getStackPoints(t));for(var y=0,x=t.length;y=0&&v=0&&yf&&r>l?(r=Math.max(f,l),a=2*l-r):rm&&a>l?(a=Math.max(m,l),r=2*l-a):a=Math.abs(e)&&a>.5;return o=a-(e=Math.round(e)+n),h&&o&&(e-=1,o+=1),{x:t,y:e,width:i,height:o}},e.prototype.adjustForMissingColumns=function(t,e,i,o){var r,s=this;if(!i.isNull&&o.columnCount>1){var n=this.xAxis.series.filter(function(t){return t.visible}).map(function(t){return t.index}),a=0,h=0;M(null===(r=this.xAxis.stacking)||void 0===r?void 0:r.stacks,function(t){if("number"==typeof i.x){var e=t[i.x.toString()];if(e&&v(e.points[s.index])){var o=Object.keys(e.points).filter(function(t){return!t.match(",")&&e.points[t]&&e.points[t].length>1}).map(parseFloat).filter(function(t){return -1!==n.indexOf(t)}).sort(function(t,e){return e-t});a=o.indexOf(s.index),h=o.length}}});var l=(h-1)*o.paddedWidth+e;t=(i.plotX||0)+l/2-e-a*o.paddedWidth}return t},e.prototype.translate=function(){var t=this,e=t.chart,i=t.options,o=t.dense=t.closestPointRange*t.xAxis.transA<2,s=t.borderWidth=b(i.borderWidth,o?0:1),n=t.xAxis,a=t.yAxis,h=i.threshold,l=b(i.minPointLength,5),c=t.getColumnMetrics(),p=c.width,d=t.pointXOffset=c.offset,g=t.dataMin,v=t.dataMax,x=t.barW=Math.max(p,1+2*s),M=t.translatedThreshold=a.getThreshold(h);e.inverted&&(M-=.5),i.pointPadding&&(x=Math.ceil(x)),r.prototype.translate.apply(t),t.points.forEach(function(o){var r=b(o.yBottom,M),s=999+Math.abs(r),m=o.plotX||0,C=u(o.plotY,-s,a.len+s);o.stackBox;var S,w=Math.min(C,r),k=Math.max(C,r)-w,T=p,A=m+d,P=x;l&&Math.abs(k)l?r-l:M-(S?l:0)),f(o.options.pointWidth)&&(A-=Math.round(((T=P=Math.ceil(o.options.pointWidth))-p)/2)),i.centerInCategory&&!i.stacking&&(A=t.adjustForMissingColumns(A,T,o,c)),o.barX=A,o.pointWidth=T,o.tooltipPos=e.inverted?[u(a.len+a.pos-e.plotLeft-C,a.pos-e.plotLeft,a.len+a.pos-e.plotLeft),n.len+n.pos-e.plotTop-A-P/2,k]:[n.left-e.plotLeft+A+P/2,u(C+a.pos-e.plotTop,a.pos-e.plotTop,a.len+a.pos-e.plotTop),k],o.shapeType=t.pointClass.prototype.shapeType||"roundedRect",o.shapeArgs=t.crispCol(A,o.isNull?M:w,P,o.isNull?0:k)}),m(this,"afterColumnTranslate")},e.prototype.drawGraph=function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},e.prototype.pointAttribs=function(t,e){var i,o,r,s=this.options,n=this.pointAttrToOptions||{},a=n.stroke||"borderColor",h=n["stroke-width"]||"borderWidth",l=t&&t.color||this.color,p=t&&t[a]||s[a]||l,d=t&&t.options.dashStyle||s.dashStyle,u=t&&t[h]||s[h]||this[h]||0,f=b(t&&t.opacity,s.opacity,1);t&&this.zones.length&&(o=t.getZone(),l=t.options.color||o&&(o.color||t.nonZonedColor)||this.color,o&&(p=o.borderColor||p,d=o.dashStyle||d,u=o.borderWidth||u)),e&&t&&(r=(i=x(s.states[e],t.options.states&&t.options.states[e]||{})).brightness,l=i.color||void 0!==r&&c(l).brighten(i.brightness).get()||l,p=i[a]||p,u=i[h]||u,d=i.dashStyle||d,f=b(i.opacity,f));var g={fill:l,stroke:p,"stroke-width":u,opacity:f};return d&&(g.dashstyle=d),g},e.prototype.drawPoints=function(t){void 0===t&&(t=this.points);var e,i=this,o=this.chart,r=i.options,s=o.renderer,n=r.animationLimit||250;t.forEach(function(t){var a=t.plotY,h=t.graphic,l=!!h,c=h&&o.pointCount=0)this.justifyDataLabel(e,i,l,w,o,r);else if(u(i.crop,!0)){var T=l.x,A=l.y;T+=k[0],A+=k[1],C=p.isInsidePlot(T,A,{paneCoordinates:!0,series:c})&&p.isInsidePlot(T+w.width,A+w.height,{paneCoordinates:!0,series:c})}i.shape&&!v&&e[r?"attr":"animate"]({anchorX:S[0],anchorY:S[1]})}r&&f&&(e.placed=!1),C||f&&!M?e.show():(e.hide(),e.placed=!1)}function v(){return this.plotGroup("dataLabelsGroup","data-labels",this.hasRendered?"inherit":"hidden",this.options.dataLabels.zIndex||6)}function y(t){var e=this.hasRendered||0,i=this.initDataLabelsGroup().attr({opacity:+e});return!e&&i&&(this.visible&&i.show(),this.options.animation?i.animate({opacity:1},t):i.attr({opacity:1})),i}function x(t){t=t||this.points;var e,i,o,a,l=this,p=l.chart,m=l.options,v=p.renderer,y=p.options.chart,x=y.backgroundColor,b=y.plotBackgroundColor,C=p.options.plotOptions,S=v.getContrast(c(b)&&b||c(x)&&x||"#000000"),w=m.dataLabels,k=g(w=M(M(null===(e=null==C?void 0:C.series)||void 0===e?void 0:e.dataLabels,null===(i=null==C?void 0:C[l.type])||void 0===i?void 0:i.dataLabels),w))[0],T=k.animation,A=k.defer?r(p,T,l):{defer:0,duration:0};h(this,"drawDataLabels"),(null===(o=l.hasDataLabels)||void 0===o?void 0:o.call(l))&&(a=this.initDataLabels(A),t.forEach(function(t){var e,i,o=t.dataLabels||[];g(M(w,t.dlOptions||(null===(e=t.options)||void 0===e?void 0:e.dataLabels))).forEach(function(e,i){var r,h,g,y,x,b=e.enabled&&t.visible&&(!t.isNull||t.dataLabelOnNull)&&function(t,e){var i=e.filter;if(i){var o=i.operator,r=t[i.property],s=i.value;return">"===o&&r>s||"<"===o&&r="===o&&r>=s||"<="===o&&r<=s||"=="===o&&r==s||"==="===o&&r===s}return!0}(t,e),M=e.style||{},C=e.distance,w={},k=o[i],T=!k;if(b){if(g=u(e[t.formatPrefix+"Format"],e.format),h=t.getLabelConfig(),y=n(g)?s(g,h,p):(e[t.formatPrefix+"Formatter"]||e.formatter).call(h,e),x=e.rotation,!p.styledMode&&(M.color=u(e.color,M.color,c(l.color)?l.color:void 0,"#000000"),"contrast"===M.color?(t.contrastColor=v.getContrast(t.color||l.color),M.color=!n(C)&&e.inside||0>f(C||0)||m.stacking?t.contrastColor:S):delete t.contrastColor,m.cursor&&(M.cursor=m.cursor)),w={r:e.borderRadius||0,rotation:x,padding:e.padding,zIndex:1},!p.styledMode){var A=e.backgroundColor,P=e.borderColor;w.fill="auto"===A?t.color:A,w.stroke="auto"===P?t.color:P,w["stroke-width"]=e.borderWidth}d(w,function(t,e){void 0===t&&delete w[e]})}if(!k||b&&n(y)&&!!k.div==!!e.useHTML&&(k.rotation&&e.rotation||k.rotation===e.rotation)||(k=void 0,T=!0),b&&n(y)&&(k?w.text=y:(k=x?v.text(y,0,0,e.useHTML).addClass("highcharts-data-label"):v.label(y,0,0,e.shape,void 0,void 0,e.useHTML,void 0,"data-label"))&&k.addClass(" highcharts-data-label-color-"+t.colorIndex+" "+(e.className||"")+(e.useHTML?" highcharts-tracker":"")),k)){k.options=e,k.attr(w),p.styledMode||k.css(M).shadow(e.shadow);var O=e[t.formatPrefix+"TextPath"]||e.textPath;O&&!e.useHTML&&(k.setTextPath((null===(r=t.getDataLabelPath)||void 0===r?void 0:r.call(t,k))||t.graphic,O),t.dataLabelPath&&!O.enabled&&(t.dataLabelPath=t.dataLabelPath.destroy())),k.added||k.add(a),l.alignDataLabel(t,k,e,void 0,T),k.isActive=!0,o[i]&&o[i]!==k&&o[i].destroy(),o[i]=k}});for(var r=o.length;r--;)o[r]&&o[r].isActive?o[r].isActive=!1:(null===(i=o[r])||void 0===i||i.destroy(),o.splice(r,1));t.dataLabel=o[0],t.dataLabels=o})),h(this,"afterDrawDataLabels")}function b(t,e,i,o,r,s){var n,a,h=this.chart,l=e.align,c=e.verticalAlign,p=t.box?0:t.padding||0,d=e.x,u=void 0===d?0:d,f=e.y,g=void 0===f?0:f;return(n=(i.x||0)+p)<0&&("right"===l&&u>=0?(e.align="left",e.inside=!0):u-=n,a=!0),(n=(i.x||0)+o.width-p)>h.plotWidth&&("left"===l&&u<=0?(e.align="right",e.inside=!0):u+=h.plotWidth-n,a=!0),(n=i.y+p)<0&&("bottom"===c&&g>=0?(e.verticalAlign="top",e.inside=!0):g-=n,a=!0),(n=(i.y||0)+o.height-p)>h.plotHeight&&("top"===c&&g<=0?(e.verticalAlign="bottom",e.inside=!0):g+=h.plotHeight-n,a=!0),a&&(e.x=u,e.y=g,t.placed=!s,t.align(e,void 0,r)),a}function M(t,e){var i,o=[];if(l(t)&&!l(e))o=t.map(function(t){return p(t,e)});else if(l(e)&&!l(t))o=e.map(function(e){return p(t,e)});else if(l(t)||l(e)){if(l(t)&&l(e))for(i=Math.max(t.length,e.length);i--;)o[i]=p(t[i],e[i])}else o=p(t,e);return o}function C(t,e,i,o,r){var s=this.chart,n=s.inverted,a=this.xAxis,h=a.reversed,l=((n?e.height:e.width)||0)/2,c=t.pointWidth,p=c?c/2:0;e.startXPos=n?r.x:h?-l-p:a.width-l+p,e.startYPos=n?h?this.yAxis.height-l+p:-l-p:r.y,o?"hidden"===e.visibility&&(e.show(),e.attr({opacity:0}).animate({opacity:1})):e.attr({opacity:1}).animate({opacity:0},void 0,e.hide),s.hasRendered&&(i&&e.attr({x:e.startXPos,y:e.startYPos}),e.placed=!0)}t.compose=function(t){if(i.pushUnique(e,t)){var r=t.prototype;r.initDataLabelsGroup=v,r.initDataLabels=y,r.alignDataLabel=m,r.drawDataLabels=x,r.justifyDataLabel=b,r.setDataLabelStartPos=C,r.hasDataLabels=o}}}(o||(o={})),o}),i(e,"Series/Column/ColumnDataLabel.js",[e["Core/Series/DataLabel.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=e.series,s=i.merge,n=i.pick;return function(e){var o=[];function a(t,e,i,o,a){var h=this.chart.inverted,l=t.series,c=(l.xAxis?l.xAxis.len:this.chart.plotSizeX)||0,p=(l.yAxis?l.yAxis.len:this.chart.plotSizeY)||0,d=t.dlBox||t.shapeArgs,u=n(t.below,t.plotY>n(this.translatedThreshold,p)),f=n(i.inside,!!this.options.stacking);if(d){if(o=s(d),!("allow"===i.overflow&&!1===i.crop)){o.y<0&&(o.height+=o.y,o.y=0);var g=o.y+o.height-p;g>0&&g {series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"}}}),i(e,"Series/Scatter/ScatterSeries.js",[e["Series/Scatter/ScatterSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=e.seriesTypes,n=s.column,a=s.line,h=i.addEvent,l=i.extend,c=i.merge,p=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.data=void 0,t.options=void 0,t.points=void 0,t}return r(i,e),i.prototype.applyJitter=function(){var t=this,e=this.options.jitter,i=this.points.length;e&&this.points.forEach(function(o,r){["x","y"].forEach(function(s,n){var a,h,l,c,p,d="plot"+s.toUpperCase();e[s]&&!o.isNull&&(h=t[s+"Axis"],p=e[s]*h.transA,h&&!h.isLog)&&(l=Math.max(0,o[d]-p),c=Math.min(h.len,o[d]+p),o[d]=l+(c-l)*((a=1e4*Math.sin(r+n*i))-Math.floor(a)),"x"===s&&(o.clientX=o.plotX))})})},i.prototype.drawGraph=function(){this.options.lineWidth?e.prototype.drawGraph.call(this):this.graph&&(this.graph=this.graph.destroy())},i.defaultOptions=c(a.defaultOptions,t),i}(a);return l(p.prototype,{drawTracker:n.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1}),h(p,"afterTranslate",function(){this.applyJitter()}),e.registerSeriesType("scatter",p),p}),i(e,"Series/CenteredUtilities.js",[e["Core/Globals.js"],e["Core/Series/Series.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r,s=t.deg2rad,n=i.fireEvent,a=i.isNumber,h=i.pick,l=i.relativeLength;return(o=r||(r={})).getCenter=function(){var t,i,o,r=this.options,s=this.chart,c=2*(r.slicedOffset||0),p=s.plotWidth-2*c,d=s.plotHeight-2*c,u=r.center,f=Math.min(p,d),g=r.thickness,m=r.size,v=r.innerSize||0;"string"==typeof m&&(m=parseFloat(m)),"string"==typeof v&&(v=parseFloat(v));var y=[h(u[0],"50%"),h(u[1],"50%"),h(m&&m<0?void 0:r.size,"100%"),h(v&&v<0?void 0:r.innerSize||0,"0%")];for(!s.angular||this instanceof e||(y[3]=0),i=0;i<4;++i)o=y[i],t=i<2||2===i&&/%$/.test(o),y[i]=l(o,[p,d,f,y[2]][i])+(t?c:0);return y[3]>y[2]&&(y[3]=y[2]),a(g)&&2*g0&&(y[3]=y[2]-2*g),n(this,"afterGetCenter",{positions:y}),y},o.getStartAndEndRadians=function(t,e){var i=a(t)?t:0,o=a(e)&&e>i&&e-i<360?e:i+360;return{start:s*(i+-90),end:s*(o+-90)}},r}),i(e,"Series/Pie/PiePoint.js",[e["Core/Animation/AnimationUtilities.js"],e["Core/Series/Point.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=this&&this.__assign||function(){return(s=Object.assign||function(t){for(var e,i=1,o=arguments.length;i=0},e.prototype.setVisible=function(t,e){var i=this,o=this.series,r=o.chart,s=o.options.ignoreHiddenPoint;e=p(e,s),t!==this.visible&&(this.visible=this.options.visible=t=void 0===t?!this.visible:t,o.options.data[o.data.indexOf(this)]=this.options,["graphic","dataLabel","connector"].forEach(function(e){i[e]&&i[e][t?"show":"hide"](t)}),this.legendItem&&r.legend.colorizeItem(this,t),t||"hover"!==this.state||this.setState(""),s&&(o.isDirty=!0),e&&r.redraw())},e.prototype.slice=function(t,e,i){var o=this.series;n(i,o.chart),e=p(e,!0),this.sliced=this.options.sliced=t=h(t)?t:!this.sliced,o.options.data[o.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate())},e}(e);return l(u.prototype,{connectorShapes:{fixedOffset:function(t,e,i){var o=e.breakAt,r=e.touchingSliceAt,s=i.softConnector?["C",t.x+("left"===t.alignment?-5:5),t.y,2*o.x-r.x,2*o.y-r.y,o.x,o.y]:["L",o.x,o.y];return[["M",t.x,t.y],s,["L",r.x,r.y]]},straight:function(t,e){var i=e.touchingSliceAt;return[["M",t.x,t.y],["L",i.x,i.y]]},crookedLine:function(t,e,i){var o=e.breakAt,r=e.touchingSliceAt,s=this.series,n=s.center,a=n[0],h=n[1],l=n[2]/2,c=s.chart,p=c.plotLeft,u=c.plotWidth,f="left"===t.alignment,g=t.x,m=t.y,v=o.x;if(i.crookDistance){var y=d(i.crookDistance,1);v=f?a+l+(u+p-a-l)*(1-y):p+(a-l)*y}else v=a+(h-m)*Math.tan((this.angle||0)-Math.PI/2);var x=[["M",g,m]];return(f?v<=g&&v>=o.x:v>=g&&v<=o.x)&&x.push(["L",v,m]),x.push(["L",o.x,o.y],["L",r.x,r.y]),x}}}),u}),i(e,"Series/Pie/PieSeriesDefaults.js",[],function(){return{borderRadius:3,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{connectorPadding:5,connectorShape:"crookedLine",crookDistance:void 0,distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}}}),i(e,"Series/Pie/PieSeries.js",[e["Series/CenteredUtilities.js"],e["Series/Column/ColumnSeries.js"],e["Core/Globals.js"],e["Series/Pie/PiePoint.js"],e["Series/Pie/PieSeriesDefaults.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/Symbols.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s,n,a,h){var l,c=this&&this.__extends||(l=function(t,e){return(l=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),p=t.getStartAndEndRadians,d=i.noop,u=h.clamp,f=h.extend,g=h.fireEvent,m=h.merge,v=h.pick;h.relativeLength,h.splat;var y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.center=void 0,e.data=void 0,e.options=void 0,e.points=void 0,e}return c(e,t),e.prototype.animate=function(t){var e=this,i=e.points,o=e.startAngleRad;t||i.forEach(function(t){var i=t.graphic,r=t.shapeArgs;i&&r&&(i.attr({r:v(t.startR,e.center&&e.center[3]/2),start:o,end:o}),i.animate({r:r.r,start:r.start,end:r.end},e.options.animation))})},e.prototype.drawEmpty=function(){var t,e,i=this.startAngleRad,o=this.endAngleRad,r=this.options;0===this.total&&this.center?(t=this.center[0],e=this.center[1],this.graph||(this.graph=this.chart.renderer.arc(t,e,this.center[1]/2,0,i,o).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:a.arc(t,e,this.center[2]/2,0,{start:i,end:o,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":r.borderWidth,fill:r.fillColor||"none",stroke:r.color||"#cccccc"})):this.graph&&(this.graph=this.graph.destroy())},e.prototype.drawPoints=function(){var t=this.chart.renderer;this.points.forEach(function(e){e.graphic&&e.hasNewShapeType()&&(e.graphic=e.graphic.destroy()),e.graphic||(e.graphic=t[e.shapeType](e.shapeArgs).add(e.series.group),e.delayedRendering=!0)})},e.prototype.generatePoints=function(){t.prototype.generatePoints.call(this),this.updateTotals()},e.prototype.getX=function(t,e,i,o){var r=this.center,s=this.radii?this.radii[i.index]||0:r[2]/2,n=o.dataLabelPosition,a=(null==n?void 0:n.distance)||0,h=Math.asin(u((t-r[1])/(s+a),-1,1));return r[0]+(e?-1:1)*(Math.cos(h)*(s+a))+(a>0?(e?-1:1)*(o.padding||0):0)},e.prototype.hasData=function(){return!!this.processedXData.length},e.prototype.redrawPoints=function(){var t,e,i,o,r=this,s=r.chart;this.drawEmpty(),r.group&&!s.styledMode&&r.group.shadow(r.options.shadow),r.points.forEach(function(n){var a={};e=n.graphic,!n.isNull&&e?(o=n.shapeArgs,t=n.getTranslate(),s.styledMode||(i=r.pointAttribs(n,n.selected&&"select")),n.delayedRendering?(e.setRadialReference(r.center).attr(o).attr(t),s.styledMode||e.attr(i).attr({"stroke-linejoin":"round"}),n.delayedRendering=!1):(e.setRadialReference(r.center),s.styledMode||m(!0,a,i),m(!0,a,o,t),e.animate(a)),e.attr({visibility:n.visible?"inherit":"hidden"}),e.addClass(n.getClassName(),!0)):e&&(n.graphic=e.destroy())})},e.prototype.sortByAngle=function(t,e){t.sort(function(t,i){return void 0!==t.angle&&(i.angle-t.angle)*e})},e.prototype.translate=function(t){g(this,"translate"),this.generatePoints();var e,i,o,r,s,n,a,h=this.options,l=h.slicedOffset,c=p(h.startAngle,h.endAngle),d=this.startAngleRad=c.start,u=(this.endAngleRad=c.end)-d,f=this.points,m=h.ignoreHiddenPoint,v=f.length,y=0;for(t||(this.center=t=this.getCenter()),n=0;n1.5*Math.PI?o-=2*Math.PI:o<-Math.PI/2&&(o+=2*Math.PI),a.slicedTranslation={translateX:Math.round(Math.cos(o)*l),translateY:Math.round(Math.sin(o)*l)},r=Math.cos(o)*t[2]/2,s=Math.sin(o)*t[2]/2,a.tooltipPos=[t[0]+.7*r,t[1]+.7*s],a.half=o<-Math.PI/2||o>Math.PI/2?1:0,a.angle=o}g(this,"afterTranslate")},e.prototype.updateTotals=function(){var t,e,i=this.points,o=i.length,r=this.options.ignoreHiddenPoint,s=0;for(t=0;t0&&(e.visible||!r)?e.y/s*100:0,e.total=s},e.defaultOptions=m(s.defaultOptions,r),e}(s);return f(y.prototype,{axisTypes:[],directTouch:!0,drawGraph:void 0,drawTracker:e.prototype.drawTracker,getCenter:t.getCenter,getSymbol:d,isCartesian:!1,noSharedTooltip:!0,pointAttribs:e.prototype.pointAttribs,pointClass:o,requireSorting:!1,searchPoint:d,trackerGroups:["group","dataLabelsGroup"]}),n.registerSeriesType("pie",y),y}),i(e,"Series/Pie/PieDataLabel.js",[e["Core/Series/DataLabel.js"],e["Core/Globals.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,o,r){var s,n=e.noop,a=i.distribute,h=o.series,l=r.arrayMax,c=r.clamp,p=r.defined,d=r.pick,u=r.relativeLength;return function(e){var i=[],o={radialDistributionY:function(t,e){var i;return((null===(i=e.dataLabelPosition)||void 0===i?void 0:i.top)||0)+t.distributeBox.pos},radialDistributionX:function(t,e,i,o,r){var s=r.dataLabelPosition;return t.getX(i<((null==s?void 0:s.top)||0)+2||i>((null==s?void 0:s.bottom)||0)-2?o:i,e.half,e,r)},justify:function(t,e,i,o){var r;return o[0]+(t.half?-1:1)*(i+((null===(r=e.dataLabelPosition)||void 0===r?void 0:r.distance)||0))},alignToPlotEdges:function(t,e,i,o){var r=t.getBBox().width;return e?r+o:i-r-o},alignToConnectors:function(t,e,i,o){var r,s=0;return t.forEach(function(t){(r=t.dataLabel.getBBox().width)>s&&(s=r)}),e?s+o:i-s-o}};function s(t,e){var i=this.center,o=this.options,r=i[2]/2,s=t.angle||0,n=Math.cos(s),a=Math.sin(s),h=i[0]+n*r,l=i[1]+a*r,c=Math.min((o.slicedOffset||0)+(o.borderWidth||0),e/5);return{natural:{x:h+n*e,y:l+a*e},computed:{},alignment:e<0?"center":t.half?"right":"left",connectorPosition:{breakAt:{x:h+n*c,y:l+a*c},touchingSliceAt:{x:h,y:l}},distance:e}}function f(){var t,e,i,o,r=this,s=this,n=s.points,c=s.chart,f=c.plotWidth,g=c.plotHeight,m=c.plotLeft,v=Math.round(c.chartWidth/3),y=s.center,x=y[2]/2,b=y[1],M=[[],[]],C=[0,0,0,0],S=s.dataLabelPositioners,w=0;s.visible&&(null===(t=s.hasDataLabels)||void 0===t?void 0:t.call(s))&&(n.forEach(function(t){(t.dataLabels||[]).forEach(function(t){t.shortened&&(t.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),t.shortened=!1)})}),h.prototype.drawDataLabels.apply(s),n.forEach(function(t){(t.dataLabels||[]).forEach(function(e,i){var o,s=y[2]/2,n=e.options,a=u((null==n?void 0:n.distance)||0,s);0===i&&M[t.half].push(t),!p(null===(o=null==n?void 0:n.style)||void 0===o?void 0:o.width)&&e.getBBox().width>v&&(e.css({width:Math.round(.7*v)+"px"}),e.shortened=!0),e.dataLabelPosition=r.getDataLabelPosition(t,a),w=Math.max(w,a)})}),M.forEach(function(t,e){var r,n,h,l=t.length,u=[],v=0;l&&(s.sortByAngle(t,e-.5),w>0&&(r=Math.max(0,b-x-w),n=Math.min(b+x+w,c.plotHeight),t.forEach(function(t){(t.dataLabels||[]).forEach(function(e,i){var o,r=e.dataLabelPosition;r&&r.distance>0&&(r.top=Math.max(0,b-x-r.distance),r.bottom=Math.min(b+x+r.distance,c.plotHeight),v=e.getBBox().height||21,t.distributeBox={target:((null===(o=e.dataLabelPosition)||void 0===o?void 0:o.natural.y)||0)-r.top+v/2,size:v,rank:t.y},u.push(t.distributeBox))})}),a(u,h=n+v-r,h/5)),t.forEach(function(r){(r.dataLabels||[]).forEach(function(n){var a=n.options||{},h=r.distributeBox,l=n.dataLabelPosition,c=(null==l?void 0:l.natural.y)||0,v=a.connectorPadding||0,b=0,M=c,w="inherit";if(l){if(u&&p(h)&&l.distance>0&&(void 0===h.pos?w="hidden":(o=h.size,M=S.radialDistributionY(r,n))),a.justify)b=S.justify(r,n,x,y);else switch(a.alignTo){case"connectors":b=S.alignToConnectors(t,e,f,m);break;case"plotEdges":b=S.alignToPlotEdges(n,e,f,m);break;default:b=S.radialDistributionX(s,r,M,c,n)}if(l.attribs={visibility:w,align:l.alignment},l.posAttribs={x:b+(a.x||0)+(({left:v,right:-v})[l.alignment]||0),y:M+(a.y||0)-n.getBBox().height/2},l.computed.x=b,l.computed.y=M,d(a.crop,!0)){i=n.getBBox().width;var k=void 0;b-if-v&&0===e&&(k=Math.round(b+i-f+v),C[1]=Math.max(k,C[1])),M-o/2<0?C[0]=Math.max(Math.round(-M+o/2),C[0]):M+o/2>g&&(C[2]=Math.max(Math.round(M+o/2-g),C[2])),l.sideOverflow=k}}})}))}),(0===l(C)||this.verifyDataLabelOverflow(C))&&(this.placeDataLabels(),this.points.forEach(function(t){(t.dataLabels||[]).forEach(function(i){var o,r=i.options||{},n=r.connectorColor,a=r.connectorWidth,h=void 0===a?1:a,l=i.dataLabelPosition;if(h){var p=void 0;e=i.connector,l&&l.distance>0?(p=!e,e||(i.connector=e=c.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+t.colorIndex+(t.className?" "+t.className:"")).add(s.dataLabelsGroup)),c.styledMode||e.attr({"stroke-width":h,stroke:n||t.color||"#666666"}),e[p?"attr":"animate"]({d:t.getConnectorPath(i)}),e.attr({visibility:null===(o=l.attribs)||void 0===o?void 0:o.visibility})):e&&(i.connector=e.destroy())}})})))}function g(){this.points.forEach(function(t){(t.dataLabels||[]).forEach(function(t){var e,i=t.dataLabelPosition;i?(i.sideOverflow&&(t.css({width:Math.max(t.getBBox().width-i.sideOverflow,0)+"px",textOverflow:((null===(e=t.options)||void 0===e?void 0:e.style)||{}).textOverflow||"ellipsis"}),t.shortened=!0),t.attr(i.attribs),t[t.moved?"animate":"attr"](i.posAttribs),t.moved=!0):t&&t.attr({y:-9999})}),delete t.distributeBox},this)}function m(t){var e=this.center,i=this.options,o=i.center,r=i.minSize||80,s=r,n=null!==i.size;return!n&&(null!==o[0]?s=Math.max(e[2]-Math.max(t[1],t[3]),r):(s=Math.max(e[2]-t[1]-t[3],r),e[0]+=(t[3]-t[1])/2),null!==o[1]?s=c(s,r,e[2]-Math.max(t[0],t[2])):(s=c(s,r,e[2]-t[0]-t[2]),e[1]+=(t[0]-t[2])/2),s=n.x+n.width||a.x+a.width<=n.x||a.y>=n.y+n.height||a.y+a.height<=n.y)&&((r.labelrank0)?(o.oldOpacity=o.opacity,o.newOpacity=1,l(o,e)):i.push(o)})},r=0;r1?v:m);return s}function v(){var t,e;if(this.options.borderRadius&&!(this.chart.is3d&&this.chart.is3d()))for(var i=this.options,o=this.yAxis,s="percent"===i.stacking,n=null===(e=null===(t=r.plotOptions)||void 0===t?void 0:t[this.type])||void 0===e?void 0:e.borderRadius,l=y(i.borderRadius,h(n)?n:{}),c=o.options.reversed,d=0,u=this.points;dthis.borderWidth&&(P="all"),P||(P="end");var O=Math.min(p(l.radius,v),v/2,"all"===P?b/2:1/0)||0;"end"===P&&(A&&(C-=O),S+=O),a(g,{brBoxHeight:S,brBoxY:C,r:O})}}}function y(t,e){return h(t)||(t={radius:t||0}),l(u,e,t)}function x(){for(var t=y(this.options.borderRadius),e=0,i=this.points;e-.1?0:h,v=f-h>-.1?0:h,y=Math.max(m&&u,0),x=Math.max(v&&f,0),b=[t+m,e],M=[t+i-m,e],C=[t+i,e+m],S=[t+i,e+r-v],w=[t+i-v,e+r],k=[t+v,e+r],T=[t,e+r-v],A=[t,e+m],P=function(t,e){return Math.sqrt(Math.pow(t,2)-Math.pow(e,2))};if(y){var O=P(m,m-y);b[0]-=O,M[0]+=O,C[1]=A[1]=e+m-y}if(r=n(i.minWidth,0)&&this.chartHeight>=n(i.minHeight,0)}).call(this)&&e.push(t._id)}function c(t,e){var o,n=this,h=this.options.responsive,l=this.currentResponsive,c=[];!e&&h&&h.rules&&h.rules.forEach(function(t){void 0===t._id&&(t._id=a()),n.matchResponsiveRule(t,c)},this);var p=s.apply(void 0,c.map(function(t){return r((h||{}).rules||[],function(e){return e._id===t})}).map(function(t){return t&&t.chartOptions}));p.isResponsiveOptions=!0,c=c.toString()||void 0;var d=l&&l.ruleIds;c!==d&&(l&&this.update(l.undoOptions,t,!0),c?((o=i(p,this.options,!0,this.collectionsWithUpdate)).isResponsiveOptions=!0,this.currentResponsive={ruleIds:c,mergedOptions:p,undoOptions:o},this.update(p,t,!0)):this.currentResponsive=void 0)}e.compose=function(e){return t.pushUnique(h,e)&&o(e.prototype,{matchResponsiveRule:l,setResponsive:c}),e}}(e||(e={})),e}),i(e,"masters/highcharts.src.js",[e["Core/Globals.js"],e["Core/Utilities.js"],e["Core/Defaults.js"],e["Core/Animation/Fx.js"],e["Core/Animation/AnimationUtilities.js"],e["Core/Renderer/HTML/AST.js"],e["Core/Templating.js"],e["Core/Renderer/RendererUtilities.js"],e["Core/Renderer/SVG/SVGElement.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Renderer/HTML/HTMLElement.js"],e["Core/Renderer/HTML/HTMLRenderer.js"],e["Core/Axis/Axis.js"],e["Core/Axis/DateTimeAxis.js"],e["Core/Axis/LogarithmicAxis.js"],e["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],e["Core/Axis/Tick.js"],e["Core/Tooltip.js"],e["Core/Series/Point.js"],e["Core/Pointer.js"],e["Core/Legend/Legend.js"],e["Core/Chart/Chart.js"],e["Core/Axis/Stacking/StackingAxis.js"],e["Core/Axis/Stacking/StackItem.js"],e["Core/Series/Series.js"],e["Core/Series/SeriesRegistry.js"],e["Series/Column/ColumnSeries.js"],e["Series/Column/ColumnDataLabel.js"],e["Series/Pie/PieSeries.js"],e["Series/Pie/PieDataLabel.js"],e["Core/Series/DataLabel.js"],e["Extensions/OverlappingDataLabels.js"],e["Extensions/BorderRadius.js"],e["Core/Responsive.js"],e["Core/Color/Color.js"],e["Core/Time.js"]],function(t,e,i,o,r,s,n,a,h,l,c,p,d,u,f,g,m,v,y,x,b,M,C,S,w,k,T,A,P,O,L,j,E,D,B,I){return t.animate=r.animate,t.animObject=r.animObject,t.getDeferredAnimation=r.getDeferredAnimation,t.setAnimation=r.setAnimation,t.stop=r.stop,t.timers=o.timers,t.AST=s,t.Axis=d,t.Chart=M,t.chart=M.chart,t.Fx=o,t.Legend=b,t.PlotLineOrBand=g,t.Point=y,t.Pointer=x,t.Series=w,t.StackItem=S,t.SVGElement=h,t.SVGRenderer=l,t.Templating=n,t.Tick=m,t.Time=I,t.Tooltip=v,t.Color=B,t.color=B.parse,p.compose(l),c.compose(h),x.compose(M),b.compose(M),t.defaultOptions=i.defaultOptions,t.getOptions=i.getOptions,t.time=i.defaultTime,t.setOptions=i.setOptions,t.dateFormat=n.dateFormat,t.format=n.format,t.numberFormat=n.numberFormat,e.extend(t,e),t.distribute=a.distribute,t.seriesType=k.seriesType,A.compose(T),E.compose(w,P,h,l),L.compose(w),u.compose(d),f.compose(d),j.compose(M),O.compose(P),g.compose(d),D.compose(M),C.compose(d,M,w),v.compose(x),t}),i(e,"Core/Axis/Color/ColorAxisComposition.js",[e["Core/Color/Color.js"],e["Core/Utilities.js"]],function(t,e){var i,o=t.parse,r=e.addEvent,s=e.extend,n=e.merge,a=e.pick,h=e.splat;return function(t){var i,l=[];function c(){var t=this,e=this.options;this.colorAxis=[],e.colorAxis&&(e.colorAxis=h(e.colorAxis),e.colorAxis.map(function(e){return new i(t,e)}))}function p(t){var e,i,o=this,r=this.chart.colorAxis||[],s=function(e){var i=t.allItems.indexOf(e);-1!==i&&(o.destroyItem(t.allItems[i]),t.allItems.splice(i,1))},n=[];for(r.forEach(function(t){(e=t.options)&&e.showInLegend&&(e.dataClasses&&e.visible?n=n.concat(t.getDataClassLegendSymbols()):e.visible&&n.push(t),t.series.forEach(function(t){(!t.options.showInLegend||e.dataClasses)&&("point"===t.options.legendType?t.points.forEach(function(t){s(t)}):s(t))}))}),i=n.length;i--;)t.allItems.unshift(n[i])}function d(t){t.visible&&t.item.legendColor&&t.item.legendItem.symbol.attr({fill:t.item.legendColor})}function u(t){var e;null===(e=this.chart.colorAxis)||void 0===e||e.forEach(function(e){e.update({},t.redraw)})}function f(){(this.chart.colorAxis&&this.chart.colorAxis.length||this.colorAttribs)&&this.translateColors()}function g(){var t=this.axisTypes;t?-1===t.indexOf("colorAxis")&&t.push("colorAxis"):this.axisTypes=["colorAxis"]}function m(t){var e=this,i=t?"show":"hide";e.visible=e.options.visible=!!t,["graphic","dataLabel"].forEach(function(t){e[t]&&e[t][i]()}),this.series.buildKDTree()}function v(){var t=this,e=this.data.length?this.data:this.points,i=this.options.nullColor,o=this.colorAxis,r=this.colorKey;e.forEach(function(e){var s=e.getNestedProperty(r),n=e.options.color||(e.isNull||null===e.value?i:o&&void 0!==s?o.toColor(s,e):e.color||t.color);n&&e.color!==n&&(e.color=n,"point"===t.options.legendType&&e.legendItem&&e.legendItem.label&&t.chart.legend.colorizeItem(e,e.visible))})}function y(){this.elem.attr("fill",o(this.start).tweenTo(o(this.end),this.pos),void 0,!0)}function x(){this.elem.attr("stroke",o(this.start).tweenTo(o(this.end),this.pos),void 0,!0)}t.compose=function(t,o,h,b,M){if(i||(i=t),e.pushUnique(l,o)){var C,S=o.prototype;S.collectionsWithUpdate.push("colorAxis"),S.collectionsWithInit.colorAxis=[S.addColorAxis],r(o,"afterGetAxes",c),C=o.prototype.createAxis,o.prototype.createAxis=function(t,e){if("colorAxis"!==t)return C.apply(this,arguments);var o=new i(this,n(e.axis,{index:this[t].length,isX:!1}));return this.isDirtyLegend=!0,this.axes.forEach(function(t){t.series=[]}),this.series.forEach(function(t){t.bindAxes(),t.isDirtyData=!0}),a(e.redraw,!0)&&this.redraw(e.animation),o}}if(e.pushUnique(l,h)){var w=h.prototype;w.fillSetter=y,w.strokeSetter=x}e.pushUnique(l,b)&&(r(b,"afterGetAllItems",p),r(b,"afterColorizeItem",d),r(b,"afterUpdate",u)),e.pushUnique(l,M)&&(s(M.prototype,{optionalAxis:"colorAxis",translateColors:v}),s(M.prototype.pointClass.prototype,{setVisible:m}),r(M,"afterTranslate",f,{order:1}),r(M,"bindAxes",g))},t.pointSetVisible=m}(i||(i={})),i}),i(e,"Core/Axis/Color/ColorAxisDefaults.js",[],function(){return{lineWidth:0,minPadding:0,maxPadding:0,gridLineColor:"#ffffff",gridLineWidth:1,tickPixelInterval:72,startOnTick:!0,endOnTick:!0,offset:0,marker:{animation:{duration:50},width:.01,color:"#999999"},labels:{distance:8,overflow:"justify",rotation:0},minColor:"#e6e9ff",maxColor:"#0022ff",tickLength:5,showInLegend:!0}}),i(e,"Core/Axis/Color/ColorAxisLike.js",[e["Core/Color/Color.js"],e["Core/Utilities.js"]],function(t,e){var i,o,r=t.parse,s=e.merge;return(i=o||(o={})).initDataClasses=function(t){var e,i,o,n=this.chart,a=this.legendItem=this.legendItem||{},h=this.options,l=t.dataClasses||[],c=n.options.chart.colorCount,p=0;this.dataClasses=i=[],a.labels=[];for(var d=0,u=l.length;d=o)&&(void 0===r||t<=r)){s=n.color,e&&(e.dataClass=a,e.colorIndex=n.colorIndex);break}}else{for(i=this.normalizedValue(t),a=l.length;a--&&!(i>l[a][0]););o=l[a]||l[a+1],i=1-((r=l[a+1]||o)[0]-i)/(r[0]-o[0]||1),s=o.color.tweenTo(r.color,i)}return s},o}),i(e,"Core/Axis/Color/ColorAxis.js",[e["Core/Axis/Axis.js"],e["Core/Axis/Color/ColorAxisComposition.js"],e["Core/Axis/Color/ColorAxisDefaults.js"],e["Core/Axis/Color/ColorAxisLike.js"],e["Core/Legend/LegendSymbol.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s,n){var a,h=this&&this.__extends||(a=function(t,e){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),l=s.series,c=n.extend,p=n.fireEvent,d=n.isArray,u=n.isNumber,f=n.merge,g=n.pick,m=function(t){function o(e,i){var o=t.call(this,e,i)||this;return o.beforePadding=!1,o.chart=void 0,o.coll="colorAxis",o.dataClasses=void 0,o.options=void 0,o.stops=void 0,o.visible=!0,o.init(e,i),o}return h(o,t),o.compose=function(t,i,r,s){e.compose(o,t,i,r,s)},o.prototype.init=function(e,i){var r=e.options.legend||{},s=i.layout?"vertical"!==i.layout:"vertical"!==r.layout,n=i.visible,a=f(o.defaultColorAxisOptions,i,{showEmpty:!1,title:null,visible:r.enabled&&!1!==n});this.side=i.side||s?2:1,this.reversed=i.reversed||!s,this.opposite=!s,t.prototype.init.call(this,e,a,"colorAxis"),this.userOptions=i,d(e.userOptions.colorAxis)&&(e.userOptions.colorAxis[this.index]=i),i.dataClasses&&this.initDataClasses(i),this.initStops(),this.horiz=s,this.zoomEnabled=!1},o.prototype.hasData=function(){return!!(this.tickPositions||[]).length},o.prototype.setTickPositions=function(){if(!this.dataClasses)return t.prototype.setTickPositions.call(this)},o.prototype.setOptions=function(e){t.prototype.setOptions.call(this,e),this.options.crosshair=this.options.marker},o.prototype.setAxisSize=function(){var t,e,i,r,s=this.legendItem&&this.legendItem.symbol,n=this.chart,a=n.options.legend||{};s?(this.left=t=s.attr("x"),this.top=e=s.attr("y"),this.width=i=s.attr("width"),this.height=r=s.attr("height"),this.right=n.chartWidth-t-i,this.bottom=n.chartHeight-e-r,this.len=this.horiz?i:r,this.pos=this.horiz?t:e):this.len=(this.horiz?a.symbolWidth:a.symbolHeight)||o.defaultLegendLength},o.prototype.getOffset=function(){var e=this.legendItem&&this.legendItem.group,i=this.chart.axisOffset[this.side];if(e){this.axisParent=e,t.prototype.getOffset.call(this);var r=this.chart.legend;r.allItems.forEach(function(t){t instanceof o&&t.drawLegendSymbol(r,t)}),r.render(),this.chart.getMargins(!0),this.added||(this.added=!0,this.labelLeft=0,this.labelRight=this.width),this.chart.axisOffset[this.side]=i}},o.prototype.setLegendColor=function(){var t=this.horiz,e=this.reversed,i=e?1:0,o=e?0:1,r=t?[i,0,o,0]:[0,o,0,i];this.legendColor={linearGradient:{x1:r[0],y1:r[1],x2:r[2],y2:r[3]},stops:this.stops}},o.prototype.drawLegendSymbol=function(t,e){var i,r=e.legendItem||{},s=t.padding,n=t.options,a=this.options.labels,h=g(n.itemDistance,10),l=this.horiz,c=g(n.symbolWidth,l?o.defaultLegendLength:12),p=g(n.symbolHeight,l?12:o.defaultLegendLength),d=g(n.labelPadding,l?16:30);this.setLegendColor(),r.symbol||(r.symbol=this.chart.renderer.symbol("roundedRect",0,t.baseline-11,c,p,{r:null!==(i=n.symbolRadius)&&void 0!==i?i:3}).attr({zIndex:1}).add(r.group)),r.labelWidth=c+s+(l?h:g(a.x,a.distance)+this.maxLabelLength),r.labelHeight=p+s+(l?d:0)},o.prototype.setState=function(t){this.series.forEach(function(e){e.setState(t)})},o.prototype.setVisible=function(){},o.prototype.getSeriesExtremes=function(){var t,e,i,o,r,s,n,a,h=this.series,c=h.length;for(this.dataMin=1/0,this.dataMax=-1/0;c--;){if(e=(s=h[c]).colorKey=g(s.options.colorKey,s.colorKey,s.pointValKey,s.zoneAxis,"y"),o=s.pointArrayMap,r=s[e+"Min"]&&s[e+"Max"],s[e+"Data"])t=s[e+"Data"];else if(o){if(t=[],i=o.indexOf(e),n=s.yData,i>=0&&n)for(a=0;aa+h&&(o=a+h+2),i.plotX=o,i.plotY=this.len-o,t.prototype.drawCrosshair.call(this,e,i),i.plotX=s,i.plotY=n,this.cross&&!this.cross.addedToColorAxis&&r.group&&(this.cross.addClass("highcharts-coloraxis-marker").add(r.group),this.cross.addedToColorAxis=!0,this.chart.styledMode||"object"!=typeof this.crosshair||this.cross.attr({fill:this.crosshair.color})))},o.prototype.getPlotLinePath=function(e){var i=this.left,o=e.translatedValue,r=this.top;return u(o)?this.horiz?[["M",o-4,r-6],["L",o+4,r-6],["L",o,r],["Z"]]:[["M",i,o],["L",i-6,o+6],["L",i-6,o-6],["Z"]]:t.prototype.getPlotLinePath.call(this,e)},o.prototype.update=function(e,i){var o=this.chart.legend;this.series.forEach(function(t){t.isDirtyData=!0}),(e.dataClasses&&o.allItems||this.dataClasses)&&this.destroyItems(),t.prototype.update.call(this,e,i),this.legendItem&&this.legendItem.label&&(this.setLegendColor(),o.colorizeItem(this,!0))},o.prototype.destroyItems=function(){var t=this.chart,e=this.legendItem||{};if(e.label)t.legend.destroyItem(this);else if(e.labels)for(var i=0,o=e.labels;i "),void 0!==d&&(t+=f(d,n)+a),void 0!==d&&void 0!==u&&(t+=" - "),void 0!==u&&(t+=f(u,n)+a),o.push(c({chart:i,name:t,options:{},drawLegendSymbol:r.rectangle,visible:!0,isDataClass:!0,setState:function(t){for(var e=0,i=h(l);e=1&&(h+=Math.abs(r),e&&clearTimeout(e),e=setTimeout(function(){h=0},50)),h<10&&o.isInsidePlot(t.chartX-o.plotLeft,t.chartY-o.plotTop)&&o.mapView&&o.mapView.zoomBy(-((o.options.mapNavigation.mouseWheelSensitivity-1)*r),void 0,[t.chartX,t.chartY],!(1>Math.abs(r))&&void 0)}function p(t,e,i){var r=this.chart;if(e=t.call(this,e,i),r&&r.mapView){var s=r.mapView.pixelsToLonLat({x:e.chartX-r.plotLeft,y:e.chartY-r.plotTop});s&&o(e,s)}return e}function d(t,e,i,o,r,s,n){var a;t.call(this,e,i,o,r,s,n),"map"===this.chart.options.chart.type&&this.hasZoom&&(a=o.scaleX>o.scaleY,this.pinchTranslateDirection(!a,e,i,o,r,s,n,a?o.scaleX:o.scaleY))}function u(t){var e=this.chart.options.mapNavigation;e&&r(e.enableTouchZoom,e.enabled)&&(this.chart.zooming.pinchType="xy"),t.apply(this,[].slice.call(arguments,1))}t.compose=function(t){if(s(a,t)){var e=t.prototype;o(e,{onContainerDblClick:l,onContainerMouseWheel:c}),n(e,"normalize",p),n(e,"pinchTranslate",d),n(e,"zoomOption",u)}}}(e||(e={})),e}),i(e,"Maps/MapSymbols.js",[e["Core/Utilities.js"]],function(t){var e,i=t.pushUnique,o=[];function r(t,i,o,r,s){if(s){var n=(null==s?void 0:s.r)||0;s.brBoxY=i-n,s.brBoxHeight=r+n}return e.roundedRect(t,i,o,r,s)}function s(t,i,o,r,s){if(s){var n=(null==s?void 0:s.r)||0;s.brBoxHeight=r+n}return e.roundedRect(t,i,o,r,s)}return{compose:function(t){i(o,t)&&((e=t.prototype.symbols).bottombutton=r,e.topbutton=s)}}}),i(e,"Maps/MapNavigation.js",[e["Core/Defaults.js"],e["Maps/MapNavigationDefaults.js"],e["Maps/MapPointer.js"],e["Maps/MapSymbols.js"],e["Core/Utilities.js"]],function(t,e,i,o,r){var s=t.setOptions,n=r.addEvent,a=r.extend,h=r.merge,l=r.objectEach,c=r.pick,p=r.pushUnique,d=[];function u(t){t&&(t.preventDefault&&t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)}return function(){function t(t){this.navButtonsGroup=void 0,this.chart=t,this.navButtons=[],this.init(t)}return t.compose=function(r,a,h){i.compose(a),o.compose(h),p(d,r)&&n(r,"beforeRender",function(){this.mapNavigation=new t(this),this.mapNavigation.update()}),p(d,s)&&s(e)},t.prototype.init=function(t){this.chart=t},t.prototype.update=function(t){var e,i=this,o=i.chart,r=i.navButtons,s=function(t){this.handler.call(o,t),u(t)},p=o.options.mapNavigation;for(t&&(p=o.options.mapNavigation=h(o.options.mapNavigation,t));r.length;)r.pop().destroy();!o.renderer.forExport&&c(p.enableButtons,p.enabled)&&(i.navButtonsGroup||(i.navButtonsGroup=o.renderer.g().attr({zIndex:4}).add()),l(p.buttons,function(t,l){t=h(p.buttonOptions,t),!o.styledMode&&t.theme&&((e=t.theme).style=h(t.theme.style,t.style));var c,d=t.text,f=t.width,g=void 0===f?0:f,m=t.height,v=void 0===m?0:m,y=t.padding,x=void 0===y?0:y,b=o.renderer.button("+"!==d&&"-"!==d&&d||"",0,0,s,e,void 0,void 0,void 0,"zoomIn"===l?"topbutton":"bottombutton").addClass("highcharts-map-navigation highcharts-"+({zoomIn:"zoom-in",zoomOut:"zoom-out"})[l]).attr({width:g,height:v,title:o.options.lang[l],padding:t.padding,zIndex:5}).add(i.navButtonsGroup);if("+"===d||"-"===d){var M=g+1,C=[["M",x+3,x+v/2],["L",x+M-3,x+v/2]];"+"===d&&C.push(["M",x+M/2,x+3],["L",x+M/2,x+v-3]),o.renderer.path(C).addClass("highcharts-button-symbol").attr(o.styledMode?{}:{stroke:null===(c=t.style)||void 0===c?void 0:c.color,"stroke-width":3,"stroke-linecap":"round"}).add(b)}if(b.handler=t.onclick,n(b.element,"dblclick",u),r.push(b),a(t,{width:b.width,height:2*(b.height||0)}),o.hasLoaded)b.align(t,!1,t.alignTo);else var S=n(o,"load",function(){b.element&&b.align(t,!1,t.alignTo),S()})}),o.hasLoaded||n(o,"render",function(){var t=o.exportingGroup&&o.exportingGroup.getBBox();if(t){var e=i.navButtonsGroup.getBBox();if(!(e.x>=t.x+t.width||e.x+e.width<=t.x||e.y>=t.y+t.height||e.y+e.height<=t.y)){var r=-e.y-e.height+t.y-5,s=t.y+t.height-e.y+5,n=p.buttonOptions&&p.buttonOptions.verticalAlign;i.navButtonsGroup.attr({translateY:"bottom"===n?r:s})}}})),this.updateEvents(p)},t.prototype.updateEvents=function(t){var e=this.chart;c(t.enableDoubleClickZoom,t.enabled)||t.enableDoubleClickZoomTo?this.unbindDblClick=this.unbindDblClick||n(e.container,"dblclick",function(t){e.pointer.onContainerDblClick(t)}):this.unbindDblClick&&(this.unbindDblClick=this.unbindDblClick()),c(t.enableMouseWheelZoom,t.enabled)?this.unbindMouseWheel=this.unbindMouseWheel||n(e.container,"wheel",function(t){return e.pointer.inClass(t.target,"highcharts-no-mousewheel")||(e.pointer.onContainerMouseWheel(t),u(t)),!1}):this.unbindMouseWheel&&(this.unbindMouseWheel=this.unbindMouseWheel())},t}()}),i(e,"Series/ColorMapComposition.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){var i,o=t.seriesTypes.column.prototype,r=e.addEvent,s=e.defined;return function(t){var i=[];function n(t){this.moveToTopOnHover&&this.graphic&&this.graphic.attr({zIndex:t&&"hover"===t.state?1:0})}t.pointMembers={dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return null!==this.value&&this.value!==1/0&&this.value!==-1/0&&(void 0===this.value||!isNaN(this.value))}},t.seriesMembers={colorKey:"value",axisTypes:["xAxis","yAxis","colorAxis"],parallelArrays:["x","y","value"],pointArrayMap:["value"],trackerGroups:["group","markerGroup","dataLabelsGroup"],colorAttribs:function(t){var e={};return s(t.color)&&(!t.state||"normal"===t.state)&&(e[this.colorProp||"fill"]=t.color),e},pointAttribs:o.pointAttribs},t.compose=function(t){var o=t.prototype.pointClass;return e.pushUnique(i,o)&&r(o,"afterSetState",n),t}}(i||(i={})),i}),i(e,"Core/Chart/MapChart.js",[e["Core/Chart/Chart.js"],e["Core/Defaults.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"]],function(t,e,i,o){var r,s,n=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),a=e.getOptions,h=o.isNumber,l=o.merge,c=o.pick,p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(e,i){var o=a().credits,r=l({chart:{panning:{enabled:!0,type:"xy"},type:"map"},credits:{mapText:c(o.mapText,' \xa9 {geojson.copyrightShort}'),mapTextFull:c(o.mapTextFull,"{geojson.copyright}")},mapView:{},tooltip:{followTouchMove:!1}},e);t.prototype.init.call(this,r,i)},e.prototype.mapZoom=function(t,e,i,o,r){this.mapView&&(h(t)&&(t=Math.log(t)/Math.log(.5)),this.mapView.zoomBy(t,h(e)&&h(i)?this.mapView.projection.inverse([e,i]):void 0,h(o)&&h(r)?[o,r]:void 0))},e}(t);return(s=p||(p={})).maps={},s.mapChart=function(t,e,i){return new s(t,e,i)},s.splitPath=function(t){var e;return e="string"==typeof t?(t=t.replace(/([A-Za-z])/g," $1 ").replace(/^\s*/,"").replace(/\s*$/,"")).split(/[ ,;]+/).map(function(t){return/[A-za-z]/.test(t)?t:parseFloat(t)}):t,i.prototype.pathToSegments(e)},p}),i(e,"Maps/MapUtilities.js",[],function(){return{boundsFromPath:function(t){var e,i=-Number.MAX_VALUE,o=Number.MAX_VALUE,r=-Number.MAX_VALUE,s=Number.MAX_VALUE;if(t.forEach(function(t){var n=t[t.length-2],a=t[t.length-1];"number"==typeof n&&"number"==typeof a&&(o=Math.min(o,n),i=Math.max(i,n),s=Math.min(s,a),r=Math.max(r,a),e=!0)}),e)return{x1:o,y1:s,x2:i,y2:r}},pointInPolygon:function(t,e){var i,o,r=!1,s=t.x,n=t.y;for(i=0,o=e.length-1;in!=e[o][1]>n&&s<(e[o][0]-e[i][0])*(n-e[i][1])/(e[o][1]-e[i][1])+e[i][0]&&(r=!r);return r}}}),i(e,"Series/Map/MapPoint.js",[e["Series/ColorMapComposition.js"],e["Maps/MapUtilities.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,o){var r,s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),n=e.boundsFromPath,a=i.seriesTypes.scatter.prototype.pointClass,h=o.extend,l=o.isNumber,c=o.pick,p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.options=void 0,e.path=void 0,e.series=void 0,e}return s(e,t),e.getProjectedPath=function(t,e){return t.projectedPath||(e&&t.geometry?(e.hasCoordinates=!0,t.projectedPath=e.path(t.geometry)):t.projectedPath=t.path),t.projectedPath||[]},e.prototype.applyOptions=function(e,i){var o=this.series,r=t.prototype.applyOptions.call(this,e,i),s=o.joinBy;if(o.mapData&&o.mapMap){var n=s[1],a=t.prototype.getNestedProperty.call(this,n),l=void 0!==a&&o.mapMap[a];l?h(r,l):-1!==o.pointArrayMap.indexOf("value")&&(r.value=r.value||null)}return r},e.prototype.getProjectedBounds=function(t){var i=n(e.getProjectedPath(this,t)),o=this.properties,r=this.series.chart.mapView;if(i){var s=o&&o["hc-middle-lon"],a=o&&o["hc-middle-lat"];if(r&&l(s)&&l(a)){var h=t.forward([s,a]);i.midX=h[0],i.midY=h[1]}else{var p=o&&o["hc-middle-x"],d=o&&o["hc-middle-y"];i.midX=i.x1+(i.x2-i.x1)*c(this.middleX,l(p)?p:.5);var u=c(this.middleY,l(d)?d:.5);this.geometry||(u=1-u),i.midY=i.y2-(i.y2-i.y1)*u}return i}},e.prototype.onMouseOver=function(e){o.clearTimeout(this.colorInterval),!this.isNull&&this.visible||this.series.options.nullInteraction?t.prototype.onMouseOver.call(this,e):this.series.onMouseOut()},e.prototype.setVisible=function(t){this.visible=this.options.visible=!!t,this.dataLabel&&this.dataLabel[t?"show":"hide"](),this.graphic&&this.graphic.attr(this.series.pointAttribs(this))},e.prototype.zoomTo=function(t){var e=this.series.chart,i=e.mapView,o=this.bounds;if(i&&o){var r=l(this.insetIndex)&&i.insets[this.insetIndex];if(r){var s=r.projectedUnitsToPixels({x:o.x1,y:o.y1}),n=r.projectedUnitsToPixels({x:o.x2,y:o.y2}),a=i.pixelsToProjectedUnits({x:s.x,y:s.y}),h=i.pixelsToProjectedUnits({x:n.x,y:n.y});o={x1:a.x,y1:a.y,x2:h.x,y2:h.y}}i.fitToBounds(o,void 0,!1),this.series.isDirty=!0,e.redraw(t)}},e}(a);return h(p.prototype,{dataLabelOnNull:t.pointMembers.dataLabelOnNull,moveToTopOnHover:t.pointMembers.moveToTopOnHover,isValid:t.pointMembers.isValid}),p}),i(e,"Series/Map/MapSeriesDefaults.js",[e["Core/Utilities.js"]],function(t){var e=t.isNumber;return{affectsMapView:!0,animation:!1,dataLabels:{crop:!1,formatter:function(){var t=this.series.chart.numberFormatter,i=this.point.value;return e(i)?t(i,-1):""},inside:!0,overflow:!1,padding:0,verticalAlign:"middle"},linecap:"round",marker:null,nullColor:"#f7f7f7",stickyTracking:!1,tooltip:{followPointer:!0,pointFormat:"{point.name}: {point.value}
"},turboThreshold:0,allAreas:!0,borderColor:"#e6e6e6",borderWidth:1,joinBy:"hc-key",states:{hover:{halo:void 0,borderColor:"#666666",borderWidth:2},normal:{animation:!0},select:{color:"#cccccc"}},legendSymbol:"rectangle"}}),i(e,"Maps/MapViewDefaults.js",[],function(){return{center:[0,0],fitToGeometry:void 0,maxZoom:void 0,padding:0,projection:{name:void 0,parallels:void 0,rotation:void 0},zoom:void 0,insetOptions:{borderColor:"#cccccc",borderWidth:1,padding:"10%",relativeTo:"mapBoundingBox",units:"percent"}}}),i(e,"Maps/GeoJSONComposition.js",[e["Core/Globals.js"],e["Core/Templating.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=t.win,s=e.format,n=i.error,a=i.extend,h=i.merge,l=i.pushUnique,c=i.wrap;return function(t){var e=[];function i(t){return this.mapView&&this.mapView.lonLatToProjectedUnits(t)}function o(t){return this.mapView&&this.mapView.projectedUnitsToLonLat(t)}function p(t,e){var i=this.options.chart.proj4||r.proj4;if(!i){n(21,!1,this);return}var o=e.jsonmarginX,s=e.jsonmarginY,a=e.jsonres,h=void 0===a?1:a,l=e.scale,c=void 0===l?1:l,p=e.xoffset,d=e.xpan,u=e.yoffset,f=e.ypan,g=i(e.crs,[t.lon,t.lat]),m=e.cosAngle||e.rotation&&Math.cos(e.rotation),v=e.sinAngle||e.rotation&&Math.sin(e.rotation),y=e.rotation?[g[0]*m+g[1]*v,-g[0]*v+g[1]*m]:g;return{x:((y[0]-(void 0===p?0:p))*c+(void 0===d?0:d))*h+(void 0===o?0:o),y:-((((void 0===u?0:u)-y[1])*c+(void 0===f?0:f))*h-(void 0===s?0:s))}}function d(t,e){var i=this.options.chart.proj4||r.proj4;if(!i){n(21,!1,this);return}if(null!==t.y){var o=e.jsonmarginX,s=e.jsonmarginY,a=e.jsonres,h=void 0===a?1:a,l=e.scale,c=void 0===l?1:l,p=e.xoffset,d=e.xpan,u=e.yoffset,f=e.ypan,g={x:((t.x-(void 0===o?0:o))/h-(void 0===d?0:d))/c+(void 0===p?0:p),y:((t.y-(void 0===s?0:s))/h+(void 0===f?0:f))/c+(void 0===u?0:u)},m=e.cosAngle||e.rotation&&Math.cos(e.rotation),v=e.sinAngle||e.rotation&&Math.sin(e.rotation),y=i(e.crs,"WGS84",e.rotation?{x:g.x*m+-(g.y*v),y:g.x*v+g.y*m}:g);return{lat:y.y,lon:y.x}}}function u(t,e){e||(e=Object.keys(t.objects)[0]);var i=t.objects[e];if(i["hc-decoded-geojson"])return i["hc-decoded-geojson"];var o=t.arcs;if(t.transform){var r=t.arcs,s=t.transform,n=s.scale,a=s.translate,h=void 0,l=void 0,c=void 0;o=[];for(var p=0,d=r.length;p(e[1]-t[1])*(i[0]-t[0])}function i(t,e,i,o){var r=[t[0]-e[0],t[1]-e[1]],s=[i[0]-o[0],i[1]-o[1]],n=t[0]*e[1]-t[1]*e[0],a=i[0]*o[1]-i[1]*o[0],h=1/(r[0]*s[1]-r[1]*s[0]),l=[(n*s[0]-a*r[0])*h,(n*s[1]-a*r[1])*h];return l.isIntersection=!0,l}return{clipLineString:function(e,i){for(var o=[],r=t(e,i,!1),s=1;s0?1:-1},e=Math.PI/180,i=Math.PI/2,o=function(t){return Math.tan((i+t)/2)};return function(){function r(i){var r,s=(i.parallels||[]).map(function(t){return t*e}),n=s[0]||0,a=null!==(r=s[1])&&void 0!==r?r:n,h=Math.cos(n);"object"==typeof i.projectedBounds&&(this.projectedBounds=i.projectedBounds);var l=n===a?Math.sin(n):Math.log(h/Math.cos(a))/Math.log(o(a)/o(n));1e-10>Math.abs(l)&&(l=1e-10*(t(l)||1)),this.n=l,this.c=h*Math.pow(o(n),l)/l}return r.prototype.forward=function(t){var r=this.c,s=this.n,n=this.projectedBounds,a=t[0]*e,h=t[1]*e;r>0?h<-i+1e-6&&(h=-i+1e-6):h>i-1e-6&&(h=i-1e-6);var l=r/Math.pow(o(h),s),c=l*Math.sin(s*a)*63.78137,p=(r-l*Math.cos(s*a))*63.78137,d=[c,p];return n&&(cn.x2||pn.y2)&&(d.outside=!0),d},r.prototype.inverse=function(o){var r=this.c,s=this.n,n=o[0]/63.78137,a=r-o[1]/63.78137,h=t(s)*Math.sqrt(n*n+a*a),l=Math.atan2(n,Math.abs(a))*t(a);return a*s<0&&(l-=Math.PI*t(n)*t(a)),[l/s/e,(2*Math.atan(Math.pow(r/h,1/s))-i)/e]},r}()}),i(e,"Maps/Projections/EqualEarth.js",[],function(){var t=Math.sqrt(3)/2;return function(){function e(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-97.52595454902263,y2:97.52595454902263}}return e.prototype.forward=function(e){var i=Math.PI/180,o=Math.asin(t*Math.sin(e[1]*i)),r=o*o,s=r*r*r;return[e[0]*i*Math.cos(o)*74.03120656864502/(t*(1.340264+-.24331799999999998*r+s*(.0062510000000000005+.034164*r))),74.03120656864502*o*(1.340264+-.081106*r+s*(893e-6+.003796*r))]},e.prototype.inverse=function(e){for(var i,o,r,s,n=e[0]/74.03120656864502,a=e[1]/74.03120656864502,h=180/Math.PI,l=a,c=0;c<12&&(o=(i=l*l)*i*i,r=l*(1.340264+-.081106*i+o*(893e-6+.003796*i))-a,l-=s=r/(1.340264+-.24331799999999998*i+o*(.0062510000000000005+.034164*i)),!(1e-9>Math.abs(s)));++c);o=(i=l*l)*i*i;var p=h*t*n*(1.340264+-.24331799999999998*i+o*(.0062510000000000005+.034164*i))/Math.cos(l),d=h*Math.asin(Math.sin(l)/t);return Math.abs(p)>180?[NaN,NaN]:[p,d]},e}()}),i(e,"Maps/Projections/Miller.js",[],function(){var t=Math.PI/4,e=Math.PI/180;return function(){function i(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-146.91480769173063,y2:146.91480769173063}}return i.prototype.forward=function(i){return[i[0]*e*63.78137,79.7267125*Math.log(Math.tan(t+.4*i[1]*e))]},i.prototype.inverse=function(i){return[i[0]/63.78137/e,2.5*(Math.atan(Math.exp(.8*(i[1]/63.78137)))-t)/e]},i}()}),i(e,"Maps/Projections/Orthographic.js",[],function(){var t=Math.PI/180;return function(){function e(){this.antimeridianCutting=!1,this.bounds={x1:-63.78460826781007,x2:63.78460826781007,y1:-63.78460826781007,y2:63.78460826781007}}return e.prototype.forward=function(e){var i=e[0],o=e[1]*t,r=[Math.cos(o)*Math.sin(i*t)*63.78460826781007,63.78460826781007*Math.sin(o)];return(i<-90||i>90)&&(r.outside=!0),r},e.prototype.inverse=function(e){var i=e[0]/63.78460826781007,o=e[1]/63.78460826781007,r=Math.sqrt(i*i+o*o),s=Math.asin(r),n=Math.sin(s);return[Math.atan2(i*n,r*Math.cos(s))/t,Math.asin(r&&o*n/r)/t]},e}()}),i(e,"Maps/Projections/WebMercator.js",[],function(){var t=Math.PI/180;return function(){function e(){this.bounds={x1:-200.37508342789243,x2:200.37508342789243,y1:-200.3750834278071,y2:200.3750834278071},this.maxLatitude=85.0511287798}return e.prototype.forward=function(e){var i=Math.sin(e[1]*t),o=[63.78137*e[0]*t,63.78137*Math.log((1+i)/(1-i))/2];return Math.abs(e[1])>this.maxLatitude&&(o.outside=!0),o},e.prototype.inverse=function(e){return[e[0]/(63.78137*t),(2*Math.atan(Math.exp(e[1]/63.78137))-Math.PI/2)/t]},e}()}),i(e,"Maps/Projections/ProjectionRegistry.js",[e["Maps/Projections/LambertConformalConic.js"],e["Maps/Projections/EqualEarth.js"],e["Maps/Projections/Miller.js"],e["Maps/Projections/Orthographic.js"],e["Maps/Projections/WebMercator.js"]],function(t,e,i,o,r){return{EqualEarth:e,LambertConformalConic:t,Miller:i,Orthographic:o,WebMercator:r}}),i(e,"Maps/Projection.js",[e["Core/Geometry/PolygonClip.js"],e["Maps/Projections/ProjectionRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){var o=this&&this.__spreadArray||function(t,e,i){if(i||2==arguments.length)for(var o,r=0,s=e.length;r180&&(t-=360),t}return function(){function t(e){void 0===e&&(e={}),this.hasCoordinates=!1,this.hasGeoProjection=!1,this.maxLatitude=90,this.options=e;var i=e.name,o=e.projectedBounds,r=e.rotation;this.rotator=r?this.getRotator(r):void 0;var s=i?t.registry[i]:void 0;s&&(this.def=new s(e));var n=this.def,a=this.rotator;n&&(this.maxLatitude=n.maxLatitude||90,this.hasGeoProjection=!0),a&&n?(this.forward=function(t){return n.forward(a.forward(t))},this.inverse=function(t){return a.inverse(n.inverse(t))}):n?(this.forward=function(t){return n.forward(t)},this.inverse=function(t){return n.inverse(t)}):a&&(this.forward=a.forward,this.inverse=a.inverse),this.bounds="world"===o?n&&n.bounds:o}return t.add=function(e,i){t.registry[e]=i},t.greatCircle=function(t,e,i){var o=Math.atan2,r=Math.cos,s=Math.sin,n=Math.sqrt,a=t[1]*h,l=t[0]*h,c=e[1]*h,p=e[0]*h,d=c-a,u=p-l,f=s(d/2)*s(d/2)+r(a)*r(c)*s(u/2)*s(u/2),g=2*o(n(f),n(1-f)),m=Math.round(6371e3*g/5e5),v=[];if(i&&v.push(t),m>1)for(var y=1/m,x=y;x<.999;x+=y){var b=s((1-x)*g)/s(g),M=s(x*g)/s(g),C=b*r(a)*r(l)+M*r(c)*r(p),S=b*r(a)*s(l)+M*r(c)*s(p),w=o(b*s(a)+M*s(c),n(C*C+S*S)),k=o(S,C);v.push([k/h,w/h])}return i&&v.push(e),v},t.insertGreatCircles=function(e){for(var i=e.length-1;i--;)if(Math.max(Math.abs(e[i][0]-e[i+1][0]),Math.abs(e[i][1]-e[i+1][1]))>10){var r=t.greatCircle(e[i],e[i+1]);r.length&&e.splice.apply(e,o([i+1,0],r,!1))}},t.toString=function(t){var e=t||{},i=e.name,o=e.rotation;return[i,o&&o.join(",")].join(";")},t.prototype.lineIntersectsBounds=function(t){var e,i=this.bounds||{},o=i.x1,r=i.x2,s=i.y1,n=i.y2,a=function(t,e,i){var o=t[0],r=t[1],s=e?0:1;if("number"==typeof i&&o[e]>=i!=r[e]>=i){var n=(i-o[e])/(r[e]-o[e]),a=o[s]+n*(r[s]-o[s]);return e?[a,i]:[i,a]}},h=t[0];return(e=a(t,0,o))?(h=e,t[1]=e):(e=a(t,0,r))&&(h=e,t[1]=e),(e=a(t,1,s))?h=e:(e=a(t,1,n))&&(h=e),h},t.prototype.getRotator=function(t){var e=t[0]*h,i=(t[1]||0)*h,o=(t[2]||0)*h,r=Math.cos(i),s=Math.sin(i),n=Math.cos(o),a=Math.sin(o);if(0!==e||0!==i||0!==o)return{forward:function(t){var i=t[0]*h+e,o=t[1]*h,l=Math.cos(o),c=Math.cos(i)*l,p=Math.sin(i)*l,d=Math.sin(o),u=d*r+c*s;return[Math.atan2(p*n-u*a,c*r-d*s)/h,Math.asin(u*n+p*a)/h]},inverse:function(t){var i=t[0]*h,o=t[1]*h,l=Math.cos(o),c=Math.cos(i)*l,p=Math.sin(i)*l,d=Math.sin(o),u=d*n-p*a;return[(Math.atan2(p*n+d*a,c*r+u*s)-e)/h,Math.asin(u*r-c*s)/h]}}},t.prototype.forward=function(t){return t},t.prototype.inverse=function(t){return t},t.prototype.cutOnAntimeridian=function(e,i){for(var r,s=[],h=[e],c=0,p=e.length;c90)&&(g<-90||g>90)&&f>0!=g>0){var m=n((180-(f+360)%360)/((g+360)%360-(f+360)%360),0,1),v=u[1]+m*(d[1]-u[1]);s.push({i:c,lat:v,direction:f<0?1:-1,previousLonLat:u,lonLat:d})}}if(s.length){if(i){s.length%2==1&&(r=s.slice().sort(function(t,e){return Math.abs(e.lat)-Math.abs(t.lat)})[0],a(s,r));for(var c=s.length-2;c>=0;){var y=s[c].i,x=l(180+1e-6*s[c].direction),b=l(180-1e-6*s[c].direction),M=e.splice.apply(e,o([y,s[c+1].i-y],t.greatCircle([x,s[c].lat],[x,s[c+1].lat],!0),!1));M.push.apply(M,t.greatCircle([b,s[c+1].lat],[b,s[c].lat],!0)),h.push(M),c-=2}if(r)for(var C=0;C-1){for(var T=(v<0?-1:1)*this.maxLatitude,f=l(180+1e-6*S),g=l(180-1e-6*S),A=t.greatCircle([f,v],[f,T],!0),P=f+120*S;P>-180&&P<180;P+=120*S)A.push([P,T]);A.push.apply(A,t.greatCircle([g,T],[g,r.lat],!0)),w.splice.apply(w,o([k,0],A,!1));break}}}else for(var c=s.length;c--;){var y=s[c].i,M=e.splice(y,e.length,[l(180+1e-6*s[c].direction),s[c].lat]);M.unshift([l(180-1e-6*s[c].direction),s[c].lat]),h.push(M)}}return h},t.prototype.path=function(e){var i,o=this,n=this.bounds,a=this.def,h=this.rotator,l=[],c="Polygon"===e.type||"MultiPolygon"===e.type,p=this.hasGeoProjection,d=!a||!1!==a.antimeridianCutting,u=d?h:void 0,f=d&&a||this;n&&(i=[[n.x1,n.y1],[n.x2,n.y1],[n.x2,n.y2],[n.x1,n.y2]]);var g=function(e){var a=e.map(function(t){if(d){u&&(t=u.forward(t));var e=t[0];1e-6>Math.abs(e-180)&&(e=e<180?179.999999:180.000001),t=[e,t[1]]}return t}),h=[a];p&&(t.insertGreatCircles(a),d&&(h=o.cutOnAntimeridian(a,c))),h.forEach(function(e){if(!(e.length<2)){var o,a,h=!1,u=!1,g=function(t){h?l.push(["L",t[0],t[1]]):(l.push(["M",t[0],t[1]]),h=!0)},m=!1,v=!1,y=e.map(function(t){var e=f.forward(t);return e.outside?m=!0:v=!0,e[1]===1/0?e[1]=1e10:e[1]===-1/0&&(e[1]=-1e10),e});if(d){if(c&&y.push(y[0]),m){if(!v)return;if(i){if(c)y=s(y,i);else if(n){r(y,i).forEach(function(t){h=!1,t.forEach(g)});return}}}y.forEach(g)}else for(var x=0;x180&&o-e>90?{name:"EqualEarth"}:{name:"LambertConformalConic",parallels:[e,o],rotation:[-(t+i)/2]}}}),this.geoMap=l[0]}this.userOptions=r||{},i.options.mapView&&i.options.mapView.recommendedMapView&&(s=i.options.mapView.recommendedMapView);var f=y(t,{projection:n},s,r),m=s&&s.insets,v=r&&r.insets;m&&v&&(f.insets=e.mergeInsets(m,v)),this.chart=i,this.center=f.center,this.options=f,this.projection=new o(f.projection),this.playingField=i.plotBox,this.zoom=f.zoom||0,this.minZoom=f.minZoom,this.createInsets(),this.eventsToUnbind.push(p(i,"afterSetChartSize",function(){h.playingField=h.getField(),(void 0===h.minZoom||h.minZoom===h.zoom)&&(h.fitToBounds(void 0,void 0,!1),!h.chart.hasRendered&&g(h.userOptions.zoom)&&(h.zoom=h.userOptions.zoom),h.userOptions.center&&y(!0,h.center,h.userOptions.center))})),this.setUpEvents()}return e.compose=function(t){b(C,t)&&(S=t.maps,p(t,"afterInit",function(){this.mapView=new e(this,this.options.mapView)},{order:0}))},e.compositeBounds=function(t){if(t.length)return t.slice(1).reduce(function(t,e){return t.x1=Math.min(t.x1,e.x1),t.y1=Math.min(t.y1,e.y1),t.x2=Math.max(t.x2,e.x2),t.y2=Math.max(t.y2,e.y2),t},y(t[0]))},e.mergeInsets=function(t,e){var i=function(t){var e={};return t.forEach(function(t,i){e[t&&t.id||"i".concat(i)]=t}),e},o=y(i(t),i(e));return Object.keys(o).map(function(t){return o[t]})},e.prototype.createInsets=function(){var t=this,e=this.options,i=e.insets;i&&i.forEach(function(i){var o=new T(t,y(e.insetOptions,i));t.insets.push(o)})},e.prototype.fitToBounds=function(t,e,i,o){void 0===i&&(i=!0);var r=t||this.getProjectedBounds();if(r){var s=x(e,t?0:this.options.padding),n=this.getField(!1),a=f(s)?s:[s,s,s,s];this.padding=[M(a[0],n.height),M(a[1],n.width),M(a[2],n.height),M(a[3],n.width)],this.playingField=this.getField();var h=w(r,this.playingField);t||(this.minZoom=h);var l=this.projection.inverse([(r.x2+r.x1)/2,(r.y2+r.y1)/2]);this.setView(l,h,i,o)}},e.prototype.getField=function(t){void 0===t&&(t=!0);var e=t?this.padding:[0,0,0,0];return{x:e[3],y:e[0],width:this.chart.plotWidth-e[1]-e[3],height:this.chart.plotHeight-e[0]-e[2]}},e.prototype.getGeoMap=function(t){if(v(t))return S[t]&&"Topology"===S[t].type?h(S[t]):S[t];if(m(t,!0)){if("FeatureCollection"===t.type)return t;if("Topology"===t.type)return h(t)}},e.prototype.getMapBBox=function(){var t=this.getProjectedBounds(),e=this.getScale();if(t){var i=this.padding,o=this.projectedUnitsToPixels({x:t.x1,y:t.y2});return{width:(t.x2-t.x1)*e+i[1]+i[3],height:(t.y2-t.y1)*e+i[0]+i[2],x:o.x-i[3],y:o.y-i[0]}}},e.prototype.getProjectedBounds=function(){var t=this.projection,i=this.chart.series.reduce(function(t,e){var i=e.getProjectedBounds&&e.getProjectedBounds();return i&&!1!==e.options.affectsMapView&&t.push(i),t},[]),o=this.options.fitToGeometry;if(o){if(!this.fitToGeometryCache){if("MultiPoint"===o.type){var r=o.coordinates.map(function(e){return t.forward(e)}),s=r.map(function(t){return t[0]}),n=r.map(function(t){return t[1]});this.fitToGeometryCache={x1:Math.min.apply(0,s),x2:Math.max.apply(0,s),y1:Math.min.apply(0,n),y2:Math.max.apply(0,n)}}else this.fitToGeometryCache=l(t.path(o))}return this.fitToGeometryCache}return this.projection.bounds||e.compositeBounds(i)},e.prototype.getScale=function(){return 256/400.979322*Math.pow(2,this.zoom)},e.prototype.getSVGTransform=function(){var t=this.playingField,e=t.x,i=t.y,o=t.width,r=t.height,s=this.projection.forward(this.center),n=this.projection.hasCoordinates?-1:1,a=this.getScale(),h=a*n,l=e+o/2-s[0]*a,c=i+r/2-s[1]*h;return{scaleX:a,scaleY:h,translateX:l,translateY:c}},e.prototype.lonLatToPixels=function(t){var e=this.lonLatToProjectedUnits(t);if(e)return this.projectedUnitsToPixels(e)},e.prototype.lonLatToProjectedUnits=function(t){var e=this.chart,i=e.mapTransforms;if(i){for(var o in i)if(Object.hasOwnProperty.call(i,o)&&i[o].hitZone){var r=e.transformFromLatLon(t,i[o]);if(r&&c(r,i[o].hitZone.coordinates[0]))return r}return e.transformFromLatLon(t,i.default)}for(var s=0,n=this.insets;sa+l&&v>a&&(s[0]+=Math.min(x-l-a,v-a)/p),b-yh+c&&y>h&&(s[1]-=Math.min(b-c-h,y-h)/p),this.center=this.projection.inverse(s)}this.insets.forEach(function(t){t.options.field&&(t.hitZone=t.getHitZone(),t.playingField=t.getField())}),this.render()}u(this,"afterSetView"),i&&this.redraw(o)},e.prototype.projectedUnitsToPixels=function(t){var e=this.getScale(),i=this.projection.forward(this.center),o=this.playingField,r=o.x+o.width/2,s=o.y+o.height/2;return{x:r-e*(i[0]-t.x),y:s+e*(i[1]-t.y)}},e.prototype.pixelsToLonLat=function(t){return this.projectedUnitsToLonLat(this.pixelsToProjectedUnits(t))},e.prototype.pixelsToProjectedUnits=function(t){var e=t.x,i=t.y,o=this.getScale(),r=this.projection.forward(this.center),s=this.playingField,n=s.x+s.width/2,a=s.y+s.height/2;return{x:r[0]+(e-n)/o,y:r[1]-(i-a)/o}},e.prototype.setUpEvents=function(){var t,e,i,o=this,r=this.chart,s=function(s){var n=r.pointer.pinchDown,a=o.projection,h=r.mouseDownX,l=r.mouseDownY;if(1===n.length&&(h=n[0].chartX,l=n[0].chartY),"number"==typeof h&&"number"==typeof l){var c="".concat(h,",").concat(l),p=s.originalEvent,u=p.chartX,f=p.chartY;c!==e&&(e=c,t=o.projection.forward(o.center),i=(o.projection.options.rotation||[0,0]).slice());var m=a.def&&a.def.bounds,v=m&&w(m,o.playingField)||-1/0;if("Orthographic"===a.options.name&&(o.minZoom||1/0)<1.3*v){var y=440/(o.getScale()*Math.min(r.plotWidth,r.plotHeight));if(i){var x=(h-u)*y-i[0],b=d(-i[1]-(l-f)*y,-80,80),M=o.zoom;o.update({projection:{rotation:[-x,-b]}},!1),o.fitToBounds(void 0,void 0,!1),o.zoom=M,r.redraw(!1)}}else if(g(u)&&g(f)){var C=o.getScale(),S=o.projection.hasCoordinates?1:-1,k=o.projection.inverse([t[0]+(h-u)/C,t[1]-(l-f)/C*S]);isNaN(k[0]+k[1])||o.setView(k,void 0,!0,!1)}s.preventDefault()}};p(r,"pan",s),p(r,"touchpan",s),p(r,"selection",function(t){if(t.resetSelection)o.zoomBy();else{var e=t.x-r.plotLeft,i=t.y-r.plotTop,s=o.pixelsToProjectedUnits({x:e,y:i}),n=s.y,a=s.x,h=o.pixelsToProjectedUnits({x:e+t.width,y:i+t.height}),l=h.y,c=h.x;o.fitToBounds({x1:a,y1:n,x2:c,y2:l},void 0,!0,!t.originalEvent.touches&&void 0),/^touch/.test(t.originalEvent.type)||r.showResetZoom(),t.preventDefault()}})},e.prototype.render=function(){this.group||(this.group=this.chart.renderer.g("map-view").attr({zIndex:4}).add())},e.prototype.update=function(t,e,i){void 0===e&&(e=!0);var r=t.projection,s=r&&o.toString(r)!==o.toString(this.options.projection),n=!1;y(!0,this.userOptions,t),y(!0,this.options,t),"insets"in t&&(this.insets.forEach(function(t){return t.destroy()}),this.insets.length=0,n=!0),(s||"fitToGeometry"in t)&&delete this.fitToGeometryCache,(s||n)&&(this.chart.series.forEach(function(t){var e=t.transformGroups;if(t.clearBounds&&t.clearBounds(),t.isDirty=!0,t.isDirtyData=!0,n&&e)for(;e.length>1;){var i=e.pop();i&&i.destroy()}}),s&&(this.projection=new o(this.options.projection)),n&&this.createInsets(),!t.center&&Object.hasOwnProperty.call(t,"zoom")&&!g(t.zoom)&&this.fitToBounds(void 0,void 0,!1)),t.center||g(t.zoom)?this.setView(this.options.center,t.zoom,!1):"fitToGeometry"in t&&this.fitToBounds(void 0,void 0,!1),e&&this.chart.redraw(i)},e.prototype.zoomBy=function(t,e,i,o){var r=this.chart,s=this.projection.forward(this.center),n=e?this.projection.forward(e):[],a=n[0],h=n[1];if("number"==typeof t){var l=this.zoom+t,c=void 0;if(i){var p=i[0],d=i[1],u=this.getScale(),f=p-r.plotLeft-r.plotWidth/2,g=d-r.plotTop-r.plotHeight/2;a=s[0]+f/u,h=s[1]+g/u}if("number"==typeof a&&"number"==typeof h){var u=1-Math.pow(2,this.zoom)/Math.pow(2,l),f=s[0]-a,g=s[1]-h;s[0]-=f*u,s[1]+=g*u,c=this.projection.inverse(s)}this.setView(c,l,void 0,o)}else this.fitToBounds(void 0,void 0,void 0,o)},e}(),T=function(t){function e(e,i){var o=t.call(this,e.chart,i)||this;if(o.id=i.id,o.mapView=e,o.options=y({center:[0,0]},e.options.insetOptions,i),o.allBounds=[],o.options.geoBounds){var r=e.projection.path(o.options.geoBounds);o.geoBoundsProjectedBox=l(r),o.geoBoundsProjectedPolygon=r.map(function(t){return[t[1]||0,t[2]||0]})}return o}return n(e,t),e.prototype.getField=function(e){void 0===e&&(e=!0);var i=this.hitZone;if(i){var o=e?this.padding:[0,0,0,0],r=i.coordinates[0],s=r.map(function(t){return t[0]}),n=r.map(function(t){return t[1]}),a=Math.min.apply(0,s)+o[3],h=Math.max.apply(0,s)-o[1],l=Math.min.apply(0,n)+o[0],c=Math.max.apply(0,n)-o[2];if(g(a)&&g(l))return{x:a,y:l,width:h-a,height:c-l}}return t.prototype.getField.call(this,e)},e.prototype.getHitZone=function(){var t=this.chart,e=this.mapView,i=this.options,o=(i.field||{}).coordinates;if(o){var r=o[0];if("percent"===i.units){var s="mapBoundingBox"===i.relativeTo&&e.getMapBBox()||y(t.plotBox,{x:0,y:0});r=r.map(function(t){return[M("".concat(t[0],"%"),s.width,s.x),M("".concat(t[1],"%"),s.height,s.y)]})}return{type:"Polygon",coordinates:[r]}}},e.prototype.getProjectedBounds=function(){return k.compositeBounds(this.allBounds)},e.prototype.isInside=function(t){var e=this.geoBoundsProjectedBox,i=this.geoBoundsProjectedPolygon;return!!(e&&t.x>=e.x1&&t.x<=e.x2&&t.y>=e.y1&&t.y<=e.y2&&i&&c(t,i))},e.prototype.render=function(){var t=this.chart,e=this.mapView,i=this.options,o=i.borderPath||i.field;if(o&&e.group){var r=!0;this.border||(this.border=t.renderer.path().addClass("highcharts-mapview-inset-border").add(e.group),r=!1),t.styledMode||this.border.attr({stroke:i.borderColor,"stroke-width":i.borderWidth});var s=Math.round(this.border.strokeWidth())%2/2,n="mapBoundingBox"===i.relativeTo&&e.getMapBBox()||e.playingField,a=(o.coordinates||[]).reduce(function(e,o){return o.reduce(function(e,o,r){var a=o[0],h=o[1];return"percent"===i.units&&(a=t.plotLeft+M("".concat(a,"%"),n.width,n.x),h=t.plotTop+M("".concat(h,"%"),n.height,n.y)),a=Math.floor(a)+s,h=Math.floor(h)+s,e.push(0===r?["M",a,h]:["L",a,h]),e},e)},[]);this.border[r?"animate":"attr"]({d:a})}},e.prototype.destroy=function(){this.border&&(this.border=this.border.destroy()),this.eventsToUnbind.forEach(function(t){return t()})},e.prototype.setUpEvents=function(){},e}(k);return k}),i(e,"Series/Map/MapSeries.js",[e["Core/Animation/AnimationUtilities.js"],e["Series/ColorMapComposition.js"],e["Series/CenteredUtilities.js"],e["Core/Globals.js"],e["Core/Chart/MapChart.js"],e["Series/Map/MapPoint.js"],e["Series/Map/MapSeriesDefaults.js"],e["Maps/MapView.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s,n,a,h,l){var c,p=this&&this.__extends||(c=function(t,e){return(c=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),d=t.animObject,u=t.stop,f=o.noop,g=r.splitPath,m=h.seriesTypes,v=m.column,y=m.scatter,x=l.extend,b=l.find,M=l.fireEvent,C=l.getNestedProperty,S=l.isArray,w=l.defined,k=l.isNumber,T=l.isObject,A=l.merge,P=l.objectEach,O=l.pick,L=l.splat,j=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.chart=void 0,e.data=void 0,e.group=void 0,e.joinBy=void 0,e.options=void 0,e.points=void 0,e.processedData=[],e}return p(e,t),e.prototype.animate=function(t){var e=this.chart,i=this.group,o=d(this.options.animation);t?i.attr({translateX:e.plotLeft+e.plotWidth/2,translateY:e.plotTop+e.plotHeight/2,scaleX:.001,scaleY:.001}):i.animate({translateX:e.plotLeft,translateY:e.plotTop,scaleX:1,scaleY:1},o)},e.prototype.clearBounds=function(){this.points.forEach(function(t){delete t.bounds,delete t.insetIndex,delete t.projectedPath}),delete this.bounds},e.prototype.doFullTranslate=function(){return!!(this.isDirtyData||this.chart.isResizing||!this.hasRendered)},e.prototype.drawMapDataLabels=function(){t.prototype.drawDataLabels.call(this),this.dataLabelsGroup&&this.dataLabelsGroup.clip(this.chart.clipRect)},e.prototype.drawPoints=function(){var t=this,e=this,i=this.chart,o=this.group,r=this.transformGroups,s=void 0===r?[]:r,n=i.mapView,a=i.renderer;if(n){this.transformGroups=s,s[0]||(s[0]=a.g().add(o));for(var h=0,l=n.insets.length;h0?1:-1,p=function(i){(e.points||[]).forEach(function(e){var o,r=e.graphic;r&&r["stroke-width"]&&(o=t.getStrokeWidth(e.options))&&r.attr({"stroke-width":o/i})})};if(a.globalAnimation&&i.hasRendered&&n.allowTransformAnimation){var f=Number(o.attr("translateX")),g=Number(o.attr("translateY")),m=Number(o.attr("scaleX")),v=function(t,e){var i=m+(l-m)*e.pos;o.attr({translateX:f+(s.translateX-f)*e.pos,translateY:g+(s.translateY-g)*e.pos,scaleX:i,scaleY:i*c,"stroke-width":h/i}),p(i)},y=A(d(a.globalAnimation)),x=y.step;y.step=function(){x&&x.apply(this,arguments),v.apply(this,arguments)},o.attr({animator:0}).animate({animator:1},y,function(){"boolean"!=typeof a.globalAnimation&&a.globalAnimation.complete&&a.globalAnimation.complete({applyDrilldown:!0})})}else u(o),o.attr(A(s,{"stroke-width":h/l})),p(l)}),this.isDrilling||this.drawMapDataLabels()}},e.prototype.getProjectedBounds=function(){var t=this;if(!this.bounds&&this.chart.mapView){var e=this.chart.mapView,i=e.insets,o=e.projection,r=[];(this.points||[]).forEach(function(e){if(e.path||e.geometry){if("string"==typeof e.path?e.path=g(e.path):S(e.path)&&"M"===e.path[0]&&(e.path=t.chart.renderer.pathToSegments(e.path)),!e.bounds){var s=e.getProjectedBounds(o);if(s){e.labelrank=O(e.labelrank,(s.x2-s.x1)*(s.y2-s.y1));var n=s.midX,a=s.midY;if(i&&k(n)&&k(a)){var h=b(i,function(t){return t.isInside({x:n,y:a})});h&&(delete e.projectedPath,(s=e.getProjectedBounds(h.projection))&&h.allBounds.push(s),e.insetIndex=i.indexOf(h))}e.bounds=s}}e.bounds&&void 0===e.insetIndex&&r.push(e.bounds)}}),this.bounds=a.compositeBounds(r)}return this.bounds},e.prototype.getStrokeWidth=function(t){var e=this.pointAttrToOptions;return t[e&&e["stroke-width"]||"borderWidth"]},e.prototype.hasData=function(){return!!this.processedXData.length},e.prototype.pointAttribs=function(t,e){var i,o=t.series.chart,r=o.mapView,s=o.styledMode?this.colorAttribs(t):v.prototype.pointAttribs.call(this,t,e),n=this.getStrokeWidth(t.options);if(e){var a=A(this.options.states&&this.options.states[e],t.options.states&&t.options.states[e]||{}),h=this.getStrokeWidth(a);w(h)&&(n=h),s.stroke=null!==(i=a.borderColor)&&void 0!==i?i:t.color}n&&r&&(n/=r.getScale());var l=this.getStrokeWidth(this.options);return s.dashstyle&&r&&k(l)&&(n=l/r.getScale()),t.visible||(s.fill=this.options.nullColor),w(n)?s["stroke-width"]=n:delete s["stroke-width"],s["stroke-linecap"]=s["stroke-linejoin"]=this.options.linecap,s},e.prototype.updateData=function(){return!this.processedData&&t.prototype.updateData.apply(this,arguments)},e.prototype.setData=function(e,i,o,r){void 0===i&&(i=!0),delete this.bounds,t.prototype.setData.call(this,e,!1,void 0,r),this.processData(),this.generatePoints(),i&&this.chart.redraw(o)},e.prototype.processData=function(){var t,e,i,r=this.options,n=r.data,a=this.chart,h=a.options.chart,l=this.joinBy,c=r.keys||this.pointArrayMap,p=[],d={},u=this.chart.mapView,f=u&&(T(r.mapData,!0)?u.getGeoMap(r.mapData):u.geoMap),g=a.mapTransforms=h.mapTransforms||f&&f["hc-transform"]||a.mapTransforms;g&&P(g,function(t){t.rotation&&(t.cosAngle=Math.cos(t.rotation),t.sinAngle=Math.sin(t.rotation))}),S(r.mapData)?i=r.mapData:f&&"FeatureCollection"===f.type&&(this.mapTitle=f.title,i=o.geojson(f,this.type,this)),this.processedData=[];var m=this.processedData;if(n)for(var v=void 0,y=0,x=n.length;yc.length&&"string"==typeof v[0]&&(m[y]["hc-key"]=v[0],++b);for(var M=0;M0?s.prototype.setNestedProperty(m[y],v[b],c[M]):m[y][c[M]]=v[b])}else m[y]=n[y];l&&"_i"===l[0]&&(m[y]._i=y)}if(i){this.mapData=i,this.mapMap={};for(var y=0;y0?e:0,this.maxLabel=a,this.movementX="left"===r.labels.align?e:0,o.labelWidth=d+e+i,o.labelHeight=d+a.height/2},t.prototype.setOptions=function(){var t=this.ranges,e=this.options,i=this.chart.series[e.seriesIndex],o=this.legend.baseline,s={zIndex:e.zIndex,"stroke-width":e.borderWidth},n={zIndex:e.zIndex,"stroke-width":e.connectorWidth},a={align:this.legend.options.rtl||"left"===e.labels.align?"right":"left",zIndex:e.zIndex},h=i.options.marker.fillOpacity,p=this.chart.styledMode;t.forEach(function(d,u){p||(s.stroke=c(d.borderColor,e.borderColor,i.color),s.fill=c(d.color,e.color,1!==h?r(i.color).setOpacity(h).get("rgba"):i.color),n.stroke=c(d.connectorColor,e.connectorColor,i.color)),t[u].radius=this.getRangeRadius(d.value),t[u]=l(t[u],{center:t[0].radius-t[u].radius+o}),p||l(!0,t[u],{bubbleAttribs:l(s),connectorAttribs:l(n),labelAttribs:a})},this)},t.prototype.getRangeRadius=function(t){var e=this.options,i=this.options.seriesIndex,o=this.chart.series[i],r=e.ranges[0].value,s=e.ranges[e.ranges.length-1].value,n=e.minSize,a=e.maxSize;return o.getRadius.call(this,s,r,n,a,t)},t.prototype.render=function(){var t=this.legendItem||{},e=this.chart.renderer,i=this.options.zThreshold;this.symbols||(this.symbols={connectors:[],bubbleItems:[],labels:[]}),t.symbol=e.g("bubble-legend"),t.label=e.g("bubble-legend-item").css(this.legend.itemStyle||{}),t.symbol.translateX=0,t.symbol.translateY=0,t.symbol.add(t.label),t.label.add(t.group);for(var o=0,r=this.ranges;o=i&&this.renderRange(s)}this.hideOverlappingLabels()},t.prototype.renderRange=function(t){var e=this.ranges[0],i=this.legend,o=this.options,r=o.labels,s=this.chart,n=s.series[o.seriesIndex],a=s.renderer,h=this.symbols,l=h.labels,c=t.center,p=Math.abs(t.radius),d=o.connectorDistance||0,u=r.align,f=i.options.rtl,g=o.borderWidth,m=o.connectorWidth,v=e.radius||0,y=c-p-g/2+m/2,x=(y%1?1:.5)-(m%2?0:.5),b=a.styledMode,M=f||"left"===u?-d:d;"center"===u&&(M=0,o.connectorDistance=0,t.labelAttribs.align="center"),h.bubbleItems.push(a.circle(v,c+x,p).attr(b?{}:t.bubbleAttribs).addClass((b?"highcharts-color-"+n.colorIndex+" ":"")+"highcharts-bubble-legend-symbol "+(o.className||"")).add(this.legendItem.symbol)),h.connectors.push(a.path(a.crispLine([["M",v,y],["L",v+M,y]],o.connectorWidth)).attr(b?{}:t.connectorAttribs).addClass((b?"highcharts-color-"+this.options.seriesIndex+" ":"")+"highcharts-bubble-legend-connectors "+(o.connectorClassName||"")).add(this.legendItem.symbol));var C=a.text(this.formatLabel(t)).attr(b?{}:t.labelAttribs).css(b?{}:r.style).addClass("highcharts-bubble-legend-labels "+(o.labels.className||"")).add(this.legendItem.symbol),S={x:v+M+o.labels.x,y:y+o.labels.y+.4*C.getBBox().height};C.attr(S),l.push(C),C.placed=!0,C.alignAttr=S},t.prototype.getMaxLabelSize=function(){var t,e;return this.symbols.labels.forEach(function(i){e=i.getBBox(!0),t=t?e.width>t.width?e:t:e}),t||{}},t.prototype.formatLabel=function(t){var i=this.options,o=i.labels.formatter,r=i.labels.format,s=this.chart.numberFormatter;return r?e.format(r,t):o?o.call(t):s(t.value,1)},t.prototype.hideOverlappingLabels=function(){var t=this.chart,e=this.options.labels.allowOverlap,i=this.symbols;!e&&i&&(t.hideOverlappingLabels(i.labels),i.labels.forEach(function(t,e){t.newOpacity?t.newOpacity!==t.oldOpacity&&i.connectors[e].show():i.connectors[e].hide()}))},t.prototype.getRanges=function(){var t,e,i=this.legend.bubbleLegend,o=i.chart.series,r=i.options.ranges,s=Number.MAX_VALUE,p=-Number.MAX_VALUE;return o.forEach(function(t){t.isBubble&&!t.ignoreSeries&&(e=t.zData.filter(h)).length&&(s=c(t.options.zMin,Math.min(s,Math.max(a(e),!1===t.options.displayNegative?t.options.zThreshold:-Number.MAX_VALUE))),p=c(t.options.zMax,Math.max(p,n(e))))}),t=s===p?[{value:p}]:[{value:s},{value:(s+p)/2},{value:p,autoRanges:!0}],r.length&&r[0].radius&&t.reverse(),t.forEach(function(e,i){r&&r[i]&&(t[i]=l(r[i],e))}),t},t.prototype.predictBubbleSizes=function(){var t,e=this.chart,i=e.legend.options,o=i.floating,r="horizontal"===i.layout,s=r?e.legend.lastLineHeight:0,n=e.plotSizeX,a=e.plotSizeY,h=e.series[this.options.seriesIndex],l=h.getPxExtremes(),c=Math.ceil(l.minPxSize),p=Math.ceil(l.maxPxSize),d=Math.min(a,n),u=h.options.maxSize;return o||!/%$/.test(u)?t=p:(t=(d+s)*(u=parseFloat(u))/100/(u/100+1),(r&&a-t>=n||!r&&n-t>=a)&&(t=p)),[c,Math.ceil(t)]},t.prototype.updateRanges=function(t,e){var i=this.legend.options.bubbleLegend;i.minSize=t,i.maxSize=e,i.ranges=this.getRanges()},t.prototype.correctSizes=function(){var t=this.legend,e=this.chart.series[this.options.seriesIndex].getPxExtremes();Math.abs(Math.ceil(e.maxPxSize)-this.options.maxSize)>1&&(this.updateRanges(this.options.minSize,e.maxPxSize),t.render())},t}()}),i(e,"Series/Bubble/BubbleLegendComposition.js",[e["Series/Bubble/BubbleLegendDefaults.js"],e["Series/Bubble/BubbleLegendItem.js"],e["Core/Defaults.js"],e["Core/Utilities.js"]],function(t,e,i,o){var r=i.setOptions,s=o.addEvent,n=o.objectEach,a=o.wrap,h=[];function l(t,e,i){var o,r,s,a=this.legend,h=c(this)>=0;a&&a.options.enabled&&a.bubbleLegend&&a.options.bubbleLegend.autoRanges&&h?(o=a.bubbleLegend.options,r=a.bubbleLegend.predictBubbleSizes(),a.bubbleLegend.updateRanges(r[0],r[1]),o.placed||(a.group.placed=!1,a.allItems.forEach(function(t){(s=t.legendItem||{}).group&&(s.group.translateY=void 0)})),a.render(),this.getMargins(),this.axes.forEach(function(t){t.visible&&t.render(),o.placed||(t.setScale(),t.updateNames(),n(t.ticks,function(t){t.isNew=!0,t.isNewLabel=!0}))}),o.placed=!0,this.getMargins(),t.call(this,e,i),a.bubbleLegend.correctSizes(),f(a,p(a))):(t.call(this,e,i),a&&a.options.enabled&&a.bubbleLegend&&(a.render(),f(a,p(a))))}function c(t){for(var e=t.series,i=0;ie.height&&(e.height=r[h].itemHeight);e.step=a}return s}function d(t){var i=this.bubbleLegend,o=this.options,r=o.bubbleLegend,s=c(this.chart);i&&i.ranges&&i.ranges.length&&(r.ranges.length&&(r.autoRanges=!!r.ranges[0].autoRanges),this.destroyItem(i)),s>=0&&o.enabled&&r.enabled&&(r.seriesIndex=s,this.bubbleLegend=new e(r,this),this.bubbleLegend.addToLegend(t.allItems))}function u(t){if(t.defaultPrevented)return!1;var e,i=this.chart,o=this.visible,r=this.chart.legend;r&&r.bubbleLegend&&(this.visible=!o,this.ignoreSeries=o,e=c(i)>=0,r.bubbleLegend.visible!==e&&(r.update({bubbleLegend:{enabled:e}}),r.bubbleLegend.visible=e),this.visible=o)}function f(t,e){var i,o,r,s,n=t.allItems,a=t.options.rtl,h=0;n.forEach(function(t,n){(s=t.legendItem||{}).group&&(i=s.group.translateX||0,o=s.y||0,((r=t.movementX)||a&&t.ranges)&&(r=a?i-t.options.maxSize/2:i+r,s.group.attr({translateX:r})),n>e[h].step&&h++,s.group.attr({translateY:Math.round(o+e[h].height/2)}),s.y=o+e[h].height/2)})}return{compose:function(e,i,n){o.pushUnique(h,e)&&(r({legend:{bubbleLegend:t}}),a(e.prototype,"drawChartBox",l)),o.pushUnique(h,i)&&s(i,"afterGetAllItems",d),o.pushUnique(h,n)&&s(n,"legendItemClick",u)}}}),i(e,"Series/Bubble/BubblePoint.js",[e["Core/Series/Point.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=e.seriesTypes.scatter.prototype.pointClass,n=i.extend,a=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.options=void 0,t.series=void 0,t}return r(i,e),i.prototype.haloPath=function(e){return t.prototype.haloPath.call(this,0===e?0:(this.marker&&this.marker.radius||0)+e)},i}(s);return n(a.prototype,{ttBelow:!1}),a}),i(e,"Series/Bubble/BubbleSeries.js",[e["Series/Bubble/BubbleLegendComposition.js"],e["Series/Bubble/BubblePoint.js"],e["Core/Color/Color.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,o,r,s){var n,a=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),h=i.parse,l=o.noop,c=r.series,p=r.seriesTypes,d=p.column.prototype,u=p.scatter,f=s.addEvent,g=s.arrayMax,m=s.arrayMin,v=s.clamp,y=s.extend,x=s.isNumber,b=s.merge,M=s.pick,C=[];function S(){var t,e=this,i=this.len,o=(this.chart,this.isXAxis),r=o?"xData":"yData",s=this.min,n=this.max-s,a=0,h=i,l=i/n;this.series.forEach(function(i){if(i.bubblePadding&&i.reserveSpace()){e.allowZoomOutside=!0,t=!0;var c=i[r];if(o&&((i.onPoint||i).getRadii(0,0,i),i.onPoint&&(i.radii=i.onPoint.radii)),n>0){for(var p=c.length;p--;)if(x(c[p])&&e.dataMin<=c[p]&&c[p]<=e.max){var d=i.radii&&i.radii[p]||0;a=Math.min((c[p]-s)*l-d,a),h=Math.max((c[p]-s)*l+d,h)}}}}),t&&n>0&&!this.logarithmic&&(h-=i,l*=(i+Math.max(0,a)-Math.min(h,i))/i,[["min","userMin",a],["max","userMax",h]].forEach(function(t){void 0===M(e.options[t[0]],e[t[1]])&&(e[t[0]]+=t[2]/l)}))}var w=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.data=void 0,t.maxPxSize=void 0,t.minPxSize=void 0,t.options=void 0,t.points=void 0,t.radii=void 0,t.yData=void 0,t.zData=void 0,t}return a(i,e),i.compose=function(e,i,o,r){t.compose(i,o,r),s.pushUnique(C,e)&&(e.prototype.beforePadding=S)},i.prototype.animate=function(t){!t&&this.points.length0&&(c=(r-t)/l)}return a&&c>=0&&(c=Math.sqrt(c)),Math.ceil(i+c*(o-i))/2},i.prototype.hasData=function(){return!!this.processedXData.length},i.prototype.pointAttribs=function(t,e){var i=this.options.marker.fillOpacity,o=c.prototype.pointAttribs.call(this,t,e);return 1!==i&&(o.fill=h(o.fill).setOpacity(i).get("rgba")),o},i.prototype.translate=function(){e.prototype.translate.call(this),this.getRadii(),this.translateBubble()},i.prototype.translateBubble=function(){for(var t=this.data,e=this.options,i=this.radii,o=this.getPxExtremes().minPxSize,r=t.length;r--;){var s=t[r],n=i?i[r]:0;"z"===this.zoneAxis&&(s.negative=(s.z||0)<(e.zThreshold||0)),x(n)&&n>=o/2?(s.marker=y(s.marker,{radius:n,width:2*n,height:2*n}),s.dlBox={x:s.plotX-n,y:s.plotY-n,width:2*n,height:2*n}):(s.shapeArgs=s.plotY=s.dlBox=void 0,s.isInside=!1)}},i.prototype.getPxExtremes=function(){var t=Math.min(this.chart.plotWidth,this.chart.plotHeight),e=function(e){var i;return"string"==typeof e&&(i=/%$/.test(e),e=parseInt(e,10)),i?t*e/100:e},i=e(M(this.options.minSize,8)),o=Math.max(e(M(this.options.maxSize,"20%")),i);return{minPxSize:i,maxPxSize:o}},i.prototype.getZExtremes=function(){var t=this.options,e=(this.zData||[]).filter(x);if(e.length){var i=M(t.zMin,v(m(e),!1===t.displayNegative?t.zThreshold||0:-Number.MAX_VALUE,Number.MAX_VALUE)),o=M(t.zMax,g(e));if(x(i)&&x(o))return{zMin:i,zMax:o}}},i.defaultOptions=b(u.defaultOptions,{dataLabels:{formatter:function(){var t=this.series.chart.numberFormatter,e=this.point.z;return x(e)?t(e,-1):""},inside:!0,verticalAlign:"middle"},animationLimit:250,marker:{lineColor:null,lineWidth:1,fillOpacity:.5,radius:null,states:{hover:{radiusPlus:0}},symbol:"circle"},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"}),i}(u);return y(w.prototype,{alignDataLabel:d.alignDataLabel,applyZones:l,bubblePadding:!0,isBubble:!0,pointArrayMap:["y","z"],pointClass:e,parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],specialGroup:"group",zoneAxis:"z"}),f(w,"updatedData",function(t){delete t.target.chart.bubbleZExtremes}),f(w,"remove",function(t){delete t.target.chart.bubbleZExtremes}),r.registerSeriesType("bubble",w),w}),i(e,"Series/MapBubble/MapBubblePoint.js",[e["Series/Bubble/BubblePoint.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){var o,r=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),s=e.seriesTypes.map.prototype.pointClass.prototype,n=i.extend,a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.isValid=function(){return"number"==typeof this.z},e}(t);return n(a.prototype,{applyOptions:s.applyOptions,getProjectedBounds:s.getProjectedBounds}),a}),i(e,"Series/MapBubble/MapBubbleSeries.js",[e["Series/Bubble/BubbleSeries.js"],e["Series/MapBubble/MapBubblePoint.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i,o){var r,s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),n=i.seriesTypes,a=n.map.prototype,h=n.mappoint.prototype,l=o.extend,c=o.merge,p=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.data=void 0,t.options=void 0,t.points=void 0,t.clearBounds=a.clearBounds,t}return s(i,e),i.prototype.searchPoint=function(t,e){return this.searchKDTree({clientX:t.chartX-this.chart.plotLeft,plotY:t.chartY-this.chart.plotTop},e,t)},i.prototype.translate=function(){h.translate.call(this),this.getRadii(),this.translateBubble()},i.prototype.updateParallelArrays=function(t,i,o){e.prototype.updateParallelArrays.call(this,t,i,o);var r=this.processedXData,s=this.xData;r&&s&&(r.length=s.length)},i.defaultOptions=c(t.defaultOptions,{lineWidth:0,animationLimit:500,joinBy:"hc-key",tooltip:{pointFormat:"{point.name}: {point.z}"}}),i}(t);return l(p.prototype,{type:"mapbubble",axisTypes:["colorAxis"],getProjectedBounds:a.getProjectedBounds,isCartesian:!1,pointArrayMap:["z"],pointClass:e,processData:a.processData,projectPoint:h.projectPoint,setData:a.setData,setOptions:a.setOptions,updateData:a.updateData,useMapGeometry:!0,xyFromShape:!0}),i.registerSeriesType("mapbubble",p),p}),i(e,"Series/Heatmap/HeatmapPoint.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){var i,o=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),r=t.seriesTypes.scatter.prototype.pointClass,s=e.clamp,n=e.defined,a=e.extend,h=e.pick,l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.options=void 0,e.series=void 0,e.value=void 0,e.x=void 0,e.y=void 0,e}return o(e,t),e.prototype.applyOptions=function(e,i){return(this.isNull||null===this.value)&&delete this.color,t.prototype.applyOptions.call(this,e,i),this.formatPrefix=this.isNull||null===this.value?"null":"point",this},e.prototype.getCellAttributes=function(){for(var t=this.series,e=t.options,i=(e.colsize||1)/2,o=(e.rowsize||1)/2,r=t.xAxis,a=t.yAxis,l=this.options.marker||t.options.marker,c=t.pointPlacementToXValue(),p=h(this.pointPadding,e.pointPadding,0),d={x1:s(Math.round(r.len-r.translate(this.x-i,!1,!0,!1,!0,-c)),-r.len,2*r.len),x2:s(Math.round(r.len-r.translate(this.x+i,!1,!0,!1,!0,-c)),-r.len,2*r.len),y1:s(Math.round(a.translate(this.y-o,!1,!0,!1,!0)),-a.len,2*a.len),y2:s(Math.round(a.translate(this.y+o,!1,!0,!1,!0)),-a.len,2*a.len)},u=0,f=[["width","x"],["height","y"]];u"},states:{hover:{halo:!1,brightness:.2}},legendSymbol:"rectangle"}}),i(e,"Series/InterpolationUtilities.js",[e["Core/Globals.js"],e["Core/Utilities.js"]],function(t,e){var i=t.doc,o=e.defined,r=e.pick;return{colorFromPoint:function(t,e){var i=e.series.colorAxis;if(i){var s=i.toColor(t||0,e).split(")")[0].split("(")[1].split(",").map(function(t){return r(parseFloat(t),parseInt(t,10))});return s[3]=255*r(s[3],1),o(t)&&e.visible||(s[3]=0),s}return[0,0,0,0]},getContext:function(t){var e=t.canvas,o=t.context;return e&&o?(o.clearRect(0,0,e.width,e.height),o):(t.canvas=i.createElement("canvas"),t.context=t.canvas.getContext("2d",{willReadFrequently:!0})||void 0,t.context)}}}),i(e,"Series/Heatmap/HeatmapSeries.js",[e["Core/Color/Color.js"],e["Series/ColorMapComposition.js"],e["Series/Heatmap/HeatmapPoint.js"],e["Series/Heatmap/HeatmapSeriesDefaults.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Renderer/SVG/SVGRenderer.js"],e["Core/Utilities.js"],e["Series/InterpolationUtilities.js"]],function(t,e,i,o,r,s,n,a){var h,l=this&&this.__extends||(h=function(t,e){return(h=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),c=this&&this.__assign||function(){return(c=Object.assign||function(t){for(var e,i=1,o=arguments.length;i