/* Highcharts JS v8.0.4 (2020-03-10) (c) 2009-2018 Torstein Honsi License: www.highcharts.com/license */ (function(aa,S){"object"===typeof module&&module.exports?(S["default"]=S,module.exports=aa.document?S(aa):S):"function"===typeof define&&define.amd?define("highcharts/highcharts",function(){return S(aa)}):(aa.Highcharts&&aa.Highcharts.error(16,!0),aa.Highcharts=S(aa))})("undefined"!==typeof window?window:this,function(aa){function S(d,g,W,u){d.hasOwnProperty(g)||(d[g]=u.apply(null,W))}var r={};S(r,"parts/Globals.js",[],function(){var d="undefined"!==typeof aa?aa:"undefined"!==typeof window?window: {},g=d.document,W=d.navigator&&d.navigator.userAgent||"",u=g&&g.createElementNS&&!!g.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,r=/(edge|msie|trident)/i.test(W)&&!d.opera,M=-1!==W.indexOf("Firefox"),E=-1!==W.indexOf("Chrome"),A=M&&4>parseInt(W.split("Firefox/")[1],10);return{product:"Highcharts",version:"8.0.4",deg2rad:2*Math.PI/360,doc:g,hasBidiBug:A,hasTouch:!!d.TouchEvent,isMS:r,isWebKit:-1!==W.indexOf("AppleWebKit"),isFirefox:M,isChrome:E,isSafari:!E&&-1!==W.indexOf("Safari"), isTouchDevice:/(Mobile|Android|Windows Phone)/.test(W),SVG_NS:"http://www.w3.org/2000/svg",chartCount:0,seriesTypes:{},symbolSizes:{},svg:u,win:d,marginNames:["plotTop","marginRight","marginBottom","plotLeft"],noop:function(){},charts:[],dateFormats:{}}});S(r,"parts/Utilities.js",[r["parts/Globals.js"]],function(d){function g(){var b,a=arguments,m={},f=function(b,a){"object"!==typeof b&&(b={});Y(a,function(m,c){!h(m,!0)||q(m)||N(m)?b[c]=a[c]:b[c]=f(b[c]||{},m)});return b};!0===a[0]&&(m=a[1],a=Array.prototype.slice.call(a, 2));var c=a.length;for(b=0;bf)for(;c--;){var p=parseFloat(b[c]);m[c]=isNaN(p)||"A"===a[c-4]||"A"===a[c-5]?a[c]:f*parseFloat(""+(a[c]-p))+p}else m=a;this.elem.attr("d",m,null,!0)};b.prototype.update=function(){var b=this.elem,a=this.prop,m=this.now,f=this.options.step;if(this[a+"Setter"])this[a+"Setter"]();else b.attr?b.element&&b.attr(a,m,null,!0):b.style[a]=m+this.unit; f&&f.call(b,m,this)};b.prototype.run=function(b,a,m){var f=this,c=f.options,p=function(b){return p.stopped?!1:f.step(b)},e=A.requestAnimationFrame||function(b){setTimeout(b,13)},x=function(){for(var b=0;b=p+this.startTime){this.now=this.end;this.pos=1;this.update();var x=e[this.prop]=!0;Y(e,function(b){!0!==b&&(x=!1)});x&&c&&c.call(f);b=!1}else this.pos=m.easing((a-this.startTime)/p),this.now=this.start+(this.end-this.start)*this.pos,this.update(),b=!0;return b};b.prototype.initPath= function(b,a,m){function f(b){for(C=b.length;C--;){var a="M"===b[C]||"L"===b[C];var m=/[a-zA-Z]/.test(b[C+3]);a&&m&&b.splice(C+1,0,b[C+1],b[C+2],b[C+1],b[C+2])}}function c(b,a){for(;b.lengthb&&-Infinity=m&&(a=[1/m])));for(f=0;f=b||!c&&e<=(a[f]+(a[f+1]||a[f]))/2);f++);return p=O(p*m,-Math.round(Math.log(.001)/Math.LN10))},p=d.stableSort=function(b,a){var m=b.length,f,c;for(c=0;cm&&(m=b[a]);return m},x=d.destroyObjectProperties=function(b,a){Y(b,function(m,f){m&&m!==a&&m.destroy&&m.destroy();delete b[f]})},R=d.discardElement=function(b){var a=d.garbageBin;a||(a=v("div"));b&&a.appendChild(b);a.innerHTML=""},O=d.correctFloat=function(b,a){return parseFloat(b.toPrecision(a||14))},X=d.setAnimation= function(b,a){a.renderer.globalAnimation=u(b,a.options.chart.animation,!0)},U=d.animObject=function(b){return h(b)?g(b):{duration:b?500:0}},m=d.timeUnits={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5,month:24192E5,year:314496E5},T=d.numberFormat=function(b,a,m,f){b=+b||0;a=+a;var c=d.defaultOptions.lang,p=(b.toString().split(".")[1]||"").split("e")[0].length,e=b.toString().split("e");if(-1===a)a=Math.min(p,20);else if(!P(a))a=2;else if(a&&e[1]&&0>e[1]){var x=a+ +e[1];0<=x?(e[0]= (+e[0]).toExponential(x).split("e")[0],a=x):(e[0]=e[0].split(".")[0]||0,b=20>a?(e[0]*Math.pow(10,e[1])).toFixed(a):0,e[1]=0)}var F=(Math.abs(e[1]?e[0]:b)+Math.pow(10,-Math.max(a,p)-1)).toFixed(a);p=String(y(F));x=3b?"-":"")+(x?p.substr(0,x)+f:"");b+=p.substr(x).replace(/(\d{3})(?=\d)/g,"$1"+f);a&&(b+=m+F.slice(-a));e[1]&&0!==+b&&(b+="e"+e[1]);return b};Math.easeInOutSine=function(b){return-.5*(Math.cos(Math.PI*b)-1)};var Z=d.getStyle= function(b,a,m){if("width"===a)return a=Math.min(b.offsetWidth,b.scrollWidth),m=b.getBoundingClientRect&&b.getBoundingClientRect().width,m=a-1&&(a=Math.floor(m)),Math.max(0,a-d.getStyle(b,"padding-left")-d.getStyle(b,"padding-right"));if("height"===a)return Math.max(0,Math.min(b.offsetHeight,b.scrollHeight)-d.getStyle(b,"padding-top")-d.getStyle(b,"padding-bottom"));A.getComputedStyle||G(27,!0);if(b=A.getComputedStyle(b,void 0))b=b.getPropertyValue(a),u(m,"opacity"!==a)&&(b=y(b));return b}, ca=d.inArray=function(b,a,m){return a.indexOf(b,m)},F=d.find=Array.prototype.find?function(b,a){return b.find(a)}:function(b,a){var m,f=b.length;for(m=0;ma?b>16,(g&65280)>>8,g&255,1]:4===u&&(A=[(g&3840)>>4|(g&3840)>>8,(g&240)>>4|g&240,(g&15)<<4|g&15,1])}if(!A)for(G=this.parsers.length;G--&& !A;){var y=this.parsers[G];(u=y.regex.exec(g))&&(A=y.parse(u))}}this.rgba=A||[]};d.prototype.get=function(d){var g=this.input,G=this.rgba;if("undefined"!==typeof this.stops){var E=u(g);E.stops=[].concat(E.stops);this.stops.forEach(function(g,t){E.stops[t]=[E.stops[t][0],g.get(d)]})}else E=G&&W(G[0])?"rgb"===d||!d&&1===G[3]?"rgb("+G[0]+","+G[1]+","+G[2]+")":"a"===d?G[3]:"rgba("+G.join(",")+")":g;return E};d.prototype.brighten=function(d){var g,u=this.rgba;if(this.stops)this.stops.forEach(function(g){g.brighten(d)}); else if(W(d)&&0!==d)for(g=0;3>g;g++)u[g]+=r(255*d),0>u[g]&&(u[g]=0),255m.width)m={width:0,height:0}}else m=this.htmlGetBBox();c.isSVG&&(b=m.width,c=m.height,T&&(m.height=c={"11px,17":14,"13px,20":16}[e&&e.fontSize+","+Math.round(c)]||c),a&&(e=a*L,m.width=Math.abs(c* Math.sin(e))+Math.abs(b*Math.cos(e)),m.height=Math.abs(c*Math.cos(e))+Math.abs(b*Math.sin(e))));if(v&&0]*>/g,"").replace(/</g,"<").replace(/>/g,">")))},textSetter:function(b){b!==this.textStr&&(delete this.bBox,delete this.textPxLength,this.textStr=b,this.added&&this.renderer.buildText(this))},setTextPath:function(b,a){var f=this.element,c={textAnchor:"text-anchor"},m=!1,p=this.textPathWrapper,e=!p;a=k(!0,{enabled:!0,attributes:{dy:-5,startOffset:"50%",textAnchor:"middle"}}, a);var x=a.attributes;if(b&&a&&a.enabled){p&&null===p.element.parentNode?(e=!0,p=p.destroy()):p&&this.removeTextOutline.call(p.parentGroup,[].slice.call(f.getElementsByTagName("tspan")));this.options&&this.options.padding&&(x.dx=-this.options.padding);p||(this.textPathWrapper=p=this.renderer.createElement("textPath"),m=!0);var l=p.element;(a=b.element.getAttribute("id"))||b.element.setAttribute("id",a=w());if(e)for(b=f.getElementsByTagName("tspan");b.length;)b[0].setAttribute("y",0),P(x.dx)&&b[0].setAttribute("x", -x.dx),l.appendChild(b[0]);m&&p.add({element:this.text?this.text.element:f});l.setAttributeNS("http://www.w3.org/1999/xlink","href",this.renderer.url+"#"+a);y(x.dy)&&(l.parentNode.setAttribute("dy",x.dy),delete x.dy);y(x.dx)&&(l.parentNode.setAttribute("dx",x.dx),delete x.dx);n(x,function(b,a){l.setAttribute(c[a]||a,b)});f.removeAttribute("transform");this.removeTextOutline.call(p,[].slice.call(f.getElementsByTagName("tspan")));this.text&&!this.renderer.styledMode&&this.attr({fill:"none","stroke-width":0}); this.applyTextOutline=this.updateTransform=C}else p&&(delete this.updateTransform,delete this.applyTextOutline,this.destroyTextPath(f,b),this.updateTransform(),this.options.rotation&&this.applyTextOutline(this.options.style.textOutline));return this},destroyTextPath:function(b,a){var f=b.getElementsByTagName("text")[0];if(f){if(f.removeAttribute("dx"),f.removeAttribute("dy"),a.element.setAttribute("id",""),f.getElementsByTagName("textPath").length){for(b=this.textPathWrapper.element.childNodes;b.length;)f.appendChild(b[0]); f.removeChild(this.textPathWrapper.element)}}else if(b.getAttribute("dx")||b.getAttribute("dy"))b.removeAttribute("dx"),b.removeAttribute("dy");this.textPathWrapper=this.textPathWrapper.destroy()},fillSetter:function(b,a,f){"string"===typeof b?f.setAttribute(a,b):b&&this.complexColor(b,a,f)},visibilitySetter:function(b,a,f){"inherit"===b?f.removeAttribute(a):this[a]!==b&&f.setAttribute(a,b);this[a]=b},zIndexSetter:function(b,f){var c=this.renderer,m=this.parentGroup,p=(m||c).element||c.box,e=this.element, x=!1;c=p===c.box;var C=this.added;var l;y(b)?(e.setAttribute("data-z-index",b),b=+b,this[f]===b&&(C=!1)):y(this[f])&&e.removeAttribute("data-z-index");this[f]=b;if(C){(b=this.zIndex)&&m&&(m.handleZ=!0);f=p.childNodes;for(l=f.length-1;0<=l&&!x;l--){m=f[l];C=m.getAttribute("data-z-index");var k=!y(C);if(m!==e)if(0>b&&k&&!c&&!l)p.insertBefore(e,f[l]),x=!0;else if(a(C)<=b||k&&(!y(b)||0<=b))p.insertBefore(e,f[l+1]||null),x=!0}x||(p.insertBefore(e,f[c?3:0]||null),x=!0)}return x},_defaultSetter:function(b, a,f){f.setAttribute(a,b)}});U.prototype.yGetter=U.prototype.xGetter;U.prototype.translateXSetter=U.prototype.translateYSetter=U.prototype.rotationSetter=U.prototype.verticalAlignSetter=U.prototype.rotationOriginXSetter=U.prototype.rotationOriginYSetter=U.prototype.scaleXSetter=U.prototype.scaleYSetter=U.prototype.matrixSetter=function(b,a){this[a]=b;this.doTransform=!0};U.prototype["stroke-widthSetter"]=U.prototype.strokeSetter=function(b,a,f){this[a]=b;this.stroke&&this["stroke-width"]?(U.prototype.fillSetter.call(this, this.stroke,"stroke",f),f.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0):"stroke-width"===a&&0===b&&this.hasStroke?(f.removeAttribute("stroke"),this.hasStroke=!1):this.renderer.styledMode&&this["stroke-width"]&&(f.setAttribute("stroke-width",this["stroke-width"]),this.hasStroke=!0)};g=d.SVGRenderer=function(){this.init.apply(this,arguments)};h(g.prototype,{Element:U,SVG_NS:R,init:function(a,f,c,p,e,x,C){var m=this.createElement("svg").attr({version:"1.1","class":"highcharts-root"}); C||m.css(this.getStyle(p));p=m.element;a.appendChild(p);A(a,"dir","ltr");-1===a.innerHTML.indexOf("xmlns")&&A(p,"xmlns",this.SVG_NS);this.isSVG=!0;this.box=p;this.boxWrapper=m;this.alignedObjects=[];this.url=(K||b)&&Q.getElementsByTagName("base").length?X.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(Q.createTextNode("Created with Highcharts 8.0.4"));this.defs=this.createElement("defs").add(); this.allowHTML=x;this.forExport=e;this.styledMode=C;this.gradients={};this.cache={};this.cacheKeys=[];this.imgCount=0;this.setSize(f,c,!1);var l;K&&a.getBoundingClientRect&&(f=function(){J(a,{left:0,top:0});l=a.getBoundingClientRect();J(a,{left:Math.ceil(l.left)-l.left+"px",top:Math.ceil(l.top)-l.top+"px"})},f(),this.unSubPixelFix=I(X,"resize",f))},definition:function(b){function a(b,c){var p;v(b).forEach(function(b){var m=f.createElement(b.tagName),e={};n(b,function(b,a){"tagName"!==a&&"children"!== a&&"textContent"!==a&&(e[a]=b)});m.attr(e);m.add(c||f.defs);b.textContent&&m.element.appendChild(Q.createTextNode(b.textContent));a(b.children||[],m);p=m});return p}var f=this;return a(b)},getStyle:function(b){return this.style=h({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},b)},setStyle:function(b){this.boxWrapper.css(this.getStyle(b))},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var b=this.defs;this.box=null; this.boxWrapper=this.boxWrapper.destroy();t(this.gradients||{});this.gradients=null;b&&(this.defs=b.destroy());this.unSubPixelFix&&this.unSubPixelFix();return this.alignedObjects=null},createElement:function(b){var a=new this.Element;a.init(this,b);return a},draw:C,getRadialAttr:function(b,a){return{cx:b[0]-b[2]/2+a.cx*b[2],cy:b[1]-b[2]/2+a.cy*b[2],r:a.r*b[2]}},truncate:function(b,a,f,c,p,e,x){var m=this,C=b.rotation,l,k=c?1:0,F=(f||c).length,n=F,v=[],w=function(b){a.firstChild&&a.removeChild(a.firstChild); b&&a.appendChild(Q.createTextNode(b))},z=function(e,l){l=l||e;if("undefined"===typeof v[l])if(a.getSubStringLength)try{v[l]=p+a.getSubStringLength(0,c?l+1:l)}catch(la){""}else m.getSpanWidth&&(w(x(f||c,e)),v[l]=p+m.getSpanWidth(b,a));return v[l]},O;b.rotation=0;var T=z(a.textContent.length);if(O=p+T>e){for(;k<=F;)n=Math.ceil((k+F)/2),c&&(l=x(c,n)),T=z(n,l&&l.length-1),k===F?k=F+1:T>e?F=n-1:k=n;0===F?w(""):f&&F===f.length-1||w(l||x(f||c,n))}c&&c.splice(0,n);b.actualWidth=T;b.rotation=C;return O},escapes:{"&":"&", "<":"<",">":">","'":"'",'"':"""},buildText:function(b){var c=b.element,p=this,e=p.forExport,m=f(b.textStr,"").toString(),l=-1!==m.indexOf("<"),C=c.childNodes,k,v=A(c,"x"),w=b.styles,z=b.textWidth,O=w&&w.lineHeight,q=w&&w.textOutline,B=w&&"ellipsis"===w.textOverflow,d=w&&"nowrap"===w.whiteSpace,N=w&&w.fontSize,X,h=C.length;w=z&&!b.added&&this.box;var L=function(b){var f;p.styledMode||(f=/(px|em)$/.test(b&&b.style.fontSize)?b.style.fontSize:N||p.style.fontSize||12);return O?a(O):p.fontMetrics(f, b.getAttribute("style")?b:c).h},t=function(b,a){n(p.escapes,function(f,c){a&&-1!==a.indexOf(f)||(b=b.toString().replace(new RegExp(f,"g"),c))});return b},U=function(b,a){var f=b.indexOf("<");b=b.substring(f,b.indexOf(">")-f);f=b.indexOf(a+"=");if(-1!==f&&(f=f+a.length+1,a=b.charAt(f),'"'===a||"'"===a))return b=b.substring(f+1),b.substring(0,b.indexOf(a))},P=//g;var g=[m,B,d,O,q,N,z].join();if(g!==b.textCache){for(b.textCache=g;h--;)c.removeChild(C[h]);l||q||B||z||-1!==m.indexOf(" ")&&(!d|| P.test(m))?(w&&w.appendChild(c),l?(m=p.styledMode?m.replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g,''):m.replace(/<(b|strong)>/g,'').replace(/<(i|em)>/g,''),m=m.replace(//g,"").split(P)):m=[m],m=m.filter(function(b){return""!==b}),m.forEach(function(a,f){var m=0,l=0;a=a.replace(/^\s+|\s+$/g,"").replace(//g, "|||");var C=a.split("|||");C.forEach(function(a){if(""!==a||1===C.length){var n={},F=Q.createElementNS(p.SVG_NS,"tspan"),w,O;(w=U(a,"class"))&&A(F,"class",w);if(w=U(a,"style"))w=w.replace(/(;| |^)color([ :])/,"$1fill$2"),A(F,"style",w);(O=U(a,"href"))&&!e&&(A(F,"onclick",'location.href="'+O+'"'),A(F,"class","highcharts-anchor"),p.styledMode||J(F,{cursor:"pointer"}));a=t(a.replace(/<[a-zA-Z\/](.|\n)*?>/g,"")||" ");if(" "!==a){F.appendChild(Q.createTextNode(a));m?n.dx=0:f&&null!==v&&(n.x=v); A(F,n);c.appendChild(F);!m&&X&&(!x&&e&&J(F,{display:"block"}),A(F,"dy",L(F)));if(z){var q=a.replace(/([^\^])-/g,"$1- ").split(" ");n=!d&&(1Math.abs(e.end-e.start-2*Math.PI));var k=Math.cos(x), n=Math.sin(x),w=Math.cos(C);C=Math.sin(C);x=f(e.longArc,.001>e.end-x-Math.PI?0:1);m=["M",b+m*k,a+l*n,"A",m,l,0,x,f(e.clockwise,1),b+m*w,a+l*C];y(c)&&m.push(p?"M":"L",b+c*w,a+c*C,"A",c,c,0,x,y(e.clockwise)?1-e.clockwise:0,b+c*k,a+c*n);m.push(p?"":"Z");return m},callout:function(b,a,f,c,p){var e=Math.min(p&&p.r||0,f,c),x=e+6,l=p&&p.anchorX;p=p&&p.anchorY;var m=["M",b+e,a,"L",b+f-e,a,"C",b+f,a,b+f,a,b+f,a+e,"L",b+f,a+c-e,"C",b+f,a+c,b+f,a+c,b+f-e,a+c,"L",b+e,a+c,"C",b,a+c,b,a+c,b,a+c-e,"L",b,a+e,"C", b,a,b,a,b+e,a];l&&l>f?p>a+x&&pl?p>a+x&&pc&&l>b+x&&lp&&l>b+x&&lb?b+3:Math.round(1.2*b);return{h:f,b:Math.round(.8*f),f:b}},rotCorr:function(b,a,f){var c=b;a&&f&&(c=Math.max(c*Math.cos(a*L),4));return{x:-b/3*Math.sin(a*L),y:c}},label:function(b,a,f,c,p,e,x,C,n){var m=this,w=m.styledMode,v=m.g("button"!==n&&"label"),F=v.text=m.text("",0,0,x).attr({zIndex:1}),z,O,q=0,R=3,B=0,d,N,X,V,L,t={},T,g,Q=/^url\((.*?)\)$/.test(c), H=w||Q,K=function(){return w?z.strokeWidth()%2/2:(T?parseInt(T,10):0)%2/2};n&&v.addClass("highcharts-"+n);var ba=function(){var b=F.element.style,a={};O=("undefined"===typeof d||"undefined"===typeof N||L)&&y(F.textStr)&&F.getBBox();v.width=(d||O.width||0)+2*R+B;v.height=(N||O.height||0)+2*R;g=R+Math.min(m.fontMetrics(b&&b.fontSize,F).b,O?O.height:Infinity);H&&(z||(v.box=z=m.symbols[c]||Q?m.symbol(c):m.rect(),z.addClass(("button"===n?"":"highcharts-label-box")+(n?" highcharts-"+n+"-box":"")),z.add(v), b=K(),a.x=b,a.y=(C?-g:0)+b),a.width=Math.round(v.width),a.height=Math.round(v.height),z.attr(h(a,t)),t={})};var u=function(){var b=B+R;var a=C?0:g;y(d)&&O&&("center"===L||"right"===L)&&(b+={center:.5,right:1}[L]*(d-O.width));if(b!==F.x||a!==F.y)F.attr("x",b),F.hasBoxWidthChanged&&(O=F.getBBox(!0),ba()),"undefined"!==typeof a&&F.attr("y",a);F.x=b;F.y=a};var Y=function(b,a){z?z.attr(b,a):t[b]=a};v.onAdd=function(){F.add(v);v.attr({text:b||0===b?b:"",x:a,y:f});z&&y(p)&&v.attr({anchorX:p,anchorY:e})}; v.widthSetter=function(b){d=P(b)?b:null};v.heightSetter=function(b){N=b};v["text-alignSetter"]=function(b){L=b};v.paddingSetter=function(b){y(b)&&b!==R&&(R=v.padding=b,u())};v.paddingLeftSetter=function(b){y(b)&&b!==B&&(B=b,u())};v.alignSetter=function(b){b={left:0,center:.5,right:1}[b];b!==q&&(q=b,O&&v.attr({x:X}))};v.textSetter=function(b){"undefined"!==typeof b&&F.attr({text:b});ba();u()};v["stroke-widthSetter"]=function(b,a){b&&(H=!0);T=this["stroke-width"]=b;Y(a,b)};w?v.rSetter=function(b,a){Y(a, b)}:v.strokeSetter=v.fillSetter=v.rSetter=function(b,a){"r"!==a&&("fill"===a&&b&&(H=!0),v[a]=b);Y(a,b)};v.anchorXSetter=function(b,a){p=v.anchorX=b;Y(a,Math.round(b)-K()-X)};v.anchorYSetter=function(b,a){e=v.anchorY=b;Y(a,b-V)};v.xSetter=function(b){v.x=b;q&&(b-=q*((d||O.width)+2*R),v["forceAnimate:x"]=!0);X=Math.round(b);v.attr("translateX",X)};v.ySetter=function(b){V=v.y=Math.round(b);v.attr("translateY",V)};var D=v.css;x={css:function(b){if(b){var a={};b=k(b);v.textProps.forEach(function(f){"undefined"!== typeof b[f]&&(a[f]=b[f],delete b[f])});F.css(a);"width"in a&&ba();"fontSize"in a&&(ba(),u())}return D.call(v,b)},getBBox:function(){return{width:O.width+2*R,height:O.height+2*R,x:O.x-R,y:O.y-R}},destroy:function(){l(v.element,"mouseenter");l(v.element,"mouseleave");F&&(F=F.destroy());z&&(z=z.destroy());U.prototype.destroy.call(v);v=m=ba=u=Y=null}};w||(x.shadow=function(b){b&&(ba(),z&&z.shadow(b));return v});return h(v,x)}});d.Renderer=g});S(r,"parts/Html.js",[r["parts/Globals.js"],r["parts/Utilities.js"]], function(d,g){var r=g.attr,u=g.createElement,I=g.css,M=g.defined,E=g.extend,A=g.pick,G=g.pInt,J=d.isFirefox,y=d.isMS,t=d.isWebKit,D=d.SVGElement;g=d.SVGRenderer;var h=d.win;E(D.prototype,{htmlCss:function(d){var q="SPAN"===this.element.tagName&&d&&"width"in d,N=A(q&&d.width,void 0);if(q){delete d.width;this.textWidth=N;var e=!0}d&&"ellipsis"===d.textOverflow&&(d.whiteSpace="nowrap",d.overflow="hidden");this.styles=E(this.styles,d);I(this.element,d);e&&this.htmlUpdateTransform();return this},htmlGetBBox:function(){var d= this.element;return{x:d.offsetLeft,y:d.offsetTop,width:d.offsetWidth,height:d.offsetHeight}},htmlUpdateTransform:function(){if(this.added){var d=this.renderer,q=this.element,h=this.translateX||0,e=this.translateY||0,c=this.x||0,k=this.y||0,n=this.textAlign||"left",f={left:0,center:.5,right:1}[n],a=this.styles,l=a&&a.whiteSpace;I(q,{marginLeft:h,marginTop:e});!d.styledMode&&this.shadows&&this.shadows.forEach(function(a){I(a,{marginLeft:h+1,marginTop:e+1})});this.inverted&&[].forEach.call(q.childNodes, function(a){d.invertChild(a,q)});if("SPAN"===q.tagName){a=this.rotation;var v=this.textWidth&&G(this.textWidth),z=[a,n,q.innerHTML,this.textWidth,this.textAlign].join(),w;(w=v!==this.oldTextWidth)&&!(w=v>this.oldTextWidth)&&((w=this.textPxLength)||(I(q,{width:"",whiteSpace:l||"nowrap"}),w=q.offsetWidth),w=w>v);w&&(/[ \-]/.test(q.textContent||q.innerText)||"ellipsis"===q.style.textOverflow)?(I(q,{width:v+"px",display:"block",whiteSpace:l||"normal"}),this.oldTextWidth=v,this.hasBoxWidthChanged=!0): this.hasBoxWidthChanged=!1;z!==this.cTT&&(l=d.fontMetrics(q.style.fontSize,q).b,!M(a)||a===(this.oldRotation||0)&&n===this.oldAlign||this.setSpanRotation(a,f,l),this.getSpanCorrection(!M(a)&&this.textPxLength||q.offsetWidth,l,f,a,n));I(q,{left:c+(this.xCorr||0)+"px",top:k+(this.yCorr||0)+"px"});this.cTT=z;this.oldRotation=a;this.oldAlign=n}}else this.alignOnAdd=!0},setSpanRotation:function(d,q,h){var e={},c=this.renderer.getTransformKey();e[c]=e.transform="rotate("+d+"deg)";e[c+(J?"Origin":"-origin")]= e.transformOrigin=100*q+"% "+h+"px";I(this.element,e)},getSpanCorrection:function(d,q,h){this.xCorr=-d*h;this.yCorr=-q}});E(g.prototype,{getTransformKey:function(){return y&&!/Edge/.test(h.navigator.userAgent)?"-ms-transform":t?"-webkit-transform":J?"MozTransform":h.opera?"-o-transform":""},html:function(d,q,h){var e=this.createElement("span"),c=e.element,k=e.renderer,n=k.isSVG,f=function(a,f){["opacity","visibility"].forEach(function(c){a[c+"Setter"]=function(e,l,k){var v=a.div?a.div.style:f;D.prototype[c+ "Setter"].call(this,e,l,k);v&&(v[l]=e)}});a.addedSetters=!0};e.textSetter=function(a){a!==c.innerHTML&&(delete this.bBox,delete this.oldTextWidth);this.textStr=a;c.innerHTML=A(a,"");e.doTransform=!0};n&&f(e,e.element.style);e.xSetter=e.ySetter=e.alignSetter=e.rotationSetter=function(a,f){"align"===f&&(f="textAlign");e[f]=a;e.doTransform=!0};e.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)};e.attr({text:d,x:Math.round(q),y:Math.round(h)}).css({position:"absolute"}); k.styledMode||e.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize});c.style.whiteSpace="nowrap";e.css=e.htmlCss;n&&(e.add=function(a){var l=k.box.parentNode,v=[];if(this.parentGroup=a){var n=a.div;if(!n){for(;a;)v.push(a),a=a.parentGroup;v.reverse().forEach(function(a){function c(f,c){a[c]=f;"translateX"===c?w.left=f+"px":w.top=f+"px";a.doTransform=!0}var k=r(a.element,"class");n=a.div=a.div||u("div",k?{className:k}:void 0,{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY|| 0)+"px",display:a.display,opacity:a.opacity,pointerEvents:a.styles&&a.styles.pointerEvents},n||l);var w=n.style;E(a,{classSetter:function(a){return function(f){this.element.setAttribute("class",f);a.className=f}}(n),on:function(){v[0].div&&e.on.apply({element:v[0].div},arguments);return a},translateXSetter:c,translateYSetter:c});a.addedSetters||f(a)})}}else n=l;n.appendChild(c);e.added=!0;e.alignOnAdd&&e.htmlUpdateTransform();return e});return e}})});S(r,"parts/Tick.js",[r["parts/Globals.js"],r["parts/Utilities.js"]], function(d,g){var r=g.clamp,u=g.correctFloat,I=g.defined,M=g.destroyObjectProperties,E=g.extend,A=g.isNumber,G=g.merge,J=g.objectEach,y=g.pick,t=d.fireEvent,D=d.deg2rad;g=function(){function h(d,q,h,e,c){this.isNewLabel=this.isNew=!0;this.axis=d;this.pos=q;this.type=h||"";this.parameters=c||{};this.tickmarkOffset=this.parameters.tickmarkOffset;this.options=this.parameters.options;h||e||this.addLabel()}h.prototype.addLabel=function(){var d=this,q=d.axis,h=q.options,e=q.chart,c=q.categories,k=q.names, n=d.pos,f=y(d.options&&d.options.labels,h.labels),a=q.tickPositions,l=n===a[0],v=n===a[a.length-1];k=this.parameters.category||(c?y(c[n],k[n],n):n);var z=d.label;c=(!f.step||1===f.step)&&1===q.tickInterval;a=a.info;var w,B;if(q.isDatetimeAxis&&a){var L=e.time.resolveDTLFormat(h.dateTimeLabelFormats[!h.grid&&a.higherRanks[n]||a.unitName]);var t=L.main}d.isFirst=l;d.isLast=v;d.formatCtx={axis:q,chart:e,isFirst:l,isLast:v,dateTimeLabelFormat:t,tickPositionInfo:a,value:q.isLog?u(q.lin2log(k)):k,pos:n}; h=q.labelFormatter.call(d.formatCtx,this.formatCtx);if(B=L&&L.list)d.shortenLabel=function(){for(w=0;wa&&e-l*vk&& (L=Math.round((c-e)/Math.cos(a*D)));else if(c=e+(1-l)*v,e-l*vk&&(w=k-d.x+w*l,B=-1),w=Math.min(z,w),ww||q.autoRotation&&(f.styles||{}).width)L=w;L&&(this.shortenLabel?this.shortenLabel():(t.width=Math.floor(L),(h.style||{}).textOverflow||(t.textOverflow="ellipsis"),f.css(t)))};h.prototype.moveLabel=function(d,q){var h=this,e=h.label,c=!1,k=h.axis,n=k.reversed,f=k.chart.inverted;e&&e.textStr===d?(h.movedLabel=e,c= !0,delete h.label):J(k.ticks,function(a){c||a.isNew||a===h||!a.label||a.label.textStr!==d||(h.movedLabel=a.label,c=!0,a.labelPos=h.movedLabel.xy,delete a.label)});if(!c&&(h.labelPos||e)){var a=h.labelPos||e.xy;e=f?a.x:n?0:k.width+k.left;k=f?n?k.width+k.left:0:a.y;h.movedLabel=h.createLabel({x:e,y:k},d,q);h.movedLabel&&h.movedLabel.attr({opacity:0})}};h.prototype.render=function(h,q,t){var e=this.axis,c=e.horiz,k=this.pos,n=y(this.tickmarkOffset,e.tickmarkOffset);k=this.getPosition(c,k,n,q);n=k.x; var f=k.y;e=c&&n===e.pos+e.len||!c&&f===e.pos?-1:1;t=y(t,1);this.isActive=!0;this.renderGridLine(q,t,e);this.renderMark(k,t,e);this.renderLabel(k,q,t,h);this.isNew=!1;d.fireEvent(this,"afterRender")};h.prototype.renderGridLine=function(d,q,h){var e=this.axis,c=e.options,k=this.gridLine,n={},f=this.pos,a=this.type,l=y(this.tickmarkOffset,e.tickmarkOffset),v=e.chart.renderer,z=a?a+"Grid":"grid",w=c[z+"LineWidth"],B=c[z+"LineColor"];c=c[z+"LineDashStyle"];k||(e.chart.styledMode||(n.stroke=B,n["stroke-width"]= w,c&&(n.dashstyle=c)),a||(n.zIndex=1),d&&(q=0),this.gridLine=k=v.path().attr(n).addClass("highcharts-"+(a?a+"-":"")+"grid-line").add(e.gridGroup));if(k&&(h=e.getPlotLinePath({value:f+l,lineWidth:k.strokeWidth()*h,force:"pass",old:d})))k[d||this.isNew?"attr":"animate"]({d:h,opacity:q})};h.prototype.renderMark=function(d,q,h){var e=this.axis,c=e.options,k=e.chart.renderer,n=this.type,f=n?n+"Tick":"tick",a=e.tickSize(f),l=this.mark,v=!l,z=d.x;d=d.y;var w=y(c[f+"Width"],!n&&e.isXAxis?1:0);c=c[f+"Color"]; a&&(e.opposite&&(a[0]=-a[0]),v&&(this.mark=l=k.path().addClass("highcharts-"+(n?n+"-":"")+"tick").add(e.axisGroup),e.chart.styledMode||l.attr({stroke:c,"stroke-width":w})),l[v?"attr":"animate"]({d:this.getMarkPath(z,d,a[0],l.strokeWidth()*h,e.horiz,k),opacity:q}))};h.prototype.renderLabel=function(d,q,h,e){var c=this.axis,k=c.horiz,n=c.options,f=this.label,a=n.labels,l=a.step;c=y(this.tickmarkOffset,c.tickmarkOffset);var v=!0,z=d.x;d=d.y;f&&A(z)&&(f.xy=d=this.getLabelPosition(z,d,f,k,a,c,e,l),this.isFirst&& !this.isLast&&!y(n.showFirstLabel,1)||this.isLast&&!this.isFirst&&!y(n.showLastLabel,1)?v=!1:!k||a.step||a.rotation||q||0===h||this.handleOverflow(d),l&&e%l&&(v=!1),v&&A(d.y)?(d.opacity=h,f[this.isNewLabel?"attr":"animate"](d),this.isNewLabel=!1):(f.attr("y",-9999),this.isNewLabel=!0))};h.prototype.replaceMovedLabel=function(){var d=this.label,q=this.axis,h=q.reversed,e=this.axis.chart.inverted;if(d&&!this.isNew){var c=e?d.xy.x:h?q.left:q.width+q.left;h=e?h?q.width+q.top:q.top:d.xy.y;d.animate({x:c, y:h,opacity:0},void 0,d.destroy);delete this.label}q.isDirty=!0;this.label=this.movedLabel;delete this.movedLabel};return h}();d.Tick=g;return d.Tick});S(r,"parts/Time.js",[r["parts/Globals.js"],r["parts/Utilities.js"]],function(d,g){var r=g.defined,u=g.error,I=g.extend,M=g.isObject,E=g.merge,A=g.objectEach,G=g.pad,J=g.pick,y=g.splat,t=g.timeUnits,D=d.win;g=function(){function h(d){this.options={};this.variableTimezone=this.useUTC=!1;this.Date=D.Date;this.getTimezoneOffset=this.timezoneOffsetFunction(); this.update(d)}h.prototype.get=function(d,q){if(this.variableTimezone||this.timezoneOffset){var h=q.getTime(),e=h-this.getTimezoneOffset(q);q.setTime(e);d=q["getUTC"+d]();q.setTime(h);return d}return this.useUTC?q["getUTC"+d]():q["get"+d]()};h.prototype.set=function(d,q,h){if(this.variableTimezone||this.timezoneOffset){if("Milliseconds"===d||"Seconds"===d||"Minutes"===d)return q["setUTC"+d](h);var e=this.getTimezoneOffset(q);e=q.getTime()-e;q.setTime(e);q["setUTC"+d](h);d=this.getTimezoneOffset(q); e=q.getTime()+d;return q.setTime(e)}return this.useUTC?q["setUTC"+d](h):q["set"+d](h)};h.prototype.update=function(d){var q=J(d&&d.useUTC,!0);this.options=d=E(!0,this.options||{},d);this.Date=d.Date||D.Date||Date;this.timezoneOffset=(this.useUTC=q)&&d.timezoneOffset;this.getTimezoneOffset=this.timezoneOffsetFunction();this.variableTimezone=!(q&&!d.getTimezoneOffset&&!d.timezone)};h.prototype.makeTime=function(h,q,t,e,c,k){if(this.useUTC){var n=this.Date.UTC.apply(0,arguments);var f=this.getTimezoneOffset(n); n+=f;var a=this.getTimezoneOffset(n);f!==a?n+=a-f:f-36E5!==this.getTimezoneOffset(n-36E5)||d.isSafari||(n-=36E5)}else n=(new this.Date(h,q,J(t,1),J(e,0),J(c,0),J(k,0))).getTime();return n};h.prototype.timezoneOffsetFunction=function(){var d=this,q=this.options,h=D.moment;if(!this.useUTC)return function(e){return 6E4*(new Date(e.toString())).getTimezoneOffset()};if(q.timezone){if(h)return function(e){return 6E4*-h.tz(e,q.timezone).utcOffset()};u(25)}return this.useUTC&&q.getTimezoneOffset?function(e){return 6E4* q.getTimezoneOffset(e.valueOf())}:function(){return 6E4*(d.timezoneOffset||0)}};h.prototype.dateFormat=function(h,q,t){var e;if(!r(q)||isNaN(q))return(null===(e=d.defaultOptions.lang)||void 0===e?void 0:e.invalidDate)||"";h=J(h,"%Y-%m-%d %H:%M:%S");var c=this;e=new this.Date(q);var k=this.get("Hours",e),n=this.get("Day",e),f=this.get("Date",e),a=this.get("Month",e),l=this.get("FullYear",e),v=d.defaultOptions.lang,z=null===v||void 0===v?void 0:v.weekdays,w=null===v||void 0===v?void 0:v.shortWeekdays; e=I({a:w?w[n]:z[n].substr(0,3),A:z[n],d:G(f),e:G(f,2," "),w:n,b:v.shortMonths[a],B:v.months[a],m:G(a+1),o:a+1,y:l.toString().substr(2,2),Y:l,H:G(k),k:k,I:G(k%12||12),l:k%12||12,M:G(this.get("Minutes",e)),p:12>k?"AM":"PM",P:12>k?"am":"pm",S:G(e.getSeconds()),L:G(Math.floor(q%1E3),3)},d.dateFormats);A(e,function(a,f){for(;-1!==h.indexOf("%"+f);)h=h.replace("%"+f,"function"===typeof a?a.call(c,q):a)});return t?h.substr(0,1).toUpperCase()+h.substr(1):h};h.prototype.resolveDTLFormat=function(d){return M(d, !0)?d:(d=y(d),{main:d[0],from:d[1],to:d[2]})};h.prototype.getTimeTicks=function(d,h,g,e){var c=this,k=[],n={};var f=new c.Date(h);var a=d.unitRange,l=d.count||1,v;e=J(e,1);if(r(h)){c.set("Milliseconds",f,a>=t.second?0:l*Math.floor(c.get("Milliseconds",f)/l));a>=t.second&&c.set("Seconds",f,a>=t.minute?0:l*Math.floor(c.get("Seconds",f)/l));a>=t.minute&&c.set("Minutes",f,a>=t.hour?0:l*Math.floor(c.get("Minutes",f)/l));a>=t.hour&&c.set("Hours",f,a>=t.day?0:l*Math.floor(c.get("Hours",f)/l));a>=t.day&& c.set("Date",f,a>=t.month?1:Math.max(1,l*Math.floor(c.get("Date",f)/l)));if(a>=t.month){c.set("Month",f,a>=t.year?0:l*Math.floor(c.get("Month",f)/l));var z=c.get("FullYear",f)}a>=t.year&&c.set("FullYear",f,z-z%l);a===t.week&&(z=c.get("Day",f),c.set("Date",f,c.get("Date",f)-z+e+(z4*t.month||c.getTimezoneOffset(h)!==c.getTimezoneOffset(g));h=f.getTime();for(f=1;hk.length&&k.forEach(function(a){0===a%18E5&&"000000000"===c.dateFormat("%H%M%S%L",a)&&(n[a]="day")})}k.info=I(d,{higherRanks:n,totalRange:a*l});return k};h.defaultOptions={Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0};return h}();d.Time=g;return d.Time});S(r, "parts/Options.js",[r["parts/Globals.js"],r["parts/Time.js"],r["parts/Color.js"],r["parts/Utilities.js"]],function(d,g,r,u){r=r.parse;var I=u.merge;d.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:g.defaultOptions,chart:{styledMode:!1,borderRadius:0,colorCount:10,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},caption:{margin:15,text:"",align:"left",verticalAlign:"bottom"},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", cursor:"pointer",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:d.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:d.isTouchDevice?25:10,headerFormat:'{point.key}
',pointFormat:'\u25cf {series.name}: {point.y}
',backgroundColor:r("#f7f7f7").setOpacity(.85).get(), borderWidth:1,shadow:!0,style:{color:"#333333",cursor:"default",fontSize:"12px",whiteSpace:"nowrap"}},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};d.setOptions=function(g){d.defaultOptions=I(!0,d.defaultOptions,g);(g.time||g.global)&&d.time.update(I(d.defaultOptions.global,d.defaultOptions.time,g.global,g.time));return d.defaultOptions};d.getOptions= function(){return d.defaultOptions};d.defaultPlotOptions=d.defaultOptions.plotOptions;d.time=new g(I(d.defaultOptions.global,d.defaultOptions.time));d.dateFormat=function(g,u,A){return d.time.dateFormat(g,u,A)};""});S(r,"parts/Axis.js",[r["parts/Globals.js"],r["parts/Color.js"],r["parts/Tick.js"],r["parts/Utilities.js"]],function(d,g,r,u){var I=g.parse,M=u.addEvent,E=u.animObject,A=u.arrayMax,G=u.arrayMin,J=u.clamp,y=u.correctFloat,t=u.defined,D=u.destroyObjectProperties,h=u.error,N=u.extend,q=u.fireEvent, P=u.format,e=u.getMagnitude,c=u.isArray,k=u.isFunction,n=u.isNumber,f=u.isString,a=u.merge,l=u.normalizeTickInterval,v=u.objectEach,z=u.pick,w=u.relativeLength,B=u.removeEvent,L=u.splat,Q=u.syncTimeout,H=d.defaultOptions,K=d.deg2rad;g=function(){this.init.apply(this,arguments)};N(g.prototype,{defaultOptions:{dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"}, month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,labels:{enabled:!0,indentation:10,x:0,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorTickLength:2,minorTickPosition:"outside",minPadding:.01,showEmpty:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",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,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){var a=this.axis.chart.numberFormatter;return a(this.total,-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",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},margin:15,title:{rotation:0}},defaultTopAxisOptions:{labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},init:function(a,b){var f=b.isX,c=this;c.chart=a;c.horiz=a.inverted&&!c.isZAxis?!f:f;c.isXAxis=f;c.coll=c.coll||(f?"xAxis":"yAxis");q(this,"init",{userOptions:b});c.opposite=b.opposite;c.side=b.side||(c.horiz?c.opposite?0:2:c.opposite?1:3);c.setOptions(b); var p=this.options,e=p.type;c.labelFormatter=p.labels.formatter||c.defaultLabelFormatter;c.userOptions=b;c.minPixelPadding=0;c.reversed=p.reversed;c.visible=!1!==p.visible;c.zoomEnabled=!1!==p.zoomEnabled;c.hasNames="category"===e||!0===p.categories;c.categories=p.categories||c.hasNames;c.names||(c.names=[],c.names.keys={});c.plotLinesAndBandsGroups={};c.isLog="logarithmic"===e;c.isDatetimeAxis="datetime"===e;c.positiveValuesOnly=c.isLog&&!c.allowNegativeLog;c.isLinked=t(p.linkedTo);c.ticks={};c.labelEdge= [];c.minorTicks={};c.plotLinesAndBands=[];c.alternateBands={};c.len=0;c.minRange=c.userMinRange=p.minRange||p.maxZoom;c.range=p.range;c.offset=p.offset||0;c.stacks={};c.oldStacks={};c.stacksTouched=0;c.max=null;c.min=null;c.crosshair=z(p.crosshair,L(a.options.tooltip.crosshairs)[f?0:1],!1);b=c.options.events;-1===a.axes.indexOf(c)&&(f?a.axes.splice(a.xAxis.length,0,c):a.axes.push(c),a[c.coll].push(c));c.series=c.series||[];a.inverted&&!c.isZAxis&&f&&"undefined"===typeof c.reversed&&(c.reversed=!0); v(b,function(b,a){k(b)&&M(c,a,b)});c.lin2log=p.linearToLogConverter||c.lin2log;c.isLog&&(c.val2lin=c.log2lin,c.lin2val=c.lin2log);q(this,"afterInit")},setOptions:function(c){this.options=a(this.defaultOptions,"yAxis"===this.coll&&this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],a(H[this.coll],c));q(this,"afterSetOptions",{userOptions:c})},defaultLabelFormatter:function(){var a=this.axis,b=this.value, c=a.chart.time,f=a.categories,e=this.dateTimeLabelFormat,l=H.lang,k=l.numericSymbols;l=l.numericSymbolMagnitude||1E3;var v=k&&k.length,m=a.options.labels.format;a=a.isLog?Math.abs(b):a.tickInterval;var n=this.chart,d=n.numberFormatter;if(m)var w=P(m,this,n);else if(f)w=b;else if(e)w=c.dateFormat(e,b);else if(v&&1E3<=a)for(;v--&&"undefined"===typeof w;)c=Math.pow(l,v+1),a>=c&&0===10*b%c&&null!==k[v]&&0!==b&&(w=d(b/c,-1)+k[v]);"undefined"===typeof w&&(w=1E4<=Math.abs(b)?d(b,-1):d(b,-1,void 0,""));return w}, getSeriesExtremes:function(){var a=this,b=a.chart,c;q(this,"getSeriesExtremes",null,function(){a.hasVisibleSeries=!1;a.dataMin=a.dataMax=a.threshold=null;a.softThreshold=!a.isXAxis;a.buildStacks&&a.buildStacks();a.series.forEach(function(f){if(f.visible||!b.options.chart.ignoreHiddenSeries){var e=f.options,p=e.threshold;a.hasVisibleSeries=!0;a.positiveValuesOnly&&0>=p&&(p=null);if(a.isXAxis){if(e=f.xData,e.length){c=f.getXExtremes(e);var x=c.min;var l=c.max;n(x)||x instanceof Date||(e=e.filter(n), c=f.getXExtremes(e),x=c.min,l=c.max);e.length&&(a.dataMin=Math.min(z(a.dataMin,x),x),a.dataMax=Math.max(z(a.dataMax,l),l))}}else if(f.getExtremes(),l=f.dataMax,x=f.dataMin,t(x)&&t(l)&&(a.dataMin=Math.min(z(a.dataMin,x),x),a.dataMax=Math.max(z(a.dataMax,l),l)),t(p)&&(a.threshold=p),!e.softThreshold||a.positiveValuesOnly)a.softThreshold=!1}})});q(this,"afterGetSeriesExtremes")},translate:function(a,b,c,f,e,l){var p=this.linkedParent||this,x=1,m=0,C=f?p.oldTransA:p.transA;f=f?p.oldMin:p.min;var k=p.minPixelPadding; e=(p.isOrdinal||p.isBroken||p.isLog&&e)&&p.lin2val;C||(C=p.transA);c&&(x*=-1,m=p.len);p.reversed&&(x*=-1,m-=x*(p.sector||p.len));b?(a=(a*x+m-k)/C+f,e&&(a=p.lin2val(a))):(e&&(a=p.val2lin(a)),a=n(f)?x*(a-f)*C+m+x*k+(n(l)?C*l:0):void 0);return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a){var b=this,c=b.chart,f=b.left,e=b.top,p=a.old,l=a.value, k=a.translatedValue,m=a.lineWidth,v=a.force,d,w,F,h,B=p&&c.oldChartHeight||c.chartHeight,L=p&&c.oldChartWidth||c.chartWidth,t,g=b.transB,H=function(b,a,c){if("pass"!==v&&bc)v?b=J(b,a,c):t=!0;return b};a={value:l,lineWidth:m,old:p,force:v,acrossPanes:a.acrossPanes,translatedValue:k};q(this,"getPlotLinePath",a,function(a){k=z(k,b.translate(l,null,null,p));k=J(k,-1E5,1E5);d=F=Math.round(k+g);w=h=Math.round(B-k-g);n(k)?b.horiz?(w=e,h=B-b.bottom,d=F=H(d,f,f+b.width)):(d=f,F=L-b.right,w=h=H(w,e,e+ b.height)):(t=!0,v=!1);a.path=t&&!v?null:c.renderer.crispLine(["M",d,w,"L",F,h],m||1)});return a.path},getLinearTickPositions:function(a,b,c){var f=y(Math.floor(b/a)*a);c=y(Math.ceil(c/a)*a);var e=[],p;y(f+a)===f&&(p=20);if(this.single)return[b];for(b=f;b<=c;){e.push(b);b=y(b+a,p);if(b===l)break;var l=b}return e},getMinorTickInterval:function(){var a=this.options;return!0===a.minorTicks?z(a.minorTickInterval,"auto"):!1===a.minorTicks?null:a.minorTickInterval},getMinorTickPositions:function(){var a= this,b=a.options,c=a.tickPositions,f=a.minorTickInterval,e=[],l=a.pointRangePadding||0,k=a.min-l;l=a.max+l;var v=l-k;if(v&&v/f=this.minRange;var n=this.minRange;var d=(n-c+b)/2;d=[b-d,z(a.min,b-d)];m&&(d[2]=this.isLog?this.log2lin(this.dataMin): this.dataMin);b=A(d);c=[b+n,z(a.max,b+n)];m&&(c[2]=this.isLog?this.log2lin(this.dataMax):this.dataMax);c=G(c);c-b=V)Q=V,w=0;else if(b.dataMax<=V){var u=V;m=0}b.min=z(H,Q,b.dataMin);b.max=z(K,u,b.dataMax)}p&&(b.positiveValuesOnly&&!a&&0>=Math.min(b.min,z(b.dataMin,b.min))&&h(10,1,c),b.min=y(b.log2lin(b.min),16),b.max=y(b.log2lin(b.max),16));b.range&&t(b.max)&&(b.userMin=b.min=H=Math.max(b.dataMin,b.minFromRange()),b.userMax=K=b.max,b.range=null);q(b,"foundExtremes");b.beforePadding&&b.beforePadding();b.adjustForMinRange();!(F||b.axisPointRange||b.usePercentage||d)&&t(b.min)&& t(b.max)&&(c=b.max-b.min)&&(!t(H)&&w&&(b.min-=c*w),!t(K)&&m&&(b.max+=c*m));n(b.userMin)||(n(f.softMin)&&f.softMinb.max&&(b.max=K=f.softMax),n(f.ceiling)&&(b.max=Math.min(b.max,f.ceiling)));g&&t(b.dataMin)&&(V=V||0,!t(H)&&b.min=V?b.min=b.options.minRange?Math.min(V,b.max-b.minRange):V:!t(K)&&b.max>V&&b.dataMax<=V&&(b.max=b.options.minRange?Math.max(V,b.min+b.minRange):V));b.tickInterval= b.min===b.max||"undefined"===typeof b.min||"undefined"===typeof b.max?1:d&&!B&&L===b.linkedParent.options.tickPixelInterval?B=b.linkedParent.tickInterval:z(B,this.tickAmount?(b.max-b.min)/Math.max(this.tickAmount-1,1):void 0,F?1:(b.max-b.min)*L/Math.max(b.len,L));v&&!a&&b.series.forEach(function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0);b.beforeSetTickPositions&&b.beforeSetTickPositions();b.postProcessTickInterval&&(b.tickInterval=b.postProcessTickInterval(b.tickInterval)); b.pointRange&&!B&&(b.tickInterval=Math.max(b.pointRange,b.tickInterval));a=z(f.minTickInterval,b.isDatetimeAxis&&b.closestPointRange);!B&&b.tickIntervalb.tickInterval&&1E3b.max)),!!this.tickAmount));this.tickAmount||(b.tickInterval=b.unsquish());this.setTickPositions()},setTickPositions:function(){var a=this.options,b=a.tickPositions;var c=this.getMinorTickInterval(); var f=a.tickPositioner,e=a.startOnTick,l=a.endOnTick;this.tickmarkOffset=this.categories&&"between"===a.tickmarkPlacement&&1===this.tickInterval?.5:0;this.minorTickInterval="auto"===c&&this.tickInterval?this.tickInterval/5:c;this.single=this.min===this.max&&t(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==a.allowDecimals);this.tickPositions=c=b&&b.slice();!c&&(!this.ordinalPositions&&(this.max-this.min)/this.tickInterval>Math.max(2*this.len,200)?(c=[this.min,this.max],h(19,!1, this.chart)):c=this.isDatetimeAxis?this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval,a.units),this.min,this.max,a.startOfWeek,this.ordinalPositions,this.closestPointRange,!0):this.isLog?this.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max),c.length>this.len&&(c=[c[0],c.pop()],c[0]===c[1]&&(c.length=1)),this.tickPositions=c,f&&(f=f.apply(this,[this.min,this.max])))&&(this.tickPositions=c=f);this.paddedTicks=c.slice(0); this.trimTicks(c,e,l);this.isLinked||(this.single&&2>c.length&&!this.categories&&!this.series.some(function(b){return b.is("heatmap")&&"between"===b.options.pointPlacement})&&(this.min-=.5,this.max+=.5),b||f||this.adjustTickAmount());q(this,"afterSetTickPositions")},trimTicks:function(a,b,c){var f=a[0],e=a[a.length-1],p=!this.isOrdinal&&this.minPointOffset||0;q(this,"trimTicks");if(!this.isLinked){if(b&&-Infinity!==f)this.min=f;else for(;this.min-p>a[0];)a.shift();if(c)this.max=e;else for(;this.max+ pb&&(this.finalTickAmt=b,b=5);this.tickAmount=b},adjustTickAmount:function(){var a=this.options,b=this.tickInterval,c=this.tickPositions,f=this.tickAmount,e=this.finalTickAmt,l=c&&c.length,k=z(this.threshold,this.softThreshold?0:null),v;if(this.hasData()){if(lf&&(this.tickInterval*=2,this.setTickPositions());if(t(e)){for(b=a=c.length;b--;)(3===e&&1===b%2||2>=e&&0l&&(a=l)),t(f)&&(el&&(e=l))),this.displayBtn="undefined"!== typeof a||"undefined"!==typeof e,this.setExtremes(a,e,!1,void 0,{trigger:"zoom"});b.zoomed=!0});return a.zoomed},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsets||[0,0,0,0],f=this.horiz,e=this.width=Math.round(w(z(b.width,a.plotWidth-c[3]+c[1]),a.plotWidth)),l=this.height=Math.round(w(z(b.height,a.plotHeight-c[0]+c[2]),a.plotHeight)),k=this.top=Math.round(w(z(b.top,a.plotTop+c[0]),a.plotHeight,a.plotTop));b=this.left=Math.round(w(z(b.left,a.plotLeft+c[3]),a.plotWidth,a.plotLeft)); this.bottom=a.chartHeight-l-k;this.right=a.chartWidth-e-b;this.len=Math.max(f?e:l,0);this.pos=f?b:k},getExtremes:function(){var a=this.isLog;return{min:a?y(this.lin2log(this.min)):this.min,max:a?y(this.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,c=b?this.lin2log(this.min):this.min;b=b?this.lin2log(this.max):this.max;null===a||-Infinity===a?a=c:Infinity===a?a=b:c>a?a=c:bb?a.align="right":195b&&(a.align="left")});return a.align},tickSize:function(a){var b=this.options,c=b[a+"Length"],f=z(b[a+"Width"],"tick"===a&&this.isXAxis&&!this.categories?1:0);if(f&&c){"inside"===b[a+"Position"]&&(c=-c);var e=[c,f]}a={tickSize:e};q(this,"afterTickSize",a);return a.tickSize},labelMetrics:function(){var a=this.tickPositions&&this.tickPositions[0]|| 0;return this.chart.renderer.fontMetrics(this.options.labels.style&&this.options.labels.style.fontSize,this.ticks[a]&&this.ticks[a].label)},unsquish:function(){var a=this.options.labels,b=this.horiz,c=this.tickInterval,f=c,e=this.len/(((this.categories?1:0)+this.max-this.min)/c),l,k=a.rotation,v=this.labelMetrics(),m,d=Number.MAX_VALUE,n,w=this.max-this.min,F=function(b){var a=b/(e||1);a=1w&&Infinity!==b&&Infinity!==e&&w&&(a=Math.ceil(w/c));return y(a*c)};b?(n=!a.staggerLines&& !a.step&&(t(k)?[k]:e=b){m=F(Math.abs(v.h/Math.sin(K*b)));var a=m+Math.abs(b/360);a(f.step||0)&&!f.rotation&&(this.staggerLines||1)*this.len/ e||!c&&(f.style&&parseInt(f.style.width,10)||l&&l-b.spacing[3]||.33*b.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,c=this.tickPositions,e=this.ticks,l=this.options.labels,k=l&&l.style||{},v=this.horiz,d=this.getSlotWidth(),m=Math.max(1,Math.round(d-2*(l.padding||5))),n={},w=this.labelMetrics(),h=l.style&&l.style.textOverflow,F=0;f(l.rotation)||(n.rotation=l.rotation||0);c.forEach(function(b){b=e[b];b.movedLabel&&b.replaceMovedLabel();b&&b.label&&b.label.textPxLength>F&&(F= b.label.textPxLength)});this.maxLabelLength=F;if(this.autoRotation)F>m&&F>w.h?n.rotation=this.labelRotation:this.labelRotation=0;else if(d){var z=m;if(!h){var q="clip";for(m=c.length;!v&&m--;){var B=c[m];if(B=e[B].label)B.styles&&"ellipsis"===B.styles.textOverflow?B.css({textOverflow:"clip"}):B.textPxLength>d&&B.css({width:d+"px"}),B.getBBox().height>this.len/c.length-(w.h-w.f)&&(B.specificTextOverflow="ellipsis")}}}n.rotation&&(z=F>.5*a.chartHeight?.33*a.chartHeight:F,h||(q="ellipsis"));if(this.labelAlign= l.align||this.autoLabelAlign(this.labelRotation))n.align=this.labelAlign;c.forEach(function(b){var a=(b=e[b])&&b.label,c=k.width,f={};a&&(a.attr(n),b.shortenLabel?b.shortenLabel():z&&!c&&"nowrap"!==k.whiteSpace&&(z=this.min&&a<=this.max)f[a]||(f[a]=new r(this,a)),e&&f[a].isNew&& f[a].render(b,!0,-1),f[a].render(b)},render:function(){var a=this,b=a.chart,c=a.options,f=a.isLog,e=a.isLinked,l=a.tickPositions,k=a.axisTitle,w=a.ticks,m=a.minorTicks,h=a.alternateBands,z=c.stackLabels,B=c.alternateGridColor,F=a.tickmarkOffset,L=a.axisLine,t=a.showAxis,g=E(b.renderer.globalAnimation),H,K;a.labelEdge.length=0;a.overlap=!1;[w,m,h].forEach(function(b){v(b,function(b){b.isActive=!1})});if(a.hasData()||e)a.minorTickInterval&&!a.categories&&a.getMinorTickPositions().forEach(function(b){a.renderMinorTick(b)}), l.length&&(l.forEach(function(b,c){a.renderTick(b,c)}),F&&(0===a.min||a.single)&&(w[-1]||(w[-1]=new r(a,-1,null,!0)),w[-1].render(-1))),B&&l.forEach(function(c,e){K="undefined"!==typeof l[e+1]?l[e+1]+F:a.max-F;0===e%2&&cg&&(!G||P<=A)&&"undefined"!==typeof P&&t.push(P);P>A&&(h=!0);var P=q}}}else g=this.lin2log(g),A=this.lin2log(A),d=G?this.getMinorTickInterval():E.tickInterval,d=I("auto"===d? null:d,this._minorAutoInterval,E.tickPixelInterval/(G?5:1)*(A-g)/((G?y/this.tickPositions.length:y)||1)),d=u(d,null,r(d)),t=this.getLinearTickPositions(d,g,A).map(this.log2lin),G||(this._minorAutoInterval=d/5);G||(this.tickInterval=d);return t};d.prototype.log2lin=function(d){return Math.log(d)/Math.LN10};d.prototype.lin2log=function(d){return Math.pow(10,d)}});S(r,"parts/PlotLineOrBand.js",[r["parts/Globals.js"],r["parts/Axis.js"],r["parts/Utilities.js"]],function(d,g,r){var u=r.arrayMax,I=r.arrayMin, M=r.defined,E=r.destroyObjectProperties,A=r.erase,G=r.extend,J=r.merge,y=r.objectEach,t=r.pick,D=function(){function h(d,h){this.axis=d;h&&(this.options=h,this.id=h.id)}h.prototype.render=function(){d.fireEvent(this,"render");var h=this,q=h.axis,g=q.horiz,e=h.options,c=e.label,k=h.label,n=e.to,f=e.from,a=e.value,l=M(f)&&M(n),v=M(a),z=h.svgElem,w=!z,B=[],L=e.color,Q=t(e.zIndex,0),H=e.events;B={"class":"highcharts-plot-"+(l?"band ":"line ")+(e.className||"")};var K={},p=q.chart.renderer,b=l?"bands": "lines";q.isLog&&(f=q.log2lin(f),n=q.log2lin(n),a=q.log2lin(a));q.chart.styledMode||(v?(B.stroke=L||"#999999",B["stroke-width"]=t(e.width,1),e.dashStyle&&(B.dashstyle=e.dashStyle)):l&&(B.fill=L||"#e6ebf5",e.borderWidth&&(B.stroke=e.borderColor,B["stroke-width"]=e.borderWidth)));K.zIndex=Q;b+="-"+Q;(L=q.plotLinesAndBandsGroups[b])||(q.plotLinesAndBandsGroups[b]=L=p.g("plot-"+b).attr(K).add());w&&(h.svgElem=z=p.path().attr(B).add(L));if(v)B=q.getPlotLinePath({value:a,lineWidth:z.strokeWidth(),acrossPanes:e.acrossPanes}); else if(l)B=q.getPlotBandPath(f,n,e);else return;(w||!z.d)&&B&&B.length?(z.attr({d:B}),H&&y(H,function(b,a){z.on(a,function(b){H[a].apply(h,[b])})})):z&&(B?(z.show(!0),z.animate({d:B})):z.d&&(z.hide(),k&&(h.label=k=k.destroy())));c&&(M(c.text)||M(c.formatter))&&B&&B.length&&0this.max&&g>this.max;if(t&&h){if(d){var n=t.toString()===h.toString();k=0}for(d=0;dc){w=n;break}if(k[w]&&l.substr(k[w])!=="01-01 00:00:00.000".substr(k[w]))break;"week"!==w&&(n=w)}if(w)var h=a.resolveDTLFormat(f[w]).main;return h};e.prototype.getLabel=function(){var c,e=this,n=this.chart.renderer,f=this.chart.styledMode,a=this.options,l="tooltip"+(I(a.className)?" "+a.className:""),v=(null===(c=a.style)||void 0===c?void 0:c.pointerEvents)||(!this.followPointer&&a.stickOnContact?"auto":"none"),h;c=function(){e.inContact=!0};var w=function(){var a= e.chart.hoverSeries;e.inContact=!1;if(a&&a.onMouseOut)a.onMouseOut()};if(!this.label){this.outside&&(this.container=h=d.doc.createElement("div"),h.className="highcharts-tooltip-container",u(h,{position:"absolute",top:"1px",pointerEvents:v,zIndex:3}),d.doc.body.appendChild(h),this.renderer=n=new d.Renderer(h,0,0,{},void 0,void 0,n.styledMode));this.split?this.label=n.g(l):(this.label=n.label("",0,0,a.shape||"callout",null,null,a.useHTML,null,l).attr({padding:a.padding,r:a.borderRadius}),f||this.label.attr({fill:a.backgroundColor, "stroke-width":a.borderWidth}).css(a.style).css({pointerEvents:v}).shadow(a.shadow));f&&(this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index));if(e.outside&&!e.split){var B={x:this.label.xSetter,y:this.label.ySetter};this.label.xSetter=function(a,c){B[c].call(this.label,e.distance);h.style.left=a+"px"};this.label.ySetter=function(a,c){B[c].call(this.label,e.distance);h.style.top=a+"px"}}this.label.on("mouseenter",c).on("mouseleave",w).attr({zIndex:8}).add()}return this.label}; e.prototype.getPosition=function(c,e,d){var f=this.chart,a=this.distance,l={},k=f.inverted&&d.h||0,n,w=this.outside,h=w?q.documentElement.clientWidth-2*a:f.chartWidth,g=w?Math.max(q.body.scrollHeight,q.documentElement.scrollHeight,q.body.offsetHeight,q.documentElement.offsetHeight,q.documentElement.clientHeight):f.chartHeight,Q=f.pointer.getChartPosition(),H=f.containerScaling,K=function(b){return H?b*H.scaleX:b},p=function(b){return H?b*H.scaleY:b},b=function(b){var l="x"===b;return[b,l?h:g,l?c: e].concat(w?[l?K(c):p(e),l?Q.left-a+K(d.plotX+f.plotLeft):Q.top-a+p(d.plotY+f.plotTop),0,l?h:g]:[l?c:e,l?d.plotX+f.plotLeft:d.plotY+f.plotTop,l?f.plotLeft:f.plotTop,l?f.plotLeft+f.plotWidth:f.plotTop+f.plotHeight])},C=b("y"),x=b("x"),R=!this.followPointer&&t(d.ttBelow,!f.inverted===!!d.negative),O=function(b,c,f,e,d,m,v){var n="y"===b?p(a):K(a),w=(f-e)/2,x=eF-k?F:F-k);else if(h)l[b]=Math.max(m,d+k+f> c?d:d+k);else return!1},y=function(b,c,f,e,d){var k;dc-a?k=!1:l[b]=dc-e/2?c-e-2:d-f/2;return k},u=function(b){var a=C;C=x;x=a;n=b},m=function(){!1!==O.apply(0,C)?!1!==y.apply(0,x)||n||(u(!0),m()):n?l.x=l.y=0:(u(!0),m())};(f.inverted||1=p+w&&L.pos+g<=p+w+v-H&&(K=L.pos+g);B=r(B,O.left-C,O.right+C);"number"===typeof K?(z=z.height+1,g=R?R.call(f,n,z,l):k(B,K,d,n),a.push({align:R?0:void 0,anchorX:B,anchorY:K,boxWidth:n,point:l,rank:t(g.rank,d?1:0),size:z,target:g.y,tt:c,x:g.x})):c.isActive=!1}return a},[]);!R&&c.some(function(b){return b.xd[0]?Math.max(Math.abs(d[0]),a.width-d[0]):Math.max(Math.abs(d[0]),a.width);f.height=0>d[1]?Math.max(Math.abs(d[1]),a.height-Math.abs(d[1])):Math.max(Math.abs(d[1]),a.height);this.tracker?this.tracker.attr(f):(this.tracker=e.renderer.rect(f).addClass("highcharts-tracker").add(e),c.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}}};e.prototype.styledModeFormat= function(c){return c.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex}"')};e.prototype.tooltipFooterHeaderFormatter=function(c,e){var k=e?"footer":"header",f=c.series,a=f.tooltipOptions,l=a.xDateFormat,v=f.xAxis,h=v&&"datetime"===v.options.type&&G(c.key),w=a[k+"Format"];e={isFooter:e,labelConfig:c};d.fireEvent(this,"headerFormatter",e,function(e){h&&!l&&(l=this.getXDateFormat(c,a,v));h&&l&&(c.point&& c.point.tooltipDateKeys||["key"]).forEach(function(a){w=w.replace("{point."+a+"}","{point."+a+":"+l+"}")});f.chart.styledMode&&(w=this.styledModeFormat(w));e.text=A(w,{point:c,series:f},this.chart)});return e.text};e.prototype.update=function(c){this.destroy();y(!0,this.chart.options.tooltip.userOptions,c);this.init(this.chart,y(!0,this.options,c))};e.prototype.updatePosition=function(c){var e=this.chart,d=e.pointer,f=this.getLabel(),a=c.plotX+e.plotLeft,l=c.plotY+e.plotTop;d=d.getChartPosition(); c=(this.options.positioner||this.getPosition).call(this,f.width,f.height,c);if(this.outside){var v=(this.options.borderWidth||0)+2*this.distance;this.renderer.setSize(f.width+v,f.height+v,!1);if(e=e.containerScaling)u(this.container,{transform:"scale("+e.scaleX+", "+e.scaleY+")"}),a*=e.scaleX,l*=e.scaleY;a+=d.left-c.x;l+=d.top-c.y}this.move(Math.round(c.x),Math.round(c.y||0),a,l)};return e}();d.Tooltip=P;return d.Tooltip});S(r,"parts/Pointer.js",[r["parts/Globals.js"],r["parts/Utilities.js"],r["parts/Tooltip.js"], r["parts/Color.js"]],function(d,g,r,u){var I=g.addEvent,M=g.attr,E=g.css,A=g.defined,G=g.extend,J=g.find,y=g.fireEvent,t=g.isNumber,D=g.isObject,h=g.objectEach,N=g.offset,q=g.pick,P=g.splat,e=u.parse,c=d.charts,k=d.noop;g=function(){function n(c,a){this.lastValidTouch={};this.pinchDown=[];this.runChartClick=!1;this.chart=c;this.hasDragged=!1;this.options=a;this.unbindContainerMouseLeave=function(){};this.init(c,a)}n.prototype.applyInactiveState=function(c){var a=[],f;(c||[]).forEach(function(c){f= c.series;a.push(f);f.linkedParent&&a.push(f.linkedParent);f.linkedSeries&&(a=a.concat(f.linkedSeries));f.navigatorSeries&&a.push(f.navigatorSeries)});this.chart.series.forEach(function(c){-1===a.indexOf(c)?c.setState("inactive",!0):c.options.inactiveOtherPoints&&c.setAllPointsToState("inactive")})};n.prototype.destroy=function(){var c=this;"undefined"!==typeof c.unDocMouseMove&&c.unDocMouseMove();this.unbindContainerMouseLeave();d.chartCount||(d.unbindDocumentMouseUp&&(d.unbindDocumentMouseUp=d.unbindDocumentMouseUp()), d.unbindDocumentTouchEnd&&(d.unbindDocumentTouchEnd=d.unbindDocumentTouchEnd()));clearInterval(c.tooltipTimeout);h(c,function(a,f){c[f]=null})};n.prototype.drag=function(c){var a=this.chart,f=a.options.chart,d=c.chartX,k=c.chartY,w=this.zoomHor,n=this.zoomVert,h=a.plotLeft,q=a.plotTop,g=a.plotWidth,t=a.plotHeight,p=this.selectionMarker,b=this.mouseDownX||0,C=this.mouseDownY||0,x=D(f.panning)?f.panning&&f.panning.enabled:f.panning,y=f.panKey&&c[f.panKey+"Key"];if(!p||!p.touch)if(dh+g&&(d= h+g),kq+t&&(k=q+t),this.hasDragged=Math.sqrt(Math.pow(b-d,2)+Math.pow(C-k,2)),10c.options.findNearestPointBy.indexOf("y");c=c.searchPoint(e,f);if((f=D(c,!0))&&!(f=!D(l,!0))){f=l.distX-c.distX;var d=l.dist-c.dist,k=(c.series.group&&c.series.group.zIndex)-(l.series.group&&l.series.group.zIndex);f=0<(0!== f&&a?f:0!==d?d:0!==k?k:l.series.index>c.series.index?-1:1)}f&&(l=c)});return l};n.prototype.getChartCoordinatesFromPoint=function(c,a){var f=c.series,e=f.xAxis;f=f.yAxis;var d=q(c.clientX,c.plotX),k=c.shapeArgs;if(e&&f)return a?{chartX:e.len+e.pos-d,chartY:f.len+f.pos-c.plotY}:{chartX:d+e.pos,chartY:c.plotY+f.pos};if(k&&k.x&&k.y)return{chartX:k.x,chartY:k.y}};n.prototype.getChartPosition=function(){return this.chartPosition||(this.chartPosition=N(this.chart.container))};n.prototype.getCoordinates= function(c){var a={xAxis:[],yAxis:[]};this.chart.axes.forEach(function(f){a[f.isXAxis?"xAxis":"yAxis"].push({axis:f,value:f.toValue(c[f.horiz?"chartX":"chartY"])})});return a};n.prototype.getHoverData=function(c,a,e,d,k,n){var f,l=[];d=!(!d||!c);var v=a&&!a.stickyTracking,h={chartX:n?n.chartX:void 0,chartY:n?n.chartY:void 0,shared:k};y(this,"beforeGetHoverData",h);v=v?[a]:e.filter(function(a){return h.filter?h.filter(a):a.visible&&!(!k&&a.directTouch)&&q(a.options.enableMouseTracking,!0)&&a.stickyTracking}); a=(f=d||!n?c:this.findNearestKDPoint(v,k,n))&&f.series;f&&(k&&!a.noSharedTooltip?(v=e.filter(function(a){return h.filter?h.filter(a):a.visible&&!(!k&&a.directTouch)&&q(a.options.enableMouseTracking,!0)&&!a.noSharedTooltip}),v.forEach(function(a){var c=J(a.points,function(b){return b.x===f.x&&!b.isNull});D(c)&&(a.chart.isBoosting&&(c=a.getPoint(c)),l.push(c))})):l.push(f));h={hoverPoint:f};y(this,"afterGetHoverData",h);return{hoverPoint:h.hoverPoint,hoverSeries:a,hoverPoints:l}};n.prototype.getPointFromEvent= function(c){c=c.target;for(var a;c&&!a;)a=c.point,c=c.parentNode;return a};n.prototype.onTrackerMouseOut=function(c){var a=this.chart.hoverSeries;c=c.relatedTarget||c.toElement;this.isDirectTouch=!1;if(!(!a||!c||a.stickyTracking||this.inClass(c,"highcharts-tooltip")||this.inClass(c,"highcharts-series-"+a.index)&&this.inClass(c,"highcharts-tracker")))a.onMouseOut()};n.prototype.inClass=function(c,a){for(var f;c;){if(f=M(c,"class")){if(-1!==f.indexOf(a))return!0;if(-1!==f.indexOf("highcharts-container"))return!1}c= c.parentNode}};n.prototype.init=function(c,a){this.options=a;this.chart=c;this.runChartClick=a.chart.events&&!!a.chart.events.click;this.pinchDown=[];this.lastValidTouch={};r&&(c.tooltip=new r(c,a.tooltip),this.followTouchMove=q(a.tooltip.followTouchMove,!0));this.setDOMEvents()};n.prototype.normalize=function(c,a){var f=c.touches,e=f?f.length?f.item(0):f.changedTouches[0]:c;a||(a=this.getChartPosition());f=e.pageX-a.left;a=e.pageY-a.top;if(e=this.chart.containerScaling)f/=e.scaleX,a/=e.scaleY;return G(c, {chartX:Math.round(f),chartY:Math.round(a)})};n.prototype.onContainerClick=function(c){var a=this.chart,f=a.hoverPoint,e=a.plotLeft,d=a.plotTop;c=this.normalize(c);a.cancelClick||(f&&this.inClass(c.target,"highcharts-tracker")?(y(f.series,"click",G(c,{point:f})),a.hoverPoint&&f.firePointEvent("click",c)):(G(c,this.getCoordinates(c)),a.isInsidePlot(c.chartX-e,c.chartY-d)&&y(a,"click",c)))};n.prototype.onContainerMouseDown=function(c){c=this.normalize(c);2!==c.button&&(this.zoomOption(c),c.preventDefault&& c.preventDefault(),this.dragStart(c))};n.prototype.onContainerMouseLeave=function(f){var a=c[d.hoverChartIndex];a&&(f.relatedTarget||f.toElement)&&(a.pointer.reset(),a.pointer.chartPosition=void 0)};n.prototype.onContainerMouseMove=function(f){var a=this.chart;A(d.hoverChartIndex)&&c[d.hoverChartIndex]&&c[d.hoverChartIndex].mouseIsDown||(d.hoverChartIndex=a.index);f=this.normalize(f);f.preventDefault||(f.returnValue=!1);"mousedown"===a.mouseIsDown&&this.drag(f);a.openMenu||!this.inClass(f.target, "highcharts-tracker")&&!a.isInsidePlot(f.chartX-a.plotLeft,f.chartY-a.plotTop)||this.runPointActions(f)};n.prototype.onDocumentTouchEnd=function(f){c[d.hoverChartIndex]&&c[d.hoverChartIndex].pointer.drop(f)};n.prototype.onContainerTouchMove=function(c){this.touch(c)};n.prototype.onContainerTouchStart=function(c){this.zoomOption(c);this.touch(c,!0)};n.prototype.onDocumentMouseMove=function(c){var a=this.chart,f=this.chartPosition,e=a.tooltip;c=this.normalize(c,f);!f||e&&e.isStickyOnContact()||a.isInsidePlot(c.chartX- a.plotLeft,c.chartY-a.plotTop)||this.inClass(c.target,"highcharts-tracker")||this.reset()};n.prototype.onDocumentMouseUp=function(f){c[d.hoverChartIndex]&&c[d.hoverChartIndex].pointer.drop(f)};n.prototype.pinch=function(c){var a=this,f=a.chart,e=a.pinchDown,d=c.touches||[],n=d.length,h=a.lastValidTouch,g=a.hasZoom,t=a.selectionMarker,H={},K=1===n&&(a.inClass(c.target,"highcharts-tracker")&&f.runTrackerClick||a.runChartClick),p={};1t.max&&(a=t.max-x,V=!0);V?(y-=.8*(y-h[l][0]),"number"===typeof F&&(F-=.8*(F-h[l][1])),e()):h[l]=[y,F];z||(n[l]=B-w,n[b]=x);n=z? 1/g:g;k[b]=x;k[l]=a;d[z?c?"scaleY":"scaleX":"scale"+v]=g;d["translate"+v]=n*w+(y-n*L)};n.prototype.reset=function(c,a){var f=this.chart,e=f.hoverSeries,d=f.hoverPoint,k=f.hoverPoints,n=f.tooltip,h=n&&n.shared?k:d;c&&h&&P(h).forEach(function(a){a.series.isCartesian&&"undefined"===typeof a.plotX&&(c=!1)});if(c)n&&h&&P(h).length&&(n.refresh(h),n.shared&&k?k.forEach(function(a){a.setState(a.state,!0);a.series.isCartesian&&(a.series.xAxis.crosshair&&a.series.xAxis.drawCrosshair(null,a),a.series.yAxis.crosshair&& a.series.yAxis.drawCrosshair(null,a))}):d&&(d.setState(d.state,!0),f.axes.forEach(function(a){a.crosshair&&d.series[a.coll]===a&&a.drawCrosshair(null,d)})));else{if(d)d.onMouseOut();k&&k.forEach(function(a){a.setState()});if(e)e.onMouseOut();n&&n.hide(a);this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove());f.axes.forEach(function(a){a.hideCrosshair()});this.hoverX=f.hoverPoints=f.hoverPoint=null}};n.prototype.runPointActions=function(f,a){var e=this.chart,k=e.tooltip&&e.tooltip.options.enabled? e.tooltip:void 0,n=k?k.shared:!1,h=a||e.hoverPoint,g=h&&h.series||e.hoverSeries;g=this.getHoverData(h,g,e.series,(!f||"touchmove"!==f.type)&&(!!a||g&&g.directTouch&&this.isDirectTouch),n,f);h=g.hoverPoint;var t=g.hoverPoints;a=(g=g.hoverSeries)&&g.tooltipOptions.followPointer;n=n&&g&&!g.noSharedTooltip;if(h&&(h!==e.hoverPoint||k&&k.isHidden)){(e.hoverPoints||[]).forEach(function(a){-1===t.indexOf(a)&&a.setState()});if(e.hoverSeries!==g)g.onMouseOver();this.applyInactiveState(t);(t||[]).forEach(function(a){a.setState("hover")}); e.hoverPoint&&e.hoverPoint.firePointEvent("mouseOut");if(!h.series)return;h.firePointEvent("mouseOver");e.hoverPoints=t;e.hoverPoint=h;k&&k.refresh(n?t:h,f)}else a&&k&&!k.isHidden&&(h=k.getAnchor([{}],f),k.updatePosition({plotX:h[0],plotY:h[1]}));this.unDocMouseMove||(this.unDocMouseMove=I(e.container.ownerDocument,"mousemove",function(a){var f=c[d.hoverChartIndex];if(f)f.pointer.onDocumentMouseMove(a)}));e.axes.forEach(function(a){var c=q(a.crosshair.snap,!0),e=c?J(t,function(c){return c.series[a.coll]=== a}):void 0;e||!c?a.drawCrosshair(f,e):a.hideCrosshair()})};n.prototype.scaleGroups=function(c,a){var f=this.chart,e;f.series.forEach(function(d){e=c||d.getPlotBox();d.xAxis&&d.xAxis.zoomEnabled&&d.group&&(d.group.attr(e),d.markerGroup&&(d.markerGroup.attr(e),d.markerGroup.clip(a?f.clipRect:null)),d.dataLabelsGroup&&d.dataLabelsGroup.attr(e))});f.clipRect.attr(a||f.clipBox)};n.prototype.setDOMEvents=function(){var c=this,a=c.chart.container,e=a.ownerDocument;a.onmousedown=function(a){c.onContainerMouseDown(a)}; a.onmousemove=function(a){c.onContainerMouseMove(a)};a.onclick=function(a){c.onContainerClick(a)};this.unbindContainerMouseLeave=I(a,"mouseleave",c.onContainerMouseLeave);d.unbindDocumentMouseUp||(d.unbindDocumentMouseUp=I(e,"mouseup",c.onDocumentMouseUp));d.hasTouch&&(I(a,"touchstart",function(a){c.onContainerTouchStart(a)}),I(a,"touchmove",function(a){c.onContainerTouchMove(a)}),d.unbindDocumentTouchEnd||(d.unbindDocumentTouchEnd=I(e,"touchend",c.onDocumentTouchEnd)))};n.prototype.touch=function(c, a){var f=this.chart,e;if(f.index!==d.hoverChartIndex)this.onContainerMouseLeave({relatedTarget:!0});d.hoverChartIndex=f.index;if(1===c.touches.length)if(c=this.normalize(c),(e=f.isInsidePlot(c.chartX-f.plotLeft,c.chartY-f.plotTop))&&!f.openMenu){a&&this.runPointActions(c);if("touchmove"===c.type){a=this.pinchDown;var k=a[0]?4<=Math.sqrt(Math.pow(a[0].chartX-c.chartX,2)+Math.pow(a[0].chartY-c.chartY,2)):!1}q(k,!0)&&this.pinch(c)}else a&&this.reset();else 2===c.touches.length&&this.pinch(c)};n.prototype.zoomOption= function(c){var a=this.chart,f=a.options.chart,e=f.zoomType||"";a=a.inverted;/touch/.test(c.type)&&(e=q(f.pinchType,e));this.zoomX=c=/x/.test(e);this.zoomY=e=/y/.test(e);this.zoomHor=c&&!a||e&&a;this.zoomVert=e&&!a||c&&a;this.hasZoom=c||e};return n}();d.Pointer=g;return d.Pointer});S(r,"parts/MSPointer.js",[r["parts/Globals.js"],r["parts/Pointer.js"],r["parts/Utilities.js"]],function(d,g,r){function u(){var d=[];d.item=function(d){return this[d]};G(h,function(h){d.push({pageX:h.pageX,pageY:h.pageY, target:h.target})});return d}function I(h,g,e,c){"touch"!==h.pointerType&&h.pointerType!==h.MSPOINTER_TYPE_TOUCH||!y[d.hoverChartIndex]||(c(h),c=y[d.hoverChartIndex].pointer,c[g]({type:e,target:h.currentTarget,preventDefault:D,touches:u()}))}var M=this&&this.__extends||function(){var d=function(h,e){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,e){c.__proto__=e}||function(c,e){for(var d in e)e.hasOwnProperty(d)&&(c[d]=e[d])};return d(h,e)};return function(h,e){function c(){this.constructor= h}d(h,e);h.prototype=null===e?Object.create(e):(c.prototype=e.prototype,new c)}}(),E=r.addEvent,A=r.css,G=r.objectEach,J=r.removeEvent,y=d.charts,t=d.doc,D=d.noop,h={},N=!!d.win.PointerEvent;return function(d){function g(){return null!==d&&d.apply(this,arguments)||this}M(g,d);g.prototype.batchMSEvents=function(e){e(this.chart.container,N?"pointerdown":"MSPointerDown",this.onContainerPointerDown);e(this.chart.container,N?"pointermove":"MSPointerMove",this.onContainerPointerMove);e(t,N?"pointerup": "MSPointerUp",this.onDocumentPointerUp)};g.prototype.destroy=function(){this.batchMSEvents(J);d.prototype.destroy.call(this)};g.prototype.init=function(e,c){d.prototype.init.call(this,e,c);this.hasZoom&&A(e.container,{"-ms-touch-action":"none","touch-action":"none"})};g.prototype.onContainerPointerDown=function(e){I(e,"onContainerTouchStart","touchstart",function(c){h[c.pointerId]={pageX:c.pageX,pageY:c.pageY,target:c.currentTarget}})};g.prototype.onContainerPointerMove=function(e){I(e,"onContainerTouchMove", "touchmove",function(c){h[c.pointerId]={pageX:c.pageX,pageY:c.pageY};h[c.pointerId].target||(h[c.pointerId].target=c.currentTarget)})};g.prototype.onDocumentPointerUp=function(e){I(e,"onDocumentTouchEnd","touchend",function(c){delete h[c.pointerId]})};g.prototype.setDOMEvents=function(){d.prototype.setDOMEvents.call(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(E)};return g}(g)});S(r,"parts/Legend.js",[r["parts/Globals.js"],r["parts/Utilities.js"]],function(d,g){var r=g.addEvent, u=g.css,I=g.defined,M=g.discardElement,E=g.find,A=g.fireEvent,G=g.format,J=g.isNumber,y=g.merge,t=g.pick,D=g.relativeLength,h=g.setAnimation,N=g.stableSort,q=g.syncTimeout;g=g.wrap;var P=d.isFirefox,e=d.marginNames,c=d.win,k=function(){function c(c,a){this.allItems=[];this.contentGroup=this.box=void 0;this.display=!1;this.group=void 0;this.offsetWidth=this.maxLegendWidth=this.maxItemWidth=this.legendWidth=this.legendHeight=this.lastLineHeight=this.lastItemY=this.itemY=this.itemX=this.itemMarginTop= this.itemMarginBottom=this.itemHeight=this.initialItemY=0;this.options={};this.padding=0;this.pages=[];this.proximate=!1;this.scrollGroup=void 0;this.widthOption=this.totalItemWidth=this.titleHeight=this.symbolWidth=this.symbolHeight=0;this.chart=c;this.init(c,a)}c.prototype.init=function(c,a){this.chart=c;this.setOptions(a);a.enabled&&(this.render(),r(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),this.proximate?this.unchartrender=r(this.chart,"render",function(){this.legend.proximatePositions(); this.legend.positionItems()}):this.unchartrender&&this.unchartrender())};c.prototype.setOptions=function(c){var a=t(c.padding,8);this.options=c;this.chart.styledMode||(this.itemStyle=c.itemStyle,this.itemHiddenStyle=y(this.itemStyle,c.itemHiddenStyle));this.itemMarginTop=c.itemMarginTop||0;this.itemMarginBottom=c.itemMarginBottom||0;this.padding=a;this.initialItemY=a-5;this.symbolWidth=t(c.symbolWidth,16);this.pages=[];this.proximate="proximate"===c.layout&&!this.chart.inverted;this.baseline=void 0}; c.prototype.update=function(c,a){var f=this.chart;this.setOptions(y(!0,this.options,c));this.destroy();f.isDirtyLegend=f.isDirtyBox=!0;t(a,!0)&&f.redraw();A(this,"afterUpdate")};c.prototype.colorizeItem=function(c,a){c.legendGroup[a?"removeClass":"addClass"]("highcharts-legend-item-hidden");if(!this.chart.styledMode){var f=this.options,e=c.legendItem,d=c.legendLine,k=c.legendSymbol,h=this.itemHiddenStyle.color;f=a?f.itemStyle.color:h;var n=a?c.color||h:h,g=c.options&&c.options.marker,q={fill:n};e&& e.css({fill:f,color:f});d&&d.attr({stroke:n});k&&(g&&k.isMarker&&(q=c.pointAttribs(),a||(q.stroke=q.fill=h)),k.attr(q))}A(this,"afterColorizeItem",{item:c,visible:a})};c.prototype.positionItems=function(){this.allItems.forEach(this.positionItem,this);this.chart.isResizing||this.positionCheckboxes()};c.prototype.positionItem=function(c){var a=this.options,f=a.symbolPadding;a=!a.rtl;var e=c._legendItemPos,d=e[0];e=e[1];var k=c.checkbox;if((c=c.legendGroup)&&c.element)c[I(c.translateY)?"animate":"attr"]({translateX:a? d:this.legendWidth-d-2*f-4,translateY:e});k&&(k.x=d,k.y=e)};c.prototype.destroyItem=function(c){var a=c.checkbox;["legendItem","legendLine","legendSymbol","legendGroup"].forEach(function(a){c[a]&&(c[a]=c[a].destroy())});a&&M(c.checkbox)};c.prototype.destroy=function(){function c(a){this[a]&&(this[a]=this[a].destroy())}this.getAllItems().forEach(function(a){["legendItem","legendGroup"].forEach(c,a)});"clipRect up down pager nav box title group".split(" ").forEach(c,this);this.display=null};c.prototype.positionCheckboxes= function(){var c=this.group&&this.group.alignAttr,a=this.clipHeight||this.legendHeight,e=this.titleHeight;if(c){var d=c.translateY;this.allItems.forEach(function(f){var k=f.checkbox;if(k){var l=d+e+k.y+(this.scrollOffset||0)+3;u(k,{left:c.translateX+f.checkboxOffset+k.x-20+"px",top:l+"px",display:this.proximate||l>d-6&&lg?this.maxItemWidth:c.itemWidth;f&&this.itemX-e+a>g&&(this.itemX=e,this.lastLineHeight&&(this.itemY+=h+this.lastLineHeight+k),this.lastLineHeight=0);this.lastItemY=h+this.itemY+k;this.lastLineHeight=Math.max(d,this.lastLineHeight);c._legendItemPos=[this.itemX,this.itemY];f?this.itemX+=a:(this.itemY+= h+d+k,this.lastLineHeight=d);this.offsetWidth=this.widthOption||Math.max((f?this.itemX-e-(c.checkbox?0:n):a)+e,this.offsetWidth)};c.prototype.getAllItems=function(){var c=[];this.chart.series.forEach(function(a){var e=a&&a.options;a&&t(e.showInLegend,I(e.linkedTo)?!1:void 0,!0)&&(c=c.concat(a.legendItems||("point"===e.legendType?a.data:a)))});A(this,"afterGetAllItems",{allItems:c});return c};c.prototype.getAlignment=function(){var c=this.options;return this.proximate?c.align.charAt(0)+"tv":c.floating? "":c.align.charAt(0)+c.verticalAlign.charAt(0)+c.layout.charAt(0)};c.prototype.adjustMargins=function(c,a){var f=this.chart,d=this.options,k=this.getAlignment();k&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(l,h){l.test(k)&&!I(c[h])&&(f[e[h]]=Math.max(f[e[h]],f.legend[(h+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][h]*d[h%2?"x":"y"]+t(d.margin,12)+a[h]+(f.titleOffset[h]||0)))})};c.prototype.proximatePositions=function(){var c=this.chart,a=[],e="left"===this.options.align; this.allItems.forEach(function(f){var d=e;if(f.yAxis&&f.points){f.xAxis.options.reversed&&(d=!d);var k=E(d?f.points:f.points.slice(0).reverse(),function(a){return J(a.plotY)});d=this.itemMarginTop+f.legendItem.getBBox().height+this.itemMarginBottom;var l=f.yAxis.top-c.plotTop;f.visible?(k=k?k.plotY:f.yAxis.height,k+=l-.3*d):k=l+f.yAxis.height;a.push({target:k,size:d,item:f})}},this);d.distribute(a,c.plotHeight);a.forEach(function(a){a.item._legendItemPos[1]=c.plotTop-c.spacing[0]+a.pos})};c.prototype.render= function(){var c=this.chart,a=c.renderer,e=this.group,d,k=this.box,h=this.options,n=this.padding;this.itemX=n;this.itemY=this.initialItemY;this.lastItemY=this.offsetWidth=0;this.widthOption=D(h.width,c.spacingBox.width-n);var g=c.spacingBox.width-2*n-h.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(g/=2);this.maxLegendWidth=this.widthOption||g;e||(this.group=e=a.g("legend").attr({zIndex:7}).add(),this.contentGroup=a.g().attr({zIndex:1}).add(e),this.scrollGroup=a.g().add(this.contentGroup)); this.renderTitle();g=this.getAllItems();N(g,function(a,c){return(a.options&&a.options.legendIndex||0)-(c.options&&c.options.legendIndex||0)});h.reversed&&g.reverse();this.allItems=g;this.display=d=!!g.length;this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0;g.forEach(this.renderItem,this);g.forEach(this.layoutItem,this);g=(this.widthOption||this.offsetWidth)+n;var q=this.lastItemY+this.lastLineHeight+this.titleHeight;q=this.handleOverflow(q);q+=n;k||(this.box=k=a.rect().addClass("highcharts-legend-box").attr({r:h.borderRadius}).add(e), k.isNew=!0);c.styledMode||k.attr({stroke:h.borderColor,"stroke-width":h.borderWidth||0,fill:h.backgroundColor||"none"}).shadow(h.shadow);0k&&!1!==y.enabled?(this.clipHeight=g=Math.max(k-20-this.titleHeight- h,0),this.currentPage=t(this.currentPage,1),this.fullHeight=c,O.forEach(function(b,a){var c=b._legendItemPos[1],e=Math.round(b.legendItem.getBBox().height),f=x.length;if(!f||c-x[f-1]>g&&(R||c)!==x[f-1])x.push(R||c),f++;b.pageIx=f-1;R&&(O[a-1].pageIx=f-1);a===O.length-1&&c+e-x[f-1]>g&&c!==R&&(x.push(c),b.pageIx=f);c!==R&&(R=c)}),q||(q=a.clipRect=f.clipRect(0,h,9999,0),a.contentGroup.clip(q)),u(g),C||(this.nav=C=f.g().attr({zIndex:1}).add(this.group),this.up=f.symbol("triangle",0,0,b,b).add(C),D("upTracker").on("click", function(){a.scroll(-1,p)}),this.pager=f.text("",15,10).addClass("highcharts-legend-navigation"),e.styledMode||this.pager.css(y.style),this.pager.add(C),this.down=f.symbol("triangle-down",0,0,b,b).add(C),D("downTracker").on("click",function(){a.scroll(1,p)})),a.scroll(0),c=k):C&&(u(),this.nav=C.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return c};c.prototype.scroll=function(c,a){var e=this,f=this.chart,k=this.pages,n=k.length,g=this.currentPage+c;c=this.clipHeight;var y=this.options.navigation, u=this.pager,H=this.padding;g>n&&(g=n);0=h.value;)h=c[++d];this.nonZonedColor||(this.nonZonedColor=this.color);this.color=h&&h.color&&!this.options.color?h.color:this.nonZonedColor;return h};d.prototype.hasNewShapeType=function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType};d.prototype.init=function(e,c,d){this.series=e;this.applyOptions(c,d);this.id=u(this.id)?this.id:N();this.resolveColor();e.chart.pointCount++;q(this,"afterInit");return this};d.prototype.optionsToObject= function(e){var c={},k=this.series,h=k.options.keys,f=h||k.pointArrayMap||["y"],a=f.length,l=0,g=0;if(J(e)||null===e)c[f[0]]=e;else if(G(e))for(!h&&e.length>a&&(k=typeof e[0],"string"===k?c.name=e[0]:"number"===k&&(c.x=e[0]),l++);g=l(b[c].options.index,b[c]._i)){b.splice(c+1,0,this);break}-1===c&&b.unshift(this);c+=1}else b.push(this);return l(c,b.length-1)},bindAxes:function(){var b=this,a=b.options,c=b.chart,e;q(this,"bindAxes",null,function(){(b.axisTypes||[]).forEach(function(f){c[f].forEach(function(c){e=c.options;if(a[f]===e.index||"undefined"!==typeof a[f]&&a[f]===e.id||"undefined"===typeof a[f]&&0===e.index)b.insert(c.series),b[f]=c,c.isDirty=!0});b[f]||b.optionalAxis===f||D(18,!0, c)})});q(this,"afterBindAxes")},updateParallelArrays:function(b,a){var c=b.series,e=arguments,f=k(a)?function(e){var f="y"===e&&c.toYData?c.toYData(b):b[e];c[e+"Data"][a]=f}:function(b){Array.prototype[a].apply(c[b+"Data"],Array.prototype.slice.call(e,2))};c.parallelArrays.forEach(f)},hasData:function(){return this.visible&&"undefined"!==typeof this.dataMax&&"undefined"!==typeof this.dataMin||this.visible&&this.yData&&0=this.cropStart?n-this.cropStart:n);!d&&f[n]&&f[n].touched&&(n=void 0);return n},drawLegendSymbol:g.drawLineMarker,updateData:function(b,a){var c=this.options,e=c.dataSorting,f=this.points,d=[],h,l,n,p=this.requireSorting,g=b.length===f.length, w=!0;this.xIncrement=null;b.forEach(function(b,a){var l=y(b)&&this.pointClass.prototype.optionsToObject.call({series:this},b)||{};var m=l.x;if(l.id||k(m)){if(m=this.findPointIndex(l,n),-1===m||"undefined"===typeof m?d.push(b):f[m]&&b!==c.data[m]?(f[m].update(b,!1,null,!1),f[m].touched=!0,p&&(n=m+1)):f[m]&&(f[m].touched=!0),!g||a!==m||e&&e.enabled||this.hasDerivedData)h=!0}else d.push(b)},this);if(h)for(b=f.length;b--;)(l=f[b])&&!l.touched&&l.remove&&l.remove(!1,a);else!g||e&&e.enabled?w=!1:(b.forEach(function(b, a){f[a].update&&b!==f[a].y&&f[a].update(b,!1,null,!1)}),d.length=0);f.forEach(function(b){b&&(b.touched=!1)});if(!w)return!1;d.forEach(function(b){this.addPoint(b,!1,null,null,!1)},this);null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=E(this.xData),this.autoIncrement());return!0},setData:function(b,a,c,f){var d=this,h=d.points,p=h&&h.length||0,m,g=d.options,w=d.chart,x=g.dataSorting,q=null,v=d.xAxis;q=g.turboThreshold;var C=this.xData,t=this.yData,B=(m=d.pointArrayMap)&&m.length, z=g.keys,y=0,L=1,u;b=b||[];m=b.length;a=l(a,!0);x&&x.enabled&&(b=this.sortData(b));!1!==f&&m&&p&&!d.cropped&&!d.hasGroupedData&&d.visible&&!d.isSeriesBoosting&&(u=this.updateData(b,c));if(!u){d.xIncrement=null;d.colorCounter=0;this.parallelArrays.forEach(function(b){d[b+"Data"].length=0});if(q&&m>q)if(q=d.getFirstValidPoint(b),k(q))for(c=0;cb?1:0}).forEach(function(b,a){b.x=a},this);a.linkedSeries&&a.linkedSeries.forEach(function(a){var c=a.options,f=c.data;c.dataSorting&&c.dataSorting.enabled||!f||(f.forEach(function(c,d){f[d]=e(a,c);b[d]&&(f[d].x=b[d].x,f[d].index= d)}),a.setData(f,!1))});return b},processData:function(b){var a=this.xData,c=this.yData,e=a.length;var f=0;var d=this.xAxis,k=this.options;var h=k.cropThreshold;var l=this.getExtremesFromAll||k.getExtremesFromAll,p=this.isCartesian;k=d&&d.val2lin;var n=d&&d.isLog,g=this.requireSorting;if(p&&!this.isDirty&&!d.isDirty&&!this.yAxis.isDirty&&!b)return!1;if(d){b=d.getExtremes();var w=b.min;var q=b.max}if(p&&this.sorted&&!l&&(!h||e>h||this.forceCrop))if(a[e-1]q)a=[],c=[];else if(this.yData&&(a[0]< w||a[e-1]>q)){f=this.cropData(this.xData,this.yData,w,q);a=f.xData;c=f.yData;f=f.start;var v=!0}for(h=a.length||1;--h;)if(e=n?k(a[h])-k(a[h-1]):a[h]-a[h-1],0e&&g&&(D(15,!1,this.chart),g=!1);this.cropped=v;this.cropStart=f;this.processedXData=a;this.processedYData=c;this.closestPointRange=this.basePointRange=t},cropData:function(b,a,c,e,f){var d=b.length,k=0,h=d,p;f=l(f,this.cropShoulder);for(p=0;p=c){k=Math.max(0,p-f);break}for(c=p;c< d;c++)if(b[c]>e){h=c+f;break}return{xData:b.slice(k,h),yData:a.slice(k,h),start:k,end:h}},generatePoints:function(){var b=this.options,a=b.data,c=this.data,e,f=this.processedXData,d=this.processedYData,k=this.pointClass,l=f.length,p=this.cropStart||0,n=this.hasGroupedData;b=b.keys;var g=[],v;c||n||(c=[],c.length=a.length,c=this.data=c);b&&n&&(this.options.keys=!1);for(v=0;v=l&&(f[g-p]||w)<=m;if(t&&w)if(t=v.length)for(;t--;)k(v[t])&&(d[h++]=v[t]);else d[h++]=v}this.dataMin=A(d);this.dataMax=E(d);q(this,"afterGetExtremes")}, getFirstValidPoint:function(b){for(var a=null,c=b.length,e=0;null===a&&e=H&&(K.isNull=!0);K.plotX=z=J(G(c.translate(r,0,0,0,1,w,"flags"===this.type),-1E5,1E5));if(a&&this.visible&&A&&A[r]){var N=this.getStackIndicator(N,r,this.index);if(!K.isNull){var Q=A[r];var E=Q.points[N.key]}}e(E)&&(D=E[0],H=E[1],D===B&&N.key===A[r].base&&(D=l(k(t)&&t,h.min)),h.positiveValuesOnly&&0>=D&&(D=null),K.total=K.stackTotal=Q.total,K.percentage=Q.total&&K.y/Q.total*100,K.stackY=H,this.irregularWidths|| Q.setOffset(this.pointXOffset||0,this.barW||0));K.yBottom=y(D)?G(h.translate(D,0,1,0,1),-1E5,1E5):null;n&&(H=this.modifyValue(H,K));K.plotY="number"===typeof H&&Infinity!==H?G(h.translate(H,0,1,0,1),-1E5,1E5):void 0;K.isInside=this.isPointInside(K);K.clientX=v?J(c.translate(r,0,0,0,1,w)):z;K.negative=K[L]<(b[L+"Threshold"]||t||0);K.category=f&&"undefined"!==typeof f[K.x]?f[K.x]:K.x;if(!K.isNull&&!1!==K.visible){"undefined"!==typeof P&&(u=Math.min(u,Math.abs(z-P)));var P=z}K.zone=this.zones.length&& K.getZone();!K.graphic&&this.group&&d&&(K.isNew=!0)}this.closestPointRangePx=u;q(this,"afterTranslate")},getValidPoints:function(b,a,c){var e=this.chart;return(b||this.points||[]).filter(function(b){return a&&!e.isInsidePlot(b.plotX,b.plotY,e.inverted)?!1:!1!==b.visible&&(c||!b.isNull)})},getClipBox:function(b,a){var c=this.options,e=this.chart,f=e.inverted,d=this.xAxis,k=d&&this.yAxis;b&&!1===c.clip&&k?b=f?{y:-e.chartWidth+k.len+k.pos,height:e.chartWidth,width:e.chartHeight,x:-e.chartHeight+d.len+ d.pos}:{y:-k.pos,height:e.chartHeight,width:e.chartWidth,x:-d.pos}:(b=this.clipBox||e.clipBox,a&&(b.width=e.plotSizeX,b.x=0));return a?{width:b.width,x:b.x}:b},setClip:function(b){var a=this.chart,c=this.options,e=a.renderer,f=a.inverted,d=this.clipBox,k=this.getClipBox(b),h=this.sharedClipKey||["_sharedClip",b&&b.duration,b&&b.easing,k.height,c.xAxis,c.yAxis].join(),l=a[h],p=a[h+"m"];b&&(k.width=0,f&&(k.x=a.plotHeight+(!1!==c.clip?0:a.plotTop)));l?a.hasLoaded||l.attr(k):(b&&(a[h+"m"]=p=e.clipRect(f? a.plotSizeX+99:-99,f?-a.plotLeft:-a.plotTop,99,f?a.chartWidth:a.chartHeight)),a[h]=l=e.clipRect(k),l.count={length:0});b&&!l.count[this.index]&&(l.count[this.index]=!0,l.count.length+=1);if(!1!==c.clip||b)this.group.clip(b||d?l:a.clipRect),this.markerGroup.clip(p),this.sharedClipKey=h;b||(l.count[this.index]&&(delete l.count[this.index],--l.count.length),0===l.count.length&&h&&a[h]&&(d||(a[h]=a[h].destroy()),a[h+"m"]&&(a[h+"m"]=a[h+"m"].destroy())))},animate:function(b){var a=this.chart,c=M(this.options.animation); if(!a.hasRendered)if(b)this.setClip(c);else{var e=this.sharedClipKey;b=a[e];var f=this.getClipBox(c,!0);b&&b.animate(f,c);a[e+"m"]&&a[e+"m"].animate({width:f.width+99,x:f.x-(a.inverted?0:99)},c)}},afterAnimate:function(){this.setClip();q(this,"afterAnimate");this.finishedAnimating=!0},drawPoints:function(){var b=this.points,a=this.chart,c,e,f=this.options.marker,d=this[this.specialGroup]||this.markerGroup,k=this.xAxis,h=l(f.enabled,!k||k.isRadial?!0:null,this.closestPointRangePx>=f.enabledThreshold* f.radius);if(!1!==f.enabled||this._hasPointMarkers)for(c=0;cd&&a.shadow));h&&(h.startX=c.xMap,h.isArea=c.isArea)})},getZonesGraphs:function(a){this.zones.forEach(function(b,c){c=["zone-graph-"+c,"highcharts-graph highcharts-zone-graph-"+c+" "+(b.className||"")];this.chart.styledMode||c.push(b.color||this.color,b.dashStyle||this.options.dashStyle);a.push(c)},this);return a},applyZones:function(){var a=this,c=this.chart,e=c.renderer,f=this.zones,d,k,h=this.clips||[],p,n=this.graph,g=this.area,w=Math.max(c.chartWidth, c.chartHeight),v=this[(this.zoneAxis||"y")+"Axis"],q=c.inverted,t,B,z,y=!1;if(f.length&&(n||g)&&v&&"undefined"!==typeof v.min){var K=v.reversed;var L=v.horiz;n&&!this.showLine&&n.hide();g&&g.hide();var u=v.getExtremes();f.forEach(function(b,f){d=K?L?c.plotWidth:0:L?0:v.toPixels(u.min)||0;d=G(l(k,d),0,w);k=G(Math.round(v.toPixels(l(b.value,u.max),!0)||0),0,w);y&&(d=k=v.toPixels(u.max));t=Math.abs(d-k);B=Math.min(d,k);z=Math.max(d,k);v.isXAxis?(p={x:q?z:B,y:0,width:t,height:w},L||(p.x=c.plotHeight- p.x)):(p={x:0,y:q?z:B,width:w,height:t},L&&(p.y=c.plotWidth-p.y));q&&e.isVML&&(p=v.isXAxis?{x:0,y:K?B:z,height:p.width,width:c.chartWidth}:{x:p.y-c.plotLeft-c.spacingBox.x,y:0,width:p.height,height:c.chartHeight});h[f]?h[f].animate(p):h[f]=e.clipRect(p);n&&a["zone-graph-"+f].clip(h[f]);g&&a["zone-area-"+f].clip(h[f]);y=b.value>u.max;a.resetZones&&0===k&&(k=void 0)});this.clips=h}else a.visible&&(n&&n.show(!0),g&&g.show(!0))},invertGroups:function(a){function b(){["group","markerGroup"].forEach(function(b){c[b]&& (e.renderer.isVML&&c[b].attr({width:c.yAxis.len,height:c.xAxis.len}),c[b].width=c.yAxis.len,c[b].height=c.xAxis.len,c[b].invert(c.isRadialSeries?!1:a))})}var c=this,e=c.chart;c.xAxis&&(c.eventsToUnbind.push(I(e,"resize",b)),b(),c.invertGroups=b)},plotGroup:function(a,c,e,f,d){var b=this[a],k=!b;k&&(this[a]=b=this.chart.renderer.g().attr({zIndex:f||.1}).add(d));b.addClass("highcharts-"+c+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(y(this.colorIndex)?"highcharts-color-"+this.colorIndex+ " ":"")+(this.options.className||"")+(b.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0);b.attr({visibility:e})[k?"attr":"animate"](this.getPlotBox());return b},getPlotBox:function(){var a=this.chart,c=this.xAxis,e=this.yAxis;a.inverted&&(c=e,e=this.xAxis);return{translateX:c?c.left:a.plotLeft,translateY:e?e.top:a.plotTop,scaleX:1,scaleY:1}},removeEvents:function(a){a?this.eventsToUnbind.length&&(this.eventsToUnbind.forEach(function(a){a()}),this.eventsToUnbind.length=0):v(this)},render:function(){var a= this,c=a.chart,e=a.options,f=!a.finishedAnimating&&c.renderer.isSVG&&M(e.animation).duration,d=a.visible?"inherit":"hidden",k=e.zIndex,h=a.hasRendered,l=c.seriesGroup,p=c.inverted;q(this,"render");var n=a.plotGroup("group","series",d,k,l);a.markerGroup=a.plotGroup("markerGroup","markers",d,k,l);f&&a.animate&&a.animate(!0);n.inverted=a.isCartesian||a.invertable?p:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.visible&&a.drawPoints();a.drawDataLabels&&a.drawDataLabels();a.redrawPoints&&a.redrawPoints(); a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(p);!1===e.clip||a.sharedClipKey||h||n.clip(c.clipRect);f&&a.animate&&a.animate();h||(a.animationTimeout=B(function(){a.afterAnimate()},f||0));a.isDirty=!1;a.hasRendered=!0;q(a,"afterRender")},redraw:function(){var a=this.chart,c=this.isDirty||this.isDirtyData,e=this.group,f=this.xAxis,d=this.yAxis;e&&(a.inverted&&e.attr({width:a.plotWidth,height:a.plotHeight}),e.animate({translateX:l(f&&f.left,a.plotLeft),translateY:l(d&& d.top,a.plotTop)}));this.translate();this.render();c&&delete this.kdTree},kdAxisArray:["clientX","plotY"],searchPoint:function(a,c){var b=this.xAxis,e=this.yAxis,f=this.chart.inverted;return this.searchKDTree({clientX:f?b.len-a.chartY+b.pos:a.chartX-b.pos,plotY:f?e.len-a.chartX+e.pos:a.chartY-e.pos},c,a)},buildKDTree:function(a){function b(a,e,f){var d;if(d=a&&a.length){var k=c.kdAxisArray[e%f];a.sort(function(a,b){return a[k]-b[k]});d=Math.floor(d/2);return{point:a[d],left:b(a.slice(0,d),e+1,f), right:b(a.slice(d+1),e+1,f)}}}this.buildingKdTree=!0;var c=this,e=-1n?"left":"right";m=0>n?"right":"left";c[w]&&(w=b(a,c[w],e+1,l),g=w[h]t;)m--;this.updateParallelArrays(w,"splice",m,0,0);this.updateParallelArrays(w,m);g&&w.name&&(g[t]=w.name);n.splice(m,0,a);q&&(this.data.splice(m,0,null),this.processData());"point"=== h.legendType&&this.generatePoints();e&&(l[0]&&l[0].remove?l[0].remove(!1):(l.shift(),this.updateParallelArrays(w,"shift"),n.shift()));!1!==d&&D(this,"addPoint",{point:w});this.isDirtyData=this.isDirty=!0;c&&b.redraw(f)},removePoint:function(a,c,e){var d=this,h=d.data,l=h[a],g=d.points,b=d.chart,n=function(){g&&g.length===h.length&&g.splice(a,1);h.splice(a,1);d.options.data.splice(a,1);d.updateParallelArrays(l||{series:d},"splice",a,1);l&&l.destroy();d.isDirty=!0;d.isDirtyData=!0;c&&b.redraw()};f(e, b);c=k(c,!0);l?l.firePointEvent("remove",null,n):n()},remove:function(a,c,e,f){function d(){h.destroy(f);h.remove=null;l.isDirtyLegend=l.isDirtyBox=!0;l.linkSeries();k(a,!0)&&l.redraw(c)}var h=this,l=h.chart;!1!==e?D(h,"remove",null,d):d()},update:function(a,c){a=d.cleanRecursively(a,this.userOptions);D(this,"update",{options:a});var f=this,h=f.chart,l=f.userOptions,g=f.initialType||f.type,n=a.type||l.type||h.options.chart.type,b=!(this.hasDerivedData||a.dataGrouping||n&&n!==this.type||"undefined"!== typeof a.pointStart||a.pointInterval||a.pointIntervalUnit||a.keys),v=z[g].prototype,q,w=["group","markerGroup","dataLabelsGroup","transformGroup"],r=["eventOptions","navigatorSeries","baseSeries"],B=f.finishedAnimating&&{animation:!1},u={};b&&(r.push("data","isDirtyData","points","processedXData","processedYData","xIncrement","_hasPointMarkers","_hasPointLabels","mapMap","mapData","minY","maxY","minX","maxX"),!1!==a.visible&&r.push("area","graph"),f.parallelArrays.forEach(function(a){r.push(a+"Data")}), a.data&&(a.dataSorting&&t(f.options.dataSorting,a.dataSorting),this.setData(a.data,!1)));a=e(l,B,{index:"undefined"===typeof l.index?f.index:l.index,pointStart:k(l.pointStart,f.xData[0])},!b&&{data:f.options.data},a);b&&a.data&&(a.data=f.options.data);r=w.concat(r);r.forEach(function(a){r[a]=f[a];delete f[a]});f.remove(!1,null,!1,!0);for(q in v)f[q]=void 0;z[n||g]?t(f,z[n||g].prototype):y(17,!0,h,{missingModuleFor:n||g});r.forEach(function(a){f[a]=r[a]});f.init(h,a);if(b&&this.points){var m=f.options; !1===m.visible?(u.graphic=1,u.dataLabel=1):f._hasPointLabels||(n=m.marker,v=m.dataLabels,n&&(!1===n.enabled||"symbol"in n)&&(u.graphic=1),v&&!1===v.enabled&&(u.dataLabel=1));this.points.forEach(function(a){a&&a.series&&(a.resolveColor(),Object.keys(u).length&&a.destroyElements(u),!1===m.showInLegend&&a.legendItem&&h.legend.destroyItem(a))},this)}a.zIndex!==l.zIndex&&w.forEach(function(b){f[b]&&f[b].attr({zIndex:a.zIndex})});f.initialType=g;h.linkSeries();D(this,"afterUpdate");k(c,!0)&&h.redraw(b? void 0:!1)},setName:function(a){this.name=this.options.name=this.userOptions.name=a;this.chart.isDirtyLegend=!0}});t(l.prototype,{update:function(a,f){var d=this.chart,h=a&&a.events||{};a=e(this.userOptions,a);d.options[this.coll].indexOf&&(d.options[this.coll][d.options[this.coll].indexOf(this.userOptions)]=a);c(d.options[this.coll].events,function(a,c){"undefined"===typeof h[c]&&(h[c]=void 0)});this.destroy(!0);this.init(d,t(a,{events:h}));d.isDirtyBox=!0;k(f,!0)&&d.redraw()},remove:function(a){for(var c= this.chart,e=this.coll,f=this.series,d=f.length;d--;)f[d]&&f[d].remove(!1);J(c.axes,this);J(c[e],this);h(c.options[e])?c.options[e].splice(this.options.index,1):delete c.options[e];c[e].forEach(function(a,c){a.options.index=a.userOptions.index=c});this.destroy();c.isDirtyBox=!0;k(a,!0)&&c.redraw()},setTitle:function(a,c){this.update({title:a},c)},setCategories:function(a,c){this.update({categories:a},c)}})});S(r,"parts/AreaSeries.js",[r["parts/Globals.js"],r["parts/Color.js"],r["mixins/legend-symbol.js"], r["parts/Utilities.js"]],function(d,g,r,u){var I=g.parse,M=u.objectEach,E=u.pick;g=u.seriesType;var A=d.Series;g("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(d){var g=[],r=[],t=this.xAxis,u=this.yAxis,h=u.stacks[this.stackKey],A={},q=this.index,G=u.series,e=G.length,c=E(u.options.reversedStacks,!0)?1:-1,k;d=d||this.points;if(this.options.stacking){for(k=0;kd&&t>E?(t=Math.max(d,E),D=2*E-t):tI&&D>E?(D=Math.max(I,E),t=2*E-D):D=Math.abs(g)&&.5d.closestPointRange*d.xAxis.transA;r=d.borderWidth=t(q.borderWidth,r?0:1); var e=d.xAxis,c=d.yAxis,k=q.threshold,n=d.translatedThreshold=c.getThreshold(k),f=t(q.minPointLength,5),a=d.getColumnMetrics(),l=a.width,v=d.barW=Math.max(l,1+2*r),z=d.pointXOffset=a.offset,w=d.dataMin,u=d.dataMax;g.inverted&&(n-=.5);q.pointPadding&&(v=Math.ceil(v));D.prototype.translate.apply(d);d.points.forEach(function(a){var h=t(a.yBottom,n),q=999+Math.abs(h),r=l,p=a.plotX;q=E(a.plotY,-q,c.len+q);var b=a.plotX+z,B=v,x=Math.min(q,h),y=Math.max(q,h)-x;if(f&&Math.abs(y)f?h-f:n-(L?f:0)}A(a.options.pointWidth)&&(r=B=Math.ceil(a.options.pointWidth),b-=Math.round((r-l)/2));a.barX=b;a.pointWidth=r;a.tooltipPos=g.inverted?[c.len+c.pos-g.plotLeft-q,e.len+e.pos-g.plotTop-(p||0)-z-B/2,y]:[b+B/2,q+c.pos-g.plotTop,y];a.shapeType=d.pointClass.prototype.shapeType||"rect";a.shapeArgs=d.crispCol.apply(d,a.isNull?[b,n,B,0]:[b,x,B,y])})},getSymbol:d.noop,drawLegendSymbol:r.drawRectangle, drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(d,g){var h=this.options,r=this.pointAttrToOptions||{};var e=r.stroke||"borderColor";var c=r["stroke-width"]||"borderWidth",k=d&&d.color||this.color,n=d&&d[e]||h[e]||this.color||k,f=d&&d[c]||h[c]||this[c]||0;r=d&&d.options.dashStyle||h.dashStyle;var a=t(d&&d.opacity,h.opacity,1);if(d&&this.zones.length){var l=d.getZone();k=d.options.color||l&&(l.color||d.nonZonedColor)||this.color;l&& (n=l.borderColor||n,r=l.dashStyle||r,f=l.borderWidth||f)}g&&d&&(d=y(h.states[g],d.options.states&&d.options.states[g]||{}),g=d.brightness,k=d.color||"undefined"!==typeof g&&I(k).brighten(d.brightness).get()||k,n=d[e]||n,f=d[c]||f,r=d.dashStyle||r,a=t(d.opacity,a));e={fill:k,stroke:n,"stroke-width":f,opacity:a};r&&(e.dashstyle=r);return e},drawPoints:function(){var d=this,g=this.chart,q=d.options,t=g.renderer,e=q.animationLimit||250,c;d.points.forEach(function(k){var h=k.graphic,f=!!h,a=h&&g.pointCount< e?"animate":"attr";if(J(k.plotY)&&null!==k.y){c=k.shapeArgs;h&&k.hasNewShapeType()&&(h=h.destroy());d.enabledDataSorting&&(k.startXPos=d.xAxis.reversed?-(c?c.width:0):d.xAxis.width);h||(k.graphic=h=t[k.shapeType](c).add(k.group||d.group))&&d.enabledDataSorting&&g.hasRendered&&g.pointCount\u25cf
{series.name}
', pointFormat:"x: {point.x}
y: {point.y}
"}},{sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1,drawGraph:function(){this.options.lineWidth&&u.prototype.drawGraph.call(this)},applyJitter:function(){var d=this,g=this.options.jitter,r=this.points.length;g&&this.points.forEach(function(u,E){["x","y"].forEach(function(A,y){var t="plot"+A.toUpperCase();if(g[A]&&!u.isNull){var D=d[A+"Axis"];var h=g[A]*D.transA; if(D&&!D.isLog){var G=Math.max(0,u[t]-h);D=Math.min(D.len,u[t]+h);y=1E4*Math.sin(E+y*r);u[t]=G+(D-G)*(y-Math.floor(y));"x"===A&&(u.clientX=u.plotX)}}})})}});r(u,"afterTranslate",function(){this.applyJitter&&this.applyJitter()});""});S(r,"mixins/centered-series.js",[r["parts/Globals.js"],r["parts/Utilities.js"]],function(d,g){var r=g.isNumber,u=g.pick,I=g.relativeLength,M=d.deg2rad;d.CenteredSeriesMixin={getCenter:function(){var d=this.options,g=this.chart,r=2*(d.slicedOffset||0),J=g.plotWidth-2*r, y=g.plotHeight-2*r,t=d.center,D=Math.min(J,y),h=d.size,N=d.innerSize||0;"string"===typeof h&&(h=parseFloat(h));"string"===typeof N&&(N=parseFloat(N));d=[u(t[0],"50%"),u(t[1],"50%"),u(h&&0>h?void 0:d.size,"100%"),u(N&&0>N?void 0:d.innerSize||0,"0%")];g.angular&&(d[3]=0);for(t=0;4>t;++t)h=d[t],g=2>t||2===t&&/%$/.test(h),d[t]=I(h,[J,y,D,d[2]][t])+(g?r:0);d[3]>d[2]&&(d[3]=d[2]);return d},getStartAndEndRadians:function(d,g){d=r(d)?d:0;g=r(g)&&g>d&&360>g-d?g:d+360;return{start:M*(d+-90),end:M*(g+-90)}}}}); S(r,"parts/PieSeries.js",[r["parts/Globals.js"],r["mixins/legend-symbol.js"],r["parts/Point.js"],r["parts/Utilities.js"]],function(d,g,r,u){var I=u.addEvent,M=u.clamp,E=u.defined,A=u.fireEvent,G=u.isNumber,J=u.merge,y=u.pick,t=u.relativeLength,D=u.seriesType,h=u.setAnimation;u=d.CenteredSeriesMixin;var N=u.getStartAndEndRadians,q=d.noop,P=d.Series;D("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{allowOverlap:!0,connectorPadding:5,connectorShape:"fixedOffset",crookDistance:"70%", distance:30,enabled:!0,formatter:function(){return this.point.isNull?void 0:this.point.name},softConnector:!0,x:0},fillColor:void 0,ignoreHiddenPoint:!0,inactiveOtherPoints:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,lineWidth:void 0,states:{hover:{brightness:.1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[], pointAttribs:d.seriesTypes.column.prototype.pointAttribs,animate:function(e){var c=this,d=c.points,g=c.startAngleRad;e||d.forEach(function(e){var a=e.graphic,f=e.shapeArgs;a&&f&&(a.attr({r:y(e.startR,c.center&&c.center[3]/2),start:g,end:g}),a.animate({r:f.r,start:f.start,end:f.end},c.options.animation))})},hasData:function(){return!!this.processedXData.length},updateTotals:function(){var e,c=0,d=this.points,g=d.length,f=this.options.ignoreHiddenPoint;for(e=0;e1.5*Math.PI?H-=2*Math.PI:H<-Math.PI/2&&(H+=2*Math.PI);u.slicedTranslation={translateX:Math.round(Math.cos(H)*g),translateY:Math.round(Math.sin(H)*g)};var K=Math.cos(H)*e[2]/2;var p=Math.sin(H)*e[2]/2;u.tooltipPos=[e[0]+.7*K,e[1]+.7*p];u.half=H<-Math.PI/2||H>Math.PI/2?1:0;u.angle=H;D=Math.min(f,u.labelDistance/5);u.labelPosition={natural:{x:e[0]+K+Math.cos(H)*u.labelDistance, y:e[1]+p+Math.sin(H)*u.labelDistance},"final":{},alignment:0>u.labelDistance?"center":u.half?"right":"left",connectorPosition:{breakAt:{x:e[0]+K+Math.cos(H)*D,y:e[1]+p+Math.sin(H)*D},touchingSliceAt:{x:e[0]+K,y:e[1]+p}}}}A(this,"afterTranslate")},drawEmpty:function(){var e=this.options;if(0===this.total){var c=this.center[0];var d=this.center[1];this.graph||(this.graph=this.chart.renderer.circle(c,d,0).addClass("highcharts-graph").add(this.group));this.graph.animate({"stroke-width":e.borderWidth, cx:c,cy:d,r:this.center[2]/2,fill:e.fillColor||"none",stroke:e.color||"#cccccc"},this.options.animation)}else this.graph&&(this.graph=this.graph.destroy())},redrawPoints:function(){var e=this,c=e.chart,d=c.renderer,g,f,a,h,v=e.options.shadow;this.drawEmpty();!v||e.shadowGroup||c.styledMode||(e.shadowGroup=d.g("shadow").attr({zIndex:-1}).add(e.group));e.points.forEach(function(k){var l={};f=k.graphic;if(!k.isNull&&f){h=k.shapeArgs;g=k.getTranslate();if(!c.styledMode){var n=k.shadowGroup;v&&!n&&(n= k.shadowGroup=d.g("shadow").add(e.shadowGroup));n&&n.attr(g);a=e.pointAttribs(k,k.selected&&"select")}k.delayedRendering?(f.setRadialReference(e.center).attr(h).attr(g),c.styledMode||f.attr(a).attr({"stroke-linejoin":"round"}).shadow(v,n),k.delayedRendering=!1):(f.setRadialReference(e.center),c.styledMode||J(!0,l,a),J(!0,l,h,g),f.animate(l));f.attr({visibility:k.visible?"inherit":"hidden"});f.addClass(k.getClassName())}else f&&(k.graphic=f.destroy())})},drawPoints:function(){var e=this.chart.renderer; this.points.forEach(function(c){c.graphic&&c.hasNewShapeType()&&(c.graphic=c.graphic.destroy());c.graphic||(c.graphic=e[c.shapeType](c.shapeArgs).add(c.series.group),c.delayedRendering=!0)})},searchPoint:q,sortByAngle:function(e,c){e.sort(function(e,d){return"undefined"!==typeof e.angle&&(d.angle-e.angle)*c})},drawLegendSymbol:g.drawRectangle,getCenter:u.getCenter,getSymbol:q,drawGraph:null},{init:function(){r.prototype.init.apply(this,arguments);var e=this;e.name=y(e.name,"Slice");var c=function(c){e.slice("select"=== c.type)};I(e,"select",c);I(e,"unselect",c);return e},isValid:function(){return G(this.y)&&0<=this.y},setVisible:function(e,c){var d=this,g=d.series,f=g.chart,a=g.options.ignoreHiddenPoint;c=y(c,a);e!==d.visible&&(d.visible=d.options.visible=e="undefined"===typeof e?!d.visible:e,g.options.data[g.data.indexOf(d)]=d.options,["graphic","dataLabel","connector","shadowGroup"].forEach(function(a){if(d[a])d[a][e?"show":"hide"](!0)}),d.legendItem&&f.legend.colorizeItem(d,e),e||"hover"!==d.state||d.setState(""), a&&(g.isDirty=!0),c&&f.redraw())},slice:function(e,c,d){var g=this.series;h(d,g.chart);y(c,!0);this.sliced=this.options.sliced=E(e)?e:!this.sliced;g.options.data[g.data.indexOf(this)]=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 c=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(c.x, c.y,c.r+e,c.r+e,{innerR:c.r-1,start:c.start,end:c.end})},connectorShapes:{fixedOffset:function(e,c,d){var g=c.breakAt;c=c.touchingSliceAt;return["M",e.x,e.y].concat(d.softConnector?["C",e.x+("left"===e.alignment?-5:5),e.y,2*g.x-c.x,2*g.y-c.y,g.x,g.y]:["L",g.x,g.y]).concat(["L",c.x,c.y])},straight:function(e,c){c=c.touchingSliceAt;return["M",e.x,e.y,"L",c.x,c.y]},crookedLine:function(e,c,d){c=c.touchingSliceAt;var g=this.series,f=g.center[0],a=g.chart.plotWidth,k=g.chart.plotLeft;g=e.alignment;var h= this.shapeArgs.r;d=t(d.crookDistance,1);d="left"===g?f+h+(a+k-f-h)*(1-d):k+(f-h)*d;f=["L",d,e.y];if("left"===g?d>e.x||dc.x)f=[];return["M",e.x,e.y].concat(f).concat(["L",c.x,c.y])}},getConnectorPath:function(){var e=this.labelPosition,c=this.series.options.dataLabels,d=c.connectorShape,g=this.connectorShapes;g[d]&&(d=g[d]);return d.call(this,{x:e.final.x,y:e.final.y,alignment:e.alignment},e.connectorPosition,c)}});""});S(r,"parts/DataLabels.js",[r["parts/Globals.js"],r["parts/Utilities.js"]], function(d,g){var r=g.animObject,u=g.arrayMax,I=g.clamp,M=g.defined,E=g.extend,A=g.format,G=g.isArray,J=g.merge,y=g.objectEach,t=g.pick,D=g.relativeLength,h=g.splat,N=g.stableSort;g=d.noop;var q=d.Series,P=d.seriesTypes;d.distribute=function(e,c,g){function h(a,c){return a.target-c.target}var f,a=!0,k=e,v=[];var q=0;var w=k.reducedLen||c;for(f=e.length;f--;)q+=e[f].size;if(q>w){N(e,function(a,c){return(c.rank||0)-(a.rank||0)});for(q=f=0;q<=w;)q+=e[f].size,f++;v=e.splice(f-1,e.length)}N(e,h);for(e= e.map(function(a){return{size:a.size,targets:[a.target],align:t(a.align,.5)}});a;){for(f=e.length;f--;)a=e[f],q=(Math.min.apply(0,a.targets)+Math.max.apply(0,a.targets))/2,a.pos=I(q-a.size*a.align,0,c-a.size);f=e.length;for(a=!1;f--;)0e[f].pos&&(e[f-1].size+=e[f].size,e[f-1].targets=e[f-1].targets.concat(e[f].targets),e[f-1].align=.5,e[f-1].pos+e[f-1].size>c&&(e[f-1].pos=c-e[f-1].size),e.splice(f,1),a=!0)}k.push.apply(k,v);f=0;e.some(function(a){var e=0;if(a.targets.some(function(){k[f].pos= a.pos+e;if("undefined"!==typeof g&&Math.abs(k[f].pos-k[f].target)>g)return k.slice(0,f+1).forEach(function(a){delete a.pos}),k.reducedLen=(k.reducedLen||c)-.1*c,k.reducedLen>.1*c&&d.distribute(k,c,g),!0;e+=k[f].size;f++}))return!0});N(k,h)};q.prototype.drawDataLabels=function(){function e(a,c){var b=c.filter;return b?(c=b.operator,a=a[b.property],b=b.value,">"===c&&a>b||"<"===c&&a="===c&&a>=b||"<="===c&&a<=b||"=="===c&&a==b||"==="===c&&a===b?!0:!1):!0}function c(a,c){var b=[],e;if(G(a)&&!G(c))b= a.map(function(a){return J(a,c)});else if(G(c)&&!G(a))b=c.map(function(b){return J(a,b)});else if(G(a)||G(c))for(e=Math.max(a.length,c.length);e--;)b[e]=J(a[e],c[e]);else b=J(a,c);return b}var g=this,n=g.chart,f=g.options,a=f.dataLabels,l=g.points,v,q=g.hasRendered||0,w=r(f.animation).duration,u=Math.min(w,200),L=!n.renderer.forExport&&t(a.defer,0l||f.stacking?d.contrastColor: "#000000"):delete d.contrastColor,f.cursor&&(m.cursor=f.cursor));var w={r:a.borderRadius||0,rotation:q,padding:a.padding,zIndex:1};n.styledMode||(w.fill=a.backgroundColor,w.stroke=a.borderColor,w["stroke-width"]=a.borderWidth);y(w,function(a,b){"undefined"===typeof a&&delete w[b]})}!h||c&&M(v)?c&&M(v)&&(h?w.text=v:(d.dataLabels=d.dataLabels||[],h=d.dataLabels[b]=q?D.text(v,0,-9999,a.useHTML).addClass("highcharts-data-label"):D.label(v,0,-9999,a.shape,null,null,a.useHTML,null,"data-label"),b||(d.dataLabel= h),h.addClass(" highcharts-data-label-color-"+d.colorIndex+" "+(a.className||"")+(a.useHTML?" highcharts-tracker":""))),h.options=a,h.attr(w),n.styledMode||h.css(m).shadow(a.shadow),h.added||h.add(H),a.textPath&&!a.useHTML&&(h.setTextPath(d.getDataLabelPath&&d.getDataLabelPath(h)||d.graphic,a.textPath),d.dataLabelPath&&!a.textPath.enabled&&(d.dataLabelPath=d.dataLabelPath.destroy())),g.alignDataLabel(d,h,a,null,p)):(d.dataLabel=d.dataLabel&&d.dataLabel.destroy(),d.dataLabels&&(1===d.dataLabels.length? delete d.dataLabels:delete d.dataLabels[b]),b||delete d.dataLabel,k&&(d.connector=d.connector.destroy(),d.connectors&&(1===d.connectors.length?delete d.connectors:delete d.connectors[b])))})})}d.fireEvent(this,"afterDrawDataLabels")};q.prototype.alignDataLabel=function(d,c,g,h,f){var a=this,e=this.chart,k=this.isCartesian&&e.inverted,n=this.enabledDataSorting,q=t(d.dlBox&&d.dlBox.centerX,d.plotX,-9999),r=t(d.plotY,-9999),u=c.getBBox(),y=g.rotation,A=g.align,K=e.isInsidePlot(q,Math.round(r),k),p="justify"=== t(g.overflow,n?"none":"justify"),b=this.visible&&!1!==d.visible&&(d.series.forceDL||n&&!p||K||g.inside&&h&&e.isInsidePlot(q,k?h.x+1:h.y+h.height-1,k));var C=function(b){n&&a.xAxis&&!p&&a.setDataLabelStartPos(d,c,f,K,b)};if(b){var x=e.renderer.fontMetrics(e.styledMode?void 0:g.style.fontSize,c).b;h=E({x:k?this.yAxis.len-r:q,y:Math.round(k?this.xAxis.len-q:r),width:0,height:0},h);E(g,{width:u.width,height:u.height});y?(p=!1,q=e.renderer.rotCorr(x,y),q={x:h.x+g.x+h.width/2+q.x,y:h.y+g.y+{top:0,middle:.5, bottom:1}[g.verticalAlign]*h.height},C(q),c[f?"attr":"animate"](q).attr({align:A}),C=(y+720)%360,C=180C,"left"===A?q.y-=C?u.height:0:"center"===A?(q.x-=u.width/2,q.y-=u.height/2):"right"===A&&(q.x-=u.width,q.y-=C?0:u.height),c.placed=!0,c.alignAttr=q):(C(h),c.align(g,null,h),q=c.alignAttr);p&&0<=h.height?this.justifyDataLabel(c,g,q,u,h,f):t(g.crop,!0)&&(b=e.isInsidePlot(q.x,q.y)&&e.isInsidePlot(q.x+u.width,q.y+u.height));if(g.shape&&!y)c[f?"attr":"animate"]({anchorX:k?e.plotWidth-d.plotY: d.plotX,anchorY:k?e.plotHeight-d.plotX:d.plotY})}f&&n&&(c.placed=!1);b||n&&!p||(c.hide(!0),c.placed=!1)};q.prototype.setDataLabelStartPos=function(d,c,g,h,f){var a=this.chart,e=a.inverted,k=this.xAxis,n=k.reversed,q=e?c.height/2:c.width/2;d=(d=d.pointWidth)?d/2:0;k=e?f.x:n?-q-d:k.width-q+d;f=e?n?this.yAxis.height-q+d:-q-d:f.y;c.startXPos=k;c.startYPos=f;h?"hidden"===c.visibility&&(c.show(),c.attr({opacity:0}).animate({opacity:1})):c.attr({opacity:1}).animate({opacity:0},void 0,c.hide);a.hasRendered&& (g&&c.attr({x:c.startXPos,y:c.startYPos}),c.placed=!0)};q.prototype.justifyDataLabel=function(d,c,g,h,f,a){var e=this.chart,k=c.align,n=c.verticalAlign,q=d.box?0:d.padding||0;var r=g.x+q;if(0>r){"right"===k?(c.align="left",c.inside=!0):c.x=-r;var t=!0}r=g.x+h.width-q;r>e.plotWidth&&("left"===k?(c.align="right",c.inside=!0):c.x=e.plotWidth-r,t=!0);r=g.y+q;0>r&&("bottom"===n?(c.verticalAlign="top",c.inside=!0):c.y=-r,t=!0);r=g.y+h.height-q;r>e.plotHeight&&("top"===n?(c.verticalAlign="bottom",c.inside= !0):c.y=e.plotHeight-r,t=!0);t&&(d.placed=!a,d.align(c,null,f));return t};P.pie&&(P.pie.prototype.dataLabelPositioners={radialDistributionY:function(d){return d.top+d.distributeBox.pos},radialDistributionX:function(d,c,g,h){return d.getX(gc.bottom-2?h:g,c.half,c)},justify:function(d,c,g){return g[0]+(d.half?-1:1)*(c+d.labelDistance)},alignToPlotEdges:function(d,c,g,h){d=d.getBBox().width;return c?d+h:g-d-h},alignToConnectors:function(d,c,g,h){var e=0,a;d.forEach(function(c){a=c.dataLabel.getBBox().width; a>e&&(e=a)});return c?e+h:g-e-h}},P.pie.prototype.drawDataLabels=function(){var e=this,c=e.data,g,h=e.chart,f=e.options.dataLabels||{},a=f.connectorPadding,l,v=h.plotWidth,r=h.plotHeight,w=h.plotLeft,y=Math.round(h.chartWidth/3),A,D=e.center,H=D[2]/2,K=D[1],p,b,C,x,G=[[],[]],E,N,I,m,P=[0,0,0,0],S=e.dataLabelPositioners,W;e.visible&&(f.enabled||e._hasPointLabels)&&(c.forEach(function(a){a.dataLabel&&a.visible&&a.dataLabel.shortened&&(a.dataLabel.attr({width:"auto"}).css({width:"auto",textOverflow:"clip"}), a.dataLabel.shortened=!1)}),q.prototype.drawDataLabels.apply(e),c.forEach(function(a){a.dataLabel&&(a.visible?(G[a.half].push(a),a.dataLabel._pos=null,!M(f.style.width)&&!M(a.options.dataLabels&&a.options.dataLabels.style&&a.options.dataLabels.style.width)&&a.dataLabel.getBBox().width>y&&(a.dataLabel.css({width:.7*y}),a.dataLabel.shortened=!0)):(a.dataLabel=a.dataLabel.destroy(),a.dataLabels&&1===a.dataLabels.length&&delete a.dataLabels))}),G.forEach(function(c,k){var l=c.length,n=[],q;if(l){e.sortByAngle(c, k-.5);if(0v-a&&0===k&&(u=Math.round(E+b-v+a),P[1]=Math.max(u,P[1])),0>N-x/2?P[0]=Math.max(Math.round(-N+x/2),P[0]):N+x/2>r&&(P[2]=Math.max(Math.round(N+x/2-r),P[2])),p.sideOverflow=u)}}}),0===u(P)||this.verifyDataLabelOverflow(P))&&(this.placeDataLabels(),this.points.forEach(function(a){W=J(f,a.options.dataLabels);if(l=t(W.connectorWidth, 1)){var b;A=a.connector;if((p=a.dataLabel)&&p._pos&&a.visible&&0t(this.translatedThreshold,e.yAxis.len)),r=t(g.inside,!!this.options.stacking);k&&(h=J(k),0>h.y&&(h.height+=h.y,h.y=0),k=h.y+h.height-e.yAxis.len,0I.x+I.width||e.x+e.widthI.y+I.height||e.y+e.height=k&&g<=l||b||!A(g))n=!0;e[b?"zoomX":"zoomY"]&&n&&(d=h.zoom(a.min,a.max),h.displayBtn&&(f=!0))});var h=c.resetZoomButton;f&&!h?c.showResetZoom():!f&&D(h)&&(c.resetZoomButton=h.destroy());d&&c.redraw(q(c.options.chart.animation, a&&a.animation,100>c.pointCount))},pan:function(a,c){var d=this,e=d.hoverPoints,f=d.options.chart,g;c="object"===typeof c?c:{enabled:c,type:"x"};f&&f.panning&&(f.panning=c);var h=c.type;J(this,"pan",{originalEvent:a},function(){e&&e.forEach(function(a){a.setState()});var c=[1];"xy"===h?c=[1,0]:"y"===h&&(c=[0]);c.forEach(function(c){var e=d[c?"xAxis":"yAxis"][0],f=e.options,b=e.horiz,h=a[b?"chartX":"chartY"];b=b?"mouseDownX":"mouseDownY";var k=d[b],l=(e.pointRange||0)/2,n=e.reversed&&!d.inverted|| !e.reversed&&d.inverted?-1:1,q=e.getExtremes(),v=e.toValue(k-h,!0)+l*n;n=e.toValue(k+e.len-h,!0)-l*n;var m=n=e.panningState.startMin&&v<=e.panningState.startMax)e.setExtremes(k,v,!1,!1,{trigger:"pan"}), g=!0;d[b]=h}});g&&d.redraw(!1);E(d.container,{cursor:"move"})})}});G(r.prototype,{select:function(a,c){var d=this,e=d.series,f=e.chart;this.selectedStaging=a=q(a,!d.selected);d.firePointEvent(a?"select":"unselect",{accumulate:c},function(){d.selected=d.options.selected=a;e.options.data[e.data.indexOf(d)]=d.options;d.setState(a&&"select");c||f.getSelectedPoints().forEach(function(a){var c=a.series;a.selected&&a!==d&&(a.selected=a.options.selected=!1,c.options.data[c.data.indexOf(a)]=a.options,a.setState(f.hoverPoints&& c.options.inactiveOtherPoints?"inactive":""),a.firePointEvent("unselect"))})});delete this.selectedStaging},onMouseOver:function(a){var c=this.series.chart,d=c.pointer;a=a?d.normalize(a):d.getChartCoordinatesFromPoint(this,c.inverted);d.runPointActions(a,this)},onMouseOut:function(){var a=this.series.chart;this.firePointEvent("mouseOut");this.series.options.inactiveOtherPoints||(a.hoverPoints||[]).forEach(function(a){a.setState()});a.hoverPoints=a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var a= this,c=h(a.series.options.point,a.options).events;a.events=c;N(c,function(c,d){t(c)&&I(a,d,c)});this.hasImportedEvents=!0}},setState:function(a,c){var d=this.series,f=this.state,g=d.options.states[a||"normal"]||{},h=e[d.type].marker&&d.options.marker,k=h&&!1===h.enabled,l=h&&h.states&&h.states[a||"normal"]||{},n=!1===l.enabled,r=d.stateMarkerGraphic,p=this.marker||{},b=d.chart,t=d.halo,u,y=h&&d.markerAttribs;a=a||"";if(!(a===this.state&&!c||this.selected&&"select"!==a||!1===g.enabled||a&&(n||k&&!1=== l.enabled)||a&&p.states&&p.states[a]&&!1===p.states[a].enabled)){this.state=a;y&&(u=d.markerAttribs(this,a));if(this.graphic){f&&this.graphic.removeClass("highcharts-point-"+f);a&&this.graphic.addClass("highcharts-point-"+a);if(!b.styledMode){var A=d.pointAttribs(this,a);var D=q(b.options.chart.animation,g.animation);d.options.inactiveOtherPoints&&((this.dataLabels||[]).forEach(function(a){a&&a.animate({opacity:A.opacity},D)}),this.connector&&this.connector.animate({opacity:A.opacity},D));this.graphic.animate(A, D)}u&&this.graphic.animate(u,q(b.options.chart.animation,l.animation,h.animation));r&&r.hide()}else{if(a&&l){f=p.symbol||d.symbol;r&&r.currentSymbol!==f&&(r=r.destroy());if(u)if(r)r[c?"animate":"attr"]({x:u.x,y:u.y});else f&&(d.stateMarkerGraphic=r=b.renderer.symbol(f,u.x,u.y,u.width,u.height).add(d.markerGroup),r.currentSymbol=f);!b.styledMode&&r&&r.attr(d.pointAttribs(this,a))}r&&(r[a&&this.isInside?"show":"hide"](),r.element.point=this)}a=g.halo;g=(r=this.graphic||r)&&r.visibility||"inherit";a&& a.size&&r&&"hidden"!==g&&!this.isCluster?(t||(d.halo=t=b.renderer.path().add(r.parentGroup)),t.show()[c?"animate":"attr"]({d:this.haloPath(a.size)}),t.attr({"class":"highcharts-halo highcharts-color-"+q(this.colorIndex,d.colorIndex)+(this.className?" "+this.className:""),visibility:g,zIndex:-1}),t.point=this,b.styledMode||t.attr(G({fill:this.color||d.color,"fill-opacity":a.opacity},a.attributes))):t&&t.point&&t.point.haloPath&&t.animate({d:t.point.haloPath(0)},null,t.hide);J(this,"afterSetState")}}, haloPath:function(a){return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX)-a,this.plotY-a,2*a,2*a)}});G(k.prototype,{onMouseOver:function(){var a=this.chart,c=a.hoverSeries;if(c&&c!==this)c.onMouseOut();this.options.events.mouseOver&&J(this,"mouseOver");this.setState("hover");a.hoverSeries=this},onMouseOut:function(){var a=this.options,c=this.chart,d=c.tooltip,e=c.hoverPoint;c.hoverSeries=null;if(e)e.onMouseOut();this&&a.events.mouseOut&&J(this,"mouseOut");!d||this.stickyTracking|| d.shared&&!this.noSharedTooltip||d.hide();c.series.forEach(function(a){a.setState("",!0)})},setState:function(a,c){var d=this,e=d.options,f=d.graph,g=e.inactiveOtherPoints,h=e.states,k=e.lineWidth,l=e.opacity,n=q(h[a||"normal"]&&h[a||"normal"].animation,d.chart.options.chart.animation);e=0;a=a||"";if(d.state!==a&&([d.group,d.markerGroup,d.dataLabelsGroup].forEach(function(c){c&&(d.state&&c.removeClass("highcharts-series-"+d.state),a&&c.addClass("highcharts-series-"+a))}),d.state=a,!d.chart.styledMode)){if(h[a]&& !1===h[a].enabled)return;a&&(k=h[a].lineWidth||k+(h[a].lineWidthPlus||0),l=q(h[a].opacity,l));if(f&&!f.dashstyle)for(h={"stroke-width":k},f.animate(h,n);d["zone-graph-"+e];)d["zone-graph-"+e].attr(h),e+=1;g||[d.group,d.markerGroup,d.dataLabelsGroup,d.labelBySeries].forEach(function(a){a&&a.animate({opacity:l},n)})}c&&g&&d.points&&d.setAllPointsToState(a)},setAllPointsToState:function(a){this.points.forEach(function(c){c.setState&&c.setState(a)})},setVisible:function(a,c){var d=this,e=d.chart,f=d.legendItem, g=e.options.chart.ignoreHiddenSeries,h=d.visible;var k=(d.visible=a=d.options.visible=d.userOptions.visible="undefined"===typeof a?!h:a)?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach(function(a){if(d[a])d[a][k]()});if(e.hoverSeries===d||(e.hoverPoint&&e.hoverPoint.series)===d)d.onMouseOut();f&&e.legend.colorizeItem(d,a);d.isDirty=!0;d.options.stacking&&e.series.forEach(function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)});d.linkedSeries.forEach(function(c){c.setVisible(a, !1)});g&&(e.isDirtyBox=!0);J(d,k);!1!==c&&e.redraw()},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=this.options.selected="undefined"===typeof a?!this.selected:a;this.checkbox&&(this.checkbox.checked=a);J(this,a?"select":"unselect")},drawTracker:d.drawTrackerGraph})});S(r,"parts/Responsive.js",[r["parts/Globals.js"],r["parts/Utilities.js"]],function(d,g){var r=g.find,u=g.isArray,I=g.isObject,M=g.merge,E=g.objectEach,A=g.pick,G=g.splat, J=g.uniqueKey;d=d.Chart;d.prototype.setResponsive=function(d,g){var t=this.options.responsive,h=[],u=this.currentResponsive;!g&&t&&t.rules&&t.rules.forEach(function(d){"undefined"===typeof d._id&&(d._id=J());this.matchResponsiveRule(d,h)},this);g=M.apply(0,h.map(function(d){return r(t.rules,function(g){return g._id===d}).chartOptions}));g.isResponsiveOptions=!0;h=h.toString()||void 0;h!==(u&&u.ruleIds)&&(u&&this.update(u.undoOptions,d,!0),h?(u=this.currentOptions(g),u.isResponsiveOptions=!0,this.currentResponsive= {ruleIds:h,mergedOptions:g,undoOptions:u},this.update(g,d,!0)):this.currentResponsive=void 0)};d.prototype.matchResponsiveRule=function(d,g){var r=d.condition;(r.callback||function(){return this.chartWidth<=A(r.maxWidth,Number.MAX_VALUE)&&this.chartHeight<=A(r.maxHeight,Number.MAX_VALUE)&&this.chartWidth>=A(r.minWidth,0)&&this.chartHeight>=A(r.minHeight,0)}).call(this)&&g.push(d._id)};d.prototype.currentOptions=function(d){function g(d,h,t,e){var c;E(d,function(d,n){if(!e&&-1n[a]^l?1:-1;return s===o?0:o(e=String(e)).length)throw new Error("The given index is out of the string range.");if(1!==t.length)throw new Error("The given string `char` should be only one character long.");return""===e&&0===i?t:"".concat(e.slice(0,i)).concat(t).concat(e.slice(i))}},{key:"scientificToDecimal",value:function(e){var t=Number(e);if(isNaN(t))return NaN;if(e=String(e),!this.contains(e,"e")&&!this.contains(e,"E"))return e;var i=h(e.split(/e/i),2),n=i[0],a=i[1],r=n<0;r&&(n=n.replace("-",""));var s=+a<0;s&&(a=a.replace("-",""));var o,l=h(n.split(/\./),2),c=l[0],u=l[1];return o=s?(o=c.length>a?this.insertAt(c,".",c.length-a):"0.".concat("0".repeat(a-c.length)).concat(c),"".concat(o).concat(u||"")):u?(n="".concat(c).concat(u),aparseFloat(r.maximumValue)&&D.throwError("The minimum possible value option is greater than the maximum possible value option ; 'minimumValue' [".concat(r.minimumValue,"] should be smaller than 'maximumValue' [").concat(r.maximumValue,"].")),D.isInt(r.decimalPlaces)&&0<=r.decimalPlaces||D.isString(r.decimalPlaces)&&l.test(r.decimalPlaces)||D.throwError("The number of decimal places option 'decimalPlaces' is invalid ; it should be a positive integer, [".concat(r.decimalPlaces,"] given.")),D.isNull(r.decimalPlacesRawValue)||D.isInt(r.decimalPlacesRawValue)&&0<=r.decimalPlacesRawValue||D.isString(r.decimalPlacesRawValue)&&l.test(r.decimalPlacesRawValue)||D.throwError("The number of decimal places for the raw value option 'decimalPlacesRawValue' is invalid ; it should be a positive integer or `null`, [".concat(r.decimalPlacesRawValue,"] given.")),this._validateDecimalPlacesRawValue(r),D.isNull(r.decimalPlacesShownOnFocus)||l.test(String(r.decimalPlacesShownOnFocus))||D.throwError("The number of expanded decimal places option 'decimalPlacesShownOnFocus' is invalid ; it should be a positive integer or `null`, [".concat(r.decimalPlacesShownOnFocus,"] given.")),!D.isNull(r.decimalPlacesShownOnFocus)&&Number(r.decimalPlaces)>Number(r.decimalPlacesShownOnFocus)&&D.warning("The extended decimal places 'decimalPlacesShownOnFocus' [".concat(r.decimalPlacesShownOnFocus,"] should be greater than the 'decimalPlaces' [").concat(r.decimalPlaces,"] value. Currently, this will limit the ability of your user to manually change some of the decimal places. Do you really want to do that?"),r.showWarnings),(D.isNull(r.divisorWhenUnfocused)||h.test(r.divisorWhenUnfocused))&&0!==r.divisorWhenUnfocused&&"0"!==r.divisorWhenUnfocused&&1!==r.divisorWhenUnfocused&&"1"!==r.divisorWhenUnfocused||D.throwError("The divisor option 'divisorWhenUnfocused' is invalid ; it should be a positive number higher than one, preferably an integer, [".concat(r.divisorWhenUnfocused,"] given.")),D.isNull(r.decimalPlacesShownOnBlur)||l.test(r.decimalPlacesShownOnBlur)||D.throwError("The number of decimals shown when unfocused option 'decimalPlacesShownOnBlur' is invalid ; it should be a positive integer or `null`, [".concat(r.decimalPlacesShownOnBlur,"] given.")),D.isNull(r.symbolWhenUnfocused)||D.isString(r.symbolWhenUnfocused)||D.throwError("The symbol to show when unfocused option 'symbolWhenUnfocused' is invalid ; it should be a string, [".concat(r.symbolWhenUnfocused,"] given.")),D.isTrueOrFalseString(r.saveValueToSessionStorage)||D.isBoolean(r.saveValueToSessionStorage)||D.throwError("The save to session storage option 'saveValueToSessionStorage' is invalid ; it should be either 'true' or 'false', [".concat(r.saveValueToSessionStorage,"] given.")),D.isInArray(r.onInvalidPaste,[I.options.onInvalidPaste.error,I.options.onInvalidPaste.ignore,I.options.onInvalidPaste.clamp,I.options.onInvalidPaste.truncate,I.options.onInvalidPaste.replace])||D.throwError("The paste behavior option 'onInvalidPaste' is invalid ; it should either be 'error', 'ignore', 'clamp', 'truncate' or 'replace' (cf. documentation), [".concat(r.onInvalidPaste,"] given.")),D.isInArray(r.roundingMethod,[I.options.roundingMethod.halfUpSymmetric,I.options.roundingMethod.halfUpAsymmetric,I.options.roundingMethod.halfDownSymmetric,I.options.roundingMethod.halfDownAsymmetric,I.options.roundingMethod.halfEvenBankersRounding,I.options.roundingMethod.upRoundAwayFromZero,I.options.roundingMethod.downRoundTowardZero,I.options.roundingMethod.toCeilingTowardPositiveInfinity,I.options.roundingMethod.toFloorTowardNegativeInfinity,I.options.roundingMethod.toNearest05,I.options.roundingMethod.toNearest05Alt,I.options.roundingMethod.upToNext05,I.options.roundingMethod.downToNext05])||D.throwError("The rounding method option 'roundingMethod' is invalid ; it should either be 'S', 'A', 's', 'a', 'B', 'U', 'D', 'C', 'F', 'N05', 'CHF', 'U05' or 'D05' (cf. documentation), [".concat(r.roundingMethod,"] given.")),D.isNull(r.negativeBracketsTypeOnBlur)||D.isInArray(r.negativeBracketsTypeOnBlur,[I.options.negativeBracketsTypeOnBlur.parentheses,I.options.negativeBracketsTypeOnBlur.brackets,I.options.negativeBracketsTypeOnBlur.chevrons,I.options.negativeBracketsTypeOnBlur.curlyBraces,I.options.negativeBracketsTypeOnBlur.angleBrackets,I.options.negativeBracketsTypeOnBlur.japaneseQuotationMarks,I.options.negativeBracketsTypeOnBlur.halfBrackets,I.options.negativeBracketsTypeOnBlur.whiteSquareBrackets,I.options.negativeBracketsTypeOnBlur.quotationMarks,I.options.negativeBracketsTypeOnBlur.guillemets])||D.throwError("The brackets for negative values option 'negativeBracketsTypeOnBlur' is invalid ; it should either be '(,)', '[,]', '<,>', '{,}', '〈,〉', '「,」', '⸤,⸥', '⟦,⟧', '‹,›' or '«,»', [".concat(r.negativeBracketsTypeOnBlur,"] given.")),(D.isString(r.emptyInputBehavior)||D.isNumber(r.emptyInputBehavior))&&(D.isInArray(r.emptyInputBehavior,[I.options.emptyInputBehavior.focus,I.options.emptyInputBehavior.press,I.options.emptyInputBehavior.always,I.options.emptyInputBehavior.min,I.options.emptyInputBehavior.max,I.options.emptyInputBehavior.zero,I.options.emptyInputBehavior.null])||u.test(r.emptyInputBehavior))||D.throwError("The display on empty string option 'emptyInputBehavior' is invalid ; it should either be 'focus', 'press', 'always', 'min', 'max', 'zero', 'null', a number, or a string that represents a number, [".concat(r.emptyInputBehavior,"] given.")),r.emptyInputBehavior===I.options.emptyInputBehavior.zero&&(0 value' entries, [".concat(r.valuesToStrings,"] given.")),D.isNull(r.outputFormat)||D.isInArray(r.outputFormat,[I.options.outputFormat.string,I.options.outputFormat.number,I.options.outputFormat.dot,I.options.outputFormat.negativeDot,I.options.outputFormat.comma,I.options.outputFormat.negativeComma,I.options.outputFormat.dotNegative,I.options.outputFormat.commaNegative])||D.throwError("The custom locale format option 'outputFormat' is invalid ; it should either be null, 'string', 'number', '.', '-.', ',', '-,', '.-' or ',-', [".concat(r.outputFormat,"] given.")),D.isTrueOrFalseString(r.isCancellable)||D.isBoolean(r.isCancellable)||D.throwError("The cancellable behavior option 'isCancellable' is invalid ; it should be either 'true' or 'false', [".concat(r.isCancellable,"] given.")),D.isTrueOrFalseString(r.modifyValueOnWheel)||D.isBoolean(r.modifyValueOnWheel)||D.throwError("The increment/decrement on mouse wheel option 'modifyValueOnWheel' is invalid ; it should be either 'true' or 'false', [".concat(r.modifyValueOnWheel,"] given.")),D.isTrueOrFalseString(r.watchExternalChanges)||D.isBoolean(r.watchExternalChanges)||D.throwError("The option 'watchExternalChanges' is invalid ; it should be either 'true' or 'false', [".concat(r.watchExternalChanges,"] given.")),D.isInArray(r.wheelOn,[I.options.wheelOn.focus,I.options.wheelOn.hover])||D.throwError("The wheel behavior option 'wheelOn' is invalid ; it should either be 'focus' or 'hover', [".concat(r.wheelOn,"] given.")),(D.isString(r.wheelStep)||D.isNumber(r.wheelStep))&&("progressive"===r.wheelStep||h.test(r.wheelStep))&&0!==Number(r.wheelStep)||D.throwError("The wheel step value option 'wheelStep' is invalid ; it should either be the string 'progressive', or a number or a string that represents a positive number (excluding zero), [".concat(r.wheelStep,"] given.")),D.isInArray(r.serializeSpaces,[I.options.serializeSpaces.plus,I.options.serializeSpaces.percent])||D.throwError("The space replacement character option 'serializeSpaces' is invalid ; it should either be '+' or '%20', [".concat(r.serializeSpaces,"] given.")),D.isTrueOrFalseString(r.noEventListeners)||D.isBoolean(r.noEventListeners)||D.throwError("The option 'noEventListeners' that prevent the creation of event listeners is invalid ; it should be either 'true' or 'false', [".concat(r.noEventListeners,"] given.")),D.isNull(r.styleRules)||D.isObject(r.styleRules)&&(Object.prototype.hasOwnProperty.call(r.styleRules,"positive")||Object.prototype.hasOwnProperty.call(r.styleRules,"negative")||Object.prototype.hasOwnProperty.call(r.styleRules,"ranges")||Object.prototype.hasOwnProperty.call(r.styleRules,"userDefined"))||D.throwError("The option 'styleRules' is invalid ; it should be a correctly structured object, with one or more 'positive', 'negative', 'ranges' or 'userDefined' attributes, [".concat(r.styleRules,"] given.")),D.isNull(r.styleRules)||!Object.prototype.hasOwnProperty.call(r.styleRules,"userDefined")||D.isNull(r.styleRules.userDefined)||r.styleRules.userDefined.forEach(function(e){Object.prototype.hasOwnProperty.call(e,"callback")&&!D.isFunction(e.callback)&&D.throwError("The callback defined in the `userDefined` attribute is not a function, ".concat(b(e.callback)," given."))}),(D.isNull(r.rawValueDivisor)||h.test(r.rawValueDivisor))&&0!==r.rawValueDivisor&&"0"!==r.rawValueDivisor&&1!==r.rawValueDivisor&&"1"!==r.rawValueDivisor||D.throwError("The raw value divisor option 'rawValueDivisor' is invalid ; it should be a positive number higher than one, preferably an integer, [".concat(r.rawValueDivisor,"] given.")),D.isTrueOrFalseString(r.readOnly)||D.isBoolean(r.readOnly)||D.throwError("The option 'readOnly' is invalid ; it should be either 'true' or 'false', [".concat(r.readOnly,"] given.")),D.isTrueOrFalseString(r.unformatOnHover)||D.isBoolean(r.unformatOnHover)||D.throwError("The option 'unformatOnHover' is invalid ; it should be either 'true' or 'false', [".concat(r.unformatOnHover,"] given.")),D.isTrueOrFalseString(r.failOnUnknownOption)||D.isBoolean(r.failOnUnknownOption)||D.throwError("The debug option 'failOnUnknownOption' is invalid ; it should be either 'true' or 'false', [".concat(r.failOnUnknownOption,"] given.")),D.isTrueOrFalseString(r.createLocalList)||D.isBoolean(r.createLocalList)||D.throwError("The debug option 'createLocalList' is invalid ; it should be either 'true' or 'false', [".concat(r.createLocalList,"] given."))}},{key:"_validateDecimalPlacesRawValue",value:function(e){D.isNull(e.decimalPlacesRawValue)||(e.decimalPlacesRawValuet.mIntPos&&"0"===c.charAt(0)&&(c=c.slice(1)),""!==r&&c.length>t.mIntNeg&&"0"===c.charAt(0)&&(c=c.slice(1)),e="".concat(r).concat(c).concat(D.isUndefined(l)?"":t.decimalCharacter+l)}return(i&&t.leadingZero===I.options.leadingZero.deny||!n&&t.leadingZero===I.options.leadingZero.allow)&&(e=e.replace(t.stripReg,"$1$2")),e}},{key:"_toggleNegativeBracket",value:function(e,t,i){return i?this._removeBrackets(e,t):this._addBrackets(e,t)}},{key:"_addBrackets",value:function(e,t){return D.isNull(t.negativeBracketsTypeOnBlur)?e:"".concat(t.firstBracket).concat(e.replace(t.negativeSignCharacter,"")).concat(t.lastBracket)}},{key:"_removeBrackets",value:function(e,t,i){var n,a=!(2c&&(m=m.substring(0,c)),"".concat(h).concat(t.decimalCharacter).concat(m)),e=I._mergeCurrencySignNegativePositiveSignAndValue(e,t,r,l),D.isNull(s)&&(s=n),null!==t.negativeBracketsTypeOnBlur&&(s<0||D.isNegativeStrict(e,t.negativeSignCharacter))&&(e=this._toggleNegativeBracket(e,t,i)),t.suffixText?"".concat(e).concat(t.suffixText):e}},{key:"_mergeCurrencySignNegativePositiveSignAndValue",value:function(e,t,i,n){var a,r="";if(i?r=t.negativeSignCharacter:t.showPositiveSign&&!n&&(r=t.positiveSignCharacter),t.currencySymbolPlacement===I.options.currencySymbolPlacement.prefix)if(t.negativePositiveSignPlacement!==I.options.negativePositiveSignPlacement.none&&(i||!i&&t.showPositiveSign&&!n))switch(t.negativePositiveSignPlacement){case I.options.negativePositiveSignPlacement.prefix:case I.options.negativePositiveSignPlacement.left:a="".concat(r).concat(t.currencySymbol).concat(e);break;case I.options.negativePositiveSignPlacement.right:a="".concat(t.currencySymbol).concat(r).concat(e);break;case I.options.negativePositiveSignPlacement.suffix:a="".concat(t.currencySymbol).concat(e).concat(r)}else a=t.currencySymbol+e;else if(t.currencySymbolPlacement===I.options.currencySymbolPlacement.suffix)if(t.negativePositiveSignPlacement!==I.options.negativePositiveSignPlacement.none&&(i||!i&&t.showPositiveSign&&!n))switch(t.negativePositiveSignPlacement){case I.options.negativePositiveSignPlacement.suffix:case I.options.negativePositiveSignPlacement.right:a="".concat(e).concat(t.currencySymbol).concat(r);break;case I.options.negativePositiveSignPlacement.left:a="".concat(e).concat(r).concat(t.currencySymbol);break;case I.options.negativePositiveSignPlacement.prefix:a="".concat(r).concat(e).concat(t.currencySymbol)}else a=e+t.currencySymbol;return a}},{key:"_truncateZeros",value:function(e,t){var i;switch(t){case 0:i=/(\.(?:\d*[1-9])?)0*$/;break;case 1:i=/(\.\d(?:\d*[1-9])?)0*$/;break;default:i=new RegExp("(\\.\\d{".concat(t,"}(?:\\d*[1-9])?)0*"))}return e=e.replace(i,"$1"),0===t&&(e=e.replace(/\.$/,"")),e}},{key:"_roundRawValue",value:function(e,t){return this._roundValue(e,t,t.decimalPlacesRawValue)}},{key:"_roundFormattedValueShownOnFocus",value:function(e,t){return this._roundValue(e,t,Number(t.decimalPlacesShownOnFocus))}},{key:"_roundFormattedValueShownOnBlur",value:function(e,t){return this._roundValue(e,t,Number(t.decimalPlacesShownOnBlur))}},{key:"_roundFormattedValueShownOnFocusOrBlur",value:function(e,t,i){return i?this._roundFormattedValueShownOnFocus(e,t):this._roundFormattedValueShownOnBlur(e,t)}},{key:"_roundValue",value:function(e,t,i){if(D.isNull(e))return e;if(e=""===e?"0":e.toString(),t.roundingMethod===I.options.roundingMethod.toNearest05||t.roundingMethod===I.options.roundingMethod.toNearest05Alt||t.roundingMethod===I.options.roundingMethod.upToNext05||t.roundingMethod===I.options.roundingMethod.downToNext05)return this._roundCloseTo05(e,t);var n,a=S(I._prepareValueForRounding(e,t),2),r=a[0],s=(e=a[1]).lastIndexOf("."),o=-1===s,l=S(e.split("."),2),c=l[0];if(!(0n)if(0this.settings.historySize&&this._historyTableForget()}}},{key:"_historyTableUndoOrRedo",value:function(e){var t;if(0=e.min&&n.rawValue tag is not supported by autoNumeric")),this._isInputElement()?(this._isInputTypeSupported()||D.throwError('The input type "'.concat(this.domElement.type,'" is not supported by autoNumeric')),this.isInputElement=!0):(this.isInputElement=!1,this.isContentEditable=this.domElement.hasAttribute("contenteditable")&&"true"===this.domElement.getAttribute("contenteditable"))}},{key:"_formatDefaultValueOnPageLoad",value:function(e){var t,i=0g.length&&(d=g.length),1===d&&"0"===r&&this.settings.leadingZero===I.options.leadingZero.deny&&(d=""===s||"0"===r&&""!==s?1:0),this._setElementValue(g,!1),this._setCaretPosition(d),!0}return c?u||this._triggerEvent(I.events.maxRangeExceeded,this.domElement):this._triggerEvent(I.events.minRangeExceeded,this.domElement),!1}},{key:"_getSignPosition",value:function(){var e;if(this.settings.currencySymbol){var t=this.settings.currencySymbol.length,i=D.getElementValue(this.domElement);if(this.settings.currencySymbolPlacement===I.options.currencySymbolPlacement.prefix)e=this.settings.negativeSignCharacter&&i&&i.charAt(0)===this.settings.negativeSignCharacter?[1,t+1]:[0,t];else{var n=i.length;e=[n-t,n]}}else e=[1e3,-1];return e}},{key:"_expandSelectionOnSign",value:function(){var e=S(this._getSignPosition(),2),t=e[0],i=e[1],n=this.selection;n.startt&&((n.starti)&&D.getElementValue(this.domElement).substring(Math.max(n.start,t),Math.min(n.end,i)).match(/^\s*$/)?n.start=a.indexOf(this.settings.suffixText)&&""!==this.settings.suffixText,"-"===a.charAt(this.selection.start-1)?i=i.substring(1):this.selection.start<=a.length-this.settings.suffixText.length&&(i=i.substring(0,i.length-1))):(this.caretFix=this.selection.start>=a.indexOf(this.settings.suffixText)&&""!==this.settings.suffixText,this.selection.start>=a.indexOf(this.settings.currencySymbol)+this.settings.currencySymbol.length&&(n=n.substring(1,n.length)),D.isNegative(i,this.settings.negativeSignCharacter)&&"-"===a.charAt(this.selection.start)&&(i=i.substring(1)))),this.settings.currencySymbolPlacement===I.options.currencySymbolPlacement.suffix)switch(this.settings.negativePositiveSignPlacement){case I.options.negativePositiveSignPlacement.left:this.caretFix=this.selection.start>=a.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length,this.eventKey===d.keyName.Backspace?this.selection.start===a.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length&&r?i=i.substring(1):"-"!==i&&(this.selection.start<=a.indexOf(this.settings.negativeSignCharacter)||!r)&&(i=i.substring(0,i.length-1)):("-"===i[0]&&(n=n.substring(1)),this.selection.start===a.indexOf(this.settings.negativeSignCharacter)&&r&&(i=i.substring(1)));break;case I.options.negativePositiveSignPlacement.right:this.caretFix=this.selection.start>=a.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length,this.eventKey===d.keyName.Backspace?this.selection.start===a.indexOf(this.settings.negativeSignCharacter)+this.settings.negativeSignCharacter.length?i=i.substring(1):"-"!==i&&this.selection.start<=a.indexOf(this.settings.negativeSignCharacter)-this.settings.currencySymbol.length?i=i.substring(0,i.length-1):""===i||r||(i=i.substring(0,i.length-1)):(this.caretFix=this.selection.start>=a.indexOf(this.settings.currencySymbol)&&""!==this.settings.currencySymbol,this.selection.start===a.indexOf(this.settings.negativeSignCharacter)&&(i=i.substring(1)),n=n.substring(1))}return[i,n]}},{key:"_processCharacterDeletion",value:function(){var e,t;if(this.selection.length){this._expandSelectionOnSign();var i=S(this._getUnformattedLeftAndRightPartAroundTheSelection(),2);e=i[0],t=i[1]}else{var n=S(this._getUnformattedLeftAndRightPartAroundTheSelection(),2);if(e=n[0],t=n[1],""===e&&""===t&&(this.throwInput=!1),this.isTrailingNegative&&D.isNegative(D.getElementValue(this.domElement),this.settings.negativeSignCharacter)){var a=S(this._processCharacterDeletionIfTrailingNegativeSign([e,t]),2);e=a[0],t=a[1]}else this.eventKey===d.keyName.Backspace?e=e.substring(0,e.length-1):t=t.substring(1,t.length)}this._setValueParts(e,t)}},{key:"_isDecimalCharacterInsertionAllowed",value:function(){return String(this.settings.decimalPlacesShownOnFocus)!==String(I.options.decimalPlacesShownOnFocus.none)&&String(this.settings.decimalPlaces)!==String(I.options.decimalPlaces.none)}},{key:"_processCharacterInsertion",value:function(){var e=S(this._getUnformattedLeftAndRightPartAroundTheSelection(),2),t=e[0],i=e[1];if(this.eventKey!==d.keyName.AndroidDefault&&(this.throwInput=!0),this.eventKey===this.settings.decimalCharacter||this.settings.decimalCharacterAlternative&&this.eventKey===this.settings.decimalCharacterAlternative){if(!this._isDecimalCharacterInsertionAllowed()||!this.settings.decimalCharacter)return!1;if(this.settings.alwaysAllowDecimalCharacter)t=t.replace(this.settings.decimalCharacter,""),i=i.replace(this.settings.decimalCharacter,"");else{if(D.contains(t,this.settings.decimalCharacter))return!0;if(0this.settings.mIntPos&&"0"===i.charAt(0)&&(i=i.slice(1)),a===this.settings.negativeSignCharacter&&n.length>this.settings.mIntNeg&&"0"===i.charAt(0)&&(i=i.slice(1)),this.isTrailingNegative||(i="".concat(a).concat(i))}var r=this.constructor._addGroupSeparators(t,this.settings,this.isFocused,this.rawValue),s=r.length;if(r){var o,l=i.split("");if((this.settings.negativePositiveSignPlacement===I.options.negativePositiveSignPlacement.suffix||this.settings.negativePositiveSignPlacement!==I.options.negativePositiveSignPlacement.prefix&&this.settings.currencySymbolPlacement===I.options.currencySymbolPlacement.suffix)&&l[0]===this.settings.negativeSignCharacter&&!this.settings.isNegativeSignAllowed&&(l.shift(),(this.eventKey===d.keyName.Backspace||this.eventKey===d.keyName.Delete)&&this.caretFix&&((this.settings.currencySymbolPlacement===I.options.currencySymbolPlacement.suffix&&this.settings.negativePositiveSignPlacement===I.options.negativePositiveSignPlacement.left||this.settings.currencySymbolPlacement===I.options.currencySymbolPlacement.prefix&&this.settings.negativePositiveSignPlacement===I.options.negativePositiveSignPlacement.suffix)&&(l.push(this.settings.negativeSignCharacter),this.caretFix="keydown"===e.type),this.settings.currencySymbolPlacement===I.options.currencySymbolPlacement.suffix&&this.settings.negativePositiveSignPlacement===I.options.negativePositiveSignPlacement.right))){var c=this.settings.currencySymbol.split(""),u=["\\","^","$",".","|","?","*","+","(",")","["],h=[];c.forEach(function(e,t){t=c[e],D.isInArray(t,u)?h.push("\\"+t):h.push(t)}),this.eventKey===d.keyName.Backspace&&"-"===this.settings.negativeSignCharacter&&h.push("-"),l.push(h.join("")),this.caretFix="keydown"===e.type}for(var m=0;m",curlyBraces:"{,}",angleBrackets:"〈,〉",japaneseQuotationMarks:"「,」",halfBrackets:"⸤,⸥",whiteSquareBrackets:"⟦,⟧",quotationMarks:"‹,›",guillemets:"«,»",none:null},negativePositiveSignPlacement:{prefix:"p",suffix:"s",left:"l",right:"r",none:null},negativeSignCharacter:{hyphen:"-",minus:"−",heavyMinus:"➖",fullWidthHyphen:"-",circledMinus:"⊖",squaredMinus:"⊟",triangleMinus:"⨺",plusMinus:"±",minusPlus:"∓",dotMinus:"∸",minusTilde:"≂",not:"¬"},noEventListeners:{noEvents:!0,addEvents:!1},onInvalidPaste:{error:"error",ignore:"ignore",clamp:"clamp",truncate:"truncate",replace:"replace"},outputFormat:{string:"string",number:"number",dot:".",negativeDot:"-.",comma:",",negativeComma:"-,",dotNegative:".-",commaNegative:",-",none:null},overrideMinMaxLimits:{ceiling:"ceiling",floor:"floor",ignore:"ignore",doNotOverride:null},positiveSignCharacter:{plus:"+",fullWidthPlus:"+",heavyPlus:"➕",doublePlus:"⧺",triplePlus:"⧻",circledPlus:"⊕",squaredPlus:"⊞",trianglePlus:"⨹",plusMinus:"±",minusPlus:"∓",dotPlus:"∔",altHebrewPlus:"﬩",normalSpace:" ",thinSpace:" ",narrowNoBreakSpace:" ",noBreakSpace:" "},rawValueDivisor:{none:null,percentage:100,permille:1e3,basisPoint:1e4},readOnly:{readOnly:!0,readWrite:!1},roundingMethod:{halfUpSymmetric:"S",halfUpAsymmetric:"A",halfDownSymmetric:"s",halfDownAsymmetric:"a",halfEvenBankersRounding:"B",upRoundAwayFromZero:"U",downRoundTowardZero:"D",toCeilingTowardPositiveInfinity:"C",toFloorTowardNegativeInfinity:"F",toNearest05:"N05",toNearest05Alt:"CHF",upToNext05:"U05",downToNext05:"D05"},saveValueToSessionStorage:{save:!0,doNotSave:!1},selectNumberOnly:{selectNumbersOnly:!0,selectAll:!1},selectOnFocus:{select:!0,doNotSelect:!1},serializeSpaces:{plus:"+",percent:"%20"},showOnlyNumbersOnFocus:{onlyNumbers:!0,showAll:!1},showPositiveSign:{show:!0,hide:!1},showWarnings:{show:!0,hide:!1},styleRules:{none:null,positiveNegative:{positive:"autoNumeric-positive",negative:"autoNumeric-negative"},range0To100With4Steps:{ranges:[{min:0,max:25,class:"autoNumeric-red"},{min:25,max:50,class:"autoNumeric-orange"},{min:50,max:75,class:"autoNumeric-yellow"},{min:75,max:100,class:"autoNumeric-green"}]},evenOdd:{userDefined:[{callback:function(e){return e%2==0},classes:["autoNumeric-even","autoNumeric-odd"]}]},rangeSmallAndZero:{userDefined:[{callback:function(e){return-1<=e&&e<0?0:0===Number(e)?1:0":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},i.appendMany=function(e,t){if("1.7"===o.fn.jquery.substr(0,3)){var n=o();o.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},i.__cache={};var n=0;return i.GetUniqueElementId=function(e){var t=e.getAttribute("data-select2-id");return null==t&&(e.id?(t=e.id,e.setAttribute("data-select2-id",t)):(e.setAttribute("data-select2-id",++n),t=n.toString())),t},i.StoreData=function(e,t,n){var r=i.GetUniqueElementId(e);i.__cache[r]||(i.__cache[r]={}),i.__cache[r][t]=n},i.GetData=function(e,t){var n=i.GetUniqueElementId(e);return t?i.__cache[n]&&null!=i.__cache[n][t]?i.__cache[n][t]:o(e).data(t):i.__cache[n]},i.RemoveData=function(e){var t=i.GetUniqueElementId(e);null!=i.__cache[t]&&delete i.__cache[t],e.removeAttribute("data-select2-id")},i}),e.define("select2/results",["jquery","./utils"],function(h,f){function r(e,t,n){this.$element=e,this.data=n,this.options=t,r.__super__.constructor.call(this)}return f.Extend(r,f.Observable),r.prototype.render=function(){var e=h('
    ');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},r.prototype.clear=function(){this.$results.empty()},r.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=h(''),r=this.options.get("translations").get(e.message);n.append(t(r(e.args))),n[0].className+=" select2-results__message",this.$results.append(n)},r.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},r.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(e,t);return f.StoreData(t,"data",e),t},r.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&(l.setClasses(),l.highlightFirstItem())}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(l.setClasses(),l.options.get("scrollAfterSelect")&&l.highlightFirstItem())}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=f.GetData(e[0],"data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(!(n<=0)){var r=n-1;0===e.length&&(r=0);var i=t.eq(r);i.trigger("mouseenter");var o=l.$results.offset().top,s=i.offset().top,a=l.$results.scrollTop()+(s-o);0===r?l.$results.scrollTop(0):s-o<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var r=t.eq(n);r.trigger("mouseenter");var i=l.$results.offset().top+l.$results.outerHeight(!1),o=r.offset().top+r.outerHeight(!1),s=l.$results.scrollTop()+o-i;0===n?l.$results.scrollTop(0):ithis.$results.outerHeight()||o<0)&&this.$results.scrollTop(i)}},r.prototype.template=function(e,t){var n=this.options.get("templateResult"),r=this.options.get("escapeMarkup"),i=n(e,t);null==i?t.style.display="none":"string"==typeof i?t.innerHTML=r(i):h(t).append(i)},r}),e.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(n,r,i){function o(e,t){this.$element=e,this.options=t,o.__super__.constructor.call(this)}return r.Extend(o,r.Observable),o.prototype.render=function(){var e=n('');return this._tabindex=0,null!=r.GetData(this.$element[0],"old-tabindex")?this._tabindex=r.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),e.attr("aria-disabled","false"),this.$selection=e},o.prototype.bind=function(e,t){var n=this,r=e.id+"-results";this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===i.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",r),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),e.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},o.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},o.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.select2."+e.id,function(e){var t=n(e.target).closest(".select2");n(".select2.select2-container--open").each(function(){this!=t[0]&&r.GetData(this,"element").select2("close")})})},o.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.select2."+e.id)},o.prototype.position=function(e,t){t.find(".selection").append(e)},o.prototype.destroy=function(){this._detachCloseHandler(this.container)},o.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},o.prototype.isEnabled=function(){return!this.isDisabled()},o.prototype.isDisabled=function(){return this.options.get("disabled")},o}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html(''),e},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),t.on("focus",function(e){t.isOpen()||n.$selection.trigger("focus")})},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("")},i.prototype.update=function(e){if(0!==e.length){var t=e[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(t,n);n.empty().append(r);var i=t.title||t.text;i?n.attr("title",i):n.removeAttr("title")}else this.clear()},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(i,e,l){function n(e,t){n.__super__.constructor.apply(this,arguments)}return l.Extend(n,e),n.prototype.render=function(){var e=n.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('
      '),e},n.prototype.bind=function(e,t){var r=this;n.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){r.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!r.isDisabled()){var t=i(this).parent(),n=l.GetData(t[0],"data");r.trigger("unselect",{originalEvent:e,data:n})}})},n.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},n.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},n.prototype.selectionContainer=function(){return i('
    • ×
    • ')},n.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n×
      ');a.StoreData(r[0],"data",t),this.$selection.find(".select2-selection__rendered").prepend(r)}},e}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(r,a,l){function e(e,t,n){e.call(this,t,n)}return e.prototype.render=function(e){var t=r('');this.$searchContainer=t,this.$search=t.find("input");var n=e.call(this);return this._transferTabIndex(),n},e.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),t.on("open",function(){r.$search.attr("aria-controls",i),r.$search.trigger("focus")}),t.on("close",function(){r.$search.val(""),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.trigger("focus")}),t.on("enable",function(){r.$search.prop("disabled",!1),r._transferTabIndex()}),t.on("disable",function(){r.$search.prop("disabled",!0)}),t.on("focus",function(e){r.$search.trigger("focus")}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".select2-search--inline",function(e){r.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){r._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented(),e.which===l.BACKSPACE&&""===r.$search.val()){var t=r.$searchContainer.prev(".select2-selection__choice");if(0this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),e.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("select",function(){r._checkIfMaximumSelected()})},e.prototype.query=function(e,t,n){var r=this;this._checkIfMaximumSelected(function(){e.call(r,t,n)})},e.prototype._checkIfMaximumSelected=function(e,n){var r=this;this.current(function(e){var t=null!=e?e.length:0;0=r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):n&&n()})},e}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(o,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=o('');return this.$searchContainer=n,this.$search=n.find("input"),t.prepend(n),t},t.prototype.bind=function(e,t,n){var r=this,i=t.id+"-results";e.call(this,t,n),this.$search.on("keydown",function(e){r.trigger("keypress",e),r._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){o(this).off("keyup")}),this.$search.on("keyup input",function(e){r.handleSearch(e)}),t.on("open",function(){r.$search.attr("tabindex",0),r.$search.attr("aria-controls",i),r.$search.trigger("focus"),window.setTimeout(function(){r.$search.trigger("focus")},0)}),t.on("close",function(){r.$search.attr("tabindex",-1),r.$search.removeAttr("aria-controls"),r.$search.removeAttr("aria-activedescendant"),r.$search.val(""),r.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||r.$search.trigger("focus")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(r.showSearch(e)?r.$searchContainer.removeClass("select2-search--hide"):r.$searchContainer.addClass("select2-search--hide"))}),t.on("results:focus",function(e){e.data._resultId?r.$search.attr("aria-activedescendant",e.data._resultId):r.$search.removeAttr("aria-activedescendant")})},t.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,r)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),r=t.length-1;0<=r;r--){var i=t[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},e}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(n){function e(e,t,n,r){this.lastParams={},e.call(this,t,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("query",function(e){r.lastParams=e,r.loading=!0}),t.on("query:append",function(e){r.lastParams=e,r.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},e.prototype.loadMoreIfNeeded=function(){var e=n.contains(document.documentElement,this.$loadingMore[0]);if(!this.loading&&e){var t=this.$results.offset().top+this.$results.outerHeight(!1);this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore()}},e.prototype.loadMore=function(){this.loading=!0;var e=n.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=n('
    • '),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(f,a){function e(e,t,n){this.$dropdownParent=f(n.get("dropdownParent")||document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var r=this;e.call(this,t,n),t.on("open",function(){r._showDropdown(),r._attachPositioningHandler(t),r._bindContainerResultHandlers(t)}),t.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=f(""),n=e.call(this);return t.append(n),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._bindContainerResultHandlers=function(e,t){if(!this._containerResultsHandlersBound){var n=this;t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:message",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("select",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("unselect",function(){n._positionDropdown(),n._resizeDropdown()}),this._containerResultsHandlersBound=!0}},e.prototype._attachPositioningHandler=function(e,t){var n=this,r="scroll.select2."+t.id,i="resize.select2."+t.id,o="orientationchange.select2."+t.id,s=this.$container.parents().filter(a.hasScroll);s.each(function(){a.StoreData(this,"select2-scroll-position",{x:f(this).scrollLeft(),y:f(this).scrollTop()})}),s.on(r,function(e){var t=a.GetData(this,"select2-scroll-position");f(this).scrollTop(t.y)}),f(window).on(r+" "+i+" "+o,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.select2."+t.id,r="resize.select2."+t.id,i="orientationchange.select2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),f(window).off(n+" "+r+" "+i)},e.prototype._positionDropdown=function(){var e=f(window),t=this.$dropdown.hasClass("select2-dropdown--above"),n=this.$dropdown.hasClass("select2-dropdown--below"),r=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var s=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),c=ai.bottom+s,d={left:i.left,top:o.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h={top:0,left:0};(f.contains(document.body,p[0])||p[0].isConnected)&&(h=p.offset()),d.top-=h.top,d.left-=h.left,t||n||(r="below"),u||!c||t?!c&&u&&t&&(r="below"):r="above",("above"==r||t&&"below"!==r)&&(d.top=o.top-h.top-s),null!=r&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+r),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+r)),this.$dropdownContainer.css(d)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,r){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,r)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,r=0;r
      ');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),u.StoreData(e[0],"element",this.$element),e},d}),e.define("jquery-mousewheel",["jquery"],function(e){return e}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],function(i,e,o,t,s){if(null==i.fn.select2){var a=["open","close","destroy"];i.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var e=i.extend(!0,{},t);new o(i(this),e)}),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var n,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=s.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),n=e[t].apply(e,r)}),-1>"),G("endobj"),n=R[t].join("\n"),J(),k){for(i=[],o=n.length;o--;)i[o]=n.charCodeAt(o);c=l.from(n),s=new a(6),s.append(new Uint8Array(i)),n=s.flush(),i=new Uint8Array(n.length+6),i.set(new Uint8Array([120,156])),i.set(n,2),i.set(new Uint8Array([255&c,c>>8&255,c>>16&255,c>>24&255]),n.length+2),n=String.fromCharCode.apply(null,i),G("<>")}else G("<>");Z(n),G("endobj")}I[1]=M,G("1 0 obj"),G("<>"),G("endobj"),W.publish("postPutPages")},et=function(t){t.objectNumber=J(),G("<>"),G("endobj")},nt=function(){for(var t in E)E.hasOwnProperty(t)&&et(E[t])},rt=function(){W.publish("putXobjectDict")},it=function(){G("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),G("/Font <<");for(var t in E)E.hasOwnProperty(t)&&G("/"+t+" "+E[t].objectNumber+" 0 R");G(">>"),G("/XObject <<"),rt(),G(">>")},ot=function(){nt(),W.publish("putResources"),I[2]=M,G("2 0 obj"),G("<<"),it(),G(">>"),G("endobj"),W.publish("postPutResources")},at=function(){W.publish("putAdditionalObjects");for(var t=0;t>8&&(c=!0);t=s.join("")}for(n=t.length;void 0===c&&0!==n;)t.charCodeAt(n-1)>>8&&(c=!0),n--;if(!c)return t;for(s=e.noBOM?[]:[254,255],n=0,r=t.length;n>8,u>>8)throw new Error("Character at position "+n+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");s.push(u),s.push(l-(u<<8))}return String.fromCharCode.apply(void 0,s)},ft=function(t,e){return ht(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},dt=function(){G("/Producer (jsPDF "+r.version+")");for(var t in U)U.hasOwnProperty(t)&&U[t]&&G("/"+t.substr(0,1).toUpperCase()+t.substr(1)+" ("+ft(U[t])+")");var e=new Date,n=e.getTimezoneOffset(),i=n<0?"+":"-",o=Math.floor(Math.abs(n/60)),a=Math.abs(n%60),s=[i,Y(o),"'",Y(a),"'"].join("");G(["/CreationDate (D:",e.getFullYear(),Y(e.getMonth()+1),Y(e.getDate()),Y(e.getHours()),Y(e.getMinutes()),Y(e.getSeconds()),s,")"].join(""))},pt=function(){switch(G("/Type /Catalog"),G("/Pages 1 0 R"),b||(b="fullwidth"),b){case"fullwidth":G("/OpenAction [3 0 R /FitH null]");break;case"fullheight":G("/OpenAction [3 0 R /FitV null]");break;case"fullpage":G("/OpenAction [3 0 R /Fit]");break;case"original":G("/OpenAction [3 0 R /XYZ null null 1]");break;default:var t=""+b;"%"===t.substr(t.length-1)&&(b=parseInt(b)/100),"number"==typeof b&&G("/OpenAction [3 0 R /XYZ null null "+X(b)+"]")}switch(x||(x="continuous"),x){case"continuous":G("/PageLayout /OneColumn");break;case"single":G("/PageLayout /SinglePage");break;case"two":case"twoleft":G("/PageLayout /TwoColumnLeft");break;case"tworight":G("/PageLayout /TwoColumnRight")}v&&G("/PageMode /"+v),W.publish("putCatalog")},gt=function(){G("/Size "+(T+1)),G("/Root "+T+" 0 R"),G("/Info "+(T-1)+" 0 R")},mt=function(t,e){var n="string"==typeof e&&e.toLowerCase();if("string"==typeof t){var r=t.toLowerCase();s.hasOwnProperty(r)&&(t=s[r][0]/p,e=s[r][1]/p)}if(Array.isArray(t)&&(e=t[1],t=t[0]),n){switch(n.substr(0,1)){case"l":e>t&&(n="s");break;case"p":t>e&&(n="s")}"s"===n&&(g=t,t=e,e=g)}P=!0,R[++F]=[],D[F]={width:Number(t)||w,height:Number(e)||y},B[F]={},vt(F)},wt=function(){mt.apply(this,arguments),G(X(q*p)+" w"),G(C),0!==N&&G(N+" J"),0!==L&&G(L+" j"),W.publish("addPage",{pageNumber:F})},yt=function(t){t>0&&t<=F&&(R.splice(t,1),D.splice(t,1),F--,m>F&&(m=F),this.setPage(m))},vt=function(t){t>0&&t<=F&&(m=t,w=D[t].width,y=D[t].height)},bt=function(t,e){var n;switch(t=void 0!==t?t:E[d].fontName,e=void 0!==e?e:E[d].fontStyle,void 0!==t&&(t=t.toLowerCase()),t){case"sans-serif":case"verdana":case"arial":case"helvetica":t="helvetica";break;case"fixed":case"monospace":case"terminal":case"courier":t="courier";break;case"serif":case"cursive":case"fantasy":default:t="times"}try{n=O[t][e]}catch(t){}return n||(n=O.times[e],null==n&&(n=O.times.normal)),n},xt=function(){P=!1,T=2,M=0,j=[],I=[],z=[],W.publish("buildDocument"),G("%PDF-"+o),tt(),at(),ot(),J(),G("<<"),dt(),G(">>"),G("endobj"),J(),G("<<"),pt(),G(">>"),G("endobj");var t,e=M,n="0000000000";for(G("xref"),G("0 "+(T+1)),G(n+" 65535 f "),t=1;t<=T;t++){var r=I[t];G("function"==typeof r?(n+I[t]()).slice(-10)+" 00000 n ":(n+I[t]).slice(-10)+" 00000 n ")}return G("trailer"),G("<<"),gt(),G(">>"),G("startxref"),G(""+e),G("%%EOF"),P=!0,j.join("\n")},kt=function(t){var e="S";return"F"===t?e="f":"FD"===t||"DF"===t?e="B":"f"!==t&&"f*"!==t&&"B"!==t&&"B*"!==t||(e=t),e},_t=function(){for(var t=xt(),e=t.length,n=new ArrayBuffer(e),r=new Uint8Array(n);e--;)r[e]=t.charCodeAt(e);return n},Ct=function(){return new Blob([_t()],{type:"application/pdf"})},At=ut(function(t,n){var r="dataur"===(""+t).substr(0,6)?"data:application/pdf;base64,"+btoa(xt()):0;switch(t){case void 0:return xt();case"save":if(navigator.getUserMedia&&(void 0===e.URL||void 0===e.URL.createObjectURL))return H.output("dataurlnewwindow");i(Ct(),n),"function"==typeof i.unload&&e.setTimeout&&setTimeout(i.unload,911);break;case"arraybuffer":return _t();case"blob":return Ct();case"bloburi":case"bloburl":return e.URL&&e.URL.createObjectURL(Ct())||void 0;case"datauristring":case"dataurlstring":return r;case"dataurlnewwindow":var o=e.open(r);if(o||"undefined"==typeof safari)return o;case"datauri":case"dataurl":return e.document.location.href=r;default:throw new Error('Output type "'+t+'" is not supported.')}});switch(l){case"pt":p=1;break;case"mm":p=72/25.4000508;break;case"cm":p=72/2.54000508;break;case"in":p=72;break;case"px":p=96/72;break;case"pc":p=12;break;case"em":p=12;break;case"ex":p=6;break;default:throw"Invalid unit: "+l}H.internal={pdfEscape:ft,getStyle:kt,getFont:function(){return E[bt.apply(H,arguments)]},getFontSize:function(){return A},getLineHeight:function(){return A*S},write:function(t){G(1===arguments.length?t:Array.prototype.join.call(arguments," "))},getCoordinateString:function(t){return X(t*p)},getVerticalCoordinateString:function(t){return X((y-t)*p)},collections:{},newObject:J,newAdditionalObject:Q,newObjectDeferred:K,newObjectDeferredBegin:$,putStream:Z,events:W,scaleFactor:p,pageSize:{get width(){return w},get height(){return y}},output:function(t,e){return At(t,e)},getNumberOfPages:function(){return R.length-1},pages:R,out:G,f2:X,getPageInfo:function(t){var e=2*(t-1)+3;return{objId:e,pageNumber:t,pageContext:B[t]}},getCurrentPageInfo:function(){var t=2*(m-1)+3;return{objId:t,pageNumber:m,pageContext:B[m]}},getPDFVersion:function(){return o}},H.addPage=function(){return wt.apply(this,arguments),this},H.setPage=function(){return vt.apply(this,arguments),this},H.insertPage=function(t){return this.addPage(),this.movePage(m,t),this},H.movePage=function(t,e){if(t>e){for(var n=R[t],r=D[t],i=B[t],o=t;o>e;o--)R[o]=R[o-1],D[o]=D[o-1],B[o]=B[o-1];R[e]=n,D[e]=r,B[e]=i,this.setPage(e)}else if(t>16&255,e=r>>8&255,n=255&r}return _=0===t&&0===e&&0===n||"undefined"==typeof e?V(t/255)+" g":[V(t/255),V(e/255),V(n/255),"rg"].join(" "),this},H.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},H.setLineCap=function(t){var e=this.CapJoinStyles[t];if(void 0===e)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return N=e,G(e+" J"),this},H.setLineJoin=function(t){var e=this.CapJoinStyles[t];if(void 0===e)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return L=e,G(e+" j"),this},H.output=At,H.save=function(t){H.output("save",t)};for(var St in r.API)r.API.hasOwnProperty(St)&&("events"===St&&r.API.events.length?!function(t,e){var n,r,i;for(i=e.length-1;i!==-1;i--)n=e[i][0],r=e[i][1],t.subscribe.apply(t,[n].concat("function"==typeof r?[r]:r))}(W,r.API.events):H[St]=r.API[St]);return lt(),d="F1",wt(u,c),W.publish("initialized"),H}var o="1.3",s={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};return r.API={events:[]},r.version="1.x-master","function"==typeof define&&define.amd?define("jsPDF",function(){return r}):"undefined"!=typeof module&&module.exports?module.exports=r:e.jsPDF=r,r}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||void 0));/** * jsPDF AcroForm Plugin * Copyright (c) 2016 Alexander Weidt, https://github.com/BiggA94 * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ (window.AcroForm=function(t){var n=window.AcroForm;n.scale=function(t){return t*(r.internal.scaleFactor/1)},n.antiScale=function(t){return 1/r.internal.scaleFactor*t};var r={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null};e.API.acroformPlugin=r;var i=function(){for(var t in this.acroformPlugin.acroFormDictionaryRoot.Fields){var e=this.acroformPlugin.acroFormDictionaryRoot.Fields[t];e.hasAnnotation&&a.call(this,e)}},o=function(){if(this.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");this.acroformPlugin.acroFormDictionaryRoot=new n.AcroFormDictionary,this.acroformPlugin.internal=this.internal,this.acroformPlugin.acroFormDictionaryRoot._eventID=this.internal.events.subscribe("postPutResources",l),this.internal.events.subscribe("buildDocument",i),this.internal.events.subscribe("putCatalog",c),this.internal.events.subscribe("postPutPages",u)},a=function(t){var n={type:"reference",object:t};e.API.annotationPlugin.annotations[this.internal.getPageInfo(t.page).pageNumber].push(n)},s=function(t){this.acroformPlugin.printedOut&&(this.acroformPlugin.printedOut=!1,this.acroformPlugin.acroFormDictionaryRoot=null),this.acroformPlugin.acroFormDictionaryRoot||o.call(this),this.acroformPlugin.acroFormDictionaryRoot.Fields.push(t)},c=function(){"undefined"!=typeof this.acroformPlugin.acroFormDictionaryRoot?this.internal.write("/AcroForm "+this.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R"):console.log("Root missing...")},l=function(){this.internal.events.unsubscribe(this.acroformPlugin.acroFormDictionaryRoot._eventID),delete this.acroformPlugin.acroFormDictionaryRoot._eventID,this.acroformPlugin.printedOut=!0},u=function(t){var e=!t;t||(this.internal.newObjectDeferredBegin(this.acroformPlugin.acroFormDictionaryRoot.objId),this.internal.out(this.acroformPlugin.acroFormDictionaryRoot.getString()));var t=t||this.acroformPlugin.acroFormDictionaryRoot.Kids;for(var r in t){var i=t[r],o=i.Rect;i.Rect&&(i.Rect=n.internal.calculateCoordinates.call(this,i.Rect)),this.internal.newObjectDeferredBegin(i.objId);var a="";if(a+=i.objId+" 0 obj\n",a+="<<\n"+i.getContent(),i.Rect=o,i.hasAppearanceStream&&!i.appearanceStreamContent){var s=n.internal.calculateAppearanceStream.call(this,i);a+="/AP << /N "+s+" >>\n",this.acroformPlugin.xForms.push(s)}if(i.appearanceStreamContent){a+="/AP << ";for(var c in i.appearanceStreamContent){var l=i.appearanceStreamContent[c];if(a+="/"+c+" ",a+="<< ",Object.keys(l).length>=1||Array.isArray(l))for(var r in l){var u=l[r];"function"==typeof u&&(u=u.call(this,i)),a+="/"+r+" "+u+" ",this.acroformPlugin.xForms.indexOf(u)>=0||this.acroformPlugin.xForms.push(u)}else{var u=l;"function"==typeof u&&(u=u.call(this,i)),a+="/"+r+" "+u+" \n",this.acroformPlugin.xForms.indexOf(u)>=0||this.acroformPlugin.xForms.push(u)}a+=" >>\n"}a+=">>\n"}a+=">>\nendobj\n",this.internal.out(a)}e&&h.call(this,this.acroformPlugin.xForms)},h=function(t){for(var e in t){var n=e,r=t[e];this.internal.newObjectDeferredBegin(r&&r.objId);var i="";i+=r?r.getString():"",this.internal.out(i),delete t[n]}};t.addField=function(t){return t instanceof n.TextField?d.call(this,t):t instanceof n.ChoiceField?p.call(this,t):t instanceof n.Button?f.call(this,t):t instanceof n.ChildClass?s.call(this,t):t&&s.call(this,t),t.page=this.acroformPlugin.internal.getCurrentPageInfo().pageNumber,this};var f=function(t){var t=t||new n.Field;t.FT="/Btn";var e=t.Ff||0;t.pushbutton&&(e=n.internal.setBitPosition(e,17),delete t.pushbutton),t.radio&&(e=n.internal.setBitPosition(e,16),delete t.radio),t.noToggleToOff&&(e=n.internal.setBitPosition(e,15)),t.Ff=e,s.call(this,t)},d=function(t){var t=t||new n.Field;t.FT="/Tx";var e=t.Ff||0;t.multiline&&(e=4096|e),t.password&&(e=8192|e),t.fileSelect&&(e|=1<<20),t.doNotSpellCheck&&(e|=1<<22),t.doNotScroll&&(e|=1<<23),t.Ff=t.Ff||e,s.call(this,t)},p=function(t){var e=t||new n.Field;e.FT="/Ch";var r=e.Ff||0;e.combo&&(r=n.internal.setBitPosition(r,18),delete e.combo),e.edit&&(r=n.internal.setBitPosition(r,19),delete e.edit),e.sort&&(r=n.internal.setBitPosition(r,20),delete e.sort),e.multiSelect&&this.internal.getPDFVersion()>=1.4&&(r=n.internal.setBitPosition(r,22),delete e.multiSelect),e.doNotSpellCheck&&this.internal.getPDFVersion()>=1.4&&(r=n.internal.setBitPosition(r,23),delete e.doNotSpellCheck),e.Ff=r,s.call(this,e)}})(e.API);var n=window.AcroForm;n.internal={},n.createFormXObject=function(t){var e=new n.FormXObject,r=n.Appearance.internal.getHeight(t)||0,i=n.Appearance.internal.getWidth(t)||0;return e.BBox=[0,0,i,r],e},n.Appearance={CheckBox:{createAppearanceStream:function(){var t={N:{On:n.Appearance.CheckBox.YesNormal},D:{On:n.Appearance.CheckBox.YesPushDown,Off:n.Appearance.CheckBox.OffPushDown}};return t},createMK:function(){return"<< /CA (3)>>"},YesPushDown:function(t){var e=n.createFormXObject(t),r="";t.Q=1;var i=n.internal.calculateX(t,"3","ZapfDingbats",50);return r+="0.749023 g\n 0 0 "+n.Appearance.internal.getWidth(t)+" "+n.Appearance.internal.getHeight(t)+" re\n f\n BMC\n q\n 0 0 1 rg\n /F13 "+i.fontSize+" Tf 0 g\n BT\n",r+=i.text,r+="ET\n Q\n EMC\n",e.stream=r,e},YesNormal:function(t){var e=n.createFormXObject(t),r="";t.Q=1;var i=n.internal.calculateX(t,"3","ZapfDingbats",.9*n.Appearance.internal.getHeight(t));return r+="1 g\n0 0 "+n.Appearance.internal.getWidth(t)+" "+n.Appearance.internal.getHeight(t)+" re\nf\nq\n0 0 1 rg\n0 0 "+(n.Appearance.internal.getWidth(t)-1)+" "+(n.Appearance.internal.getHeight(t)-1)+" re\nW\nn\n0 g\nBT\n/F13 "+i.fontSize+" Tf 0 g\n",r+=i.text,r+="ET\n Q\n",e.stream=r,e},OffPushDown:function(t){var e=n.createFormXObject(t),r="";return r+="0.749023 g\n 0 0 "+n.Appearance.internal.getWidth(t)+" "+n.Appearance.internal.getHeight(t)+" re\n f\n",e.stream=r,e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:n.Appearance.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=n.Appearance.RadioButton.Circle.YesNormal,e.D[t]=n.Appearance.RadioButton.Circle.YesPushDown,e},createMK:function(){return"<< /CA (l)>>"},YesNormal:function(t){var e=n.createFormXObject(t),r="",i=n.Appearance.internal.getWidth(t)<=n.Appearance.internal.getHeight(t)?n.Appearance.internal.getWidth(t)/4:n.Appearance.internal.getHeight(t)/4;i*=.9;var o=n.Appearance.internal.Bezier_C;return r+="q\n1 0 0 1 "+n.Appearance.internal.getWidth(t)/2+" "+n.Appearance.internal.getHeight(t)/2+" cm\n"+i+" 0 m\n"+i+" "+i*o+" "+i*o+" "+i+" 0 "+i+" c\n-"+i*o+" "+i+" -"+i+" "+i*o+" -"+i+" 0 c\n-"+i+" -"+i*o+" -"+i*o+" -"+i+" 0 -"+i+" c\n"+i*o+" -"+i+" "+i+" -"+i*o+" "+i+" 0 c\nf\nQ\n",e.stream=r,e},YesPushDown:function(t){var e=n.createFormXObject(t),r="",i=n.Appearance.internal.getWidth(t)<=n.Appearance.internal.getHeight(t)?n.Appearance.internal.getWidth(t)/4:n.Appearance.internal.getHeight(t)/4;i*=.9;var o=2*i,a=o*n.Appearance.internal.Bezier_C,s=i*n.Appearance.internal.Bezier_C;return r+="0.749023 g\n q\n 1 0 0 1 "+n.Appearance.internal.getWidth(t)/2+" "+n.Appearance.internal.getHeight(t)/2+" cm\n"+o+" 0 m\n"+o+" "+a+" "+a+" "+o+" 0 "+o+" c\n-"+a+" "+o+" -"+o+" "+a+" -"+o+" 0 c\n-"+o+" -"+a+" -"+a+" -"+o+" 0 -"+o+" c\n"+a+" -"+o+" "+o+" -"+a+" "+o+" 0 c\n f\n Q\n 0 g\n q\n 1 0 0 1 "+n.Appearance.internal.getWidth(t)/2+" "+n.Appearance.internal.getHeight(t)/2+" cm\n"+i+" 0 m\n"+i+" "+s+" "+s+" "+i+" 0 "+i+" c\n-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c\n-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c\n"+s+" -"+i+" "+i+" -"+s+" "+i+" 0 c\n f\n Q\n",e.stream=r,e},OffPushDown:function(t){var e=n.createFormXObject(t),r="",i=n.Appearance.internal.getWidth(t)<=n.Appearance.internal.getHeight(t)?n.Appearance.internal.getWidth(t)/4:n.Appearance.internal.getHeight(t)/4;i*=.9;var o=2*i,a=o*n.Appearance.internal.Bezier_C;return r+="0.749023 g\n q\n 1 0 0 1 "+n.Appearance.internal.getWidth(t)/2+" "+n.Appearance.internal.getHeight(t)/2+" cm\n"+o+" 0 m\n"+o+" "+a+" "+a+" "+o+" 0 "+o+" c\n-"+a+" "+o+" -"+o+" "+a+" -"+o+" 0 c\n-"+o+" -"+a+" -"+a+" -"+o+" 0 -"+o+" c\n"+a+" -"+o+" "+o+" -"+a+" "+o+" 0 c\n f\n Q\n",e.stream=r,e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:n.Appearance.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=n.Appearance.RadioButton.Cross.YesNormal,e.D[t]=n.Appearance.RadioButton.Cross.YesPushDown,e},createMK:function(){return"<< /CA (8)>>"},YesNormal:function(t){var e=n.createFormXObject(t),r="",i=n.Appearance.internal.calculateCross(t);return r+="q\n 1 1 "+(n.Appearance.internal.getWidth(t)-2)+" "+(n.Appearance.internal.getHeight(t)-2)+" re\n W\n n\n "+i.x1.x+" "+i.x1.y+" m\n "+i.x2.x+" "+i.x2.y+" l\n "+i.x4.x+" "+i.x4.y+" m\n "+i.x3.x+" "+i.x3.y+" l\n s\n Q\n",e.stream=r,e},YesPushDown:function(t){var e=n.createFormXObject(t),r=n.Appearance.internal.calculateCross(t),i="";return i+="0.749023 g\n 0 0 "+n.Appearance.internal.getWidth(t)+" "+n.Appearance.internal.getHeight(t)+" re\n f\n q\n 1 1 "+(n.Appearance.internal.getWidth(t)-2)+" "+(n.Appearance.internal.getHeight(t)-2)+" re\n W\n n\n "+r.x1.x+" "+r.x1.y+" m\n "+r.x2.x+" "+r.x2.y+" l\n "+r.x4.x+" "+r.x4.y+" m\n "+r.x3.x+" "+r.x3.y+" l\n s\n Q\n",e.stream=i,e},OffPushDown:function(t){var e=n.createFormXObject(t),r="";return r+="0.749023 g\n 0 0 "+n.Appearance.internal.getWidth(t)+" "+n.Appearance.internal.getHeight(t)+" re\n f\n",e.stream=r,e}}},createDefaultAppearanceStream:function(t){var e="";return e+="/Helv 0 Tf 0 g"}},n.Appearance.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=function(t,e){return t>e?e:t},r=n.Appearance.internal.getWidth(t),i=n.Appearance.internal.getHeight(t),o=e(r,i),a={x1:{x:(r-o)/2,y:(i-o)/2+o},x2:{x:(r-o)/2+o,y:(i-o)/2},x3:{x:(r-o)/2,y:(i-o)/2},x4:{x:(r-o)/2+o,y:(i-o)/2+o}};return a}},n.Appearance.internal.getWidth=function(t){return t.Rect[2]},n.Appearance.internal.getHeight=function(t){return t.Rect[3]},n.internal.inherit=function(t,e){Object.create||function(t){var e=function(){};return e.prototype=t,new e};t.prototype=Object.create(e.prototype),t.prototype.constructor=t},n.internal.arrayToPdfArray=function(t){if(Array.isArray(t)){var e=" [";for(var n in t){var r=t[n].toString();e+=r,e+=n>\n",this.stream&&(t+="stream\n",t+=this.stream,t+="endstream\n"),t+="endobj\n"},n.PDFObject.prototype.getContent=function(){var t=function(t){var e="",r=Object.keys(t).filter(function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"_"!=t.substring(0,1)});for(var i in r){var o=r[i],a=t[o];a&&(e+=Array.isArray(a)?"/"+o+" "+n.internal.arrayToPdfArray(a)+"\n":a instanceof n.PDFObject?"/"+o+" "+a.objId+" 0 R\n":"/"+o+" "+a+"\n")}return e},e="";return e+=t(this)},n.FormXObject=function(){n.PDFObject.call(this),this.Type="/XObject",this.Subtype="/Form",this.FormType=1,this.BBox,this.Matrix,this.Resources="2 0 R",this.PieceInfo;var t;Object.defineProperty(this,"Length",{enumerable:!0,get:function(){return void 0!==t?t.length:0}}),Object.defineProperty(this,"stream",{enumerable:!1,set:function(e){t=e},get:function(){return t?t:null}})},n.internal.inherit(n.FormXObject,n.PDFObject),n.AcroFormDictionary=function(){n.PDFObject.call(this);var t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!0,configurable:!0,get:function(){return t}}),this.DA},n.internal.inherit(n.AcroFormDictionary,n.PDFObject),n.Field=function(){n.PDFObject.call(this);var t;Object.defineProperty(this,"Rect",{enumerable:!0,configurable:!1,get:function(){if(t){var e=t;return e}},set:function(e){t=e}});var e="";Object.defineProperty(this,"FT",{enumerable:!0,set:function(t){e=t},get:function(){return e}});var r;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,set:function(t){r=t},get:function(){if(!r||r.length<1){if(this instanceof n.ChildClass)return;return"(FieldObject"+n.Field.FieldNum++ +")"}return"("==r.substring(0,1)&&r.substring(r.length-1)?r:"("+r+")"}});var i;Object.defineProperty(this,"DA",{enumerable:!0,get:function(){if(i)return"("+i+")"},set:function(t){i=t}});var o;Object.defineProperty(this,"DV",{enumerable:!0,configurable:!0,get:function(){if(o)return o},set:function(t){o=t}}),Object.defineProperty(this,"Type",{enumerable:!0,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,get:function(){return this.hasAnnotation?"/Widget":null}}),this.BG,Object.defineProperty(this,"hasAnnotation",{enumerable:!1,get:function(){return!!(this.Rect||this.BC||this.BG)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(this,"page",{enumerable:!1,configurable:!0,writable:!0})},n.Field.FieldNum=0,n.internal.inherit(n.Field,n.PDFObject),n.ChoiceField=function(){n.Field.call(this),this.FT="/Ch",this.Opt=[],this.V="()",this.TI=0,this.combo=!1,Object.defineProperty(this,"edit",{enumerable:!0,set:function(t){1==t?(this._edit=!0,this.combo=!0):this._edit=!1},get:function(){return!!this._edit&&this._edit},configurable:!1}),this.hasAppearanceStream=!0,Object.defineProperty(this,"V",{get:function(){n.internal.toPdfString()}})},n.internal.inherit(n.ChoiceField,n.Field),window.ChoiceField=n.ChoiceField,n.ListBox=function(){n.ChoiceField.call(this)},n.internal.inherit(n.ListBox,n.ChoiceField),window.ListBox=n.ListBox,n.ComboBox=function(){n.ListBox.call(this),this.combo=!0},n.internal.inherit(n.ComboBox,n.ListBox),window.ComboBox=n.ComboBox,n.EditBox=function(){n.ComboBox.call(this),this.edit=!0},n.internal.inherit(n.EditBox,n.ComboBox),window.EditBox=n.EditBox,n.Button=function(){n.Field.call(this),this.FT="/Btn"},n.internal.inherit(n.Button,n.Field),window.Button=n.Button,n.PushButton=function(){n.Button.call(this),this.pushbutton=!0},n.internal.inherit(n.PushButton,n.Button),window.PushButton=n.PushButton,n.RadioButton=function(){n.Button.call(this),this.radio=!0;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,get:function(){if(t.length>0)return t}}),Object.defineProperty(this,"__Kids",{get:function(){return t}});var e;Object.defineProperty(this,"noToggleToOff",{enumerable:!1,get:function(){return e},set:function(t){e=t}})},n.internal.inherit(n.RadioButton,n.Button),window.RadioButton=n.RadioButton,n.ChildClass=function(t,e){n.Field.call(this),this.Parent=t,this._AppearanceType=n.Appearance.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(e),this.F=n.internal.setBitPosition(this.F,3,1),this.MK=this._AppearanceType.createMK(),this.AS="/Off",this._Name=e},n.internal.inherit(n.ChildClass,n.Field),n.RadioButton.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t&&"createMK"in t))return void console.log("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.__Kids){var n=this.__Kids[e];n.appearanceStreamContent=t.createAppearanceStream(n._Name),n.MK=t.createMK()}},n.RadioButton.prototype.createOption=function(t){var r=this,i=(this.__Kids.length,new n.ChildClass(r,t));return this.__Kids.push(i),e.API.addField(i),i},n.CheckBox=function(){Button.call(this),this.appearanceStreamContent=n.Appearance.CheckBox.createAppearanceStream(),this.MK=n.Appearance.CheckBox.createMK(),this.AS="/On",this.V="/On"},n.internal.inherit(n.CheckBox,n.Button),window.CheckBox=n.CheckBox,n.TextField=function(){n.Field.call(this),this.DA=n.Appearance.createDefaultAppearanceStream(),this.F=4;var t;Object.defineProperty(this,"V",{get:function(){return t?"("+t+")":t},enumerable:!0,set:function(e){t=e}});var e;Object.defineProperty(this,"DV",{get:function(){return e?"("+e+")":e},enumerable:!0,set:function(t){e=t}});var r=!1;Object.defineProperty(this,"multiline",{enumerable:!1,get:function(){return r},set:function(t){r=t}});var i=!1;Object.defineProperty(this,"MaxLen",{enumerable:!0,get:function(){return i},set:function(t){i=t}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!1,get:function(){return this.V||this.DV}})},n.internal.inherit(n.TextField,n.Field),window.TextField=n.TextField,n.PasswordField=function(){TextField.call(this),Object.defineProperty(this,"password",{value:!0,enumerable:!1,configurable:!1,writable:!1})},n.internal.inherit(n.PasswordField,n.TextField),window.PasswordField=n.PasswordField,n.internal.calculateFontSpace=function(t,e,r){var r=r||"helvetica",i=n.internal.calculateFontSpace.canvas||(n.internal.calculateFontSpace.canvas=document.createElement("canvas")),o=i.getContext("2d");o.save();var a=e+" "+r;o.font=a;var s=o.measureText(t);o.fontcolor="black";var o=i.getContext("2d");s.height=1.5*o.measureText("3").width,o.restore();s.width;return s},n.internal.calculateX=function(t,e,r,i){var i=i||12,r=r||"helvetica",o={text:"",fontSize:""};e="("==e.substr(0,1)?e.substr(1):e,e=")"==e.substr(e.length-1)?e.substr(0,e.length-1):e;var a=e.split(" "),s=i,c=2,l=2,u=n.Appearance.internal.getHeight(t)||0;u=u<0?-u:u;var h=n.Appearance.internal.getWidth(t)||0;h=h<0?-h:h;var f=function(t,e,i){if(t+1=a.length-1;if(!A||S){if(A||S){if(S)v=C;else if(t.multiline&&(d+c)*(k+2)+c>u)continue t}else{if(!t.multiline)continue t;if((d+c)*(k+2)+c>u)continue t;v=C}for(var q="",T=y;T<=v;T++)q+=a[T]+" ";switch(q=" "==q.substr(q.length-1)?q.substr(0,q.length-1):q,b=n.internal.calculateFontSpace(q,s+"px",r).width,t.Q){case 2:g=h-b-l;break;case 1:g=(h-b)/2;break;case 0:default:g=l}e+=g+" "+w+" Td\n",e+="("+q+") Tj\n",e+=-g+" 0 Td\n",w=-(s+c),m=g,b=0,y=v+1,k++,x=""}else x+=" "}break}return o.text=e,o.fontSize=s,o},n.internal.calculateAppearanceStream=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e="",r=t.V||t.DV,i=n.internal.calculateX(t,r);e+="/Tx BMC\nq\n/F1 "+i.fontSize+" Tf\n1 0 0 1 0 0 Tm\n",e+="BT\n",e+=i.text,e+="ET\n",e+="Q\nEMC\n";var o=new n.createFormXObject(t);o.stream=e;return o}},n.internal.calculateCoordinates=function(t,e,r,i){var o={};if(this.internal){var a=function(t){return t*this.internal.scaleFactor};Array.isArray(t)?(t[0]=n.scale(t[0]),t[1]=n.scale(t[1]),t[2]=n.scale(t[2]),t[3]=n.scale(t[3]),o.lowerLeft_X=t[0]||0,o.lowerLeft_Y=a.call(this,this.internal.pageSize.height)-t[3]-t[1]||0,o.upperRight_X=t[0]+t[2]||0,o.upperRight_Y=a.call(this,this.internal.pageSize.height)-t[1]||0):(t=n.scale(t),e=n.scale(e),r=n.scale(r),i=n.scale(i),o.lowerLeft_X=t||0,o.lowerLeft_Y=this.internal.pageSize.height-e||0,o.upperRight_X=t+r||0,o.upperRight_Y=this.internal.pageSize.height-e+i||0)}else Array.isArray(t)?(o.lowerLeft_X=t[0]||0,o.lowerLeft_Y=t[1]||0,o.upperRight_X=t[0]+t[2]||0,o.upperRight_Y=t[1]+t[3]||0):(o.lowerLeft_X=t||0,o.lowerLeft_Y=e||0,o.upperRight_X=t+r||0,o.upperRight_Y=e+i||0);return[o.lowerLeft_X,o.lowerLeft_Y,o.upperRight_X,o.upperRight_Y]},n.internal.calculateColor=function(t,e,n){var r=new Array(3);return r.r=0|t,r.g=0|e,r.b=0|n,r},n.internal.getBitPosition=function(t,e){t=t||0;var n=1;return n<<=e-1,t|n},n.internal.setBitPosition=function(t,e,n){t=t||0,n=n||1;var r=1;if(r<<=e-1,1==n)var t=t|r;else var t=t&~r;return t},/** * jsPDF addHTML PlugIn * Copyright (c) 2014 Diego Casorran * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ function(t){t.addHTML=function(t,e,n,r,i){if("undefined"==typeof html2canvas&&"undefined"==typeof rasterizeHTML)throw new Error("You need either https://github.com/niklasvh/html2canvas or https://github.com/cburgmer/rasterizeHTML.js");"number"!=typeof e&&(r=e,i=n),"function"==typeof r&&(i=r,r=null);var o=this.internal,a=o.scaleFactor,s=o.pageSize.width,c=o.pageSize.height;if(r=r||{},r.onrendered=function(t){e=parseInt(e)||0,n=parseInt(n)||0;var o=r.dim||{},l=o.h||0,u=o.w||Math.min(s,t.width/a)-e,h="JPEG";if(r.format&&(h=r.format),t.height>c&&r.pagesplit){var f=function(){for(var r=0;;){var o=document.createElement("canvas");o.width=Math.min(s*a,t.width),o.height=Math.min(c*a,t.height-r);var l=o.getContext("2d");l.drawImage(t,0,r,t.width,o.height,0,0,o.width,o.height);var f=[o,e,r?0:n,o.width/a,o.height/a,h,null,"SLOW"];if(this.addImage.apply(this,f),r+=o.height,r>=t.height)break;this.addPage()}i(u,r,null,f)}.bind(this);if("CANVAS"===t.nodeName){var d=new Image;d.onload=f,d.src=t.toDataURL("image/png"),t=d}else f()}else{var p=Math.random().toString(35),g=[t,e,n,u,l,h,p,"SLOW"];this.addImage.apply(this,g),i(u,l,p,g)}}.bind(this),"undefined"!=typeof html2canvas&&!r.rstz)return html2canvas(t,r);if("undefined"!=typeof rasterizeHTML){var l="drawDocument";return"string"==typeof t&&(l=/^http/.test(t)?"drawURL":"drawHTML"),r.width=r.width||s*a,rasterizeHTML[l](t,void 0,r).then(function(t){r.onrendered(t.image)},function(t){i(null,t)})}return null}}(e.API),/** @preserve * jsPDF addImage plugin * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/ * 2013 Chris Dowling, https://github.com/gingerchris * 2013 Trinh Ho, https://github.com/ineedfat * 2013 Edwin Alejandro Perez, https://github.com/eaparango * 2013 Norah Smith, https://github.com/burnburnrocket * 2014 Diego Casorran, https://github.com/diegocr * 2014 James Robb, https://github.com/jamesbrobb * * */ function(e){var n="addImage_",r=["jpeg","jpg","png"],i=function t(e){var n=this.internal.newObject(),r=this.internal.write,i=this.internal.putStream;if(e.n=n,r("<>"),"trns"in e&&e.trns.constructor==Array){for(var o="",a=0,s=e.trns.length;a>"),i(e.data),r("endobj"),"smask"in e){var c="/Predictor "+e.p+" /Colors 1 /BitsPerComponent "+e.bpc+" /Columns "+e.w,l={w:e.w,h:e.h,cs:"DeviceGray",bpc:e.bpc,dp:c,data:e.smask};"f"in e&&(l.f=e.f),t.call(this,l)}e.cs===this.color_spaces.INDEXED&&(this.internal.newObject(),r("<< /Length "+e.pal.length+">>"),i(this.arrayBufferToBinaryString(new Uint8Array(e.pal))),r("endobj"))},o=function(){var t=this.internal.collections[n+"images"];for(var e in t)i.call(this,t[e])},a=function(){var t,e=this.internal.collections[n+"images"],r=this.internal.write;for(var i in e)t=e[i],r("/I"+t.i,t.n,"0","R")},s=function(t){return t&&"string"==typeof t&&(t=t.toUpperCase()),t in e.image_compression?t:e.image_compression.NONE},c=function(){var t=this.internal.collections[n+"images"];return t||(this.internal.collections[n+"images"]=t={},this.internal.events.subscribe("putResources",o),this.internal.events.subscribe("putXobjectDict",a)),t},l=function(t){var e=0;return t&&(e=Object.keys?Object.keys(t).length:function(t){var e=0;for(var n in t)t.hasOwnProperty(n)&&e++;return e}(t)),e},u=function(t){return"undefined"==typeof t||null===t},h=function(t){return"string"==typeof t&&e.sHashCode(t)},f=function(t){return r.indexOf(t)===-1},d=function(t){return"function"!=typeof e["process"+t.toUpperCase()]},p=function(e){return"object"===("undefined"==typeof e?"undefined":t(e))&&1===e.nodeType},g=function(e,n,r){if("IMG"===e.nodeName&&e.hasAttribute("src")){var i=""+e.getAttribute("src");if(!r&&0===i.indexOf("data:image/"))return i;!n&&/\.png(?:[?#].*)?$/i.test(i)&&(n="png")}if("CANVAS"===e.nodeName)var o=e;else{var o=document.createElement("canvas");o.width=e.clientWidth||e.width,o.height=e.clientHeight||e.height;var a=o.getContext("2d");if(!a)throw"addImage requires canvas to be supported by browser.";if(r){var s,c,l,u,h,f,d,p,g=Math.PI/180;"object"===("undefined"==typeof r?"undefined":t(r))&&(s=r.x,c=r.y,l=r.bg,r=r.angle),p=r*g,u=Math.abs(Math.cos(p)),h=Math.abs(Math.sin(p)),f=o.width,d=o.height,o.width=d*h+f*u,o.height=d*u+f*h,isNaN(s)&&(s=o.width/2),isNaN(c)&&(c=o.height/2),a.clearRect(0,0,o.width,o.height),a.fillStyle=l||"white",a.fillRect(0,0,o.width,o.height),a.save(),a.translate(s,c),a.rotate(p),a.drawImage(e,-(f/2),-(d/2)),a.rotate(-p),a.translate(-s,-c),a.restore()}else a.drawImage(e,0,0,o.width,o.height)}return o.toDataURL("png"==(""+n).toLowerCase()?"image/png":"image/jpeg")},m=function(t,e){var n;if(e)for(var r in e)if(t===e[r].alias){n=e[r];break}return n},w=function(t,e,n){return t||e||(t=-96,e=-96),t<0&&(t=-1*n.w*72/t/this.internal.scaleFactor),e<0&&(e=-1*n.h*72/e/this.internal.scaleFactor),0===t&&(t=e*n.w/n.h),0===e&&(e=t*n.h/n.w),[t,e]},y=function(t,e,n,r,i,o,a){var s=w.call(this,n,r,i),c=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString;n=s[0],r=s[1],a[o]=i,this.internal.write("q",c(n),"0 0",c(r),c(t),l(e+r),"cm /I"+i.i,"Do Q")};e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"},e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"},e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},e.sHashCode=function(t){return Array.prototype.reduce&&t.split("").reduce(function(t,e){return t=(t<<5)-t+e.charCodeAt(0),t&t},0)},e.isString=function(t){return"string"==typeof t},e.extractInfoFromBase64DataURI=function(t){return/^data:([\w]+?\/([\w]+?));base64,(.+?)$/g.exec(t)},e.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array},e.isArrayBuffer=function(t){return!!this.supportsArrayBuffer()&&t instanceof ArrayBuffer},e.isArrayBufferView=function(t){return!!this.supportsArrayBuffer()&&("undefined"!=typeof Uint32Array&&(t instanceof Int8Array||t instanceof Uint8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array))},e.binaryStringToUint8Array=function(t){for(var e=t.length,n=new Uint8Array(e),r=0;r>18,n=(258048&o)>>12,r=(4032&o)>>6,i=63&o,a+=s[e]+s[n]+s[r]+s[i];return 1==u?(o=c[h],e=(252&o)>>2,n=(3&o)<<4,a+=s[e]+s[n]+"=="):2==u&&(o=c[h]<<8|c[h+1],e=(64512&o)>>10,n=(1008&o)>>4,r=(15&o)<<2,a+=s[e]+s[n]+s[r]+"="),a},e.createImageInfo=function(t,e,n,r,i,o,a,s,c,l,u,h,f){var d={alias:s,w:e,h:n,cs:r,bpc:i,i:a,data:t};return o&&(d.f=o),c&&(d.dp=c),l&&(d.trns=l),u&&(d.pal=u),h&&(d.smask=h),f&&(d.p=f),d},e.addImage=function(e,n,i,o,a,w,v,b,x){if("string"!=typeof n){var k=w;w=a,a=o,o=i,i=n,n=k}if("object"===("undefined"==typeof e?"undefined":t(e))&&!p(e)&&"imageData"in e){var _=e;e=_.imageData,n=_.format||n,i=_.x||i||0,o=_.y||o||0,a=_.w||a,w=_.h||w,v=_.alias||v,b=_.compression||b,x=_.rotation||_.angle||x}if(isNaN(i)||isNaN(o))throw console.error("jsPDF.addImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addImage");var C,A=c.call(this);if(!(C=m(e,A))){var S;if(p(e)&&(e=g(e,n,x)),u(v)&&(v=h(e)),!(C=m(v,A))){if(this.isString(e)){var q=this.extractInfoFromBase64DataURI(e);q?(n=q[2],e=atob(q[3])):137===e.charCodeAt(0)&&80===e.charCodeAt(1)&&78===e.charCodeAt(2)&&71===e.charCodeAt(3)&&(n="png")}if(n=(n||"JPEG").toLowerCase(),f(n))throw new Error("addImage currently only supports formats "+r+", not '"+n+"'");if(d(n))throw new Error("please ensure that the plugin for '"+n+"' support is added");if(this.supportsArrayBuffer()&&(e instanceof Uint8Array||(S=e,e=this.binaryStringToUint8Array(e))),C=this["process"+n.toUpperCase()](e,l(A),v,s(b),S),!C)throw new Error("An unkwown error occurred whilst processing the image")}}return y.call(this,i,o,a,w,C,C.i,A),this};var v=function(t){var e,n,r;if(255===!t.charCodeAt(0)||216===!t.charCodeAt(1)||255===!t.charCodeAt(2)||224===!t.charCodeAt(3)||!t.charCodeAt(6)==="J".charCodeAt(0)||!t.charCodeAt(7)==="F".charCodeAt(0)||!t.charCodeAt(8)==="I".charCodeAt(0)||!t.charCodeAt(9)==="F".charCodeAt(0)||0===!t.charCodeAt(10))throw new Error("getJpegSize requires a binary string jpeg file");for(var i=256*t.charCodeAt(4)+t.charCodeAt(5),o=4,a=t.length;o7)return n=x(t,c+5),r=(n[2]<<8)+n[3],i=(n[0]<<8)+n[1],o=n[4],{width:r,height:i,numcomponents:o};c+=2}throw new Error("getJpegSizeFromBytes could not find the size of the image")},x=function(t,e){return t.subarray(e,e+5)};e.processJPEG=function(t,e,n,r,i){var o,a=this.color_spaces.DEVICE_RGB,s=this.decode.DCT_DECODE,c=8;return this.isString(t)?(o=v(t),this.createImageInfo(t,o[0],o[1],1==o[3]?this.color_spaces.DEVICE_GRAY:a,c,s,e,n)):(this.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.isArrayBufferView(t)?(o=b(t),t=i||this.arrayBufferToBinaryString(t),this.createImageInfo(t,o.width,o.height,1==o.numcomponents?this.color_spaces.DEVICE_GRAY:a,c,s,e,n)):null)},e.processJPG=function(){return this.processJPEG.apply(this,arguments)}}(e.API),/** * jsPDF Annotations PlugIn * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ function(t){var n={annotations:[],f2:function(t){return t.toFixed(2)},notEmpty:function(t){if("undefined"!=typeof t&&""!=t)return!0}};return e.API.annotationPlugin=n,e.API.events.push(["addPage",function(t){this.annotationPlugin.annotations[t.pageNumber]=[]}]),t.events.push(["putPage",function(t){for(var e=this.annotationPlugin.annotations[t.pageNumber],r=!1,i=0;i>",u.content=y;var p=u.objId+" 0 R",g=30,d="/Rect ["+a((o.bounds.x+g)*s)+" "+a(c-(o.bounds.y+o.bounds.h)*s)+" "+a((o.bounds.x+o.bounds.w+g)*s)+" "+a((c-o.bounds.y)*s)+"] ";y="<>";else if(o.options.pageNumber){var t=this.internal.getPageInfo(o.options.pageNumber);switch(y="<>",this.internal.write(y))}}this.internal.write("]")}}]),t.createAnnotation=function(t){switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":this.annotationPlugin.annotations[this.internal.getCurrentPageInfo().pageNumber].push(t)}},t.link=function(t,e,n,r,i){this.annotationPlugin.annotations[this.internal.getCurrentPageInfo().pageNumber].push({x:t,y:e,w:n,h:r,options:i,type:"link"})},t.link=function(t,e,n,r,i){this.annotationPlugin.annotations[this.internal.getCurrentPageInfo().pageNumber].push({x:t,y:e,w:n,h:r,options:i,type:"link"})},t.textWithLink=function(t,e,n,r){var i=this.getTextWidth(t),o=this.internal.getLineHeight();return this.text(t,e,n),n+=.2*o,this.link(e,n-o,i,o,r),i},t.getTextWidth=function(t){var e=this.internal.getFontSize(),n=this.getStringUnitWidth(t)*e/this.internal.scaleFactor;return n},t.getLineHeight=function(){return this.internal.getLineHeight()},this}(e.API),function(t){t.autoPrint=function(){var t;return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.write("<< /S/Named /Type/Action /N/Print >>","endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.write("/OpenAction "+t+" 0 R")}),this}}(e.API),/** * jsPDF Canvas PlugIn * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv * * Licensed under the MIT License. * http://opensource.org/licenses/mit-license */ function(t){return t.events.push(["initialized",function(){this.canvas.pdf=this}]),t.canvas={getContext:function(t){return this.pdf.context2d._canvas=this,this.pdf.context2d},style:{}},Object.defineProperty(t.canvas,"width",{get:function(){return this._width},set:function(t){this._width=t,this.getContext("2d").pageWrapX=t+1}}),Object.defineProperty(t.canvas,"height",{get:function(){return this._height},set:function(t){this._height=t,this.getContext("2d").pageWrapY=t+1}}),this}(e.API),/** ==================================================================== * jsPDF Cell plugin * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com * 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br * 2013 Lee Driscoll, https://github.com/lsdriscoll * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria * 2014 James Hall, james@parall.ax * 2014 Diego Casorran, https://github.com/diegocr * * * ==================================================================== */ function(t){var e,n,r,i,o=3,a=13,s={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},c=1,l=function(t,e,n,r,i){s={x:t,y:e,w:n,h:r,ln:i}},u=function(){return s},h={left:0,top:0,bottom:0};t.setHeaderFunction=function(t){i=t},t.getTextDimensions=function(t){e=this.internal.getFont().fontName,n=this.table_font_size||this.internal.getFontSize(),r=this.internal.getFont().fontStyle;var i,o,a=19.049976/25.4;o=document.createElement("font"),o.id="jsPDFCell";try{o.style.fontStyle=r}catch(t){o.style.fontWeight=r}o.style.fontName=e,o.style.fontSize=n+"pt";try{o.textContent=t}catch(e){o.innerText=t}return document.body.appendChild(o),i={w:(o.offsetWidth+1)*a,h:(o.offsetHeight+1)*a},document.body.removeChild(o),i},t.cellAddPage=function(){var t=this.margins||h;this.addPage(),l(t.left,t.top,void 0,void 0),c+=1},t.cellInitialize=function(){s={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},c=1},t.cell=function(t,e,n,r,i,s,c){var f=u(),d=!1;if(void 0!==f.ln)if(f.ln===s)t=f.x+f.w,e=f.y;else{var p=this.margins||h;f.y+f.h+r+a>=this.internal.pageSize.height-p.bottom&&(this.cellAddPage(),d=!0,this.printHeaders&&this.tableHeaderRow&&this.printHeaderRow(s,!0)),e=u().y+u().h,d&&(e=a+10)}if(void 0!==i[0])if(this.printingHeaderRow?this.rect(t,e,n,r,"FD"):this.rect(t,e,n,r),"right"===c){i instanceof Array||(i=[i]);for(var g=0;go&&(o=i);return o},t.table=function(e,n,r,i,o){if(!r)throw"No data for PDF table";var a,l,u,f,d,p,g,m,w,y,v=[],b=[],x={},k={},_=[],C=[],A=!1,S=!0,q=12,T=h;if(T.width=this.internal.pageSize.width,o&&(o.autoSize===!0&&(A=!0),o.printHeaders===!1&&(S=!1),o.fontSize&&(q=o.fontSize),o.css&&"undefined"!=typeof o.css["font-size"]&&(q=16*o.css["font-size"]),o.margins&&(T=o.margins)),this.lnMod=0,s={x:void 0,y:void 0,w:void 0,h:void 0,ln:void 0},c=1,this.printHeaders=S,this.margins=T,this.setFontSize(q),this.table_font_size=q,void 0===i||null===i)v=Object.keys(r[0]);else if(i[0]&&"string"!=typeof i[0]){var P=19.049976/25.4;for(l=0,u=i.length;li&&(i=s)}return i},t.setTableHeaderRow=function(t){this.tableHeaderRow=t},t.printHeaderRow=function(t,e){if(!this.tableHeaderRow)throw"Property tableHeaderRow does not exist.";var n,r,o,s;if(this.printingHeaderRow=!0,void 0!==i){var u=i(this,c);l(u[0],u[1],u[2],u[3],-1)}this.setFontStyle("bold");var h=[];for(o=0,s=this.tableHeaderRow.length;o0&&this.setTableHeaderRow(h),this.setFontStyle("normal"),this.printingHeaderRow=!1}}(e.API),/** * jsPDF Context2D PlugIn Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv * * Licensed under the MIT License. http://opensource.org/licenses/mit-license */ function(t){function e(){this._isStrokeTransparent=!1,this._strokeOpacity=1,this.strokeStyle="#000000",this.fillStyle="#000000",this._isFillTransparent=!1,this._fillOpacity=1,this.font="12pt times",this.textBaseline="alphabetic",this.textAlign="start",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this._transform=[1,0,0,1,0,0],this.globalCompositeOperation="normal",this.globalAlpha=1,this._clip_path=[],this.ignoreClearRect=!1,this.copy=function(t){this._isStrokeTransparent=t._isStrokeTransparent,this._strokeOpacity=t._strokeOpacity,this.strokeStyle=t.strokeStyle,this._isFillTransparent=t._isFillTransparent,this._fillOpacity=t._fillOpacity,this.fillStyle=t.fillStyle,this.font=t.font,this.lineWidth=t.lineWidth,this.lineJoin=t.lineJoin,this.lineCap=t.lineCap,this.textBaseline=t.textBaseline,this.textAlign=t.textAlign,this._fontSize=t._fontSize,this._transform=t._transform.slice(0),this.globalCompositeOperation=t.globalCompositeOperation,this.globalAlpha=t.globalAlpha,this._clip_path=t._clip_path.slice(0),this.ignoreClearRect=t.ignoreClearRect}}t.events.push(["initialized",function(){this.context2d.pdf=this,this.context2d.internal.pdf=this,this.context2d.ctx=new e,this.context2d.ctxStack=[],this.context2d.path=[]}]),t.context2d={pageWrapXEnabled:!1,pageWrapYEnabled:!1,pageWrapX:9999999,pageWrapY:9999999,ctx:new e,f2:function(t){return t.toFixed(2)},fillRect:function(t,e,n,r){if(!this._isFillTransparent()){t=this._wrapX(t),e=this._wrapY(e);var i=this._matrix_map_rect(this.ctx._transform,{x:t,y:e,w:n,h:r});this.pdf.rect(i.x,i.y,i.w,i.h,"f")}},strokeRect:function(t,e,n,r){if(!this._isStrokeTransparent()){t=this._wrapX(t),e=this._wrapY(e);var i=this._matrix_map_rect(this.ctx._transform,{x:t,y:e,w:n,h:r});this.pdf.rect(i.x,i.y,i.w,i.h,"s")}},clearRect:function(t,e,n,r){if(!this.ctx.ignoreClearRect){t=this._wrapX(t),e=this._wrapY(e);var i=this._matrix_map_rect(this.ctx._transform,{x:t,y:e,w:n,h:r});this.save(),this.setFillStyle("#ffffff"),this.pdf.rect(i.x,i.y,i.w,i.h,"f"),this.restore()}},save:function(){this.ctx._fontSize=this.pdf.internal.getFontSize();var t=new e;t.copy(this.ctx),this.ctxStack.push(this.ctx),this.ctx=t},restore:function(){this.ctx=this.ctxStack.pop(),this.setFillStyle(this.ctx.fillStyle),this.setStrokeStyle(this.ctx.strokeStyle),this.setFont(this.ctx.font),this.pdf.setFontSize(this.ctx._fontSize),this.setLineCap(this.ctx.lineCap),this.setLineWidth(this.ctx.lineWidth),this.setLineJoin(this.ctx.lineJoin)},rect:function(t,e,n,r){this.moveTo(t,e),this.lineTo(t+n,e),this.lineTo(t+n,e+r),this.lineTo(t,e+r),this.lineTo(t,e),this.closePath()},beginPath:function(){this.path=[]},closePath:function(){this.path.push({type:"close"})},_getRgba:function(t){var e={};if(this.internal.rxTransparent.test(t))e.r=0,e.g=0,e.b=0,e.a=0;else{var n=this.internal.rxRgb.exec(t);null!=n?(e.r=parseInt(n[1]),e.g=parseInt(n[2]),e.b=parseInt(n[3]),e.a=1):(n=this.internal.rxRgba.exec(t),null!=n?(e.r=parseInt(n[1]),e.g=parseInt(n[2]),e.b=parseInt(n[3]),e.a=parseFloat(n[4])):(e.a=1,"#"!=t.charAt(0)&&(t=o.colorNameToHex(t),t||(t="#000000")),4===t.length?(e.r=t.substring(1,2),e.r+=r,e.g=t.substring(2,3),e.g+=g,e.b=t.substring(3,4),e.b+=b):(e.r=t.substring(1,3),e.g=t.substring(3,5),e.b=t.substring(5,7)),e.r=parseInt(e.r,16),e.g=parseInt(e.g,16),e.b=parseInt(e.b,16)))}return e.style=t,e},setFillStyle:function(t){var e,n,r,i;if(this.internal.rxTransparent.test(t))e=0,n=0,r=0,i=0;else{var a=this.internal.rxRgb.exec(t);null!=a?(e=parseInt(a[1]),n=parseInt(a[2]),r=parseInt(a[3]),i=1):(a=this.internal.rxRgba.exec(t),null!=a?(e=parseInt(a[1]),n=parseInt(a[2]),r=parseInt(a[3]),i=parseFloat(a[4])):(i=1,"#"!=t.charAt(0)&&(t=o.colorNameToHex(t),t||(t="#000000")),4===t.length?(e=t.substring(1,2),e+=e,n=t.substring(2,3),n+=n,r=t.substring(3,4),r+=r):(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7)),e=parseInt(e,16),n=parseInt(n,16),r=parseInt(r,16)))}this.ctx.fillStyle=t,this.ctx._isFillTransparent=0==i,this.ctx._fillOpacity=i,this.pdf.setFillColor(e,n,r,{a:i}),this.pdf.setTextColor(e,n,r,{a:i})},setStrokeStyle:function(t){var e=this._getRgba(t);this.ctx.strokeStyle=e.style,this.ctx._isStrokeTransparent=0==e.a,this.ctx._strokeOpacity=e.a,0===e.a?this.pdf.setDrawColor(255,255,255):1===e.a?this.pdf.setDrawColor(e.r,e.g,e.b):this.pdf.setDrawColor(e.r,e.g,e.b)},fillText:function(t,e,n,r){if(!this._isFillTransparent()){e=this._wrapX(e),n=this._wrapY(n);var i=this._matrix_map_point(this.ctx._transform,[e,n]);e=i[0],n=i[1];var o=this._matrix_rotation(this.ctx._transform),a=57.2958*o;if(this.ctx._clip_path.length>0){var s;s=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.internal.getCurrentPage(),s.push("q");var c=this.path;this.path=this.ctx._clip_path,this.ctx._clip_path=[],this._fill(null,!0),this.ctx._clip_path=this.path,this.path=c}var l;if(l=this.pdf.hotfix&&this.pdf.hotfix.scale_text?this._getTransform()[0]:1,l<.01)this.pdf.text(t,e,this._getBaseline(n),null,a);else{var u=this.pdf.internal.getFontSize();this.pdf.setFontSize(u*l),this.pdf.text(t,e,this._getBaseline(n),null,a),this.pdf.setFontSize(u)}this.ctx._clip_path.length>0&&s.push("Q")}},strokeText:function(t,e,n,r){if(!this._isStrokeTransparent()){e=this._wrapX(e),n=this._wrapY(n);var i=this._matrix_map_point(this.ctx._transform,[e,n]);e=i[0],n=i[1];var o=this._matrix_rotation(this.ctx._transform),a=57.2958*o;if(this.ctx._clip_path.length>0){var s;s=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.internal.getCurrentPage(),s.push("q");var c=this.path;this.path=this.ctx._clip_path,this.ctx._clip_path=[],this._fill(null,!0),this.ctx._clip_path=this.path,this.path=c}var l;if(l=this.pdf.hotfix&&this.pdf.hotfix.scale_text?this._getTransform()[0]:1,1===l)this.pdf.text(t,e,this._getBaseline(n),{stroke:!0},a);else{var u=this.pdf.internal.getFontSize();this.pdf.setFontSize(u*l),this.pdf.text(t,e,this._getBaseline(n),{stroke:!0},a),this.pdf.setFontSize(u)}this.ctx._clip_path.length>0&&s.push("Q")}},setFont:function(t){this.ctx.font=t;var e=/\s*(\w+)\s+(\w+)\s+(\w+)\s+([\d\.]+)(px|pt|em)\s+(.*)?/;if(h=e.exec(t),null!=h){var n=h[1],r=(h[2],h[3]),i=h[4],o=h[5],a=h[6];i="px"===o?Math.floor(parseFloat(i)):"em"===o?Math.floor(parseFloat(i)*this.pdf.getFontSize()):Math.floor(parseFloat(i)),this.pdf.setFontSize(i),"bold"===r||"700"===r?this.pdf.setFontStyle("bold"):"italic"===n?this.pdf.setFontStyle("italic"):this.pdf.setFontStyle("normal");var s,c=a,l=c.toLowerCase().split(/\s*,\s*/);s=l.indexOf("arial")!=-1?"Arial":l.indexOf("verdana")!=-1?"Verdana":l.indexOf("helvetica")!=-1?"Helvetica":l.indexOf("sans-serif")!=-1?"sans-serif":l.indexOf("fixed")!=-1?"Fixed":l.indexOf("monospace")!=-1?"Monospace":l.indexOf("terminal")!=-1?"Terminal":l.indexOf("courier")!=-1?"Courier":l.indexOf("times")!=-1?"Times":l.indexOf("cursive")!=-1?"Cursive":l.indexOf("fantasy")!=-1?"Fantasy":(l.indexOf("serif")!=-1,"Serif");var u;u="bold"===r?"bold":"normal",this.pdf.setFont(s,u)}else{var e=/(\d+)(pt|px|em)\s+(\w+)\s*(\w+)?/,h=e.exec(t);if(null!=h){var f=h[1],c=(h[2],h[3]),u=h[4];u||(u="normal"),f="em"===o?Math.floor(parseFloat(i)*this.pdf.getFontSize()):Math.floor(parseFloat(f)),this.pdf.setFontSize(f),this.pdf.setFont(c,u)}}},setTextBaseline:function(t){this.ctx.textBaseline=t},getTextBaseline:function(){return this.ctx.textBaseline},setTextAlign:function(t){this.ctx.textAlign=t},getTextAlign:function(){return this.ctx.textAlign},setLineWidth:function(t){this.ctx.lineWidth=t,this.pdf.setLineWidth(t)},setLineCap:function(t){this.ctx.lineCap=t,this.pdf.setLineCap(t)},setLineJoin:function(t){this.ctx.lineJoin=t,this.pdf.setLineJoin(t)},moveTo:function(t,e){t=this._wrapX(t),e=this._wrapY(e);var n=this._matrix_map_point(this.ctx._transform,[t,e]);t=n[0],e=n[1];var r={type:"mt",x:t,y:e};this.path.push(r)},_wrapX:function(t){return this.pageWrapXEnabled?t%this.pageWrapX:t},_wrapY:function(t){return this.pageWrapYEnabled?(this._gotoPage(this._page(t)),(t-this.lastBreak)%this.pageWrapY):t},transform:function(t,e,n,r,i,o){this.ctx._transform=[t,e,n,r,i,o]},setTransform:function(t,e,n,r,i,o){this.ctx._transform=[t,e,n,r,i,o]},_getTransform:function(){return this.ctx._transform},lastBreak:0,pageBreaks:[],_page:function(t){if(this.pageWrapYEnabled){this.lastBreak=0;for(var e=0,n=0,r=0;r=this.pageBreaks[r]){e++,0===this.lastBreak&&n++;var i=this.pageBreaks[r]-this.lastBreak;this.lastBreak=this.pageBreaks[r];var o=Math.floor(i/this.pageWrapY);n+=o}if(0===this.lastBreak){var o=Math.floor(t/this.pageWrapY)+1;n+=o}return n+e}return this.pdf.internal.getCurrentPageInfo().pageNumber},_gotoPage:function(t){},lineTo:function(t,e){t=this._wrapX(t),e=this._wrapY(e);var n=this._matrix_map_point(this.ctx._transform,[t,e]);t=n[0],e=n[1];var r={type:"lt",x:t,y:e};this.path.push(r)},bezierCurveTo:function(t,e,n,r,i,o){t=this._wrapX(t),e=this._wrapY(e),n=this._wrapX(n),r=this._wrapY(r),i=this._wrapX(i),o=this._wrapY(o);var a;a=this._matrix_map_point(this.ctx._transform,[i,o]),i=a[0],o=a[1],a=this._matrix_map_point(this.ctx._transform,[t,e]),t=a[0],e=a[1],a=this._matrix_map_point(this.ctx._transform,[n,r]),n=a[0],r=a[1];var s={type:"bct",x1:t,y1:e,x2:n,y2:r,x:i,y:o};this.path.push(s)},quadraticCurveTo:function(t,e,n,r){t=this._wrapX(t),e=this._wrapY(e),n=this._wrapX(n),r=this._wrapY(r);var i;i=this._matrix_map_point(this.ctx._transform,[n,r]),n=i[0],r=i[1],i=this._matrix_map_point(this.ctx._transform,[t,e]),t=i[0],e=i[1];var o={type:"qct",x1:t,y1:e,x:n,y:r};this.path.push(o)},arc:function(t,e,n,r,i,o){if(t=this._wrapX(t),e=this._wrapY(e),!this._matrix_is_identity(this.ctx._transform)){var a=this._matrix_map_point(this.ctx._transform,[t,e]);t=a[0],e=a[1];var s=this._matrix_map_point(this.ctx._transform,[0,0]),c=this._matrix_map_point(this.ctx._transform,[0,n]);n=Math.sqrt(Math.pow(c[0]-s[0],2)+Math.pow(c[1]-s[1],2))}var l={type:"arc",x:t,y:e,radius:n,startAngle:r,endAngle:i,anticlockwise:o};this.path.push(l)},drawImage:function(t,e,n,r,i,o,a,s,c){void 0!==o&&(e=o,n=a,r=s,i=c),e=this._wrapX(e),n=this._wrapY(n);var l,u=this._matrix_map_rect(this.ctx._transform,{x:e,y:n,w:r,h:i}),h=(this._matrix_map_rect(this.ctx._transform,{x:o,y:a,w:s,h:c}),/data:image\/(\w+).*/i),f=h.exec(t);l=null!=f?f[1]:"png",this.pdf.addImage(t,l,u.x,u.y,u.w,u.h)},_matrix_multiply:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=n*t[0]+r*t[2],l=i*t[0]+o*t[2],u=a*t[0]+s*t[2]+t[4];return r=n*t[1]+r*t[3],o=i*t[1]+o*t[3],s=a*t[1]+s*t[3]+t[5],n=c,i=l,a=u,[n,r,i,o,a,s]},_matrix_rotation:function(t){return Math.atan2(t[2],t[0])},_matrix_decompose:function(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=Math.sqrt(e*e+n*n);e/=o,n/=o;var a=e*r+n*i;r-=e*a,i-=n*a;var s=Math.sqrt(r*r+i*i);return r/=s,i/=s,a/=s,e*i0){var t;t=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.internal.getCurrentPage(),t.push("q");var e=this.path;this.path=this.ctx._clip_path,this.ctx._clip_path=[],this._stroke(!0),this.ctx._clip_path=this.path,this.path=e,this._stroke(!1),t.push("Q")}else this._stroke(!1)},_stroke:function(t){if(t||!this._isStrokeTransparent()){for(var e=[],n=!1,r=this.path,i=0;i0){var e;e=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.internal.getCurrentPage(),e.push("q");var n=this.path;this.path=this.ctx._clip_path,this.ctx._clip_path=[],this._fill(t,!0),this.ctx._clip_path=this.path,this.path=n,this._fill(t,!1),e.push("Q")}else this._fill(t,!1)},_fill:function(t,e){if(!this._isFillTransparent()){var r,i="function"==typeof this.pdf.internal.newObject2;r=window.outIntercept?"group"===window.outIntercept.type?window.outIntercept.stream:window.outIntercept:this.internal.getCurrentPage();var o=[],a=window.outIntercept;if(i)switch(this.ctx.globalCompositeOperation){case"normal":case"source-over":break;case"destination-in":case"destination-out":var s=this.pdf.internal.newStreamObject(),c=this.pdf.internal.newObject2();c.push("<>"),c.push(">>");var l="MASK"+c.objId;this.pdf.internal.addGraphicsState(l,c.objId);var u="/"+l+" gs";r.splice(0,0,"q"),r.splice(1,0,u),r.push("Q"),window.outIntercept=s;break;default:var h="/"+this.pdf.internal.blendModeMap[this.ctx.globalCompositeOperation.toUpperCase()];h&&this.pdf.internal.out(h+" gs")}var f=this.ctx.globalAlpha;if(this.ctx._fillOpacity<1&&(f=this.ctx._fillOpacity),i){var d=this.pdf.internal.newObject2();d.push("<>");var l="GS_O_"+d.objId;this.pdf.internal.addGraphicsState(l,d.objId),this.pdf.internal.out("/"+l+" gs")}for(var p=this.path,g=0;g>"),n.push(">>");var r="MASK"+n.objId;this.pdf.internal.addGraphicsState(r,n.objId);var i="/"+r+" gs";this.pdf.internal.out(i)},clip:function(){if(this.ctx._clip_path.length>0)for(var t=0;to)&&(s%=o),s<0&&(s=o+s);e>n;)e-=o;var c=Math.abs(n-e);ci;){var f=u*Math.min(c,a),d=h+f;l.push(this.createSmallArc(t,h,d)),c-=Math.abs(d-h),h=d}return l},n.internal.getCurrentPage=function(){return this.pdf.internal.pages[this.pdf.internal.getCurrentPageInfo().pageNumber]},n.internal.createSmallArc=function(t,e,n){var r=(n-e)/2,i=t*Math.cos(r),o=t*Math.sin(r),a=i,s=-o,c=a*a+s*s,l=c+a*i+s*o,u=4/3*(Math.sqrt(2*c*l)-l)/(a*o-s*i),h=a-u*s,f=s+u*a,d=h,p=-f,g=r+e,m=Math.cos(g),w=Math.sin(g);return{x1:t*Math.cos(e),y1:t*Math.sin(e),x2:h*m-f*w,y2:h*w+f*m,x3:d*m-p*w,y3:d*w+p*m,x4:t*Math.cos(n),y4:t*Math.sin(n)}},this}(e.API),/** @preserve * jsPDF fromHTML plugin. BETA stage. API subject to change. Needs browser * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com * 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria * 2014 Diego Casorran, https://github.com/diegocr * 2014 Daniel Husar, https://github.com/danielhusar * 2014 Wolfgang Gassler, https://github.com/woolfg * 2014 Steven Spungin, https://github.com/flamenco * * * ==================================================================== */ function(e){var n,r,i,a,s,c,l,u,h,f,d,p,g,m,w,y,v,b,x,k;n=function(){function t(){}return function(e){return t.prototype=e,new t}}(),f=function(t){var e,n,r,i,o,a,s;for(n=0,r=t.length,e=void 0,i=!1,a=!1;!i&&n!==r;)e=t[n]=t[n].trimLeft(),e&&(i=!0),n++;for(n=r-1;r&&!a&&n!==-1;)e=t[n]=t[n].trimRight(),e&&(a=!0),n--;for(o=/\s+$/g,s=!0,n=0;n!==r;)"\u2028"!=t[n]&&(e=t[n].replace(/\s+/g," "),s&&(e=e.trimLeft()),e&&(s=o.test(e)),t[n]=e),n++;return t},d=function(t,e,n,r){return this.pdf=t,this.x=e,this.y=n,this.settings=r,this.watchFunctions=[],this.init(),this},p=function(t){var e,n,r;for(e=void 0,r=t.split(","),n=r.shift();!e&&n;)e=i[n.trim().toLowerCase()],n=r.shift();return e},g=function(t){t="auto"===t?"0px":t,t.indexOf("em")>-1&&!isNaN(Number(t.replace("em","")))&&(t=18.719*Number(t.replace("em",""))+"px"),t.indexOf("pt")>-1&&!isNaN(Number(t.replace("pt","")))&&(t=1.333*Number(t.replace("pt",""))+"px");var e,n,r;return n=void 0,e=16,(r=m[t])?r:(r={"xx-small":9,"x-small":11,small:13,medium:16,large:19,"x-large":23,"xx-large":28,auto:0}[{css_line_height_string:t}],r!==n?m[t]=r/e:(r=parseFloat(t))?m[t]=r/e:(r=t.match(/([\d\.]+)(px)/),3===r.length?m[t]=parseFloat(r[1])/e:m[t]=1))},h=function(t){var e,n,r;return r=function(t){var e;return e=function(t){return document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(t,null):t.currentStyle?t.currentStyle:t.style}(t),function(t){return t=t.replace(/-\D/g,function(t){return t.charAt(1).toUpperCase()}),e[t]}}(t),e={},n=void 0,e["font-family"]=p(r("font-family"))||"times",e["font-style"]=a[r("font-style")]||"normal",e["text-align"]=s[r("text-align")]||"left",n=c[r("font-weight")]||"normal","bold"===n&&("normal"===e["font-style"]?e["font-style"]=n:e["font-style"]=n+e["font-style"]),e["font-size"]=g(r("font-size"))||1,e["line-height"]=g(r("line-height"))||1,e.display="inline"===r("display")?"inline":"block",n="block"===e.display,e["margin-top"]=n&&g(r("margin-top"))||0,e["margin-bottom"]=n&&g(r("margin-bottom"))||0,e["padding-top"]=n&&g(r("padding-top"))||0,e["padding-bottom"]=n&&g(r("padding-bottom"))||0,e["margin-left"]=n&&g(r("margin-left"))||0,e["margin-right"]=n&&g(r("margin-right"))||0,e["padding-left"]=n&&g(r("padding-left"))||0,e["padding-right"]=n&&g(r("padding-right"))||0,e["page-break-before"]=r("page-break-before")||"auto",e.float=l[r("cssFloat")]||"none",e.clear=u[r("clear")]||"none",e.color=r("color"),e},w=function(t,e,n){var r,i,o,a,s;if(o=!1,i=void 0,a=void 0,s=void 0,r=n["#"+t.id])if("function"==typeof r)o=r(t,e);else for(i=0,a=r.length;!o&&i!==a;)o=r[i](t,e),i++;if(r=n[t.nodeName],!o&&r)if("function"==typeof r)o=r(t,e);else for(i=0,a=r.length;!o&&i!==a;)o=r[i](t,e),i++;return o},k=function(t,e){var n,r,i,o,a,s,c,l,u,h;for(n=[],r=[],i=0,h=t.rows[0].cells.length,l=t.clientWidth;ii.pdf.margins_doc.top&&(i.pdf.addPage(),i.y=i.pdf.margins_doc.top,i.executeWatchFunctions(a));var I=h(a),E=i.x,O=12/i.pdf.internal.scaleFactor,F=(I["margin-left"]+I["padding-left"])*O,R=(I["margin-right"]+I["padding-right"])*O,B=(I["margin-top"]+I["padding-top"])*O,D=(I["margin-bottom"]+I["padding-bottom"])*O;E+=void 0!==I.float&&"right"===I.float?i.settings.width-a.width-R:F,i.pdf.addImage(T,E,i.y+B,a.width,a.height),T=void 0,"right"===I.float||"left"===I.float?(i.watchFunctions.push(function(t,e,n,r){return i.y>=e?(i.x+=t,i.settings.width+=n,!0):!!(r&&1===r.nodeType&&!_[r.nodeName]&&i.x+r.width>i.pdf.margins_doc.left+i.pdf.margins_doc.width)&&(i.x+=t,i.y=e,i.settings.width+=n,!0)}.bind(this,"left"===I.float?-a.width-F-R:0,i.y+a.height+B+D,a.width)),i.watchFunctions.push(function(t,e,n){return!(i.y0){i=i[0];var o=e.pdf.internal.write,a=e.y;e.pdf.internal.write=function(){},r(i,e,n);var s=Math.ceil(e.y-a)+5;e.y=a,e.pdf.internal.write=o,e.pdf.margins_doc.bottom+=s;for(var c=function(t){var o=void 0!==t?t.pageNumber:1,a=e.y;e.y=e.pdf.internal.pageSize.height-e.pdf.margins_doc.bottom,e.pdf.margins_doc.bottom-=s;for(var c=i.getElementsByTagName("span"),l=0;l-1&&(c[l].innerHTML=o),(" "+c[l].className+" ").replace(/[\n\t]/g," ").indexOf(" totalPages ")>-1&&(c[l].innerHTML="###jsPDFVarTotalPages###");r(i,e,n),e.pdf.margins_doc.bottom+=s,e.y=a},l=i.getElementsByTagName("span"),u=0;u-1&&e.pdf.internal.events.subscribe("htmlRenderingFinished",e.pdf.putTotalPages.bind(e.pdf,"###jsPDFVarTotalPages###"),!0);e.pdf.internal.events.subscribe("addPage",c,!1),c(),_.FOOTER=1}},x=function(t,e,n,i,o,a){if(!e)return!1;"string"==typeof e||e.parentNode||(e=""+e.innerHTML),"string"==typeof e&&(e=function(t){var e,n,r,i;return r="jsPDFhtmlText"+Date.now().toString()+(1e3*Math.random()).toFixed(0),i="position: absolute !important;clip: rect(1px 1px 1px 1px); /* IE6, IE7 */clip: rect(1px, 1px, 1px, 1px);padding:0 !important;border:0 !important;height: 1px !important;width: 1px !important; top:auto;left:-100px;overflow: hidden;",n=document.createElement("div"),n.style.cssText=i,n.innerHTML='