mirror of
https://github.com/yuzu-mirror/yuzu-mirror.github.io.git
synced 2025-12-06 07:12:21 +01:00
35 lines
287 KiB
JavaScript
35 lines
287 KiB
JavaScript
function releaseCallback(e,t,n){if(n.status!==200||n.responseText.length<10)throw document.getElementById(`last-updated-${e}`).innerText="never",document.getElementById(`unavailable-${e}`).classList.remove("is-hidden"),document.getElementById(`downloads-${e}`).classList.add("is-hidden"),new Error(n.responseText);var s,o,i,a,r,l,d,h,m,c=JSON.parse(n.responseText),u=0;document.getElementById(`last-updated-${e}`).innerText=moment(c[0].published_at).fromNow();for(i=0;i<c.length;++i){if(s=c[i],l=!1,d=!1,s.assets.forEach(function(e){if(e.name.includes("-mingw-"))return;e.name.includes("windows")&&(l=!0),e.name.includes(".apk")&&(d=!0)}),!l&&!d)continue;if(h=moment(s.published_at).fromNow(),a=s.target_commitish,m=`https://github.com/yuzu-emu/yuzu-${e}/commit/${a}`,o="",e=="mainline"?o="Mainline Build":e=="android"&&(o="Android Build"),a&&(o+=" - "+a.substring(0,9)),r="",s.assets.forEach(function(t){if(t.name.includes("nupkg"))return;if(t.name.includes(".7z"))return;if(t.name.includes("RELEASES"))return;if(t.name.includes(".tar.xz"))return;if(t.name.includes("-debugsymbols.zip"))return;if(t.name.includes(".zsync"))return;if(t.name.includes(".aab"))return;if(t.name.includes("-mingw-"))return;if(t.name.includes("osx"))return;var o,n="unknown";t.name.includes("windows")?n="windows":t.name.includes("exe")?n="windows":t.name.includes("osx")?n="apple":t.name.includes("AppImage")?n="linux":t.name.includes(".apk")&&(n="android"),o=`https://github.com/yuzu-emu/yuzu-${e}/releases/download/${s.tag_name}/${t.name}`,r+=`
|
|
<a class="level-item">
|
|
<a href="${o}">
|
|
<span class="icon is-medium">
|
|
<i class="fab fa-2x fa-${n}"></i>
|
|
</span>
|
|
</a>
|
|
</a>`}),r+=`
|
|
<a class="level-item">
|
|
<a href="${s.html_url}">
|
|
<span class="icon is-medium">
|
|
<i class="fab fa-2x fa-github"></i>
|
|
</span>
|
|
</a>
|
|
</a>
|
|
`,document.getElementById(`downloads-${e}`).innerHTML+=`<div class="box">
|
|
<article class="media">
|
|
<div class="media-content">
|
|
<div class="content">
|
|
<p>
|
|
<strong><a href="${m}">${o}</a></strong>
|
|
<small>${h}</small>
|
|
</p>
|
|
</div>
|
|
<nav class="level is-mobile">
|
|
<div class="level-left">
|
|
${r}
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
</article>
|
|
</div>`,u++,u>=t)break}}function getRelease(e,t=3){var n=new XMLHttpRequest;n.open("GET",`https://api.github.com/repos/yuzu-emu/yuzu-${e}/releases`),n.onload=function(){releaseCallback(e,t,this)},n.send()}function fetchPR(e,t){return fetch(`https://api.github.com/repos/${e}-emu/${e}/pulls/${t}`,{headers:{Accept:"application/vnd.github.v3+json","X-Requested-With":"XMLHttpRequest"},method:"GET"}).then(function(e){return e.json()})}function buildHovercard(e){const t=document.getElementById("gh-template"),s=t.getElementsByClassName("gh-hover-title")[0];s.firstChild.innerText=e.title,s.href=e.html_url;const o=e.merged_at;let n="open",i="";if(o){let e=moment.utc(o);i=e.fromNow(),n="merged",t.getElementsByClassName("gh-hover-date")[0].innerText=`Merged ${i}.`}else e.state==="closed"&&(n="closed");return t.getElementsByClassName("gh-hover-icon")[0].classList.add(n),t.getElementsByClassName("gh-hover-number")[0].innerText=`#${e.number}`,t.innerHTML}function createHovercard(e,t){return fetchPR(e,t).then(function(e){return buildHovercard(e)})}function showHovercard(e,t){if(e._loading)return;if(e._cached){e.setContent(e._cached);return}e._loading=!0;const n=e.reference.getAttribute("data-gh-pr");createHovercard(t,n).then(function(t){e._cached=t,e.setContent(t),e._loading=!1}).catch(function(t){e.setContent("Error fetching data from GitHub: "+t),e._loading=!1})}window.showHovercard=showHovercard;const navbar=document.getElementById("hero-navbar"),navbarBaseColor="is-dark";navbar&&window.addEventListener("scroll",()=>{window.scrollY>0?(navbar.classList.add("is-freestanding"),navbar.classList.add(navbarBaseColor)):(navbar.classList.remove("is-freestanding"),navbar.classList.remove(navbarBaseColor))});let colors=["orangered","deepskyblue","yellow","deeppink","lime","gray"];document.body.classList.add("switch-left-"+colors.splice(Math.floor(Math.random()*colors.length),1)[0]),document.body.classList.add("switch-right-"+colors[Math.floor(Math.random()*colors.length)]),document.addEventListener("DOMContentLoaded",function(){const e=document.getElementsByClassName("lazy-load");for(let t=0;t<e.length;t++){const n=e[t];n.src=n.getAttribute("data-src")}});const carousels=document.getElementsByClassName("glide");carousels.length>0&&document.addEventListener("DOMContentLoaded",function(){const e=new Glide(".glide",{type:"carousel",perView:1,focusAt:"center",autoplay:4e3,gap:0,animationTimingFunc:"ease-in-out",animationDuration:1e3});e.mount()}),document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll("div[data-href]").forEach(e=>{e.addEventListener("click",function(){window.location=e.getAttribute("data-href")})}),document.querySelectorAll(".moment-timeago").forEach(e=>{e.innerHTML=moment(e.innerHTML).fromNow()}),document.querySelectorAll(".is-dropdown").forEach(e=>{e.addEventListener("click",function(t){t.stopPropagation(),e.parentElement.querySelectorAll(".is-dropdown-target").forEach(e=>{e.classList.toggle("is-active")})})}),baguetteBox.run(".baguetteBox")}),document.addEventListener("DOMContentLoaded",function(){var e=Array.prototype.slice.call(document.querySelectorAll(".navbar-burger"),0);e.length>0&&e.forEach(function(e){e.addEventListener("click",function(){var t=e.dataset.target,n=document.getElementById(t);e.classList.toggle("is-active"),n.classList.toggle("is-active")})})}),!function(e,t){"use strict";"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.baguetteBox=t()}(this,function(){"use strict";var t,n,a,d,u,K='<svg width="44" height="60"><polyline points="30 10 10 30 30 50" stroke="rgba(255,255,255,0.5)" stroke-width="4"stroke-linecap="butt" fill="none" stroke-linejoin="round"/></svg>',U='<svg width="44" height="60"><polyline points="14 10 34 30 14 50" stroke="rgba(255,255,255,0.5)" stroke-width="4"stroke-linecap="butt" fill="none" stroke-linejoin="round"/></svg>',W='<svg width="30" height="30"><g stroke="rgb(160,160,160)" stroke-width="4"><line x1="5" y1="5" x2="25" y2="25"/><line x1="5" y1="25" x2="25" y2="5"/></g></svg>',e={},$={captions:!0,buttons:"auto",fullScreen:!1,noScrollbars:!1,bodyClass:"baguetteBox-open",titleTag:!1,async:!1,preload:2,animation:"slideIn",afterShow:null,afterHide:null,onChange:null,overlayBackgroundColor:"rgba(0,0,0,.8)"},l={},h=[],s=0,O=!1,o={},b=!1,V=/.+\.(gif|jpe?g|png|webp)/i,m={},f=[],x=null,B=function(e){-1!==e.target.id.indexOf("baguette-img")&&v()},P=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,j()},A=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,y()},R=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,v()},L=function(e){o.count++,1<o.count&&(o.multitouch=!0),o.startX=e.changedTouches[0].pageX,o.startY=e.changedTouches[0].pageY},N=function(e){if(!b&&!o.multitouch){e.preventDefault?e.preventDefault():e.returnValue=!1;var t=e.touches[0]||e.changedTouches[0];40<t.pageX-o.startX?(b=!0,j()):t.pageX-o.startX<-40?(b=!0,y()):100<o.startY-t.pageY&&v()}},k=function(){o.count--,o.count<=0&&(o.multitouch=!1),b=!1},D=function(){k()},M=function(e){"block"===t.style.display&&t.contains&&!t.contains(e.target)&&(e.stopPropagation(),z())};function S(e){if(m.hasOwnProperty(e)){var t=m[e].galleries;[].forEach.call(t,function(e){[].forEach.call(e,function(e){i(e.imageElement,"click",e.eventHandler)}),h===e&&(h=[])}),delete m[e]}}function E(e){switch(e.keyCode){case 37:j();break;case 39:y();break;case 27:v();break;case 36:!function(t){return t&&t.preventDefault(),p(0)}(e);break;case 35:!function(t){return t&&t.preventDefault(),p(h.length-1)}(e)}}function F(s,o){if(h!==s){for(h=s,function(o){o||(o={});for(var i in $)e[i]=$[i],"undefined"!=typeof o[i]&&(e[i]=o[i]);n.style.transition=n.style.webkitTransition="fadeIn"===e.animation?"opacity .4s ease":"slideIn"===e.animation?"":"none","auto"===e.buttons&&("ontouchstart"in window||1===h.length)&&(e.buttons=!1),a.style.display=u.style.display=e.buttons?"":"none";try{t.style.backgroundColor=e.overlayBackgroundColor}catch{}}(o);n.firstChild;)n.removeChild(n.firstChild);for(var c,l=[],d=[],i=f.length=0;i<s.length;i++)(c=r("div")).className="full-image",c.id="baguette-img-"+i,f.push(c),l.push("baguetteBox-figure-"+i),d.push("baguetteBox-figcaption-"+i),n.appendChild(f[i]);t.setAttribute("aria-labelledby",l.join(" ")),t.setAttribute("aria-describedby",d.join(" "))}}function T(n){e.noScrollbars&&(document.documentElement.style.overflowY="hidden",document.body.style.overflowY="scroll"),"block"!==t.style.display&&(c(document,"keydown",E),o={count:0,startX:null,startY:null},_(s=n,function(){C(s),w(s)}),I(),t.style.display="block",e.fullScreen&&function(){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen&&t.mozRequestFullScreen()}(),setTimeout(function(){t.className="visible",e.bodyClass&&document.body.classList&&document.body.classList.add(e.bodyClass),e.afterShow&&e.afterShow()},50),e.onChange&&e.onChange(s,f.length),x=document.activeElement,z(),O=!0)}function z(){e.buttons?a.focus():d.focus()}function v(){e.noScrollbars&&(document.documentElement.style.overflowY="auto",document.body.style.overflowY="auto"),"none"!==t.style.display&&(i(document,"keydown",E),t.className="",setTimeout(function(){t.style.display="none",document.fullscreen&&function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}(),e.bodyClass&&document.body.classList&&document.body.classList.remove(e.bodyClass),e.afterHide&&e.afterHide(),x&&x.focus(),O=!1},500))}function _(t,n){if(a=f[t],d=h[t],void 0!==a&&void 0!==d)if(a.getElementsByTagName("img")[0])n&&n();else{var o,a,l,d,i=d.imageElement,u=i.getElementsByTagName("img")[0],c="function"==typeof e.captions?e.captions.call(h,i):i.getAttribute("data-caption")||i.title,m=function(t){if(n=t.href,t.dataset){s=[];for(o in t.dataset)"at-"!==o.substring(0,3)||isNaN(o.substring(3))||(s[o.replace("at-","")]=t.dataset[o]);for(var n,s,o,a=Object.keys(s).sort(function(e,t){return parseInt(e,10)<parseInt(t,10)?-1:1}),r=window.innerWidth*window.devicePixelRatio,i=0;i<a.length-1&&a[i]<r;)i++;n=s[a[i]]||n}return n}(i),s=r("figure");(s.id="baguetteBox-figure-"+t,s.innerHTML='<div class="baguetteBox-spinner"><div class="baguetteBox-double-bounce1"></div><div class="baguetteBox-double-bounce2"></div></div>',e.captions&&c)&&(l=r("figcaption"),l.id="baguetteBox-figcaption-"+t,l.innerHTML=c,s.appendChild(l)),a.appendChild(s),o=r("img"),o.onload=function(){var o=document.querySelector("#baguette-img-"+t+" .baguetteBox-spinner");s.removeChild(o),!e.async&&n&&n()},o.setAttribute("src",m),o.alt=u&&u.alt||"",e.titleTag&&c&&(o.title=c),s.appendChild(o),e.async&&n&&n()}}function y(){return p(s+1)}function j(){return p(s-1)}function p(t,n){return!O&&0<=t&&t<n.length?(F(n,e),T(t),!0):t<0?(e.animation&&H("left"),!1):t>=f.length?(e.animation&&H("right"),!1):(_(s=t,function(){C(s),w(s)}),I(),e.onChange&&e.onChange(s,f.length),!0)}function H(e){n.className="bounce-from-"+e,setTimeout(function(){n.className=""},400)}function I(){var t=100*-s+"%";"fadeIn"===e.animation?(n.style.opacity=0,setTimeout(function(){l.transforms?n.style.transform=n.style.webkitTransform="translate3d("+t+",0,0)":n.style.left=t,n.style.opacity=1},400)):l.transforms?n.style.transform=n.style.webkitTransform="translate3d("+t+",0,0)":n.style.left=t}function C(t){t-s>=e.preload||_(t+1,function(){C(t+1)})}function w(t){s-t>=e.preload||_(t-1,function(){w(t-1)})}function c(e,t,n,s){e.addEventListener?e.addEventListener(t,n,s):e.attachEvent("on"+t,function(e){(e=e||window.event).target=e.target||e.srcElement,n(e)})}function i(e,t,n,s){e.removeEventListener?e.removeEventListener(t,n,s):e.detachEvent("on"+t,n)}function g(e){return document.getElementById(e)}function r(e){return document.createElement(e)}return[].forEach||(Array.prototype.forEach=function(e,t){for(var n=0;n<this.length;n++)e.call(t,this[n],n,this)}),[].filter||(Array.prototype.filter=function(e,t,n,s,o){for(n=this,s=[],o=0;o<n.length;o++)e.call(t,n[o],o,n)&&s.push(n[o]);return s}),{run:function(s,o){return l.transforms=function(){var t=r("div");return"undefined"!=typeof t.style.perspective||"undefined"!=typeof t.style.webkitPerspective}(),l.svg=function(){var t=r("div");return t.innerHTML="<svg/>","http://www.w3.org/2000/svg"===(t.firstChild&&t.firstChild.namespaceURI)}(),l.passiveEvents=function(){var n,t=!1;try{n=Object.defineProperty({},"passive",{get:function(){t=!0}}),window.addEventListener("test",null,n)}catch{}return t}(),function(){if(t=g("baguetteBox-overlay"))return n=g("baguetteBox-slider"),a=g("previous-button"),u=g("next-button"),void(d=g("close-button"));(t=r("div")).setAttribute("role","dialog"),t.id="baguetteBox-overlay",document.getElementsByTagName("body")[0].appendChild(t),(n=r("div")).id="baguetteBox-slider",t.appendChild(n),(a=r("button")).setAttribute("type","button"),a.id="previous-button",a.setAttribute("aria-label","Previous"),a.innerHTML=l.svg?K:"<",t.appendChild(a),(u=r("button")).setAttribute("type","button"),u.id="next-button",u.setAttribute("aria-label","Next"),u.innerHTML=l.svg?U:">",t.appendChild(u),(d=r("button")).setAttribute("type","button"),d.id="close-button",d.setAttribute("aria-label","Close"),d.innerHTML=l.svg?W:"×",t.appendChild(d),a.className=u.className=d.className="baguetteBox-button",function(){var s=l.passiveEvents?{passive:!0}:null;c(t,"click",B),c(a,"click",P),c(u,"click",A),c(d,"click",R),c(n,"contextmenu",D),c(t,"touchstart",L,s),c(t,"touchmove",N,s),c(t,"touchend",k),c(document,"focus",M,!0)}()}(),S(s),function(t,n){var o=document.querySelectorAll(t),s={galleries:[],nodeList:o};return m[t]=s,[].forEach.call(o,function(e){n&&n.filter&&(V=n.filter);var o,t=[];t="A"===e.tagName?[e]:e.getElementsByTagName("a"),0!==(t=[].filter.call(t,function(e){if(-1===e.className.indexOf(n&&n.ignoreClass))return V.test(e.href)})).length&&(o=[],[].forEach.call(t,function(e,t){var s=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1,F(o,n),T(t)},i={eventHandler:s,imageElement:e};c(e,"click",s),o.push(i)}),s.galleries.push(o))}),s.galleries}(s,o)},show:p,showNext:y,showPrevious:j,hide:v,destroy:function(){!function(){var s=l.passiveEvents?{passive:!0}:null;i(t,"click",B),i(a,"click",P),i(u,"click",A),i(d,"click",R),i(n,"contextmenu",D),i(t,"touchstart",L,s),i(t,"touchmove",N,s),i(t,"touchend",k),i(document,"focus",M,!0)}(),function(){for(var t in m)m.hasOwnProperty(t)&&S(t)}(),i(document,"keydown",E),document.getElementsByTagName("body")[0].removeChild(document.getElementById("baguetteBox-overlay")),m={},h=[],s=0}}}),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Glide=t()}(this,function(){"use strict";var S={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,bound:!1,swipeThreshold:80,dragThreshold:120,perTouch:!1,touchRatio:.5,touchAngle:45,animationDuration:400,rewind:!0,rewindDuration:800,animationTimingFunc:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",throttle:10,direction:"ltr",peek:0,breakpoints:{},classes:{direction:{ltr:"glide--ltr",rtl:"glide--rtl"},slider:"glide--slider",carousel:"glide--carousel",swipeable:"glide--swipeable",dragging:"glide--dragging",cloneSlide:"glide__slide--clone",activeNav:"glide__bullet--active",activeSlide:"glide__slide--active",disabledArrow:"glide__arrow--disabled"}},C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(){function e(e,t){for(var n,s=0;s<t.length;s++)n=t[s],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}(),n=Object.assign||function(e){for(var t,s,n=1;n<arguments.length;n++){t=arguments[n];for(s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e};function t(e){return parseInt(e)}function d(e){return"string"==typeof e}function o(e){var t=void 0===e?"undefined":C(e);return"function"===t||"object"===t&&!!e}function h(e){return"function"==typeof e}function g(e){return void 0===e}function p(e){return e.constructor===Array}function e(e,t,n){Object.defineProperty(e,t,n)}y=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.events=t,this.hop=t.hasOwnProperty}return r(e,[{key:"on",value:function(e,t){if(p(e))for(var s,n=0;n<e.length;n++)this.on(e[n],t);return this.hop.call(this.events,e)||(this.events[e]=[]),s=this.events[e].push(t)-1,{remove:function(){delete this.events[e][s]}}}},{key:"emit",value:function(e,t){if(p(e))for(var n=0;n<e.length;n++)this.emit(e[n],t);this.hop.call(this.events,e)&&this.events[e].forEach(function(e){e(t||{})})}}]),e}(),m=function(){function e(t){var s,o,i,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};a(this,e),this._c={},this._e=new y,this.disabled=!1,this.selector=t,this.settings=(o=n({},i=S,s=r),s.hasOwnProperty("classes")&&(o.classes=n({},i.classes,s.classes),s.classes.hasOwnProperty("direction")&&(o.classes.direction=n({},i.classes.direction,s.classes.direction))),o),this.index=this.settings.startAt}return r(e,[{key:"mount",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this._e.emit("mount.before"),o(e)&&(this._c=function(e,t,n){var o,i,s={};for(o in t)h(t[o])&&(s[o]=t[o](e,s,n));for(i in s)h(s[i].mount)&&s[i].mount();return s}(this,e,this._e)),this._e.emit("mount.after"),this}},{key:"update",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.settings=n({},this.settings,e),e.hasOwnProperty("startAt")&&(this.index=e.startAt),this._e.emit("update"),this}},{key:"go",value:function(e){return this._c.Run.make(e),this}},{key:"move",value:function(e){return this._c.Transition.disable(),this._c.Move.make(e),this}},{key:"destroy",value:function(){return this._e.emit("destroy"),this}},{key:"play",value:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return e&&(this.settings.autoplay=e),this._e.emit("play"),this}},{key:"pause",value:function(){return this._e.emit("pause"),this}},{key:"disable",value:function(){return this.disabled=!0,this}},{key:"enable",value:function(){return this.disabled=!1,this}},{key:"on",value:function(e,t){return this._e.on(e,t),this}},{key:"isType",value:function(e){return this.settings.type===e}},{key:"settings",get:function(){return this._o},set:function(e){o(e)&&(this._o=e)}},{key:"index",get:function(){return this._i},set:function(e){this._i=t(e)}},{key:"type",get:function(){return this.settings.type}},{key:"disabled",get:function(){return this._d},set:function(e){this._d=!!e}}]),e}();function u(){return(new Date).getTime()}function l(e,t,n){var c,l,s=void 0,o=void 0,i=void 0,r=void 0,a=0;return n||(n={}),l=function(){a=!1===n.leading?0:u(),s=null,r=e.apply(o,i),s||(o=i=null)},c=function(){var c,d=u();return a||!1!==n.leading||(a=d),c=t-(d-a),o=this,i=arguments,c<=0||t<c?(s&&(clearTimeout(s),s=null),a=d,r=e.apply(o,i),s||(o=i=null)):s||!1===n.trailing||(s=setTimeout(l,c)),r},c.cancel=function(){clearTimeout(s),a=0,s=o=i=null},c}c={ltr:["marginLeft","marginRight"],rtl:["marginRight","marginLeft"]};function v(e){for(var t=e.parentNode.firstChild,n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}function b(e){return!!(e&&e instanceof window.HTMLElement)}var c,m,f,y,A='[data-glide-el="track"]',s=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};a(this,e),this.listeners=t}return r(e,[{key:"on",value:function(e,t,n){d(e)&&(e=[e]);for(var s=0;s<e.length;s++)this.listeners[e[s]]=n,t.addEventListener(e[s],this.listeners[e[s]],!1)}},{key:"off",value:function(e,t){d(e)&&(e=[e]);for(var n=0;n<e.length;n++)t.removeEventListener(e[n],this.listeners[e[n]],!1)}},{key:"destroy",value:function(){delete this.listeners}}]),e}(),k=["ltr","rtl"],E={">":"<","<":">","=":"="},O=[function(e,t){return{modify:function(n){return n+t.Gaps.value*e.index}}},function(e,t){return{modify:function(e){return e+t.Clones.grow/2}}},function(e,t){return{modify:function(n){if(0<=e.settings.focusAt){var s=t.Peek.value;return o(s)?n-s.before:n-s}return n}}},function(e,t){return{modify:function(n){var i=t.Gaps.value,a=t.Sizes.width,s=e.settings.focusAt,o=t.Sizes.slideWidth;return"center"===s?n-(a/2-o/2):n-o*s-i*s}}},function(e,t){return{modify:function(e){return t.Direction.is("rtl")?-e:e}}}],i=["touchstart","mousedown"],x=["touchmove","mousemove"],w=["touchend","touchcancel","mouseup","mouseleave"],_=["mousedown","mousemove","mouseup","mouseleave"];function j(e){return o(e)?(t=e,Object.keys(t).sort().reduce(function(e,n){return e[n]=t[n],e[n],e},{})):{};var t}return f={Html:function(t){var s={mount:function(){this.root=t.selector,this.track=this.root.querySelector(A),this.slides=Array.prototype.slice.call(this.wrapper.children).filter(function(e){return!e.classList.contains(t.settings.classes.cloneSlide)})}};return e(s,"root",{get:function(){return s._r},set:function(e){d(e)&&(e=document.querySelector(e)),b(e)&&(s._r=e)}}),e(s,"track",{get:function(){return s._t},set:function(e){b(e)&&(s._t=e)}}),e(s,"wrapper",{get:function(){return s.track.children[0]}}),s},Translate:function(e,t,n){var s={set:function(n){var s,o,i=(s=e,o=t,{mutate:function(e){for(var t=0;t<O.length;t++)e=O[t](s,o).modify(e);return e}}).mutate(n);t.Html.wrapper.style.transform="translate3d("+-1*i+"px, 0px, 0px)"},remove:function(){t.Html.wrapper.style.transform=""}};return n.on("move",function(o){var r=t.Gaps.value,i=t.Sizes.length,a=t.Sizes.slideWidth;return e.isType("carousel")&&t.Run.isOffset("<")?(t.Transition.after(function(){n.emit("translate.jump"),s.set(a*(i-1))}),s.set(-a-r*i)):e.isType("carousel")&&t.Run.isOffset(">")?(t.Transition.after(function(){n.emit("translate.jump"),s.set(0)}),s.set(a*i+r*i)):s.set(o.movement)}),n.on("destroy",function(){s.remove()}),s},Transition:function(t,n,s){var i=!1,o={compose:function(e){var n=t.settings;return i?e+" 0ms "+n.animationTimingFunc:e+" "+this.duration+"ms "+n.animationTimingFunc},set:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"transform";n.Html.wrapper.style.transition=this.compose(e)},remove:function(){n.Html.wrapper.style.transition=""},after:function(e){setTimeout(function(){e()},this.duration)},enable:function(){i=!1,this.set()},disable:function(){i=!0,this.set()}};return e(o,"duration",{get:function(){var e=t.settings;return t.isType("slider")&&n.Run.offset?e.rewindDuration:e.animationDuration}}),s.on("move",function(){o.set()}),s.on(["build.before","resize","translate.jump"],function(){o.disable()}),s.on("run",function(){o.enable()}),s.on("destroy",function(){o.remove()}),o},Direction:function(t,n,s){var o={mount:function(){this.value=t.settings.direction},resolve:function(e){var t=e.slice(0,1);return this.is("rtl")?e.split(t).join(E[t]):e},is:function(e){return this.value===e},addClass:function(){n.Html.root.classList.add(t.settings.classes.direction[this.value])},removeClass:function(){n.Html.root.classList.remove(t.settings.classes.direction[this.value])}};return e(o,"value",{get:function(){return o._v},set:function(e){-1<k.indexOf(e)&&(o._v=e)}}),s.on(["destroy","update"],function(){o.removeClass()}),s.on("update",function(){o.mount()}),s.on(["build.before","update"],function(){o.addClass()}),o},Peek:function(n,s,i){var a={mount:function(){this.value=n.settings.peek}};return e(a,"value",{get:function(){return a._v},set:function(e){o(e)?(e.before=t(e.before),e.after=t(e.after)):e=t(e),a._v=e}}),e(a,"reductor",{get:function(){var e=a.value,t=n.settings.perView;return o(e)?e.before/t+e.after/t:2*e/t}}),i.on(["resize","update"],function(){a.mount()}),a},Sizes:function(t,n,s){var o={setupSlides:function(){for(var t=n.Html.slides,e=0;e<t.length;e++)t[e].style.width=this.slideWidth+"px"},setupWrapper:function(){n.Html.wrapper.style.width=this.wrapperSize+"px"},remove:function(){for(var t=n.Html.slides,e=0;e<t.length;e++)t[e].style.width="";n.Html.wrapper.style.width=""}};return e(o,"length",{get:function(){return n.Html.slides.length}}),e(o,"width",{get:function(){return n.Html.root.offsetWidth}}),e(o,"wrapperSize",{get:function(){return o.slideWidth*o.length+n.Gaps.grow+n.Clones.grow}}),e(o,"slideWidth",{get:function(){return o.width/t.settings.perView-n.Peek.reductor-n.Gaps.reductor}}),s.on(["build.before","resize","update"],function(){o.setupSlides(),o.setupWrapper()}),s.on("destroy",function(){o.remove()}),o},Gaps:function(n,s,o){var i={mount:function(){this.value=n.settings.gap},apply:function(e){for(var n,o,t=0,i=e.length;t<i;t++)n=e[t].style,o=s.Direction.value,n[c[o][0]]=0!==t?this.value/2+"px":"",t!==e.length-1?n[c[o][1]]=this.value/2+"px":n[c[o][1]]=""},remove:function(e){for(var n,t=0,s=e.length;t<s;t++)n=e[t].style,n.marginLeft="",n.marginRight=""}};return e(i,"value",{get:function(){return i._v},set:function(e){i._v=t(e)}}),e(i,"grow",{get:function(){return i.value*(s.Sizes.length-1)}}),e(i,"reductor",{get:function(){var e=n.settings.perView;return i.value*(e-1)/e}}),o.on("update",function(){i.mount()}),o.on(["build.after","update"],l(function(){i.apply(s.Html.wrapper.children)},30)),o.on("destroy",function(){i.remove(s.Html.wrapper.children)}),i},Move:function(n,s,o){var i={mount:function(){this._o=0},make:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;this.offset=t,o.emit("move",{movement:this.value}),s.Transition.after(function(){o.emit("move.after",{movement:e.value})})}};return e(i,"offset",{get:function(){return i._o},set:function(e){i._o=g(e)?0:t(e)}}),e(i,"translate",{get:function(){return s.Sizes.slideWidth*n.index}}),e(i,"value",{get:function(){var e=this.offset,t=this.translate;return s.Direction.is("rtl")?t+e:t-e}}),o.on(["build.before","run"],function(){i.make()}),i},Clones:function(t,n,s){var o={mount:function(){this.items=[],t.isType("carousel")&&(this.pattern=this.map(),this.items=this.collect())},map:function(){var s,o,a,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],r=t.settings.perView,e=n.Html.slides.length;if(0!==e)for(a=0;a<Math.max(1,Math.floor(r/e));a++){for(s=0;s<=e-1;s++)i.push(""+s);for(o=e-1;0<=o;o--)i.unshift("-"+o)}return i},collect:function(){for(var s,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],i=this.pattern,e=0;e<i.length;e++)s=n.Html.slides[Math.abs(i[e])].cloneNode(!0),s.classList.add(t.settings.classes.cloneSlide),o.push(s);return o},append:function(){for(var t,s=this.items,o=this.pattern,e=0;e<s.length;e++)t=s[e],t.style.width=n.Sizes.slideWidth+"px","-"===o[e][0]?n.Html.wrapper.insertBefore(t,n.Html.slides[0]):n.Html.wrapper.appendChild(t)},remove:function(){for(var t=this.items,e=0;e<t.length;e++)n.Html.wrapper.removeChild(t[e])}};return e(o,"grow",{get:function(){return(n.Sizes.slideWidth+n.Gaps.value)*o.items.length}}),s.on("update",function(){o.remove(),o.mount(),o.append()}),s.on("build.before",function(){t.isType("carousel")&&o.append()}),s.on("destroy",function(){o.remove()}),o},Resize:function(e,t,n){var o=new s,i={mount:function(){this.bind()},bind:function(){o.on("resize",window,l(function(){n.emit("resize")},e.settings.throttle))},unbind:function(){o.off("resize",window)}};return n.on("destroy",function(){i.unbind(),o.destroy()}),i},Build:function(e,t,n){var s={mount:function(){n.emit("build.before"),this.typeClass(),this.activeClass(),n.emit("build.after")},typeClass:function(){t.Html.root.classList.add(e.settings.classes[e.settings.type])},activeClass:function(){var n=e.settings.classes,s=t.Html.slides[e.index];s.classList.add(n.activeSlide),v(s).forEach(function(e){e.classList.remove(n.activeSlide)})},removeClasses:function(){var n=e.settings.classes;t.Html.root.classList.remove(n[e.settings.type]),t.Html.slides.forEach(function(e){e.classList.remove(n.activeSlide)})}};return n.on(["destroy","update"],function(){s.removeClasses()}),n.on(["resize","update"],function(){s.mount()}),n.on("move.after",function(){s.activeClass()}),s},Run:function(n,s,o){var i={mount:function(){this._o=!1},make:function(e){var t=this;n.disabled||(n.disable(),this.move=e,o.emit("run.before",this.move),this.calculate(),o.emit("run",this.move),s.Transition.after(function(){(t.isOffset("<")||t.isOffset(">"))&&(t._o=!1,o.emit("run.offset",t.move)),o.emit("run.after",t.move),n.enable()}))},calculate:function(){var s=this.move,i=this.length,e=s.steps,r=s.direction,a="number"==typeof t(e)&&0!==t(e);switch(r){case">":">"===e?n.index=i:this.isEnd()?(n.isType("slider")&&!n.settings.rewind||(this._o=!0,n.index=0),o.emit("run.end",s)):a?n.index+=Math.min(i-n.index,-t(e)):n.index++;break;case"<":"<"===e?n.index=0:this.isStart()?(n.isType("slider")&&!n.settings.rewind||(this._o=!0,n.index=i),o.emit("run.start",s)):a?n.index-=Math.min(n.index,t(e)):n.index--;break;case"=":n.index=e}},isStart:function(){return 0===n.index},isEnd:function(){return n.index===this.length},isOffset:function(e){return this._o&&this.move.direction===e}};return e(i,"move",{get:function(){return this._m},set:function(e){this._m={direction:e.substr(0,1),steps:e.substr(1)?e.substr(1):0}}}),e(i,"length",{get:function(){var e=n.settings,o=s.Html.slides.length;return n.isType("slider")&&e.bound?o-1-(t(e.perView)-1)+t(e.focusAt):o-1}}),e(i,"offset",{get:function(){return this._o}}),i},Swipe:function(e,n,o){var a=new s,r=0,d=0,h=0,u=!1,c={mount:function(){this.bindSwipeStart()},start:function(n){if(!u&&!e.disabled){this.disable();var s=this.touches(n);r=null,d=t(s.pageX),h=t(s.pageY),this.bindSwipeMove(),this.bindSwipeEnd(),o.emit("swipe.start")}},move:function(s){if(!e.disabled){var i=e.settings,a=this.touches(s),c=t(a.pageX)-d,u=t(a.pageY)-h,m=Math.abs(c<<2),l=Math.abs(u<<2),f=Math.sqrt(m+l),p=Math.sqrt(l);if(180*(r=Math.asin(p/f))/Math.PI<i.touchAngle&&n.Move.make(c*parseFloat(i.touchRatio)),!(180*r/Math.PI<i.touchAngle))return!1;s.stopPropagation(),s.preventDefault(),n.Html.root.classList.add(i.classes.dragging),o.emit("swipe.move")}},end:function(s){if(!e.disabled){var a=e.settings,h=this.touches(s),l=this.threshold(s),c=h.pageX-d,u=180*r/Math.PI,i=Math.round(c/n.Sizes.slideWidth);this.enable(),l<c&&u<a.touchAngle?(a.perTouch&&(i=Math.min(i,t(a.perTouch))),n.Direction.is("rtl")&&(i=-i),n.Run.make(n.Direction.resolve("<"+i))):c<-l&&u<a.touchAngle?(a.perTouch&&(i=Math.max(i,-t(a.perTouch))),n.Direction.is("rtl")&&(i=-i),n.Run.make(n.Direction.resolve(">"+i))):n.Move.make(),n.Html.root.classList.remove(a.classes.dragging),this.unbindSwipeMove(),this.unbindSwipeEnd(),o.emit("swipe.end")}},bindSwipeStart:function(){var t=e.settings;t.swipeThreshold&&a.on(i[0],n.Html.wrapper,this.start.bind(this)),t.dragThreshold&&a.on(i[1],n.Html.wrapper,this.start.bind(this))},unbindSwipeStart:function(){a.off(i[0],n.Html.wrapper),a.off(i[1],n.Html.wrapper)},bindSwipeMove:function(){a.on(x,n.Html.wrapper,l(this.move.bind(this),e.settings.throttle))},unbindSwipeMove:function(){a.off(x,n.Html.wrapper)},bindSwipeEnd:function(){a.on(w,n.Html.wrapper,this.end.bind(this))},unbindSwipeEnd:function(){a.off(w,n.Html.wrapper)},touches:function(e){return-1<_.indexOf(e.type)?e:e.touches[0]||e.changedTouches[0]},threshold:function(t){var n=e.settings;return-1<_.indexOf(t.type)?n.dragThreshold:n.swipeThreshold},enable:function(){return u=!1,n.Transition.enable(),this},disable:function(){return u=!0,n.Transition.disable(),this}};return o.on("build.after",function(){n.Html.root.classList.add(e.settings.classes.swipeable)}),o.on("destroy",function(){c.unbindSwipeStart(),c.unbindSwipeMove(),c.unbindSwipeEnd(),a.destroy()}),c},Images:function(e,t,n){var o=new s,i={mount:function(){this.bind()},bind:function(){o.on("dragstart",t.Html.wrapper,this.dragstart)},unbind:function(){o.off("dragstart",t.Html.wrapper)},dragstart:function(e){e.preventDefault()}};return n.on("destroy",function(){i.unbind(),o.destroy()}),i},Anchors:function(t,n,o){var r=new s,a=!1,c=!1,i={mount:function(){this._a=n.Html.wrapper.querySelectorAll("a"),this.bind()},bind:function(){r.on("click",n.Html.wrapper,this.click)},unbind:function(){r.off("click",n.Html.wrapper)},click:function(e){e.stopPropagation(),c&&e.preventDefault()},detach:function(){if(c=!0,!a){for(var e=0;e<this.items.length;e++)this.items[e].draggable=!1,this.items[e].setAttribute("data-href",this.items[e].getAttribute("href")),this.items[e].removeAttribute("href");a=!0}return this},attach:function(){if(c=!1,a){for(var e=0;e<this.items.length;e++)this.items[e].draggable=!0,this.items[e].setAttribute("href",this.items[e].getAttribute("data-href"));a=!1}return this}};return e(i,"items",{get:function(){return i._a}}),o.on("swipe.move",function(){i.detach()}),o.on("swipe.end",function(){n.Transition.after(function(){i.attach()})}),o.on("destroy",function(){i.attach(),i.unbind(),r.destroy()}),i},Controls:function(t,n,o){var a=new s,i={mount:function(){this._n=n.Html.root.querySelectorAll('[data-glide-el="controls[nav]"]'),this._c=n.Html.root.querySelectorAll('[data-glide-el^="controls"]'),this.addBindings()},setActive:function(){for(var e=0;e<this._n.length;e++)this.addClass(this._n[e].children)},removeActive:function(){for(var e=0;e<this._n.length;e++)this.removeClass(this._n[e].children)},addClass:function(e){var n=t.settings,s=e[t.index];s.classList.add(n.classes.activeNav),v(s).forEach(function(e){e.classList.remove(n.classes.activeNav)})},removeClass:function(e){e[t.index].classList.remove(t.settings.classes.activeNav)},addBindings:function(){for(var e=0;e<this._c.length;e++)this.bind(this._c[e].children)},removeBindings:function(){for(var e=0;e<this._c.length;e++)this.unbind(this._c[e].children)},bind:function(e){for(var t=0;t<e.length;t++)a.on(["click","touchstart"],e[t],this.click)},unbind:function(e){for(var t=0;t<e.length;t++)a.off(["click","touchstart"],e[t])},click:function(e){e.preventDefault(),n.Run.make(n.Direction.resolve(e.currentTarget.getAttribute("data-glide-dir")))}};return e(i,"items",{get:function(){return i._c}}),o.on(["mount.after","move.after"],function(){i.setActive()}),o.on("destroy",function(){i.removeBindings(),i.removeActive(),a.destroy()}),i},Keyboard:function(e,t,n){var o=new s,i={mount:function(){e.settings.keyboard&&this.bind()},bind:function(){o.on("keyup",document,this.press)},unbind:function(){o.off("keyup",document)},press:function(e){39===e.keyCode&&t.Run.make(t.Direction.resolve(">")),37===e.keyCode&&t.Run.make(t.Direction.resolve("<"))}};return n.on(["destroy","update"],function(){i.unbind()}),n.on("update",function(){i.mount()}),n.on("destroy",function(){o.destroy()}),i},Autoplay:function(n,o,i){var r=new s,a={mount:function(){this.start(),n.settings.hoverpause&&this.bind()},start:function(){var e=this;n.settings.autoplay&&g(this._i)&&(this._i=setInterval(function(){e.stop(),o.Run.make(">"),e.start()},this.time))},stop:function(){this._i=clearInterval(this._i)},bind:function(){var e=this;r.on("mouseover",o.Html.root,function(){e.stop()}),r.on("mouseout",o.Html.root,function(){e.start()})},unbind:function(){r.off(["mouseover","mouseout"],o.Html.root)}};return e(a,"time",{get:function(){var e=o.Html.slides[n.index].getAttribute("data-glide-autoplay");return t(e||n.settings.autoplay)}}),i.on(["destroy","update"],function(){a.unbind()}),i.on(["run.before","pause","destroy","swipe.start","update"],function(){a.stop()}),i.on(["run.after","play","swipe.end"],function(){a.start()}),i.on("update",function(){a.mount()}),i.on("destroy",function(){r.destroy()}),a},Breakpoints:function(e,t,o){var c=new s,a=e.settings,i=a.breakpoints,i=j(i),d=n({},a),r={match:function(e){if(void 0!==window.matchMedia)for(var t in e)if(e.hasOwnProperty(t)&&window.matchMedia("(max-width: "+t+"px)").matches)return e[t];return d}};return n(a,r.match(i)),c.on("resize",window,l(function(){n(a,r.match(i))},e.settings.throttle)),o.on("update",function(){i=j(i),d=n({},a)}),o.on("destroy",function(){c.off("resize",window)}),r}},function(){function t(){return a(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,m),r(t,[{key:"mount",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function e(t,n,s){null===t&&(t=Function.prototype);var i,a,o=Object.getOwnPropertyDescriptor(t,n);return void 0===o?(i=Object.getPrototypeOf(t),null===i?void 0:e(i,n,s)):"value"in o?o.value:(a=o.get,void 0!==a?a.call(s):void 0)}(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"mount",this).call(this,n({},f,e))}}]),t}()}),function(e,t){"object"==typeof module&&module.exports?module.exports=e.document?t(e):t:e.Highcharts=t(e)}("undefined"!=typeof window?window:this,function(e){var n,t=function(){var t="undefined"==typeof e?window:e,s=t.document,n=t.navigator&&t.navigator.userAgent||"",a=s&&s.createElementNS&&!!s.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,r=/(edge|msie|trident)/i.test(n)&&!t.opera,o=-1!==n.indexOf("Firefox"),i=-1!==n.indexOf("Chrome"),c=o&&4>parseInt(n.split("Firefox/")[1],10);return t.Highcharts?t.Highcharts.error(16,!0):{product:"Highcharts",version:"6.1.0",deg2rad:2*Math.PI/360,doc:s,hasBidiBug:c,hasTouch:s&&void 0!==s.documentElement.ontouchstart,isMS:r,isWebKit:-1!==n.indexOf("AppleWebKit"),isFirefox:o,isChrome:i,isSafari:!i&&-1!==n.indexOf("Safari"),isTouchDevice:/(Mobile|Android|Windows Phone)/.test(n),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:a,win:t,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[]}}();return function(e){e.timers=[];var s=e.charts,n=e.doc,t=e.win;e.error=function(n,s){if(n=e.isNumber(n)?"Highcharts error #"+n+": www.highcharts.com/errors/"+n:n,s)throw Error(n);t.console&&console.log(n)},e.Fx=function(e,t,n){this.options=t,this.elem=e,this.prop=n},e.Fx.prototype={dSetter:function(){var s,i=this.paths[0],t=this.paths[1],n=[],o=this.now,e=i.length;if(1===o)n=this.toD;else if(e===t.length&&1>o)for(;e--;)s=parseFloat(i[e]),n[e]=isNaN(s)?t[e]:o*parseFloat(t[e]-s)+s;else n=t;this.elem.attr("d",n,null,!0)},update:function(){var e=this.elem,t=this.prop,n=this.now,s=this.options.step;this[t+"Setter"]?this[t+"Setter"]():e.attr?e.element&&e.attr(t,n,null,!0):e.style[t]=n+this.unit,s&&s.call(e,n,this)},run:function(n,s,o){var r=this,a=r.options,i=function(e){return!i.stopped&&r.step(e)},c=t.requestAnimationFrame||function(e){setTimeout(e,13)},l=function(){for(var t=0;t<e.timers.length;t++)e.timers[t]()||e.timers.splice(t--,1);e.timers.length&&c(l)};n!==s||this.elem["forceAnimate:"+this.prop]?(this.startTime=+new Date,this.start=n,this.end=s,this.unit=o,this.now=this.start,this.pos=0,i.elem=this.elem,i.prop=this.prop,i()&&1===e.timers.push(i)&&c(l)):(delete a.curAnim[this.prop],a.complete&&0===e.keys(a.curAnim).length&&a.complete.call(this.elem))},step:function(t){var s,i=+new Date,n=this.options,o=this.elem,a=n.complete,r=n.duration,c=n.curAnim;return o.attr&&!o.element?t=!1:t||i>=r+this.startTime?(this.now=this.end,this.pos=1,this.update(),s=c[this.prop]=!0,e.objectEach(c,function(e){!0!==e&&(s=!1)}),s&&a&&a.call(o),t=!1):(this.pos=n.easing((i-this.startTime)/r),this.now=this.start+(this.end-this.start)*this.pos,this.update(),t=!0),t},initPath:function(t,n,s){function f(e){var t,n;for(o=e.length;o--;)t="M"===e[o]||"L"===e[o],n=/[a-zA-Z]/.test(e[o+3]),t&&n&&e.splice(o+1,0,e[o+1],e[o+2],e[o+1],e[o+2])}function g(e,t){for(;e.length<l;){e[0]=t[l-e.length];var n=e.slice(0,i);[].splice.apply(e,[0,0].concat(n)),h&&(n=e.slice(e.length-i),[].splice.apply(e,[e.length,0].concat(n)),o--)}e[0]="M"}function p(e,t){for(var n=(l-e.length)/i;0<n&&n--;)a=e.slice().splice(e.length/d-i,i*d),a[0]=t[l-i-n*i],m&&(a[i-6]=a[i-2],a[i-5]=a[i-1]),[].splice.apply(e,[e.length/d,0].concat(a)),h&&n--}n=n||"";var o,a,r,l,d,h,v,c=t.startX,u=t.endX,m=-1<n.indexOf("C"),i=m?7:3;if(n=n.split(" "),s=s.slice(),h=t.isArea,d=h?2:1,m&&(f(n),f(s)),c&&u){for(o=0;o<c.length;o++){if(c[o]===u[0]){r=o;break}if(c[0]===u[u.length-c.length+o]){r=o,v=!0;break}}void 0===r&&(n=[])}return n.length&&e.isNumber(r)&&(l=s.length+r*d*i,v?(g(n,s),p(s,n)):(g(s,n),p(n,s))),[n,s]}},e.Fx.prototype.fillSetter=e.Fx.prototype.strokeSetter=function(){this.elem.attr(this.prop,e.color(this.start).tweenTo(e.color(this.end),this.pos),null,!0)},e.merge=function(){var n,o,t=arguments,s={},i=function(t,n){return"object"!=typeof t&&(t={}),e.objectEach(n,function(s,o){!e.isObject(s,!0)||e.isClass(s)||e.isDOMElement(s)?t[o]=n[o]:t[o]=i(t[o]||{},s)}),t};!0===t[0]&&(s=t[1],t=Array.prototype.slice.call(t,2)),o=t.length;for(n=0;n<o;n++)s=i(s,t[n]);return s},e.pInt=function(e,t){return parseInt(e,t||10)},e.isString=function(e){return"string"==typeof e},e.isArray=function(e){return e=Object.prototype.toString.call(e),"[object Array]"===e||"[object Array Iterator]"===e},e.isObject=function(t,n){return!!t&&"object"==typeof t&&(!n||!e.isArray(t))},e.isDOMElement=function(t){return e.isObject(t)&&"number"==typeof t.nodeType},e.isClass=function(t){var n=t&&t.constructor;return!(!e.isObject(t,!0)||e.isDOMElement(t)||!n||!n.name||"Object"===n.name)},e.isNumber=function(e){return"number"==typeof e&&!isNaN(e)&&1/0>e&&-(1/0)<e},e.erase=function(e,t){for(var n=e.length;n--;)if(e[n]===t){e.splice(n,1);break}},e.defined=function(e){return e!=null},e.attr=function(t,n,s){var o;return e.isString(n)?e.defined(s)?t.setAttribute(n,s):t&&t.getAttribute&&((o=t.getAttribute(n))||"class"!==n||(o=t.getAttribute(n+"Name"))):e.defined(n)&&e.isObject(n)&&e.objectEach(n,function(e,n){t.setAttribute(n,e)}),o},e.splat=function(t){return e.isArray(t)?t:[t]},e.syncTimeout=function(e,t,n){if(t)return setTimeout(e,t,n);e.call(0,n)},e.clearTimeout=function(t){e.defined(t)&&clearTimeout(t)},e.extend=function(e,t){var n;e||(e={});for(n in t)e[n]=t[n];return e},e.pick=function(){var e,t,n=arguments,s=n.length;for(e=0;e<s;e++)if(t=n[e],t!=null)return t},e.css=function(t,n){e.isMS&&!e.svg&&n&&void 0!==n.opacity&&(n.filter="alpha(opacity="+100*n.opacity+")"),e.extend(t.style,n)},e.createElement=function(t,s,o,i,a){t=n.createElement(t);var r=e.css;return s&&e.extend(t,s),a&&r(t,{padding:0,border:"none",margin:0}),o&&r(t,o),i&&i.appendChild(t),t},e.extendClass=function(t,n){var s=function(){};return s.prototype=new t,e.extend(s.prototype,n),s},e.pad=function(e,t,n){return Array((t||2)+1-String(e).replace("-","").length).join(n||0)+e},e.relativeLength=function(e,t,n){return/%$/.test(e)?t*parseFloat(e)/100+(n||0):parseFloat(e)},e.wrap=function(e,t,n){var s=e[t];e[t]=function(){var e=Array.prototype.slice.call(arguments),o=arguments,t=this;return t.proceed=function(){s.apply(t,arguments.length?arguments:o)},e.unshift(s),e=n.apply(this,e),t.proceed=null,e}},e.formatSingle=function(t,n,s){var i=/\.([0-9])/,o=e.defaultOptions.lang;return/f$/.test(t)?(s=(s=t.match(i))?s[1]:-1,null!==n&&(n=e.numberFormat(n,s,o.decimalPoint,-1<t.indexOf(",")?o.thousandsSep:""))):n=(s||e.time).dateFormat(t,n),n},e.format=function(t,n,s){for(var o,i,r,d,u,a="{",l=!1,c=[];t;){if(a=t.indexOf(a),-1===a)break;if(o=t.slice(0,a),l){o=o.split(":"),d=o.shift().split("."),u=d.length,i=n;for(r=0;r<u;r++)i&&(i=i[d[r]]);o.length&&(i=e.formatSingle(o.join(":"),i,s)),c.push(i)}else c.push(o);t=t.slice(a+1),a=(l=!l)?"}":"{"}return c.push(t),c.join("")},e.getMagnitude=function(e){return Math.pow(10,Math.floor(Math.log(e)/Math.LN10))},e.normalizeTickInterval=function(t,n,s,o,i){var r,a=t;s=e.pick(s,1),r=t/s,n||(n=i?[1,1.2,1.5,2,2.5,3,4,5,6,8,10]:[1,2,2.5,5,10],!1===o&&(1===s?n=e.grep(n,function(e){return 0===e%1}):.1>=s&&(n=[1/s])));for(o=0;o<n.length&&!(a=n[o],i&&a*s>=t||!i&&r<=(n[o]+(n[o+1]||n[o]))/2);o++);return a=e.correctFloat(a*s,-Math.round(Math.log(.001)/Math.LN10))},e.stableSort=function(e,t){var n,s,o=e.length;for(n=0;n<o;n++)e[n].safeI=n;e.sort(function(e,n){return s=t(e,n),0===s?e.safeI-n.safeI:s});for(n=0;n<o;n++)delete e[n].safeI},e.arrayMin=function(e){for(var t=e.length,n=e[0];t--;)e[t]<n&&(n=e[t]);return n},e.arrayMax=function(e){for(var t=e.length,n=e[0];t--;)e[t]>n&&(n=e[t]);return n},e.destroyObjectProperties=function(t,n){e.objectEach(t,function(e,s){e&&e!==n&&e.destroy&&e.destroy(),delete t[s]})},e.discardElement=function(t){var n=e.garbageBin;n||(n=e.createElement("div")),t&&n.appendChild(t),n.innerHTML=""},e.correctFloat=function(e,t){return parseFloat(e.toPrecision(t||14))},e.setAnimation=function(t,n){n.renderer.globalAnimation=e.pick(t,n.options.chart.animation,!0)},e.animObject=function(t){return e.isObject(t)?e.merge(t):{duration:t?500:0}},e.timeUnits={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5,month:24192e5,year:314496e5},e.numberFormat=function(t,n,s,o){t=+t||0,n=+n;var a,c,l=e.defaultOptions.lang,r=(t.toString().split(".")[1]||"").split("e")[0].length,i=t.toString().split("e");return-1===n?n=Math.min(r,20):e.isNumber(n)?n&&i[1]&&0>i[1]&&(a=n+ +i[1],0<=a?(i[0]=(+i[0]).toExponential(a).split("e")[0],n=a):(i[0]=i[0].split(".")[0]||0,t=20>n?(i[0]*Math.pow(10,i[1])).toFixed(n):0,i[1]=0)):n=2,c=(Math.abs(i[1]?i[0]:t)+Math.pow(10,-Math.max(n,r)-1)).toFixed(n),r=String(e.pInt(c)),a=3<r.length?r.length%3:0,s=e.pick(s,l.decimalPoint),o=e.pick(o,l.thousandsSep),t=(0>t?"-":"")+(a?r.substr(0,a)+o:""),t+=r.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+o),n&&(t+=s+c.slice(-n)),i[1]&&0!==+t&&(t+="e"+i[1]),t},Math.easeInOutSine=function(e){return-.5*(Math.cos(Math.PI*e)-1)},e.getStyle=function(n,s,o){return"width"===s?Math.min(n.offsetWidth,n.scrollWidth)-e.getStyle(n,"padding-left")-e.getStyle(n,"padding-right"):"height"===s?Math.min(n.offsetHeight,n.scrollHeight)-e.getStyle(n,"padding-top")-e.getStyle(n,"padding-bottom"):(t.getComputedStyle||e.error(27,!0),(n=t.getComputedStyle(n,void 0))&&(n=n.getPropertyValue(s),e.pick(o,"opacity"!==s)&&(n=e.pInt(n))),n)},e.inArray=function(t,n,s){return(e.indexOfPolyfill||Array.prototype.indexOf).call(n,t,s)},e.grep=function(t,n){return(e.filterPolyfill||Array.prototype.filter).call(t,n)},e.find=Array.prototype.find?function(e,t){return e.find(t)}:function(e,t){var n,s=e.length;for(n=0;n<s;n++)if(t(e[n],n))return e[n]},e.some=function(t,n,s){return(e.somePolyfill||Array.prototype.some).call(t,n,s)},e.map=function(e,t){for(var s=[],n=0,o=e.length;n<o;n++)s[n]=t.call(e[n],e[n],n,e);return s},e.keys=function(t){return(e.keysPolyfill||Object.keys).call(void 0,t)},e.reduce=function(t,n,s){return(e.reducePolyfill||Array.prototype.reduce).call(t,n,s)},e.offset=function(e){var s=n.documentElement;return e=e.parentElement?e.getBoundingClientRect():{top:0,left:0},{top:e.top+(t.pageYOffset||s.scrollTop)-(s.clientTop||0),left:e.left+(t.pageXOffset||s.scrollLeft)-(s.clientLeft||0)}},e.stop=function(t,n){for(var s=e.timers.length;s--;)e.timers[s].elem!==t||n&&n!==e.timers[s].prop||(e.timers[s].stopped=!0)},e.each=function(t,n,s){return(e.forEachPolyfill||Array.prototype.forEach).call(t,n,s)},e.objectEach=function(e,t,n){for(var s in e)e.hasOwnProperty(s)&&t.call(n||e[s],e[s],s,e)},e.addEvent=function(t,n,s){var i=t.addEventListener||e.addEventListenerPolyfill,o="function"==typeof t&&t.prototype?t.prototype.protoEvents=t.prototype.protoEvents||{}:t.hcEvents=t.hcEvents||{};return i&&i.call(t,n,s,!1),o[n]||(o[n]=[]),o[n].push(s),function(){e.removeEvent(t,n,s)}},e.removeEvent=function(t,n,s){function a(n,s){var o=t.removeEventListener||e.removeEventListenerPolyfill;o&&o.call(t,n,s,!1)}function r(s){var o,i;t.nodeName&&(n?(o={},o[n]=!0):o=s,e.objectEach(o,function(e,t){if(s[t])for(i=s[t].length;i--;)a(t,s[t][i])}))}var o,i;e.each(["protoEvents","hcEvents"],function(c){var l=t[c];l&&(n?(o=l[n]||[],s?(i=e.inArray(s,o),-1<i&&(o.splice(i,1),l[n]=o),a(n,s)):(r(l),l[n]=[])):(r(l),t[c]={}))})},e.fireEvent=function(t,s,o,i){var a,r,c,l,d;o=o||{},n.createEvent&&(t.dispatchEvent||t.fireEvent)?(a=n.createEvent("Events"),a.initEvent(s,!0,!0),e.extend(a,o),t.dispatchEvent?t.dispatchEvent(a):t.fireEvent(s,a)):e.each(["protoEvents","hcEvents"],function(n){if(t[n])for(c=t[n][s]||[],l=c.length,o.target||e.extend(o,{preventDefault:function(){o.defaultPrevented=!0},target:t,type:s}),r=0;r<l;r++)(d=c[r])&&!1===d.call(t,o)&&o.preventDefault()}),i&&!o.defaultPrevented&&i.call(t,o)},e.animate=function(t,n,s){var o,i,a,r,c="";e.isObject(s)||(r=arguments,s={duration:r[2],easing:r[3],complete:r[4]}),e.isNumber(s.duration)||(s.duration=400),s.easing="function"==typeof s.easing?s.easing:Math[s.easing]||Math.easeInOutSine,s.curAnim=e.merge(n),e.objectEach(n,function(r,l){e.stop(t,l),i=new e.Fx(t,s,l),o=null,"d"===l?(i.paths=i.initPath(t,t.d,n.d),i.toD=n.d,a=0,o=1):t.attr?a=t.attr(l):(a=parseFloat(e.getStyle(t,l))||0,"opacity"!==l&&(c="px")),o||(o=r),o&&o.match&&o.match("px")&&(o=o.replace(/px/g,"")),i.run(a,o,c)})},e.seriesType=function(t,n,s,o,i){var r=e.getOptions(),a=e.seriesTypes;return r.plotOptions[t]=e.merge(r.plotOptions[n],s),a[t]=e.extendClass(a[n]||function(){},o),a[t].prototype.type=t,i&&(a[t].prototype.pointClass=e.extendClass(e.Point,i)),a[t]},e.uniqueKey=function(){var e=Math.random().toString(36).substring(2,9),t=0;return function(){return"highcharts-"+e+"-"+t++}}(),t.jQuery&&(t.jQuery.fn.highcharts=function(){var t=[].slice.call(arguments);if(this[0])return t[0]?(new e[e.isString(t[0])?t.shift():"Chart"](this[0],t[0],t[1]),this):s[e.attr(this[0],"data-highcharts-chart")]})}(t),function(e){var n=e.each,s=e.isNumber,o=e.map,i=e.merge,t=e.pInt;e.Color=function(t){if(!(this instanceof e.Color))return new e.Color(t);this.init(t)},e.Color.prototype={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(e){return[t(e[1]),t(e[2]),t(e[3]),parseFloat(e[4],10)]}},{regex:/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,parse:function(e){return[t(e[1]),t(e[2]),t(e[3]),1]}}],names:{none:"rgba(255,255,255,0)",white:"#ffffff",black:"#000000"},init:function(t){var n,s,i,a;if((this.input=t=this.names[t&&t.toLowerCase?t.toLowerCase():""]||t)&&t.stops)this.stops=o(t.stops,function(t){return new e.Color(t[1])});else if(t&&t.charAt&&"#"===t.charAt()&&(s=t.length,t=parseInt(t.substr(1),16),7===s?n=[(t&16711680)>>16,(t&65280)>>8,t&255,1]:4===s&&(n=[(t&3840)>>4|(t&3840)>>8,(t&240)>>4|t&240,(t&15)<<4|t&15,1])),!n)for(i=this.parsers.length;i--&&!n;)a=this.parsers[i],(s=a.regex.exec(t))&&(n=a.parse(s));this.rgba=n||[]},get:function(e){var o,a=this.input,t=this.rgba;return this.stops?(o=i(a),o.stops=[].concat(o.stops),n(this.stops,function(t,n){o.stops[n]=[o.stops[n][0],t.get(e)]})):o=t&&s(t[0])?"rgb"===e||!e&&1===t[3]?"rgb("+t[0]+","+t[1]+","+t[2]+")":"a"===e?t[3]:"rgba("+t.join(",")+")":a,o},brighten:function(e){var o,i=this.rgba;if(this.stops)n(this.stops,function(t){t.brighten(e)});else if(s(e)&&0!==e)for(o=0;3>o;o++)i[o]+=t(255*e),0>i[o]&&(i[o]=0),255<i[o]&&(i[o]=255);return this},setOpacity:function(e){return this.rgba[3]=e,this},tweenTo:function(e,t){var s=this.rgba,n=e.rgba;return n.length&&s&&s.length?(e=1!==n[3]||1!==s[3],t=(e?"rgba(":"rgb(")+Math.round(n[0]+(s[0]-n[0])*(1-t))+","+Math.round(n[1]+(s[1]-n[1])*(1-t))+","+Math.round(n[2]+(s[2]-n[2])*(1-t))+(e?","+(n[3]+(s[3]-n[3])*(1-t)):"")+")"):t=e.input||"none",t}},e.color=function(t){return new e.Color(t)}}(t),function(e){var b,p=e.addEvent,D=e.animate,o=e.attr,M=e.charts,F=e.color,d=e.css,C=e.createElement,t=e.defined,j=e.deg2rad,T=e.destroyObjectProperties,a=e.doc,r=e.each,i=e.extend,v=e.erase,z=e.grep,A=e.hasTouch,y=e.inArray,_=e.isArray,O=e.isFirefox,w=e.isMS,h=e.isObject,L=e.isString,N=e.isWebKit,l=e.merge,S=e.noop,c=e.objectEach,n=e.pick,u=e.pInt,x=e.removeEvent,E=e.stop,k=e.svg,g=e.SVG_NS,m=e.symbolSizes,f=e.win,s=e.SVGElement=function(){return this};i(s.prototype,{opacity:1,SVG_NS:g,textProps:"direction fontSize fontWeight fontFamily fontStyle color lineHeight width textAlign textDecoration textOverflow textOutline".split(" "),init:function(e,t){this.element="span"===t?C(t):a.createElementNS(this.SVG_NS,t),this.renderer=e},animate:function(t,s,o){return s=e.animObject(n(s,this.renderer.globalAnimation,!0)),0!==s.duration?(o&&(s.complete=o),D(this,t,s)):(this.attr(t,null,o),s.step&&s.step.call(this)),this},complexColor:function(n,s,o){var i,d,h,m,f,p,g,v,b,j,y,w,u=this.renderer,a=[];e.fireEvent(this.renderer,"complexColor",{args:arguments},function(){n.radialGradient?d="radialGradient":n.linearGradient&&(d="linearGradient"),d&&(i=n[d],m=u.gradients,p=n.stops,b=o.radialReference,_(i)&&(n[d]=i={x1:i[0],y1:i[1],x2:i[2],y2:i[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===d&&b&&!t(i.gradientUnits)&&(f=i,i=l(i,u.getRadialAttr(b,f),{gradientUnits:"userSpaceOnUse"})),c(i,function(e,t){"id"!==t&&a.push(t,e)}),c(p,function(e){a.push(e)}),a=a.join(","),m[a]?j=m[a].attr("id"):(i.id=j=e.uniqueKey(),m[a]=h=u.createElement(d).attr(i).add(u.defs),h.radAttr=f,h.stops=[],r(p,function(t){0===t[1].indexOf("rgba")?(y=e.color(t[1]),g=y.get("rgb"),v=y.get("a")):(g=t[1],v=1),t=u.createElement("stop").attr({offset:t[0],"stop-color":g,"stop-opacity":v}).add(h),h.stops.push(t)})),w="url("+u.url+"#"+j+")",o.setAttribute(s,w),o.gradient=a,n.toString=function(){return w})})},applyTextOutline:function(t){var s,i,a,c,l,n=this.element;if(-1!==t.indexOf("contrast")&&(t=t.replace(/contrast/g,this.renderer.getContrast(n.style.fill))),t=t.split(" "),a=t[t.length-1],(s=t[0])&&"none"!==s&&e.svg){this.fakeTS=!0,t=[].slice.call(n.getElementsByTagName("tspan")),this.ySetter=this.xSetter,s=s.replace(/(^[\d.]+)(.*?)$/g,function(e,t,n){return 2*t+n});for(c=t.length;c--;)i=t[c],"highcharts-text-outline"===i.getAttribute("class")&&v(t,n.removeChild(i));l=n.firstChild,r(t,function(e,t){0===t&&(e.setAttribute("x",n.getAttribute("x")),t=n.getAttribute("y"),e.setAttribute("y",t||0),null===t&&n.setAttribute("y",0)),e=e.cloneNode(1),o(e,{class:"highcharts-text-outline",fill:a,stroke:a,"stroke-width":s,"stroke-linejoin":"round"}),n.insertBefore(e,l)})}},attr:function(e,t,n,s){var o,i,a,l,r=this.element,d=this;return"string"==typeof e&&void 0!==t&&(a=e,e={},e[a]=t),"string"==typeof e?d=(this[e+"Getter"]||this._defaultGetter).call(this,e,r):(c(e,function(t,n){o=!1,s||E(this,n),this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)$/.test(n)&&(l||(this.symbolAttr(e),l=!0),o=!0),!this.rotation||"x"!==n&&"y"!==n||(this.doTransform=!0),o||(i=this[n+"Setter"]||this._defaultSetter,i.call(this,t,n,r),this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(n)&&this.updateShadows(n,t,i))},this),this.afterSetters()),n&&n.call(this),d},afterSetters:function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},updateShadows:function(e,t,n){for(var s=this.shadows,o=s.length;o--;)n.call(s[o],"height"===e?Math.max(t-(s[o].cutHeight||0),0):"d"===e?this.d:t,e,s[o])},addClass:function(e,t){var n=this.attr("class")||"";return-1===n.indexOf(e)&&(t||(e=(n+(n?" ":"")+e).replace(" "," ")),this.attr("class",e)),this},hasClass:function(e){return-1!==y(e,(this.attr("class")||"").split(" "))},removeClass:function(e){return this.attr("class",(this.attr("class")||"").replace(e,""))},symbolAttr:function(e){var t=this;r("x y r start end width height innerR anchorX anchorY".split(" "),function(s){t[s]=n(e[s],t[s])}),t.attr({d:t.renderer.symbols[t.symbolName](t.x,t.y,t.width,t.height,t)})},clip:function(e){return this.attr("clip-path",e?"url("+this.renderer.url+"#"+e.id+")":"none")},crisp:function(e,n){var s;return n=n||e.strokeWidth||0,s=Math.round(n)%2/2,e.x=Math.floor(e.x||this.x||0)+s,e.y=Math.floor(e.y||this.y||0)+s,e.width=Math.floor((e.width||this.width||0)-2*s),e.height=Math.floor((e.height||this.height||0)-2*s),t(e.strokeWidth)&&(e.strokeWidth=n),e},css:function(e){var r,l,t=this.styles,a={},n=this.element,s="",h=!t,m=["textOutline","textOverflow","width"];return e&&e.color&&(e.fill=e.color),t&&c(e,function(e,n){e!==t[n]&&(a[n]=e,h=!0)}),h&&(t&&(e=i(t,a)),r=this.textWidth=e&&e.width&&"auto"!==e.width&&"text"===n.nodeName.toLowerCase()&&u(e.width),this.styles=e,r&&!k&&this.renderer.forExport&&delete e.width,n.namespaceURI===this.SVG_NS?(l=function(e,t){return"-"+t.toLowerCase()},c(e,function(e,t){-1===y(t,m)&&(s+=t.replace(/([A-Z])/g,l)+":"+e+";")}),s&&o(n,"style",s)):d(n,e),this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),e&&e.textOutline&&this.applyTextOutline(e.textOutline))),this},strokeWidth:function(){return this["stroke-width"]||0},on:function(e,t){var s=this,n=s.element;return A&&"click"===e?(n.ontouchstart=function(e){s.touchEventFired=Date.now(),e.preventDefault(),t.call(n,e)},n.onclick=function(e){(-1===f.navigator.userAgent.indexOf("Android")||1100<Date.now()-(s.touchEventFired||0))&&t.call(n,e)}):n["on"+e]=t,this},setRadialReference:function(e){var t=this.renderer.gradients[this.element.gradient];return this.element.radialReference=e,t&&t.radAttr&&t.animate(this.renderer.getRadialAttr(e,t.radAttr)),this},translate:function(e,t){return this.attr({translateX:e,translateY:t})},invert:function(e){return this.inverted=e,this.updateTransform(),this},updateTransform:function(){var e=this.translateX||0,o=this.translateY||0,i=this.scaleX,a=this.scaleY,r=this.inverted,c=this.rotation,l=this.matrix,s=this.element;r&&(e+=this.width,o+=this.height),e=["translate("+e+","+o+")"],t(l)&&e.push("matrix("+l.join(",")+")"),r?e.push("rotate(90) scale(-1,1)"):c&&e.push("rotate("+c+" "+n(this.rotationOriginX,s.getAttribute("x"),0)+" "+n(this.rotationOriginY,s.getAttribute("y")||0)+")"),(t(i)||t(a))&&e.push("scale("+n(i,1)+" "+n(a,1)+")"),e.length&&s.setAttribute("transform",e.join(" "))},toFront:function(){var e=this.element;return e.parentNode.appendChild(e),this},align:function(e,t,s){var o,c,l,d,r={},i=this.renderer,a=i.alignedObjects;return e?(this.alignOptions=e,this.alignByTranslate=t,!s||L(s))&&(this.alignTo=o=s||"renderer",v(a,this),a.push(this),s=null):(e=this.alignOptions,t=this.alignByTranslate,o=this.alignTo),s=n(s,i[o],i),o=e.align,i=e.verticalAlign,a=(s.x||0)+(e.x||0),d=(s.y||0)+(e.y||0),"right"===o?c=1:"center"===o&&(c=2),c&&(a+=(s.width-(e.width||0))/c),r[t?"translateX":"x"]=Math.round(a),"bottom"===i?l=1:"middle"===i&&(l=2),l&&(d+=(s.height-(e.height||0))/l),r[t?"translateY":"y"]=Math.round(d),this[this.placed?"animate":"attr"](r),this.placed=!0,this.alignAttr=r,this},getBBox:function(e,s){var o,a,u,h,p,c=this.renderer,l=this.element,d=this.styles,g=this.textStr,m=c.cache,f=c.cacheKeys;if(s=n(s,this.rotation),u=s*j,p=d&&d.fontSize,t(g)&&(a=g.toString(),-1===a.indexOf("<")&&(a=a.replace(/[0-9]/g,"0")),a+=["",s||0,p,this.textWidth,d&&d.textOverflow].join()),a&&!e&&(o=m[a]),!o){if(l.namespaceURI===this.SVG_NS||c.forExport){try{(h=this.fakeTS&&function(e){r(l.querySelectorAll(".highcharts-text-outline"),function(t){t.style.display=e})})&&h("none"),o=l.getBBox?i({},l.getBBox()):{width:l.offsetWidth,height:l.offsetHeight},h&&h("")}catch{}(!o||0>o.width)&&(o={width:0,height:0})}else o=this.htmlGetBBox();if(c.isSVG&&(e=o.width,c=o.height,d&&"11px"===d.fontSize&&17===Math.round(c)&&(o.height=c=14),s&&(o.width=Math.abs(c*Math.sin(u))+Math.abs(e*Math.cos(u)),o.height=Math.abs(c*Math.cos(u))+Math.abs(e*Math.sin(u)))),a&&0<o.height){for(;250<f.length;)delete m[f.shift()];m[a]||f.push(a),m[a]=o}}return o},show:function(e){return this.attr({visibility:e?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(e){var t=this;t.animate({opacity:0},{duration:e||150,complete:function(){t.attr({y:-9999})}})},add:function(e){var n,t=this.renderer,s=this.element;return e&&(this.parentGroup=e),this.parentInverted=e&&e.inverted,void 0!==this.textStr&&t.buildText(this),this.added=!0,(!e||e.handleZ||this.zIndex)&&(n=this.zIndexSetter()),n||(e?e.element:t.box).appendChild(s),this.onAdd&&this.onAdd(),this},safeRemoveChild:function(e){var t=e.parentNode;t&&t.removeChild(e)},destroy:function(){var e=this,t=e.element||{},n=e.renderer.isSVG&&"SPAN"===t.nodeName&&e.parentGroup,s=t.ownerSVGElement,o=e.clipPath;if(t.onclick=t.onmouseout=t.onmouseover=t.onmousemove=t.point=null,E(e),o&&s&&(r(s.querySelectorAll("[clip-path],[CLIP-PATH]"),function(e){var t=e.getAttribute("clip-path"),n=o.element.id;(-1<t.indexOf("(#"+n+")")||-1<t.indexOf('("#'+n+'")'))&&e.removeAttribute("clip-path")}),e.clipPath=o.destroy()),e.stops){for(s=0;s<e.stops.length;s++)e.stops[s]=e.stops[s].destroy();e.stops=null}e.safeRemoveChild(t);for(e.destroyShadows();n&&n.div&&0===n.div.childNodes.length;)t=n.parentGroup,e.safeRemoveChild(n.div),delete n.div,n=t;return e.alignTo&&v(e.renderer.alignedObjects,e),c(e,function(t,n){delete e[n]}),null},shadow:function(e,t,s){var i,a,c,l,u,h,d=[],r=this.element;if(e){if(!this.shadows){l=n(e.width,3),u=(e.opacity||.15)/l,h=this.parentInverted?"(-1,-1)":"("+n(e.offsetX,1)+", "+n(e.offsetY,1)+")";for(a=1;a<=l;a++)i=r.cloneNode(0),c=2*l+1-2*a,o(i,{isShadow:"true",stroke:e.color||"#000000","stroke-opacity":u*a,"stroke-width":c,transform:"translate"+h,fill:"none"}),s&&(o(i,"height",Math.max(o(i,"height")-c,0)),i.cutHeight=c),t?t.element.appendChild(i):r.parentNode&&r.parentNode.insertBefore(i,r),d.push(i);this.shadows=d}}else this.destroyShadows();return this},destroyShadows:function(){r(this.shadows||[],function(e){this.safeRemoveChild(e)},this),this.shadows=void 0},xGetter:function(e){return"circle"===this.element.nodeName&&("x"===e?e="cx":"y"===e&&(e="cy")),this._defaultGetter(e)},_defaultGetter:function(e){return e=n(this[e+"Value"],this[e],this.element?this.element.getAttribute(e):null,0),/^[-0-9.]+$/.test(e)&&(e=parseFloat(e)),e},dSetter:function(e,t,n){e&&e.join&&(e=e.join(" ")),/(NaN| {2}|^$)/.test(e)&&(e="M 0 0"),this[t]!==e&&(n.setAttribute(t,e),this[t]=e)},dashstyleSetter:function(e){var t,n=this["stroke-width"];if("inherit"===n&&(n=1),e=e&&e.toLowerCase()){e=e.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(t=e.length;t--;)e[t]=u(e[t])*n;e=e.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",e)}},alignSetter:function(e){this.alignValue=e,this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[e])},opacitySetter:function(e,t,n){this[t]=e,n.setAttribute(t,e)},titleSetter:function(e){var t=this.element.getElementsByTagName("title")[0];t||(t=a.createElementNS(this.SVG_NS,"title"),this.element.appendChild(t)),t.firstChild&&t.removeChild(t.firstChild),t.appendChild(a.createTextNode(String(n(e),"").replace(/<[^>]*>/g,"").replace(/</g,"<").replace(/>/g,">")))},textSetter:function(e){e!==this.textStr&&(delete this.bBox,this.textStr=e,this.added&&this.renderer.buildText(this))},fillSetter:function(e,t,n){"string"==typeof e?n.setAttribute(t,e):e&&this.complexColor(e,t,n)},visibilitySetter:function(e,t,n){"inherit"===e?n.removeAttribute(t):this[t]!==e&&n.setAttribute(t,e),this[t]=e},zIndexSetter:function(e,n){var s,a,d,o=this.renderer,i=this.parentGroup,r=(i||o).element||o.box,l=this.element,o=r===o.box,c=this.added;if(t(e)&&(l.zIndex=e,e=+e,this[n]===e&&(c=!1),this[n]=e),c){(e=this.zIndex)&&i&&(i.handleZ=!0),n=r.childNodes;for(s=n.length-1;0<=s&&!a;s--)i=n[s],c=i.zIndex,d=!t(c),i!==l&&(0>e&&d&&!o&&!s?(r.insertBefore(l,n[s]),a=!0):(u(c)<=e||d&&(!t(e)||0<=e))&&(r.insertBefore(l,n[s+1]||null),a=!0));a||(r.insertBefore(l,n[o?3:0]||null),a=!0)}return a},_defaultSetter:function(e,t,n){n.setAttribute(t,e)}}),s.prototype.yGetter=s.prototype.xGetter,s.prototype.translateXSetter=s.prototype.translateYSetter=s.prototype.rotationSetter=s.prototype.verticalAlignSetter=s.prototype.rotationOriginXSetter=s.prototype.rotationOriginYSetter=s.prototype.scaleXSetter=s.prototype.scaleYSetter=s.prototype.matrixSetter=function(e,t){this[t]=e,this.doTransform=!0},s.prototype["stroke-widthSetter"]=s.prototype.strokeSetter=function(e,t,n){this[t]=e,this.stroke&&this["stroke-width"]?(s.prototype.fillSetter.call(this,this.stroke,"stroke",n),n.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===t&&0===e&&this.hasStroke&&(n.removeAttribute("stroke"),this.hasStroke=!1)},b=e.SVGRenderer=function(){this.init.apply(this,arguments)},i(b.prototype,{Element:s,SVG_NS:g,init:function(e,t,n,s,i,r){var c,l;s=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}).css(this.getStyle(s)),l=s.element,e.appendChild(l),o(e,"dir","ltr"),-1===e.innerHTML.indexOf("xmlns")&&o(l,"xmlns",this.SVG_NS),this.isSVG=!0,this.box=l,this.boxWrapper=s,this.alignedObjects=[],this.url=(O||N)&&a.getElementsByTagName("base").length?f.location.href.replace(/#.*?$/,"").replace(/<[^>]*>/g,"").replace(/([(')])/g,"\\$1").replace(/ /g,"%20"):"",this.createElement("desc").add().element.appendChild(a.createTextNode("Created with Highcharts 6.1.0")),this.defs=this.createElement("defs").add(),this.allowHTML=r,this.forExport=i,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(t,n,!1),O&&e.getBoundingClientRect&&(t=function(){d(e,{left:0,top:0}),c=e.getBoundingClientRect(),d(e,{left:Math.ceil(c.left)-c.left+"px",top:Math.ceil(c.top)-c.top+"px"})},t(),this.unSubPixelFix=p(f,"resize",t))},getStyle:function(e){return this.style=i({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},e)},setStyle:function(e){this.boxWrapper.css(this.getStyle(e))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var e=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),T(this.gradients||{}),this.gradients=null,e&&(this.defs=e.destroy()),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null},createElement:function(e){var t=new this.Element;return t.init(this,e),t},draw:S,getRadialAttr:function(e,t){return{cx:e[0]-e[2]/2+t.cx*e[2],cy:e[1]-e[2]/2+t.cy*e[2],r:t.r*e[2]}},getSpanWidth:function(e){return e.getBBox(!0).width},applyEllipsis:function(e,t,n,s){var c,d,u=e.rotation,o=n,r=0,i=n.length,l=function(e){t.removeChild(t.firstChild),e&&t.appendChild(a.createTextNode(e))};if(e.rotation=0,o=this.getSpanWidth(e,t),d=o>s){for(;r<=i;)c=Math.ceil((r+i)/2),o=n.substring(0,c)+"\u2026",l(o),o=this.getSpanWidth(e,t),r===i?r=i+1:o>s?i=c-1:r=c;0===i&&l("")}return e.rotation=u,d},escapes:{"&":"&","<":"<",">":">","'":"'",'"':"""},buildText:function(e){var m,_,i=e.element,h=this,F=h.forExport,s=n(e.textStr,"").toString(),M=-1!==s.indexOf("<"),x=i.childNodes,j=o(i,"x"),t=e.styles,l=e.textWidth,w=t&&t.lineHeight,f=t&&t.textOutline,p=t&&"ellipsis"===t.textOverflow,O=t&&"nowrap"===t.whiteSpace,E=t&&t.fontSize,A=x.length,t=l&&!e.added&&this.box,S=function(e){var t=/(px|em)$/.test(e&&e.style.fontSize)?e.style.fontSize:E||h.style.fontSize||12;return w?u(w):h.fontMetrics(t,e.getAttribute("style")?e:i).h},v=function(e,t){return c(h.escapes,function(n,s){t&&-1!==y(n,t)||(e=e.toString().replace(new RegExp(n,"g"),s))}),e},b=function(e,t){var n=e.indexOf("<");if(e=e.substring(n,e.indexOf(">")-n),n=e.indexOf(t+"="),-1!==n&&(n=n+t.length+1,t=e.charAt(n),'"'===t||"'"===t))return e=e.substring(n+1),e.substring(0,e.indexOf(t))},C=[s,p,O,w,f,E,l].join();if(C!==e.textCache){for(e.textCache=C;A--;)i.removeChild(x[A]);M||f||p||l||-1!==s.indexOf(" ")?(t&&t.appendChild(i),s=M?s.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g):[s],s=z(s,function(e){return""!==e}),r(s,function(t,n){var s,c=0;t=t.replace(/^\s+|\s+$/g,"").replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||"),s=t.split("|||"),r(s,function(t){if((""!==t||1===s.length)&&(u={},r=a.createElementNS(h.SVG_NS,"tspan"),(f=b(t,"class"))&&o(r,"class",f),(f=b(t,"style"))&&(f=f.replace(/(;| |^)color([ :])/,"$1fill$2"),o(r,"style",f)),(y=b(t,"href"))&&!F&&(o(r,"onclick",'location.href="'+y+'"'),o(r,"class","highcharts-anchor"),d(r,{cursor:"pointer"})),t=v(t.replace(/<[a-zA-Z/](.|\n)*?>/g,"")||" ")," "!==t)){if(r.appendChild(a.createTextNode(t)),c?u.dx=0:n&&null!==j&&(u.x=j),o(r,u),i.appendChild(r),!c&&_&&(!k&&F&&d(r,{display:"block"}),o(r,"dy",S(r))),l){u=t.replace(/([^\^])-/g,"$1- ").split(" "),y=1<s.length||n||1<u.length&&!O;var r,u,f,y,x,w=[],C=S(r),E=e.rotation;for(p&&(m=h.applyEllipsis(e,r,t,l));!p&&y&&(u.length||w.length);)e.rotation=0,x=h.getSpanWidth(e,r),t=x>l,void 0===m&&(m=t),t&&1!==u.length?(r.removeChild(r.firstChild),w.unshift(u.pop())):(u=w,w=[],u.length&&!O&&(r=a.createElementNS(g,"tspan"),o(r,{dy:C,x:j}),f&&o(r,"style",f),i.appendChild(r)),x>l&&(l=x)),u.length&&r.appendChild(a.createTextNode(u.join(" ").replace(/- /g,"-")));e.rotation=E}c++}}),_=_||i.childNodes.length}),m&&e.attr("title",v(e.textStr,["<",">"])),t&&t.removeChild(i),f&&e.applyTextOutline&&e.applyTextOutline(f)):i.appendChild(a.createTextNode(v(s)))}},getContrast:function(e){return e=F(e).rgba,510<e[0]+e[1]+e[2]?"#000000":"#FFFFFF"},button:function(e,t,n,s,o,a,r,c,d){var m,f,g,v,u=this.label(e,t,n,d,null,null,null,null,"button"),h=0;return u.attr(l({padding:8,r:2},o)),o=l({fill:"#f7f7f7",stroke:"#cccccc","stroke-width":1,style:{color:"#333333",cursor:"pointer",fontWeight:"normal"}},o),m=o.style,delete o.style,a=l(o,{fill:"#e6e6e6"},a),f=a.style,delete a.style,r=l(o,{fill:"#e6ebf5",style:{color:"#000000",fontWeight:"bold"}},r),g=r.style,delete r.style,c=l(o,{style:{color:"#cccccc"}},c),v=c.style,delete c.style,p(u.element,w?"mouseover":"mouseenter",function(){3!==h&&u.setState(1)}),p(u.element,w?"mouseout":"mouseleave",function(){3!==h&&u.setState(h)}),u.setState=function(e){1!==e&&(u.state=h=e),u.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-"+["normal","hover","pressed","disabled"][e||0]),u.attr([o,a,r,c][e||0]).css([m,f,g,v][e||0])},u.attr(o).css(i({cursor:"default"},m)),u.on("click",function(e){3!==h&&s.call(u,e)})},crispLine:function(e,t){return e[1]===e[4]&&(e[1]=e[4]=Math.round(e[1])-t%2/2),e[2]===e[5]&&(e[2]=e[5]=Math.round(e[2])+t%2/2),e},path:function(e){var t={fill:"none"};return _(e)?t.d=e:h(e)&&i(t,e),this.createElement("path").attr(t)},circle:function(e,t,n){return e=h(e)?e:{x:e,y:t,r:n},t=this.createElement("circle"),t.xSetter=t.ySetter=function(e,t,n){n.setAttribute("c"+t,e)},t.attr(e)},arc:function(e,t,n,s,o,i){return h(e)?(s=e,t=s.y,n=s.r,e=s.x):s={innerR:s,start:o,end:i},e=this.symbol("arc",e,t,n,n,s),e.r=n,e},rect:function(e,t,n,s,i,a){i=h(e)?e.r:i;var r=this.createElement("rect");return e=h(e)?e:void 0===e?{}:{x:e,y:t,width:Math.max(n,0),height:Math.max(s,0)},void 0!==a&&(e.strokeWidth=a,e=r.crisp(e)),e.fill="none",i&&(e.r=i),r.rSetter=function(e,t,n){o(n,{rx:e,ry:e})},r.attr(e)},setSize:function(e,t,s){var o=this.alignedObjects,i=o.length;this.width=e,this.height=t;for(this.boxWrapper.animate({width:e,height:t},{step:function(){this.attr({viewBox:"0 0 "+this.attr("width")+" "+this.attr("height")})},duration:n(s,!0)?void 0:0});i--;)o[i].align()},g:function(e){var t=this.createElement("g");return e?t.attr({class:"highcharts-"+e}):t},image:function(e,t,n,s,o,a){var r,c={preserveAspectRatio:"none"},l=function(e,t){e.setAttributeNS?e.setAttributeNS("http://www.w3.org/1999/xlink","href",t):e.setAttribute("hc-svg-href",t)};return 1<arguments.length&&i(c,{x:t,y:n,width:s,height:o}),r=this.createElement("image").attr(c),a?(l(r.element,"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),c=new f.Image,p(c,"load",function(t){l(r.element,e),a.call(r,t)}),c.src=e):l(r.element,e),r},symbol:function(e,s,o,c,l,u){var h,f,b,p=this,j=/^url\((.*?)\)$/,y=j.test(e),g=!y&&(this.symbols[e]?e:"circle"),v=g&&this.symbols[g],_=t(s)&&v&&v.call(this.symbols,Math.round(s),Math.round(o),c,l,u);return v?(h=this.path(_),h.attr("fill","none"),i(h,{symbolName:g,x:s,y:o,width:c,height:l}),u&&i(h,u)):y&&(f=e.match(j)[1],h=this.image(f),h.imgwidth=n(m[f]&&m[f].width,u&&u.width),h.imgheight=n(m[f]&&m[f].height,u&&u.height),b=function(){h.attr({width:h.width,height:h.height})},r(["width","height"],function(e){h[e+"Setter"]=function(e,n){var o={},s=this["img"+n],i="width"===n?"translateX":"translateY";this[n]=e,t(s)&&(this.element&&this.element.setAttribute(n,s),this.alignByTranslate||(o[i]=((this[n]||0)-s)/2,this.attr(o)))}}),t(s)&&h.attr({x:s,y:o}),h.isImg=!0,t(h.imgwidth)&&t(h.imgheight)?b():(h.attr({width:0,height:0}),C("img",{onload:function(){var e=M[p.chartIndex];0===this.width&&(d(this,{position:"absolute",top:"-999em"}),a.body.appendChild(this)),m[f]={width:this.width,height:this.height},h.imgwidth=this.width,h.imgheight=this.height,h.element&&b(),this.parentNode&&this.parentNode.removeChild(this),p.imgCount--,!p.imgCount&&e&&e.onload&&e.onload()},src:f}),this.imgCount++)),h},symbols:{circle:function(e,t,n,s){return this.arc(e+n/2,t+s/2,n/2,s/2,{start:0,end:2*Math.PI,open:!1})},square:function(e,t,n,s){return["M",e,t,"L",e+n,t,e+n,t+s,e,t+s,"Z"]},triangle:function(e,t,n,s){return["M",e+n/2,t,"L",e+n,t+s,e,t+s,"Z"]},"triangle-down":function(e,t,n,s){return["M",e,t,"L",e+n,t,e+n/2,t+s,"Z"]},diamond:function(e,t,n,s){return["M",e+n/2,t,"L",e+n,t+s/2,e+n/2,t+s,e,t+s/2,"Z"]},arc:function(e,s,o,i,a){var l=a.start,r=a.r||o,d=a.r||i||o,c=a.end-.001;o=a.innerR,i=n(a.open,.001>Math.abs(a.end-a.start-2*Math.PI));var u=Math.cos(l),h=Math.sin(l),m=Math.cos(c),c=Math.sin(c);return a=.001>a.end-l-Math.PI?0:1,r=["M",e+r*u,s+d*h,"A",r,d,0,a,1,e+r*m,s+d*c],t(o)&&r.push(i?"M":"L",e+o*m,s+o*c,"A",o,o,0,a,0,e+o*u,s+o*h),r.push(i?"":"Z"),r},callout:function(e,t,n,s,o){var c,i=Math.min(o&&o.r||0,n,s),r=i+6,a=o&&o.anchorX;return o=o&&o.anchorY,c=["M",e+i,t,"L",e+n-i,t,"C",e+n,t,e+n,t,e+n,t+i,"L",e+n,t+s-i,"C",e+n,t+s,e+n,t+s,e+n-i,t+s,"L",e+i,t+s,"C",e,t+s,e,t+s,e,t+s-i,"L",e,t+i,"C",e,t,e,t,e+i,t],a&&a>n?o>t+r&&o<t+s-r?c.splice(13,3,"L",e+n,o-6,e+n+6,o,e+n,o+6,e+n,t+s-i):c.splice(13,3,"L",e+n,s/2,a,o,e+n,s/2,e+n,t+s-i):a&&0>a?o>t+r&&o<t+s-r?c.splice(33,3,"L",e,o+6,e-6,o,e,o-6,e,t+i):c.splice(33,3,"L",e,s/2,a,o,e,s/2,e,t+i):o&&o>s&&a>e+r&&a<e+n-r?c.splice(23,3,"L",a+6,t+s,a,t+s+6,a-6,t+s,e+i,t+s):o&&0>o&&a>e+r&&a<e+n-r&&c.splice(3,3,"L",a-6,t,a,t-6,a+6,t,n-i,t),c}},clipRect:function(t,n,s,o){var i=e.uniqueKey(),a=this.createElement("clipPath").attr({id:i}).add(this.defs);return t=this.rect(t,n,s,o,0).add(a),t.id=i,t.clipPath=a,t.count=0,t},text:function(e,t,n,s){var o={};return s&&(this.allowHTML||!this.forExport)?this.html(e,t,n):(o.x=Math.round(t||0),n&&(o.y=Math.round(n)),(e||0===e)&&(o.text=e),e=this.createElement("text").attr(o),s||(e.xSetter=function(e,t,n){var s,o,i=n.getElementsByTagName("tspan"),a=n.getAttribute(t);for(s=0;s<i.length;s++)o=i[s],o.getAttribute(t)===a&&o.setAttribute(t,e);n.setAttribute(t,e)}),e)},fontMetrics:function(e,t){return e=e||t&&t.style&&t.style.fontSize||this.style&&this.style.fontSize,e=/px/.test(e)?u(e):/em/.test(e)?parseFloat(e)*(t?this.fontMetrics(null,t.parentNode).f:16):12,t=24>e?e+3:Math.round(1.2*e),{h:t,b:Math.round(.8*t),f:e}},rotCorr:function(e,t,n){var s=e;return t&&n&&(s=Math.max(s*Math.cos(t*j),4)),{x:-e/3*Math.sin(t*j),y:s}},label:function(n,o,a,c,d,u,h,m,f){var v,b,_,w,O,C,E,k,F,z,N,L,R,P,y=this,p=y.g("button"!==f&&"label"),g=p.text=y.text("",0,0,h).attr({zIndex:1}),M=0,j=3,S=0,T={},D=/^url\((.*?)\)$/.test(c),A=D;return f&&p.addClass("highcharts-"+f),A=D,N=function(){return(R||0)%2/2},E=function(){var e=g.element.style,n={};b=(void 0===w||void 0===L||O)&&t(g.textStr)&&g.getBBox(),p.width=(w||b.width||0)+2*j+S,p.height=(L||b.height||0)+2*j,z=j+y.fontMetrics(e&&e.fontSize,g).b,A&&(v||(p.box=v=y.symbols[c]||D?y.symbol(c):y.rect(),v.addClass(("button"===f?"":"highcharts-label-box")+(f?" highcharts-"+f+"-box":"")),v.add(p),e=N(),n.x=e,n.y=(m?-z:0)+e),n.width=Math.round(p.width),n.height=Math.round(p.height),v.attr(i(n,T)),T={})},C=function(){var e=S+j,n=m?0:z;t(w)&&b&&("center"===O||"right"===O)&&(e+={center:.5,right:1}[O]*(w-b.width)),(e!==g.x||n!==g.y)&&(g.attr("x",e),void 0!==n&&g.attr("y",n)),g.x=e,g.y=n},_=function(e,t){v?v.attr(e,t):T[e]=t},p.onAdd=function(){g.add(p),p.attr({text:n||0===n?n:"",x:o,y:a}),v&&t(d)&&p.attr({anchorX:d,anchorY:u})},p.widthSetter=function(t){w=e.isNumber(t)?t:null},p.heightSetter=function(e){L=e},p["text-alignSetter"]=function(e){O=e},p.paddingSetter=function(e){t(e)&&e!==j&&(j=p.padding=e,C())},p.paddingLeftSetter=function(e){t(e)&&e!==S&&(S=e,C())},p.alignSetter=function(e){e={left:0,center:.5,right:1}[e],e!==M&&(M=e,b&&p.attr({x:k}))},p.textSetter=function(e){void 0!==e&&g.textSetter(e),E(),C()},p["stroke-widthSetter"]=function(e,t){e&&(A=!0),R=this["stroke-width"]=e,_(t,e)},p.strokeSetter=p.fillSetter=p.rSetter=function(e,t){"r"!==t&&("fill"===t&&e&&(A=!0),p[t]=e),_(t,e)},p.anchorXSetter=function(e,t){d=p.anchorX=e,_(t,Math.round(e)-N()-k)},p.anchorYSetter=function(e,t){u=p.anchorY=e,_(t,e-F)},p.xSetter=function(e){p.x=e,M&&(e-=M*((w||b.width)+2*j),p["forceAnimate:x"]=!0),k=Math.round(e),p.attr("translateX",k)},p.ySetter=function(e){F=p.y=Math.round(e),p.attr("translateY",F)},P=p.css,i(p,{css:function(e){if(e){var t={};e=l(e),r(p.textProps,function(n){void 0!==e[n]&&(t[n]=e[n],delete e[n])}),g.css(t),"width"in t&&E()}return P.call(p,e)},getBBox:function(){return{width:b.width+2*j,height:b.height+2*j,x:b.x-j,y:b.y-j}},shadow:function(e){return e&&(E(),v&&v.shadow(e)),p},destroy:function(){x(p.element,"mouseenter"),x(p.element,"mouseleave"),g&&(g=g.destroy()),v&&(v=v.destroy()),s.prototype.destroy.call(p),p=y=E=C=_=null}})}}),e.Renderer=b}(t),function(e){var c=e.attr,r=e.createElement,t=e.css,i=e.defined,n=e.each,s=e.extend,o=e.isFirefox,l=e.isMS,d=e.isWebKit,u=e.pick,h=e.pInt,m=e.SVGRenderer,a=e.win,f=e.wrap;s(e.SVGElement.prototype,{htmlCss:function(e){var n=this.element;return(n=e&&"SPAN"===n.tagName&&e.width)&&(delete e.width,this.textWidth=n,this.htmlUpdateTransform()),e&&"ellipsis"===e.textOverflow&&(e.whiteSpace="nowrap",e.overflow="hidden"),this.styles=s(this.styles,e),t(this.element,e),this},htmlGetBBox:function(){var e=this.element;return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}},htmlUpdateTransform:function(){if(this.added){{var l=this.renderer,e=this.element,f=this.translateX||0,u=this.translateY||0,g=this.x||0,p=this.y||0,c=this.textAlign||"left",d={left:0,center:.5,right:1}[c],s=this.styles,r=s&&s.whiteSpace;if(t(e,{marginLeft:f,marginTop:u}),this.shadows&&n(this.shadows,function(e){t(e,{marginLeft:f+1,marginTop:u+1})}),this.inverted&&n(e.childNodes,function(t){l.invertChild(t,e)}),"SPAN"===e.tagName){var o,s=this.rotation,a=this.textWidth&&h(this.textWidth),m=[s,c,e.innerHTML,this.textWidth,this.textAlign].join();(o=a!==this.oldTextWidth)&&!(o=a>this.oldTextWidth)&&((o=this.textPxLength)||(t(e,{width:"",whiteSpace:r||"nowrap"}),o=e.offsetWidth),o=o>a),o&&/[ -]/.test(e.textContent||e.innerText)&&(t(e,{width:a+"px",display:"block",whiteSpace:r||"normal"}),this.oldTextWidth=a),m!==this.cTT&&(r=l.fontMetrics(e.style.fontSize).b,i(s)&&s!==(this.oldRotation||0)&&this.setSpanRotation(s,d,r),this.getSpanCorrection(!i(s)&&this.textPxLength||e.offsetWidth,r,d,s,c)),t(e,{left:g+(this.xCorr||0)+"px",top:p+(this.yCorr||0)+"px"}),this.cTT=m,this.oldRotation=s}}}else this.alignOnAdd=!0},setSpanRotation:function(e,n,s){var i={},a=this.renderer.getTransformKey();i[a]=i.transform="rotate("+e+"deg)",i[a+(o?"Origin":"-origin")]=i.transformOrigin=100*n+"% "+s+"px",t(this.element,i)},getSpanCorrection:function(e,t,n){this.xCorr=-e*n,this.yCorr=-t}}),s(m.prototype,{getTransformKey:function(){return l&&!/Edge/.test(a.navigator.userAgent)?"-ms-transform":d?"-webkit-transform":o?"MozTransform":a.opera?"-o-transform":""},html:function(e,t,o){var i=this.createElement("span"),a=i.element,l=i.renderer,d=l.isSVG,h=function(e,t){n(["opacity","visibility"],function(n){f(e,n+"Setter",function(e,n,s,o){e.call(this,n,s,o),t[s]=n})}),e.addedSetters=!0};return i.textSetter=function(e){e!==a.innerHTML&&delete this.bBox,this.textStr=e,a.innerHTML=u(e,""),i.doTransform=!0},d&&h(i,i.element.style),i.xSetter=i.ySetter=i.alignSetter=i.rotationSetter=function(e,t){"align"===t&&(t="textAlign"),i[t]=e,i.doTransform=!0},i.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},i.attr({text:e,x:Math.round(t),y:Math.round(o)}).css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize,position:"absolute"}),a.style.whiteSpace="nowrap",i.css=i.htmlCss,d&&(i.add=function(e){var t,d=l.box.parentNode,o=[];if(this.parentGroup=e){if(t=e.div,!t){for(;e;)o.push(e),e=e.parentGroup;n(o.reverse(),function(e){function l(t,s){e[s]=t,"translateX"===s?n.left=t+"px":n.top=t+"px",e.doTransform=!0}var n,a=c(e.element,"class");a&&(a={className:a}),t=e.div=e.div||r("div",a,{position:"absolute",left:(e.translateX||0)+"px",top:(e.translateY||0)+"px",display:e.display,opacity:e.opacity,pointerEvents:e.styles&&e.styles.pointerEvents},t||d),n=t.style,s(e,{classSetter:function(e){return function(t){this.element.setAttribute("class",t),e.className=t}}(t),on:function(){return o[0].div&&i.on.apply({element:o[0].div},arguments),e},translateXSetter:l,translateYSetter:l}),e.addedSetters||h(e,n)})}}else t=d;return t.appendChild(a),i.added=!0,i.alignOnAdd&&i.htmlUpdateTransform(),i}),i}})}(t),function(e){var o=e.defined,i=e.each,a=e.extend,r=e.merge,n=e.pick,t=e.timeUnits,s=e.win;e.Time=function(e){this.update(e,!1)},e.Time.prototype={defaultOptions:{},update:function(t){var o=n(t&&t.useUTC,!0),i=this;this.options=t=r(!0,this.options||{},t),this.Date=t.Date||s.Date,this.timezoneOffset=(this.useUTC=o)&&t.timezoneOffset,this.getTimezoneOffset=this.timezoneOffsetFunction(),(this.variableTimezone=!(o&&!t.getTimezoneOffset&&!t.timezone))||this.timezoneOffset?(this.get=function(e,t){var n=t.getTime(),s=n-i.getTimezoneOffset(t);return t.setTime(s),e=t["getUTC"+e](),t.setTime(n),e},this.set=function(t,n,s){var o;-1!==e.inArray(t,["Milliseconds","Seconds","Minutes"])?n["set"+t](s):(o=i.getTimezoneOffset(n),o=n.getTime()-o,n.setTime(o),n["setUTC"+t](s),t=i.getTimezoneOffset(n),o=n.getTime()+t,n.setTime(o))}):o?(this.get=function(e,t){return t["getUTC"+e]()},this.set=function(e,t,n){return t["setUTC"+e](n)}):(this.get=function(e,t){return t["get"+e]()},this.set=function(e,t,n){return t["set"+e](n)})},makeTime:function(t,s,o,i,a,r){var c,l,d;return this.useUTC?(c=this.Date.UTC.apply(0,arguments),l=this.getTimezoneOffset(c),c+=l,d=this.getTimezoneOffset(c),l!==d?c+=d-l:l-36e5!==this.getTimezoneOffset(c-36e5)||e.isSafari||(c-=36e5)):c=new this.Date(t,s,n(o,1),n(i,0),n(a,0),n(r,0)).getTime(),c},timezoneOffsetFunction:function(){var o=this,t=this.options,n=s.moment;if(!this.useUTC)return function(e){return 6e4*new Date(e).getTimezoneOffset()};if(t.timezone){if(n)return function(e){return 6e4*-n.tz(e,t.timezone).utcOffset()};e.error(25)}return this.useUTC&&t.getTimezoneOffset?function(e){return 6e4*t.getTimezoneOffset(e)}:function(){return 6e4*(o.timezoneOffset||0)}},dateFormat:function(t,n,s){if(!e.defined(n)||isNaN(n))return e.defaultOptions.lang.invalidDate||"";t=e.pick(t,"%Y-%m-%d %H:%M:%S");var d=this,o=new this.Date(n),a=this.get("Hours",o),r=this.get("Day",o),u=this.get("Date",o),l=this.get("Month",o),h=this.get("FullYear",o),c=e.defaultOptions.lang,m=c.weekdays,f=c.shortWeekdays,i=e.pad,o=e.extend({a:f?f[r]:m[r].substr(0,3),A:m[r],d:i(u),e:i(u,2," "),w:r,b:c.shortMonths[l],B:c.months[l],m:i(l+1),y:h.toString().substr(2,2),Y:h,H:i(a),k:a,I:i(a%12||12),l:a%12||12,M:i(d.get("Minutes",o)),p:12>a?"AM":"PM",P:12>a?"am":"pm",S:i(o.getSeconds()),L:i(Math.round(n%1e3),3)},e.dateFormats);return e.objectEach(o,function(e,s){for(;-1!==t.indexOf("%"+s);)t=t.replace("%"+s,"function"==typeof e?e.call(d,n):e)}),s?t.substr(0,1).toUpperCase()+t.substr(1):t},getTimeTicks:function(e,s,r,c){var m,p,g,b,l=this,f=[],v={},d=new l.Date(s),u=e.unitRange,h=e.count||1;if(o(s)){l.set("Milliseconds",d,u>=t.second?0:h*Math.floor(l.get("Milliseconds",d)/h)),u>=t.second&&l.set("Seconds",d,u>=t.minute?0:h*Math.floor(l.get("Seconds",d)/h)),u>=t.minute&&l.set("Minutes",d,u>=t.hour?0:h*Math.floor(l.get("Minutes",d)/h)),u>=t.hour&&l.set("Hours",d,u>=t.day?0:h*Math.floor(l.get("Hours",d)/h)),u>=t.day&&l.set("Date",d,u>=t.month?1:h*Math.floor(l.get("Date",d)/h)),u>=t.month&&(l.set("Month",d,u>=t.year?0:h*Math.floor(l.get("Month",d)/h)),m=l.get("FullYear",d)),u>=t.year&&l.set("FullYear",d,m-m%h),u===t.week&&l.set("Date",d,l.get("Date",d)-l.get("Day",d)+n(c,1)),m=l.get("FullYear",d),c=l.get("Month",d),g=l.get("Date",d),b=l.get("Hours",d),s=d.getTime(),l.variableTimezone&&(p=r-s>4*t.month||l.getTimezoneOffset(s)!==l.getTimezoneOffset(r)),d=d.getTime();for(s=1;d<r;)f.push(d),d=u===t.year?l.makeTime(m+s*h,0):u===t.month?l.makeTime(m,c+s*h):!p||u!==t.day&&u!==t.week?p&&u===t.hour&&1<h?l.makeTime(m,c,g,b+s*h):d+u*h:l.makeTime(m,c,g+s*h*(u===t.day?1:7)),s++;f.push(d),u<=t.hour&&1e4>f.length&&i(f,function(e){0===e%18e5&&"000000000"===l.dateFormat("%H%M%S%L",e)&&(v[e]="day")})}return f.info=a(e,{higherRanks:v,totalRange:u*h}),f}}}(t),function(e){var n=e.color,t=e.merge;e.defaultOptions={colors:"#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" "),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:e.Time.prototype.defaultOptions,chart:{borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15,10],resetZoomButton:{theme:{zIndex:6},position:{align:"right",x:-10,y:10}},width:null,height:null,borderColor:"#335cad",backgroundColor:"#ffffff",plotBorderColor:"#cccccc"},title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:e.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",padding:8,snap:e.isTouchDevice?25:10,backgroundColor:n("#f7f7f7").setOpacity(.85).get(),borderWidth:1,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.y}</b><br/>',shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",pointerEvents:"none",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}},e.setOptions=function(n){return e.defaultOptions=t(!0,e.defaultOptions,n),e.time.update(t(e.defaultOptions.global,e.defaultOptions.time),!1),e.defaultOptions},e.getOptions=function(){return e.defaultOptions},e.defaultPlotOptions=e.defaultOptions.plotOptions,e.time=new e.Time(t(e.defaultOptions.global,e.defaultOptions.time)),e.dateFormat=function(t,n,s){return e.time.dateFormat(t,n,s)}}(t),function(e){var a=e.correctFloat,n=e.defined,r=e.destroyObjectProperties,o=e.fireEvent,i=e.isNumber,c=e.merge,t=e.pick,s=e.deg2rad;e.Tick=function(e,t,n,s){this.axis=e,this.pos=t,this.type=n||"",this.isNewLabel=this.isNew=!0,n||s||this.addLabel()},e.Tick.prototype={addLabel:function(){var f,e=this.axis,r=e.options,u=e.chart,s=e.categories,l=e.names,o=this.pos,d=r.labels,i=e.tickPositions,h=o===i[0],m=o===i[i.length-1],l=s?t(s[o],l[o],o):o,s=this.label,i=i.info;e.isDatetimeAxis&&i&&(f=r.dateTimeLabelFormats[i.higherRanks[o]||i.unitName]),this.isFirst=h,this.isLast=m,r=e.labelFormatter.call({axis:e,chart:u,isFirst:h,isLast:m,dateTimeLabelFormat:f,value:e.isLog?a(e.lin2log(l)):l,pos:o}),n(s)?s&&s.attr({text:r}):((this.label=s=n(r)&&d.enabled?u.renderer.text(r,0,0,d.useHTML).css(c(d.style)).add(e.labelGroup):null)&&(s.textPxLength=s.getBBox().width),this.rotation=0)},getLabelSize:function(){return this.label?this.label.getBBox()[this.axis.horiz?"height":"width"]:0},handleOverflow:function(e){var l,n=this.axis,v=n.options.labels,r=e.x,h=n.chart.chartWidth,c=n.chart.spacing,f=t(n.labelLeft,Math.min(n.pos,c[3])),c=t(n.labelRight,Math.max(n.isRadial?0:n.pos+n.len,h-c[1])),m=this.label,u=this.rotation,i={left:0,center:.5,right:1}[n.labelAlign||m.attr("align")],a=m.getBBox().width,d=n.getSlotWidth(),o=d,g=1,p={};u||!1===v.overflow?0>u&&r-i*a<f?l=Math.round(r/Math.cos(u*s)-f):0<u&&r+i*a>c&&(l=Math.round((h-r)/Math.cos(u*s))):(h=r+(1-i)*a,r-i*a<f?o=e.x+o*(1-i)-f:h>c&&(o=c-e.x+o*i,g=-1),o=Math.min(d,o),o<d&&"center"===n.labelAlign&&(e.x+=g*(d-o-i*(d-Math.min(a,o)))),a>o||n.autoRotation&&(m.styles||{}).width)&&(l=o),l&&(p.width=l,(v.style||{}).textOverflow||(p.textOverflow="ellipsis"),m.css(p))},getPosition:function(t,n,s,i){var a=this.axis,r=a.chart,c=i&&r.oldChartHeight||r.chartHeight;return t={x:t?e.correctFloat(a.translate(n+s,null,null,i)+a.transB):a.left+a.offset+(a.opposite?(i&&r.oldChartWidth||r.chartWidth)-a.right-a.left:0),y:t?c-a.bottom+a.offset-(a.opposite?a.height:0):e.correctFloat(c-a.translate(n+s,null,null,i)-a.transB)},o(this,"afterGetPosition",{pos:t}),t},getLabelPosition:function(e,t,i,a,r,c,l,d){var u=this.axis,g=u.transA,v=u.reversed,h=u.staggerLines,f=u.tickRotCorr||{x:0,y:0},p=r.y,b=a||u.reserveSpaceDefault?0:-u.labelOffset*("center"===u.labelAlign?.5:1),m={};return n(p)||(p=0===u.side?i.rotation?-8:-i.getBBox().height:2===u.side?f.y+8:Math.cos(i.rotation*s)*(f.y-i.getBBox(!1,0).height/2)),e=e+r.x+b+f.x-(c&&a?c*g*(v?-1:1):0),t=t+p-(c&&!a?c*g*(v?1:-1):0),h&&(i=l/(d||1)%h,u.opposite&&(i=h-i-1),t+=u.labelOffset/h*i),m.x=e,m.y=Math.round(t),o(this,"afterGetLabelPosition",{pos:m}),m},getMarkPath:function(e,t,n,s,o,i){return i.crispLine(["M",e,t,"L",e+(o?0:-n),t+(o?n:0)],s)},renderGridLine:function(e,t,n){var i=this.axis,s=i.options,a=this.gridLine,o={},l=this.pos,r=this.type,d=i.tickmarkOffset,u=i.chart.renderer,c=r?r+"Grid":"grid",h=s[c+"LineWidth"],m=s[c+"LineColor"],s=s[c+"LineDashStyle"];a||(o.stroke=m,o["stroke-width"]=h,s&&(o.dashstyle=s),r||(o.zIndex=1),e&&(o.opacity=0),this.gridLine=a=u.path().attr(o).addClass("highcharts-"+(r?r+"-":"")+"grid-line").add(i.gridGroup)),!e&&a&&(e=i.getPlotLinePath(l+d,a.strokeWidth()*n,e,!0))&&a[this.isNew?"attr":"animate"]({d:e,opacity:t})},renderMark:function(e,n,s){var h,o=this.axis,r=o.options,d=o.chart.renderer,i=this.type,l=i?i+"Tick":"tick",c=o.tickSize(l),a=this.mark,u=!a,m=e.x;e=e.y,h=t(r[l+"Width"],!i&&o.isXAxis?1:0),r=r[l+"Color"],c&&(o.opposite&&(c[0]=-c[0]),u&&(this.mark=a=d.path().addClass("highcharts-"+(i?i+"-":"")+"tick").add(o.axisGroup),a.attr({stroke:r,"stroke-width":h})),a[u?"attr":"animate"]({d:this.getMarkPath(m,e,c[0],a.strokeWidth()*s,o.horiz,d),opacity:n}))},renderLabel:function(e,n,s,o){var a=this.axis,h=a.horiz,l=a.options,r=this.label,c=l.labels,d=c.step,a=a.tickmarkOffset,u=!0,m=e.x;e=e.y,r&&i(m)&&(r.xy=e=this.getLabelPosition(m,e,r,h,c,a,o,d),this.isFirst&&!this.isLast&&!t(l.showFirstLabel,1)||this.isLast&&!this.isFirst&&!t(l.showLastLabel,1)?u=!1:!h||c.step||c.rotation||n||0===s||this.handleOverflow(e),d&&o%d&&(u=!1),u&&i(e.y)?(e.opacity=s,r[this.isNewLabel?"attr":"animate"](e),this.isNewLabel=!1):(r.attr("y",-9999),this.isNewLabel=!0))},render:function(n,s,o){var i=this.axis,r=i.horiz,a=this.getPosition(r,this.pos,i.tickmarkOffset,s),c=a.x,l=a.y,i=r&&c===i.pos+i.len||!r&&l===i.pos?-1:1;o=t(o,1),this.isActive=!0,this.renderGridLine(s,o,i),this.renderMark(a,o,i),this.renderLabel(a,s,o,n),this.isNew=!1,e.fireEvent(this,"afterRender")},destroy:function(){r(this,this.axis)}}}(t),n=function(e){var y=e.addEvent,S=e.animObject,l=e.arrayMax,d=e.arrayMin,A=e.color,a=e.correctFloat,m=e.defaultOptions,n=e.defined,x=e.deg2rad,f=e.destroyObjectProperties,s=e.each,O=e.extend,i=e.fireEvent,_=e.format,v=e.getMagnitude,j=e.grep,u=e.inArray,b=e.isArray,o=e.isNumber,p=e.isString,h=e.merge,w=e.normalizeTickInterval,r=e.objectEach,t=e.pick,C=e.removeEvent,E=e.splat,k=e.syncTimeout,c=e.Tick,g=function(){this.init.apply(this,arguments)};return e.extend(g.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,labels:{enabled:!0,style:{color:"#666666",cursor:"default",fontSize:"11px"},x:0},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,startOfWeek:1,startOnTick:!1,tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",title:{align:"middle",style:{color:"#666666"}},type:"linear",minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",tickColor:"#ccd6eb"},defaultYAxisOptions:{endOnTick:!0,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},maxPadding:.05,minPadding:.05,startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,formatter:function(){return e.numberFormat(this.total,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"#000000",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},defaultLeftAxisOptions:{labels:{x:-15},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15},title:{rotation:90}},defaultBottomAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},title:{rotation:0}},init:function(e,s){var a,l,c=s.isX,o=this;o.chart=e,o.horiz=e.inverted&&!o.isZAxis?!c:c,o.isXAxis=c,o.coll=o.coll||(c?"xAxis":"yAxis"),i(this,"init",{userOptions:s}),o.opposite=s.opposite,o.side=s.side||(o.horiz?o.opposite?0:2:o.opposite?1:3),o.setOptions(s),a=this.options,l=a.type,o.labelFormatter=a.labels.formatter||o.defaultLabelFormatter,o.userOptions=s,o.minPixelPadding=0,o.reversed=a.reversed,o.visible=!1!==a.visible,o.zoomEnabled=!1!==a.zoomEnabled,o.hasNames="category"===l||!0===a.categories,o.categories=a.categories||o.hasNames,o.names||(o.names=[],o.names.keys={}),o.plotLinesAndBandsGroups={},o.isLog="logarithmic"===l,o.isDatetimeAxis="datetime"===l,o.positiveValuesOnly=o.isLog&&!o.allowNegativeLog,o.isLinked=n(a.linkedTo),o.ticks={},o.labelEdge=[],o.minorTicks={},o.plotLinesAndBands=[],o.alternateBands={},o.len=0,o.minRange=o.userMinRange=a.minRange||a.maxZoom,o.range=a.range,o.offset=a.offset||0,o.stacks={},o.oldStacks={},o.stacksTouched=0,o.max=null,o.min=null,o.crosshair=t(a.crosshair,E(e.options.tooltip.crosshairs)[c?0:1],!1),s=o.options.events,-1===u(o,e.axes)&&(c?e.axes.splice(e.xAxis.length,0,o):e.axes.push(o),e[o.coll].push(o)),o.series=o.series||[],e.inverted&&!o.isZAxis&&c&&void 0===o.reversed&&(o.reversed=!0),r(s,function(e,t){y(o,t,e)}),o.lin2log=a.linearToLogConverter||o.lin2log,o.isLog&&(o.val2lin=o.log2lin,o.lin2val=o.lin2log),i(this,"afterInit")},setOptions:function(e){this.options=h(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],h(m[this.coll],e)),i(this,"afterSetOptions",{userOptions:e})},defaultLabelFormatter:function(){var s,n=this.axis,t=this.value,o=n.chart.time,d=n.categories,c=this.dateTimeLabelFormat,a=m.lang,r=a.numericSymbols,a=a.numericSymbolMagnitude||1e3,i=r&&r.length,l=n.options.labels.format,n=n.isLog?Math.abs(t):n.tickInterval;if(l)s=_(l,this,o);else if(d)s=t;else if(c)s=o.dateFormat(c,t);else if(i&&1e3<=n)for(;i--&&void 0===s;)o=Math.pow(a,i+1),n>=o&&0===10*t%o&&null!==r[i]&&0!==t&&(s=e.numberFormat(t/o,-1)+r[i]);return void 0===s&&(s=1e4<=Math.abs(t)?e.numberFormat(t,-1):e.numberFormat(t,-1,void 0,"")),s},getSeriesExtremes:function(){var e=this,a=e.chart;i(this,"getSeriesExtremes",null,function(){e.hasVisibleSeries=!1,e.dataMin=e.dataMax=e.threshold=null,e.softThreshold=!e.isXAxis,e.buildStacks&&e.buildStacks(),s(e.series,function(s){if(s.visible||!a.options.chart.ignoreHiddenSeries){var r,i=s.options,c=i.threshold;e.hasVisibleSeries=!0,e.positiveValuesOnly&&0>=c&&(c=null),e.isXAxis?(i=s.xData,i.length&&(s=d(i),r=l(i),o(s)||s instanceof Date||(i=j(i,o),s=d(i),r=l(i)),i.length&&(e.dataMin=Math.min(t(e.dataMin,i[0],s),s),e.dataMax=Math.max(t(e.dataMax,i[0],r),r)))):(s.getExtremes(),r=s.dataMax,s=s.dataMin,n(s)&&n(r)&&(e.dataMin=Math.min(t(e.dataMin,s),s),e.dataMax=Math.max(t(e.dataMax,r),r)),n(c)&&(e.threshold=c),!i.softThreshold||e.positiveValuesOnly)&&(e.softThreshold=!1)}})}),i(this,"afterGetSeriesExtremes")},translate:function(e,t,n,s,i,a){var u,r=this.linkedParent||this,c=1,d=0,l=s?r.oldTransA:r.transA;return s=s?r.oldMin:r.min,u=r.minPixelPadding,i=(r.isOrdinal||r.isBroken||r.isLog&&i)&&r.lin2val,l||(l=r.transA),n&&(c*=-1,d=r.len),r.reversed&&(c*=-1,d-=c*(r.sector||r.len)),t?(e=(e*c+d-u)/l+s,i&&(e=r.lin2val(e))):(i&&(e=r.val2lin(e)),e=o(s)?c*(e-s)*l+d+c*u+(o(a)?l*a:0):void 0),e},toPixels:function(e,t){return this.translate(e,!1,!this.horiz,null,!0)+(t?0:this.pos)},toValue:function(e,t){return this.translate(e-(t?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(e,n,s,i,a){var l,h,c=this.chart,d=this.left,u=this.top,m=s&&c.oldChartHeight||c.chartHeight,p=s&&c.oldChartWidth||c.chartWidth,r=this.transB,f=function(e,t,n){return(e<t||e>n)&&(i?e=Math.min(Math.max(t,e),n):h=!0),e};return a=t(a,this.translate(e,null,null,s)),a=Math.min(Math.max(-1e5,a),1e5),e=s=Math.round(a+r),r=l=Math.round(m-a-r),o(a)?this.horiz?(r=u,l=m-this.bottom,e=s=f(e,d,d+this.width)):(e=d,s=p-this.right,r=l=f(r,u,u+this.height)):(h=!0,i=!1),h&&!i?null:c.renderer.crispLine(["M",e,r,"L",s,l],n||1)},getLinearTickPositions:function(e,t,n){var o,i,r,s=a(Math.floor(t/e)*e);if(n=a(Math.ceil(n/e)*e),o=[],a(s+e)===s&&(r=20),this.single)return[t];for(t=s;t<=n;){if(o.push(t),t=a(t+e,r),t===i)break;i=t}return o},getMinorTickInterval:function(){var e=this.options;return!0===e.minorTicks?t(e.minorTickInterval,"auto"):!1===e.minorTicks?null:e.minorTickInterval},getMinorTickPositions:function(){var e=this,n=e.options,c=e.tickPositions,i=e.minorTickInterval,t=[],o=e.pointRangePadding||0,a=e.min-o,o=e.max+o,r=o-a;if(r&&r/i<e.len/3)if(e.isLog)s(this.paddedTicks,function(n,s,o){s&&t.push.apply(t,e.getLogTickPositions(i,o[s-1],o[s],!0))});else if(e.isDatetimeAxis&&"auto"===this.getMinorTickInterval())t=t.concat(e.getTimeTicks(e.normalizeTimeTickInterval(i),a,o,n.startOfWeek));else for(n=a+(c[0]-a)%i;n<=o&&n!==t[0];n+=i)t.push(n);return 0!==t.length&&e.trimTicks(t),t},adjustForMinRange:function(){var i,a,c,u,h,m,f,p,r=this.options,e=this.min,o=this.max;this.isXAxis&&void 0===this.minRange&&!this.isLog&&(n(r.min)||n(r.max)?this.minRange=null:(s(this.series,function(e){h=e.xData;for(c=p=e.xIncrement?1:h.length-1;0<c;c--)(f=h[c]-h[c-1],void 0===u||f<u)&&(u=f)}),this.minRange=Math.min(5*u,this.dataMax-this.dataMin))),o-e<this.minRange&&(m=this.dataMax-this.dataMin>=this.minRange,a=this.minRange,i=(a-o+e)/2,i=[e-i,t(r.min,e-i)],m&&(i[2]=this.isLog?this.log2lin(this.dataMin):this.dataMin),e=l(i),o=[e+a,t(r.max,e+a)],m&&(o[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax),o=d(o),o-e<a&&(i[0]=o-a,i[1]=t(r.min,o-a),e=l(i))),this.min=e,this.max=o},getClosest:function(){var e;return this.categories?e=1:s(this.series,function(t){var s=t.closestPointRange,o=t.visible||!t.chart.options.chart.ignoreHiddenSeries;!t.noSharedTooltip&&n(s)&&o&&(e=n(e)?Math.min(e,s):s)}),e},nameToX:function(e){var s,i=b(this.categories),a=i?this.categories:this.names,o=e.options.x;return e.series.requireSorting=!1,n(o)||(o=!1===this.options.uniqueNames?e.series.autoIncrement():i?u(e.name,a):t(a.keys[e.name],-1)),-1===o?i||(s=a.length):s=o,void 0!==s&&(this.names[s]=e.name,this.names.keys[e.name]=s),s},updateNames:function(){var n=this,t=this.names;0<t.length&&(s(e.keys(t.keys),function(e){delete t.keys[e]}),t.length=0,this.minRange=this.userMinRange,s(this.series||[],function(e){e.xIncrement=null,(!e.points||e.isDirtyData)&&(e.processData(),e.generatePoints()),s(e.points,function(t,s){var o;t.options&&(o=n.nameToX(t),void 0!==o&&o!==t.x&&(t.x=o,e.xData[s]=o))})}))},setAxisTranslation:function(e){var a,n=this,h=n.max-n.min,l=n.axisPointRange||0,r=0,c=0,o=n.linkedParent,m=!!n.categories,d=n.transA,u=n.isXAxis;(u||m||l)&&(a=n.getClosest(),o?(r=o.minPointOffset,c=o.pointRangePadding):s(n.series,function(e){var s=m?1:u?t(e.options.pointRange,a,0):n.axisPointRange||0;e=e.options.pointPlacement,l=Math.max(l,s),n.single||(r=Math.max(r,p(e)?0:s/2),c=Math.max(c,"on"===e?0:s))}),o=n.ordinalSlope&&a?n.ordinalSlope/a:1,n.minPointOffset=r*=o,n.pointRangePadding=c*=o,n.pointRange=Math.min(l,h),u&&(n.closestPointRange=a)),e&&(n.oldTransA=d),n.translationSlope=n.transA=d=n.options.staticScale||n.len/(h+c||1),n.transB=n.horiz?n.left:n.bottom,n.minPixelPadding=d*r,i(this,"afterSetAxisTranslation")},minFromRange:function(){return this.max-this.range},setTickInterval:function(r){var m,f,O,x,c=this,u=c.chart,l=c.options,E=c.isLog,C=c.isDatetimeAxis,k=c.isXAxis,p=c.isLinked,b=l.maxPadding,g=l.minPadding,h=l.tickInterval,j=l.tickPixelInterval,y=c.categories,d=o(c.threshold)?c.threshold:null,_=c.softThreshold;C||y||p||this.getTickAmount(),f=t(c.userMin,l.min),m=t(c.userMax,l.max),p?(c.linkedParent=u[c.coll][l.linkedTo],u=c.linkedParent.getExtremes(),c.min=t(u.min,u.dataMin),c.max=t(u.max,u.dataMax),l.type!==c.linkedParent.options.type&&e.error(11,1)):(!_&&n(d)&&(c.dataMin>=d?(O=d,g=0):c.dataMax<=d&&(x=d,b=0)),c.min=t(f,O,c.dataMin),c.max=t(m,x,c.dataMax)),E&&(c.positiveValuesOnly&&!r&&0>=Math.min(c.min,t(c.dataMin,c.min))&&e.error(10,1),c.min=a(c.log2lin(c.min),15),c.max=a(c.log2lin(c.max),15)),c.range&&n(c.max)&&(c.userMin=c.min=f=Math.max(c.dataMin,c.minFromRange()),c.userMax=m=c.max,c.range=null),i(c,"foundExtremes"),c.beforePadding&&c.beforePadding(),c.adjustForMinRange(),!(y||c.axisPointRange||c.usePercentage||p)&&n(c.min)&&n(c.max)&&(u=c.max-c.min)&&(!n(f)&&g&&(c.min-=u*g),!n(m)&&b&&(c.max+=u*b)),o(l.softMin)&&!o(c.userMin)&&(c.min=Math.min(c.min,l.softMin)),o(l.softMax)&&!o(c.userMax)&&(c.max=Math.max(c.max,l.softMax)),o(l.floor)&&(c.min=Math.max(c.min,l.floor)),o(l.ceiling)&&(c.max=Math.min(c.max,l.ceiling)),_&&n(c.dataMin)&&(d=d||0,!n(f)&&c.min<d&&c.dataMin>=d?c.min=d:!n(m)&&c.max>d&&c.dataMax<=d&&(c.max=d)),c.tickInterval=c.min===c.max||void 0===c.min||void 0===c.max?1:p&&!h&&j===c.linkedParent.options.tickPixelInterval?h=c.linkedParent.tickInterval:t(h,this.tickAmount?(c.max-c.min)/Math.max(this.tickAmount-1,1):void 0,y?1:(c.max-c.min)*j/Math.max(c.len,j)),k&&!r&&s(c.series,function(e){e.processData(c.min!==c.oldMin||c.max!==c.oldMax)}),c.setAxisTranslation(!0),c.beforeSetTickPositions&&c.beforeSetTickPositions(),c.postProcessTickInterval&&(c.tickInterval=c.postProcessTickInterval(c.tickInterval)),c.pointRange&&!h&&(c.tickInterval=Math.max(c.pointRange,c.tickInterval)),r=t(l.minTickInterval,c.isDatetimeAxis&&c.closestPointRange),!h&&c.tickInterval<r&&(c.tickInterval=r),C||E||h||(c.tickInterval=w(c.tickInterval,null,v(c.tickInterval),t(l.allowDecimals,!(.5<c.tickInterval&&5>c.tickInterval&&1e3<c.max&&9999>c.max)),!!this.tickAmount)),this.tickAmount||(c.tickInterval=c.unsquish()),this.setTickPositions()},setTickPositions:function(){var e,t=this.options,o=t.tickPositions,e=this.getMinorTickInterval(),s=t.tickPositioner,a=t.startOnTick,r=t.endOnTick;this.tickmarkOffset=this.categories&&"between"===t.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===e&&this.tickInterval?this.tickInterval/5:e,this.single=this.min===this.max&&n(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==t.allowDecimals),this.tickPositions=e=o&&o.slice(),!e&&(e=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,t.units),this.min,this.max,t.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),e.length>this.len&&(e=[e[0],e.pop()],e[0]===e[1]&&(e.length=1)),this.tickPositions=e,s&&(s=s.apply(this,[this.min,this.max])))&&(this.tickPositions=e=s),this.paddedTicks=e.slice(0),this.trimTicks(e,a,r),this.isLinked||(this.single&&2>e.length&&(this.min-=.5,this.max+=.5),o||s||this.adjustTickAmount()),i(this,"afterSetTickPositions")},trimTicks:function(e,t,s){var o=e[0],i=e[e.length-1],a=this.minPointOffset||0;if(!this.isLinked){if(t&&-(1/0)!==o)this.min=o;else for(;this.min-a>e[0];)e.shift();if(s)this.max=i;else for(;this.max+a<e[e.length-1];)e.pop();0===e.length&&n(o)&&!this.options.tickPositions&&e.push((i+o)/2)}},alignToOthers:function(){var n,t={},e=this.options;return!1===this.chart.options.chart.alignTicks||!1===e.alignTicks||!1===e.startOnTick||!1===e.endOnTick||this.isLog||s(this.chart[this.coll],function(e){var s=e.options,s=[e.horiz?s.left:s.top,s.width,s.height,s.pane].join();e.series.length&&(t[s]?n=!0:t[s]=1)}),n},getTickAmount:function(){var t=this.options,e=t.tickAmount,s=t.tickPixelInterval;!n(t.tickInterval)&&this.len<s&&!this.isRadial&&!this.isLog&&t.startOnTick&&t.endOnTick&&(e=2),!e&&this.alignToOthers()&&(e=Math.ceil(this.len/s)+1),4>e&&(this.finalTickAmt=e,e=5),this.tickAmount=e},adjustTickAmount:function(){var s=this.tickInterval,e=this.tickPositions,o=this.tickAmount,i=this.finalTickAmt,r=e&&e.length,c=t(this.threshold,this.softThreshold?0:null);if(this.hasData()){if(r<o){for(;e.length<o;)e.length%2||this.min===c?e.push(a(e[e.length-1]+s)):e.unshift(a(e[0]-s));this.transA*=(r-1)/(o-1),this.min=e[0],this.max=e[e.length-1]}else r>o&&(this.tickInterval*=2,this.setTickPositions());if(n(i)){for(s=o=e.length;s--;)(3===i&&1===s%2||2>=i&&0<s&&s<o-1)&&e.splice(s,1);this.finalTickAmt=void 0}}},setScale:function(){var e,t;this.oldMin=this.min,this.oldMax=this.max,this.oldAxisLength=this.len,this.setAxisSize(),e=this.len!==this.oldAxisLength,s(this.series,function(e){(e.isDirtyData||e.isDirty||e.xAxis.isDirty)&&(t=!0)}),e||t||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax||this.alignToOthers()?(this.resetStacks&&this.resetStacks(),this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickInterval(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=e||this.min!==this.oldMin||this.max!==this.oldMax)):this.cleanStacks&&this.cleanStacks(),i(this,"afterSetScale")},setExtremes:function(e,n,o,a,r){var c=this,l=c.chart;o=t(o,!0),s(c.series,function(e){delete e.kdTree}),r=O(r,{min:e,max:n}),i(c,"setExtremes",r,function(){c.userMin=e,c.userMax=n,c.eventArgs=r,o&&l.redraw(a)})},zoom:function(e,s){var a=this.dataMin,r=this.dataMax,o=this.options,i=Math.min(a,t(o.min,a)),o=Math.max(r,t(o.max,r));return(e!==this.min||s!==this.max)&&(this.allowZoomOutside||(n(a)&&(e<i&&(e=i),e>o&&(e=o)),n(r)&&(s<i&&(s=i),s>o&&(s=o))),this.displayBtn=void 0!==e||void 0!==s,this.setExtremes(e,s,!1,void 0,{trigger:"zoom"})),!0},setAxisSize:function(){var n=this.chart,s=this.options,o=s.offsets||[0,0,0,0],i=this.horiz,a=this.width=Math.round(e.relativeLength(t(s.width,n.plotWidth-o[3]+o[1]),n.plotWidth)),r=this.height=Math.round(e.relativeLength(t(s.height,n.plotHeight-o[0]+o[2]),n.plotHeight)),c=this.top=Math.round(e.relativeLength(t(s.top,n.plotTop+o[0]),n.plotHeight,n.plotTop)),s=this.left=Math.round(e.relativeLength(t(s.left,n.plotLeft+o[3]),n.plotWidth,n.plotLeft));this.bottom=n.chartHeight-r-c,this.right=n.chartWidth-a-s,this.len=Math.max(i?a:r,0),this.pos=i?s:c},getExtremes:function(){var e=this.isLog;return{min:e?a(this.lin2log(this.min)):this.min,max:e?a(this.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(e){var t=this.isLog,n=t?this.lin2log(this.min):this.min,t=t?this.lin2log(this.max):this.max;return null===e||-(1/0)===e?e=n:1/0===e?e=t:n>e?e=n:t<e&&(e=t),this.translate(e,0,1,0,1)},autoLabelAlign:function(e){return e=(t(e,0)-90*this.side+720)%360,15<e&&165>e?"right":195<e&&345>e?"left":"center"},tickSize:function(e){var s=this.options,n=s[e+"Length"],o=t(s[e+"Width"],"tick"===e&&this.isXAxis?1:0);if(o&&n)return"inside"===s[e+"Position"]&&(n=-n),[n,o]},labelMetrics:function(){var e=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[e]&&this.ticks[e].label)},unsquish:function(){var c,l,u,e=this.options.labels,p=this.horiz,i=this.tickInterval,r=i,d=this.len/(((this.categories?1:0)+this.max-this.min)/i),o=e.rotation,h=this.labelMetrics(),m=Number.MAX_VALUE,f=function(e){return e/=d||1,e=1<e?Math.ceil(e):1,a(e*i)};return p?(l=!e.staggerLines&&!e.step&&(n(o)?[o]:d<t(e.autoRotationLimit,80)&&e.autoRotation))&&s(l,function(e){var t;(e===o||e&&-90<=e&&90>=e)&&(c=f(Math.abs(h.h/Math.sin(x*e))),t=c+Math.abs(e/360),t<m&&(m=t,u=e,r=c))}):e.step||(r=f(h.h)),this.autoRotation=l,this.labelRotation=t(u,o),r},getSlotWidth:function(){var t=this.chart,n=this.horiz,e=this.options.labels,o=Math.max(this.tickPositions.length-(this.categories?0:1),1),s=t.margin[3];return n&&2>(e.step||0)&&!e.rotation&&(this.staggerLines||1)*this.len/o||!n&&(e.style&&parseInt(e.style.width,10)||s&&s-t.spacing[3]||.33*t.chartWidth)},renderUnsquish:function(){var e,r,h,d=this.chart,g=d.renderer,a=this.tickPositions,m=this.ticks,t=this.options.labels,f=this.horiz,l=this.getSlotWidth(),i=Math.max(1,Math.round(l-2*(t.padding||5))),o={},c=this.labelMetrics(),u=t.style&&t.style.textOverflow,n=0;if(p(t.rotation)||(o.rotation=t.rotation||0),s(a,function(e){(e=m[e])&&e.label&&e.label.textPxLength>n&&(n=e.label.textPxLength)}),this.maxLabelLength=n,this.autoRotation)n>i&&n>c.h?o.rotation=this.labelRotation:this.labelRotation=0;else if(l&&(r=i,!u))for(h="clip",i=a.length;!f&&i--;)(e=a[i],e=m[e].label)&&(e.styles&&"ellipsis"===e.styles.textOverflow?e.css({textOverflow:"clip"}):e.textPxLength>l&&e.css({width:l+"px"}),e.getBBox().height>this.len/a.length-(c.h-c.f)&&(e.specificTextOverflow="ellipsis"));o.rotation&&(r=n>.5*d.chartHeight?.33*d.chartHeight:d.chartHeight,u||(h="ellipsis")),(this.labelAlign=t.align||this.autoLabelAlign(this.labelRotation))&&(o.align=this.labelAlign),s(a,function(e){var n=(e=m[e])&&e.label,s={};n&&(n.attr(o),!r||t.style&&t.style.width||!(r<n.textPxLength||"SPAN"===n.element.tagName)||(s.width=r,u||(s.textOverflow=n.specificTextOverflow||h),n.css(s)),delete n.specificTextOverflow,e.rotation=o.rotation)}),this.tickRotCorr=g.rotCorr(c.b,this.labelRotation||0,0!==this.side)},hasData:function(){return this.hasVisibleSeries||n(this.min)&&n(this.max)&&this.tickPositions&&0<this.tickPositions.length},addTitle:function(e){var n,o=this.chart.renderer,i=this.horiz,s=this.opposite,t=this.options.title;this.axisTitle||((n=t.textAlign)||(n=(i?{low:"left",middle:"center",high:"right"}:{low:s?"right":"left",middle:"center",high:s?"left":"right"})[t.align]),this.axisTitle=o.text(t.text,0,0,t.useHTML).attr({zIndex:7,rotation:t.rotation||0,align:n}).addClass("highcharts-axis-title").css(h(t.style)).add(this.axisGroup),this.axisTitle.isNew=!0),t.style.width||this.isRadial||this.axisTitle.css({width:this.len}),this.axisTitle[e?"show":"hide"](!0)},generateTick:function(e){var t=this.ticks;t[e]?t[e].addLabel():t[e]=new c(this,e)},getOffset:function(){var p,g,e=this,c=e.chart,u=c.renderer,i=e.options,y=e.tickPositions,f=e.ticks,b=e.horiz,o=e.side,x=c.inverted&&!e.isZAxis?[1,0,3,2][o]:o,O=0,a=0,d=i.title,m=i.labels,l=0,j=c.axisOffset,c=c.clipOffset,h=[-1,1,1,-1][o],_=i.className,w=e.axisParent,C=this.tickSize("tick"),v=e.hasData();e.showAxis=g=v||t(i.showEmpty,!0),e.staggerLines=e.horiz&&m.staggerLines,e.axisGroup||(e.gridGroup=u.g("grid").attr({zIndex:i.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(_||"")).add(w),e.axisGroup=u.g("axis").attr({zIndex:i.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(_||"")).add(w),e.labelGroup=u.g("axis-labels").attr({zIndex:m.zIndex||7}).addClass("highcharts-"+e.coll.toLowerCase()+"-labels "+(_||"")).add(w)),v||e.isLinked?(s(y,function(t,n){e.generateTick(t,n)}),e.renderUnsquish(),e.reserveSpaceDefault=0===o||2===o||{1:"left",3:"right"}[o]===e.labelAlign,t(m.reserveSpace,"center"===e.labelAlign||null,e.reserveSpaceDefault)&&s(y,function(e){l=Math.max(f[e].getLabelSize(),l)}),e.staggerLines&&(l*=e.staggerLines),e.labelOffset=l*(e.opposite?-1:1)):r(f,function(e,t){e.destroy(),delete f[t]}),d&&d.text&&!1!==d.enabled&&(e.addTitle(g),g&&!1!==d.reserveSpace&&(e.titleOffset=O=e.axisTitle.getBBox()[b?"height":"width"],p=d.offset,a=n(p)?0:t(d.margin,b?5:10))),e.renderLine(),e.offset=h*t(i.offset,j[o]),e.tickRotCorr=e.tickRotCorr||{x:0,y:0},u=0===o?-e.labelMetrics().h:2===o?e.tickRotCorr.y:0,a=Math.abs(l)+a,l&&(a=a-u+h*(b?t(m.y,e.tickRotCorr.y+8*h):m.x)),e.axisTitleMargin=t(p,a),j[o]=Math.max(j[o],e.axisTitleMargin+O+h*e.offset,a,v&&y.length&&C?C[0]+h*e.offset:0),i=i.offset?0:2*Math.floor(e.axisLine.strokeWidth()/2),c[x]=Math.max(c[x],i)},getLinePath:function(e){var n=this.chart,o=this.opposite,t=this.offset,s=this.horiz,i=this.left+(o?this.width:0)+t,t=n.chartHeight-this.bottom-(o?this.height:0)+t;return o&&(e*=-1),n.renderer.crispLine(["M",s?this.left:i,s?t:this.top,"L",s?n.chartWidth-this.right:i,s?t:n.chartHeight-this.bottom],e)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.axisLine.attr({stroke:this.options.lineColor,"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var e=this.horiz,s=this.left,r=this.top,t=this.len,o=this.options.title,i=e?s:r,a=this.opposite,c=this.offset,l=o.x||0,d=o.y||0,n=this.axisTitle,u=this.chart.renderer.fontMetrics(o.style&&o.style.fontSize,n),n=Math.max(n.getBBox(null,0).height-u.h-1,0),t={low:i+(e?0:t),middle:i+t/2,high:i+(e?t:0)}[o.align],s=(e?r+this.height:s)+(e?1:-1)*(a?-1:1)*this.axisTitleMargin+[-n,n,u.f,-n][this.side];return{x:e?t+l:s+(a?this.width:0)+c+l,y:e?s+d-(a?this.height:0)+c:t+d}},renderMinorTick:function(e){var n=this.chart.hasRendered&&o(this.oldMin),t=this.minorTicks;t[e]||(t[e]=new c(this,e,"minor")),n&&t[e].isNew&&t[e].render(null,!0),t[e].render(null,!1,1)},renderTick:function(e,t){var s=this.isLinked,n=this.ticks,i=this.chart.hasRendered&&o(this.oldMin);(!s||e>=this.min&&e<=this.max)&&(n[e]||(n[e]=new c(this,e)),i&&n[e].isNew&&n[e].render(t,!0,.1),n[e].render(t))},render:function(){var f,g,t=this,p=t.chart,a=t.options,_=t.isLog,O=t.isLinked,h=t.tickPositions,d=t.axisTitle,m=t.ticks,v=t.minorTicks,n=t.alternateBands,j=a.stackLabels,b=a.alternateGridColor,l=t.tickmarkOffset,u=t.axisLine,y=t.showAxis,w=S(p.renderer.globalAnimation);t.labelEdge.length=0,t.overlap=!1,s([m,v,n],function(e){r(e,function(e){e.isActive=!1})}),(t.hasData()||O)&&(t.minorTickInterval&&!t.categories&&s(t.getMinorTickPositions(),function(e){t.renderMinorTick(e)}),h.length&&(s(h,function(e,n){t.renderTick(e,n)}),l&&(0===t.min||t.single)&&(m[-1]||(m[-1]=new c(t,-1,null,!0)),m[-1].render(-1))),b&&s(h,function(s,o){f=void 0!==h[o+1]?h[o+1]+l:t.max-l,0===o%2&&s<t.max&&f<=t.max+(p.polar?-l:l)&&(n[s]||(n[s]=new e.PlotLineOrBand(t)),g=s+l,n[s].options={from:_?t.lin2log(g):g,to:_?t.lin2log(f):f,color:b},n[s].render(),n[s].isActive=!0)}),t._addedPlotLB||(s((a.plotLines||[]).concat(a.plotBands||[]),function(e){t.addPlotBandOrLine(e)}),t._addedPlotLB=!0)),s([m,v,n],function(e){var t,s=[],o=w.duration;r(e,function(e,t){e.isActive||(e.render(t,!1,0),e.isActive=!1,s.push(t))}),k(function(){for(t=s.length;t--;)e[s[t]]&&!e[s[t]].isActive&&(e[s[t]].destroy(),delete e[s[t]])},e!==n&&p.hasRendered&&o?o:0)}),u&&(u[u.isPlaced?"animate":"attr"]({d:this.getLinePath(u.strokeWidth())}),u.isPlaced=!0,u[y?"show":"hide"](!0)),d&&y&&(a=t.getTitlePosition(),o(a.y)?(d[d.isNew?"attr":"animate"](a),d.isNew=!1):(d.attr("y",-9999),d.isNew=!0)),j&&j.enabled&&t.renderStackTotals(),t.isDirty=!1,i(this,"afterRender")},redraw:function(){this.visible&&(this.render(),s(this.plotLinesAndBands,function(e){e.render()})),s(this.series,function(e){e.isDirty=!0})},keepProps:"extKey hcEvents names series userMax userMin".split(" "),destroy:function(e){var o,t=this,a=t.stacks,n=t.plotLinesAndBands;if(i(this,"destroy",{keepEvents:e}),e||C(t),r(a,function(e,t){f(e),a[t]=null}),s([t.ticks,t.minorTicks,t.alternateBands],function(e){f(e)}),n)for(e=n.length;e--;)n[e].destroy();s("stackTotalGroup axisLine axisTitle axisGroup gridGroup labelGroup cross".split(" "),function(e){t[e]&&(t[e]=t[e].destroy())});for(o in t.plotLinesAndBandsGroups)t.plotLinesAndBandsGroups[o]=t.plotLinesAndBandsGroups[o].destroy();r(t,function(e,n){-1===u(n,t.keepProps)&&delete t[n]})},drawCrosshair:function(e,s){var c,l,o=this.crosshair,a=t(o.snap,!0),r=this.cross;if(i(this,"drawCrosshair",{e,point:s}),e||(e=this.cross&&this.cross.e),this.crosshair&&!1!==(n(s)||!a)){if(a?n(s)&&(c=t(s.crosshairPos,this.isXAxis?s.plotX:this.len-s.plotY)):c=e&&(this.horiz?e.chartX-this.pos:this.len-e.chartY+this.pos),n(c)&&(l=this.getPlotLinePath(s&&(this.isXAxis?s.x:t(s.stackY,s.y)),null,null,null,c)||null),!n(l)){this.hideCrosshair();return}a=this.categories&&!this.isRadial,r||(this.cross=r=this.chart.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-"+(a?"category ":"thin ")+o.className).attr({zIndex:t(o.zIndex,2)}).add(),r.attr({stroke:o.color||(a?A("#ccd6eb").setOpacity(.25).get():"#cccccc"),"stroke-width":t(o.width,1)}).css({"pointer-events":"none"}),o.dashStyle&&r.attr({dashstyle:o.dashStyle})),r.show().attr({d:l}),a&&!o.width&&r.attr({"stroke-width":this.transA}),this.cross.e=e}else this.hideCrosshair();i(this,"afterDrawCrosshair",{e,point:s})},hideCrosshair:function(){this.cross&&this.cross.hide()}}),e.Axis=g}(t),function(e){var n=e.Axis,s=e.getMagnitude,o=e.normalizeTickInterval,t=e.timeUnits;n.prototype.getTimeTicks=function(){return this.chart.time.getTimeTicks.apply(this.chart.time,arguments)},n.prototype.normalizeTimeTickInterval=function(e,n){i=n||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],n=i[i.length-1];var i,r,a=t[n[0]],c=n[1];for(r=0;r<i.length&&!(n=i[r],a=t[n[0]],c=n[1],i[r+1]&&e<=(a*c[c.length-1]+t[i[r+1][0]])/2);r++);return a===t.year&&e<5*a&&(c=[1,2,5]),e=o(e/a,c,"year"===n[0]?Math.max(s(e/a),1):1),{unitRange:a,count:e,unitName:n[0]}}}(t),function(e){var t=e.Axis,n=e.getMagnitude,s=e.map,o=e.normalizeTickInterval,i=e.pick;t.prototype.getLogTickPositions=function(e,t,a,r){var d,h,m,f,p,l=this.options,c=this.len,u=[];if(r||(this._minorAutoInterval=null),.5<=e)e=Math.round(e),u=this.getLinearTickPositions(e,t,a);else if(.08<=e)for(c=Math.floor(t),l=.3<e?[1,2,4]:.15<e?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];c<a+1&&!f;c++)for(p=l.length,h=0;h<p&&!f;h++)m=this.log2lin(this.lin2log(c)*l[h]),m>t&&(!r||d<=a)&&void 0!==d&&u.push(d),d>a&&(f=!0),d=m;else t=this.lin2log(t),a=this.lin2log(a),e=r?this.getMinorTickInterval():l.tickInterval,e=i("auto"===e?null:e,this._minorAutoInterval,l.tickPixelInterval/(r?5:1)*(a-t)/((r?c/this.tickPositions.length:c)||1)),e=o(e,null,n(e)),u=s(this.getLinearTickPositions(e,t,a),this.log2lin),r||(this._minorAutoInterval=e/5);return r||(this.tickInterval=e),u},t.prototype.log2lin=function(e){return Math.log(e)/Math.LN10},t.prototype.lin2log=function(e){return Math.pow(10,e)}}(t),function(e,t){var s=e.arrayMax,o=e.arrayMin,n=e.defined,a=e.destroyObjectProperties,r=e.each,i=e.erase,c=e.merge,l=e.pick;e.PlotLineOrBand=function(e,t){this.axis=e,t&&(this.options=t,this.id=t.id)},e.PlotLineOrBand.prototype={render:function(){var r=this,o=r.axis,m=o.horiz,s=r.options,u=s.label,h=r.label,f=s.to,p=s.from,g=s.value,i=n(p)&&n(f),O=n(g),a=r.svgElem,y=!a,t=[],d=s.color,b=l(s.zIndex,0),j=s.events,t={class:"highcharts-plot-"+(i?"band ":"line ")+(s.className||"")},_={},w=o.chart.renderer,v=i?"bands":"lines";if(o.isLog&&(p=o.log2lin(p),f=o.log2lin(f),g=o.log2lin(g)),O?(t={stroke:d,"stroke-width":s.width},s.dashStyle&&(t.dashstyle=s.dashStyle)):i&&(d&&(t.fill=d),s.borderWidth&&(t.stroke=s.borderColor,t["stroke-width"]=s.borderWidth)),_.zIndex=b,v+="-"+b,(d=o.plotLinesAndBandsGroups[v])||(o.plotLinesAndBandsGroups[v]=d=w.g("plot-"+v).attr(_).add()),y&&(r.svgElem=a=w.path().attr(t).add(d)),O)t=o.getPlotLinePath(g,a.strokeWidth());else if(i)t=o.getPlotBandPath(p,f,s);else return;return y&&t&&t.length?(a.attr({d:t}),j&&e.objectEach(j,function(e,t){a.on(t,function(e){j[t].apply(r,[e])})})):a&&(t?(a.show(),a.animate({d:t})):(a.hide(),h&&(r.label=h=h.destroy()))),u&&n(u.text)&&t&&t.length&&0<o.width&&0<o.height&&!t.flat?(u=c({align:m&&i&&"center",x:m?!i&&4:10,verticalAlign:!m&&i&&"middle",y:m?i?16:10:i?6:-4,rotation:m&&!i&&90},u),this.renderLabel(u,t,i,b)):h&&h.hide(),r},renderLabel:function(e,t,n,i){var a=this.label,r=this.axis.chart.renderer;a||(a={align:e.textAlign||e.align,rotation:e.rotation,class:"highcharts-plot-"+(n?"band":"line")+"-label "+(e.className||"")},a.zIndex=i,this.label=a=r.text(e.text,0,0,e.useHTML).attr(a).add(),a.css(e.style)),i=t.xBounds||[t[1],t[4],n?t[6]:t[1]],t=t.yBounds||[t[2],t[5],n?t[7]:t[2]],n=o(i),r=o(t),a.align(e,!1,{x:n,y:r,width:s(i)-n,height:s(t)-r}),a.show()},destroy:function(){i(this.axis.plotLinesAndBands,this),delete this.axis,a(this)}},e.extend(t.prototype,{getPlotBandPath:function(e,t){var r,n=this.getPlotLinePath(t,null,null,!0),s=this.getPlotLinePath(e,null,null,!0),i=[],a=this.horiz,o=1;if(e=e<this.min&&t<this.min||e>this.max&&t>this.max,s&&n)for(e&&(r=s.toString()===n.toString(),o=0),e=0;e<s.length;e+=6)a&&n[e+1]===s[e+1]?(n[e+1]+=o,n[e+4]+=o):a||n[e+2]!==s[e+2]||(n[e+2]+=o,n[e+5]+=o),i.push("M",s[e+1],s[e+2],"L",s[e+4],s[e+5],n[e+4],n[e+5],n[e+1],n[e+2],"z"),i.flat=r;return i},addPlotBand:function(e){return this.addPlotBandOrLine(e,"plotBands")},addPlotLine:function(e){return this.addPlotBandOrLine(e,"plotLines")},addPlotBandOrLine:function(t,n){var s=new e.PlotLineOrBand(this,t).render(),o=this.userOptions;return s&&(n&&(o[n]=o[n]||[],o[n].push(t)),this.plotLinesAndBands.push(s)),s},removePlotBandOrLine:function(e){for(var n=this.plotLinesAndBands,s=this.options,o=this.userOptions,t=n.length;t--;)n[t].id===e&&n[t].destroy();r([s.plotLines||[],o.plotLines||[],s.plotBands||[],o.plotBands||[]],function(n){for(t=n.length;t--;)n[t].id===e&&i(n,n[t])})},removePlotBand:function(e){this.removePlotBandOrLine(e)},removePlotLine:function(e){this.removePlotBandOrLine(e)}})}(t,n),function(e){var n=e.each,r=e.extend,c=e.format,l=e.isNumber,i=e.map,a=e.merge,t=e.pick,s=e.splat,d=e.syncTimeout,o=e.timeUnits;e.Tooltip=function(){this.init.apply(this,arguments)},e.Tooltip.prototype={init:function(e,t){this.chart=e,this.options=t,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.split=t.split&&!e.inverted,this.shared=t.shared||this.split},cleanSplit:function(e){n(this.chart.series,function(t){var n=t&&t.tt;n&&(!n.isActive||e?t.tt=n.destroy():n.isActive=!1)})},getLabel:function(){var t=this.chart.renderer,e=this.options;return this.label||(this.split?this.label=t.g("tooltip"):(this.label=t.label("",0,0,e.shape||"callout",null,null,e.useHTML,null,"tooltip").attr({padding:e.padding,r:e.borderRadius}),this.label.attr({fill:e.backgroundColor,"stroke-width":e.borderWidth}).css(e.style).shadow(e.shadow)),this.label.attr({zIndex:8}).add()),this.label},update:function(e){this.destroy(),a(!0,this.chart.options.tooltip.userOptions,e),this.init(this.chart,a(!0,this.options,e))},destroy:function(){this.label&&(this.label=this.label.destroy()),this.split&&this.tt&&(this.cleanSplit(this.chart,!0),this.tt=this.tt.destroy()),e.clearTimeout(this.hideTimer),e.clearTimeout(this.tooltipTimeout)},move:function(t,n,s,o){var i=this,a=i.now,c=!1!==i.options.animation&&!i.isHidden&&(1<Math.abs(t-a.x)||1<Math.abs(n-a.y)),l=i.followPointer||1<i.len;r(a,{x:c?(2*a.x+t)/3:t,y:c?(a.y+n)/2:n,anchorX:l?void 0:c?(2*a.anchorX+s)/3:s,anchorY:l?void 0:c?(a.anchorY+o)/2:o}),i.getLabel().attr(a),c&&(e.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){i&&i.move(t,n,s,o)},32))},hide:function(n){var s=this;e.clearTimeout(this.hideTimer),n=t(n,this.options.hideDelay,500),this.isHidden||(this.hideTimer=d(function(){s.getLabel()[n?"fadeOut":"hide"](),s.isHidden=!0},n))},getAnchor:function(e,t){var a,u,h,o=this.chart,r=o.inverted,d=o.plotTop,m=o.plotLeft,c=0,l=0;return e=s(e),a=e[0].tooltipPos,this.followPointer&&t&&(void 0===t.chartX&&(t=o.pointer.normalize(t)),a=[t.chartX-o.plotLeft,t.chartY-d]),a||(n(e,function(e){u=e.series.yAxis,h=e.series.xAxis,c+=e.plotX+(!r&&h?h.left-m:0),l+=(e.plotLow?(e.plotLow+e.plotHigh)/2:e.plotY)+(!r&&u?u.top-d:0)}),c/=e.length,l/=e.length,a=[r?o.plotWidth-l:c,this.shared&&!r&&1<e.length&&t?t.chartY-d:r?o.plotHeight-c:l]),i(a,Math.round)},getPosition:function(e,n,s){var c,o=this.chart,a=this.distance,i={},r=o.inverted&&s.h||0,l=["y",o.chartHeight,n,s.plotY+o.plotTop,o.plotTop,o.plotTop+o.plotHeight],d=["x",o.chartWidth,e,s.plotX+o.plotLeft,o.plotLeft,o.plotLeft+o.plotWidth],m=!this.followPointer&&t(s.ttBelow,!o.inverted===!!s.negative),f=function(e,t,n,s,o,c){var d=n<s-a,u=s+a+n<t,l=s-a-n;if(s+=a,m&&u)i[e]=s;else if(!m&&d)i[e]=l;else if(d)i[e]=Math.min(c-n,0>l-r?l:l-r);else if(u)i[e]=Math.max(o,s+r+n>t?s:s+r);else return!1},p=function(e,t,n,s){var o;return s<a||s>t-a?o=!1:i[e]=s<n/2?1:s>t-n/2?t-n-2:s-n/2,o},u=function(e){var t=l;l=d,d=t,c=e},h=function(){!1!==f.apply(0,l)?!1!==p.apply(0,d)||c||(u(!0),h()):c?i.x=i.y=0:(u(!0),h())};return(o.inverted||1<this.len)&&u(),h(),i},defaultFormatter:function(e){var n=this.points||s(this),t=[e.tooltipFooterHeaderFormatter(n[0])],t=t.concat(e.bodyFormatter(n));return t.push(e.tooltipFooterHeaderFormatter(n[0],!0)),t},refresh:function(o,i){var d,h,m,l=this.options,a=o,r={},u=[],c=l.formatter||this.defaultFormatter,r=this.shared;l.enabled&&(e.clearTimeout(this.hideTimer),this.followPointer=s(a)[0].series.tooltipOptions.followPointer,d=this.getAnchor(a,i),i=d[0],m=d[1],!r||a.series&&a.series.noSharedTooltip?r=a.getLabelConfig():(n(a,function(e){e.setState("hover"),u.push(e.getLabelConfig())}),r={x:a[0].category,y:a[0].y},r.points=u,a=a[0]),this.len=u.length,r=c.call(r,this),h=a.series,this.distance=t(h.tooltipOptions.distance,16),!1===r?this.hide():(c=this.getLabel(),this.isHidden&&c.attr({opacity:1}).show(),this.split?this.renderSplit(r,s(o)):(l.style.width||c.css({width:this.chart.spacingBox.width}),c.attr({text:r&&r.join?r.join(""):r}),c.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-"+t(a.colorIndex,h.colorIndex)),c.attr({stroke:l.borderColor||a.color||h.color||"#666666"}),this.updatePosition({plotX:i,plotY:m,negative:a.negative,ttBelow:a.ttBelow,h:d[2]||0})),this.isHidden=!1))},renderSplit:function(s,o){var d=this,r=[],i=this.chart,u=i.renderer,l=!0,a=this.options,c=0,h=this.getLabel();e.isString(s)&&(s=[!1,s]),n(s.slice(0,o.length+1),function(e,n){if(!1!==e){n=o[n-1]||{isHeader:!0,plotX:o[0].plotX};var f=n.series||d,m=f.tt,s=n.series||{},p="highcharts-color-"+t(n.colorIndex,s.colorIndex,"none");m||(f.tt=m=u.label(null,null,null,"callout",null,null,a.useHTML).addClass("highcharts-tooltip-box "+p).attr({padding:a.padding,r:a.borderRadius,fill:a.backgroundColor,stroke:a.borderColor||n.color||s.color||"#333333","stroke-width":a.borderWidth}).add(h)),m.isActive=!0,m.attr({text:e}),m.css(a.style).shadow(a.shadow),e=m.getBBox(),s=e.width+m.strokeWidth(),n.isHeader?(c=e.height,s=Math.max(0,Math.min(n.plotX+i.plotLeft-s/2,i.chartWidth-s))):s=n.plotX+i.plotLeft-t(a.distance,16)-s,0>s&&(l=!1),e=(n.series&&n.series.yAxis&&n.series.yAxis.pos)+(n.plotY||0),e-=i.plotTop,r.push({target:n.isHeader?i.plotHeight+c:e,rank:n.isHeader?1:0,size:f.tt.getBBox().height+1,point:n,x:s,tt:m})}}),this.cleanSplit(),e.distribute(r,i.plotHeight+c),n(r,function(e){var n=e.point,s=n.series;e.tt.attr({visibility:void 0===e.pos?"hidden":"inherit",x:l||n.isHeader?e.x:n.plotX+i.plotLeft+t(a.distance,16),y:e.pos+i.plotTop,anchorX:n.isHeader?n.plotX+i.plotLeft:n.plotX+s.xAxis.pos,anchorY:n.isHeader?e.pos+i.plotTop-15:n.plotY+s.yAxis.pos})})},updatePosition:function(e){var n=this.chart,t=this.getLabel(),t=(this.options.positioner||this.getPosition).call(this,t.width,t.height,e);this.move(Math.round(t.x),Math.round(t.y||0),e.plotX+n.plotLeft,e.plotY+n.plotTop)},getDateFormat:function(e,t,n,s){var i,l,r=this.chart.time,c=r.dateFormat("%m-%d %H:%M:%S.%L",t),a={millisecond:15,second:12,minute:9,hour:6,day:3},d="millisecond";for(i in o){if(e===o.week&&+r.dateFormat("%w",t)===n&&"00:00:00.000"===c.substr(6)){i="week";break}if(o[i]>e){i=d;break}if(a[i]&&c.substr(a[i])!=="01-01 00:00:00.000".substr(a[i]))break;"week"!==i&&(d=i)}return i&&(l=s[i]),l},getXDateFormat:function(e,t,n){t=t.dateTimeLabelFormats;var s=n&&n.closestPointRange;return(s?this.getDateFormat(s,e.x,n.options.startOfWeek,t):t.day)||t.year},tooltipFooterHeaderFormatter:function(e,t){t=t?"footer":"header";var o=e.series,i=o.tooltipOptions,s=i.xDateFormat,a=o.xAxis,d=a&&"datetime"===a.options.type&&l(e.key),r=i[t+"Format"];return d&&!s&&(s=this.getXDateFormat(e,i,a)),d&&s&&n(e.point&&e.point.tooltipDateKeys||["key"],function(e){r=r.replace("{point."+e+"}","{point."+e+":"+s+"}")}),c(r,{point:e,series:o},this.chart.time)},bodyFormatter:function(e){return i(e,function(e){var t=e.series.tooltipOptions;return(t[(e.point.formatPrefix||"point")+"Formatter"]||e.point.tooltipFormatter).call(e.point,t[(e.point.formatPrefix||"point")+"Format"])})}}}(t),function(e){var i=e.addEvent,g=e.attr,n=e.charts,f=e.color,h=e.css,d=e.defined,t=e.each,o=e.extend,u=e.find,r=e.fireEvent,c=e.isNumber,a=e.isObject,m=e.offset,s=e.pick,p=e.splat,l=e.Tooltip;e.Pointer=function(e,t){this.init(e,t)},e.Pointer.prototype={init:function(e,t){this.options=t,this.chart=e,this.runChartClick=t.chart.events&&!!t.chart.events.click,this.pinchDown=[],this.lastValidTouch={},l&&(e.tooltip=new l(e,t.tooltip),this.followTouchMove=s(t.tooltip.followTouchMove,!0)),this.setDOMEvents()},zoomOption:function(e){var n=this.chart,o=n.options.chart,t=o.zoomType||"",n=n.inverted;/touch/.test(e.type)&&(t=s(o.pinchType,t)),this.zoomX=e=/x/.test(t),this.zoomY=t=/y/.test(t),this.zoomHor=e&&!n||t&&n,this.zoomVert=t&&!n||e&&n,this.hasZoom=e||t},normalize:function(e,t){var n=e.touches?e.touches.length?e.touches.item(0):e.changedTouches[0]:e;return t||(this.chartPosition=t=m(this.chart.container)),o(e,{chartX:Math.round(n.pageX-t.left),chartY:Math.round(n.pageY-t.top)})},getCoordinates:function(e){var n={xAxis:[],yAxis:[]};return t(this.chart.axes,function(t){n[t.isXAxis?"xAxis":"yAxis"].push({axis:t,value:t.toValue(e[t.horiz?"chartX":"chartY"])})}),n},findNearestKDPoint:function(e,n,s){var o;return t(e,function(e){if(t=!(e.noSharedTooltip&&n)&&0>e.options.findNearestPointBy.indexOf("y"),e=e.searchPoint(s,t),(t=a(e,!0))&&!(t=!a(o,!0)))var t=o.distX-e.distX,i=o.dist-e.dist,r=(e.series.group&&e.series.group.zIndex)-(o.series.group&&o.series.group.zIndex),t=0<(0!==t&&n?t:0!==i?i:0!==r?r:o.series.index>e.series.index?-1:1);t&&(o=e)}),o},getPointFromEvent:function(e){e=e.target;for(var t;e&&!t;)t=e.point,e=e.parentNode;return t},getChartCoordinatesFromPoint:function(e,t){var n=e.series,i=n.xAxis,n=n.yAxis,a=s(e.clientX,e.plotX),o=e.shapeArgs;if(i&&n)return t?{chartX:i.len+i.pos-a,chartY:n.len+n.pos-e.plotY}:{chartX:a+i.pos,chartY:e.plotY+n.pos};if(o&&o.x&&o.y)return{chartX:o.x,chartY:o.y}},getHoverData:function(n,o,i,r,c,l,d){var h,m=[],f=d&&d.isBoosting;return r=!!r&&!!n,d=o&&!o.stickyTracking?[o]:e.grep(i,function(e){return e.visible&&!(!c&&e.directTouch)&&s(e.options.enableMouseTracking,!0)&&e.stickyTracking}),o=(h=r?n:this.findNearestKDPoint(d,c,l))&&h.series,h&&(c&&!o.noSharedTooltip?(d=e.grep(i,function(e){return e.visible&&!(!c&&e.directTouch)&&s(e.options.enableMouseTracking,!0)&&!e.noSharedTooltip}),t(d,function(e){var t=u(e.points,function(e){return e.x===h.x&&!e.isNull});a(t)&&(f&&(t=e.getPoint(t)),m.push(t))})):m.push(h)),{hoverPoint:h,hoverSeries:o,hoverPoints:m}},runPointActions:function(o,a){var r=this.chart,d=r.tooltip&&r.tooltip.options.enabled?r.tooltip:void 0,h=!!d&&d.shared,c=a||r.hoverPoint,l=c&&c.series||r.hoverSeries,l=this.getHoverData(c,l,r.series,!!a||l&&l.directTouch&&this.isDirectTouch,h,o,{isBoosting:r.isBoosting}),c=l.hoverPoint,u=l.hoverPoints;if(a=(l=l.hoverSeries)&&l.tooltipOptions.followPointer,h=h&&l&&!l.noSharedTooltip,c&&(c!==r.hoverPoint||d&&d.isHidden)){if(t(r.hoverPoints||[],function(t){-1===e.inArray(t,u)&&t.setState()}),t(u||[],function(e){e.setState("hover")}),r.hoverSeries!==l&&l.onMouseOver(),r.hoverPoint&&r.hoverPoint.firePointEvent("mouseOut"),!c.series)return;c.firePointEvent("mouseOver"),r.hoverPoints=u,r.hoverPoint=c,d&&d.refresh(h?u:c,o)}else a&&d&&!d.isHidden&&(c=d.getAnchor([{}],o),d.updatePosition({plotX:c[0],plotY:c[1]}));this.unDocMouseMove||(this.unDocMouseMove=i(r.container.ownerDocument,"mousemove",function(t){var s=n[e.hoverChartIndex];s&&s.pointer.onDocumentMouseMove(t)})),t(r.axes,function(t){var n=s(t.crosshair.snap,!0),i=n?e.find(u,function(e){return e.series[t.coll]===t}):void 0;i||!n?t.drawCrosshair(o,i):t.hideCrosshair()})},reset:function(e,n){var s=this.chart,c=s.hoverSeries,o=s.hoverPoint,r=s.hoverPoints,i=s.tooltip,a=i&&i.shared?r:o;e&&a&&t(p(a),function(t){t.series.isCartesian&&void 0===t.plotX&&(e=!1)}),e?i&&a&&(i.refresh(a),o&&(o.setState(o.state,!0),t(s.axes,function(e){e.crosshair&&e.drawCrosshair(null,o)}))):(o&&o.onMouseOut(),r&&t(r,function(e){e.setState()}),c&&c.onMouseOut(),i&&i.hide(n),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),t(s.axes,function(e){e.hideCrosshair()}),this.hoverX=s.hoverPoints=s.hoverPoint=null)},scaleGroups:function(e,n){var o,s=this.chart;t(s.series,function(t){o=e||t.getPlotBox(),t.xAxis&&t.xAxis.zoomEnabled&&t.group&&(t.group.attr(o),t.markerGroup&&(t.markerGroup.attr(o),t.markerGroup.clip(n?s.clipRect:null)),t.dataLabelsGroup&&t.dataLabelsGroup.attr(o))}),s.clipRect.attr(n||s.clipBox)},dragStart:function(e){var t=this.chart;t.mouseIsDown=e.type,t.cancelClick=!1,t.mouseDownX=this.mouseDownX=e.chartX,t.mouseDownY=this.mouseDownY=e.chartY},drag:function(e){var h,n=this.chart,r=n.options.chart,t=e.chartX,i=e.chartY,m=this.zoomHor,p=this.zoomVert,o=n.plotLeft,a=n.plotTop,d=n.plotWidth,u=n.plotHeight,s=this.selectionMarker,c=this.mouseDownX,l=this.mouseDownY,g=r.panKey&&e[r.panKey+"Key"];s&&s.touch||(t<o?t=o:t>o+d&&(t=o+d),i<a?i=a:i>a+u&&(i=a+u),this.hasDragged=Math.sqrt(Math.pow(c-t,2)+Math.pow(l-i,2)),10<this.hasDragged&&(h=n.isInsidePlot(c-o,l-a),n.hasCartesianSeries&&(this.zoomX||this.zoomY)&&h&&!g&&!s&&(this.selectionMarker=s=n.renderer.rect(o,a,m?1:d,p?1:u,0).attr({fill:r.selectionMarkerFill||f("#335cad").setOpacity(.25).get(),class:"highcharts-selection-marker",zIndex:7}).add()),s&&m&&(t-=c,s.attr({width:Math.abs(t),x:(0<t?0:t)+c})),s&&p&&(t=i-l,s.attr({height:Math.abs(t),y:(0<t?0:t)+l})),h&&!s&&r.panning&&n.pan(e,r.panning)))},drop:function(e){var f=this,s=this.chart,i=this.hasPinched;if(this.selectionMarker){var m,a={originalEvent:e,xAxis:[],yAxis:[]},n=this.selectionMarker,l=n.attr?n.attr("x"):n.x,u=n.attr?n.attr("y"):n.y,p=n.attr?n.attr("width"):n.width,g=n.attr?n.attr("height"):n.height;(this.hasDragged||i)&&(t(s.axes,function(t){if(t.zoomEnabled&&d(t.min)&&(i||f[{xAxis:"zoomX",yAxis:"zoomY"}[t.coll]])){var n=t.horiz,s="touchend"===e.type?t.minPixelPadding:0,o=t.toValue((n?l:u)+s),n=t.toValue((n?l+p:u+g)-s);a[t.coll].push({axis:t,min:Math.min(o,n),max:Math.max(o,n)}),m=!0}}),m&&r(s,"selection",a,function(e){s.zoom(o(e,i?{animation:!1}:null))})),c(s.index)&&(this.selectionMarker=this.selectionMarker.destroy()),i&&this.scaleGroups()}s&&c(s.index)&&(h(s.container,{cursor:s._cursor}),s.cancelClick=10<this.hasDragged,s.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(e){e=this.normalize(e),2!==e.button&&(this.zoomOption(e),e.preventDefault&&e.preventDefault(),this.dragStart(e))},onDocumentMouseUp:function(t){n[e.hoverChartIndex]&&n[e.hoverChartIndex].pointer.drop(t)},onDocumentMouseMove:function(e){var t=this.chart,n=this.chartPosition;e=this.normalize(e,n),!n||this.inClass(e.target,"highcharts-tracker")||t.isInsidePlot(e.chartX-t.plotLeft,e.chartY-t.plotTop)||this.reset()},onContainerMouseLeave:function(t){var s=n[e.hoverChartIndex];s&&(t.relatedTarget||t.toElement)&&(s.pointer.reset(),s.pointer.chartPosition=null)},onContainerMouseMove:function(t){var s=this.chart;d(e.hoverChartIndex)&&n[e.hoverChartIndex]&&n[e.hoverChartIndex].mouseIsDown||(e.hoverChartIndex=s.index),t=this.normalize(t),t.returnValue=!1,"mousedown"===s.mouseIsDown&&this.drag(t),!this.inClass(t.target,"highcharts-tracker")&&!s.isInsidePlot(t.chartX-s.plotLeft,t.chartY-s.plotTop)||s.openMenu||this.runPointActions(t)},inClass:function(e,t){for(var n;e;){if(n=g(e,"class")){if(-1!==n.indexOf(t))return!0;if(-1!==n.indexOf("highcharts-container"))return!1}e=e.parentNode}},onTrackerMouseOut:function(e){var t=this.chart.hoverSeries;e=e.relatedTarget||e.toElement,this.isDirectTouch=!1,!t||!e||t.stickyTracking||this.inClass(e,"highcharts-tooltip")||this.inClass(e,"highcharts-series-"+t.index)&&this.inClass(e,"highcharts-tracker")||t.onMouseOut()},onContainerClick:function(e){var t=this.chart,n=t.hoverPoint,s=t.plotLeft,i=t.plotTop;e=this.normalize(e),t.cancelClick||(n&&this.inClass(e.target,"highcharts-tracker")?(r(n.series,"click",o(e,{point:n})),t.hoverPoint&&n.firePointEvent("click",e)):(o(e,this.getCoordinates(e)),t.isInsidePlot(e.chartX-s,e.chartY-i)&&r(t,"click",e)))},setDOMEvents:function(){var t=this,n=t.chart.container,s=n.ownerDocument;n.onmousedown=function(e){t.onContainerMouseDown(e)},n.onmousemove=function(e){t.onContainerMouseMove(e)},n.onclick=function(e){t.onContainerClick(e)},this.unbindContainerMouseLeave=i(n,"mouseleave",t.onContainerMouseLeave),e.unbindDocumentMouseUp||(e.unbindDocumentMouseUp=i(s,"mouseup",t.onDocumentMouseUp)),e.hasTouch&&(n.ontouchstart=function(e){t.onContainerTouchStart(e)},n.ontouchmove=function(e){t.onContainerTouchMove(e)},e.unbindDocumentTouchEnd||(e.unbindDocumentTouchEnd=i(s,"touchend",t.onDocumentTouchEnd)))},destroy:function(){var t=this;t.unDocMouseMove&&t.unDocMouseMove(),this.unbindContainerMouseLeave(),e.chartCount||(e.unbindDocumentMouseUp&&(e.unbindDocumentMouseUp=e.unbindDocumentMouseUp()),e.unbindDocumentTouchEnd&&(e.unbindDocumentTouchEnd=e.unbindDocumentTouchEnd())),clearInterval(t.tooltipTimeout),e.objectEach(t,function(e,n){t[n]=null})}}}(t),function(e){var n=e.charts,s=e.each,o=e.extend,i=e.map,a=e.noop,t=e.pick;o(e.Pointer.prototype,{pinchTranslate:function(e,t,n,s,o,i){this.zoomHor&&this.pinchTranslateDirection(!0,e,t,n,s,o,i),this.zoomVert&&this.pinchTranslateDirection(!1,e,t,n,s,o,i)},pinchTranslateDirection:function(e,t,n,s,o,i,a,r){var d,j,w,g=this.chart,u=e?"x":"y",_=e?"X":"Y",m="chart"+_,O=e?"width":"height",b=g["plot"+(e?"Left":"Top")],l=r||1,y=g.inverted,f=g.bounds[e?"h":"v"],p=1===t.length,h=t[0][m],c=n[0][m],x=!p&&t[1][m],v=!p&&n[1][m];n=function(){!p&&20<Math.abs(h-x)&&(l=r||Math.abs(c-v)/Math.abs(h-x)),j=(b-c)/l+h,d=g["plot"+(e?"Width":"Height")]/l},n(),t=j,t<f.min?(t=f.min,w=!0):t+d>f.max&&(t=f.max-d,w=!0),w?(c-=.8*(c-a[u][0]),p||(v-=.8*(v-a[u][1])),n()):a[u]=[c,v],y||(i[u]=j-b,i[O]=d),i=y?1/l:l,o[O]=d,o[u]=t,s[y?e?"scaleY":"scaleX":"scale"+_]=l,s["translate"+_]=i*b+(c-i*h)},pinch:function(e){var n=this,c=n.chart,r=n.pinchDown,l=e.touches,d=l.length,u=n.lastValidTouch,m=n.hasZoom,h=n.selectionMarker,f={},g=1===d&&(n.inClass(e.target,"highcharts-tracker")&&c.runTrackerClick||n.runChartClick),p={};1<d&&(n.initiated=!0),m&&n.initiated&&!g&&e.preventDefault(),i(l,function(e){return n.normalize(e)}),"touchstart"===e.type?(s(l,function(e,t){r[t]={chartX:e.chartX,chartY:e.chartY}}),u.x=[r[0].chartX,r[1]&&r[1].chartX],u.y=[r[0].chartY,r[1]&&r[1].chartY],s(c.axes,function(e){if(e.zoomEnabled){var n=c.bounds[e.horiz?"h":"v"],s=e.minPixelPadding,o=e.toPixels(t(e.options.min,e.dataMin)),i=e.toPixels(t(e.options.max,e.dataMax)),a=Math.max(o,i);n.min=Math.min(e.pos,Math.min(o,i)-s),n.max=Math.max(e.pos+e.len,a+s)}}),n.res=!0):n.followTouchMove&&1===d?this.runPointActions(n.normalize(e)):r.length&&(h||(n.selectionMarker=h=o({destroy:a,touch:!0},c.plotBox)),n.pinchTranslate(r,l,f,h,p,u),n.hasPinched=m,n.scaleGroups(f,p),n.res&&(n.res=!1,this.reset(!1,0)))},touch:function(n,s){var i,a,o=this.chart;o.index!==e.hoverChartIndex&&this.onContainerMouseLeave({relatedTarget:!0}),e.hoverChartIndex=o.index,1===n.touches.length?(n=this.normalize(n),(a=o.isInsidePlot(n.chartX-o.plotLeft,n.chartY-o.plotTop))&&!o.openMenu?(s&&this.runPointActions(n),"touchmove"===n.type&&(s=this.pinchDown,i=!!s[0]&&4<=Math.sqrt(Math.pow(s[0].chartX-n.chartX,2)+Math.pow(s[0].chartY-n.chartY,2))),t(i,!0)&&this.pinch(n)):s&&this.reset()):2===n.touches.length&&this.pinch(n)},onContainerTouchStart:function(e){this.zoomOption(e),this.touch(e,!0)},onContainerTouchMove:function(e){this.touch(e)},onDocumentTouchEnd:function(t){n[e.hoverChartIndex]&&n[e.hoverChartIndex].pointer.drop(t)}})}(t),function(e){var m=e.addEvent,r=e.charts,u=e.css,c=e.doc,l=e.extend,d=e.noop,n=e.Pointer,h=e.removeEvent,o=e.win,s=e.wrap;if(!e.hasTouch&&(o.PointerEvent||o.MSPointerEvent)){var t={},i=!!o.PointerEvent,f=function(){var n=[];return n.item=function(e){return this[e]},e.objectEach(t,function(e){n.push({pageX:e.pageX,pageY:e.pageY,target:e.target})}),n},a=function(t,n,s,o){"touch"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_TOUCH||!r[e.hoverChartIndex]||(o(t),o=r[e.hoverChartIndex].pointer,o[n]({type:s,target:t.currentTarget,preventDefault:d,touches:f()}))};l(n.prototype,{onContainerPointerDown:function(e){a(e,"onContainerTouchStart","touchstart",function(e){t[e.pointerId]={pageX:e.pageX,pageY:e.pageY,target:e.currentTarget}})},onContainerPointerMove:function(e){a(e,"onContainerTouchMove","touchmove",function(e){t[e.pointerId]={pageX:e.pageX,pageY:e.pageY},t[e.pointerId].target||(t[e.pointerId].target=e.currentTarget)})},onDocumentPointerUp:function(e){a(e,"onDocumentTouchEnd","touchend",function(e){delete t[e.pointerId]})},batchMSEvents:function(e){e(this.chart.container,i?"pointerdown":"MSPointerDown",this.onContainerPointerDown),e(this.chart.container,i?"pointermove":"MSPointerMove",this.onContainerPointerMove),e(c,i?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}}),s(n.prototype,"init",function(e,t,n){e.call(this,t,n),this.hasZoom&&u(t.container,{"-ms-touch-action":"none","touch-action":"none"})}),s(n.prototype,"setDOMEvents",function(e){e.apply(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(m)}),s(n.prototype,"destroy",function(e){this.batchMSEvents(h),e.call(this)})}}(t),function(e){var r=e.addEvent,d=e.css,l=e.discardElement,i=e.defined,t=e.each,o=e.fireEvent,c=e.isFirefox,a=e.marginNames,s=e.merge,n=e.pick,u=e.setAnimation,h=e.stableSort,m=e.win,f=e.wrap;e.Legend=function(e,t){this.init(e,t)},e.Legend.prototype={init:function(e,t){this.chart=e,this.setOptions(t),t.enabled&&(this.render(),r(this.chart,"endResize",function(){this.legend.positionCheckboxes()}))},setOptions:function(e){var t=n(e.padding,8);this.options=e,this.itemStyle=e.itemStyle,this.itemHiddenStyle=s(this.itemStyle,e.itemHiddenStyle),this.itemMarginTop=e.itemMarginTop||0,this.padding=t,this.initialItemY=t-5,this.symbolWidth=n(e.symbolWidth,16),this.pages=[]},update:function(e,t){var i=this.chart;this.setOptions(s(!0,this.options,e)),this.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,n(t,!0)&&i.redraw(),o(this,"afterUpdate")},colorizeItem:function(e,t){e.legendGroup[t?"removeClass":"addClass"]("highcharts-legend-item-hidden");var n=this.options,r=e.legendItem,c=e.legendLine,a=e.legendSymbol,s=this.itemHiddenStyle.color,n=t?n.itemStyle.color:s,l=t?e.color||s:s,d=e.options&&e.options.marker,i={fill:l};r&&r.css({fill:n,color:n}),c&&c.attr({stroke:l}),a&&(d&&a.isMarker&&(i=e.pointAttribs(),t||(i.stroke=i.fill=s)),a.attr(i)),o(this,"afterColorizeItem",{item:e,visible:t})},positionItem:function(e){var n=this.options,i=n.symbolPadding,n=!n.rtl,t=e._legendItemPos,s=t[0],t=t[1],o=e.checkbox;(e=e.legendGroup)&&e.element&&e.translate(n?s:this.legendWidth-s-2*i-4,t),o&&(o.x=s,o.y=t)},destroyItem:function(e){var n=e.checkbox;t(["legendItem","legendLine","legendSymbol","legendGroup"],function(t){e[t]&&(e[t]=e[t].destroy())}),n&&l(e.checkbox)},destroy:function(){function e(e){this[e]&&(this[e]=this[e].destroy())}t(this.getAllItems(),function(n){t(["legendItem","legendGroup"],e,n)}),t("clipRect up down pager nav box title group".split(" "),e,this),this.display=null},positionCheckboxes:function(){var e,n=this.group&&this.group.alignAttr,s=this.clipHeight||this.legendHeight,o=this.titleHeight;n&&(e=n.translateY,t(this.allItems,function(t){var a,i=t.checkbox;i&&(a=e+o+i.y+(this.scrollOffset||0)+3,d(i,{left:n.translateX+t.checkboxOffset+i.x-20+"px",top:a+"px",display:a>e-6&&a<e+s-6?"":"none"}))},this))},renderTitle:function(){var e=this.options,s=this.padding,t=e.title,n=0;t.text&&(this.title||(this.title=this.chart.renderer.label(t.text,s-3,s-4,null,null,null,e.useHTML,null,"legend-title").attr({zIndex:1}).css(t.style).add(this.group)),e=this.title.getBBox(),n=e.height,this.offsetWidth=e.width,this.contentGroup.attr({translateY:n})),this.titleHeight=n},setText:function(t){var n=this.options;t.legendItem.attr({text:n.labelFormat?e.format(n.labelFormat,t,this.chart.time):n.labelFormatter.call(t)})},renderItem:function(e){var a=this.chart,h=a.renderer,t=this.options,r=this.symbolWidth,d=t.symbolPadding,l=this.itemStyle,v=this.itemHiddenStyle,c="horizontal"===t.layout?n(t.itemDistance,20):0,m=!t.rtl,o=e.legendItem,f=!e.series,u=!f&&e.series.drawLegendSymbol?e.series:e,i=u.options,i=this.createCheckboxForItem&&i&&i.showCheckbox,c=r+d+c+(i?20:0),p=t.useHTML,g=e.options.className;o||(e.legendGroup=h.g("legend-item").addClass("highcharts-"+u.type+"-series highcharts-color-"+e.colorIndex+(g?" "+g:"")+(f?" highcharts-series-"+e.index:"")).attr({zIndex:1}).add(this.scrollGroup),e.legendItem=o=h.text("",m?r+d:-d,this.baseline||0,p).css(s(e.visible?l:v)).attr({align:m?"left":"right",zIndex:2}).add(e.legendGroup),this.baseline||(r=l.fontSize,this.fontMetrics=h.fontMetrics(r,o),this.baseline=this.fontMetrics.f+3+this.itemMarginTop,o.attr("y",this.baseline)),this.symbolHeight=t.symbolHeight||this.fontMetrics.f,u.drawLegendSymbol(this,e),this.setItemEvents&&this.setItemEvents(e,o,p),i&&this.createCheckboxForItem(e)),this.colorizeItem(e,e.visible),l.width||o.css({width:(t.itemWidth||t.width||a.spacingBox.width)-c}),this.setText(e),a=o.getBBox(),e.itemWidth=e.checkboxOffset=t.itemWidth||e.legendItemWidth||a.width+c,this.maxItemWidth=Math.max(this.maxItemWidth,e.itemWidth),this.totalItemWidth+=e.itemWidth,this.itemHeight=e.itemHeight=Math.round(e.legendItemHeight||a.height||this.symbolHeight)},layoutItem:function(e){var t=this.options,s=this.padding,o="horizontal"===t.layout,i=e.itemHeight,a=t.itemMarginBottom||0,r=this.itemMarginTop,d=o?n(t.itemDistance,20):0,c=t.width,l=c||this.chart.spacingBox.width-2*s-t.x,t=t.alignColumns&&this.totalItemWidth>l?this.maxItemWidth:e.itemWidth;o&&this.itemX-s+t>l&&(this.itemX=s,this.itemY+=r+this.lastLineHeight+a,this.lastLineHeight=0),this.lastItemY=r+this.itemY+a,this.lastLineHeight=Math.max(i,this.lastLineHeight),e._legendItemPos=[this.itemX,this.itemY],o?this.itemX+=t:(this.itemY+=r+i+a,this.lastLineHeight=i),this.offsetWidth=c||Math.max((o?this.itemX-s-(e.checkbox?0:d):t)+s,this.offsetWidth)},getAllItems:function(){var e=[];return t(this.chart.series,function(t){var s=t&&t.options;t&&n(s.showInLegend,!i(s.linkedTo)&&void 0,!0)&&(e=e.concat(t.legendItems||("point"===s.legendType?t.data:t)))}),o(this,"afterGetAllItems",{allItems:e}),e},getAlignment:function(){var e=this.options;return e.floating?"":e.align.charAt(0)+e.verticalAlign.charAt(0)+e.layout.charAt(0)},adjustMargins:function(e,s){var o=this.chart,r=this.options,c=this.getAlignment();c&&t([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(t,l){t.test(c)&&!i(e[l])&&(o[a[l]]=Math.max(o[a[l]],o.legend[(l+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][l]*r[l%2?"x":"y"]+n(r.margin,12)+s[l]+(0===l&&void 0!==o.options.title.margin?o.titleOffset+o.options.title.margin:0)))})},render:function(){var o,i,l,d,r=this.chart,n=r.renderer,c=this.group,e=this.box,a=this.options,u=this.padding;this.itemX=u,this.itemY=this.initialItemY,this.lastItemY=this.offsetWidth=0,c||(this.group=c=n.g("legend").attr({zIndex:7}).add(),this.contentGroup=n.g().attr({zIndex:1}).add(c),this.scrollGroup=n.g().add(this.contentGroup)),this.renderTitle(),o=this.getAllItems(),h(o,function(e,t){return(e.options&&e.options.legendIndex||0)-(t.options&&t.options.legendIndex||0)}),a.reversed&&o.reverse(),this.allItems=o,this.display=d=!!o.length,this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0,t(o,this.renderItem,this),t(o,this.layoutItem,this),l=(a.width||this.offsetWidth)+u,i=this.lastItemY+this.lastLineHeight+this.titleHeight,i=this.handleOverflow(i),i+=u,e||(this.box=e=n.rect().addClass("highcharts-legend-box").attr({r:a.borderRadius}).add(c),e.isNew=!0),e.attr({stroke:a.borderColor,"stroke-width":a.borderWidth||0,fill:a.backgroundColor||"none"}).shadow(a.shadow),0<l&&0<i&&(e[e.isNew?"attr":"animate"](e.crisp.call({},{x:0,y:0,width:l,height:i},e.strokeWidth())),e.isNew=!1),e[d?"show":"hide"](),this.legendWidth=l,this.legendHeight=i,t(o,this.positionItem,this),d&&(n=r.spacingBox,/(lth|ct|rth)/.test(this.getAlignment())&&(n=s(n,{y:n.y+r.titleOffset+r.options.title.margin})),c.align(s(a,{width:l,height:i}),!0,n)),r.isResizing||this.positionCheckboxes()},handleOverflow:function(e){var h,m,o=this,s=this.chart,u=s.renderer,a=this.options,l=a.y,d=this.padding,s=s.spacingBox.height+("top"===a.verticalAlign?-l:l)-d,l=a.maxHeight,c=this.clipRect,f=a.navigation,v=n(f.animation,!0),p=f.arrowSize||12,r=this.nav,i=this.pages,g=this.allItems,b=function(e){"number"==typeof e?c.attr({height:e}):c&&(o.clipRect=c.destroy(),o.contentGroup.clip()),o.contentGroup.div&&(o.contentGroup.div.style.clip=e?"rect("+d+"px,9999px,"+(d+e)+"px,0)":"auto")};return"horizontal"!==a.layout||"middle"===a.verticalAlign||a.floating||(s/=2),l&&(s=Math.min(s,l)),i.length=0,e>s&&!1!==f.enabled?(this.clipHeight=m=Math.max(s-20-this.titleHeight-d,0),this.currentPage=n(this.currentPage,1),this.fullHeight=e,t(g,function(e,t){var s=e._legendItemPos[1],o=Math.round(e.legendItem.getBBox().height),n=i.length;(!n||s-i[n-1]>m&&(h||s)!==i[n-1])&&(i.push(h||s),n++),e.pageIx=n-1,h&&(g[t-1].pageIx=n-1),t===g.length-1&&s+o-i[n-1]>m&&(i.push(s),e.pageIx=n),s!==h&&(h=s)}),c||(c=o.clipRect=u.clipRect(0,d,9999,0),o.contentGroup.clip(c)),b(m),r||(this.nav=r=u.g().attr({zIndex:1}).add(this.group),this.up=u.symbol("triangle",0,0,p,p).on("click",function(){o.scroll(-1,v)}).add(r),this.pager=u.text("",15,10).addClass("highcharts-legend-navigation").css(f.style).add(r),this.down=u.symbol("triangle-down",0,0,p,p).on("click",function(){o.scroll(1,v)}).add(r)),o.scroll(0),e=s):r&&(b(),this.nav=r.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),e},scroll:function(e,t){o=this.pages,n=o.length,e=this.currentPage+e;var n,o,i=this.clipHeight,s=this.options.navigation,a=this.pager,r=this.padding;e>n&&(e=n),0<e&&(void 0!==t&&u(t,this.chart),this.nav.attr({translateX:r,translateY:i+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({class:1===e?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),a.attr({text:e+"/"+n}),this.down.attr({x:18+this.pager.getBBox().width,class:e===n?"highcharts-legend-nav-inactive":"highcharts-legend-nav-active"}),this.up.attr({fill:1===e?s.inactiveColor:s.activeColor}).css({cursor:1===e?"default":"pointer"}),this.down.attr({fill:e===n?s.inactiveColor:s.activeColor}).css({cursor:e===n?"default":"pointer"}),this.scrollOffset=-o[e-1]+this.initialItemY,this.scrollGroup.animate({translateY:this.scrollOffset}),this.currentPage=e,this.positionCheckboxes())}},e.LegendSymbolMixin={drawRectangle:function(e,t){var s=e.symbolHeight,o=e.options.squareSymbol;t.legendSymbol=this.chart.renderer.rect(o?(e.symbolWidth-s)/2:0,e.baseline-s+1,o?s:e.symbolWidth,s,n(e.options.symbolRadius,s/2)).addClass("highcharts-point").attr({zIndex:3}).add(t.legendGroup)},drawLineMarker:function(e){var a,t=this.options,o=t.marker,r=e.symbolWidth,i=e.symbolHeight,c=i/2,l=this.chart.renderer,d=this.legendGroup;e=e.baseline-Math.round(.3*e.fontMetrics.b),a={"stroke-width":t.lineWidth||0},t.dashStyle&&(a.dashstyle=t.dashStyle),this.legendLine=l.path(["M",0,e,"L",r,e]).addClass("highcharts-graph").attr(a).add(d),o&&!1!==o.enabled&&(t=Math.min(n(o.radius,c),c),0===this.symbol.indexOf("url")&&(o=s(o,{width:i,height:i}),t=0),this.legendSymbol=o=l.symbol(this.symbol,r/2-t,e-t,2*t,2*t,o).addClass("highcharts-point").add(d),o.isMarker=!0)}},(/Trident\/7\.0/.test(m.navigator.userAgent)||c)&&f(e.Legend.prototype,"positionItem",function(e,t){var s=this,n=function(){t._legendItemPos&&e.call(s,t)};n(),setTimeout(n)})}(t),function(e){var h=e.addEvent,T=e.animate,S=e.animObject,_=e.attr,i=e.doc,E=e.Axis,C=e.createElement,x=e.defaultOptions,M=e.discardElement,s=e.charts,A=e.css,o=e.defined,t=e.each,a=e.extend,m=e.find,n=e.fireEvent,v=e.grep,z=e.isNumber,F=e.isObject,u=e.isString,k=e.Legend,w=e.marginNames,r=e.merge,O=e.objectEach,p=e.Pointer,l=e.pick,d=e.pInt,g=e.removeEvent,f=e.seriesTypes,y=e.splat,j=e.syncTimeout,c=e.win,b=e.Chart=function(){this.getArgs.apply(this,arguments)};e.chart=function(e,t,n){return new b(e,t,n)},a(b.prototype,{callbacks:[],getArgs:function(){var e=[].slice.call(arguments);(u(e[0])||e[0].nodeName)&&(this.renderTo=e.shift()),this.init(e[0],e[1])},init:function(t,o){var i,a,l=t.series,c=t.plotOptions||{};n(this,"init",{args:arguments},function(){t.series=null,i=r(x,t);for(a in i.plotOptions)i.plotOptions[a].tooltip=c[a]&&r(c[a].tooltip)||void 0;i.tooltip.userOptions=t.chart&&t.chart.forExport&&t.tooltip.userOptions||t.tooltip,i.series=t.series=l,this.userOptions=t;var d,u=i.chart,m=u.events;this.margin=[],this.spacing=[],this.bounds={h:{},v:{}},this.labelCollectors=[],this.callback=o,this.isResizing=0,this.options=i,this.axes=[],this.series=[],this.time=t.time&&e.keys(t.time).length?new e.Time(t.time):e.time,this.hasCartesianSeries=u.showAxes,d=this,d.index=s.length,s.push(d),e.chartCount++,m&&O(m,function(e,t){h(d,t,e)}),d.xAxis=[],d.yAxis=[],d.pointCount=d.colorCounter=d.symbolCounter=0,n(d,"afterInit"),d.firstRender()})},initSeries:function(t){var n=this.options.chart;return(n=f[t.type||n.type||n.defaultSeriesType])||e.error(17,!0),n=new n,n.init(this,t),n},orderSeries:function(e){var t=this.series;for(e=e||0;e<t.length;e++)t[e]&&(t[e].index=e,t[e].name=t[e].getName())},isInsidePlot:function(e,t,n){var s=n?t:e;return e=n?e:t,0<=s&&s<=this.plotWidth&&0<=e&&e<=this.plotHeight},redraw:function(s){n(this,"beforeRedraw");var i,c,u,l=this.axes,o=this.series,f=this.pointer,d=this.legend,m=this.isDirtyLegend,h=this.hasCartesianSeries,r=this.isDirtyBox,p=this.renderer,g=p.isHidden(),v=[];this.setResponsive&&this.setResponsive(!1),e.setAnimation(s,this),g&&this.temporaryDisplay(),this.layOutTitles();for(s=o.length;s--;)if(i=o[s],i.options.stacking&&(c=!0,i.isDirty)){u=!0;break}if(u)for(s=o.length;s--;)i=o[s],i.options.stacking&&(i.isDirty=!0);t(o,function(e){e.isDirty&&"point"===e.options.legendType&&(e.updateTotals&&e.updateTotals(),m=!0),e.isDirtyData&&n(e,"updatedData")}),m&&d.options.enabled&&(d.render(),this.isDirtyLegend=!1),c&&this.getStacks(),h&&t(l,function(e){e.updateNames(),e.setScale()}),this.getMargins(),h&&(t(l,function(e){e.isDirty&&(r=!0)}),t(l,function(e){var t=e.min+","+e.max;e.extKey!==t&&(e.extKey=t,v.push(function(){n(e,"afterSetExtremes",a(e.eventArgs,e.getExtremes())),delete e.eventArgs})),(r||c)&&e.redraw()})),r&&this.drawChartBox(),n(this,"predraw"),t(o,function(e){(r||e.isDirty)&&e.visible&&e.redraw(),e.isDirtyData=!1}),f&&f.reset(!0),p.draw(),n(this,"redraw"),n(this,"render"),g&&this.temporaryDisplay(!0),t(v,function(e){e.call()})},get:function(e){function n(t){return t.id===e||t.options&&t.options.id===e}var t,o=this.series,s=m(this.axes,n)||m(this.series,n);for(t=0;!s&&t<o.length;t++)s=m(o[t].points||[],n);return s},getAxes:function(){var o=this,e=this.options,s=e.xAxis=y(e.xAxis||{}),e=e.yAxis=y(e.yAxis||{});n(this,"getAxes"),t(s,function(e,t){e.index=t,e.isX=!0}),t(e,function(e,t){e.index=t}),s=s.concat(e),t(s,function(e){new E(o,e)}),n(this,"afterGetAxes")},getSelectedPoints:function(){var e=[];return t(this.series,function(t){e=e.concat(v(t.data||[],function(e){return e.selected}))}),e},getSelectedSeries:function(){return v(this.series,function(e){return e.selected})},setTitle:function(e,n,s){var o=this,i=o.options,a=i.title=r({style:{color:"#333333",fontSize:i.isStock?"16px":"18px"}},i.title,e),i=i.subtitle=r({style:{color:"#666666"}},i.subtitle,n);t([["title",e,a],["subtitle",n,i]],function(e,t){var n=e[0],s=o[n],i=e[1];e=e[2],s&&i&&(o[n]=s=s.destroy()),e&&!s&&(o[n]=o.renderer.text(e.text,0,0,e.useHTML).attr({align:e.align,class:"highcharts-"+n,zIndex:e.zIndex||4}).add(),o[n].update=function(e){o.setTitle(!t&&e,t&&e)},o[n].css(e.style))}),o.layOutTitles(s)},layOutTitles:function(e){var s,n=0,o=this.renderer,i=this.spacingBox;t(["title","subtitle"],function(e){var r,s=this[e],t=this.options[e];e="title"===e?-3:t.verticalAlign?0:n+2,s&&(r=t.style.fontSize,r=o.fontMetrics(r,s).b,s.css({width:(t.width||i.width+t.widthAdjust)+"px"}).align(a({y:e+r},t),!1,"spacingBox"),t.floating||t.verticalAlign||(n=Math.ceil(n+s.getBBox(t.useHTML).height)))},this),s=this.titleOffset!==n,this.titleOffset=n,!this.isDirtyBox&&s&&(this.isDirtyBox=this.isDirtyLegend=s,this.hasRendered&&l(e,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var t=this.options.chart,n=t.width,t=t.height,s=this.renderTo;o(n)||(this.containerWidth=e.getStyle(s,"width")),o(t)||(this.containerHeight=e.getStyle(s,"height")),this.chartWidth=Math.max(0,n||this.containerWidth||600),this.chartHeight=Math.max(0,e.relativeLength(t,this.chartWidth)||(1<this.containerHeight?this.containerHeight:400))},temporaryDisplay:function(t){var n=this.renderTo;if(t)for(;n&&n.style;)n.hcOrigStyle&&(e.css(n,n.hcOrigStyle),delete n.hcOrigStyle),n.hcOrigDetached&&(i.body.removeChild(n),n.hcOrigDetached=!1),n=n.parentNode;else for(;n&&n.style;)if(i.body.contains(n)||n.parentNode||(n.hcOrigDetached=!0,i.body.appendChild(n)),("none"===e.getStyle(n,"display",!1)||n.hcOricDetached)&&(n.hcOrigStyle={display:n.style.display,height:n.style.height,overflow:n.style.overflow},t={display:"block",overflow:"hidden"},n!==this.renderTo&&(t.height=0),e.css(n,t),n.offsetWidth||n.style.setProperty("display","block","important")),n=n.parentNode,n===i.body)break},setClassName:function(e){this.container.className="highcharts-container "+(e||"")},getContainer:function(){var o,l,m,c=this.options,r=c.chart,t=this.renderTo,h=e.uniqueKey();t||(this.renderTo=t=r.renderTo),u(t)&&(this.renderTo=t=i.getElementById(t)),t||e.error(13,!0),o=d(_(t,"data-highcharts-chart")),z(o)&&s[o]&&s[o].hasRendered&&s[o].destroy(),_(t,"data-highcharts-chart",this.index),t.innerHTML="",r.skipClone||t.offsetWidth||this.temporaryDisplay(),this.getChartSize(),o=this.chartWidth,l=this.chartHeight,m=a({position:"relative",overflow:"hidden",width:o+"px",height:l+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},r.style),this.container=t=C("div",{id:h},m,t),this._cursor=t.style.cursor,this.renderer=new(e[r.renderer]||e.Renderer)(t,o,l,null,r.forExport,c.exporting&&c.exporting.allowHTML),this.setClassName(r.className),this.renderer.setStyle(r.style),this.renderer.chartIndex=this.index,n(this,"afterGetContainer")},getMargins:function(e){var t=this.spacing,n=this.margin,s=this.titleOffset;this.resetMargins(),s&&!o(n[0])&&(this.plotTop=Math.max(this.plotTop,s+this.options.title.margin+t[0])),this.legend&&this.legend.display&&this.legend.adjustMargins(n,t),this.extraMargin&&(this[this.extraMargin.type]=(this[this.extraMargin.type]||0)+this.extraMargin.value),this.adjustPlotArea&&this.adjustPlotArea(),e||this.getAxisMargins()},getAxisMargins:function(){var e=this,n=e.axisOffset=[0,0,0,0],s=e.margin;e.hasCartesianSeries&&t(e.axes,function(e){e.visible&&e.getOffset()}),t(w,function(t,i){o(s[i])||(e[t]+=n[i])}),e.setChartSize()},reflow:function(t){var n=this,s=n.options.chart,a=n.renderTo,l=o(s.width)&&o(s.height),r=s.width||e.getStyle(a,"width"),s=s.height||e.getStyle(a,"height"),a=t?t.target:c;!l&&!n.isPrinting&&r&&s&&(a===c||a===i)&&((r!==n.containerWidth||s!==n.containerHeight)&&(e.clearTimeout(n.reflowTimeout),n.reflowTimeout=j(function(){n.container&&n.setSize(void 0,void 0,!1)},t?100:0)),n.containerWidth=r,n.containerHeight=s)},setReflow:function(e){var t=this;!1===e||this.unbindReflow?!1===e&&this.unbindReflow&&(this.unbindReflow=this.unbindReflow()):(this.unbindReflow=h(c,"resize",function(e){t.reflow(e)}),h(this,"destroy",this.unbindReflow))},setSize:function(s,o,i){var a=this,r=a.renderer;a.isResizing+=1,e.setAnimation(i,a),a.oldChartHeight=a.chartHeight,a.oldChartWidth=a.chartWidth,void 0!==s&&(a.options.chart.width=s),void 0!==o&&(a.options.chart.height=o),a.getChartSize(),s=r.globalAnimation,(s?T:A)(a.container,{width:a.chartWidth+"px",height:a.chartHeight+"px"},s),a.setChartSize(!0),r.setSize(a.chartWidth,a.chartHeight,i),t(a.axes,function(e){e.isDirty=!0,e.setScale()}),a.isDirtyLegend=!0,a.isDirtyBox=!0,a.layOutTitles(),a.getMargins(),a.redraw(i),a.oldChartHeight=null,n(a,"resize"),j(function(){a&&n(a,"endResize",null,function(){--a.isResizing})},S(s).duration)},setChartSize:function(e){var c,l,d,u,i=this.inverted,a=this.renderer,s=this.chartWidth,h=this.chartHeight,m=this.options.chart,o=this.spacing,r=this.clipOffset;this.plotLeft=d=Math.round(this.plotLeft),this.plotTop=u=Math.round(this.plotTop),this.plotWidth=c=Math.max(0,Math.round(s-d-this.marginRight)),this.plotHeight=l=Math.max(0,Math.round(h-u-this.marginBottom)),this.plotSizeX=i?l:c,this.plotSizeY=i?c:l,this.plotBorderWidth=m.plotBorderWidth||0,this.spacingBox=a.spacingBox={x:o[3],y:o[0],width:s-o[3]-o[1],height:h-o[0]-o[2]},this.plotBox=a.plotBox={x:d,y:u,width:c,height:l},s=2*Math.floor(this.plotBorderWidth/2),i=Math.ceil(Math.max(s,r[3])/2),a=Math.ceil(Math.max(s,r[0])/2),this.clipBox={x:i,y:a,width:Math.floor(this.plotSizeX-Math.max(s,r[1])/2-i),height:Math.max(0,Math.floor(this.plotSizeY-Math.max(s,r[2])/2-a))},e||t(this.axes,function(e){e.setAxisSize(),e.setAxisTranslation()}),n(this,"afterSetChartSize",{skipAxes:e})},resetMargins:function(){var e=this,n=e.options.chart;t(["margin","spacing"],function(s){var o=n[s],i=F(o)?o:[o,o,o,o];t(["Top","Right","Bottom","Left"],function(t,o){e[s][o]=l(n[s+t],i[o])})}),t(w,function(t,n){e[t]=l(e.margin[n],e.spacing[n])}),e.axisOffset=[0,0,0,0],e.clipOffset=[0,0,0,0]},drawChartBox:function(){var o,i,e=this.options.chart,a=this.renderer,_=this.chartWidth,y=this.chartHeight,r=this.chartBackground,l=this.plotBackground,s=this.plotBorder,p=this.plotBGImage,c=e.backgroundColor,j=e.plotBackgroundColor,h=e.plotBackgroundImage,m=this.plotLeft,f=this.plotTop,u=this.plotWidth,g=this.plotHeight,v=this.plotBox,b=this.clipRect,d=this.clipBox,t="animate";r||(this.chartBackground=r=a.rect().addClass("highcharts-background").add(),t="attr"),o=e.borderWidth||0,i=o+(e.shadow?8:0),c={fill:c||"none"},(o||r["stroke-width"])&&(c.stroke=e.borderColor,c["stroke-width"]=o),r.attr(c).shadow(e.shadow),r[t]({x:i/2,y:i/2,width:_-i-o%2,height:y-i-o%2,r:e.borderRadius}),t="animate",l||(t="attr",this.plotBackground=l=a.rect().addClass("highcharts-plot-background").add()),l[t](v),l.attr({fill:j||"none"}).shadow(e.plotShadow),h&&(p?p.animate(v):this.plotBGImage=a.image(h,m,f,u,g).add()),b?b.animate({width:d.width,height:d.height}):this.clipRect=a.clipRect(d),t="animate",s||(t="attr",this.plotBorder=s=a.rect().addClass("highcharts-plot-border").attr({zIndex:1}).add()),s.attr({stroke:e.plotBorderColor,"stroke-width":e.plotBorderWidth||0,fill:"none"}),s[t](s.crisp({x:m,y:f,width:u,height:g},-s.strokeWidth())),this.isDirtyBox=!1,n(this,"afterDrawChartBox")},propFromSeries:function(){var e,n,a,s=this,o=s.options.chart,i=s.options.series;t(["inverted","angular","polar"],function(t){e=f[o.type||o.defaultSeriesType],n=o[t]||e&&e.prototype[t];for(a=i&&i.length;!n&&a--;)(e=f[i[a].type])&&e.prototype[t]&&(n=!0);s[t]=n})},linkSeries:function(){var e=this,s=e.series;t(s,function(e){e.linkedSeries.length=0}),t(s,function(t){var n=t.options.linkedTo;u(n)&&(n=":previous"===n?e.series[t.index-1]:e.get(n))&&n.linkedParent!==t&&(n.linkedSeries.push(t),t.linkedParent=n,t.visible=l(t.options.visible,n.options.visible,t.visible))}),n(this,"afterLinkSeries")},renderSeries:function(){t(this.series,function(e){e.translate(),e.render()})},renderLabels:function(){var e=this,n=e.options.labels;n.items&&t(n.items,function(t){var s=a(n.style,t.style),o=d(s.left)+e.plotLeft,i=d(s.top)+e.plotTop+12;delete s.left,delete s.top,e.renderer.text(t.html,o,i).attr({zIndex:2}).css(s).add()})},render:function(){var s,o,i,e=this.axes,a=this.renderer,n=this.options;this.setTitle(),this.legend=new k(this,n.legend),this.getStacks&&this.getStacks(),this.getMargins(!0),this.setChartSize(),n=this.plotWidth,i=this.plotHeight=Math.max(this.plotHeight-21,0),t(e,function(e){e.setScale()}),this.getAxisMargins(),s=1.1<n/this.plotWidth,o=1.05<i/this.plotHeight,(s||o)&&(t(e,function(e){(e.horiz&&s||!e.horiz&&o)&&e.setTickInterval(!0)}),this.getMargins()),this.drawChartBox(),this.hasCartesianSeries&&t(e,function(e){e.visible&&e.render()}),this.seriesGroup||(this.seriesGroup=a.g("series-group").attr({zIndex:3}).add()),this.renderSeries(),this.renderLabels(),this.addCredits(),this.setResponsive&&this.setResponsive(),this.hasRendered=!0},addCredits:function(e){var t=this;e=r(!0,this.options.credits,e),e.enabled&&!this.credits&&(this.credits=this.renderer.text(e.text+(this.mapCredits||""),0,0).addClass("highcharts-credits").on("click",function(){e.href&&(c.location.href=e.href)}).attr({align:e.position.align,zIndex:8}).css(e.style).add().align(e.position),this.credits.update=function(e){t.credits=t.credits.destroy(),t.addCredits(e)})},destroy:function(){var i,o=this,r=o.axes,c=o.series,a=o.container,l=a&&a.parentNode;n(o,"destroy"),o.renderer.forExport?e.erase(s,o):s[o.index]=void 0,e.chartCount--,o.renderTo.removeAttribute("data-highcharts-chart"),g(o);for(i=r.length;i--;)r[i]=r[i].destroy();this.scroller&&this.scroller.destroy&&this.scroller.destroy();for(i=c.length;i--;)c[i]=c[i].destroy();t("title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" "),function(e){var t=o[e];t&&t.destroy&&(o[e]=t.destroy())}),a&&(a.innerHTML="",g(a),l&&M(a)),O(o,function(e,t){delete o[t]})},firstRender:function(){var e=this,s=e.options;(!e.isReadyToRender||e.isReadyToRender())&&(e.getContainer(),e.resetMargins(),e.setChartSize(),e.propFromSeries(),e.getAxes(),t(s.series||[],function(t){e.initSeries(t)}),e.linkSeries(),n(e,"beforeRender"),p&&(e.pointer=new p(e,s)),e.render(),!e.renderer.imgCount&&e.onload&&e.onload(),e.temporaryDisplay(!0))},onload:function(){t([this.callback].concat(this.callbacks),function(e){e&&void 0!==this.index&&e.apply(this,[this])},this),n(this,"load"),n(this,"render"),o(this.index)&&this.setReflow(this.options.chart.reflow),this.onload=null}})}(t),function(e){var n=e.addEvent,t=e.Chart,s=e.each;n(t,"afterSetChartSize",function(t){var n=this.options.chart.scrollablePlotArea;(n=n&&n.minWidth)&&(this.scrollablePixels=n=Math.max(0,n-this.chartWidth))&&(this.plotWidth+=n,this.clipBox.width+=n,t.skipAxes||s(this.axes,function(t){1===t.side?t.getPlotLinePath=function(){var s,n=this.right;return this.right=n-t.chart.scrollablePixels,s=e.Axis.prototype.getPlotLinePath.apply(this,arguments),this.right=n,s}:(t.setAxisSize(),t.setAxisTranslation())}))}),n(t,"render",function(){this.scrollablePixels?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()}),t.prototype.setUpScrolling=function(){this.scrollingContainer=e.createElement("div",{className:"highcharts-scrolling"},{overflowX:"auto",WebkitOverflowScrolling:"touch"},this.renderTo),this.innerContainer=e.createElement("div",{className:"highcharts-inner-container"},null,this.scrollingContainer),this.innerContainer.appendChild(this.container),this.setUpScrolling=null},t.prototype.applyFixed=function(){o=this.container,this.fixedDiv||(this.fixedDiv=e.createElement("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:2},null,!0),this.renderTo.insertBefore(this.fixedDiv,this.renderTo.firstChild),this.fixedRenderer=s=new e.Renderer(this.fixedDiv,0,0),this.scrollableMask=s.path().attr({fill:e.color(this.options.chart.backgroundColor||"#fff").setOpacity(.85).get(),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),e.each([this.inverted?".highcharts-xaxis":".highcharts-yaxis",this.inverted?".highcharts-xaxis-labels":".highcharts-yaxis-labels",".highcharts-contextbutton",".highcharts-credits",".highcharts-legend",".highcharts-subtitle",".highcharts-title"],function(t){e.each(o.querySelectorAll(t),function(e){s.box.appendChild(e),e.style.pointerEvents="auto"})})),this.fixedRenderer.setSize(this.chartWidth,this.chartHeight),t=this.chartWidth+this.scrollablePixels,this.container.style.width=t+"px",this.renderer.boxWrapper.attr({width:t,height:this.chartHeight,viewBox:[0,0,t,this.chartHeight].join(" ")}),t=this.options.chart.scrollablePlotArea,t.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixels*t.scrollPositionX);var s,o,n=this.axisOffset,t=this.plotTop-n[0]-1,n=this.plotTop+this.plotHeight+n[2],i=this.plotLeft+this.plotWidth-this.scrollablePixels;this.scrollableMask.attr({d:this.scrollablePixels?["M",0,t,"L",this.plotLeft-1,t,"L",this.plotLeft-1,n,"L",0,n,"Z","M",i,t,"L",this.chartWidth,t,"L",this.chartWidth,n,"L",i,n,"Z"]:["M",0,0]})}}(t),function(e){var n,a=e.each,s=e.extend,r=e.erase,o=e.fireEvent,c=e.format,l=e.isArray,i=e.isNumber,t=e.pick,d=e.removeEvent;e.Point=n=function(){},e.Point.prototype={init:function(e,n,s){return this.series=e,this.color=e.color,this.applyOptions(n,s),e.options.colorByPoint?(n=e.options.colors||e.chart.options.colors,this.color=this.color||n[e.colorCounter],n=n.length,s=e.colorCounter,e.colorCounter++,e.colorCounter===n&&(e.colorCounter=0)):s=e.colorIndex,this.colorIndex=t(this.colorIndex,s),e.chart.pointCount++,o(this,"afterInit"),this},applyOptions:function(e,o){var a=this.series,r=a.options.pointValKey||a.pointValKey;return e=n.prototype.optionsToObject.call(this,e),s(this,e),this.options=this.options?s(this.options,e):e,e.group&&delete this.group,r&&(this.y=this[r]),this.isNull=t(this.isValid&&!this.isValid(),null===this.x||!i(this.y,!0)),this.selected&&(this.state="select"),"name"in this&&void 0===o&&a.xAxis&&a.xAxis.hasNames&&(this.x=a.xAxis.nameToX(this)),void 0===this.x&&a&&(this.x=void 0===o?a.autoIncrement(this):o),this},setNestedProperty:function(t,n,s){return s=s.split("."),e.reduce(s,function(t,s,o,i){return t[s]=i.length-1===o?n:e.isObject(t[s],!0)?t[s]:{},t[s]},t),t},optionsToObject:function(t){var n={},s=this.series,c=s.options.keys,o=c||s.pointArrayMap||["y"],d=o.length,a=0,r=0;if(i(t)||null===t)n[o[0]]=t;else if(l(t))for(!c&&t.length>d&&(s=typeof t[0],"string"===s?n.name=t[0]:"number"===s&&(n.x=t[0]),a++);r<d;)c&&void 0===t[a]||(0<o[r].indexOf(".")?e.Point.prototype.setNestedProperty(n,t[a],o[r]):n[o[r]]=t[a]),a++,r++;else"object"==typeof t&&(n=t,t.dataLabels&&(s._hasPointLabels=!0),t.marker&&(s._hasPointMarkers=!0));return n},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",""):"")},getZone:function(){var e,t=this.series,n=t.zones,t=t.zoneAxis||"y",s=0;for(e=n[s];this[t]>=e.value;)e=n[++s];return this.nonZonedColor||(this.nonZonedColor=this.color),this.color=e&&e.color&&!this.options.color?e.color:this.nonZonedColor,e},destroy:function(){var n,e=this.series.chart,t=e.hoverPoints;e.pointCount--,t&&(this.setState(),r(t,this),t.length||(e.hoverPoints=null)),this===e.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel)&&(d(this),this.destroyElements()),this.legendItem&&e.legend.destroyItem(this);for(n in this)this[n]=null},destroyElements:function(){for(var e,n=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],t=6;t--;)e=n[t],this[e]&&(this[e]=this[e].destroy())},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}},tooltipFormatter:function(e){var n=this.series,s=n.tooltipOptions,r=t(s.valueDecimals,""),o=s.valuePrefix||"",i=s.valueSuffix||"";return a(n.pointArrayMap||["y"],function(t){t="{point."+t,(o||i)&&(e=e.replace(RegExp(t+"}","g"),o+t+"}"+i)),e=e.replace(RegExp(t+"}","g"),t+":,."+r+"f}")}),c(e,{point:this,series:this.series},n.chart.time)},firePointEvent:function(e,t,n){var s=this,i=this.series.options;(i.point.events[e]||s.options&&s.options.events&&s.options.events[e])&&this.importEvents(),"click"===e&&i.allowPointSelect&&(n=function(e){s.select&&s.select(null,e.ctrlKey||e.metaKey||e.shiftKey)}),o(this,e,t,n)},visible:!0}}(t),function(e){var r=e.addEvent,h=e.animObject,O=e.arrayMax,j=e.arrayMin,l=e.correctFloat,a=e.defaultOptions,p=e.defaultPlotOptions,s=e.defined,n=e.each,u=e.erase,b=e.extend,i=e.fireEvent,v=e.grep,f=e.isArray,o=e.isNumber,g=e.isString,m=e.merge,c=e.objectEach,t=e.pick,y=e.removeEvent,_=e.splat,w=e.SVGElement,d=e.syncTimeout,x=e.win;e.Series=e.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1e3},events:{},marker:{lineWidth:0,lineColor:"#ffffff",enabledThreshold:2,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":e.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"},{isCartesian:!0,pointClass:e.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(e,s){var a,d,o=this,l=e.series;o.chart=e,o.options=s=o.setOptions(s),o.linkedSeries=[],o.bindAxes(),b(o,{name:s.name,state:"",visible:!1!==s.visible,selected:!0===s.selected}),a=s.events,c(a,function(e,t){r(o,t,e)}),(a&&a.click||s.point&&s.point.events&&s.point.events.click||s.allowPointSelect)&&(e.runTrackerClick=!0),o.getColor(),o.getSymbol(),n(o.parallelArrays,function(e){o[e+"Data"]=[]}),o.setData(s.data,!1),o.isCartesian&&(e.hasCartesianSeries=!0),l.length&&(d=l[l.length-1]),o._i=t(d&&d._i,-1)+1,e.orderSeries(this.insert(l)),i(this,"afterInit")},insert:function(e){var n,s=this.options.index;if(o(s)){for(n=e.length;n--;)if(s>=t(e[n].options.index,e[n]._i)){e.splice(n+1,0,this);break}-1===n&&e.unshift(this),n+=1}else e.push(this);return t(n,e.length-1)},bindAxes:function(){var o,t=this,s=t.options,i=t.chart;n(t.axisTypes||[],function(a){n(i[a],function(e){o=e.options,(s[a]===o.index||void 0!==s[a]&&s[a]===o.id||void 0===s[a]&&0===o.index)&&(t.insert(e.series),t[a]=e,e.isDirty=!0)}),t[a]||t.optionalAxis===a||e.error(18,!0)})},updateParallelArrays:function(e,t){var s=e.series,i=arguments,a=o(t)?function(n){var o="y"===n&&s.toYData?s.toYData(e):e[n];s[n+"Data"][t]=o}:function(e){Array.prototype[t].apply(s[e+"Data"],Array.prototype.slice.call(i,2))};n(s.parallelArrays,a)},autoIncrement:function(){var o,e=this.options,s=this.xIncrement,i=e.pointIntervalUnit,n=this.chart.time,s=t(s,e.pointStart,0);return this.pointInterval=o=t(this.pointInterval,e.pointInterval,1),i&&(e=new n.Date(s),"day"===i?n.set("Date",e,n.get("Date",e)+o):"month"===i?n.set("Month",e,n.get("Month",e)+o):"year"===i&&n.set("FullYear",e,n.get("FullYear",e)+o),o=e.getTime()-s),this.xIncrement=s+o,s},setOptions:function(e){var n=this.chart,c=n.options,o=c.plotOptions,r=(n.userOptions||{}).plotOptions||{},l=o[this.type];return this.userOptions=e,n=m(l,o.series,e),this.tooltipOptions=m(a.tooltip,a.plotOptions.series&&a.plotOptions.series.tooltip,a.plotOptions[this.type].tooltip,c.tooltip.userOptions,o.series&&o.series.tooltip,o[this.type].tooltip,e.tooltip),this.stickyTracking=t(e.stickyTracking,r[this.type]&&r[this.type].stickyTracking,r.series&&r.series.stickyTracking,!!(this.tooltipOptions.shared&&!this.noSharedTooltip)||n.stickyTracking),null===l.marker&&delete n.marker,this.zoneAxis=n.zoneAxis,e=this.zones=(n.zones||[]).slice(),!n.negativeColor&&!n.negativeFillColor||n.zones||e.push({value:n[this.zoneAxis+"Threshold"]||n.threshold||0,className:"highcharts-negative",color:n.negativeColor,fillColor:n.negativeFillColor}),e.length&&s(e[e.length-1].value)&&e.push({color:this.color,fillColor:this.fillColor}),i(this,"afterSetOptions",{options:n}),n},getName:function(){return this.name||"Series "+(this.index+1)},getCyclic:function(e,n,o){var i,a=this.chart,c=this.userOptions,r=e+"Index",l=e+"Counter",d=o?o.length:t(a.options.chart[e+"Count"],a[e+"Count"]);n||(i=t(c[r],c["_"+r]),s(i)||(a.series.length||(a[l]=0),c["_"+r]=i=a[l]%d,a[l]+=1),o&&(n=o[i])),void 0!==i&&(this[r]=i),this[e]=n},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||p[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol,this.chart.options.symbols)},drawLegendSymbol:e.LegendSymbolMixin.drawLineMarker,updateData:function(t){var i,c,l,a=this.options,s=this.points,r=[],d=this.requireSorting;if(n(t,function(t){var n=e.defined(t)&&this.pointClass.prototype.optionsToObject.call({series:this},t).x;o(n)&&(n=e.inArray(n,this.xData,l),-1===n?r.push(t):t!==a.data[n]?(s[n].update(t,!1,null,!1),s[n].touched=!0,d&&(l=n)):s[n]&&(s[n].touched=!0),c=!0)},this),c)for(t=s.length;t--;)i=s[t],i.touched||i.remove(!1),i.touched=!1;else if(t.length===s.length)n(t,function(e,t){s[t].update&&e!==a.data[t]&&s[t].update(e,!1,null,!1)});else return!1;return n(r,function(e){this.addPoint(e,!1)},this),!0},setData:function(s,i,a,r){var d,w,c=this,u=c.points,v=u&&u.length||0,b=c.options,j=c.chart,l=null,m=c.xAxis,y=b.turboThreshold,p=this.xData,h=this.yData,_=(d=c.pointArrayMap)&&d.length;if(s=s||[],d=s.length,i=t(i,!0),!1!==r&&d&&v&&!c.cropped&&!c.hasGroupedData&&c.visible&&(w=this.updateData(s)),!w){if(c.xIncrement=null,c.colorCounter=0,n(this.parallelArrays,function(e){c[e+"Data"].length=0}),y&&d>y){for(a=0;null===l&&a<d;)l=s[a],a++;if(o(l))for(a=0;a<d;a++)p[a]=this.autoIncrement(),h[a]=s[a];else if(f(l))if(_)for(a=0;a<d;a++)l=s[a],p[a]=l[0],h[a]=l.slice(1,_+1);else for(a=0;a<d;a++)l=s[a],p[a]=l[0],h[a]=l[1];else e.error(12)}else for(a=0;a<d;a++)void 0!==s[a]&&(l={series:c},c.pointClass.prototype.applyOptions.apply(l,[s[a]]),c.updateParallelArrays(l,a));h&&g(h[0])&&e.error(14,!0),c.data=[],c.options.data=c.userOptions.data=s;for(a=v;a--;)u[a]&&u[a].destroy&&u[a].destroy();m&&(m.minRange=m.userMinRange),c.isDirty=j.isDirtyBox=!0,c.isDirtyData=!!u,a=!1}"point"===b.legendType&&(this.processData(),this.generatePoints()),i&&j.redraw(a)},processData:function(t){var s,c,l,d,h,n=this.xData,u=this.yData,o=n.length,a=0,i=this.xAxis,r=this.options,s=r.cropThreshold,h,c,p=this.getExtremesFromAll||r.getExtremesFromAll,m=this.isCartesian,r=i&&i.val2lin,g=i&&i.isLog,f=this.requireSorting;if(m&&!this.isDirty&&!i.isDirty&&!this.yAxis.isDirty&&!t)return!1;i&&(t=i.getExtremes(),l=t.min,d=t.max),m&&this.sorted&&!p&&(!s||o>s||this.forceCrop)&&(n[o-1]<l||n[0]>d?(n=[],u=[]):(n[0]<l||n[o-1]>d)&&(a=this.cropData(this.xData,this.yData,l,d),n=a.xData,u=a.yData,a=a.start,h=!0));for(s=n.length||1;--s;)o=g?r(n[s])-r(n[s-1]):n[s]-n[s-1],0<o&&(void 0===c||o<c)?c=o:0>o&&f&&(e.error(15),f=!1);this.cropped=h,this.cropStart=a,this.processedXData=n,this.processedYData=u,this.closestPointRange=c},cropData:function(e,n,s,o,i){var a,l=e.length,r=0,c=l;i=t(i,this.cropShoulder,1);for(a=0;a<l;a++)if(e[a]>=s){r=Math.max(0,a-i);break}for(s=a;s<l;s++)if(e[s]>o){c=s+i;break}return{xData:e.slice(r,c),yData:n.slice(r,c),start:r,end:c}},generatePoints:function(){var e,n,s,l,o=this.options,a=o.data,t=this.data,r=this.processedXData,m=this.processedYData,u=this.pointClass,c=r.length,d=this.cropStart||0,i=this.hasGroupedData,o=o.keys,h=[];t||i||(t=[],t.length=a.length,t=this.data=t),o&&i&&(this.options.keys=!1);for(e=0;e<c;e++)s=d+e,i?(n=(new u).init(this,[r[e]].concat(_(m[e]))),n.dataGroup=this.groupMap[e]):(n=t[s])||void 0===a[s]||(t[s]=n=(new u).init(this,a[s],r[e])),n&&(n.index=s,h[e]=n);if(this.options.keys=o,t&&(c!==(l=t.length)||i))for(e=0;e<l;e++)e!==d||i||(e+=c),t[e]&&(t[e].destroyElements(),t[e].plotX=void 0);this.data=t,this.points=h},getExtremes:function(e){var t,n,s,i,u=this.yAxis,c=this.processedXData,r=[],l=0,a=this.xAxis.getExtremes(),h=a.min,m=a.max,d=this.requireSorting?1:0;e=e||this.stackedYData||this.processedYData||[],a=e.length;for(n=0;n<a;n++)if(i=c[n],t=e[n],s=(o(t,!0)||f(t))&&(!u.positiveValuesOnly||t.length||0<t),i=this.getExtremesFromAll||this.options.getExtremesFromAll||this.cropped||(c[n+d]||i)>=h&&(c[n-d]||i)<=m,s&&i)if(s=t.length)for(;s--;)"number"==typeof t[s]&&(r[l++]=t[s]);else r[l++]=t;this.dataMin=j(r),this.dataMax=O(r)},translate:function(){this.processedXData||this.processData(),this.generatePoints();var a,u,h,p,v,b,r=this.options,O=r.stacking,f=this.xAxis,y=f.categories,d=this.yAxis,w=this.points,E=w.length,C=!!this.modifyValue,c=r.pointPlacement,x="between"===c||o(c),g=r.threshold,_=r.startFromThreshold?g:0,j=Number.MAX_VALUE;"between"===c&&(c=.5),o(c)&&(c*=t(r.pointRange||f.pointRange));for(r=0;r<E;r++){var e=w[r],m=e.x,n=e.y;a=e.low,p=O&&d.stacks[(this.negStacks&&n<(_?0:g)?"-":"")+this.stackKey],d.positiveValuesOnly&&null!==n&&0>=n&&(e.isNull=!0),e.plotX=u=l(Math.min(Math.max(-1e5,f.translate(m,0,0,0,1,c,"flags"===this.type)),1e5)),O&&this.visible&&!e.isNull&&p&&p[m]&&(v=this.getStackIndicator(v,m,this.index),h=p[m],n=h.points[v.key],a=n[0],n=n[1],a===_&&v.key===p[m].base&&(a=t(o(g)&&g,d.min)),d.positiveValuesOnly&&0>=a&&(a=null),e.total=e.stackTotal=h.total,e.percentage=h.total&&e.y/h.total*100,e.stackY=n,h.setOffset(this.pointXOffset||0,this.barW||0)),e.yBottom=s(a)?Math.min(Math.max(-1e5,d.translate(a,0,1,0,1)),1e5):null,C&&(n=this.modifyValue(n,e)),e.plotY=a="number"==typeof n&&1/0!==n?Math.min(Math.max(-1e5,d.translate(n,0,1,0,1)),1e5):void 0,e.isInside=void 0!==a&&0<=a&&a<=d.len&&0<=u&&u<=f.len,e.clientX=x?l(f.translate(m,0,0,0,1,c)):u,e.negative=e.y<(g||0),e.category=y&&void 0!==y[e.x]?y[e.x]:e.x,e.isNull||(void 0!==b&&(j=Math.min(j,Math.abs(u-b))),b=u),e.zone=this.zones.length&&e.getZone()}this.closestPointRangePx=j,i(this,"afterTranslate")},getValidPoints:function(e,t){var n=this.chart;return v(e||this.points||[],function(e){return!(t&&!n.isInsidePlot(e.plotX,e.plotY,n.inverted))&&!e.isNull})},setClip:function(e){var t=this.chart,a=this.options,c=t.renderer,o=t.inverted,r=this.clipBox,i=r||t.clipBox,n=this.sharedClipKey||["_sharedClip",e&&e.duration,e&&e.easing,i.height,a.xAxis,a.yAxis].join(),s=t[n],l=t[n+"m"];s||(e&&(i.width=0,o&&(i.x=t.plotSizeX),t[n+"m"]=l=c.clipRect(o?t.plotSizeX+99:-99,o?-t.plotLeft:-t.plotTop,99,o?t.chartWidth:t.chartHeight)),t[n]=s=c.clipRect(i),s.count={length:0}),e&&!s.count[this.index]&&(s.count[this.index]=!0,s.count.length+=1),!1!==a.clip&&(this.group.clip(e||r?s:t.clipRect),this.markerGroup.clip(l),this.sharedClipKey=n),e||(s.count[this.index]&&(delete s.count[this.index],--s.count.length),0===s.count.length&&n&&t[n]&&(r||(t[n]=t[n].destroy()),t[n+"m"]&&(t[n+"m"]=t[n+"m"].destroy())))},animate:function(e){var n,t=this.chart,s=h(this.options.animation);e?this.setClip(s):(n=this.sharedClipKey,(e=t[n])&&e.animate({width:t.plotSizeX,x:0},s),t[n+"m"]&&t[n+"m"].animate({width:t.plotSizeX+99,x:0},s),this.animate=null)},afterAnimate:function(){this.setClip(),i(this,"afterAnimate"),this.finishedAnimating=!0},drawPoints:function(){var e,n,s,i,a,r,c,d,l=this.points,h=this.chart,o=this.options.marker,u=this[this.specialGroup]||this.markerGroup,m=t(o.enabled,!!this.xAxis.isRadial||null,this.closestPointRangePx>=o.enabledThreshold*o.radius);if(!1!==o.enabled||this._hasPointMarkers)for(r=0;r<l.length;r++)e=l[r],n=e.graphic,i=e.marker||{},d=!!e.marker,a=m&&void 0===i.enabled||i.enabled,c=e.isInside,a&&!e.isNull?(a=t(i.symbol,this.symbol),s=this.markerAttribs(e,e.selected&&"select"),n?n[c?"show":"hide"](!0).animate(s):c&&(0<s.width||e.hasImage)&&(e.graphic=n=h.renderer.symbol(a,s.x,s.y,s.width,s.height,d?i:o).add(u)),n&&n.attr(this.pointAttribs(e,e.selected&&"select")),n&&n.addClass(e.getClassName(),!0)):n&&(e.graphic=n.destroy())},markerAttribs:function(e,n){var s=this.options.marker,i=e.marker||{},a=i.symbol||s.symbol,o=t(i.radius,s.radius);return n&&(s=s.states[n],n=i.states&&i.states[n],o=t(n&&n.radius,s&&s.radius,o+(s&&s.radiusPlus||0))),e.hasImage=a&&0===a.indexOf("url"),e.hasImage&&(o=0),e={x:Math.floor(e.plotX)-o,y:e.plotY-o},o&&(e.width=e.height=2*o),e},pointAttribs:function(e,n){var s=this.options.marker,o=e&&e.options,a=o&&o.marker||{},i=this.color,r=o&&o.color,c=e&&e.color,o=t(a.lineWidth,s.lineWidth);return e=e&&e.zone&&e.zone.color,i=r||e||c||i,e=a.fillColor||s.fillColor||i,i=a.lineColor||s.lineColor||i,n&&(s=s.states[n],n=a.states&&a.states[n]||{},o=t(n.lineWidth,s.lineWidth,o+t(n.lineWidthPlus,s.lineWidthPlus,0)),e=n.fillColor||s.fillColor||e,i=n.lineColor||s.lineColor||i),{stroke:i,"stroke-width":o,fill:e}},destroy:function(){var s,a,r,l,t=this,o=t.chart,h=/AppleWebKit\/533/.test(x.navigator.userAgent),d=t.data||[];i(t,"destroy"),y(t),n(t.axisTypes||[],function(e){(s=t[e])&&s.series&&(u(s.series,t),s.isDirty=s.forceRedraw=!0)}),t.legendItem&&t.chart.legend.destroyItem(t);for(a=d.length;a--;)(r=d[a])&&r.destroy&&r.destroy();t.points=null,e.clearTimeout(t.animationTimeout),c(t,function(e,t){e instanceof w&&!e.survive&&(l=h&&"group"===t?"hide":"destroy",e[l]())}),o.hoverSeries===t&&(o.hoverSeries=null),u(o.series,t),o.orderSeries(),c(t,function(e,n){delete t[n]})},getGraphPath:function(e,t,o){var r,u,a=this,d=a.options,i=d.step,c=[],l=[];return e=e||a.points,(u=e.reversed)&&e.reverse(),(i={right:1,center:2}[i]||i&&3)&&u&&(i=4-i),!d.connectNulls||t||o||(e=this.getValidPoints(e)),n(e,function(n,u){var m=n.plotX,f=n.plotY,h=e[u-1];(n.leftCliff||h&&h.rightCliff)&&!o&&(r=!0),n.isNull&&!s(t)&&0<u?r=!d.connectNulls:n.isNull&&!t?r=!0:(0===u||r?u=["M",n.plotX,n.plotY]:a.getPointSpline?u=a.getPointSpline(e,n,u):i?(u=1===i?["L",h.plotX,f]:2===i?["L",(h.plotX+m)/2,h.plotY,"L",(h.plotX+m)/2,f]:["L",m,h.plotY],u.push("L",m,f)):u=["L",m,f],l.push(n.x),i&&(l.push(n.x),2===i&&l.push(n.x)),c.push.apply(c,u),r=!1)}),c.xMap=l,a.graphPath=c},drawGraph:function(){var e=this,s=this.options,t=(this.gappedPath||this.getGraphPath).call(this),o=[["graph","highcharts-graph",s.lineColor||this.color,s.dashStyle]],o=e.getZonesGraphs(o);n(o,function(n,o){var a=n[0],i=e[a];i?(i.endX=e.preventGraphAnimation?null:t.xMap,i.animate({d:t})):t.length&&(e[a]=e.chart.renderer.path(t).addClass(n[1]).attr({zIndex:1}).add(e.group),i={stroke:n[2],"stroke-width":s.lineWidth,fill:e.fillGraph&&e.color||"none"},n[3]?i.dashstyle=n[3]:"square"!==s.linecap&&(i["stroke-linecap"]=i["stroke-linejoin"]="round"),i=e[a].attr(i).shadow(2>o&&s.shadow)),i&&(i.startX=t.xMap,i.isArea=t.isArea)})},getZonesGraphs:function(e){return n(this.zones,function(t,n){e.push(["zone-graph-"+n,"highcharts-graph highcharts-zone-graph-"+n+" "+(t.className||""),t.color||this.color,t.dashStyle||this.options.dashStyle])},this),e},applyZones:function(){var e,i,a,c,l,d,f,p,b,v=this,s=this.chart,y=s.renderer,j=this.zones,r=this.clips||[],u=this.graph,h=this.area,m=Math.max(s.chartWidth,s.chartHeight),o=this[(this.zoneAxis||"y")+"Axis"],g=s.inverted,_=!1;j.length&&(u||h)&&o&&void 0!==o.min&&(p=o.reversed,c=o.horiz,u&&!this.showLine&&u.hide(),h&&h.hide(),l=o.getExtremes(),n(j,function(n,j){a=p?c?s.plotWidth:0:c?0:o.toPixels(l.min),a=Math.min(Math.max(t(i,a),0),m),i=Math.min(Math.max(Math.round(o.toPixels(t(n.value,l.max),!0)),0),m),_&&(a=i=o.toPixels(l.max)),b=Math.abs(a-i),d=Math.min(a,i),f=Math.max(a,i),o.isXAxis?(e={x:g?f:d,y:0,width:b,height:m},c||(e.x=s.plotHeight-e.x)):(e={x:0,y:g?f:d,width:m,height:b},c&&(e.y=s.plotWidth-e.y)),g&&y.isVML&&(e=o.isXAxis?{x:0,y:p?d:f,height:e.width,width:s.chartWidth}:{x:e.y-s.plotLeft-s.spacingBox.x,y:0,width:e.height,height:s.chartHeight}),r[j]?r[j].animate(e):(r[j]=y.clipRect(e),u&&v["zone-graph-"+j].clip(r[j]),h&&v["zone-area-"+j].clip(r[j])),_=n.value>l.max,v.resetZones&&0===i&&(i=void 0)}),this.clips=r)},invertGroups:function(e){function s(){n(["group","markerGroup"],function(n){t[n]&&(o.renderer.isVML&&t[n].attr({width:t.yAxis.len,height:t.xAxis.len}),t[n].width=t.yAxis.len,t[n].height=t.xAxis.len,t[n].invert(e))})}var i,t=this,o=t.chart;t.xAxis&&(i=r(o,"resize",s),r(t,"destroy",i),s(e),t.invertGroups=s)},plotGroup:function(e,t,n,o,i){var a=this[e],r=!a;return r&&(this[e]=a=this.chart.renderer.g().attr({zIndex:o||.1}).add(i)),a.addClass("highcharts-"+t+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(s(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(a.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),a.attr({visibility:n})[r?"attr":"animate"](this.getPlotBox()),a},getPlotBox:function(){var t=this.chart,n=this.xAxis,e=this.yAxis;return t.inverted&&(n=e,e=this.xAxis),{translateX:n?n.left:t.plotLeft,translateY:e?e.top:t.plotTop,scaleX:1,scaleY:1}},render:function(){var e=this,t=e.chart,n=e.options,s=!!e.animate&&t.renderer.isSVG&&h(n.animation).duration,a=e.visible?"inherit":"hidden",r=n.zIndex,c=e.hasRendered,l=t.seriesGroup,u=t.inverted,o=e.plotGroup("group","series",a,r,l);e.markerGroup=e.plotGroup("markerGroup","markers",a,r,l),s&&e.animate(!0),o.inverted=!!e.isCartesian&&u,e.drawGraph&&(e.drawGraph(),e.applyZones()),e.drawDataLabels&&e.drawDataLabels(),e.visible&&e.drawPoints(),e.drawTracker&&!1!==e.options.enableMouseTracking&&e.drawTracker(),e.invertGroups(u),!1===n.clip||e.sharedClipKey||c||o.clip(t.clipRect),s&&e.animate(),c||(e.animationTimeout=d(function(){e.afterAnimate()},s)),e.isDirty=!1,e.hasRendered=!0,i(e,"afterRender")},redraw:function(){var e=this.chart,i=this.isDirty||this.isDirtyData,n=this.group,s=this.xAxis,o=this.yAxis;n&&(e.inverted&&n.attr({width:e.plotWidth,height:e.plotHeight}),n.animate({translateX:t(s&&s.left,e.plotLeft),translateY:t(o&&o.top,e.plotTop)})),this.translate(),this.render(),i&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(e,t){var n=this.xAxis,s=this.yAxis,o=this.chart.inverted;return this.searchKDTree({clientX:o?n.len-e.chartY+n.pos:e.chartX-n.pos,plotY:o?s.len-e.chartX+s.pos:e.chartY-s.pos},t)},buildKDTree:function(){function t(n,s,o){var i,a;if(i=n&&n.length)return a=e.kdAxisArray[s%o],n.sort(function(e,t){return e[a]-t[a]}),i=Math.floor(i/2),{point:n[i],left:t(n.slice(0,i),s+1,o),right:t(n.slice(i+1),s+1,o)}}this.buildingKdTree=!0;var e=this,n=-1<e.options.findNearestPointBy.indexOf("y")?2:1;delete e.kdTree,d(function(){e.kdTree=t(e.getValidPoints(null,!e.directTouch),n,n),e.buildingKdTree=!1},e.options.kdNow?0:1)},searchKDTree:function(e,t){function a(e,t,c,l){var u=t.point,h=r.kdAxisArray[c%l],m=u,f=s(e[o])&&s(u[o])?Math.pow(e[o]-u[o],2):null,d=s(e[i])&&s(u[i])?Math.pow(e[i]-u[i],2):null,d=(f||0)+(d||0);return u.dist=s(d)?Math.sqrt(d):Number.MAX_VALUE,u.distX=s(f)?Math.sqrt(f):Number.MAX_VALUE,h=e[h]-u[h],d=0>h?"left":"right",f=0>h?"right":"left",t[d]&&(d=a(e,t[d],c+1,l),m=d[n]<m[n]?d:u),t[f]&&Math.sqrt(h*h)<m[n]&&(e=a(e,t[f],c+1,l),m=e[n]<m[n]?e:m),m}var r=this,o=this.kdAxisArray[0],i=this.kdAxisArray[1],n=t?"distX":"dist";if(t=-1<r.options.findNearestPointBy.indexOf("y")?2:1,this.kdTree||this.buildingKdTree||this.buildKDTree(),this.kdTree)return a(e,this.kdTree,t,t)}})}(t),function(e){var s=e.Axis,c=e.Chart,o=e.correctFloat,r=e.defined,l=e.destroyObjectProperties,a=e.each,d=e.format,n=e.objectEach,t=e.pick,i=e.Series;e.StackItem=function(e,n,s,o,i){var a=e.chart.inverted;this.axis=e,this.isNegative=s,this.options=n,this.x=o,this.total=null,this.points={},this.stack=i,this.rightCliff=this.leftCliff=0,this.alignOptions={align:n.align||(a?s?"left":"right":"center"),verticalAlign:n.verticalAlign||(a?"middle":s?"bottom":"top"),y:t(n.y,a?4:s?14:-6),x:t(n.x,a?s?-6:6:0)},this.textAlign=n.textAlign||(a?s?"right":"left":"center")},e.StackItem.prototype={destroy:function(){l(this,this.axis)},render:function(e){var s=this.axis.chart,t=this.options,n=t.format,n=n?d(n,this,s.time):t.formatter.call(this);this.label?this.label.attr({text:n,visibility:"hidden"}):this.label=s.renderer.text(n,null,null,t.useHTML).css(t.style).attr({align:this.textAlign,rotation:t.rotation,visibility:"hidden"}).add(e)},setOffset:function(e,t){var n=this.axis,s=n.chart,i=n.translate(n.usePercentage?100:this.total,0,0,0,1),o=n.translate(0),o=Math.abs(i-o);e=s.xAxis[0].translate(this.x)+e,n=this.getStackBox(s,this,e,i,t,o,n),(t=this.label)&&(t.align(this.alignOptions,null,n),n=t.alignAttr,t[!1===this.options.crop||s.isInsidePlot(n.x,n.y)?"show":"hide"](!0))},getStackBox:function(e,t,n,s,o,i,a){var c=t.axis.reversed,r=e.inverted;return e=a.height+a.pos-e.plotTop,t=t.isNegative&&!c||!t.isNegative&&c,{x:r?t?s:s-i:n,y:r?e-n-o:t?e-s-i:e-s,width:r?i:o,height:r?o:i}}},c.prototype.getStacks=function(){var e=this;a(e.yAxis,function(e){e.stacks&&e.hasVisibleSeries&&(e.oldStacks=e.stacks)}),a(e.series,function(n){!n.options.stacking||!0!==n.visible&&!1!==e.options.chart.ignoreHiddenSeries||(n.stackKey=n.type+t(n.options.stack,""))})},s.prototype.buildStacks=function(){var e,n=this.series,o=t(this.options.reversedStacks,!0),s=n.length;if(!this.isXAxis){this.usePercentage=!1;for(e=s;e--;)n[o?e:s-e-1].setStackedPoints();for(e=0;e<s;e++)n[e].modifyStacks()}},s.prototype.renderStackTotals=function(){var t=this.chart,s=t.renderer,o=this.stacks,e=this.stackTotalGroup;e||(this.stackTotalGroup=e=s.g("stack-labels").attr({visibility:"visible",zIndex:6}).add()),e.translate(t.plotLeft,t.plotTop),n(o,function(t){n(t,function(t){t.render(e)})})},s.prototype.resetStacks=function(){var e=this,t=e.stacks;e.isXAxis||n(t,function(t){n(t,function(n,s){n.touched<e.stacksTouched?(n.destroy(),delete t[s]):(n.total=null,n.cumulative=null)})})},s.prototype.cleanStacks=function(){var e;this.isXAxis||(this.oldStacks&&(e=this.stacks=this.oldStacks),n(e,function(e){n(e,function(e){e.cumulative=e.total})}))},i.prototype.setStackedPoints=function(){if(this.options.stacking&&(!0===this.visible||!1===this.chart.options.chart.ignoreHiddenSeries)){var n,s,a,c,u,h,m,O=this.processedXData,_=this.processedYData,y=[],x=_.length,d=this.options,v=d.threshold,p=t(d.startFromThreshold&&v,0),w=d.stack,d=d.stacking,f=this.stackKey,j="-"+f,b=this.negStacks,l=this.yAxis,i=l.stacks,g=l.oldStacks;l.stacksTouched+=1;for(u=0;u<x;u++)s=O[u],c=_[u],m=this.getStackIndicator(m,s,this.index),h=m.key,n=(a=b&&c<(p?0:v))?j:f,i[n]||(i[n]={}),i[n][s]||(g[n]&&g[n][s]?(i[n][s]=g[n][s],i[n][s].total=null):i[n][s]=new e.StackItem(l,l.options.stackLabels,a,s,w)),n=i[n][s],null!==c?(n.points[h]=n.points[this.index]=[t(n.cumulative,p)],r(n.cumulative)||(n.base=h),n.touched=l.stacksTouched,0<m.index&&!1===this.singleStacks&&(n.points[h][0]=n.points[this.index+","+s+",0"][0])):n.points[h]=n.points[this.index]=null,"percent"===d?(a=a?f:j,b&&i[a]&&i[a][s]?(a=i[a][s],n.total=a.total=Math.max(a.total,n.total)+Math.abs(c)||0):n.total=o(n.total+(Math.abs(c)||0))):n.total=o(n.total+(c||0)),n.cumulative=t(n.cumulative,p)+(c||0),null!==c&&(n.points[h].push(n.cumulative),y[u]=n.cumulative);"percent"===d&&(l.usePercentage=!0),this.stackedYData=y,l.oldStacks={}}},i.prototype.modifyStacks=function(){var t,e=this,n=e.stackKey,s=e.yAxis.stacks,o=e.processedXData,i=e.options.stacking;e[i+"Stacker"]&&a([n,"-"+n],function(n){for(var a,c,r=o.length;r--;)(a=o[r],t=e.getStackIndicator(t,a,e.index,n),c=(a=s[n]&&s[n][a])&&a.points[t.key])&&e[i+"Stacker"](c,a,r)})},i.prototype.percentStacker=function(e,t,n){t=t.total?100/t.total:0,e[0]=o(e[0]*t),e[1]=o(e[1]*t),this.stackedYData[n]=e[1]},i.prototype.getStackIndicator=function(e,t,n,s){return!r(e)||e.x!==t||s&&e.key!==s?e={x:t,index:0,key:s}:e.index++,e.key=[n,t,e.index].join(),e}}(t),function(e){var j=e.addEvent,p=e.animate,f=e.Axis,m=e.createElement,a=e.css,v=e.defined,n=e.each,u=e.erase,s=e.extend,i=e.fireEvent,r=e.inArray,h=e.isNumber,l=e.isObject,b=e.isArray,o=e.merge,d=e.objectEach,t=e.pick,y=e.Point,_=e.Series,c=e.seriesTypes,w=e.setAnimation,g=e.splat;s(e.Chart.prototype,{addSeries:function(e,n,s){var a,o=this;return e&&(n=t(n,!0),i(o,"addSeries",{options:e},function(){a=o.initSeries(e),o.isDirtyLegend=!0,o.linkSeries(),i(o,"afterAddSeries"),n&&o.redraw(s)})),a},addAxis:function(e,n,s,i){var a=n?"xAxis":"yAxis",r=this.options;return e=o(e,{index:this[a].length,isX:n}),n=new f(this,e),r[a]=g(r[a]||{}),r[a].push(e),t(s,!0)&&this.redraw(i),n},showLoading:function(e){var t=this,i=t.options,n=t.loadingDiv,o=i.loading,r=function(){n&&a(n,{left:t.plotLeft+"px",top:t.plotTop+"px",width:t.plotWidth+"px",height:t.plotHeight+"px"})};n||(t.loadingDiv=n=m("div",{className:"highcharts-loading highcharts-loading-hidden"},null,t.container),t.loadingSpan=m("span",{className:"highcharts-loading-inner"},null,n),j(t,"redraw",r)),n.className="highcharts-loading",t.loadingSpan.innerHTML=e||i.lang.loading,a(n,s(o.style,{zIndex:10})),a(t.loadingSpan,o.labelStyle),t.loadingShown||(a(n,{opacity:0,display:""}),p(n,{opacity:o.style.opacity||.5},{duration:o.showDuration||0})),t.loadingShown=!0,r()},hideLoading:function(){var t=this.options,e=this.loadingDiv;e&&(e.className="highcharts-loading highcharts-loading-hidden",p(e,{opacity:0},{duration:t.loading.hideDuration||100,complete:function(){a(e,{display:"none"})}})),this.loadingShown=!1},propsRequireDirtyBox:"backgroundColor borderColor borderWidth margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" "),update:function(e,s,a,c){var m,f,l=this,p={credits:"addCredits",title:"setTitle",subtitle:"setSubtitle"},u=e.chart,b=[];i(l,"update",{options:e}),u&&(o(!0,l.options.chart,u),"className"in u&&l.setClassName(u.className),"reflow"in u&&l.setReflow(u.reflow),("inverted"in u||"polar"in u)&&(l.propFromSeries(),m=!0),"alignTicks"in u&&(m=!0),d(u,function(e,t){-1!==r("chart."+t,l.propsRequireUpdateSeries)&&(f=!0),-1!==r(t,l.propsRequireDirtyBox)&&(l.isDirtyBox=!0)}),"style"in u&&l.renderer.setStyle(u.style)),e.colors&&(this.options.colors=e.colors),e.plotOptions&&o(!0,this.options.plotOptions,e.plotOptions),d(e,function(e,t){l[t]&&"function"==typeof l[t].update?l[t].update(e,!1):"function"==typeof l[p[t]]&&l[p[t]](e),"chart"!==t&&-1!==r(t,l.propsRequireUpdateSeries)&&(f=!0)}),n("xAxis yAxis zAxis series colorAxis pane".split(" "),function(t){e[t]&&(n(g(e[t]),function(e,n){(n=v(e.id)&&l.get(e.id)||l[t][n])&&n.coll===t&&(n.update(e,!1),a&&(n.touched=!0)),!n&&a&&("series"===t?l.addSeries(e,!1).touched=!0:("xAxis"===t||"yAxis"===t)&&(l.addAxis(e,"xAxis"===t,!1).touched=!0))}),a&&n(l[t],function(e){e.touched?delete e.touched:b.push(e)}))}),n(b,function(e){e.remove(!1)}),m&&n(l.axes,function(e){e.update({},!1)}),f&&n(l.series,function(e){e.update({},!1)}),e.loading&&o(!0,l.options.loading,e.loading),m=u&&u.width,u=u&&u.height,h(m)&&m!==l.chartWidth||h(u)&&u!==l.chartHeight?l.setSize(m,u,c):t(s,!0)&&l.redraw(c)},setSubtitle:function(e){this.setTitle(void 0,e)}}),s(y.prototype,{update:function(e,n,s,o){function h(){i.applyOptions(e),null===i.y&&r&&(i.graphic=r.destroy()),l(e,!0)&&(r&&r.element&&e&&e.marker&&void 0!==e.marker.symbol&&(i.graphic=r.destroy()),e&&e.dataLabels&&i.dataLabel&&(i.dataLabel=i.dataLabel.destroy()),i.connector&&(i.connector=i.connector.destroy())),c=i.index,a.updateParallelArrays(i,c),d.data[c]=l(d.data[c],!0)||l(e,!0)?i.options:t(e,d.data[c]),a.isDirty=a.isDirtyData=!0,!a.fixedBox&&a.hasCartesianSeries&&(u.isDirtyBox=!0),"point"===d.legendType&&(u.isDirtyLegend=!0),n&&u.redraw(s)}var c,i=this,a=i.series,r=i.graphic,u=a.chart,d=a.options;n=t(n,!0),!1===o?h():i.firePointEvent("update",{options:e},h)},remove:function(e,t){this.series.removePoint(r(this,this.series.data),e,t)}}),s(_.prototype,{addPoint:function(e,n,s,o){var i,a,l,m,u=this.options,c=this.data,f=this.chart,r=this.xAxis,r=r&&r.hasNames&&r.names,h=u.data,d=this.xData;if(n=t(n,!0),a={series:this},this.pointClass.prototype.applyOptions.apply(a,[e]),l=a.x,i=d.length,this.requireSorting&&l<d[i-1])for(m=!0;i&&d[i-1]>l;)i--;this.updateParallelArrays(a,"splice",i,0,0),this.updateParallelArrays(a,i),r&&a.name&&(r[l]=a.name),h.splice(i,0,e),m&&(this.data.splice(i,0,null),this.processData()),"point"===u.legendType&&this.generatePoints(),s&&(c[0]&&c[0].remove?c[0].remove(!1):(c.shift(),this.updateParallelArrays(a,"shift"),h.shift())),this.isDirtyData=this.isDirty=!0,n&&f.redraw(o)},removePoint:function(e,n,s){var o=this,a=o.data,i=a[e],r=o.points,c=o.chart,l=function(){r&&r.length===a.length&&r.splice(e,1),a.splice(e,1),o.options.data.splice(e,1),o.updateParallelArrays(i||{series:o},"splice",e,1),i&&i.destroy(),o.isDirty=!0,o.isDirtyData=!0,n&&c.redraw()};w(s,c),n=t(n,!0),i?i.firePointEvent("remove",null,l):l()},remove:function(e,n,s){function r(){a.destroy(),o.isDirtyLegend=o.isDirtyBox=!0,o.linkSeries(),t(e,!0)&&o.redraw(n)}var a=this,o=a.chart;!1!==s?i(a,"remove",null,r):r()},update:function(a,l){var p,d=this,h=d.chart,m=d.userOptions,f=d.oldType||d.type,v=a.type||m.type||h.options.chart.type,y=c[f].prototype,g=["group","markerGroup","dataLabelsGroup"],u=["navigatorSeries","baseSeries"],_=d.finishedAnimating&&{animation:!1},w=["data","name","turboThreshold"],b=e.keys(a),j=0<b.length;if(n(b,function(e){-1===r(e,w)&&(j=!1)}),j)a.data&&this.setData(a.data,!1),a.name&&this.setName(a.name,!1);else{u=g.concat(u),n(u,function(e){u[e]=d[e],delete d[e]}),a=o(m,_,{index:d.index,pointStart:t(m.pointStart,d.xData[0])},{data:d.options.data},a),d.remove(!1,null,!1);for(p in y)d[p]=void 0;c[v||f]?s(d,c[v||f].prototype):e.error(17,!0),n(u,function(e){d[e]=u[e]}),d.init(h,a),a.zIndex!==m.zIndex&&n(g,function(e){d[e]&&d[e].attr({zIndex:a.zIndex})}),d.oldType=f,h.linkSeries()}i(this,"afterUpdate"),t(l,!0)&&h.redraw(!1)},setName:function(e){this.name=this.options.name=this.userOptions.name=e,this.chart.isDirtyLegend=!0}}),s(f.prototype,{update:function(e,n){var i=this.chart;e=o(this.userOptions,e),i.options[this.coll].indexOf&&(i.options[this.coll][i.options[this.coll].indexOf(this.userOptions)]=e),this.destroy(!0),this.init(i,s(e,{events:void 0})),i.isDirtyBox=!0,t(n,!0)&&i.redraw()},remove:function(e){for(var s=this.chart,o=this.coll,i=this.series,a=i.length;a--;)i[a]&&i[a].remove(!1);u(s.axes,this),u(s[o],this),b(s.options[o])?s.options[o].splice(this.options.index,1):delete s.options[o],n(s[o],function(e,t){e.options.index=e.userOptions.index=t}),this.destroy(),s.isDirtyBox=!0,t(e,!0)&&s.redraw()},setTitle:function(e,t){this.update({title:e},t)},setCategories:function(e,t){this.update({categories:e},t)}})}(t),function(e){var o=e.color,n=e.each,i=e.map,t=e.pick,s=e.Series,a=e.seriesType;a("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(s){var o,f,d=[],r=[],g=this.xAxis,c=this.yAxis,l=c.stacks[this.stackKey],a={},u=this.index,h=c.series,m=h.length,p=t(c.options.reversedStacks,!0)?1:-1;if(s=s||this.points,this.options.stacking){for(o=0;o<s.length;o++)s[o].leftNull=s[o].rightNull=null,a[s[o].x]=s[o];e.objectEach(l,function(e,t){null!==e.total&&r.push(t)}),r.sort(function(e,t){return e-t}),f=i(h,function(){return this.visible}),n(r,function(e,t){var i,h,s=0;if(a[e]&&!a[e].isNull)d.push(a[e]),n([-1,1],function(n){var d=1===n?"rightNull":"leftNull",s=0,c=l[r[t+n]];if(c)for(o=u;0<=o&&o<m;)i=c.points[o],i||(o===u?a[e][d]=!0:f[o]&&(h=l[e].points[o])&&(s-=h[1]-h[0])),o+=p;a[e][1===n?"rightCliff":"leftCliff"]=s});else{for(o=u;0<=o&&o<m;){if(i=l[e].points[o]){s=i[1];break}o+=p}s=c.translate(s,0,1,0,1),d.push({isNull:!0,plotX:g.translate(e,0,0,0,1),x:e,plotY:s,yBottom:s})}})}return d},getGraphPath:function(e){var n,o,u,m,r=s.prototype.getGraphPath,i=this.options,a=i.stacking,l=this.yAxis,c=[],d=[],p=this.index,g=l.stacks[this.stackKey],v=i.threshold,h=l.getThreshold(i.threshold),i=i.connectNulls||"percent"===a,f=function(t,n,s){var i,r,m,o=e[t];t=a&&g[o.x].points[p],r=o[s+"Null"]||0,s=o[s+"Cliff"]||0,o=!0,s||r?(i=(r?t[0]:t[1])+s,m=t[0]+s,o=!!r):!a&&e[n]&&e[n].isNull&&(i=m=v),void 0!==i&&(d.push({plotX:u,plotY:null===i?h:l.getThreshold(i),isNull:o,isCliff:!0}),c.push({plotX:u,plotY:null===m?h:l.getThreshold(m),doCurve:!1}))};e=e||this.points,a&&(e=this.getStackPoints(e));for(n=0;n<e.length;n++)(o=e[n].isNull,u=t(e[n].rectPlotX,e[n].plotX),m=t(e[n].yBottom,h),!o||i)&&(i||f(n,n-1,"left"),o&&!a&&i||(d.push(e[n]),c.push({x:n,plotX:u,plotY:m})),i||f(n,n+1,"right"));return n=r.call(this,d,!0,!0),c.reversed=!0,o=r.call(this,c,!0,!0),o.length&&(o[0]="L"),o=n.concat(o),r=r.call(this,d,!1,i),o.xMap=n.xMap,this.areaPath=o,r},drawGraph:function(){this.areaPath=[],s.prototype.drawGraph.apply(this);var e=this,i=this.areaPath,a=this.options,r=[["area","highcharts-area",this.color,a.fillColor]];n(this.zones,function(t,n){r.push(["zone-area-"+n,"highcharts-area highcharts-zone-area-"+n+" "+t.className,t.color||e.color,t.fillColor||a.fillColor])}),n(r,function(n){var r=n[0],s=e[r];s?(s.endX=e.preventGraphAnimation?null:i.xMap,s.animate({d:i})):(s=e[r]=e.chart.renderer.path(i).addClass(n[1]).attr({fill:t(n[3],o(n[2]).setOpacity(t(a.fillOpacity,.75)).get()),zIndex:0}).add(e.group),s.isArea=!0),s.startX=i.xMap,s.shiftUnit=a.step?2:1})},drawLegendSymbol:e.LegendSymbolMixin.drawRectangle})}(t),function(e){var t=e.pick;e=e.seriesType,e("spline","line",{},{getPointSpline:function(e,n,s){var i,a,c,d,u,l=n.plotX,o=n.plotY,r=e[s-1];return s=e[s+1],r&&!r.isNull&&!1!==r.doCurve&&!n.isCliff&&s&&!s.isNull&&!1!==s.doCurve&&!n.isCliff&&(e=r.plotY,c=s.plotX,s=s.plotY,u=0,d=(1.5*l+r.plotX)/2.5,a=(1.5*o+e)/2.5,c=(1.5*l+c)/2.5,i=(1.5*o+s)/2.5,c!==d&&(u=(i-a)*(c-l)/(c-d)+o-i),a+=u,i+=u,a>e&&a>o?(a=Math.max(e,o),i=2*o-a):a<e&&a<o&&(a=Math.min(e,o),i=2*o-a),i>s&&i>o?(i=Math.max(s,o),a=2*o-i):i<s&&i<o&&(i=Math.min(s,o),a=2*o-i),n.rightContX=c,n.rightContY=i),n=["C",t(r.rightContX,r.plotX),t(r.rightContY,r.plotY),t(d,l),t(a,o),l,o],r.rightContX=r.rightContY=null,n}})}(t),function(e){var t=e.seriesTypes.area.prototype,n=e.seriesType;n("areaspline","spline",e.defaultPlotOptions.area,{getStackPoints:t.getStackPoints,getGraphPath:t.getGraphPath,drawGraph:t.drawGraph,drawLegendSymbol:e.LegendSymbolMixin.drawRectangle})}(t),function(e){var i=e.animObject,a=e.color,t=e.each,r=e.extend,c=e.isNumber,o=e.merge,n=e.pick,s=e.Series,l=e.seriesType,d=e.svg;l("column","line",{borderRadius:0,crisp:!0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{halo:!1,brightness:.1},select:{color:"#cccccc",borderColor:"#000000"}},dataLabels:{align:null,verticalAlign:null,y:null},softThreshold:!1,startFromThreshold:!0,stickyTracking:!1,tooltip:{distance:6},threshold:0,borderColor:"#ffffff"},{cropShoulder:0,directTouch:!0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){s.prototype.init.apply(this,arguments);var e=this,n=e.chart;n.hasRendered&&t(n.series,function(t){t.type===e.type&&(t.isDirty=!0)})},getColumnMetrics:function(){var i,e=this,s=e.options,o=e.xAxis,d=e.yAxis,u=o.reversed,r={},a=0;!1===s.grouping?a=1:t(e.chart.series,function(t){var n,s=t.options,o=t.yAxis;t.type!==e.type||!t.visible&&e.chart.options.chart.ignoreHiddenSeries||d.len!==o.len||d.pos!==o.pos||(s.stacking?(i=t.stackKey,void 0===r[i]&&(r[i]=a++),n=r[i]):!1!==s.grouping&&(n=a++),t.columnIndex=n)});var c=Math.min(Math.abs(o.transA)*(o.ordinalSlope||s.pointRange||o.closestPointRange||o.tickInterval||1),o.len),h=c*s.groupPadding,l=(c-2*h)/(a||1),s=Math.min(s.maxPointWidth||o.len,n(s.pointWidth,l*(1-2*s.pointPadding)));return e.columnMetrics={width:s,offset:(l-s)/2+(h+((e.columnIndex||0)+(u?1:0))*l-c/2)*(u?-1:1)},e.columnMetrics},crispCol:function(e,t,n,s){var a=this.chart,o=this.borderWidth,i=-(o%2?.5:0),o=o%2?.5:1;return a.inverted&&a.renderer.isVML&&(o+=1),this.options.crisp&&(n=Math.round(e+n)+i,e=Math.round(e)+i,n-=e),s=Math.round(t+s)+o,i=.5>=Math.abs(t)&&.5<s,t=Math.round(t)+o,s-=t,i&&s&&(--t,s+=1),{x:e,y:t,width:n,height:s}},translate:function(){var e=this,r=e.chart,c=e.options,d=e.dense=2>e.closestPointRange*e.xAxis.transA,d=e.borderWidth=n(c.borderWidth,d?0:1),o=e.yAxis,l=c.threshold,a=e.translatedThreshold=o.getThreshold(l),i=n(c.minPointLength,5),h=e.getColumnMetrics(),m=h.width,u=e.barW=Math.max(m,1+2*d),f=e.pointXOffset=h.offset;r.inverted&&(a-=.5),c.pointPadding&&(u=Math.ceil(u)),s.prototype.translate.apply(e),t(e.points,function(t){var v,h=n(t.yBottom,a),s=999+Math.abs(h),s=Math.min(Math.max(-s,t.plotY),o.len+s),c=t.plotX+f,p=u,g=Math.min(s,h),d=Math.max(s,h)-g;i&&Math.abs(d)<i&&(d=i,v=!o.reversed&&!t.negative||o.reversed&&t.negative,t.y===l&&e.dataMax<=l&&o.min<l&&(v=!v),g=Math.abs(g-a)>i?h-i:a-(v?i:0)),t.barX=c,t.pointWidth=m,t.tooltipPos=r.inverted?[o.len+o.pos-r.plotLeft-s,e.xAxis.len-c-p/2,d]:[c+p/2,s+o.pos-r.plotTop,d],t.shapeType="rect",t.shapeArgs=e.crispCol.apply(e,t.isNull?[c,a,p,0]:[c,g,p,d])})},getSymbol:e.noop,drawLegendSymbol:e.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(e,t){var i,r=this.options,s=this.pointAttrToOptions||{},i=s.stroke||"borderColor",c=s["stroke-width"]||"borderWidth",n=e&&e.color||this.color,l=e&&e[i]||r[i]||this.color||n,d=e&&e[c]||r[c]||this[c]||0,s=r.dashStyle;return e&&this.zones.length&&(n=e.getZone(),n=e.options.color||n&&n.color||this.color),t&&(e=o(r.states[t],e.options.states&&e.options.states[t]||{}),t=e.brightness,n=e.color||void 0!==t&&a(n).brighten(e.brightness).get()||n,l=e[i]||l,d=e[c]||d,s=e.dashStyle||s),i={fill:n,stroke:l,"stroke-width":d},s&&(i.dashstyle=s),i},drawPoints:function(){var s,n=this,i=this.chart,e=n.options,a=i.renderer,r=e.animationLimit||250;t(n.points,function(t){var l=t.graphic,d=l&&i.pointCount<r?"animate":"attr";c(t.plotY)&&null!==t.y?(s=t.shapeArgs,l?l[d](o(s)):t.graphic=l=a[t.shapeType](s).add(t.group||n.group),e.borderRadius&&l.attr({r:e.borderRadius}),l[d](n.pointAttribs(t,t.selected&&"select")).shadow(e.shadow,null,e.stacking&&!e.borderRadius),l.addClass(t.getClassName(),!0)):l&&(t.graphic=l.destroy())})},animate:function(e){var o,t=this,n=this.yAxis,l=t.options,a=this.chart.inverted,s={},c=a?"translateX":"translateY";d&&(e?(s.scaleY=.001,e=Math.min(n.pos+n.len,Math.max(n.pos,n.toPixels(l.threshold))),a?s.translateX=e-n.len:s.translateY=e,t.group.attr(s)):(o=t.group.attr(c),t.group.animate({scaleY:1},r(i(t.options.animation),{step:function(e,i){s[c]=o+i.pos*(n.pos-o),t.group.attr(s)}})),t.animate=null))},remove:function(){var e=this,n=e.chart;n.hasRendered&&t(n.series,function(t){t.type===e.type&&(t.isDirty=!0)}),s.prototype.remove.apply(e,arguments)}})}(t),function(e){e=e.seriesType,e("bar","column",null,{inverted:!0})}(t),function(e){var t=e.Series;e=e.seriesType,e("scatter","line",{lineWidth:0,findNearestPointBy:"xy",marker:{enabled:!0},tooltip:{headerFormat:'<span style="color:{point.color}">\u25cf</span> <span style="font-size: 0.85em"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&t.prototype.drawGraph.call(this)}})}(t),function(e){var t=e.deg2rad,n=e.isNumber,s=e.pick,o=e.relativeLength;e.CenteredSeriesMixin={getCenter:function(){var t,r,n=this.options,i=this.chart,a=2*(n.slicedOffset||0),c=i.plotWidth-2*a,i=i.plotHeight-2*a,e=n.center,e=[s(e[0],"50%"),s(e[1],"50%"),n.size||"100%",n.innerSize||0],l=Math.min(c,i);for(t=0;4>t;++t)r=e[t],n=2>t||2===t&&/%$/.test(r),e[t]=o(r,[c,i,l,e[2]][t])+(n?a:0);return e[3]>e[2]&&(e[3]=e[2]),e},getStartAndEndRadians:function(e,s){return e=n(e)?e:0,s=n(s)&&s>e&&360>s-e?s:e+360,{start:t*(e+-90),end:t*(s+-90)}}}}(t),function(e){var o=e.addEvent,a=e.CenteredSeriesMixin,r=e.defined,n=e.each,c=e.extend,l=a.getStartAndEndRadians,s=e.inArray,i=e.noop,t=e.pick,d=e.Point,u=e.Series,h=e.seriesType,m=e.setAnimation;h("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:e.seriesTypes.column.prototype.pointAttribs,animate:function(e){var t=this,o=t.points,s=t.startAngleRad;e||(n(o,function(e){var n=e.graphic,o=e.shapeArgs;n&&(n.attr({r:e.startR||t.center[3]/2,start:s,end:s}),n.animate({r:o.r,start:o.start,end:o.end},t.options.animation))}),t.animate=null)},updateTotals:function(){var e,t,n=0,s=this.points,o=s.length,i=this.options.ignoreHiddenPoint;for(t=0;t<o;t++)e=s[t],n+=i&&!e.visible?0:e.isNull?0:e.y;this.total=n;for(t=0;t<o;t++)e=s[t],e.percentage=0<n&&(e.visible||!i)?e.y/n*100:0,e.total=n},generatePoints:function(){u.prototype.generatePoints.call(this),this.updateTotals()},translate:function(e){this.generatePoints();var n,s,i,a,c,d,m=0,o=this.options,u=o.slicedOffset,v=u+(o.borderWidth||0),r=l(o.startAngle,o.endAngle),h=this.startAngleRad=r.start,r=(this.endAngleRad=r.end)-h,f=this.points,p=o.dataLabels.distance,o=o.ignoreHiddenPoint,g=f.length;e||(this.center=e=this.getCenter()),this.getX=function(t,n,o){return s=Math.asin(Math.min((t-e[1])/(e[2]/2+o.labelDistance),1)),e[0]+(n?-1:1)*Math.cos(s)*(e[2]/2+o.labelDistance)};for(d=0;d<g;d++)n=f[d],n.labelDistance=t(n.options.dataLabels&&n.options.dataLabels.distance,p),this.maxLabelDistance=Math.max(this.maxLabelDistance||0,n.labelDistance),a=h+m*r,(!o||n.visible)&&(m+=n.percentage/100),i=h+m*r,n.shapeType="arc",n.shapeArgs={x:e[0],y:e[1],r:e[2]/2,innerR:e[3]/2,start:Math.round(1e3*a)/1e3,end:Math.round(1e3*i)/1e3},s=(i+a)/2,s>1.5*Math.PI?s-=2*Math.PI:s<-Math.PI/2&&(s+=2*Math.PI),n.slicedTranslation={translateX:Math.round(Math.cos(s)*u),translateY:Math.round(Math.sin(s)*u)},i=Math.cos(s)*e[2]/2,c=Math.sin(s)*e[2]/2,n.tooltipPos=[e[0]+.7*i,e[1]+.7*c],n.half=s<-Math.PI/2||s>Math.PI/2?1:0,n.angle=s,a=Math.min(v,n.labelDistance/5),n.labelPos=[e[0]+i+Math.cos(s)*n.labelDistance,e[1]+c+Math.sin(s)*n.labelDistance,e[0]+i+Math.cos(s)*a,e[1]+c+Math.sin(s)*a,e[0]+i,e[1]+c,0>n.labelDistance?"center":n.half?"right":"left",s]},drawGraph:null,drawPoints:function(){var t,s,i,a,e=this,o=e.chart.renderer,r=e.options.shadow;r&&!e.shadowGroup&&(e.shadowGroup=o.g("shadow").add(e.group)),n(e.points,function(n){if(t=n.graphic,n.isNull)t&&(n.graphic=t.destroy());else{a=n.shapeArgs,s=n.getTranslate();var l=n.shadowGroup;r&&!l&&(l=n.shadowGroup=o.g("shadow").add(e.shadowGroup)),l&&l.attr(s),i=e.pointAttribs(n,n.selected&&"select"),t?t.setRadialReference(e.center).attr(i).animate(c(a,s)):(n.graphic=t=o[n.shapeType](a).setRadialReference(e.center).attr(s).add(e.group),n.visible||t.attr({visibility:"hidden"}),t.attr(i).attr({"stroke-linejoin":"round"}).shadow(r,l)),t.addClass(n.getClassName())}})},searchPoint:i,sortByAngle:function(e,t){e.sort(function(e,n){return void 0!==e.angle&&(n.angle-e.angle)*t})},drawLegendSymbol:e.LegendSymbolMixin.drawRectangle,getCenter:a.getCenter,getSymbol:i},{init:function(){d.prototype.init.apply(this,arguments);var n,e=this;return e.name=t(e.name,"Slice"),n=function(t){e.slice("select"===t.type)},o(e,"select",n),o(e,"unselect",n),e},isValid:function(){return e.isNumber(this.y,!0)&&0<=this.y},setVisible:function(e,o){var i=this,a=i.series,r=a.chart,c=a.options.ignoreHiddenPoint;o=t(o,c),e!==i.visible&&(i.visible=i.options.visible=e=void 0===e?!i.visible:e,a.options.data[s(i,a.data)]=i.options,n(["graphic","dataLabel","connector","shadowGroup"],function(t){i[t]&&i[t][e?"show":"hide"](!0)}),i.legendItem&&r.legend.colorizeItem(i,e),e||"hover"!==i.state||i.setState(""),c&&(a.isDirty=!0),o&&r.redraw())},slice:function(e,n,o){var i=this.series;m(o,i.chart),t(n,!0),this.sliced=this.options.sliced=r(e)?e:!this.sliced,i.options.data[s(this,i.data)]=this.options,this.graphic.animate(this.getTranslate()),this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},getTranslate:function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},haloPath:function(e){var t=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(t.x,t.y,t.r+e,t.r+e,{innerR:this.shapeArgs.r-1,start:t.start,end:t.end})}})}(t),function(e){var p=e.addEvent,h=e.arrayMax,o=e.defined,n=e.each,r=e.extend,d=e.format,f=e.map,l=e.merge,m=e.noop,t=e.pick,u=e.relativeLength,i=e.Series,s=e.seriesTypes,c=e.some,a=e.stableSort;e.distribute=function(s,o,i){function h(e,t){return e.target-t.target}var r,d=!0,l=s,m=[],u=0,p=l.reducedLen||o;for(r=s.length;r--;)u+=s[r].size;if(u>p){a(s,function(e,t){return(t.rank||0)-(e.rank||0)});for(u=r=0;u<=p;)u+=s[r].size,r++;m=s.splice(r-1,s.length)}a(s,h);for(s=f(s,function(e){return{size:e.size,targets:[e.target],align:t(e.align,.5)}});d;){for(r=s.length;r--;)d=s[r],u=(Math.min.apply(0,d.targets)+Math.max.apply(0,d.targets))/2,d.pos=Math.min(Math.max(0,u-d.size*d.align),o-d.size);r=s.length;for(d=!1;r--;)0<r&&s[r-1].pos+s[r-1].size>s[r].pos&&(s[r-1].size+=s[r].size,s[r-1].targets=s[r-1].targets.concat(s[r].targets),s[r-1].align=.5,s[r-1].pos+s[r-1].size>o&&(s[r-1].pos=o-s[r-1].size),s.splice(r,1),d=!0)}l.push.apply(l,m),r=0,c(s,function(t){var s=0;if(c(t.targets,function(){if(l[r].pos=t.pos+s,Math.abs(l[r].pos-l[r].target)>i)return n(l.slice(0,r+1),function(e){delete e.pos}),l.reducedLen=(l.reducedLen||o)-.1*o,l.reducedLen>.1*o&&e.distribute(l,o,i),!0;s+=l[r].size,r++}))return!0}),a(l,h)},i.prototype.drawDataLabels=function(){function j(e,t){var n=t.filter;return!n||(t=n.operator,e=e[n.property],n=n.value,">"===t&&e>n||"<"===t&&e<n||">="===t&&e>=n||"<="===t&&e<=n||"=="===t&&e==n||"==="===t&&e===n)}var a,c,u,h,i=this,g=i.chart,r=i.options,s=r.dataLabels,b=i.points,m=i.hasRendered||0,v=t(s.defer,!!r.animation),f=g.renderer;(s.enabled||i._hasPointLabels)&&(i.dlProcessOptions&&i.dlProcessOptions(s),u=i.plotGroup("dataLabelsGroup","data-labels",v&&!m?"hidden":"visible",s.zIndex||6),v&&(u.attr({opacity:+m}),m||p(i,"afterAnimate",function(){i.visible&&u.show(!0),u[r.animation?"animate":"attr"]({opacity:1},{duration:200})})),h=s,n(b,function(n){var p,v,b,y,m=n.dataLabel,_=n.connector,w=!m;c=n.dlOptions||n.options&&n.options.dataLabels,(b=t(c&&c.enabled,h.enabled)&&!n.isNull)&&(b=!0===j(n,c||s)),b&&(s=l(h,c),v=n.getLabelConfig(),p=s[n.formatPrefix+"Format"]||s.format,a=o(p)?d(p,v,g.time):(s[n.formatPrefix+"Formatter"]||s.formatter).call(v,s),p=s.style,v=s.rotation,p.color=t(s.color,p.color,i.color,"#000000"),"contrast"===p.color&&(n.contrastColor=f.getContrast(n.color||i.color),p.color=s.inside||0>t(n.labelDistance,s.distance)||r.stacking?n.contrastColor:"#000000"),r.cursor&&(p.cursor=r.cursor),y={fill:s.backgroundColor,stroke:s.borderColor,"stroke-width":s.borderWidth,r:s.borderRadius||0,rotation:v,padding:s.padding,zIndex:1},e.objectEach(y,function(e,t){void 0===e&&delete y[t]})),!m||b&&o(a)?b&&o(a)&&(m?y.text=a:(m=n.dataLabel=v?f.text(a,0,-9999).addClass("highcharts-data-label"):f.label(a,0,-9999,s.shape,null,null,s.useHTML,null,"data-label"),m.addClass(" highcharts-data-label-color-"+n.colorIndex+" "+(s.className||"")+(s.useHTML?"highcharts-tracker":""))),m.attr(y),m.css(p).shadow(s.shadow),m.added||m.add(u),i.alignDataLabel(n,m,s,null,w)):(n.dataLabel=m=m.destroy(),_&&(n.connector=_.destroy()))})),e.fireEvent(this,"afterDrawDataLabels")},i.prototype.alignDataLabel=function(e,n,s,o,i){var h,l=this.chart,u=l.inverted,a=t(e.dlBox&&e.dlBox.centerX,e.plotX,-9999),d=t(e.plotY,-9999),c=n.getBBox(),m=s.rotation,f=s.align,p=this.visible&&(e.series.forceDL||l.isInsidePlot(a,Math.round(d),u)||o&&l.isInsidePlot(a,u?o.x+1:o.y+o.height-1,u)),g="justify"===t(s.overflow,"justify");p&&(h=s.style.fontSize,h=l.renderer.fontMetrics(h,n).b,o=r({x:u?this.yAxis.len-d:a,y:Math.round(u?this.xAxis.len-a:d),width:0,height:0},o),r(s,{width:c.width,height:c.height}),m?(g=!1,a=l.renderer.rotCorr(h,m),a={x:o.x+s.x+o.width/2+a.x,y:o.y+s.y+{top:0,middle:.5,bottom:1}[s.verticalAlign]*o.height},n[i?"attr":"animate"](a).attr({align:f}),d=(m+720)%360,d=180<d&&360>d,"left"===f?a.y-=d?c.height:0:"center"===f?(a.x-=c.width/2,a.y-=c.height/2):"right"===f&&(a.x-=c.width,a.y-=d?0:c.height),n.placed=!0,n.alignAttr=a):(n.align(s,null,o),a=n.alignAttr),g?e.isLabelJustified=this.justifyDataLabel(n,s,a,c,o,i):t(s.crop,!0)&&(p=l.isInsidePlot(a.x,a.y)&&l.isInsidePlot(a.x+c.width,a.y+c.height)),s.shape&&!m)&&n[i?"attr":"animate"]({anchorX:u?l.plotWidth-e.plotY:e.plotX,anchorY:u?l.plotHeight-e.plotX:e.plotY}),p||(n.attr({y:-9999}),n.placed=!1)},i.prototype.justifyDataLabel=function(e,t,n,s,o,i){var r,c=this.chart,d=t.align,u=t.verticalAlign,l=e.box?0:e.padding||0,a=n.x+l;return 0>a&&("right"===d?t.align="left":t.x=-a,r=!0),a=n.x+s.width-l,a>c.plotWidth&&("left"===d?t.align="right":t.x=c.plotWidth-a,r=!0),a=n.y+l,0>a&&("bottom"===u?t.verticalAlign="top":t.y=-a,r=!0),a=n.y+s.height-l,a>c.plotHeight&&("top"===u?t.verticalAlign="bottom":t.y=c.plotHeight-a,r=!0),r&&(e.placed=!i,e.align(t,null,o)),r},s.pie&&(s.pie.prototype.drawDataLabels=function(){var a,r,d,u,m,g,v,j,y,w,s=this,S=s.data,f=s.chart,l=s.options.dataLabels,p=t(l.connectorPadding,10),x=t(l.connectorWidth,1),A=f.plotWidth,k=f.plotHeight,E=Math.round(f.chartWidth/3),O=s.center,b=O[2]/2,_=O[1],C=[[],[]],c=[0,0,0,0];s.visible&&(l.enabled||s._hasPointLabels)&&(n(S,function(e){e.dataLabel&&e.visible&&e.dataLabel.shortened&&(e.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}),e.dataLabel.shortened=!1)}),i.prototype.drawDataLabels.apply(s),n(S,function(e){e.dataLabel&&e.visible&&(C[e.half].push(e),e.dataLabel._pos=null,!o(l.style.width)&&!o(e.options.dataLabels&&e.options.dataLabels.style&&e.options.dataLabels.style.width)&&e.dataLabel.getBBox().width>E&&(e.dataLabel.css({width:.7*E}),e.dataLabel.shortened=!0))}),n(C,function(i,u){var h,x,E,S=i.length,C=[];if(S)for(s.sortByAngle(i,u-.5),0<s.maxLabelDistance&&(h=Math.max(0,_-b-s.maxLabelDistance),x=Math.min(_+b+s.maxLabelDistance,f.plotHeight),n(i,function(e){0<e.labelDistance&&e.dataLabel&&(e.top=Math.max(0,_-b-e.labelDistance),e.bottom=Math.min(_+b+e.labelDistance,f.plotHeight),E=e.dataLabel.getBBox().height||21,e.positionsIndex=C.push({target:e.labelPos[1]-e.top+E/2,size:E,rank:e.y})-1)}),h=x+E-h,e.distribute(C,h,h/5)),w=0;w<S;w++)a=i[w],x=a.positionsIndex,g=a.labelPos,d=a.dataLabel,v=!1===a.visible?"hidden":"inherit",r=h=g[1],C&&o(C[x])&&(void 0===C[x].pos?v="hidden":(y=C[x].size,r=a.top+C[x].pos)),delete a.positionIndex,m=l.justify?O[0]+(u?-1:1)*(b+a.labelDistance):s.getX(r<a.top+2||r>a.bottom-2?h:r,u,a),d._attr={visibility:v,align:g[6]},d._pos={x:m+l.x+({left:p,right:-p}[g[6]]||0),y:r+l.y-10},g.x=m,g.y=r,t(l.crop,!0)&&(j=d.getBBox().width,h=null,m-j<p&&1===u?(h=Math.round(j-m+p),c[3]=Math.max(h,c[3])):m+j>A-p&&0===u&&(h=Math.round(m+j-A+p),c[1]=Math.max(h,c[1])),0>r-y/2?c[0]=Math.max(Math.round(-r+y/2),c[0]):r+y/2>k&&(c[2]=Math.max(Math.round(r+y/2-k),c[2])),d.sideOverflow=h)}),0===h(c)||this.verifyDataLabelOverflow(c))&&(this.placeDataLabels(),x&&n(this.points,function(e){var t;u=e.connector,(d=e.dataLabel)&&d._pos&&e.visible&&0<e.labelDistance?(v=d._attr.visibility,(t=!u)&&(e.connector=u=f.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+e.colorIndex+(e.className?" "+e.className:"")).add(s.dataLabelsGroup),u.attr({"stroke-width":x,stroke:l.connectorColor||e.color||"#666666"})),u[t?"attr":"animate"]({d:s.connectorPath(e.labelPos)}),u.attr("visibility",v)):u&&(e.connector=u.destroy())}))},s.pie.prototype.connectorPath=function(e){var n=e.x,s=e.y;return t(this.options.dataLabels.softConnector,!0)?["M",n+("left"===e[6]?5:-5),s,"C",n,s,2*e[2]-e[4],2*e[3]-e[5],e[2],e[3],"L",e[4],e[5]]:["M",n+("left"===e[6]?5:-5),s,"L",e[2],e[3],"L",e[4],e[5]]},s.pie.prototype.placeDataLabels=function(){n(this.points,function(e){var t=e.dataLabel;t&&e.visible&&((e=t._pos)?(t.sideOverflow&&(t._attr.width=t.getBBox().width-t.sideOverflow,t.css({width:t._attr.width+"px",textOverflow:this.options.dataLabels.style.textOverflow||"ellipsis"}),t.shortened=!0),t.attr(t._attr),t[t.moved?"animate":"attr"](e),t.moved=!0):t&&t.attr({y:-9999}))},this)},s.pie.prototype.alignDataLabel=m,s.pie.prototype.verifyDataLabelOverflow=function(e){var n,t=this.center,s=this.options,a=s.center,o=s.minSize||80,i=null!==s.size;return i||(null!==a[0]?n=Math.max(t[2]-Math.max(e[1],e[3]),o):(n=Math.max(t[2]-e[1]-e[3],o),t[0]+=(e[3]-e[1])/2),null!==a[1]?n=Math.max(Math.min(n,t[2]-Math.max(e[0],e[2])),o):(n=Math.max(Math.min(n,t[2]-e[0]-e[2]),o),t[1]+=(e[0]-e[2])/2),n<t[2]?(t[2]=n,t[3]=Math.min(u(s.innerSize||0,n),n),this.translate(t),this.drawDataLabels&&this.drawDataLabels()):i=!0),i}),s.column&&(s.column.prototype.alignDataLabel=function(e,n,s,o,a){var c=this.chart.inverted,d=e.series,r=e.dlBox||e.shapeArgs,u=t(e.below,e.plotY>t(this.translatedThreshold,d.yAxis.len)),h=t(s.inside,!!this.options.stacking);r&&(o=l(r),0>o.y&&(o.height+=o.y,o.y=0),r=o.y+o.height-d.yAxis.len,0<r&&(o.height-=r),c&&(o={x:d.yAxis.len-o.y-o.height,y:d.xAxis.len-o.x-o.width,width:o.height,height:o.width}),h||(c?(o.x+=u?0:o.width,o.width=0):(o.y+=u?o.height:0,o.height=0))),s.align=t(s.align,!c||h?"center":u?"right":"left"),s.verticalAlign=t(s.verticalAlign,c||h?"middle":u?"top":"bottom"),i.prototype.alignDataLabel.call(this,e,n,s,o,a),e.isLabelJustified&&e.contrastColor&&e.dataLabel.css({color:e.contrastColor})})}(t),function(e){var n=e.Chart,t=e.each,s=e.objectEach,o=e.pick;e=e.addEvent,e(n,"render",function(){var e=[];t(this.labelCollectors||[],function(t){e=e.concat(t())}),t(this.yAxis||[],function(t){t.options.stackLabels&&!t.options.stackLabels.allowOverlap&&s(t.stacks,function(t){s(t,function(t){e.push(t.label)})})}),t(this.series||[],function(n){var s=n.options.dataLabels,i=n.dataLabelCollections||["dataLabel"];(s.enabled||n._hasPointLabels)&&!s.allowOverlap&&n.visible&&t(i,function(s){t(n.points,function(t){t[s]&&(t[s].labelrank=o(t.labelrank,t.shapeArgs&&t.shapeArgs.height),e.push(t[s]))})})}),this.hideOverlappingLabels(e)}),n.prototype.hideOverlappingLabels=function(e){var n,s,o,i,a,r,l,d,u,c=e.length,h=function(e,t,n,s,o,i,a,r){return!(o>e+n||o+a<e||i>t+s||i+r<t)};for(i=0;i<c;i++)(s=e[i])&&(s.oldOpacity=s.opacity,s.newOpacity=1,s.width||(n=s.getBBox(),s.width=n.width,s.height=n.height));e.sort(function(e,t){return(t.labelrank||0)-(e.labelrank||0)});for(i=0;i<c;i++)for(n=e[i],s=i+1;s<c;++s)o=e[s],n&&o&&n!==o&&n.placed&&o.placed&&0!==n.newOpacity&&0!==o.newOpacity&&(r=n.alignAttr,l=o.alignAttr,d=n.parentGroup,u=o.parentGroup,a=2*(n.box?0:n.padding||0),r=h(r.x+d.translateX,r.y+d.translateY,n.width-a,n.height-a,l.x+u.translateX,l.y+u.translateY,o.width-a,o.height-a))&&((n.labelrank<o.labelrank?n:o).newOpacity=0);t(e,function(e){var t,n;e&&(t=e.newOpacity,e.oldOpacity!==t&&e.placed&&(t?e.show(!0):n=function(){e.hide()},e.alignAttr.opacity=t,e[e.isOld?"animate":"attr"](e.alignAttr,null,n)),e.isOld=!0)})}}(t),function(e){var h=e.addEvent,y=e.Chart,b=e.createElement,m=e.css,l=e.defaultOptions,f=e.defaultPlotOptions,t=e.each,i=e.extend,n=e.fireEvent,d=e.hasTouch,u=e.inArray,g=e.isObject,p=e.Legend,c=e.merge,o=e.pick,r=e.Point,v=e.Series,s=e.seriesTypes,j=e.svg,a=e.TrackerMixin={drawTrackerPoint:function(){var e=this,s=e.chart.pointer,o=function(e){var t=s.getPointFromEvent(e);void 0!==t&&(s.isDirectTouch=!0,t.onMouseOver(e))};t(e.points,function(e){e.graphic&&(e.graphic.element.point=e),e.dataLabel&&(e.dataLabel.div?e.dataLabel.div.point=e:e.dataLabel.element.point=e)}),e._hasTracking||(t(e.trackerGroups,function(t){e[t]&&(e[t].addClass("highcharts-tracker").on("mouseover",o).on("mouseout",function(e){s.onTrackerMouseOut(e)}),d&&e[t].on("touchstart",o),e.options.cursor&&e[t].css(m).css({cursor:e.options.cursor}))}),e._hasTracking=!0),n(this,"afterDrawTracker")},drawTrackerGraph:function(){var s,e=this,c=e.options,i=c.trackByArea,o=[].concat(i?e.areaPath:e.graphPath),l=o.length,a=e.chart,p=a.pointer,f=a.renderer,r=a.options.tooltip.snap,u=e.tracker,h=function(){a.hoverSeries!==e&&e.onMouseOver()},m="rgba(192,192,192,"+(j?1e-4:.002)+")";if(l&&!i)for(s=l+1;s--;)"M"===o[s]&&o.splice(s+1,0,o[s+1]-r,o[s+2],"L"),(s&&"M"===o[s]||s===l)&&o.splice(s,0,"L",o[s-2]+r,o[s-1]);u?u.attr({d:o}):e.graph&&(e.tracker=f.path(o).attr({"stroke-linejoin":"round",visibility:e.visible?"visible":"hidden",stroke:m,fill:i?m:"none","stroke-width":e.graph.strokeWidth()+(i?0:2*r),zIndex:2}).add(e.group),t([e.tracker,e.markerGroup],function(e){e.addClass("highcharts-tracker").on("mouseover",h).on("mouseout",function(e){p.onTrackerMouseOut(e)}),c.cursor&&e.css({cursor:c.cursor}),d&&e.on("touchstart",h)})),n(this,"afterDrawTracker")}};s.column&&(s.column.prototype.drawTracker=a.drawTrackerPoint),s.pie&&(s.pie.prototype.drawTracker=a.drawTrackerPoint),s.scatter&&(s.scatter.prototype.drawTracker=a.drawTrackerPoint),i(p.prototype,{setItemEvents:function(e,t,s){var o=this,i=o.chart.renderer.boxWrapper,a="highcharts-legend-"+(e instanceof r?"point":"series")+"-active";(s?t:e.legendGroup).on("mouseover",function(){e.setState("hover"),i.addClass(a),t.css(o.options.itemHoverStyle)}).on("mouseout",function(){t.css(c(e.visible?o.itemStyle:o.itemHiddenStyle)),i.removeClass(a),e.setState()}).on("click",function(t){var s=function(){e.setVisible&&e.setVisible()};i.removeClass(a),t={browserEvent:t},e.firePointEvent?e.firePointEvent("legendItemClick",t,s):n(e,"legendItemClick",t,s)})},createCheckboxForItem:function(e){e.checkbox=b("input",{type:"checkbox",checked:e.selected,defaultChecked:e.selected},this.options.itemCheckboxStyle,this.chart.container),h(e.checkbox,"click",function(t){n(e.series||e,"checkboxClick",{checked:t.target.checked,item:e},function(){e.select()})})}}),l.legend.itemStyle.cursor="pointer",i(y.prototype,{showResetZoom:function(){function a(){e.zoomOut()}var e=this,s=l.lang,t=e.options.chart.resetZoomButton,o=t.theme,i=o.states,r="chart"===t.relativeTo?null:"plotBox";n(this,"beforeShowResetZoom",null,function(){e.resetZoomButton=e.renderer.button(s.resetZoom,null,null,a,o,i&&i.hover).attr({align:t.position.align,title:s.resetZoomTitle}).addClass("highcharts-reset-zoom").add().align(t.position,!1,r)})},zoomOut:function(){n(this,"selection",{resetSelection:!0},this.zoom)},zoom:function(e){var n,s,a=this.pointer,i=!1;!e||e.resetSelection?(t(this.axes,function(e){s=e.zoom()}),a.initiated=!1):t(e.xAxis.concat(e.yAxis),function(e){var t=e.axis;a[t.isXAxis?"zoomX":"zoomY"]&&(s=t.zoom(e.min,e.max),t.displayBtn&&(i=!0))}),n=this.resetZoomButton,i&&!n?this.showResetZoom():!i&&g(n)&&(this.resetZoomButton=n.destroy()),s&&this.redraw(o(this.options.chart.animation,e&&e.animation,100>this.pointCount))},pan:function(e,n){var i,s=this,o=s.hoverPoints;o&&t(o,function(e){e.setState()}),t("xy"===n?[1,0]:[1],function(t){t=s[t?"xAxis":"yAxis"][0];var d=t.horiz,u=e[d?"chartX":"chartY"],d=d?"mouseDownX":"mouseDownY",a=s[d],l=(t.pointRange||0)/2,n=t.reversed&&!s.inverted||!t.reversed&&s.inverted?-1:1,r=t.getExtremes(),o=t.toValue(a-u,!0)+l*n,n=t.toValue(a+t.len-u,!0)-l*n,c=n<o,a=c?n:o,o=c?o:n,n=Math.min(r.dataMin,l?r.min:t.toValue(t.toPixels(r.min)-t.minPixelPadding)),l=Math.max(r.dataMax,l?r.max:t.toValue(t.toPixels(r.max)+t.minPixelPadding)),c=n-a;0<c&&(o+=c,a=n),c=o-l,0<c&&(o=l,a-=c),t.series.length&&a!==r.min&&o!==r.max&&(t.setExtremes(a,o,!1,!1,{trigger:"pan"}),i=!0),s[d]=u}),i&&s.redraw(!1),m(s.container,{cursor:"move"})}}),i(r.prototype,{select:function(e,n){var s=this,i=s.series,a=i.chart;e=o(e,!s.selected),s.firePointEvent(e?"select":"unselect",{accumulate:n},function(){s.selected=s.options.selected=e,i.options.data[u(s,i.data)]=s.options,s.setState(e&&"select"),n||t(a.getSelectedPoints(),function(e){e.selected&&e!==s&&(e.selected=e.options.selected=!1,i.options.data[u(e,i.data)]=e.options,e.setState(""),e.firePointEvent("unselect"))})})},onMouseOver:function(e){var n=this.series.chart,t=n.pointer;e=e?t.normalize(e):t.getChartCoordinatesFromPoint(this,n.inverted),t.runPointActions(e,this)},onMouseOut:function(){var e=this.series.chart;this.firePointEvent("mouseOut"),t(e.hoverPoints||[],function(e){e.setState()}),e.hoverPoints=e.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var t=this,n=c(t.series.options.point,t.options).events;t.events=n,e.objectEach(n,function(e,n){h(t,n,e)}),this.hasImportedEvents=!0}},setState:function(e,t){var l,u=Math.floor(this.plotX),b=this.plotY,a=this.series,p=a.options.states[e||"normal"]||{},c=f[a.type].marker&&a.options.marker,v=c&&!1===c.enabled,m=c&&c.states&&c.states[e||"normal"]||{},g=!1===m.enabled,s=a.stateMarkerGraphic,h=this.marker||{},d=a.chart,r=a.halo,j=c&&a.markerAttribs;e=e||"",e===this.state&&!t||this.selected&&"select"!==e||!1===p.enabled||e&&(g||v&&!1===m.enabled)||e&&h.states&&h.states[e]&&!1===h.states[e].enabled||(j&&(l=a.markerAttribs(this,e)),this.graphic?(this.state&&this.graphic.removeClass("highcharts-point-"+this.state),e&&this.graphic.addClass("highcharts-point-"+e),this.graphic.animate(a.pointAttribs(this,e),o(d.options.chart.animation,p.animation)),l&&this.graphic.animate(l,o(d.options.chart.animation,m.animation,c.animation)),s&&s.hide()):(e&&m&&(c=h.symbol||a.symbol,s&&s.currentSymbol!==c&&(s=s.destroy()),s?s[t?"animate":"attr"]({x:l.x,y:l.y}):c&&(a.stateMarkerGraphic=s=d.renderer.symbol(c,l.x,l.y,l.width,l.height).add(a.markerGroup),s.currentSymbol=c),s&&s.attr(a.pointAttribs(this,e))),s&&(s[e&&d.isInsidePlot(u,b,d.inverted)?"show":"hide"](),s.element.point=this)),(u=p.halo)&&u.size?(r||(a.halo=r=d.renderer.path().add((this.graphic||s).parentGroup)),r.show()[t?"animate":"attr"]({d:this.haloPath(u.size)}),r.attr({class:"highcharts-halo highcharts-color-"+o(this.colorIndex,a.colorIndex)+(this.className?" "+this.className:"")}),r.point=this,r.attr(i({fill:this.color||a.color,"fill-opacity":u.opacity,zIndex:-1},u.attributes))):r&&r.point&&r.point.haloPath&&r.animate({d:r.point.haloPath(0)},null,r.hide),this.state=e,n(this,"afterSetState"))},haloPath:function(e){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-e,this.plotY-e,2*e,2*e)}}),i(v.prototype,{onMouseOver:function(){var t=this.chart,e=t.hoverSeries;e&&e!==this&&e.onMouseOut(),this.options.events.mouseOver&&n(this,"mouseOver"),this.setState("hover"),t.hoverSeries=this},onMouseOut:function(){var o=this.options,e=this.chart,t=e.tooltip,s=e.hoverPoint;e.hoverSeries=null,s&&s.onMouseOut(),this&&o.events.mouseOut&&n(this,"mouseOut"),!t||this.stickyTracking||t.shared&&!this.noSharedTooltip||t.hide(),this.setState()},setState:function(e){var n=this,s=n.options,r=n.graph,i=s.states,a=s.lineWidth,s=0;if(e=e||"",n.state!==e&&(t([n.group,n.markerGroup,n.dataLabelsGroup],function(t){t&&(n.state&&t.removeClass("highcharts-series-"+n.state),e&&t.addClass("highcharts-series-"+e))}),n.state=e,!i[e]||!1!==i[e].enabled)&&(e&&(a=i[e].lineWidth||a+(i[e].lineWidthPlus||0)),r&&!r.dashstyle))for(a={"stroke-width":a},r.animate(a,o(i[e||"normal"]&&i[e||"normal"].animation,n.chart.options.chart.animation));n["zone-graph-"+s];)n["zone-graph-"+s].attr(a),s+=1},setVisible:function(e,s){var o=this,i=o.chart,r=o.legendItem,c=i.options.chart.ignoreHiddenSeries,l=o.visible,a=(o.visible=e=o.options.visible=o.userOptions.visible=void 0===e?!l:e)?"show":"hide";t(["group","dataLabelsGroup","markerGroup","tracker","tt"],function(e){o[e]&&o[e][a]()}),(i.hoverSeries===o||(i.hoverPoint&&i.hoverPoint.series)===o)&&o.onMouseOut(),r&&i.legend.colorizeItem(o,e),o.isDirty=!0,o.options.stacking&&t(i.series,function(e){e.options.stacking&&e.visible&&(e.isDirty=!0)}),t(o.linkedSeries,function(t){t.setVisible(e,!1)}),c&&(i.isDirtyBox=!0),!1!==s&&i.redraw(),n(o,a)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(e){this.selected=e=void 0===e?!this.selected:e,this.checkbox&&(this.checkbox.checked=e),n(this,e?"select":"unselect")},drawTracker:a.drawTrackerGraph})}(t),function(e){var n=e.Chart,s=e.each,o=e.inArray,i=e.isArray,a=e.isObject,t=e.pick,r=e.splat;n.prototype.setResponsive=function(t){var a,o=this.options.responsive,n=[],i=this.currentResponsive;o&&o.rules&&s(o.rules,function(s){void 0===s._id&&(s._id=e.uniqueKey()),this.matchResponsiveRule(s,n,t)},this),a=e.merge.apply(0,e.map(n,function(t){return e.find(o.rules,function(e){return e._id===t}).chartOptions})),n=n.toString()||void 0,n!==(i&&i.ruleIds)&&(i&&this.update(i.undoOptions,t),n?(this.currentResponsive={ruleIds:n,mergedOptions:a,undoOptions:this.currentOptions(a)},this.update(a,t)):this.currentResponsive=void 0)},n.prototype.matchResponsiveRule=function(e,n){var s=e.condition;(s.callback||function(){return this.chartWidth<=t(s.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=t(s.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=t(s.minWidth,0)&&this.chartHeight>=t(s.minHeight,0)}).call(this)&&n.push(e._id)},n.prototype.currentOptions=function(t){function n(t,s,c,l){var d;e.objectEach(t,function(e,t){if(!l&&-1<o(t,["series","xAxis","yAxis"]))for(e=r(e),c[t]=[],d=0;d<e.length;d++)s[t][d]&&(c[t][d]={},n(e[d],s[t][d],c[t][d],l+1));else a(e)?(c[t]=i(e)?[]:{},n(e,s[t]||{},c[t],l+1)):c[t]=s[t]||null})}var s={};return n(t,this.options,s,0),s}}(t),t}),"use strict",Highcharts.theme={colors:["#2b908f","#90ee7e","#f45b5b","#7798BF","#aaeeee","#ff0066","#eeaaee","#55BF3B","#DF5353","#7798BF","#aaeeee"],chart:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:1,y2:1},stops:[[0,"#2a2a2b"],[1,"#3e3e40"]]},style:{fontFamily:"'Unica One', sans-serif"},plotBorderColor:"#606063"},title:{style:{color:"#E0E0E3",textTransform:"uppercase",fontSize:"20px"}},subtitle:{style:{color:"#E0E0E3",textTransform:"uppercase"}},xAxis:{gridLineColor:"#707073",labels:{style:{color:"#E0E0E3"}},lineColor:"#707073",minorGridLineColor:"#505053",tickColor:"#707073",title:{style:{color:"#A0A0A3"}}},yAxis:{gridLineColor:"#707073",labels:{style:{color:"#E0E0E3"}},lineColor:"#707073",minorGridLineColor:"#505053",tickColor:"#707073",tickWidth:1,title:{style:{color:"#A0A0A3"}}},tooltip:{backgroundColor:"rgba(0, 0, 0, 0.85)",style:{color:"#F0F0F0"}},plotOptions:{series:{dataLabels:{color:"#B0B0B3"},marker:{lineColor:"#333"}},boxplot:{fillColor:"#505053"},candlestick:{lineColor:"white"},errorbar:{color:"white"}},legend:{itemStyle:{color:"#E0E0E3"},itemHoverStyle:{color:"#FFF"},itemHiddenStyle:{color:"#606063"}},credits:{style:{color:"#666"}},labels:{style:{color:"#707073"}},drilldown:{activeAxisLabelStyle:{color:"#F0F0F3"},activeDataLabelStyle:{color:"#F0F0F3"}},navigation:{buttonOptions:{symbolStroke:"#DDDDDD",theme:{fill:"#505053"}}},rangeSelector:{buttonTheme:{fill:"#505053",stroke:"#000000",style:{color:"#CCC"},states:{hover:{fill:"#707073",stroke:"#000000",style:{color:"white"}},select:{fill:"#000003",stroke:"#000000",style:{color:"white"}}}},inputBoxBorderColor:"#505053",inputStyle:{backgroundColor:"#333",color:"silver"},labelStyle:{color:"silver"}},navigator:{handles:{backgroundColor:"#666",borderColor:"#AAA"},outlineColor:"#CCC",maskFill:"rgba(255,255,255,0.1)",series:{color:"#7798BF",lineColor:"#A6C7ED"},xAxis:{gridLineColor:"#505053"}},scrollbar:{barBackgroundColor:"#808083",barBorderColor:"#808083",buttonArrowColor:"#CCC",buttonBackgroundColor:"#606063",buttonBorderColor:"#606063",rifleColor:"#FFF",trackBackgroundColor:"#404043",trackBorderColor:"#404043"},legendBackgroundColor:"rgba(0, 0, 0, 0.5)",background2:"#505053",dataLabelsColor:"#B0B0B3",textColor:"#C0C0C0",contrastTextColor:"#F0F0F3",maskColor:"rgba(255,255,255,0.3)"},Highcharts.setOptions(Highcharts.theme),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";function t(){return ft.apply(null,arguments)}function C(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function oe(e){return e!=null&&"[object Object]"===Object.prototype.toString.call(e)}function g(e){return void 0===e}function B(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function he(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function mt(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function L(e,t){for(var n in t)u(t,n)&&(e[n]=t[n]);return u(t,"toString")&&(e.toString=t.toString),u(t,"valueOf")&&(e.valueOf=t.valueOf),e}function E(e,t,n,s){return Ct(e,t,n,s,!0).utc()}function o(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function $e(e){if(null==e._isValid){var t=o(e),s=Vn.call(t.parsedDateParts,function(e){return e!=null}),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&s);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function ge(e){var t=E(NaN);return e!=null?L(o(t),e):o(t).userInvalidated=!0,t}function Ie(e,t){var n,s,i;if(g(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),g(t._i)||(e._i=t._i),g(t._f)||(e._f=t._f),g(t._l)||(e._l=t._l),g(t._strict)||(e._strict=t._strict),g(t._tzm)||(e._tzm=t._tzm),g(t._isUTC)||(e._isUTC=t._isUTC),g(t._offset)||(e._offset=t._offset),g(t._pf)||(e._pf=o(t)),g(t._locale)||(e._locale=t._locale),Je.length>0)for(n=0;n<Je.length;n++)g(i=t[s=Je[n]])||(e[s]=i);return e}function ne(e){Ie(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===et&&(et=!0,t.updateOffset(this),et=!1)}function H(e){return e instanceof ne||e!=null&&null!=e._isAMomentObject}function y(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function i(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=y(t)),n}function St(e,t,n){var s,a=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),o=0;for(s=0;s<a;s++)(n&&e[s]!==t[s]||!n&&i(e[s])!==i(t[s]))&&o++;return o+r}function zt(e){!1===t.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function _(e,n){var s=!0;return L(function(){if(null!=t.deprecationHandler&&t.deprecationHandler(null,e),s){for(var o,r,a=[],i=0;i<arguments.length;i++){if(o="","object"==typeof arguments[i]){o+=`
|
|
[`+i+"] ";for(r in arguments[0])o+=r+": "+arguments[0][r]+", ";o=o.slice(0,-2)}else o=arguments[i];a.push(o)}zt(e+`
|
|
Arguments: `+Array.prototype.slice.call(a).join("")+`
|
|
`+(new Error).stack),s=!1}return n.apply(this,arguments)},n)}function Yt(e,n){null!=t.deprecationHandler&&t.deprecationHandler(e,n),ht[e]||(zt(n),ht[e]=!0)}function k(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function Jt(e,t){var n,s=L({},e);for(n in t)u(t,n)&&(oe(e[n])&&oe(t[n])?(s[n]={},L(s[n],e[n]),L(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)u(e,n)&&!u(t,n)&&oe(e[n])&&(s[n]=L({},s[n]));return s}function Ae(e){e!=null&&this.set(e)}function v(e,t){var n=e.toLowerCase();ee[n]=ee[n+"s"]=ee[t]=e}function j(e){return"string"==typeof e?ee[e]||ee[e.toLowerCase()]:void 0}function Fe(e){var t,n,s={};for(t in e)u(e,t)&&(n=j(t))&&(s[n]=e[t]);return s}function p(e,t){Qt[e]=t}function M(e,t,n){var s=""+Math.abs(e),o=t-s.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+s}function s(e,t,n,s){var o=s;"string"==typeof s&&(o=function(){return this[s]()}),e&&(X[e]=o),t&&(X[t[0]]=function(){return M(o.apply(this,arguments),t[1],t[2])}),n&&(X[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function _n(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function ce(e,t){return e.isValid()?(t=Ft(t,e.localeData()),nt[t]=nt[t]||function(e){var n,s,t=e.match(it);for(n=0,s=t.length;n<s;n++)X[t[n]]?t[n]=X[t[n]]:t[n]=_n(t[n]);return function(n){var o,i="";for(o=0;o<s;o++)i+=k(t[o])?t[o].call(n,e):t[o];return i}}(t),nt[t](e)):e.localeData().invalidDate()}function Ft(e,t){function s(e){return t.longDateFormat(e)||e}var n=5;for(Oe.lastIndex=0;n>=0&&Oe.test(e);)e=e.replace(Oe,s),Oe.lastIndex=0,n-=1;return e}function n(e,t,n){Pe[e]=k(t)?t:function(e){return e&&n?n:t}}function tn(e,t){return u(Pe,e)?Pe[e](t._strict,t._locale):new RegExp(function(e){return U(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\][]*)\]|\\(.)/g,function(e,t,n,s,o){return t||n||s||o}))}(e))}function U(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function c(e,t){var n,s=t;for("string"==typeof e&&(e=[e]),B(t)&&(s=function(e,n){n[t]=i(e)}),n=0;n<e.length;n++)Re[e[n]]=s}function Q(e,t){c(e,function(e,n,s,o){s._w=s._w||{},t(e,s._w,s,o)})}function on(e,t,n){t!=null&&u(Re,e)&&Re[e](t,n._a,n,e)}function se(e){return we(e)?366:365}function we(e){return e%4==0&&e%100!=0||e%400==0}function q(e,n){return function(s){return s!=null?(xt(this,e,s),t.updateOffset(this,n),this):_e(this,e)}}function _e(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function xt(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&we(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),de(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function de(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=function(e,t){return(e%t+t)%t}(t,12);return e+=(t-n)/12,1===n?we(e)?29:28:31-n%7%2}function dt(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=i(t);else if(t=e.localeData().monthsParse(t),!B(t))return e;return n=Math.min(e.date(),de(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ct(e){return e!=null?(dt(this,e),t.updateOffset(this,!0),this):_e(this,"Month")}function at(){function i(e,t){return t.length-e.length}var e,n,s=[],o=[],t=[];for(e=0;e<12;e++)n=E([2e3,e]),s.push(this.monthsShort(n,"")),o.push(this.months(n,"")),t.push(this.months(n,"")),t.push(this.monthsShort(n,""));for(s.sort(i),o.sort(i),t.sort(i),e=0;e<12;e++)s[e]=U(s[e]),o[e]=U(o[e]);for(e=0;e<24;e++)t[e]=U(t[e]);this._monthsRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function J(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function re(e,t,n){var s=7+t-n;return-((7+J(e,0,s).getUTCDay()-t)%7)+s-1}function vt(e,t,n,s,o){var a,r,i=1+7*(t-1)+(7+n-s)%7+re(e,s,o);return i<=0?r=se(a=e-1)+i:i>se(e)?(a=e+1,r=i-se(e)):(a=e,r=i),{year:a,dayOfYear:r}}function Z(e,t,n){var o,i,a=re(e.year(),t,n),s=Math.floor((e.dayOfYear()-a-1)/7)+1;return s<1?o=s+W(i=e.year()-1,t,n):s>W(e.year(),t,n)?(o=s-W(e.year(),t,n),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function W(e,t,n){var s=re(e,t,n),o=re(e+1,t,n);return(se(e)-s+o)/7}function Ye(){function o(e,t){return t.length-e.length}var e,i,a,r,c,l=[],n=[],s=[],t=[];for(e=0;e<7;e++)i=E([2e3,1]).day(e),a=this.weekdaysMin(i,""),r=this.weekdaysShort(i,""),c=this.weekdays(i,""),l.push(a),n.push(r),s.push(c),t.push(a),t.push(r),t.push(c);for(l.sort(o),n.sort(o),s.sort(o),t.sort(o),e=0;e<7;e++)n[e]=U(n[e]),s[e]=U(s[e]),t[e]=U(t[e]);this._weekdaysRegex=new RegExp("^("+t.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+l.join("|")+")","i")}function qe(){return this.hours()%12||12}function Gt(e,t){s(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Zt(e,t){return t._meridiemParse}function Ht(e){return e&&e.toLowerCase().replace("_","-")}function Qe(e){var t=null;if(!f[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=xe._abbr,require("./locale/"+e),K(t)}catch{}return f[e]}function K(e,t){var n;return e&&(n=g(t)?P(e):We(e,t))&&(xe=n),xe._abbr}function We(e,t){if(null!==t){var n=ot;if(t.abbr=e,null!=f[e])Yt("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=f[e]._config;else if(null!=t.parentLocale){if(null==f[t.parentLocale])return ae[t.parentLocale]||(ae[t.parentLocale]=[]),ae[t.parentLocale].push({name:e,config:t}),null;n=f[t.parentLocale]._config}return f[e]=new Ae(Jt(n,t)),ae[e]&&ae[e].forEach(function(e){We(e.name,e.config)}),K(e),f[e]}return delete f[e],null}function P(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return xe;if(!C(e)){if(t=Qe(e))return t;e=[e]}return function(e){for(var t,n,o,i,s=0;s<e.length;){for(t=(o=Ht(e[s]).split("-")).length,n=(n=Ht(e[s+1]))?n.split("-"):null;t>0;){if(i=Qe(o.slice(0,t).join("-")))return i;if(n&&n.length>=t&&St(o,n,!0)>=t-1)break;t--}s++}return null}(e)}function Ze(e){var n,t=e._a;return t&&-2===o(e).overflow&&(n=t[F]<0||t[F]>11?F:t[S]<1||t[S]>de(t[O],t[F])?S:t[m]<0||t[m]>24||24===t[m]&&(0!==t[w]||0!==t[T]||0!==t[V])?m:t[w]<0||t[w]>59?w:t[T]<0||t[T]>59?T:t[V]<0||t[V]>999?V:-1,o(e)._overflowDayOfYear&&(n<O||n>S)&&(n=S),o(e)._overflowWeeks&&-1===n&&(n=yn),o(e)._overflowWeekday&&-1===n&&(n=jn),o(e).overflow=n),e}function Y(e,t,n){return e??t??n}function Xe(e){var n,s,i,a,c,r=[];if(!e._d){for(i=function(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}(e),e._w&&null==e._a[S]&&null==e._a[F]&&function(e){if(null!=(t=e._w).GG||null!=t.W||null!=t.E)s=1,a=4,r=Y(t.GG,e._a[O],Z(d(),1,4).year),i=Y(t.W,1),((n=Y(t.E,1))<1||n>7)&&(c=!0);else{s=e._locale._week.dow,a=e._locale._week.doy;var t,n,s,i,a,r,c,l,u=Z(d(),s,a);r=Y(t.gg,e._a[O],u.year),i=Y(t.w,u.week),null!=t.d?((n=t.d)<0||n>6)&&(c=!0):null!=t.e?(n=t.e+s,(t.e<0||t.e>6)&&(c=!0)):n=s}i<1||i>W(r,s,a)?o(e)._overflowWeeks=!0:c!=null?o(e)._overflowWeekday=!0:(l=vt(r,i,n,s,a),e._a[O]=l.year,e._dayOfYear=l.dayOfYear)}(e),null!=e._dayOfYear&&(a=Y(e._a[O],i[O]),(e._dayOfYear>se(a)||0===e._dayOfYear)&&(o(e)._overflowDayOfYear=!0),s=J(a,0,e._dayOfYear),e._a[F]=s.getUTCMonth(),e._a[S]=s.getUTCDate()),n=0;n<3&&null==e._a[n];++n)e._a[n]=r[n]=i[n];for(;n<7;n++)e._a[n]=r[n]=null==e._a[n]?2===n?1:0:e._a[n];24===e._a[m]&&0===e._a[w]&&0===e._a[T]&&0===e._a[V]&&(e._nextDay=!0,e._a[m]=0),e._d=(e._useUTC?J:function(e,t,n,s,o,i,a){var r=new Date(e,t,n,s,o,i,a);return e<100&&e>=0&&isFinite(r.getFullYear())&&r.setFullYear(e),r}).apply(null,r),c=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[m]=24),e._w&&void 0!==e._w.d&&e._w.d!==c&&(o(e).weekdayMismatch=!0)}}function rt(e){var t,s,i,a,r,c,l=e._i,n=sn.exec(l)||$n.exec(l);if(n){for(o(e).iso=!0,t=0,s=Ce.length;t<s;t++)if(Ce[t][1].exec(n[1])){a=Ce[t][0],r=!1!==Ce[t][2];break}if(a==null)return void(e._isValid=!1);if(n[3]){for(t=0,s=Te.length;t<s;t++)if(Te[t][1].exec(n[3])){i=(n[2]||" ")+Te[t][0];break}if(i==null)return void(e._isValid=!1)}if(!r&&i!=null)return void(e._isValid=!1);if(n[4]){if(!On.exec(n[4]))return void(e._isValid=!1);c="Z"}e._f=a+(i||"")+(c||""),Be(e)}else e._isValid=!1}function wn(e,t,n,s,o,i){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),It.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(o,10)];return i&&a.push(parseInt(i,10)),a}function yt(e){var n,t=rn.exec(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e._i));if(t){if(n=wn(t[4],t[3],t[2],t[5],t[6],t[7]),!function(e,t,n){return!e||Wt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(o(n).weekdayMismatch=!0,n._isValid=!1,!1)}(t[1],n,e))return;e._a=n,e._tzm=function(e,t,n){if(e)return cn[e];if(t)return 0;var s=parseInt(n,10),o=s%100;return(s-o)/100*60+o}(t[8],t[9],t[10]),e._d=J.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),o(e).rfc2822=!0}else e._isValid=!1}function Be(e){if(e._f!==t.ISO_8601)if(e._f!==t.RFC_2822){e._a=[],o(e).empty=!0;var s,i,a,r,c,n=""+e._i,d=n.length,l=0;for(r=Ft(e._f,e._locale).match(it)||[],a=0;a<r.length;a++)i=r[a],(s=(n.match(tn(i,e))||[])[0])&&((c=n.substr(0,n.indexOf(s))).length>0&&o(e).unusedInput.push(c),n=n.slice(n.indexOf(s)+s.length),l+=s.length),X[i]?(s?o(e).empty=!1:o(e).unusedTokens.push(i),on(i,s,e)):e._strict&&!s&&o(e).unusedTokens.push(i);o(e).charsLeftOver=d-l,n.length>0&&o(e).unusedInput.push(n),e._a[m]<=12&&!0===o(e).bigHour&&e._a[m]>0&&(o(e).bigHour=void 0),o(e).parsedDateParts=e._a.slice(0),o(e).meridiem=e._meridiem,e._a[m]=function(e,t,n){var s;return n==null?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0),t):t}(e._locale,e._a[m],e._meridiem),Xe(e),Ze(e)}else yt(e);else rt(e)}function wt(e){var n=e._i,s=e._f;return e._locale=e._locale||P(e._l),null===n||void 0===s&&""===n?ge({nullInput:!0}):("string"==typeof n&&(e._i=n=e._locale.preparse(n)),H(n)?new ne(Ze(n)):(he(n)?e._d=n:C(s)?function(e){var t,n,s,i,a;if(0===e._f.length)return o(e).invalidFormat=!0,void(e._d=new Date(NaN));for(s=0;s<e._f.length;s++)n=0,t=Ie({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[s],Be(t),$e(t)&&(n+=o(t).charsLeftOver,n+=10*o(t).unusedTokens.length,o(t).score=n,(i==null||n<i)&&(i=n,a=t));L(e,a||t)}(e):s?Be(e):function(e){var n=e._i;g(n)?e._d=new Date(t.now()):he(n)?e._d=new Date(n.valueOf()):"string"==typeof n?function(e){var n=an.exec(e._i);null===n?(rt(e),!1===e._isValid&&(delete e._isValid,yt(e),!1===e._isValid&&(delete e._isValid,t.createFromInputFallback(e)))):e._d=new Date(+n[1])}(e):C(n)?(e._a=mt(n.slice(0),function(e){return parseInt(e,10)}),Xe(e)):oe(n)?function(e){if(!e._d){var t=Fe(e._i);e._a=mt([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Xe(e)}}(e):B(n)?e._d=new Date(n):t.createFromInputFallback(e)}(e),$e(e)||(e._d=null),e))}function Ct(e,t,n,s,o){var i={};return!0!==n&&!1!==n||(s=n,n=void 0),(oe(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||C(e)&&0===e.length)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=o,i._l=n,i._i=e,i._f=t,i._strict=s,function(e){var t=new ne(Ze(wt(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}(i)}function d(e,t,n,s){return Ct(e,t,n,s,!1)}function Bt(e,t){var n,s;if(1===t.length&&C(t[0])&&(t=t[0]),!t.length)return d();for(s=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](s)||(s=t[n]);return s}function ye(e){var t=Fe(e),n=t.year||0,s=t.quarter||0,o=t.month||0,a=t.week||0,r=t.day||0,c=t.hour||0,l=t.minute||0,d=t.second||0,u=t.millisecond||0;this._isValid=function(e){for(n in e)if(-1===h.call(ie,n)||null!=e[n]&&isNaN(e[n]))return!1;for(var n,s=!1,t=0;t<ie.length;++t)if(e[ie[t]]){if(s)return!1;parseFloat(e[ie[t]])!==i(e[ie[t]])&&(s=!0)}return!0}(t),this._milliseconds=+u+1e3*d+6e4*l+1e3*c*60*60,this._days=+r+7*a,this._months=+o+3*s+12*n,this._data={},this._locale=P(),this._bubble()}function Ne(e){return e instanceof ye}function De(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Xt(e,t){s(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+M(~~(e/60),2)+t+M(~~e%60,2)})}function Se(e,t){if(n=(t||"").match(e),null===n)return null;var n,s=((n[n.length-1]||[])+"").match(qt)||["-",0,0],o=60*s[1]+i(s[2]);return 0===o?0:"+"===s[0]?o:-o}function ke(e,n){var s,o;return n._isUTC?(s=n.clone(),o=(H(e)||he(e)?e.valueOf():d(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+o),t.updateOffset(s,!1),s):d(e).local()}function Ee(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function en(){return!!this.isValid()&&this._isUTC&&0===this._offset}function x(e,t){var o,a,r,s=e,n=null;return Ne(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:B(e)?(s={},t?s[t]=e:s.milliseconds=e):(n=Kt.exec(e))?(o="-"===n[1]?-1:1,s={y:0,d:i(n[S])*o,h:i(n[m])*o,m:i(n[w])*o,s:i(n[T])*o,ms:i(De(1e3*n[V]))*o}):(n=Ut.exec(e))?(o="-"===n[1]?-1:(n[1],1),s={y:I(n[2],o),M:I(n[3],o),w:I(n[4],o),d:I(n[5],o),h:I(n[6],o),m:I(n[7],o),s:I(n[8],o)}):s==null?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(r=function(e,t){var n;return!e.isValid()||!t.isValid()?{milliseconds:0,months:0}:(t=ke(t,e),e.isBefore(t)?n=Rt(e,t):((n=Rt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n)}(d(s.from),d(s.to)),(s={}).ms=r.milliseconds,s.M=r.months),a=new ye(s),Ne(e)&&u(e,"_locale")&&(a._locale=e._locale),a}function I(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Rt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Lt(e,t){return function(n,s){var o,i;return null===s||isNaN(+s)||(Yt(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=s,s=i),n="string"==typeof n?+n:n,o=x(n,s),Tt(this,o,e),this}}function Tt(e,n,s,o){var r=n._milliseconds,i=De(n._days),a=De(n._months);e.isValid()&&(o=o==null||o,a&&dt(e,_e(e,"Month")+a*s),i&&xt(e,"Date",_e(e,"Date")+i*s),r&&e._d.setTime(e._d.valueOf()+r*s),o&&t.updateOffset(e,i||a))}function ze(e,t){var o,s=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(s,"months");return o=t-n<0?(t-n)/(n-e.clone().add(s-1,"months")):(t-n)/(e.clone().add(s+1,"months")-n),-(s+o)||0}function At(e){var t;return void 0===e?this._locale._abbr:(null!=(t=P(e))&&(this._locale=t),this)}function kt(){return this._locale}function je(e,t){s(0,[e,e.length],0,t)}function Et(e,t,n,s,o){var i;return e==null?Z(this,s,o).year:(i=W(e,s,o),t>i&&(t=i),function(e,t,n,s,o){var a=vt(e,t,n,s,o),i=J(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}.call(this,e,t,n,s,o))}function vn(e,t){t[V]=i(1e3*("0."+e))}function Ot(e){return e}function ve(e,t,n,s){var o=P(),i=E().set(s,t);return o[n](i,e)}function _t(e,t,n){if(B(e)&&(t=e,e=void 0),e=e||"",t!=null)return ve(e,t,n,"month");var s,o=[];for(s=0;s<12;s++)o[s]=ve(e,s,n,"month");return o}function Ve(e,t,n,s){"boolean"==typeof e?(B(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,B(t)&&(n=t,t=void 0),t=t||"");var o,i,r=P(),a=e?r._week.dow:0;if(n!=null)return ve(t,(n+a)%7,s,"day");i=[];for(o=0;o<7;o++)i[o]=ve(t,(o+a)%7,s,"day");return i}function jt(e,t,n,s){var o=x(t,n);return e._milliseconds+=s*o._milliseconds,e._days+=s*o._days,e._months+=s*o._months,e._bubble()}function st(e){return e<0?Math.floor(e):Math.ceil(e)}function bt(e){return 4800*e/146097}function Ke(e){return 146097*e/4800}function N(e){return function(){return this.as(e)}}function $(e){return function(){return this.isValid()?this._data[e]:NaN}}function G(e){return(e>0)-(e<0)||+e}function ue(){if(!this.isValid())return this.localeData().invalidDate();var o,t=Ge(this._milliseconds)/1e3,h=Ge(this._days),r=Ge(this._months),p=y((o=y(t/60))/60);t%=60,o%=60;var d=y(r/12),l=r%=12,c=h,n=p,a=o,i=t?t.toFixed(3).replace(/\.?0+$/,""):"",e=this.asSeconds();if(!e)return"P0D";var m=e<0?"-":"",u=G(this._months)!==G(e)?"-":"",f=G(this._days)!==G(e)?"-":"",s=G(this._milliseconds)!==G(e)?"-":"";return m+"P"+(d?u+d+"Y":"")+(l?u+l+"M":"")+(c?f+c+"D":"")+(n||a||i?"T":"")+(n?s+n+"H":"")+(a?s+a+"M":"")+(i?s+i+"S":"")}var Vn=Array.prototype.some?Array.prototype.some:function(e){for(var n=Object(this),s=n.length>>>0,t=0;t<s;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1},Je=t.momentProperties=[],et=!1,ht={};t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;var e,r,h,R,Wn=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)u(e,t)&&n.push(t);return n},ft,Vn,ee={},Qt={},it=/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Oe=/(\[[^[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,nt={},X={},lt=/\d/,b=/\d\d/,ut=/\d{3}/,tt=/\d{4}/,le=/[+-]?\d{6}/,l=/\d\d?/,pt=/\d\d\d\d?/,gt=/\d\d\d\d\d\d?/,me=/\d{1,3}/,Ue=/\d{1,4}/,fe=/[+-]?\d{1,6}/,Bn=/\d+/,pe=/[+-]?\d+/,Cn=/Z|[+-]\d\d:?\d\d/gi,be=/Z|[+-]\d\d(?::?\d\d)?/gi,te=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Pe={},Re={},O=0,F=1,S=2,m=3,w=4,T=5,V=6,yn=7,jn=8,Me,qt,Kt,Ut,$t,Vt,Le,He,Nt,Dt,Mt;s("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),s(0,["YY",2],0,function(){return this.year()%100}),s(0,["YYYY",4],0,"year"),s(0,["YYYYY",5],0,"year"),s(0,["YYYYYY",6,!0],0,"year"),v("year","y"),p("year",1),n("Y",pe),n("YY",l,b),n("YYYY",Ue,tt),n("YYYYY",fe,le),n("YYYYYY",fe,le),c(["YYYYY","YYYYYY"],O),c("YYYY",function(e,n){n[O]=2===e.length?t.parseTwoDigitYear(e):i(e)}),c("YY",function(e,n){n[O]=t.parseTwoDigitYear(e)}),c("Y",function(e,t){t[O]=parseInt(e,10)}),t.parseTwoDigitYear=function(e){return i(e)+(i(e)>68?1900:2e3)},Me=q("FullYear",!0),h=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},s("M",["MM",2],"Mo",function(){return this.month()+1}),s("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),s("MMMM",0,0,function(e){return this.localeData().months(this,e)}),v("month","M"),p("month",8),n("M",l),n("MM",l,b),n("MMM",function(e,t){return t.monthsShortRegex(e)}),n("MMMM",function(e,t){return t.monthsRegex(e)}),c(["M","MM"],function(e,t){t[F]=i(e)-1}),c(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);i!=null?t[F]=i:o(n).invalidMonth=e});var Pt=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/,bn="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),It="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),xn=te,gn=te;s("w",["ww",2],"wo","week"),s("W",["WW",2],"Wo","isoWeek"),v("week","w"),v("isoWeek","W"),p("week",5),p("isoWeek",5),n("w",l),n("ww",l,b),n("W",l),n("WW",l,b),Q(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=i(e)}),s("d",0,"do","day"),s("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),s("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),s("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),s("e",0,0,"weekday"),s("E",0,0,"isoWeekday"),v("day","d"),v("weekday","e"),v("isoWeekday","E"),p("day",11),p("weekday",11),p("isoWeekday",11),n("d",l),n("e",l),n("E",l),n("dd",function(e,t){return t.weekdaysMinRegex(e)}),n("ddd",function(e,t){return t.weekdaysShortRegex(e)}),n("dddd",function(e,t){return t.weekdaysRegex(e)}),Q(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);i!=null?t.d=i:o(n).invalidWeekday=e}),Q(["d","e","E"],function(e,t,n,s){t[s]=i(e)});var pn="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Wt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),fn="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),mn=te,hn=te,un=te;s("H",["HH",2],0,"hour"),s("h",["hh",2],0,qe),s("k",["kk",2],0,function(){return this.hours()||24}),s("hmm",0,0,function(){return""+qe.apply(this)+M(this.minutes(),2)}),s("hmmss",0,0,function(){return""+qe.apply(this)+M(this.minutes(),2)+M(this.seconds(),2)}),s("Hmm",0,0,function(){return""+this.hours()+M(this.minutes(),2)}),s("Hmmss",0,0,function(){return""+this.hours()+M(this.minutes(),2)+M(this.seconds(),2)}),Gt("a",!0),Gt("A",!1),v("hour","h"),p("hour",13),n("a",Zt),n("A",Zt),n("H",l),n("h",l),n("k",l),n("HH",l,b),n("hh",l,b),n("kk",l,b),n("hmm",pt),n("hmmss",gt),n("Hmm",pt),n("Hmmss",gt),c(["H","HH"],m),c(["k","kk"],function(e,t){var s=i(e);t[m]=24===s?0:s}),c(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),c(["h","hh"],function(e,t,n){t[m]=i(e),o(n).bigHour=!0}),c("hmm",function(e,t,n){var s=e.length-2;t[m]=i(e.substr(0,s)),t[w]=i(e.substr(s)),o(n).bigHour=!0}),c("hmmss",function(e,t,n){var s=e.length-4,a=e.length-2;t[m]=i(e.substr(0,s)),t[w]=i(e.substr(s,2)),t[T]=i(e.substr(a)),o(n).bigHour=!0}),c("Hmm",function(e,t){var s=e.length-2;t[m]=i(e.substr(0,s)),t[w]=i(e.substr(s))}),c("Hmmss",function(e,t){var s=e.length-4,o=e.length-2;t[m]=i(e.substr(0,s)),t[w]=i(e.substr(s,2)),t[T]=i(e.substr(o))});var xe,nn=q("Hours",!0),ot={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:bn,monthsShort:It,week:{dow:0,doy:6},weekdays:pn,weekdaysMin:fn,weekdaysShort:Wt,meridiemParse:/[ap]\.?m?\.?/i},f={},ae={},sn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,$n=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,On=/Z|[+-]\d\d(?::?\d\d)?/,Ce=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Te=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],an=/^\/?Date\((-?\d+)/i,rn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,cn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};t.createFromInputFallback=_("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),t.ISO_8601=function(){},t.RFC_2822=function(){};var ln=_("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=d.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:ge()}),dn=_("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=d.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:ge()}),ie=["year","quarter","month","week","day","hour","minute","second","millisecond"];Xt("Z",":"),Xt("ZZ",""),n("Z",be),n("ZZ",be),c(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Se(be,e)}),qt=/([+-]|\d\d)/gi,t.updateOffset=function(){},Kt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ut=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,x.fn=ye.prototype,x.invalid=function(){return x(NaN)},$t=Lt(1,"add"),Vt=Lt(-1,"subtract"),t.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",t.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",Le=_("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)}),s(0,["gg",2],0,function(){return this.weekYear()%100}),s(0,["GG",2],0,function(){return this.isoWeekYear()%100}),je("gggg","weekYear"),je("ggggg","weekYear"),je("GGGG","isoWeekYear"),je("GGGGG","isoWeekYear"),v("weekYear","gg"),v("isoWeekYear","GG"),p("weekYear",1),p("isoWeekYear",1),n("G",pe),n("g",pe),n("GG",l,b),n("gg",l,b),n("GGGG",Ue,tt),n("gggg",Ue,tt),n("GGGGG",fe,le),n("ggggg",fe,le),Q(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=i(e)}),Q(["gg","GG"],function(e,n,s,o){n[o]=t.parseTwoDigitYear(e)}),s("Q",0,"Qo","quarter"),v("quarter","Q"),p("quarter",7),n("Q",lt),c("Q",function(e,t){t[F]=3*(i(e)-1)}),s("D",["DD",2],"Do","date"),v("date","D"),p("date",9),n("D",l),n("DD",l,b),n("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),c(["D","DD"],S),c("Do",function(e,t){t[S]=i(e.match(l)[0])}),He=q("Date",!0),s("DDD",["DDDD",3],"DDDo","dayOfYear"),v("dayOfYear","DDD"),p("dayOfYear",4),n("DDD",me),n("DDDD",ut),c(["DDD","DDDD"],function(e,t,n){n._dayOfYear=i(e)}),s("m",["mm",2],0,"minute"),v("minute","m"),p("minute",14),n("m",l),n("mm",l,b),c(["m","mm"],w),Nt=q("Minutes",!1),s("s",["ss",2],0,"second"),v("second","s"),p("second",15),n("s",l),n("ss",l,b),c(["s","ss"],T),Dt=q("Seconds",!1),s("S",0,0,function(){return~~(this.millisecond()/100)}),s(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),s(0,["SSS",3],0,"millisecond"),s(0,["SSSS",4],0,function(){return 10*this.millisecond()}),s(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),s(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),s(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),s(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),s(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),v("millisecond","ms"),p("millisecond",16),n("S",me,lt),n("SS",me,b),n("SSS",me,ut);for(R="SSSS";R.length<=9;R+="S")n(R,Bn);for(R="S";R.length<=9;R+="S")c(R,vn);Mt=q("Milliseconds",!1),s("z",0,0,"zoneAbbr"),s("zz",0,0,"zoneName"),e=ne.prototype,e.add=$t,e.calendar=function(e,n){var o=e||d(),i=ke(o,this).startOf("day"),s=t.calendarFormat(this,i)||"sameElse",a=n&&(k(n[s])?n[s].call(this,o):n[s]);return this.format(a||this.localeData().calendar(s,this,d(o)))},e.clone=function(){return new ne(this)},e.diff=function(e,t,n){var s,o,i;if(!this.isValid())return NaN;if(!(s=ke(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=j(t)){case"year":o=ze(this,s)/12;break;case"month":o=ze(this,s);break;case"quarter":o=ze(this,s)/3;break;case"second":o=(this-s)/1e3;break;case"minute":o=(this-s)/6e4;break;case"hour":o=(this-s)/36e5;break;case"day":o=(this-s-i)/864e5;break;case"week":o=(this-s-i)/6048e5;break;default:o=this-s}return n?o:y(o)},e.endOf=function(e){return void 0===(e=j(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},e.format=function(e){e||(e=this.isUtc()?t.defaultFormatUtc:t.defaultFormat);var n=ce(this,e);return this.localeData().postformat(n)},e.from=function(e,t){return this.isValid()&&(H(e)&&e.isValid()||d(e).isValid())?x({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},e.fromNow=function(e){return this.from(d(),e)},e.to=function(e,t){return this.isValid()&&(H(e)&&e.isValid()||d(e).isValid())?x({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},e.toNow=function(e){return this.to(d(),e)},e.get=function(e){return e=j(e),k(this[e])?this[e]():this},e.invalidAt=function(){return o(this).overflow},e.isAfter=function(e,t){var n=H(e)?e:d(e);return!!this.isValid()&&!!n.isValid()&&("millisecond"===(t=j(g(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},e.isBefore=function(e,t){var n=H(e)?e:d(e);return!!this.isValid()&&!!n.isValid()&&("millisecond"===(t=j(g(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},e.isBetween=function(e,t,n,s){return("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},e.isSame=function(e,t){var n,s=H(e)?e:d(e);return!!this.isValid()&&!!s.isValid()&&("millisecond"===(t=j(t||"millisecond"))?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},e.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},e.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},e.isValid=function(){return $e(this)},e.lang=Le,e.locale=At,e.localeData=kt,e.max=dn,e.min=ln,e.parsingFlags=function(){return L({},o(this))},e.set=function(e,t){if("object"==typeof e)for(var s=function(e){var n,t=[];for(n in e)t.push({unit:n,priority:Qt[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=Fe(e)),n=0;n<s.length;n++)this[s[n].unit](e[s[n].unit]);else if(e=j(e),k(this[e]))return this[e](t);return this},e.startOf=function(e){switch(e=j(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},e.subtract=Vt,e.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]},e.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}},e.toDate=function(){return new Date(this.valueOf())},e.toISOString=function(e){if(!this.isValid())return null;var n=!0!==e,t=n?this.clone().utc():this;return t.year()<0||t.year()>9999?ce(t,n?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?n?this.toDate().toISOString():new Date(this._d.valueOf()).toISOString().replace("Z",ce(t,"Z")):ce(t,n?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},e.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";e="moment",t="",this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var e,t,n="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=t+'[")]';return this.format(n+s+"-MM-DD[T]HH:mm:ss.SSS"+o)},e.toJSON=function(){return this.isValid()?this.toISOString():null},e.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},e.unix=function(){return Math.floor(this.valueOf()/1e3)},e.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},e.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},e.year=Me,e.isLeapYear=function(){return we(this.year())},e.weekYear=function(e){return Et.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},e.isoWeekYear=function(e){return Et.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},e.quarter=e.quarters=function(e){return e==null?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},e.month=ct,e.daysInMonth=function(){return de(this.year(),this.month())},e.week=e.weeks=function(e){var t=this.localeData().week(this);return e==null?t:this.add(7*(e-t),"d")},e.isoWeek=e.isoWeeks=function(e){var t=Z(this,1,4).week;return e==null?t:this.add(7*(e-t),"d")},e.weeksInYear=function(){var e=this.localeData()._week;return W(this.year(),e.dow,e.doy)},e.isoWeeksInYear=function(){return W(this.year(),1,4)},e.date=He,e.day=e.days=function(e){if(!this.isValid())return e!=null?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return e!=null?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},e.weekday=function(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")},e.isoWeekday=function(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},e.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")},e.hour=e.hours=nn,e.minute=e.minutes=Nt,e.second=e.seconds=Dt,e.millisecond=e.milliseconds=Mt,e.utcOffset=function(e,n,s){var o,i=this._offset||0;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if("string"==typeof e){if(null===(e=Se(be,e)))return this}else Math.abs(e)<16&&!s&&(e*=60);return!this._isUTC&&n&&(o=Ee(this)),this._offset=e,this._isUTC=!0,o!=null&&this.add(o,"m"),i!==e&&(!n||this._changeInProgress?Tt(this,x(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,t.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Ee(this)},e.utc=function(e){return this.utcOffset(0,e)},e.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Ee(this),"m")),this},e.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Se(Cn,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this},e.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?d(e).utcOffset():0,(this.utcOffset()-e)%60==0)},e.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},e.isLocal=function(){return!!this.isValid()&&!this._isUTC},e.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},e.isUtc=en,e.isUTC=en,e.zoneAbbr=function(){return this._isUTC?"UTC":""},e.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},e.dates=_("dates accessor is deprecated. Use date instead.",He),e.months=_("months accessor is deprecated. Use month instead",ct),e.years=_("years accessor is deprecated. Use year instead",Me),e.zone=_("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return e!=null?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),e.isDSTShifted=_("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!g(this._isDSTShifted))return this._isDSTShifted;var t,e={};return Ie(e,this),(e=wt(e))._a?(t=e._isUTC?E(e._a):d(e._a),this._isDSTShifted=this.isValid()&&St(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}),r=Ae.prototype,r.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return k(s)?s.call(t,n):s},r.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},r.invalidDate=function(){return this._invalidDate},r.ordinal=function(e){return this._ordinal.replace("%d",e)},r.preparse=Ot,r.postformat=Ot,r.relativeTime=function(e,t,n,s){var o=this._relativeTime[n];return k(o)?o(e,t,n,s):o.replace(/%d/i,e)},r.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return k(n)?n(t):n.replace(/%s/i,t)},r.set=function(e){var t,n;for(t in e)k(n=e[t])?this[t]=n:this["_"+t]=n;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},r.months=function(e,t){return e?C(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pt).test(t)?"format":"standalone"][e.month()]:C(this._months)?this._months:this._months.standalone},r.monthsShort=function(e,t){return e?C(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pt.test(t)?"format":"standalone"][e.month()]:C(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},r.monthsParse=function(e,t,n){var s,o,i;if(this._monthsParseExact)return function(e,t,n){var s,o,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)a=E([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(s=h.call(this._shortMonthsParse,i))?s:null:-1!==(s=h.call(this._longMonthsParse,i))?s:null:"MMM"===t?-1!==(s=h.call(this._shortMonthsParse,i))?s:-1!==(s=h.call(this._longMonthsParse,i))?s:null:-1!==(s=h.call(this._longMonthsParse,i))?s:-1!==(s=h.call(this._shortMonthsParse,i))?s:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(o=E([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[s]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},r.monthsRegex=function(e){return this._monthsParseExact?(u(this,"_monthsRegex")||at.call(this),e?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=gn),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},r.monthsShortRegex=function(e){return this._monthsParseExact?(u(this,"_monthsRegex")||at.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=xn),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},r.week=function(e){return Z(e,this._week.dow,this._week.doy).week},r.firstDayOfYear=function(){return this._week.doy},r.firstDayOfWeek=function(){return this._week.dow},r.weekdays=function(e,t){return e?C(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:C(this._weekdays)?this._weekdays:this._weekdays.standalone},r.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},r.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},r.weekdaysParse=function(e,t,n){var s,o,i;if(this._weekdaysParseExact)return function(e,t,n){var s,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)a=E([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(s=h.call(this._weekdaysParse,o))?s:null:"ddd"===t?-1!==(s=h.call(this._shortWeekdaysParse,o))?s:null:-1!==(s=h.call(this._minWeekdaysParse,o))?s:null:"dddd"===t?-1!==(s=h.call(this._weekdaysParse,o))?s:-1!==(s=h.call(this._shortWeekdaysParse,o))?s:-1!==(s=h.call(this._minWeekdaysParse,o))?s:null:"ddd"===t?-1!==(s=h.call(this._shortWeekdaysParse,o))?s:-1!==(s=h.call(this._weekdaysParse,o))?s:-1!==(s=h.call(this._minWeekdaysParse,o))?s:null:-1!==(s=h.call(this._minWeekdaysParse,o))?s:-1!==(s=h.call(this._weekdaysParse,o))?s:-1!==(s=h.call(this._shortWeekdaysParse,o))?s:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(o=E([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(o,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(o,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(o,"").replace(".",".?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},r.weekdaysRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Ye.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=mn),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},r.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Ye.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=hn),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},r.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Ye.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=un),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},r.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},r.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},K("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===i(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),t.lang=_("moment.lang is deprecated. Use moment.locale instead.",K),t.langData=_("moment.langData is deprecated. Use moment.localeData instead.",P);var z=Math.abs,En=N("ms"),kn=N("s"),An=N("m"),Sn=N("h"),Mn=N("d"),Fn=N("w"),Tn=N("M"),zn=N("y"),Dn=$("milliseconds"),Nn=$("seconds"),Ln=$("minutes"),Rn=$("hours"),Pn=$("days"),Hn=$("months"),In=$("years"),D=Math.round,A={ss:44,s:45,m:45,h:22,d:26,M:11},Ge=Math.abs,a=ye.prototype;return a.isValid=function(){return this._isValid},a.abs=function(){var e=this._data;return this._milliseconds=z(this._milliseconds),this._days=z(this._days),this._months=z(this._months),e.milliseconds=z(e.milliseconds),e.seconds=z(e.seconds),e.minutes=z(e.minutes),e.hours=z(e.hours),e.months=z(e.months),e.years=z(e.years),this},a.add=function(e,t){return jt(this,e,t,1)},a.subtract=function(e,t){return jt(this,e,t,-1)},a.as=function(e){if(!this.isValid())return NaN;var t,s,n=this._milliseconds;if("month"===(e=j(e))||"year"===e)return t=this._days+n/864e5,s=this._months+bt(t),"month"===e?s:s/12;switch(t=this._days+Math.round(Ke(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}},a.asMilliseconds=En,a.asSeconds=kn,a.asMinutes=An,a.asHours=Sn,a.asDays=Mn,a.asWeeks=Fn,a.asMonths=Tn,a.asYears=zn,a.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*i(this._months/12):NaN},a._bubble=function(){var o,i,a,r,c,s=this._milliseconds,e=this._days,t=this._months,n=this._data;return s>=0&&e>=0&&t>=0||s<=0&&e<=0&&t<=0||(s+=864e5*st(Ke(t)+e),e=0,t=0),n.milliseconds=s%1e3,o=y(s/1e3),n.seconds=o%60,i=y(o/60),n.minutes=i%60,a=y(i/60),n.hours=a%24,e+=y(a/24),r=y(bt(e)),t+=r,e-=st(Ke(r)),c=y(t/12),t%=12,n.days=e,n.months=t,n.years=c,this},a.clone=function(){return x(this)},a.get=function(e){return e=j(e),this.isValid()?this[e+"s"]():NaN},a.milliseconds=Dn,a.seconds=Nn,a.minutes=Ln,a.hours=Rn,a.days=Pn,a.weeks=function(){return y(this.days()/7)},a.months=Hn,a.years=In,a.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var s=x(e).abs(),o=D(s.as("s")),a=D(s.as("m")),r=D(s.as("h")),c=D(s.as("d")),l=D(s.as("M")),d=D(s.as("y")),i=o<=A.ss&&["s",o]||o<A.s&&["ss",o]||a<=1&&["m"]||a<A.m&&["mm",a]||r<=1&&["h"]||r<A.h&&["hh",r]||c<=1&&["d"]||c<A.d&&["dd",c]||l<=1&&["M"]||l<A.M&&["MM",l]||d<=1&&["y"]||["yy",d];return i[2]=t,i[3]=+e>0,i[4]=n,function(e,t,n,s,o){return o.relativeTime(t||1,!!n,e,s)}.apply(null,i)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},a.toISOString=ue,a.toString=ue,a.toJSON=ue,a.locale=At,a.localeData=kt,a.toIsoString=_("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ue),a.lang=Le,s("X",0,0,"unix"),s("x",0,0,"valueOf"),n("x",pe),n("X",/[+-]?\d+(\.\d{1,3})?/),c("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),c("x",function(e,t,n){n._d=new Date(i(e))}),t.version="2.20.1",function(e){ft=e}(d),t.fn=e,t.min=function(){return Bt("isBefore",[].slice.call(arguments,0))},t.max=function(){return Bt("isAfter",[].slice.call(arguments,0))},t.now=function(){return Date.now?Date.now():+new Date},t.utc=E,t.unix=function(e){return d(1e3*e)},t.months=function(e,t){return _t(e,t,"months")},t.isDate=he,t.locale=K,t.invalid=ge,t.duration=x,t.isMoment=H,t.weekdays=function(e,t,n){return Ve(e,t,n,"weekdays")},t.parseZone=function(){return d.apply(null,arguments).parseZone()},t.localeData=P,t.isDuration=Ne,t.monthsShort=function(e,t){return _t(e,t,"monthsShort")},t.weekdaysMin=function(e,t,n){return Ve(e,t,n,"weekdaysMin")},t.defineLocale=We,t.updateLocale=function(e,t){if(t!=null){var n,s,o=ot;null!=(s=Qe(e))&&(o=s._config),(n=new Ae(t=Jt(o,t))).parentLocale=f[e],f[e]=n,K(e)}else null!=f[e]&&(null!=f[e].parentLocale?f[e]=f[e].parentLocale:null!=f[e]&&delete f[e]);return f[e]},t.locales=function(){return Wn(f)},t.weekdaysShort=function(e,t,n){return Ve(e,t,n,"weekdaysShort")},t.normalizeUnits=j,t.relativeTimeRounding=function(e){return void 0===e?D:"function"==typeof e&&(D=e,!0)},t.relativeTimeThreshold=function(e,t){return void 0!==A[e]&&(void 0===t?A[e]:(A[e]=t,"s"===e&&(A.ss=t-1),!0))},t.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},t.prototype=e,t.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},t}) |