@progress/kendo-charts 1.23.0-dev.202201120958 → 1.23.0-dev.202201170823
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +119 -79
- package/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/map/navigator.js +3 -3
- package/dist/es/map/zoom.js +1 -1
- package/dist/es2015/map/navigator.js +3 -3
- package/dist/es2015/map/zoom.js +1 -1
- package/dist/npm/main.js +5 -5
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(ix){var n;return{setters:[function(t){n=t.__useDefault?t.default:t}],execute:function(){function i(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var o,r;r={},i.m=o=[function(t,e){t.exports=n},function(t,e,o){"use strict";o.r(e);var i={};o.d(i,"NAVIGATOR_AXIS",function(){return $l}),o.d(i,"NAVIGATOR_PANE",function(){return Kl});var d="arc",r="#000",w="bottom",C="center",u="circle",y="date",g=10,s=/\{\d+:?/,S="left",l=Number.MAX_VALUE,c=-Number.MAX_VALUE,n="none",k="right",f="string",A="top",p="value",a="#fff",v="x",m="y";function x(t){return Array.isArray(t)}function _(t,e){for(var o=x(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var h=/\s+/g;function b(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(h," "))}var P=o(0);function T(t){var e=.5;t.options.stroke&&P.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var o=0;o<t.segments.length;o++)t.segments[o].anchor().round(0).translate(e,e);return t}function M(t,e){return-t.x*e.y+t.y*e.x<0}function O(t){return"number"==typeof t&&!isNaN(t)}function B(t){return typeof t===f}function R(t){return O(t)||B(t)&&isFinite(t)}function E(t){return"function"==typeof t}var L="object",I="undefined";function z(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)!function t(e,o){for(var i in o){var r,n=o[i],s=typeof n;(r=s===L&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[i]=new Date(n.getTime()):E(n.clone)?e[i]=n.clone():(r=e[i],e[i]=typeof r===L&&r||{},t(e[i],n)):s!==I&&(e[i]=n)}return e}(t,e[i]);return t}function V(t){return"object"==typeof t}function j(t){return O(t)?t+"px":t}var D=/width|height|top|left|bottom|right/i;function H(t,e){var o=B(e)?[e]:e;if(x(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=D.test(s)?parseFloat(r[s]):r[s]}return i}if(V(e))for(var a in e)t.style[a]=j(e[a])}function U(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[A]=o[k]=o[w]=o[S]=t:(o[A]=t[A]||e,o[k]=t[k]||e,o[w]=t[w]||e,o[S]=t[S]||e),o}function F(){}var N={compile:function(t){return t}};F.register=function(t){N=t},F.compile=function(t){return N.compile(t)};var G=F;function W(t){var e;return(t=void 0===t?{}:t).template?t.template=e=G.compile(t.template):E(t.content)&&(e=t.content),e}var X=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,q={};function Y(t){if(q[t])return q[t];var r=[];return t.replace(X,function(t,e,o,i){r.push(P.drawing.util.defined(e)?e:o||i)}),q[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e},q[t]}function Z(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function Q(t,e){if(t.className)for(var o=e.split(" "),i=0;i<o.length;i++)if(-1!==t.className.indexOf(o[i]))return!0}q[void 0]=function(t){return t};function K(){this._map={}}K.prototype.get=function(t){return this._map[this._key(t)]},K.prototype.set=function(t,e){this._map[this._key(t)]=e},K.prototype._key=function(t){return t instanceof Date?t.getTime():t};var $=K;function J(t,e){if(e)return-1!==e.indexOf(t)}function tt(t,e,o){return P.drawing.util.round(t+(e-t)*o,3)}function et(t,e){this.observer=t,this.handlerMap=z({},this.handlerMap,e)}et.prototype.trigger=function(t,e){var o,i=this.observer,r=this.handlerMap;return r[t]?o=this.callObserver(r[t],e):i.trigger&&(o=this.callObserver("trigger",t,e)),o},et.prototype.callObserver=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];return this.observer[t].apply(this.observer,e)},et.prototype.requiresHandlers=function(t){if(this.observer.requiresHandlers)return this.observer.requiresHandlers(t);for(var e=0;e<t.length;e++)if(this.handlerMap[t[e]])return!0};var ot=et;function it(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);P.drawing.util.defined(n)&&i.push(n)}return i}var rt=P.support.browser||{};function nt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,rt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function st(){}var at=P.drawing.util,ht=at.append,pt=at.bindEvents,lt=at.defined,ct=at.deg,ut=at.elementOffset,dt=at.elementSize,ft=at.eventCoordinates,gt=at.eventElement,yt=at.hashKey,vt=at.last,mt=at.limitValue,xt=at.objectKey,_t=at.rad,bt=at.round,wt=at.unbindEvents,Ct=at.valueOrDefault;st.fetchFonts=function(o,i,r){void 0===r&&(r={depth:0}),!o||5<r.depth||!document.fonts||Object.keys(o).forEach(function(t){var e=o[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?i.push(e):"object"==typeof e&&(r.depth++,st.fetchFonts(e,i,r),r.depth--))})},st.loadFonts=function(t,e){var o=[];if(0<t.length&&document.fonts){try{o=t.map(function(t){return document.fonts.load(t)})}catch(t){Object(P.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},st.preloadFonts=function(t,e){var o=[];st.fetchFonts(t,o),st.loadFonts(o,e)};var St=st;function kt(t,e){t=t.prototype;t.options?t.options=z({},t.options,e):t.options=e}function At(t){for(var e=l,o=c,i=0,r=t.length;i<r;i++){var n=t[i];null!==n&&isFinite(n)&&(e=Math.min(e,n),o=Math.max(o,n))}return{min:e===l?void 0:e,max:o===c?void 0:o}}function Pt(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Tt=P.geometry.Matrix,Mt=/matrix\((.*)\)/;function Ot(t){var e=getComputedStyle(t).transform;return"none"===e?Tt.unit():function(){var t=e.match(Mt);if(null===t||2!==t.length)return Tt.unit();t=t[1].split(",").map(function(t){return parseFloat(t)});return new(Function.prototype.bind.apply(Tt,[null].concat(t)))}()}function Bt(t){if(!t)return Tt.unit();for(var e=Ot(t),o=t.parentElement;o;)var i=Ot(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}function Rt(t){return new P.Color(t).isDark()?a:r}function Et(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e}var Lt={},It={size:{configurable:!0}};Et.prototype.values=function(){return this._values.filter(function(t){return t!==Lt})},Et.prototype.has=function(t){return void 0!==this._index[t]},Et.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Et.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Lt,delete this._index[t])},Et.prototype.clear=function(){this._index={},this._values=[]},It.size.get=function(){return this._values.length},Object.defineProperties(Et.prototype,It);function zt(t){this._set=new Set(t)}var Vt={size:{configurable:!0}};zt.prototype.values=function(){return Array.from(this._set)},zt.prototype.has=function(t){return this._set.has(t)},zt.prototype.add=function(t){this._set.add(t)},zt.prototype.delete=function(t){this._set.delete(t)},zt.prototype.clear=function(){this._set.clear()},Vt.size.get=function(){return this._set.size},Object.defineProperties(zt.prototype,Vt);function jt(t){return e=!1,new((e="function"==typeof Set?new Set([1]).has(1):e)?zt:Et)(t);var e}function Dt(t){throw t}var Ht={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110};function Ut(t,e){t=bt(e-t,9);if(0===t){if(0===e)return.1;t=Math.abs(e)}e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))),t=bt(t/e,g);return bt(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),g)}var Ft,Nt=((Ft=P.Class)&&(Gt.__proto__=Ft),((Gt.prototype=Object.create(Ft&&Ft.prototype)).constructor=Gt).prototype.clone=function(){return new Gt(this.x,this.y)},Gt.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Gt.prototype.rotate=function(t,e){var o=_t(e),i=Math.cos(o),r=Math.sin(o),n=t.x,e=t.y,o=this.x,t=this.y;return this.x=bt(n+(o-n)*i+(t-e)*r,3),this.y=bt(e+(t-e)*i-(o-n)*r,3),this},Gt.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Gt.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Gt.onCircle=function(t,e,o){e=_t(e);return new Gt(t.x-o*Math.cos(e),t.y-o*Math.sin(e))},Gt);function Gt(t,e){Ft.call(this),this.x=t||0,this.y=e||0}function Wt(t,e,o,i,r){r=_t(r);return new Nt(o+(t-o)*Math.cos(r)+(e-i)*Math.sin(r),i-(t-o)*Math.sin(r)+(e-i)*Math.cos(r))}var Xt,qt=((Xt=P.Class)&&(Yt.__proto__=Xt),((Yt.prototype=Object.create(Xt&&Xt.prototype)).constructor=Yt).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},Yt.prototype.width=function(){return this.x2-this.x1},Yt.prototype.height=function(){return this.y2-this.y1},Yt.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},Yt.prototype.move=function(t,e){var o=this.height(),i=this.width();return lt(t)&&(this.x1=t,this.x2=this.x1+i),lt(e)&&(this.y1=e,this.y2=this.y1+o),this},Yt.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},Yt.prototype.wrapPoint=function(t){var e=x(t),o=e?t[0]:t.x,t=e?t[1]:t.y;return this.wrap(new Yt(o,t,o,t)),this},Yt.prototype.snapTo=function(t,e){return e!==v&&e||(this.x1=t.x1,this.x2=t.x2),e!==m&&e||(this.y1=t.y1,this.y2=t.y2),this},Yt.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===A||e===w?m:v,a=s==m?r:n;return e===C?(o=t.center(),i=this.center(),this.x1+=o.x-i.x,this.y1+=o.y-i.y):this[s+1]=e===A||e===S?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},Yt.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},Yt.prototype.expand=function(t,e){return this.shrink(-t,-e),this},Yt.prototype.pad=function(t){t=U(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},Yt.prototype.unpad=function(t){t=U(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},Yt.prototype.clone=function(){return new Yt(this.x1,this.y1,this.x2,this.y2)},Yt.prototype.center=function(){return new Nt(this.x1+this.width()/2,this.y1+this.height()/2)},Yt.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},Yt.prototype.points=function(){return[new Nt(this.x1,this.y1),new Nt(this.x2,this.y1),new Nt(this.x2,this.y2),new Nt(this.x1,this.y2)]},Yt.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},Yt.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},Yt.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,n=i.y,s=Wt(0,0,r,n,t),a=Wt(e,0,r,n,t),i=Wt(e,o,r,n,t),t=Wt(0,o,r,n,t),e=Math.max(s.x,a.x,i.x,t.x)-Math.min(s.x,a.x,i.x,t.x),o=Math.max(s.y,a.y,i.y,t.y)-Math.min(s.y,a.y,i.y,t.y);return this.x2=this.x1+e,this.y2=this.y1+o,this},Yt.prototype.toRect=function(){return new P.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},Yt.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},Yt.prototype.align=function(t,e,o){var i=e+1,r=e+2,n=e===v?"width":"height",e=this[n]();J(o,[S,A])?(this[i]=t[i],this[r]=this[i]+e):J(o,[k,w])?(this[r]=t[r],this[i]=this[r]-e):o===C&&(this[i]=t[i]+(t[n]()-e)/2,this[r]=this[i]+e)},Yt);function Yt(t,e,o,i){Xt.call(this),this.x1=t||0,this.y1=e||0,this.x2=o||0,this.y2=i||0}function Zt(t,e){return t-e}var Qt,Kt,$t,Jt=(($t=P.Class)&&(re.__proto__=$t),((re.prototype=Object.create($t&&$t.prototype)).constructor=re).prototype.clone=function(){return new re(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},re.prototype.middle=function(){return this.startAngle+this.angle/2},re.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},re.prototype.point=function(t,e){var o=_t(t),t=Math.cos(o),o=Math.sin(o),e=e?this.innerRadius:this.radius,t=bt(this.center.x-t*e,3),e=bt(this.center.y-o*e,3);return new Nt(t,e)},re.prototype.adjacentBox=function(t,e,o){var i=this.clone().expand(t),r=i.middle(),n=i.point(r),s=e/2,a=o/2,t=Math.sin(_t(r)),i=Math.cos(_t(r)),r=n.x-s,n=n.y-a;return Math.abs(t)<.9&&(r+=s*-i/Math.abs(i)),Math.abs(i)<.9&&(n+=a*-t/Math.abs(t)),new qt(r,n,r+e,n+o)},re.prototype.containsPoint=function(t){var e=this.center,o=this.innerRadius,i=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,t=new Nt(s,a),r=this.point(r),r=new Nt(r.x-e.x,r.y-e.y),n=this.point(n),e=new Nt(n.x-e.x,n.y-e.y),a=bt(s*s+a*a,3);return(r.equals(t)||M(r,t))&&!M(e,t)&&o*o<=a&&a<=i*i},re.prototype.getBBox=function(){for(var t=new qt(l,l,c,c),e=bt(this.startAngle%360),o=bt((e+this.angle)%360),i=this.innerRadius,r=[0,90,180,270,e,o].sort(Zt),n=r.indexOf(e),s=r.indexOf(o),a=e===o?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),h=0;h<a.length;h++){var p=this.point(a[h]);t.wrapPoint(p),t.wrapPoint(p,i)}return i||t.wrapPoint(this.center),t},re.prototype.expand=function(t){return this.radius+=t,this},re),te=((Kt=Jt)&&(ie.__proto__=Kt),((ie.prototype=Object.create(Kt&&Kt.prototype)).constructor=ie).prototype.expand=function(t){return Kt.prototype.expand.call(this,t)},ie.prototype.clone=function(){return new ie(this.center,this.radius,this.startAngle,this.angle)},ie.prototype.setRadius=function(t){return this.radius=t,this},ie),ee=((Qt=P.Class)&&(oe.__proto__=Qt),((oe.prototype=Object.create(Qt&&Qt.prototype)).constructor=oe).prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o;0<t.angle&&o===i&&(i+=.001);var r=new P.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new P.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),e=P.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(i),e.lineTo(n.x,n.y),e.arc(i,o,t,t,!0)):e.lineTo(r.x,r.y),e},oe);function oe(){Qt.apply(this,arguments)}function ie(t,e,o,i){Kt.call(this,t,0,e,o,i)}function re(t,e,o,i,r){$t.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}ee.current=new ee;var ne,se=ee,ae=((ne=P.Class)&&(he.__proto__=ne),((he.prototype=Object.create(ne&&ne.prototype)).constructor=he).prototype.initUserOptions=function(t){return t},he.prototype.reflow=function(t){for(var e,o=this.children,i=0;i<o.length;i++){var r=o[i];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},he.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},he.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},he.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},he.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},he.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},he.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},he.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},he.prototype.addVisual=function(){this.visual&&((this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual))},he.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},he.prototype.createVisual=function(){this.visual=new P.drawing.Group({zIndex:this.options.zIndex,visible:Ct(this.options.visible,!0)})},he.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=P.drawing.Animation.create(this.visual,this.options.animation))},he.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):lt(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},he.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},he.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},he.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,o=this.visual.children,i=o.length,r=0;r<i;r++){var n=o[r];if(Ct(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},he.prototype.traverse=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++){var r=e[i];t(r),r.traverse&&r.traverse(t)}},he.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},he.prototype.renderComplete=function(){},he.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},he.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:a,opacity:e||.2},stroke:{color:a,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return o.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);lt(n.options.zIndex)||(n.options.zIndex=Ct(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},he.prototype.createGradientOverlay=function(t,e,o){e=new P.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return e.segments.elements(t.segments.elements()),e},he.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},he.prototype.supportsPointInactiveOpacity=function(){return!0},he);function he(t){ne.call(this),this.children=[],this.options=z({},this.options,this.initUserOptions(t))}ae.prototype.options={};var pe,le=ae,ce=((pe=le)&&(ue.__proto__=pe),((ue.prototype=Object.create(pe&&pe.prototype)).constructor=ue).prototype.reflow=function(t){function e(){i.align(t,v,r.align),i.align(t,m,r.vAlign),i.paddingBox=o.clone().unpad(p).unpad(c)}var o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,h=n&&s,p=r.margin,l=r.padding,c=r.border.width,u=t.clone();h&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(p).unpad(c).unpad(l),pe.prototype.reflow.call(this,u),o=h?this.box=new qt(0,0,n,s):this.box,a&&h?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=o.clone(),o.pad(l).pad(c).pad(p),e()),this.translateChildren(o.x1-u.x1+p.left+c+l.left,o.y1-u.y1+p.top+c+l.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},ue.prototype.align=function(t,e,o){this.box.align(t,e,o)},ue.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},ue.prototype.createVisual=function(){pe.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(P.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},ue.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:Ct(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},ue);function ue(t){pe.call(this,t),this.options.margin=U(this.options.margin),this.options.padding=U(this.options.padding)}kt(ce,{align:S,vAlign:A,margin:{},padding:{},border:{color:r,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var de,fe=ce,ge=((de=fe)&&(ye.__proto__=de),((ye.prototype=Object.create(de&&de.prototype)).constructor=ye).prototype.getElement=function(){var t=this.options,e=this.paddingBox,o=t.type,i=t.rotation,r=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var a,h=this.visualStyle();return o===u?a=new P.drawing.Circle(new P.geometry.Circle([bt(e.x1+n,3),bt(e.y1+s,3)],Math.min(n,s)),h):"triangle"===o?a=P.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],h).close():"cross"===o?((a=new P.drawing.MultiPath(h)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):(e=e.toRect(),"roundedRect"===o&&(o=Ct(t.borderRadius,e.width()/5),e.setCornerRadius(o)),a=P.drawing.Path.fromRect(e,h)),i&&a.transform(P.geometry.transform().rotate(-i,[r.x,r.y])),a.options.zIndex=t.zIndex,a},ye.prototype.createElement=function(){var t=this,e=this.options.visual,o=this.pointData||{};return e?e({value:o.value,dataItem:o.dataItem,sender:this.getSender(),series:o.series,category:o.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},ye.prototype.visualOptions=function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},ye.prototype.createVisual=function(){this.visual=this.createElement()},ye);function ye(t,e){de.call(this,t),this.pointData=e}kt(ge,{type:u,align:C,vAlign:C});var ve=ge,me={glass:{type:"linear",rotation:0,stops:[{offset:0,color:a,opacity:0},{offset:.25,color:a,opacity:.3},{offset:1,color:a,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:.2},{offset:.15,color:a,opacity:.15},{offset:.17,color:a,opacity:.35},{offset:.85,color:a,opacity:.05},{offset:.87,color:a,opacity:.15},{offset:.99,color:a,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};var xe,_e=((xe=le)&&(be.__proto__=xe),((be.prototype=Object.create(xe&&xe.prototype)).constructor=be).prototype.reflow=function(){var t=this.options,e=this.children,o=new qt(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i=0;i<e.length;i++)e[i].reflow(o),o=function(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var o=Math.min(t.x1,e.x1),i=Math.max(t.x1,e.x1),r=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),h=Math.min(t.y2,e.y2),p=Math.max(t.y2,e.y2),l=[];return l[0]=new qt(i,s,r,a),l[1]=new qt(o,a,i,h),l[2]=new qt(r,a,n,h),l[3]=new qt(i,h,r,p),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(l[4]=new qt(o,s,i,a),l[5]=new qt(r,h,n,p)):(l[4]=new qt(r,s,n,a),l[5]=new qt(o,h,i,p)),Z(l,function(t){return 0<t.height()&&0<t.width()})[0]}(o,e[i].box)||new qt},be.prototype.createVisual=function(){this.visual=new P.drawing.Group,this.createBackground()},be.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),t=P.drawing.Path.fromRect(o.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(t)},be.prototype.getRoot=function(){return this},be.prototype.createGradient=function(t){var e,s,o=this.gradients,i=xt(t),r=me[t.gradient];return o[i]?e=o[i]:(s=Object.assign({},r,t),"linear"===r.type?e=new P.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,o=t.length,i=[],r=0;r<o;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,i.push(n)}return i}()),(e=new P.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),o[i]=e),e},be.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},be.prototype.size=function(){var t=this.options;return new qt(0,0,t.width,t.height)},be);function be(t){xe.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}kt(_e,{width:600,height:400,background:a,border:{color:r,width:0},margin:U(5),zIndex:-2});var we,Ce=_e,Se=((we=le)&&(ke.__proto__=we),((ke.prototype=Object.create(we&&we.prototype)).constructor=ke).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=v,this.elementAxis=m,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=m,this.elementAxis=v,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},ke.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},ke.prototype.reflowChildren=function(){var t=this.box,e=this.elementAxis,o=this.groupAxis,i=this.elementSizeField,r=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,h=n.maxGroupElementsSize,p=s.length,n=t[o+1]+this.alignStart(a,t[r]());if(p){for(var l=n,c=0;c<p;c++){for(var u=s[c],d=u.groupElements,f=t[e+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[r],u.groupSize),_=new qt;_[o+1]=x,_[o+2]=x+m[r],_[e+1]=f,_[e+2]=f+m[i],v.reflow(_),f+=m[i]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}t[o+1]=n,t[o+2]=n+a,t[e+2]=t[e+1]+h}},ke.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===k||i===w?o=e-t:i===C&&(o=(e-t)/2),o},ke.prototype.groupOptions=function(){for(var t=this.box,e=this.children,o=this.elementSizeField,i=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=bt(t[o]()),a=e.length,h=[],p=0,l=0,c=0,u=0,d=[],f=0;f<a;f++){var g=e[f];g.box||g.reflow(t);var y=this.elementSize(g);this.options.wrap&&bt(l+r+y[o])>s&&(h.push({groupElements:d,groupSize:p,groupElementsSize:l}),u=Math.max(u,l),c+=n+p,l=p=0,d=[]),p=Math.max(p,y[i]),0<l&&(l+=r),l+=y[o],d.push(g)}return h.push({groupElements:d,groupSize:p,groupElementsSize:l}),{groups:h,groupsSize:c+=p,maxGroupElementsSize:u=Math.max(u,l)}},ke.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},ke.prototype.createVisual=function(){},ke);function ke(t){we.call(this,t),this._initDirection()}kt(Se,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var Ae,Pe=Se,Te=P.drawing.Text,Me=((Ae=le)&&(Oe.__proto__=Ae),((Oe.prototype=Object.create(Ae&&Ae.prototype)).constructor=Oe).prototype.reflow=function(t){var e=this.options,e=e.size=P.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new qt(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},Oe.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new Te(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},Oe);function Oe(t,e){Ae.call(this,e),this.content=t,this.reflow(new qt)}kt(Me,{font:"12px sans-serif",color:r});var Be=Me;function Re(t){var e=t.origin,t=t.bottomRight();return new qt(e.x,e.y,t.x,t.y)}var Ee,Le,Ie=/\n/m,ze=((Le=fe)&&(De.__proto__=Le),((De.prototype=Object.create(Le&&Le.prototype)).constructor=De).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Ie),o=new Pe({vertical:!0,align:t.align,wrap:!1}),i=z({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new Be(e[r].trim(),i);o.append(n)}},De.prototype.reflow=function(t){var e,o=this.options,i=o.visual;this.container.options.align=o.align,i&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(i=this.visual=i(this.visualContext(e)))&&(e=Re(i.clippedBBox()||new P.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(Le.prototype.reflow.call(this,t),o.rotation&&(e=U(o.margin),o=this.box.unpad(e),this.targetBox=t,this.normalBox=o.clone(),(o=this.rotate()).translate(e.left-e.right,e.top-e.bottom),this.rotatedBox=o.clone(),o.pad(e)))},De.prototype.createVisual=function(){var t=this.options;this.visual=new P.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=P.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},De.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!lt(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):Le.prototype.renderVisual.call(this))},De.prototype.visualContext=function(t){var e=this,o={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(o,this.data),o},De.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},De.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,v,t.align),this.align(this.targetBox,m,t.vAlign),this.box},De.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,i=e.y,e=this.rotatedBox.center();return P.geometry.transform().translate(e.x-o,e.y-i).rotate(t,[o,i])},De),Ve=((Ee=le)&&(je.__proto__=Ee),((je.prototype=Object.create(Ee&&Ee.prototype)).constructor=je).prototype.reflow=function(t){Ee.prototype.reflow.call(this,t),this.box.snapTo(t,v)},je.buildTitle=function(t,e,o){var i,t="string"==typeof t?{text:t}:t;return(t=Object.assign({visible:!0},o,t))&&t.visible&&t.text&&(i=new je(t),e.append(i)),i},je);function je(t){Ee.call(this,t),this.append(new ze(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}function De(t,e,o){Le.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new qt)}kt(Ve,{color:r,position:A,align:C,margin:U(5),padding:U(5)});var He,Ue=Ve,Fe=((He=ze)&&(Ne.__proto__=He),((Ne.prototype=Object.create(He&&He.prototype)).constructor=Ne).prototype.visualContext=function(t){t=He.prototype.visualContext.call(this,t);return t.value=this.value,t.dataItem=this.dataItem,t.format=this.options.format,t.culture=this.options.culture,t},Ne.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:gt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},Ne.prototype.rotate=function(){var t,e;return this.options.alignRotation!==C?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Re(t.bbox(e.matrix()))):He.prototype.rotate.call(this),this.box},Ne.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===C)return He.prototype.rotationTransform.call(this);var o=P.geometry.transform().rotate(e).matrix(),i=this.normalBox.toRect(),r=this.targetBox.toRect(),n=t.rotationOrigin||A,s=n===A||n===w?v:m,a=n===A||n===w?m:v,h=n===A||n===S?r.origin:r.bottomRight(),p=i.topLeft().transformCopy(o),l=i.topRight().transformCopy(o),t=i.bottomRight().transformCopy(o),n=i.bottomLeft().transformCopy(o),i=P.geometry.Rect.fromPoints(p,l,t,n),o={};o[a]=r.origin[a]-i.origin[a];var i=Math.abs(p[a]+o[a]-h[a]),a=Math.abs(l[a]+o[a]-h[a]),n=bt(i,g)===bt(a,g)?(c=p,l):a<i?(c=l,t):(c=p,n),c=c[s]+(n[s]-c[s])/2;return o[s]=r.center()[s]-c,P.geometry.transform().translate(o.x,o.y).rotate(e)},Ne);function Ne(t,e,o,i,r){He.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new qt)}kt(Fe,{_autoReflow:!1});var Ge,We=Fe,Xe=((Ge=fe)&&(qe.__proto__=Ge),((qe.prototype=Object.create(Ge&&Ge.prototype)).constructor=qe).prototype.hide=function(){this.options.visible=!1},qe.prototype.show=function(){this.options.visible=!0},qe.prototype.render=function(){var t,e,o,i,r,n,s,a,h=this,p=this.options;p.visible&&(o=p.label,a=p.icon,i=new qt,r=function(){return h},n=a.size,s=this.fields.text,lt(o)&&o.visible&&((p=W(o))?s=p(this.fields):o.format&&(s=this.chartService.format.auto(o.format,s)),o.color||(o.color="inside"===o.position?"#fff":a.background),this.label=new ze(s,z({},o)),this.label.aliasFor=r,"inside"!==o.position||lt(n)||(a.type===u?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),i.wrap(this.label.box))),a.width=t||n||7,a.height=e||n||7,(a=new ve(z({},a))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new qt),this.wrapperBox=i.wrap(a.box))},qe.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,h=t.center(),p=r.line.length,l=r.position;r.visible&&(J(l,[S,k])?l===S?(i=a.alignTo(t,l).translate(-p,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,h.y],this.linePoints=[e,[i.x2,h.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(p,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,h.y],this.linePoints=[e,[i.x1,h.y]],o=i.clone().wrapPoint(e))):l===w?(i=a.alignTo(t,l).translate(t.center().x-a.center().x,p),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(t.center().x-a.center().x,-p),r.line.visible&&(e=[h.x,t.y1],this.linePoints=[e,[h.x,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s&&("outside"===r.label.position&&n.box.alignTo(s.box,l),n.reflow(n.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},qe.prototype.createVisual=function(){Ge.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},qe.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;t.visible&&o?(this.visual=o(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:t.background,border:t.background,icon:t.icon,label:t.label,line:t.line,position:t.position,visible:t.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):Ge.prototype.renderVisual.call(this)},qe.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(T(t=P.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},qe.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},qe.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},qe.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},qe.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:gt(t),text:lt(e.label)?e.label.text:"",visual:this.visual})},qe);function qe(t,e,o){Ge.call(this,e),this.fields=t,this.chartService=o,this.render()}kt(Xe,{icon:{visible:!0,type:u},label:{position:"inside",visible:!0,align:C,vAlign:C},line:{visible:!0},visible:!0,position:A,zIndex:2});function Ye(){}var Ze=Xe,Qe={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},Ke={implementation:{configurable:!0}};Ye.register=function(t){Qe=t},Ke.implementation.get=function(){return Qe},Object.defineProperties(Ye,Ke);function $e(t){this._intlService=t}var Je=Ye,to=/\{(\d+)(:[^\}]+)?\}/g,eo={intl:{configurable:!0}};eo.intl.get=function(){return this._intlService||Je.implementation},eo.intl.set=function(t){this._intlService=t},$e.prototype.auto=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];var i=this.intl;return B(t)&&t.match(s)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},$e.prototype.localeAuto=function(t,i,r){var n=this.intl;return B(t)&&t.match(s)?t.replace(to,function(t,e,o){e=i[parseInt(e,10)];return n.toString(e,o?o.substring(1):"",r)}):n.toString(i[0],t,r)},Object.defineProperties($e.prototype,eo);function oo(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new io(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}var io=$e,ro={intl:{configurable:!0}};ro.intl.get=function(){return this._intlService||Je.implementation},ro.intl.set=function(t){this._intlService=t,this.format.intl=t},oo.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},oo.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(oo.prototype,ro);function no(){}var so,ao=oo;no.register=function(t){so=t},no.create=function(t,e){if(so)return so.create(t,e)};var ho=no;function po(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new P.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(o,r).lineTo(o+e.size,r):n.moveTo(r,i).lineTo(r,i+e.size),T(n),n}function lo(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,e=new P.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(o,r).lineTo(i,r):e.moveTo(r,o).lineTo(r,i),T(e),e}var co,uo=((co=le)&&(fo.__proto__=co),((fo.prototype=Object.create(co&&co.prototype)).constructor=fo).prototype.initFields=function(){},fo.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},fo.prototype.normalizeLabelRotation=function(t){var e=t.rotation;V(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},fo.prototype.createLabels=function(){var t=this.options,e=t.vertical?k:C,o=z({},t.labels,{align:e,zIndex:t.zIndex}),i=Math.max(1,o.step);if(this.clearLabels(),o.visible){this.normalizeLabelRotation(o),"auto"===o.rotation&&(o.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=i){var s={index:n,count:r.max},s=this.createAxisLabel(n,o,s);s&&(this.append(s),this.labels.push(s))}}},fo.prototype.clearLabels=function(){this.children=Z(this.children,function(t){return!(t instanceof We)}),this.labels=[]},fo.prototype.clearTitle=function(){var e=this;this.title&&(this.children=Z(this.children,function(t){return t!==e.title}),this.title=void 0)},fo.prototype.clear=function(){this.clearLabels(),this.clearTitle()},fo.prototype.lineBox=function(){var t=this.options,e=this.box,o=t.vertical,i=t.labels.mirror,r=i?e.x1:e.x2,i=i?e.y2:e.y1,t=t.line.width||0;return o?new qt(r,e.y1,r,e.y2-t):new qt(e.x1,i,e.x2-t,i)},fo.prototype.createTitle=function(){var t=this.options,t=z({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new ze(t.text,t),this.append(t),this.title=t)},fo.prototype.createNotes=function(){var t=this.options,e=t.notes,o=e.data||[];this.notes=[];for(var i=0;i<o.length;i++){var r=z({},e,o[i]);r.value=this.parseNoteValue(r.value);r=new Ze({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);r.options.visible&&(lt(r.options.position)?t.vertical&&!J(r.options.position,[S,k])?r.options.position=t.reverse?S:k:t.vertical||J(r.options.position,[A,w])||(r.options.position=t.reverse?w:A):t.vertical?r.options.position=t.reverse?S:k:r.options.position=t.reverse?w:A,this.append(r),this.notes.push(r))}},fo.prototype.parseNoteValue=function(t){return t},fo.prototype.renderVisual=function(){co.prototype.renderVisual.call(this),this.createPlotBands()},fo.prototype.createVisual=function(){co.prototype.createVisual.call(this),this.createBackground(),this.createLine()},fo.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new P.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},fo.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),h=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,p={vertical:t.vertical};function o(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r)lt(o)&&n%o==0||(p.tickX=h?a.x2:a.x2-e.size,p.tickY=h?a.y1-e.size:a.y1,p.position=t[n],s.append(po(p,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},fo.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();0<e.width&&e.visible&&((e=new P.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&T(e),(t=this._lineGroup=new P.drawing.Group).append(e),this.visual.append(t),this.createTicks(t))},fo.prototype.getActualTickSize=function(){var t=this.options,e=0;return t.majorTicks.visible&&t.minorTicks.visible?e=Math.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?e=t.majorTicks.size:t.minorTicks.visible&&(e=t.minorTicks.size),e},fo.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=P.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},fo.prototype.createPlotBands=function(){var e=this,t=this.options,o=t.plotBands||[],i=t.vertical,r=this.plotArea;if(0!==o.length){for(var n=this._plotbandGroup=new P.drawing.Group({zIndex:-1}),s=Z(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<o.length;a++){var h=o[a],p=void 0,l=void 0,c=h.label,u=void 0,l=i?(p=(s||r.axisX).lineBox(),this.getSlot(h.from,h.to,!0)):(p=this.getSlot(h.from,h.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||S,u=this.createPlotBandLabel(c,h,new qt(p.x1,l.y1,p.x2,l.y2))),0!==p.width()&&0!==l.height()&&(l=new P.geometry.Rect([p.x1,l.y1],[p.width(),l.height()]),h=P.drawing.Path.fromRect(l,{fill:{color:h.color,opacity:h.opacity},stroke:null}),n.append(h),u&&n.append(u))}this.appendVisual(n)}},fo.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;return lt(t)&&t.visible&&((i=W(t))?r=i({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)),(t=new ze(r,t)).reflow(o),t.renderVisual(),t.visual},fo.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=i.visible?e.majorUnit:0,t=t.lineBox(),h=t[n?"y1":"x1"],p={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var s=bt(t[n]);J(s,l)||n%o==0||a&&h===s||(p.position=s,c.append(lo(p,e)),l.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),c.children},fo.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,n=o.length,s=r?"width":"height",i=i?i.box[s]():0,a=this.getActualTickSize()+e.margin+i,h=((this.getRoot()||{}).box||t)[s](),p=0,l=0;l<n;l++){var c=o[l].box[s]();c+a<=h&&(p=Math.max(p,c))}this.box=r?new qt(t.x1,t.y1,t.x1+p+a,t.y2):new qt(t.x1,t.y1,t.x2,t.y1+p+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},fo.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},fo.prototype.labelTickIndex=function(t){return t.index},fo.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],h=this.labelTickIndex(a),p=i?a.box.height():a.box.width(),l=n[h],c=n[h+1],u=void 0,h=void 0,h=i?u=o?l+(c-l)/2-p/2:l-p/2:o?(u=l,c):(u=l-p/2)+p;this.positionLabel(a,r,u,h)}},fo.prototype.positionLabel=function(t,e,o,i){void 0===i&&(i=o);var r=this.options,n=r.vertical,s=this.lineBox(),r=this.getActualTickSize()+r.margin,a=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=S):(n-=r+t.box.width(),t.options.rotationOrigin=k),t.box.move(n,o)):(a=s.y1,e?(a-=r+t.box.height(),t.options.rotationOrigin=w):(a+=r,t.options.rotationOrigin=A),new qt(o,a,i,a+t.box.height()));t.reflow(a)},fo.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},fo.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,o=Math.min(e.length,t.length-1),i=0,r=0;r<o;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,n=this.autoRotateLabelAngle(s,n);if(-90===(i=0!==n?n:i))break}if(0!==i){for(var a=0;a<e.length;a++)e[a].options.rotation=i,e[a].reflow(new qt);return!0}},fo.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=o?k:S,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?A:w),e.reflow(this.box))},fo.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;lt(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},fo.prototype.noteSlot=function(t){return this.getSlot(t)},fo.prototype.alignTo=function(t){var e=t.lineBox(),o=this.options.vertical,t=o?m:v;this.box.snapTo(e,t),o?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[t+1]-=this.lineBox()[t+1]-e[t+1],this.box[t+2]-=this.lineBox()[t+2]-e[t+2]},fo.prototype.axisLabelText=function(t,e,o){function i(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=W(e),o=n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i();return o},fo.prototype.slot=function(t,e,o){o=this.getSlot(t,e,o);if(o)return o.toRect()},fo.prototype.contentBox=function(){var t,e,o=this.box.clone(),i=this.labels;return i.length&&(t=this.options.vertical?m:v,this.chartService.isPannable(t)?(e=this.maxLabelOffset(),o[t+1]-=e.start,o[t+2]+=e.end):(i[0].options.visible&&o.wrap(i[0].box),(i=i[i.length-1]).options.visible&&o.wrap(i.box))),o},fo.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,o=this.labelsBetweenTicks(),i=this.getLabelsTickPositions(),r=e?m:v,n=this.labels,s=t?1:0,a=t?0:1,h=0,p=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,f=void 0;o?(d=i[u+s],f=i[u+a]):d=f=i[u],h=Math.max(h,d-c.box[r+1]),p=Math.max(p,c.box[r+2]-f)}return{start:h,end:p}},fo.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!lt(n.min)||n.min<=o)||i<e&&0<r&&(!lt(n.max)||i<=n.max))return null;if(e<o&&0<r||i<t&&r<0)return{min:t,max:e};var s=e-t,a=t,n=e;return t<o&&r<0?(a=mt(t,o,i),n=mt(t+s,o+s,i)):i<e&&0<r&&(n=mt(e,o,i),a=mt(e-s,o,i-s)),{min:a,max:n}},fo.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},fo.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},fo.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),i=t?m:v,r=this.lineDir(),t=i+(1===r?1:2).toString();return{axis:i,axisOrigin:t,axisDir:r,lineBox:e,lineSize:o,lineStart:e[t]}},fo.prototype.pointOffset=function(t){var e=this.lineInfo(),o=e.axis,i=e.axisDir,r=e.axisOrigin,n=e.lineBox,e=e.lineSize;return(0<i?t[o]-n[r]:n[r]-t[o])/e},fo.prototype.scaleToDelta=function(t,e){t=mt(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},fo.prototype.labelsBetweenTicks=function(){return!this.options.justified},fo.prototype.prepareUserOptions=function(){},fo);function fo(t,e){void 0===e&&(e=new ao),co.call(this,t),this.chartService=e,this.options.visible||(this.options=z({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=z({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==n},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=z({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==n},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}kt(uo,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:r,visible:!0},title:{visible:!0,position:C},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:n,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:r,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var go=uo,yo="milliseconds",vo="seconds",mo="minutes",xo="hours",_o="days",bo="weeks",wo="months",Co="years",So=1e3,ko=60*So,Ao=60*ko,Po=24*Ao,To=7*Po,Mo=31*Po,Oo=365*Po,Bo={years:Oo,months:Mo,weeks:To,days:Po,hours:Ao,minutes:ko,seconds:So,milliseconds:1};function Ro(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ko}function Eo(t,e){return new Date(t.getTime()+e)}function Lo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Io(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),1)}function zo(t,e,o,r){var i,n,s,a=t;return t&&(s=(i=Lo(t)).getHours(),o===Co?Io(a=new Date(i.getFullYear()+e,0,1),0):o===wo?Io(a=new Date(i.getFullYear(),i.getMonth()+e,1),s):o===bo?Io(a=zo(function(t,e){void 0===r&&(e=0);var o=0,i=t.getDay();if(!isNaN(i))for(;i!==e;)0===i?i=6:i--,o++;return Eo(t,-o*Po)}(i,r),7*e,_o),s):o===_o?Io(a=new Date(i.getFullYear(),i.getMonth(),i.getDate()+e),s):o===xo?(n=i,t=e,(s=new Date(n)).setMinutes(0,0,0),a=Eo(s,(n.getTimezoneOffset()-s.getTimezoneOffset())*ko+t*Ao)):o===mo?0<(a=Eo(i,e*ko)).getSeconds()&&a.setSeconds(0):o===vo?a=Eo(i,e*So):o===yo&&(a=Eo(i,e)),o!==yo&&0<a.getMilliseconds()&&a.setMilliseconds(0)),a}function Vo(t,e,o){return zo(Lo(t),0,e,o)}function jo(t,e,o){t=Lo(t);return t&&Vo(t,e,o).getTime()===t.getTime()?t:zo(t,1,e,o)}function Do(t,e){return t&&e?t.getTime()-e.getTime():-1}function Ho(t,e){return t.getTime()-e}function Uo(t){if(x(t)){for(var e=[],o=0;o<t.length;o++)e.push(Uo(t[o]));return e}if(t)return Lo(t).getTime()}function Fo(t,e){return t&&e?Uo(t)===Uo(e):t===e}function No(t,e,o){return Ro(t,e)/Bo[o]}function Go(t,e,o,i){var r=Lo(t),t=Lo(e);return(o===wo?r.getMonth()-t.getMonth()+12*(r.getFullYear()-t.getFullYear())+No(r,new Date(r.getFullYear(),r.getMonth()),_o)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():o===Co?r.getFullYear()-t.getFullYear()+Go(r,new Date(r.getFullYear(),0),wo,1)/12:o===_o||o===bo?No(r,t,o):Ho(r,e)/Bo[o])/i}function Wo(t,e,o){return o===Co?e.getFullYear()-t.getFullYear():o===wo?12*Wo(t,e,Co)+e.getMonth()-t.getMonth():o===_o?Math.floor(Ho(e,t)/Po):Math.floor(Ho(e,t)/Bo[o])}function Xo(t,e){return B(e)&&t.parseDate(e)||Lo(e)}function qo(t,e){if(x(e)){for(var o=[],i=0;i<e.length;i++)o.push(Xo(t,e[i]));return o}return Xo(t,e)}function Yo(t,e){return O(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var Zo,at=((Zo=go)&&(Qo.__proto__=Zo),((Qo.prototype=Object.create(Zo&&Zo.prototype)).constructor=Qo).prototype.initFields=function(){this._ticks={}},Qo.prototype.categoriesHash=function(){return""},Qo.prototype.clone=function(){var t=new Qo(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},Qo.prototype.initUserOptions=function(t){var e=t.categories||[],o=lt(t.min),i=lt(t.max);return t.srcCategories=t.categories=e,(o||i)&&e.length&&(o=o?Math.floor(t.min):0,e=i?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(o,e)),t},Qo.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:O(t.min)?t.min%1:0,max:O(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},Qo.prototype.totalRangeIndices=function(t){var e=this.options,o=O(e.min)?e.min:0;return e=O(e.max)?e.max:O(e.min)?o+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),o=mt(o,0,t.max),e=mt(e,0,t.max)),{min:o,max:e}},Qo.prototype.range=function(){var t=this.options;return{min:O(t.min)?t.min:0,max:(O(t.max)?t:this.totalRange()).max}},Qo.prototype.roundedRange=function(){return this.range()},Qo.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},Qo.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,o=t.max,t=this.lineBox();return{scale:(this.options.vertical?t.height():t.width())/(o-e||1)*(this.options.reverse?-1:1),box:t,min:e,max:o}},Qo.prototype.arrangeLabels=function(){Zo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},Qo.prototype.hideOutOfRangeLabels=function(){var t,e,o,i=this.box,r=this.labels;0<r.length&&(e=i[(t=this.options.vertical?m:v)+1],o=i[t+2],i=r[0],r=vt(r),(i.box[t+1]>o||i.box[t+2]<e)&&(i.options.visible=!1),(r.box[t+1]>o||r.box[t+2]<e)&&(r.options.visible=!1))},Qo.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},Qo.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},Qo.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},Qo.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),o=e.min,e=e.max,i=Math.ceil(e),r=Math.floor(o),n=[];r<=i;)n.push(r),r+=t;return n},Qo.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,i=e.reverse,r=this.scaleOptions(),n=r.scale,e=r.box,s=r.min,a=e[(o?m:v)+(i?2:1)],h=this.tickIndices(t),p=[],l=0;l<h.length;l++)p.push(a+bt(n*(h[l]-s),3));return p},Qo.prototype.getTicks=function(){var t=this.options,e=this._ticks,o=this.rangeIndices(),i=this.lineBox(),o=i.getHash()+o.min+","+o.max+t.reverse+t.justified;return e._hash!==o&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=o,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,i),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),i):[]),e},Qo.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?m:v,i=function(t){return e[o+1]<=t&&t<=e[o+2]},r=t.length-1,n=0;!i(t[n])&&n<=r;)n++;for(var s=r;!i(t[s])&&0<=s;)s--;return t.slice(n,s+1)},Qo.prototype.lineInfo=function(){var t=this.options,e=t.vertical,o=t.reverse,i=this.lineBox(),r=e?i.height():i.width(),t=e?m:v,e=o?-1:1,o=t+(1==e?1:2).toString();return{axis:t,axisOrigin:o,axisDir:e,lineBox:i,lineSize:r,lineStart:i[o]}},Qo.prototype.lineDir=function(){return this.options.reverse?-1:1},Qo.prototype.getSlot=function(t,e,o){var i=this.options,r=i.reverse,n=i.justified,s=this.scaleOptions(),a=s.scale,h=s.box,p=s.min,l=this.lineInfo(),c=l.axis,u=l.lineStart,i=h.clone(),s=!lt(e),l=Ct(t,0),t=Ct(e,l),t=Math.max(t-1,l),e=u+(l-p)*a,a=u+(Math.max(l,t)+1-p)*a;return s&&n&&(a=e),o&&(e=mt(e,h[c+1],h[c+2]),a=mt(a,h[c+1],h[c+2])),i[c+1]=r?a:e,i[c+2]=r?e:a,i},Qo.prototype.limitSlot=function(t){var e=this.options.vertical?m:v,o=this.lineBox(),i=t.clone();return i[e+1]=mt(t[e+1],o[e+1],o[e+2]),i[e+2]=mt(t[e+2],o[e+1],o[e+2]),i},Qo.prototype.slot=function(t,e,o){var i=Math.floor(this.options.min||0),t=t,e=e;return"string"==typeof t?t=this.categoryIndex(t):O(t)&&(t-=i),"string"==typeof e?e=this.categoryIndex(e):O(e)&&(e-=i),Zo.prototype.slot.call(this,t,e,o)},Qo.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,r=e.vertical?m:v,n=this.scaleOptions(),s=n.scale,a=n.box,h=n.min,e=n.max,n=a[r+1],a=a[r+2],r=t[r];if(r<n||a<r)return null;n=(o?e:h)+(r-n)/s,s=n%1;return i?n=Math.round(n):0==s&&0<n&&n--,Math.floor(n)},Qo.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},Qo.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},Qo.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},Qo.prototype.categoriesCount=function(){return(this.options.categories||[]).length},Qo.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,o=bt(t/(o/e),g);return{min:o,max:e+o}},Qo.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.totalRangeIndices(),e=i.max-i.min,t=this.scaleToDelta(t,e),e=i.min+o*t,t=i.max-(1-o)*t;return{min:e,max:t=t-e<.1?e+.1:t}},Qo.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,o=o.max,e=this.scaleRange(t,e);return{min:mt(e.min,i,o),max:mt(e.max,i,o)}},Qo.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},Qo.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,i=this.totalRangeIndices(!0),r=i.min,n=i.max,i=Math.floor(r),n=e?(r=Math.ceil(r),Math.floor(n)):(r=Math.floor(r),Math.ceil(n));return{min:(r>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-i,max:(t.categories.length?n+(e?1:0):0)-i}},Qo.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=Ct(i.categories[t],"");o.dataItem=r;o=this.axisLabelText(i,e,o);return new We(i,o,t,r,e)},Qo.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},Qo.prototype.noteSlot=function(t){var e=this.options,e=t-Math.floor(e.min||0);return this.getSlot(e)},Qo.prototype.arrangeNotes=function(){Zo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},Qo.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?m:v,i=e[o+1],r=e[o+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[o+1]||s.box[o+2]<i)&&s.hide()}},Qo.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,i=bt(t/o,g),t=this.totalRange(),o=e.min+i,e=e.max+i;return this.limitRange(o,e,0,t.max,i)},Qo.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,r=o.vertical?m:v,n=this.totalRangeIndices(!0),s=this.scaleOptions(),o=s.scale,i=s.box[r+(i?2:1)],t=t[r]-i,i=e[r]-i,t=n.min+t/o,i=n.min+i/o,o=Math.min(t,i),i=Math.max(t,i);if(.01<=i-o)return{min:o,max:i}},Qo.prototype.valueRange=function(){return this.range()},Qo.prototype.totalIndex=function(t){var e=this.options;return this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var o=e.length,i=0;i<o;i++)if(Fo(e[i],t))return i;return-1}return e.indexOf(t)}(t,e.srcCategories)},Qo.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=O(t.min)?Math.floor(t.min):e,max:O(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},Qo.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new $,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},Qo.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},Qo);function Qo(){Zo.apply(this,arguments)}kt(at,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:r},labels:{zIndex:1},justified:!1,_deferLabels:!0});var Ko=at,It={milliseconds:"HH:mm:ss.fff",seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},$o=[yo,vo,mo,xo,_o,bo,wo,Co],Jo="fit";function ti(t){var e=t._range;return e||((e=t._range=At(t)).min=Lo(e.min),e.max=Lo(e.max)),e}function ei(t){this.options=t}ei.prototype.displayIndices=function(){return{min:0,max:1}},ei.prototype.displayRange=function(){return{}},ei.prototype.total=function(){return{}},ei.prototype.valueRange=function(){return{}},ei.prototype.valueIndex=function(){return-1},ei.prototype.values=function(){return[]},ei.prototype.totalIndex=function(){return-1},ei.prototype.valuesCount=function(){return 0},ei.prototype.totalCount=function(){return 0},ei.prototype.dateAt=function(){return null};function oi(t,e,o){(this.options=o).baseUnitStep=o.baseUnitStep||1;var i=o.roundToBaseUnit,r=o.justified;this.start=zo(t,0,o.baseUnit,o.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&Fo(e,n)&&!o.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0);var a=o.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=i?this.valueStart:a,(t=o.max)?(a=!r&&Fo(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,a),this.displayEnd=i?this.roundToTotalStep(t,!r):o.max):(this.valueEnd=n,this.displayEnd=i||s?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}function ii(t,e,o){for(var i,r,n,s=ti(t.categories),a=(t.max||s.max)-(t.min||s.min),h=t.autoBaseUnitSteps,p=t.maxDateGroups,l=t.baseUnit===Jo,c=e?$o.indexOf(e):0,u=l?$o[c++]:t.baseUnit,d=a/Bo[u],f=d;!r||p<=d;){for(i=i||h[u].slice(0);(n=i.shift())&&e===u&&n<o;);if(n)d=f/(r=n);else{if(u===vt($o)){r=Math.ceil(f/p);break}if(!l){p<d&&(r=Math.ceil(f/p));break}u=$o[c++]||vt($o),f=a/Bo[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}function ri(t){var e=(t.baseUnit||"").toLowerCase();return e===Jo||J(e,$o)||function(t){for(var e,o,i=t.categories,r=lt(i)?i.length:0,n=l,s=0;s<r;s++){var a,h=i[s];h&&e&&(0<(a=Ro(h,e))&&(o=(n=Math.min(n,a))>=Oo?Co:Mo-3*Po<=n?wo:To<=n?bo:Po<=n?_o:Ao<=n?xo:ko<=n?mo:vo)),e=h}t.baseUnit=o||_o}(t),e!==Jo&&"auto"!==t.baseUnitStep||ii(t),t}oi.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},oi.prototype.displayIndices=function(){var t,e,o;return this._indices||(t=(e=this.options).baseUnit,o=e.baseUnitStep,e=Go(this.displayStart,this.valueStart,t,o),o=Go(this.displayEnd,this.valueStart,t,o),this._indices={min:e,max:o}),this._indices},oi.prototype.total=function(){return{min:this.start,max:this.end}},oi.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},oi.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},oi.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Go(t,this.valueStart,e.baseUnit,e.baseUnitStep))},oi.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Go(t,this.start,e.baseUnit,e.baseUnitStep))},oi.prototype.dateIndex=function(t){var e=this.options;return Go(t,this.valueStart,e.baseUnit,e.baseUnitStep)},oi.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},oi.prototype.values=function(){var t=this._values;if(!t){var e=this.options,o=this.valueRange();this._values=t=[];for(var i=o.min;i<=o.max;)t.push(i),i=zo(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},oi.prototype.dateAt=function(t,e){var o=this.options;return zo(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},oi.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,s=i.weekStartDay,i=this.start,t=Go(t,i,r,n),t=e?Math.ceil(t):Math.floor(t);return o&&(t+=o),zo(i,t*n,r,s)};var ni,Vt=((ni=Ko)&&(si.__proto__=ni),((si.prototype=Object.create(ni&&ni.prototype)).constructor=si).prototype.clone=function(){var t=new si(Object.assign({},this.options),this.chartService);return t.createLabels(),t},si.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},si.prototype.initUserOptions=function(t){return t},si.prototype.initFields=function(){ni.prototype.initFields.call(this);var t=this.chartService,e=t.intl,o=this.options,i=o.categories||[];i._parsed||((i=qo(e,i))._parsed=!0),o=z({roundToBaseUnit:!0},o,{categories:i,min:Xo(e,o.min),max:Xo(e,o.max),weekStartDay:Yo(o,e)}),t.panning&&t.isPannable(o.vertical?m:v)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=i).length?(e=ti(i),t=o.maxDivisions,this.dataRange=new oi(e.min,e.max,ri(o)),t?(i=this.dataRange.displayRange(),ii(i=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:i.min,max:i.max,maxDateGroups:t}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new oi(e.min,e.max,i)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||_o,this.dataRange=this.divisionRange=new ei(o)),this.rangeLabels=[]},si.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return ni.prototype.tickIndices.call(this,t);var r=[],n=o.values(),s=0;this.options.justified||(n=n.concat(o.dateAt(i)),s=.5);for(var a,h=0;h<n.length;h++)r.push(e.dateIndex(n[h])+s),1!==t&&1<=h&&(a=r.length-1,r.splice(h,0,r[a-1]+(r[a]-r[a-1])*t));return r},si.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=Do(t,e.min)&&Do(t,e.max)<=0&&o.length},si.prototype.parseNoteValue=function(t){return Xo(this.chartService.intl,t)},si.prototype.noteSlot=function(t){return this.getSlot(t)},si.prototype.translateRange=function(t){var e=this.options,o=e.baseUnit,i=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=bt(t/r,g);return n.min&&n.max&&(r=Eo(e.min||n.min,t),t=Eo(e.max||n.max,t),n={min:zo(r,0,o,i),max:zo(t,0,o,i)}),n},si.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},si.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,o=this.lineBox(),i=e.vertical?o.height():o.width(),r=this.dataRange.displayRange(),n=r.min,o=r.max,r=this.dataRange.total(),i=bt(t/(i/(o-n)),g)*(e.reverse?-1:1),n=Eo(n,i),o=Eo(o,i),i=this.limitRange(Uo(n),Uo(o),Uo(r.min),Uo(r.max),i);return i?(i.min=Lo(i.min),i.max=Lo(i.max),i.baseUnit=e.baseUnit,i.baseUnitStep=e.baseUnitStep||1,i.userSetBaseUnit=e.userSetBaseUnit,i.userSetBaseUnitStep=e.userSetBaseUnitStep,i):void 0},si.prototype.pointsRange=function(t,e){if(this.isEmpty())return null;var o=ni.prototype.pointsRange.call(this,t,e),i=this.dataRange.displayRange(),t=this.dataRange.displayIndices(),e=Ho(i.max,i.min)/(t.max-t.min),t=this.options;return{min:Eo(i.min,o.min*e),max:Eo(i.min,o.max*e),baseUnit:t.userSetBaseUnit||t.baseUnit,baseUnitStep:t.userSetBaseUnitStep||t.baseUnitStep}},si.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===Jo,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,a=n.max,h=Math.abs(this.pointOffset(e)),n=this.scaleToDelta(t,a-s),e=Math.round(h*n),t=Math.round((1-h)*n),p=this.dataRange.options.baseUnit,h=new Date(s.getTime()+e),n=new Date(a.getTime()-t);if(i){var l,c,u=o.autoBaseUnitSteps,e=o.maxDateGroups,t=vt(u[p])*e*Bo[p],d=Ho(a,s),i=Ho(n,h),f=$o.indexOf(p);if(i<Bo[p]&&p!==yo)p=$o[f-1],h=Eo(s,c=(d-(e-1)*(l=vt(u[p]))*Bo[p])/2),n=Eo(a,-c);else if(t<i&&p!==Co){var g=0;do{for(p=$o[++f],g=0,c=2*Bo[p];l=u[p][g],++g<u[p].length&&c*l<d;);}while(p!==Co&&c*l<d);0<(c=(c*l-d)/2)&&(h=Eo(s,-c),n=Eo(a,c),h=Eo(h,mt(n,r.min,r.max)-n),n=Eo(n,mt(h,r.min,r.max)-h))}}return h&&n&&0<Ho(n,h)?{min:h,max:n,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},si.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),e=this.scaleRange(t,e);return e&&(e.min<o.min&&(e.min=o.min),e.max>o.max&&(e.max=o.max)),e},si.prototype.range=function(){return this.dataRange.displayRange()},si.prototype.createLabels=function(){ni.prototype.createLabels.call(this),this.createRangeLabels()},si.prototype.clearLabels=function(){ni.prototype.clearLabels.call(this),this.rangeLabels=[]},si.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),ni.prototype.arrangeLabels.call(this)},si.prototype.arrangeRangeLabels=function(){var t,e,o,i,r=this.options,n=this.rangeLabels;0!==n.length&&(i=this.lineBox(),t=r.vertical,e=r.rangeLabels.mirror||r.labels.mirror,(o=n[0])&&(r=t?i.y1-o.box.height()/2:i.x1,this.positionLabel(o,e,r)),(n=n[1])&&(i=t?i.y2-n.box.height()/2:i.x2,this.positionLabel(n,e,i)))},si.prototype.autoRotateLabels=function(){ni.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},si.prototype.hideOutOfRangeLabels=function(){ni.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},si.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var o=t[0];if(o&&o.options.visible)for(var i=0;i<e.length&&s(o,e[i]);i++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;0<n&&s(r,e[n]);--n);}function s(t,e){return(!e.options.visible||e.box.overlaps(t.box))&&(e.options.visible=!1,1)}},si.prototype.contentBox=function(){for(var t=ni.prototype.contentBox.call(this),e=this.rangeLabels,o=0;o<e.length;o++){var i=e[o];i.options.visible&&t.wrap(i.box)}return t},si.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var i=this.options,r=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,n=this.divisionRange.dateAt(t),i=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||i,o.dataItem=r;o=this.axisLabelText(n,e,o);if(o)return new We(n,o,t,r,e)},si.prototype.createRangeLabels=function(){var i=this,t=this.divisionRange,e=t.displayStart,o=t.displayEnd,t=this.options,r=Object.assign({},t.labels,t.rangeLabels,{align:C,zIndex:t.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=C,"auto"===r.rotation&&(r.rotation=0,t.autoRotateRangeLabels=!0),t=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||t,(t=function(t,e,o){o&&(t=new We(e,o,t,null,r),i.append(t),i.rangeLabels.push(t))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),t(1,o,this.axisLabelText(o,r,{index:1,count:2})))},si.prototype.autoRotateRangeLabels=function(){var t,e,i=this,o=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===o.length&&(t=function(t,e,o){o=2*Math.abs(e[o+1]-e[o]),o=i.autoRotateLabelAngle(t.box,o);0!==o&&(t.options.rotation=o,t.reflow(new qt))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},si.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},si.prototype.slot=function(t,e,o){var i=this.dataRange,t=t,e=e;t instanceof Date&&(t=i.dateIndex(t)),e instanceof Date&&(e=i.dateIndex(e));o=this.getSlot(t,e,o);if(o)return o.toRect()},si.prototype.getSlot=function(t,e,o){return"object"==typeof t&&(t=this.categoryIndex(t)),"object"==typeof e&&(e=this.categoryIndex(e)),ni.prototype.getSlot.call(this,t,e,o)},si.prototype.valueRange=function(){var t=ti(this.options.srcCategories);return{min:Lo(t.min),max:Lo(t.max)}},si.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},si.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},si.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},si.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},si.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},si.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},si.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},si.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},si.prototype.totalRange=function(){return this.dataRange.total()},si.prototype.totalCount=function(){return this.dataRange.totalCount()},si.prototype.isEmpty=function(){return!this.options.srcCategories.length},si.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=ti(t.srcCategories);return new oi(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},si);function si(){ni.apply(this,arguments)}kt(Vt,{type:y,labels:{dateFormats:It},rangeLabels:{visible:!1},autoBaseUnitSteps:{milliseconds:[1,10,100],seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10});var ai=Vt;function hi(t,e){return bt(Math.floor(t/e)*e,g)}function pi(t,e){return bt(Math.ceil(t/e)*e,g)}function li(t){return Math.max(Math.min(t,3e5),-3e5)}var ci,ui=Math.pow(10,-9),ee=((ci=go)&&(di.__proto__=ci),((di.prototype=Object.create(ci&&ci.prototype)).constructor=di).prototype.initUserOptions=function(t){var o,e,i,r,n,s,a=(s=t.seriesMin,o=t.seriesMax,i=(e=t).narrowRange,r=function(t){if(!t&&!o)return 0;if(0<=t&&0<=o){var e=t===o?0:t;if(!1===i||!i&&.2<(o-e)/o)return 0;e=Math.max(0,e-(o-e)/2)}else e=t;return e}(s),a=function(t,e,o){if(!t&&!e)return 1;if(t<=0&&e<=0){var i=t===e?0:e,r=Math.abs((i-t)/i);if(!1===o||!o&&.2<r)return 0;i=Math.min(0,i-(t-i)/2)}else i=e;return i}(s,o,i),n=Ut(r,a),!(s={majorUnit:n})!==e.roundToMajorUnit&&(r<0&&fi(r,n,1/3)&&(r-=n),0<a&&fi(a,n,1/3)&&(a+=n)),s.min=hi(r,n),s.max=pi(a,n),s);return this.totalOptions=(n=a,{min:lt((s=t).min)?Math.min(n.min,s.min):n.min,max:lt(s.max)?Math.max(n.max,s.max):n.max,majorUnit:n.majorUnit}),function(t,e){var o,i,r,n=e;e&&(function(t,e){for(var o=0;o<e.length;o++){var i=e[o];null===t[i]&&(t[i]=void 0)}}(e,["min","max"]),o=lt(e.min),i=lt(e.max),(r=o||i)&&e.min===e.max&&(0<e.min?e.min=0:e.max=1),e.majorUnit?(t.min=hi(t.min,e.majorUnit),t.max=pi(t.max,e.majorUnit)):r&&(n=z(t,e),t.majorUnit=Ut(n.min,n.max))),t.minorUnit=(n.majorUnit||t.majorUnit)/5;n=z(t,n);return n.min>=n.max&&(o&&!i?n.max=n.min+n.majorUnit:!o&&i&&(n.min=n.max-n.majorUnit)),n}(a,t)},di.prototype.initFields=function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},di.prototype.clone=function(){return new di(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},di.prototype.startValue=function(){return 0},di.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},di.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,e=e.max-e.min;return Math.floor(bt(e/t,3))+1},di.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,s=i.lineBox,a=t*(i.lineSize/(o.max-o.min)),h=this.getDivisions(t),p=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<h;u++)u%c!=0&&p.push(bt(l,3)),l+=a*r;return p},di.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},di.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},di.prototype.getSlot=function(t,e,o){void 0===o&&(o=!1);var i=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,h=r.lineSize,p=r.lineStart,r=s*(h/(i.max-i.min)),h=Ct(t,e||0),t=Ct(e,t||0);o&&(h=mt(h,i.min,i.max),t=mt(t,i.min,i.max));o=Math.min(h,t)-i.min,i=Math.max(h,t)-i.min,a=new qt(a.x1,a.y1,a.x1,a.y1);return a[n+1]=li(p+r*(0<s?o:i)),a[n+2]=li(p+r*(0<s?i:o)),a},di.prototype.getValue=function(t){var e=this.options,o=Number(e.max),e=Number(e.min),t=this.pointOffset(t);return t<0||1<t?null:bt(e+t*(o-e),g)},di.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,n=e.min,e=this.lineInfo().lineSize,e=bt(t/(e/(r-n)),g);return{min:n+(e=!(!o&&!i||o&&i)?-e:e),max:r+e,offset:e}},di.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},di.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=bt(i.min+t*i.majorUnit,g),o=this.axisLabelText(i,e,o);return new We(i,o,t,null,e)},di.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},di.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},di.prototype.pointsRange=function(t,e){var o=this.getValue(t),t=this.getValue(e),e=Math.min(o,t),t=Math.max(o,t);if(this.isValidRange(e,t))return{min:e,max:t}},di.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),e=this.options.max-this.options.min,t=this.scaleToDelta(t,e),e=(1-o)*t,t=bt(this.options.min+o*t,g),e=bt(this.options.max-e,g);return{min:t,max:e=e-t<ui?t+ui:e}},di.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,e=this.scaleRange(t,e);return{min:mt(e.min,o,i),max:mt(e.max,o,i)}},di.prototype.isValidRange=function(t,e){return ui<e-t},di);function di(t,e,o,i){ci.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function fi(t,e,o){t=bt(Math.abs(t%e),g);return 0===t||e*(1-o)<t}kt(ee,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:r},labels:{format:"#.####################"},zIndex:1});var gi,yi=ee,ae=((gi=go)&&(vi.__proto__=gi),((vi.prototype=Object.create(gi&&gi.prototype)).constructor=vi).prototype.clone=function(){return new vi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},vi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},vi.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Wo(e.min,e.max,e.baseUnit)/t+1)},vi.prototype.getTickPositions=function(t){for(var e=this.options,o=this.lineInfo(),i=o.axisDir,r=o.lineSize,n=o.lineStart,s=this.getDivisions(t),a=r/Ho(e.max,e.min),h=e.weekStartDay||0,p=[n],l=1;l<s;l++){var c=n+Ho(zo(e.min,l*t,e.baseUnit,h),e.min)*a*i;p.push(bt(c,3))}return p},vi.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},vi.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},vi.prototype.getSlot=function(t,e,o){return yi.prototype.getSlot.call(this,Xo(this.intlService,t),Xo(this.intlService,e),o)},vi.prototype.getValue=function(t){t=yi.prototype.getValue.call(this,t);return null!==t?Lo(t):null},vi.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},vi.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min;0<r&&(s=zo(s,r,i.baseUnit,n));i=e.dateFormats[i.baseUnit];e.format=e.format||i;o=this.axisLabelText(s,e,o);return new We(s,o,t,null,e)},vi.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,n=i?o.height():o.width(),o=this.range(),o=n/Ho(o.max,o.min),o=bt(t/o,g);return{min:Eo(e.min,o=!(!i&&!r||i&&r)?-o:o),max:Eo(e.max,o),offset:o}},vi.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=Do(t,e.min)&&Do(t,e.max)<=0},vi.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(Uo(t.min),Uo(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:Lo(t.min),max:Lo(t.max)}},vi.prototype.pointsRange=function(t,e){var o=this.getValue(t),t=this.getValue(e),e=Math.min(o,t),t=Math.max(o,t);return{min:Lo(e),max:Lo(t)}},vi.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),e=this.options.max-this.options.min,t=this.scaleToDelta(t,e),e=o*t,t=(1-o)*t,e=Lo(Uo(this.options.min)+e),t=Lo(Uo(this.options.max)-t);return{min:e,max:t=t-e<1e3?Lo(Uo(e)+1e3):t}},vi.prototype.zoomRange=function(t,e){e=this.scaleRange(t,e);return{min:Lo(mt(Uo(e.min),this.totalMin,this.totalMax)),max:Lo(mt(Uo(e.max),this.totalMin,this.totalMax))}},vi);function vi(t,e,o,i){var r,n,s,a,h,p=Lo(t),l=Lo(e),c=i.intl,u=o||{};r=p,n=l,s=u=z(u||{},{min:Xo(c,u.min),max:Xo(c,u.max),axisCrossingValue:qo(c,u.axisCrossingValues||u.axisCrossingValue),weekStartDay:Yo(u,c)}),t=s.min||r,e=s.max||n,o=s.baseUnit||(e&&t?(a=Ro(e,t),h=xo,Oo<=a?h=Co:Mo<=a?h=wo:To<=a?h=bo:Po<=a&&(h=_o),h):xo),r=Bo[o],n=s.weekStartDay||0,a=Vo(Uo(t)-1,o,n)||Lo(e),h=jo(Uo(e)+1,o,n),t=s.majorUnit||pi(Ut(a.getTime(),h.getTime()),r)/r,e=Wo(a,h,o),r=pi(e,t)-e,e=Math.floor(r/2),r-=e,s.baseUnit||delete s.baseUnit,s.baseUnit=s.baseUnit||o,s.min=s.min||zo(a,-e,o,n),s.max=s.max||zo(h,r,o,n),s.minorUnit=s.minorUnit||t/5,s.majorUnit=t,gi.call(this,u=s,i),this.intlService=c,this.seriesMin=p,this.seriesMax=l;c=u.weekStartDay||0;this.totalMin=Uo(Vo(Uo(p)-1,u.baseUnit,c)),this.totalMax=Uo(jo(Uo(l)+1,u.baseUnit,c))}kt(ae,{type:y,majorGridLines:{visible:!0,width:1,color:r},labels:{dateFormats:It}});var mi,xi=ae,ce=((mi=go)&&(_i.__proto__=mi),((_i.prototype=Object.create(mi&&mi.prototype)).constructor=_i).prototype.clone=function(){return new _i(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},_i.prototype.startValue=function(){return this.options.min},_i.prototype.getSlot=function(t,e,o){var i=this.options,r=this.logMin,n=this.logMax,s=i.majorUnit,a=i.min,h=i.max,p=this.lineInfo(),l=p.axis,c=p.axisDir,u=p.lineBox,i=p.lineSize,p=p.lineStart,i=c*(i/(n-r)),n=Ct(t,e||1),t=Ct(e,t||1);if(n<=0||t<=0)return null;o&&(n=mt(n,a,h),t=mt(t,a,h));n=wi(n,s),t=wi(t,s),s=Math.min(n,t)-r,r=Math.max(n,t)-r,u=new qt(u.x1,u.y1,u.x1,u.y1);return u[l+1]=li(p+i*(0<c?s:r)),u[l+2]=li(p+i*(0<c?r:s)),u},_i.prototype.getValue=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.majorUnit,n=this.lineInfo(),s=n.axis,a=n.axisDir,e=n.lineStart,n=n.lineSize,e=a*(t[s]-e);return e<0||n<e?null:bt(Math.pow(r,o+e*((i-o)/n)),g)},_i.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},_i.prototype.translateRange=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,e=this.lineBox(),e=n?e.height():e.width(),e=bt(t/(e/(i-o)),g);return!n&&!r||n&&r||(e=-e),{min:Math.pow(s,o+e),max:Math.pow(s,i+e),offset:e}},_i.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},_i.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},_i.prototype.createTicks=function(o){var t=this.options,e=t.majorTicks,i=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function h(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,o.append(po(a,e))}return e.visible&&this.traverseMajorTicksPositions(h,e),i.visible&&this.traverseMinorTicksPositions(h,i),[]},_i.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,e=e.vertical,t=t.lineBox(),r={lineStart:t[e?"x1":"y1"],lineEnd:t[e?"x2":"y2"],vertical:e},n=[],s=this.gridLinesVisual();function a(t,e){J(t,n)||(r.position=t,s.append(lo(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},_i.prototype.traverseMajorTicksPositions=function(t,e){for(var o=this.lineInfo(),i=o.lineStart,r=o.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(bt(i+r*(a-n),g),e)},_i.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,o=this.lineInfo(),a=o.lineStart,h=o.step,p=this.logMin,l=this.logMax,c=Math.floor(p);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var f=u.value+d*u.minorStep;if(r<f)break;i<=f&&t(bt(a+h*(wi(f,s)-p),g),e)}},_i.prototype.createAxisLabel=function(t,e,o){var i=Math.ceil(this.logMin+t),i=Math.pow(this.options.majorUnit,i),o=this.axisLabelText(i,e,o);return new We(i,o,t,null,e)},_i.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},_i.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},_i.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},_i.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=wi(this.options.min,o),r=wi(this.options.max,o),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-i),i=Math.pow(o,i+e*t),t=Math.pow(o,r-(1-e)*t);return{min:i,max:t=t-i<1e-6?i+1e-6:t}},_i.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e),t=this.totalMin,e=this.totalMax;return{min:mt(o.min,t,e),max:mt(o.max,t,e)}},_i.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,i=e.majorUnit,e=Math.pow(i,t);return{value:e,minorStep:(Math.pow(i,t+1)-e)/o}},_i.prototype.lineInfo=function(){var t=mi.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},_i);function _i(t,e,o,i){var r,n,s,a,h,p=z({majorUnit:10,min:t,max:e},o),l=p.majorUnit,c=(u=bt(wi(a=e,h=l),g)%1,a<=0?h:0!=u&&(u<.3||.9<u)?Math.pow(h,wi(a,h)+.2):Math.pow(h,Math.ceil(wi(a,h)))),u=(r=t,s=(n=p).majorUnit,(d=r)<=0?d=e<=1?Math.pow(s,-2):1:n.narrowRange||(d=Math.pow(s,Math.floor(wi(r,s)))),d),d=(a=u,h=c,n=o,s=(r=p).min,d=r.max,lt(r.axisCrossingValue)&&r.axisCrossingValue<=0&&bi(),lt(n.max)?n.max<=0&&bi():d=h,lt(n.min)?n.min<=0&&bi():s=a,{min:s,max:d});p.max=d.max,p.min=d.min,p.minorUnit=o.minorUnit||bt(l-1,g),mi.call(this,p,i),this.totalMin=lt(o.min)?Math.min(u,o.min):u,this.totalMax=lt(o.max)?Math.max(c,o.max):c,this.logMin=bt(wi(d.min,l),g),this.logMax=bt(wi(d.max,l),g),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function bi(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function wi(t,e){return Math.log(t)/Math.log(e)}kt(ce,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:r},zIndex:1,_deferLabels:!0});var Ci,Si=ce,ge={createGridLines:function(t){var e,o=this.options,i=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return o.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,i,o.majorGridLines)),o.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),ht(r,this.renderMinorGridLines(e,i,o.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,o){return this.renderGridLines(t,e,o)},renderMinorGridLines:function(t,e,o,i,r){r=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,r)},renderGridLines:function(t,e,o,i){for(var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},o=this.box.center(),n=new P.geometry.Circle([o.x,o.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var h=new P.drawing.Path(r);i&&(n.radius=i(t[a])),h.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(h)}return s.children},gridLineAngles:function(t,e,o,i,r){var n=this,r=this.intervals(e,o,i,r),t=t.options,s=t.visible&&!1!==(t.line||{}).visible;return it(r,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},_e=((Ci=Ko)&&(ki.__proto__=Ci),((ki.prototype=Object.create(Ci&&Ci.prototype)).constructor=ki).prototype.range=function(){return{min:0,max:this.options.categories.length}},ki.prototype.reflow=function(t){this.box=t,this.reflowLabels()},ki.prototype.lineBox=function(){return this.box},ki.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new qt,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(o+n*i).adjacentBox(0,s.width(),s.height()))}},ki.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,h=o||1,p=[],l=e||0;l<s;l+=h)r=n.reverse?360-l*a:l*a,r=bt(r,3)%360,i&&J(r,i)||p.push(r);return p},ki.prototype.majorIntervals=function(){return this.intervals(1)},ki.prototype.minorIntervals=function(){return this.intervals(.5)},ki.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},ki.prototype.majorAngles=function(){var e=this;return it(this.majorIntervals(),function(t){return e.intervalAngle(t)})},ki.prototype.createLine=function(){return[]},ki.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},ki.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,o=o.majorGridLines,o=e?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,o)},ki.prototype.radiusCallback=function(e,t,o){if(t.options.type!==d){var t=_t(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles();return function(t){return!o&&J(t,r)?e:i}}},ki.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new P.drawing.Group({zIndex:-1}),o=0;o<t.length;o++){var i=t[o],r=this.plotBandSlot(i),n=this.getSlot(i.from),s=i.from-Math.floor(i.from);r.startAngle+=s*n.angle;var a=Math.ceil(i.to)-i.to;r.angle-=(a+s)*n.angle;i=se.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}});e.append(i)}this.appendVisual(e)},ki.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},ki.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,t=t;o.reverse&&!i&&(t=(t+1)%s);n=n[t=mt(Math.floor(t),0,s-1)];i&&(n-=a/2)<0&&(n+=360);t=a*(mt(Math.ceil(e||t),t,s-1)-t+1);return new Jt(r.center(),0,r.height()/2,n,t)},ki.prototype.slot=function(t,e){var o=this.getSlot(t,e),t=o.startAngle+180,e=t+o.angle;return new P.geometry.Arc([o.center.x,o.center.y],{startAngle:t,endAngle:e,radiusX:o.radius,radiusY:o.radius})},ki.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,o=null,i=0;i<e;i++)if(this.getSlot(i).containsPoint(t)){o=i;break}return o},ki);function ki(){Ci.apply(this,arguments)}kt(_e,{startAngle:90,labels:{margin:U(10)},majorGridLines:{visible:!0},justified:!0}),z(_e.prototype,ge);var Ai,Pi=_e,Se=((Ai=go)&&(Ti.__proto__=Ai),((Ti.prototype=Object.create(Ai&&Ai.prototype)).constructor=Ti).prototype.getDivisions=function(t){return yi.prototype.getDivisions.call(this,t)-1},Ti.prototype.reflow=function(t){this.box=t,this.reflowLabels()},Ti.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,o=this.options.labels,i=o.skip||0,o=o.step||1,r=new qt,n=this.intervals(t.majorUnit,i,o),s=0;s<e.length;s++){e[s].reflow(r);var a=e[s].box;e[s].reflow(this.getSlot(n[s]).adjacentBox(0,a.width(),a.height()))}},Ti.prototype.lineBox=function(){return this.box},Ti.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=o||1,h=e||0;h<n;h+=a){var p=(360+r+h*t)%360;i&&J(p,i)||s.push(p)}return s},Ti.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},Ti.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},Ti.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},Ti.prototype.createLine=function(){return[]},Ti.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},Ti.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,r=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,r)},Ti.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},Ti.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,t=mt(t,o.min,o.max),e=mt(e||t,t,o.max);return o.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(r=t,t=e,e=r),new Jt(i.center(),0,i.height()/2,t,e-t)},Ti.prototype.slot=function(t,e){var o=this.options,i=360-o.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),e=Math.max(t,e),n=o.reverse?(s=n,e):(s=360-e,360-n),s=(s+i)%360;return new P.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:n=(n+i)%360,radiusX:r.radius,radiusY:r.radius})},Ti.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,o=t.y-o.y,o=Math.round(ct(Math.atan2(o,i))),i=e.startAngle;return e.reverse||(o*=-1,i*=-1),(o+i+360)%360},Ti.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},Ti);function Ti(t,e){Ai.call(this,t,e);e=this.options;e.minorUnit=e.minorUnit||e.majorUnit/2}kt(Se,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:U(10)},majorGridLines:{color:r,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),z(Se.prototype,ge,{createPlotBands:Pi.prototype.createPlotBands,majorAngles:Pi.prototype.majorAngles,range:yi.prototype.range,labelsCount:yi.prototype.labelsCount,createAxisLabel:yi.prototype.createAxisLabel});var Mi=Se;function Oi(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Bi,Me={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,o=t.plotBands;void 0===o&&(o=[]);for(var t=this.plotArea.polarAxis,i=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new P.drawing.Group({zIndex:-1}),s=0;s<o.length;s++){var a=o[s],h={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new Jt(r,r.y-a.y2,r.y-a.y1,0,360),h=e===d?se.current.createRing(a,h):P.drawing.Path.fromPoints(this.plotBandPoints(a,i),h).close();n.append(h)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new P.geometry.Circle(r,t.innerRadius),s=new P.geometry.Circle(r,t.radius),a=0;a<e.length;a++)o.push(n.pointAt(e[a]+180)),i.push(s.pointAt(e[a]+180));return o.reverse(),o.push(o[0]),i.push(i[0]),i.concat(o)},createGridLines:function(t){var e=this.options,o=this.radarMajorGridLinePositions(),i=t.majorAngles(),r=t.box.center(),t=[];return e.majorGridLines.visible&&(t=this.renderGridLines(r,o,i,e.majorGridLines)),e.minorGridLines.visible&&(o=this.radarMinorGridLinePositions(),ht(t,this.renderGridLines(r,o,i,e.minorGridLines))),t},renderGridLines:function(t,e,o,i){var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=i.skip;void 0===n&&(n=0);var s=i.step;void 0===s&&(s=0);for(var a=this.gridLinesVisual(),h=n;h<e.length;h+=s){var p=t.y-e[h];if(0<p){var l=new P.geometry.Circle([t.x,t.y],p);if(i.type===d)a.append(new P.drawing.Circle(l,r));else{for(var c=new P.drawing.Path(r),u=0;u<o.length;u++)c.lineTo(l.pointAt(o[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var o,e=this.lineBox(),i=this.plotArea.polarAxis,r=i.majorAngles(),n=i.box.center(),s=t.distanceTo(n),a=s;return this.options.majorGridLines.type!==d&&1<r.length&&(i=t.x-n.x,n=t.y-n.y,o=(ct(Math.atan2(n,i))+540)%360,r.sort(function(t,e){return Oi(t,o)-Oi(e,o)}),i=90-Oi(r[0],r[1])/2,r=180-Oi(o,r[0])-i,a=s*(Math.sin(_t(r))/Math.sin(_t(i)))),this.axisType().prototype.getValue.call(this,new Nt(e.x1,e.y2-a))}},Ve=((Bi=yi)&&(Ri.__proto__=Bi),((Ri.prototype=Object.create(Bi&&Bi.prototype)).constructor=Ri).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},Ri.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},Ri.prototype.axisType=function(){return Bi},Ri);function Ri(){Bi.apply(this,arguments)}z(Ve.prototype,Me);var Ei,Li=Ve,Fe=((Ei=Si)&&(Ii.__proto__=Ei),((Ii.prototype=Object.create(Ei&&Ei.prototype)).constructor=Ii).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Ii.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Ii.prototype.axisType=function(){return Ei},Ii);function Ii(){Ei.apply(this,arguments)}z(Fe.prototype,Me);var zi=Fe;function Vi(t){return t<=0?-1:1}var ji,Di,Hi=((Di=P.Class)&&(Ni.__proto__=Di),((Ni.prototype=Object.create(Di&&Di.prototype)).constructor=Ni).prototype.process=function(t){var e=t.slice(0),o=[],i=this.closed,r=e.length;if(2<r&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return o;var n,s=e[0],a=e[1],h=e[2];for(o.push(new P.geometry.Segment(s));s.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r){t=this.tangent(s,a,v,m);return vt(o).controlOut(this.firstControlPoint(t,s,a,v,m)),o.push(new P.geometry.Segment(a,this.secondControlPoint(t,s,a,v,m))),o}i?(s=e[r-1],a=e[0],h=e[1],l=(n=this.controlPoints(s,a,h))[1],c=n[0]):(n=this.tangent(s,a,v,m),l=this.firstControlPoint(n,s,a,v,m));for(var p,l,c,u=l,d=0;d<=r-3;d++)this.removeDuplicates(d,e),d+3<=(r=e.length)&&(s=e[d],a=e[d+1],h=e[d+2],p=this.controlPoints(s,a,h),vt(o).controlOut(u),u=p[1],p=p[0],o.push(new P.geometry.Segment(a,p)));return i?(s=e[r-2],a=e[r-1],h=e[0],l=this.controlPoints(s,a,h),vt(o).controlOut(u),o.push(new P.geometry.Segment(a,l[0])),vt(o).controlOut(l[1]),o.push(new P.geometry.Segment(h,c))):(c=this.tangent(a,h,v,m),vt(o).controlOut(u),o.push(new P.geometry.Segment(h,this.secondControlPoint(c,a,h,v,m)))),o},Ni.prototype.removeDuplicates=function(t,e){for(;e[t+1]&&(e[t].equals(e[t+1])||e[t+1].equals(e[t+2]));)e.splice(t+1,1)},Ni.prototype.invertAxis=function(t,e,o){var i,r=!1;return t.x===e.x?r=!0:e.x===o.x?(e.y<o.y&&t.y<=e.y||o.y<e.y&&e.y<=t.y)&&(r=!0):(i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x),t.y<=e.y&&o.y<=i||e.y<=t.y&&o.y>=i||(r=!0)),r},Ni.prototype.isLine=function(t,e,o){var i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x);return t.x===e.x&&e.x===o.x||bt(i,1)===bt(o.y,1)},Ni.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Ni.prototype.controlPoints=function(t,e,o){var i,r=v,n=m,s=!1,a=!1;this.isLine(t,e,o)?i=this.tangent(t,e,v,m):(h={x:this.isMonotonicByField(t,e,o,v),y:this.isMonotonicByField(t,e,o,m)}).x&&h.y?(i=this.tangent(t,o,v,m),s=!0):(this.invertAxis(t,e,o)&&(r=m,n=v),h[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?Vi((o[n]-t[n])*(e[r]-t[r])):-Vi((o[r]-t[r])*(e[n]-t[n]))),a=!0));var h=this.secondControlPoint(i,t,e,r,n);a&&(a=r,r=n,n=a);n=this.firstControlPoint(i,e,o,r,n);return s&&(this.restrictControlPoint(t,e,h,i),this.restrictControlPoint(e,o,n,i)),[h,n]},Ni.prototype.restrictControlPoint=function(t,e,o,i){t.y<e.y?e.y<o.y?(o.x=t.x+(e.y-t.y)/i,o.y=e.y):o.y<t.y&&(o.x=e.x-(e.y-t.y)/i,o.y=t.y):o.y<e.y?(o.x=t.x-(t.y-e.y)/i,o.y=e.y):t.y<o.y&&(o.x=e.x+(t.y-e.y)/i,o.y=t.y)},Ni.prototype.tangent=function(t,e,o,i){o=e[o]-t[o],i=e[i]-t[i];return 0==o?0:i/o},Ni.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},Ni.prototype.firstControlPoint=function(t,e,o,i,r){var n=e[i],o=.333*(o[i]-n);return this.point(n+o,e[r]+o*t,i,r)},Ni.prototype.secondControlPoint=function(t,e,o,i,r){var n=e[i],e=o[i],n=.333*(e-n);return this.point(e-n,o[r]-n*t,i,r)},Ni.prototype.point=function(t,e,o,i){var r=new P.geometry.Point;return r[o]=t,r[i]=e,r},Ni.prototype.calculateFunction=function(t,e){for(var o=t.length,i=0,r=0;r<o;r++)i+=Math.pow(e,r)*t[r];return i},Ni),Ui=((ji=P.Class)&&(Fi.__proto__=ji),((Fi.prototype=Object.create(ji&&ji.prototype)).constructor=Fi).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Fi.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},Fi.prototype.range=function(){return this._axis.range()},Fi.prototype.valueRange=function(){return this._axis.valueRange()},Fi);function Fi(t){ji.call(this),this._axis=t,this.options=t.options}function Ni(t){Di.call(this),this.closed=t}function Gi(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Ui(e[o])}function Wi(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}Wi.prototype.findAxisByName=function(t){return Gi(t,this._pane.axes)};var Xi,qi=Wi,Yi=((Xi=P.Class)&&(Zi.__proto__=Xi),(Zi.prototype=Object.create(Xi&&Xi.prototype)).constructor=Zi);function Zi(t){Xi.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Qi(t){for(var e=t.length,o=0,i=0;i<e;i++)O(t[i])&&o++;return o}var Ki={min:function(t){for(var e=t.length,o=l,i=0;i<e;i++){var r=t[i];O(r)&&(o=Math.min(o,r))}return o===l?t[0]:o},max:function(t){for(var e=t.length,o=c,i=0;i<e;i++){var r=t[i];O(r)&&(o=Math.max(o,r))}return o===c?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];O(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return e=Qi(t)?Ki.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&<(r)&&o++}return o},avg:function(t){var e=Qi(t),o=t[0];return o=0<e?Ki.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&<(i))return i}return t[0]}},$i=Ki;function Ji(t,e){return null===e?e:Y(t)(e)}var tr,Xe=((tr=P.Class)&&(er.__proto__=tr),((er.prototype=Object.create(tr&&tr.prototype)).constructor=er).prototype.register=function(t,e,o){void 0===e&&(e=[p]),void 0===o&&(o={});for(var i=0;i<t.length;i++){var r=t[i];this._valueFields[r]=e,this._otherFields[r]=o,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},er.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},er.prototype.valueFields=function(t){return this._valueFields[t.type]||[p]},er.prototype.otherFields=function(t){return this._otherFields[t.type]||[p]},er.prototype.bindPoint=function(t,e,o){var i,r,n,s=t.data,a=lt(o)?o:s[e],h={valueFields:{value:a}},o=this.valueFields(t),s=this._otherFields[t.type];return null===a?i=this._nullValue[t.type]:lt(a)?Array.isArray(a)?(n=a.slice(o.length),i=this._bindFromArray(a,o),r=this._bindFromArray(n,s)):"object"==typeof a&&(e=this.sourceFields(t,o),n=this.sourceFields(t,s),i=this._bindFromObject(a,o,e),r=this._bindFromObject(a,s,n)):i=this._undefinedValue[t.type],lt(i)&&(1===o.length?h.valueFields.value=i[o[0]]:h.valueFields=i),h.fields=r||{},h},er.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},er.prototype._bindFromArray=function(t,e){var o={};if(e)for(var i=Math.min(e.length,t.length),r=0;r<i;r++)o[e[r]]=t[r];return o},er.prototype._bindFromObject=function(t,e,o){void 0===o&&(o=e);var i={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=o[n];null!==a&&(i[s]=Ji(a,t))}return i},er.prototype.sourceFields=function(t,e){var o=[];if(e)for(var i=e.length,r=0;r<i;r++){var n=e[r],s=n===p?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},er);function er(){tr.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}Xe.current=new Xe;var or,ir,rr=Xe,nr=/percent(?:\w*)\((\d+)\)/,sr=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),ar=((ir=P.Class)&&(Cr.__proto__=ir),((Cr.prototype=Object.create(ir&&ir.prototype)).constructor=Cr).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,h=sr.exec(t);h?(this.valueGetter=this.createValueGetter(e,o),i=this.getAverage(a),r=this.getStandardDeviation(a,i,!1),h=h[1]?parseFloat(h[1]):1,n={low:i.value-r*h,high:i.value+r*h},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,o),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},Cr.prototype.createValueGetter=function(t,e){var o,i=t.data,r=rr.current,n=r.valueFields(t),i=lt(i[0])?i[0]:{};return x(i)?o=Y("["+(e?n.indexOf(e):0)+"]"):O(i)?o=Y():"object"==typeof i&&(o=Y(r.sourceFields(t,n)[n.indexOf(e)])),o},Cr.prototype.getErrorRange=function(t,e){if(!lt(e))return null;if(this.globalRange)return this.globalRange(t);if(x(e))i=t-e[0],r=t+e[1];else if(O(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=nr.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var o=t*(parseFloat(o[1])/100),i=t-Math.abs(o),r=t+Math.abs(o)}return{low:i,high:r}},Cr.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},Cr.prototype.getStandardDeviation=function(t,e,o){for(var i=t.length,o=o?e.count-1:e.count,r=0,n=0;n<i;n++){var s=this.valueGetter(t[n]);O(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/o)},Cr.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);O(n)&&(o+=n,i++)}return{value:o/i,count:i}},Cr),hr=(P.support.browser||{}).msie?.001:0,pr="zero",lr="interpolate",cr="bar",ur="column",dr="line",fr="pie",gr="verticalLine",yr=[cr,ur,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],vr="drag",mr="dragEnd",xr="zoom",_r="zoomEnd",br="DOMMouseScroll mousewheel",Ke=((or=le)&&(wr.__proto__=or),((wr.prototype=Object.create(or&&or.prototype)).constructor=wr).prototype.reflow=function(t){var e,o=this.options.endCaps,i=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,i),a=i?n.x:n.y,t=a-s,s=a+s;i?(e=[new Nt(n.x,r.y1),new Nt(n.x,r.y2)],o&&e.push(new Nt(t,r.y1),new Nt(s,r.y1),new Nt(t,r.y2),new Nt(s,r.y2)),this.box=new qt(t,r.y1,s,r.y2)):(e=[new Nt(r.x1,n.y),new Nt(r.x2,n.y)],o&&e.push(new Nt(r.x1,t),new Nt(r.x1,s),new Nt(r.x2,t),new Nt(r.x2,s)),this.box=new qt(r.x1,t,r.x2,s)),this.linePoints=e},wr.prototype.getCapsWidth=function(t,e){t=e?t.width():t.height();return Math.min(Math.floor(t/2),4)||4},wr.prototype.createVisual=function(){var e=this,t=this.options,o=t.visual;o?this.visual=o({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):this.createDefaultVisual()},wr.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};or.prototype.createVisual.call(this);for(var i=0;i<e.length;i+=2){var r=new P.drawing.Path(o).moveTo(e[i].x,e[i].y).lineTo(e[i+1].x,e[i+1].y);T(r),this.visual.append(r)}},wr);function wr(t,e,o,i,r,n){or.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}function Cr(t,e,o){ir.call(this),this.initGlobalRanges(t,e,o)}kt(Ke,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var Sr,kr=Ke,Ar=((Sr=kr)&&(Pr.__proto__=Sr),((Pr.prototype=Object.create(Sr&&Sr.prototype)).constructor=Pr).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},Pr);function Pr(){Sr.apply(this,arguments)}function Tr(t,e,o,i){void 0===i&&(i=!1);var r,n,s=(o=void 0===o?{}:o).defaults=o.defaults||{},a=o.depth=o.depth||0,h=!1;if(o.excluded=o.excluded||[],5<a)return null;for(r in t)!J(r,o.excluded)&&t.hasOwnProperty(r)&&(E(n=t[r])?(h=!0,i||(t[r]=Ct(n(e),s[r]))):V(n)&&(i||(o.defaults=s[r]),o.depth++,h=Tr(n,e,o,i)||h,o.depth--));return h}function Mr(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}var Or,eo=((Or=le)&&(Br.__proto__=Or),((Br.prototype=Object.create(Or&&Or.prototype)).constructor=Br).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Br.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=z({},o,{vertical:!this.options.invertAxes},t)),i},Br.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&O(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s,a,h=o[n];h&&(s=t.series.stack,a=h.series.stack,s&&a&&s.group!==a.group||O(h.value)&&(r+=Math.abs(h.value),i.push(Math.abs(h.value))))}if(0<r)return t.value/r}return t.value},Br.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var i=this.plotValue(t),r=0<=i,n=e,s=!1,a=0;a<o.length;a++){var h=o[a];if(t===h)break;var p=t.series.stack,l=h.series.stack;if(p&&l){if(typeof p===f&&p!==l)continue;if(p.group&&p.group!==l.group)continue}h=this.plotValue(h);(0<=h&&r||h<0&&!r)&&(n+=h,i+=h,s=!0,this.options.isStacked100&&(i=Math.min(i,1)))}return s&&(n-=e),[n,i]}e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,R(t.value)?t.value:e]},Br.prototype.stackLimits=function(t,e){for(var o=l,i=c,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];!a||a.series.stack!==e&&a.series.axis!==t||(a=this.plotRange(a,0)[1],lt(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},Br.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,o=t.series,i={};if(e)for(var r=0;r<o.length;r++){var n=o[r],s=n.axis,a=s+n.stack,h=i[a];h||(h=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(h.min=Math.min(h.min,At(n.negative).min)),n.positive.length&&(h.max=Math.max(h.max,At(n.positive).max))),h.min!==l||h.max!==c?i[a]=h:h=null),h&&(this.valueAxisRanges[s]=h)}},Br.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,h=e.fields.errorLow,e=e.fields.errorHigh;O(h)&&O(e)?i={low:h,high:e}:a&<(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new ar(a.value,n,p),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},Br.prototype.addPointErrorBar=function(t,e){var o,i=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high;this.options.isStacked?(s=(o=this.stackedErrorRange(t,e)).low,a=o.high):(this.updateRange({value:s},e={categoryIx:e,series:n}),this.updateRange({value:a},e));r=new Ar(s,a,i,this,n,r);t.errorBars=[r],t.append(r)},Br.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,o=t.high+o;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},i<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,i)),0<o&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,o)),{low:i,high:o}},Br.prototype.addValue=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.categoryPoints[o];n||(this.categoryPoints[o]=n=[]);var s=this.seriesPoints[r];s||(this.seriesPoints[r]=s=[]);r=this.createPoint(t,e);r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,lt(r.dataItem)||(r.dataItem=i.data[o]),this.addErrorBar(r,t,o)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},Br.prototype.evalPointOptions=function(t,e,o,i,r,n){var s={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n];lt(a)||(this._evalSeries[n]=a=Tr(t,{},s,!0));n=t;return a&&Tr(n=z({},t),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),n},Br.prototype.updateRange=function(t,e){var o=e.series.axis,e=t.value,t=this.valueAxisRanges[o];isFinite(e)&&null!==e&&((t=this.valueAxisRanges[o]=t||{min:l,max:c}).min=Math.min(t.min,e),t.max=Math.max(t.max,e))},Br.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(!e)throw new Error("Unable to locate value axis with name "+t);return e},Br.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],h=this.points,p=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var o=e.categoryIx,i=e.series,r=s.seriesValueAxis(i),n=h[l++],e=a[o];e||(a[o]=e=s.categorySlot(p,o,r)),n&&(i=s.plotRange(n,r.startValue()),(o=s.valueSlot(r,i))?(o=s.pointSlot(e,o),n.aboveAxis=s.aboveAxis(n,r),n.stackValue=i[1],s.options.isStacked100&&(n.percentage=s.plotValue(n)),s.reflowPoint(n,o)):n.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},Br.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},Br.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(vt(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},Br.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},Br.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},Br.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},Br.prototype.reflowPoint=function(t,e){t.reflow(e)},Br.prototype.reflowCategories=function(){},Br.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,e=o?t:e;return new qt(i.x1,e.y1,i.x2,e.y2)},Br.prototype.categorySlot=function(t,e){return t.getSlot(e)},Br.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=Mr(e),i=e.length,r=0;r<i;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<o;n++)for(var s=0;s<i;s++){var a=e[s],h=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:h,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var p=0;p<i;p++)this._outOfRangeCallback(e[p],"_outOfRangeMaxPoint",p,t)},Br.prototype._outOfRangeCallback=function(t,e,o,i){var r=t[e];r&&(e=r.categoryIx,i(this._bindPoint(t,o,e,r.item),{category:r.category,categoryIx:e,series:t,seriesIx:o,dataItem:r.item}))},Br.prototype._bindPoint=function(t,e,o,i){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];return(r=r||(this._bindCache[e]=[]))[o]||(r[o]=rr.current.bindPoint(t,o,i))},Br.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},Br.prototype.pointValue=function(t){return t.valueFields.value},Br);function Br(t,e){Or.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.categoryAxis=t.seriesCategoryAxis(e.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}kt(eo,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var Rr,Er=eo,Lr={click:function(t,e){return t.trigger("seriesClick",this.eventArgs(e))},hover:function(t,e){return t.trigger("seriesHover",this.eventArgs(e))},over:function(t,e){return t.trigger("seriesOver",this.eventArgs(e))},out:function(t,e){return t.trigger("seriesLeave",this.eventArgs(e))},eventArgs:function(t){return{value:this.value,percentage:this.percentage,stackValue:this.stackValue,category:this.category,series:this.series,dataItem:this.dataItem,runningTotal:this.runningTotal,total:this.total,element:gt(t),originalEvent:t,point:this}}},ro={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&<(e)&&null!==e&&(this.note=new Ze({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},uo=((Rr=le)&&(Ir.__proto__=Rr),((Ir.prototype=Object.create(Rr&&Rr.prototype)).constructor=Ir).prototype.render=function(){var t,e=this.options,o=e.markers,i=e.labels;this._rendered||(this._rendered=!0,o.visible&&o.size&&(this.marker=this.createMarker(),this.append(this.marker)),i.visible&&(t=W(i),e=this.pointData(),o=this.value,t?o=t(e):i.format&&(o=this.formatValue(i.format)),this.label=new ze(o,z({align:C,vAlign:C,margin:{left:5,right:5},zIndex:Ct(i.zIndex,this.series.zIndex)},i),e),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},Ir.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=z({color:this.color},t.border);return lt(t.color)||(t.color=new P.Color(e).brightness(.8).toHex()),t},Ir.prototype.createVisual=function(){},Ir.prototype.createMarker=function(){var t=this.options.markers;return new ve({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:this.series.opacity||t.opacity,zIndex:Ct(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Ir.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Ir.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,i=e.vertical;this.render();var r=(this.box=t).clone();if(i?o?r.y1-=r.height():r.y2+=r.height():o?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);this.note&&(o=this.markerBox(),e.markers.visible&&e.markers.size||(e=o.center(),o=new qt(e.x,e.y,e.x,e.y)),this.note.reflow(o))},Ir.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e="below"===(e="above"===e?A:e)?w:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},Ir.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,o=this.options.markers,i=o.size+(o.border.width||0)+(t.border.width||0),t=new ve({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Ct(t.border.opacity,1)},opacity:Ct(t.opacity,1)});return t.reflow(this._childBox),t.getElement()},Ir.prototype.highlightVisual=function(){return(this.marker||{}).visual},Ir.prototype.highlightVisualArgs=function(){var t,e,o,i,r=this.marker;return r?(i=r.paddingBox.toRect(),t=r.visual):(o=(e=this.options.markers.size)/2,r=this.box.center(),i=new P.geometry.Rect([r.x-o,r.y-o],[e,e])),{options:this.options,rect:i,visual:t}},Ir.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var o,i=t.x2+5,e=S,t=this.aboveAxis?(o=t.y1,w):(o=t.y2,A);return{point:new Nt(i,o),align:{horizontal:e,vertical:t}}}},Ir.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ir.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Ir.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Ir.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Ir);function Ir(t,e){Rr.call(this),this.value=t,this.options=e,this.aboveAxis=Ct(this.options.aboveAxis,!0),this.tooltipTracking=!0}uo.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:U(3),padding:U(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},z(uo.prototype,Lr),z(uo.prototype,ro);var zr,Vr=uo,at=((zr=le)&&(jr.__proto__=zr),((jr.prototype=Object.create(zr&&zr.prototype)).constructor=jr).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},jr.prototype.toGeometryPoints=function(t){for(var e=[],o=0,i=t.length;o<i;o++)t[o]&&!1!==t[o].visible&&e.push(t[o]._childBox.toRect().center());return e},jr.prototype.createVisual=function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!lt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},jr.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults;E(o)&&i&&(o=i.color);e=P.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&e.close(),this.visual=e},jr.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},jr);function jr(t,e,o){zr.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}kt(at,{closed:!1});var Dr=at;function Hr(t,e,o,i,r){var n=t.box,t=new P.geometry.Point;return t[e]=n[e+o],t[i]=n[i+r],t}var Ur,Vt={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,e=e.reverse,r=i?v:m,n=i?m:v,s=e?2:1,a=s,h=Hr(t[0],r,s,n,a),p=[h],l=1;l<t.length;l++){var c,u=Hr(t[l],r,s,n,a);h[r]!==u[r]&&((c=new P.geometry.Point)[r]=h[r],c[n]=u[n],p.push(c,u)),h=u}return o?h!==vt(p)&&p.push(h):p.push(Hr(vt(t),r,s,n,e?1:2)),p}},ee=((Ur=Dr)&&(Fr.__proto__=Ur),((Fr.prototype=Object.create(Ur&&Ur.prototype)).constructor=Fr).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},Fr);function Fr(){Ur.apply(this,arguments)}z(ee.prototype,Vt);var Nr,Gr,Wr=ee,Xr=((Gr=Dr)&&(Yr.__proto__=Gr),((Yr.prototype=Object.create(Gr&&Gr.prototype)).constructor=Yr).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color;E(o)&&e&&(o=e.color);e=new Hi(this.options.closed).process(this.points()),t=new P.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});t.segments.push.apply(t.segments,e),this.visual=t},Yr),It={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,r=o.length;this._segments=[];for(var n=0;n<r;n++){for(var s=i[n],a=this.sortPoints(o[n]),h=a.length,p=[],l=0;l<h;l++){var c=a[l];c?p.push(c):this.seriesMissingValues(s)!==lr&&(1<p.length&&(t=this.createSegment(p,s,n,t),this._addSegment(t)),p=[])}1<p.length&&(t=this.createSegment(p,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){t=t.missingValues;return!t&&this.options.isStacked?pr:t||lr},getNearestPoint:function(t,e,o){for(var i,r=new Nt(t,e),n=this.seriesPoints[o],s=l,a=0;a<n.length;a++){var h,p=n[a];p&<(p.value)&&null!==p.value&&!1!==p.visible&&((h=p.box.center().distanceTo(r))<s&&(i=p,s=h))}return i}},ae=((Nr=P.drawing.Animation)&&(qr.__proto__=Nr),((qr.prototype=Object.create(Nr&&Nr.prototype)).constructor=qr).prototype.setup=function(){this._setEnd(this.options.box.x1)},qr.prototype.step=function(t){var e=this.options.box;this._setEnd(tt(e.x1,e.x2,t))},qr.prototype._setEnd=function(t){var e=this.element,o=e.segments,i=o[1].anchor(),o=o[2].anchor();e.suspend(),i.setX(t),e.resume(),o.setX(t)},qr);function qr(){Nr.apply(this,arguments)}function Yr(){Gr.apply(this,arguments)}kt(ae,{duration:600}),P.drawing.AnimationFactory.current.register("clip",ae);var Zr=ae;function Qr(t){for(var e=0;e<t.length;e++)if(lt(t[e].zIndex))return!0}var Kr,ce={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(t=e.size(),e=P.drawing.Path.fromRect(t.toRect()),this.visual.clip(e),this.animation=new Zr(e,{box:t}),Qr(this.options.series)&&this._setChildrenAnimation(e))},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&<(i.visual.options.zIndex)&&i.visual.clip(t)}}},_e=((Kr=Er)&&($r.__proto__=Kr),(($r.prototype=Object.create(Kr&&Kr.prototype)).constructor=$r).prototype.render=function(){Kr.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},$r.prototype.pointType=function(){return Vr},$r.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.seriesMissingValues(r),e=t.valueFields.value;if(!lt(e)||null===e){if(s!==pr)return null;e=0}s=this.pointOptions(r,n),s=this.evalPointOptions(s,e,i,o,r,n),t=t.fields.color||r.color;E(r.color)&&(t=s.color);s=new Vr(e,s);return s.color=t,this.append(s),s},$r.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var o=t.categoryIx,i=this.categoryPoints[o],r=0;r<i.length;r++){var n=i[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},$r.prototype.createSegment=function(t,e,o){var i=e.style;return new("step"===i?Wr:"smooth"===i?Xr:Dr)(t,e,o)},$r.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e.concat(this._segments)},$r.prototype.supportsPointInactiveOpacity=function(){return!1},$r);function $r(){Kr.apply(this,arguments)}z(_e.prototype,It,ce);var Jr,tn,en=_e,on=((tn=Dr)&&(nn.__proto__=tn),((nn.prototype=Object.create(tn&&tn.prototype)).constructor=nn).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;E(i)&&e&&(i=e.color),this.visual=new P.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),0<o.width&&!1!==o.visible&&this.createStroke({stroke:z({color:i,opacity:t.opacity,lineCap:"butt"},o)})},nn.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},nn.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},nn.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},nn.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},nn.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new P.geometry.Segment(t)})},nn.prototype.createStroke=function(t){t=new P.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},nn.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},nn.prototype.createFill=function(t){var e,o=this.strokeSegments(),i=o.slice(0),r=this.hasStackSegment();r&&(e=this.stackSegments(),ht(i,e));t=new P.drawing.Path(t);t.segments.push.apply(t.segments,i),!r&&1<o.length&&this.fillToAxes(t),this.visual.append(t)},nn.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(i),e=i.getSlot(r,r,!0),i=this.strokeSegments(),r=i[0].anchor(),i=vt(i).anchor(),e=o?e.x1:e.y1;o?t.lineTo(e,i.y).lineTo(e,r.y):t.lineTo(i.x,e).lineTo(r.x,e)},nn),ge=((Jr=on)&&(rn.__proto__=Jr),((rn.prototype=Object.create(Jr&&Jr.prototype)).constructor=rn).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},rn.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},rn);function rn(){Jr.apply(this,arguments)}function nn(t,e,o,i,r){tn.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}z(ge.prototype,Vt);var sn,an,hn,pn,ln=ge,cn=((pn=on)&&(vn.__proto__=pn),((vn.prototype=Object.create(pn&&pn.prototype)).constructor=vn).prototype.createStrokeSegments=function(){var t=new Hi(this.options.closed),e=this.points();return t.process(e)},vn.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;0<=o;o--){var i=t[o];e.push(new P.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},vn),un=((hn=en)&&(yn.__proto__=hn),((yn.prototype=Object.create(hn&&hn.prototype)).constructor=yn).prototype.createSegment=function(t,e,o,i){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<o&&i&&("gap"!==this.seriesMissingValues(e)?(n=i.linePoints,r=i):n=this._gapStackPoints(t,o,a)),new("step"===a?ln:"smooth"===a?cn:on)(t,e,o,r,n)},yn.prototype.reflow=function(t){hn.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var o=0;o<e.length;o++){var i=e[o],r=this.categoryAxis.getSlot(i.categoryIx);i.reflow(r)}},yn.prototype._gapStackPoints=function(t,e,o){var i=this.seriesPoints,r=t[0].categoryIx,t=t.length;r<0&&(r=0,t--);var n=r+t,s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var h=r;h<n;h++){for(var p,l=h+s,c=e,u=void 0;u=i[--c][l],0<c&&!u;);u?("step"!==o&&r<h&&!i[c][l-1]&&a.push(this._previousSegmentPoint(h,l,l-1,c)),a.push(u),"step"!==o&&h+1<n&&!i[c][l+1]&&a.push(this._previousSegmentPoint(h,l,l+1,c))):(p=this._createGapStackPoint(h),this._stackPoints.push(p),a.push(p))}return a},yn.prototype._previousSegmentPoint=function(t,e,o,i){for(var r,n=this.seriesPoints,s=i;0<s&&!r;)r=n[--s][o];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},yn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Vr(0,e);return e.categoryIx=t,e.series={},e},yn.prototype.seriesMissingValues=function(t){return t.missingValues||pr},yn.prototype.supportsPointInactiveOpacity=function(){return!1},yn),dn=((an=P.Class)&&(gn.__proto__=an),((gn.prototype=Object.create(an&&an.prototype)).constructor=gn).prototype.update=function(t){var e,o=this.axisRanges;for(e in t){var i=t[e],r=o[e];o[e]=r=r||{min:l,max:c},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},gn.prototype.reset=function(t){this.axisRanges[t]=void 0},gn.prototype.query=function(t){return this.axisRanges[t]},gn),Se=((sn=le)&&(fn.__proto__=sn),((fn.prototype=Object.create(sn&&sn.prototype)).constructor=fn).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},fn.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,h=t;n.align=o?C:S,n.vAlign=o?A:C,"insideEnd"===e.position?o?(n.vAlign=A,!i&&s.height()<t.height()&&(n.vAlign=w)):n.align=i?k:S:e.position===C?(n.vAlign=C,n.align=C):"insideBase"===e.position?o?n.vAlign=i?w:A:n.align=i?S:k:"outsideEnd"===e.position&&(h=o?i?new qt(t.x1,t.y1-s.height(),t.x2,t.y1):new qt(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=C,i?new qt(t.x2,t.y1,t.x2+s.width(),t.y2):new qt(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(o?a.left=a.right=(h.width()-r.contentBox.width())/2:a.top=a.bottom=(h.height()-r.contentBox.height())/2),r.reflow(h)},fn.prototype.alignToClipBox=function(t){var e=this.options.vertical?m:v,o=e+"1",i=e+"2",r=this.children[0],e=this.parent.box;(e[o]<t[o]||t[i]<e[i])&&((r=r.paddingBox.clone())[o]=Math.max(e[o],t[o]),r[i]=Math.min(e[i],t[i]),this.reflow(r))},fn);function fn(t,e,o){sn.call(this,e),this.textBox=new ze(t,this.options,o),this.append(this.textBox)}function gn(){an.call(this),this.axisRanges={}}function yn(){hn.apply(this,arguments)}function vn(){pn.apply(this,arguments)}kt(Se,{position:"outsideEnd",margin:U(3),padding:U(4),color:r,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var mn=Se;function xn(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}var _n,Ve=((_n=le)&&(bn.__proto__=_n),((bn.prototype=Object.create(_n&&_n.prototype)).constructor=bn).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},bn.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=W(i))?e(t):this.formatValue(i.format),this.label=new mn(e,z({vertical:o.vertical},i),t),this.append(this.label))},bn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},bn.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var o=0;o<this.errorBars.length;o++)this.errorBars[o].reflow(t)},bn.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(_n.prototype.createVisual.call(this),i?(o=this.rectVisual=i({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:t.toRect(),createVisual:function(){var t=new P.drawing.Group;return e.createRect(t),t},options:o}))&&this.visual.append(o):0<t.width()&&0<t.height()&&this.createRect(this.visual))},bn.prototype.createRect=function(t){var e=this.options,o=e.border,i=(lt(o.opacity)?o:e).opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);r=this.rectVisual=P.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:o.width,opacity:i,dashType:o.dashType}}),i=this.box.width(),o=this.box.height();6<(e.vertical?i:o)&&(T(r),(i<1||o<1)&&(r.options.stroke.lineJoin="round")),t.append(r),xn(e)&&(e=this.createGradientOverlay(r,{baseColor:this.color},z({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(e))},bn.prototype.createHighlight=function(t){return T(P.drawing.Path.fromRect(this.box.toRect(),t))},bn.prototype.highlightVisual=function(){return this.rectVisual},bn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},bn.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=!lt(e)?new P.Color(t).brightness(o).toHex():e},bn.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,h=S,p=A;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?i=Math.max(n.y1,a.y1):(i=Math.min(n.y2,a.y2),p=w)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(p=w,t=s?(h=k,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,h=k),Math.max(n.y1,a.y1))),{point:new Nt(t,i),align:{horizontal:h,vertical:p}}},bn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},bn.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series}},bn);function bn(t,e){_n.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=Ct(this.options.aboveAxis,!0),this.value=t}z(Ve.prototype,Lr),z(Ve.prototype,ro),Ve.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var wn=Ve;function Cn(t,e){t.forEach(e)}function Sn(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}var kn,Me=((kn=le)&&(An.__proto__=kn),((An.prototype=Object.create(kn&&kn.prototype)).constructor=An).prototype.reflow=function(i){var t=this.options,e=t.vertical,o=t.gap,r=t.spacing,n=this.children,s=n.length,a=e?m:v,t=s+o+r*(s-1),h=(e?i.height():i.width())/t,p=i[a+1]+o/2*h;this.forEach(n,function(t,e){var o=(t.box||i).clone();o[a+1]=p,o[a+2]=p+h,t.reflow(o),e<s-1&&(p+=h*r),p+=h})},An);function An(t){kn.call(this,t),this.forEach=t.rtl?Sn:Cn}kt(Me,{vertical:!1,gap:0,spacing:0});var Pn,Tn=Me,Fe=((Pn=le)&&(Mn.__proto__=Pn),((Mn.prototype=Object.create(Pn&&Pn.prototype)).constructor=Mn).prototype.reflow=function(t){for(var e=this.options.vertical?v:m,o=this.children,i=o.length,r=this.box=new qt,n=0;n<i;n++){var s,a=o[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}},Mn);function Mn(){Pn.apply(this,arguments)}kt(Fe,{vertical:!0});var On,Bn=Fe,Xe=((On=Er)&&(Rn.__proto__=On),((Rn.prototype=Object.create(On&&On.prototype)).constructor=Rn).prototype.render=function(){On.prototype.render.call(this),this.updateStackRange()},Rn.prototype.pointType=function(){return wn},Rn.prototype.clusterType=function(){return Tn},Rn.prototype.stackType=function(){return Bn},Rn.prototype.stackLimits=function(t,e){return On.prototype.stackLimits.call(this,t,e)},Rn.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,h=s.isStacked,p=this.pointValue(t),l=this.pointOptions(r,n),e=l.labels;h&&"outsideEnd"===e.position&&(e.position="insideEnd"),l.isStacked=h;t=t.fields.color||r.color;p<0&&l.negativeColor&&(t=l.negativeColor),l=this.evalPointOptions(l,p,i,o,r,n),E(r.color)&&(t=l.color);l=new(this.pointType())(p,l);l.color=t;o=a[o];return o||(o=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),(h?this.getStackWrap(r,o):o).append(l),l},Rn.prototype.getStackWrap=function(t,e){var o,t=t.stack,i=t&&t.group||t,r=e.children;if(typeof i===f){for(var n=0;n<r.length;n++)if(r[n]._stackGroup===i){o=r[n];break}}else o=r[0];return o||((o=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=i,e.append(o)),o},Rn.prototype.categorySlot=function(t,e,o){var i=this.options,t=t.getSlot(e),e=o.startValue();return i.isStacked&&(e=o.getSlot(e,e,!0),t[(i=i.invertAxes?v:m)+1]=t[i+2]=e[i+1]),t},Rn.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Rn.prototype.createAnimation=function(){this._setAnimationOptions(),On.prototype.createAnimation.call(this),Qr(this.options.series)&&this._setChildrenAnimation()},Rn.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&<(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},Rn.prototype._setAnimationOptions=function(){var t,e=this.options,o=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),o.origin=new P.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},Rn);function Rn(){On.apply(this,arguments)}kt(Xe,{animation:{type:cr}});var En,Ln=Xe,Ke=((En=le)&&(In.__proto__=En),((In.prototype=Object.create(En&&En.prototype)).constructor=In).prototype.reflow=function(t){var e=this.options,o=this.value,i=this.owner.seriesValueAxis(e),e=i.getSlot(o.open,o.close),i=i.getSlot(o.low,o.high);e.x1=i.x1=t.x1,e.x2=i.x2=t.x2,this.realBody=e;o=i.center().x,t=[];t.push([[o,i.y1],[o,e.y1]]),t.push([[o,e.y2],[o,i.y2]]),this.lines=t,this.box=i.clone().wrap(e),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},In.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},In.prototype.createVisual=function(){En.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},In.prototype.mainVisual=function(t){var e=new P.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},In.prototype.createBody=function(t,e){var o=P.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});0<e.border.width&&o.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Ct(e.border.opacity,e.opacity)}),T(o),t.append(o),xn(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},z({end:e.vertical?void 0:[0,1]},e.overlay)))},In.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},In.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:Ct(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=P.drawing.Path.fromPoints(o[n],r);T(s),t.append(s)}},In.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=!lt(e)?new P.Color(this.color).brightness(t._brightness).toHex():e},In.prototype.createOverlay=function(){var t=P.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},In.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;t=this.mainVisual(z({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,t},In.prototype.highlightVisual=function(){return this._mainVisual},In.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},In.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new Nt(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:S,vertical:A}}},In.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},In.prototype.overlapsBox=function(t){return this.box.overlaps(t)},In);function In(t,e){En.call(this,e),this.value=t}kt(Ke,{vertical:!0,border:{_brightness:.8},line:{width:2},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{4:d}</th></tr><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}}),z(Ke.prototype,Lr),z(Ke.prototype,ro);var zn=Ke;function Vn(t){return Qi(t)===t.length}var jn,eo=((jn=Er)&&(Dn.__proto__=jn),((Dn.prototype=Object.create(jn&&jn.prototype)).constructor=Dn).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Dn.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=Vn(this.splitValue(p)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e));a=a[i];a||(a=new Tn({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),o&&(this.updateRange(p,e),a.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c,o.noteText=t.fields.noteText),this.points.push(o),u.push(o)},Dn.prototype.pointType=function(){return zn},Dn.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,h=z({},r),e=t.fields.color||r.color,h=this.evalPointOptions(h,a,i,o,r,n);"candlestick"===r.type&&a.open>a.close&&(e=t.fields.downColor||r.downColor||r.color),E(r.color)&&(e=h.color),h.vertical=!this.options.invertAxes;h=new s(a,h);return h.color=e,h},Dn.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},Dn.prototype.updateRange=function(t,e){var o=e.series.axis,e=this.splitValue(t),t=this.valueAxisRanges[o],t=this.valueAxisRanges[o]=t||{min:l,max:c};this.valueAxisRanges[o]={min:Math.min.apply(Math,e.concat([t.min])),max:Math.max.apply(Math,e.concat([t.max]))}},Dn.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.open,o.high,o.low,o.close,t.category)},Dn.prototype.animationPoints=function(){return this.points},Dn);function Dn(){jn.apply(this,arguments)}z(eo.prototype,ce);var Hn,Un=eo,uo=((Hn=zn)&&(Fn.__proto__=Hn),((Fn.prototype=Object.create(Hn&&Hn.prototype)).constructor=Fn).prototype.reflow=function(t){var e,o,i=this.options,r=this.value,n=this.owner.seriesValueAxis(i);this.boxSlot=o=n.getSlot(r.q1,r.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t);i=n.getSlot(r.median);r.mean&&(r=n.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,r)),this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,i),this.box=e.clone().wrap(o),this.reflowNote()},Fn.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},Fn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},Fn.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Fn.prototype.calcWhiskerPoints=function(t,e){var o=e.center().x;return[[[o-5,e.y1],[o+5,e.y1],[o,e.y1],[o,t.y1]],[[o-5,e.y2],[o+5,e.y2],[o,e.y2],[o,t.y2]]]},Fn.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Fn.prototype.renderOutliers=function(t){for(var e=this.value,o=e.outliers||[],i=3*Math.abs(e.q3-e.q1),r=[],n=(t.markers,0);n<o.length;n++){var s=o[n],a=z({},(h=s<e.q3+i&&s>e.q1-i?t.outliers:t.extremes).border);lt(a.color)||(lt(this.color)?a.color=this.color:a.color=new P.Color(h.background).brightness(.8).toHex());var h=new ve({type:h.type,width:h.size,height:h.size,rotation:h.rotation,background:h.background,border:a,opacity:h.opacity});h.value=s,r.push(h)}return this.reflowOutliers(r),r},Fn.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),o=this.box.center(),i=0;i<t.length;i++){var r=t[i].value,r=e.getSlot(r);this.options.vertical?r.move(o.x):r.move(void 0,o.y),this.box=this.box.wrap(r),t[i].reflow(r)}},Fn.prototype.mainVisual=function(t){for(var e=Hn.prototype.mainVisual.call(this,t),o=this.renderOutliers(t),i=0;i<o.length;i++){var r=o[i].getElement();r&&e.append(r)}return e},Fn.prototype.createLines=function(t,e){this.drawLines(t,e,this.whiskerPoints,e.whiskers),this.drawLines(t,e,this.medianPoints,e.median),this.drawLines(t,e,this.meanPoints,e.mean)},Fn.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Hn.prototype.getBorderColor.call(this)},Fn);function Fn(t,e){Hn.call(this,t,e),this.createNote()}kt(uo,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:8,type:"cross",background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:u,background:a,border:{width:2,opacity:1},opacity:0}}),z(uo.prototype,Lr);var Nn,Gn,Wn,Xn=uo,qn=((Wn=Xn)&&($n.__proto__=Wn),(($n.prototype=Object.create(Wn&&Wn.prototype)).constructor=$n).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},$n.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},$n.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},$n.prototype.calcWhiskerPoints=function(t,e){var o=e.center().y;return[[[e.x1,o-5],[e.x1,o+5],[e.x1,o],[t.x1,o]],[[e.x2,o-5],[e.x2,o+5],[e.x2,o],[t.x2,o]]]},$n.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},$n),Yn=((Gn=Un)&&(Kn.__proto__=Gn),((Kn.prototype=Object.create(Gn&&Gn.prototype)).constructor=Kn).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=Vn(this.splitValue(p)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e));a=a[i];a||(a=new Tn({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),o&&(this.updateRange(p,e),a.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c),this.points.push(o),u.push(o)},Kn.prototype.pointType=function(){return this.options.invertAxes?qn:Xn},Kn.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Kn.prototype.updateRange=function(t,e){var o=e.series.axis,i=this.valueAxisRanges[o],e=this.splitValue(t).concat(this.filterOutliers(t.outliers));lt(t.mean)&&(e=e.concat(t.mean)),i=this.valueAxisRanges[o]=i||{min:l,max:c},this.valueAxisRanges[o]={min:Math.min.apply(Math,e.concat([i.min])),max:Math.max.apply(Math,e.concat([i.max]))}},Kn.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.lower,o.q1,o.median,o.q3,o.upper,o.mean,t.category)},Kn.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];lt(r)&&null!==r&&o.push(r)}return o},Kn.prototype.supportsPointInactiveOpacity=function(){return!1},Kn),Zn=((Nn=kr)&&(Qn.__proto__=Nn),((Qn.prototype=Object.create(Nn&&Nn.prototype)).constructor=Qn).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},Qn);function Qn(){Nn.apply(this,arguments)}function Kn(){Gn.apply(this,arguments)}function $n(){Wn.apply(this,arguments)}function Jn(t){return lt(t)&&null!==t}var ts,at=((ts=le)&&(es.__proto__=ts),((es.prototype=Object.create(ts&&ts.prototype)).constructor=es).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},es.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},es.prototype.addErrorBar=function(t,e,o){var i,r=t.value[e],n=e+"Value",s=o.seriesIx,a=o.series,h=t.options.errorBars,p=o[e+"ErrorLow"],o=o[e+"ErrorHigh"];O(r)&&(O(p)&&O(o)&&(i={low:p,high:o}),h&<(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new ar(h[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,h[n])),i&&this.addPointErrorBar(i,t,e))},es.prototype.addPointErrorBar=function(t,e,o){var i=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=o===m,t={};e[o+"Low"]=i,e[o+"High"]=r,e.errorBars=e.errorBars||[];s=new Zn(i,r,a,this,n,s);e.errorBars.push(s),e.append(s),t[o]=i,this.updateRange(t,n),t[o]=r,this.updateRange(t,n)},es.prototype.addValue=function(t,e){var o,i=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n],t=t;(t=!Jn(i)||!Jn(r)?this.createMissingValue(t,s):t)&&((o=this.createPoint(t,e))&&(Object.assign(o,e),this.addErrorBar(o,v,e),this.addErrorBar(o,m,e)),this.updateRange(t,e.series)),this.points.push(o),n.push(o)},es.prototype.seriesMissingValues=function(t){return t.missingValues},es.prototype.createMissingValue=function(){},es.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,r=e.yAxis,n=t.x,s=t.y,e=this.xAxisRanges[i],t=this.yAxisRanges[r];Jn(n)&&(e=this.xAxisRanges[i]=e||{min:l,max:c},B(n)&&(n=Xo(o,n)),e.min=Math.min(e.min,n),e.max=Math.max(e.max,n)),Jn(s)&&(t=this.yAxisRanges[r]=t||{min:l,max:c},B(s)&&(s=Xo(o,s)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))},es.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[r];lt(s)||(this._evalSeries[r]=s=Tr(t,{},n,!0));r=t;return s&&Tr(r=z({},t),{value:e,series:i,dataItem:o.dataItem},n),r},es.prototype.pointType=function(){return Vr},es.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=z({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},es.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color,i=this.evalPointOptions(i,t,e);E(o.color)&&(r=i.color);i=new Vr(t,i);return i.color=r,this.append(i),i},es.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,t=e?i.namedXAxes[e]:i.axisX,i=o?i.namedYAxes[o]:i.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!i)throw new Error("Unable to locate Y axis with name "+o);return{x:t,y:i}},es.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var o=n[a++],i=r.seriesAxes(e.series),e=i.x.getSlot(t.x,t.x,s),t=i.y.getSlot(t.y,t.y,s);o&&(e&&t?(t=r.pointSlot(e,t),o.reflow(t)):o.visible=!1)}),this.box=t},es.prototype.pointSlot=function(t,e){return new qt(t.x1,e.y1,t.x2,e.y2)},es.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=this.seriesPoints,i=0;i<e.length;i++){var r=e[i];o[i]||(o[i]=[]);for(var n=0;n<r.data.length;n++){var s=this._bindPoint(r,i,n),a=s.valueFields,s=s.fields;t(a,z({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},s))}}},es.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},es.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},es);function es(t,e){ts.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}kt(at,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),z(at.prototype,ce,{_bindPoint:Er.prototype._bindPoint});var os,is=at,ee=((os=Vr)&&(rs.__proto__=os),((rs.prototype=Object.create(os&&os.prototype)).constructor=rs).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,o=this.options.markers,i=this.box.center(),r=(o.size+o.border.width+e.width)/2,n=new P.drawing.Group,s=new P.drawing.Circle(new P.geometry.Circle([i.x,i.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:o.background,stops:[{offset:0,color:o.background,opacity:.3},{offset:1,color:o.background,opacity:0}]})}),t=new P.drawing.Circle(new P.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new P.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,t),n},rs);function rs(t,e){os.call(this,t,e),this.category=t.category}ee.prototype.defaults=z({},ee.prototype.defaults,{labels:{position:C},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),ee.prototype.defaults.highlight.zIndex=void 0;var ns,ss=ee,ae=((ns=is)&&(as.__proto__=ns),((as.prototype=Object.create(ns&&ns.prototype)).constructor=as).prototype._initFields=function(){this._maxSize=c,ns.prototype._initFields.call(this)},as.prototype.addValue=function(t,e){null!==t.size&&(0<t.size||t.size<0&&e.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(t.size)),ns.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},as.prototype.reflow=function(t){this.updateBubblesSize(t),ns.prototype.reflow.call(this,t)},as.prototype.pointType=function(){return ss},as.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,r=e.pointIx*(600/i),n={delay:r,duration:600-r,type:"bubble"},i=e.color||o.color;t.size<0&&o.negativeValues.visible&&(i=Ct(o.negativeValues.color,i));n=z({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(o,e.seriesIx),{markers:{type:u,border:o.border,opacity:o.opacity,animation:n}}),n=this.evalPointOptions(n,t,e);E(o.color)&&(i=n.color),n.markers.background=i;n=new ss(t,n);return n.color=i,this.append(n),n},as.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),i=0;i<e.length;i++)for(var r=e[i],n=this.seriesPoints[i],s=(r.minSize||Math.max(.02*o,10))/2,a=(r.maxSize||.2*o)/2,h=Math.PI*s*s,p=(Math.PI*a*a-h)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(u=Math.abs(d.value.size)*p,c=Math.sqrt((h+u)/Math.PI),u=Ct(d.options.zIndex,0)+(1-c/a),z(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},as.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},as.prototype.createAnimation=function(){},as.prototype.createVisual=function(){},as);function as(){ns.apply(this,arguments)}kt(ae,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var hs,ps=ae,_e=((hs=ve)&&(ls.__proto__=hs),(ls.prototype=Object.create(hs&&hs.prototype)).constructor=ls);function ls(){hs.apply(this,arguments)}z(_e.prototype,Lr);var cs,us=_e,ge=((cs=le)&&(ds.__proto__=cs),((ds.prototype=Object.create(cs&&cs.prototype)).constructor=ds).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,lt(this.value.target)&&(this.target=new us({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:A,align:k}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},ds.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,i=this.owner,r=e.invertAxes,n=i.seriesValueAxis(this.options),s=i.categorySlot(i.categoryAxis,e.categoryIx,n),i=n.getSlot(this.value.target),n=r?i:s,i=r?s:i;o&&(i=new qt(n.x1,i.y1,n.x2,i.y2),o.options.height=r?i.height():e.target.line.width,o.options.width=r?e.target.line.width:i.width(),o.reflow(i)),this.note&&this.note.reflow(t),this.box=t},ds.prototype.createVisual=function(){cs.prototype.createVisual.call(this);var t=this.options,e=P.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});0<t.border.width&&e.options.set("stroke",{color:t.border.color||this.color,width:t.border.width,dashType:t.border.dashType,opacity:Ct(t.border.opacity,t.opacity)}),T(this.bodyVisual=e),this.visual.append(e)},ds.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=P.drawing.Animation.create(this.bodyVisual,this.options.animation))},ds.prototype.createHighlight=function(t){return P.drawing.Path.fromRect(this.box.toRect(),t)},ds.prototype.highlightVisual=function(){return this.bodyVisual},ds.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},ds.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ds);function ds(t,e){cs.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}ge.prototype.tooltipAnchor=wn.prototype.tooltipAnchor,kt(ge,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),z(ge.prototype,Lr),z(ge.prototype,ro);var fs,gs=ge,Se=((fs=Er)&&(ys.__proto__=fs),((ys.prototype=Object.create(fs&&fs.prototype)).constructor=ys).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},ys.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},ys.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,h=t.valueFields,e=z({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:o,invertAxes:s.invertAxes},r),t=t.fields.color||r.color,e=this.evalPointOptions(e,h,i,o,r,n);E(r.color)&&(t=e.color);e=new gs(h,e);e.color=t;o=a[o];return o||(o=new Tn({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),o.append(e),e},ys.prototype.updateRange=function(t,e){var o=t.current,i=t.target,t=e.series.axis,e=this.valueAxisRanges[t];lt(o)&&!isNaN(o)&<(i&&!isNaN(i))&&((e=this.valueAxisRanges[t]=e||{min:l,max:c}).min=Math.min(e.min,o,i),e.max=Math.max(e.max,o,i))},ys.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},ys.prototype.pointValue=function(t){return t.valueFields.current},ys.prototype.aboveAxis=function(t){return 0<t.value.current},ys.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var o=t[e];o.options.animation=this.options.animation,o.createAnimation()}},ys);function ys(t,r){!function(){for(var t=r.series,e=0;e<t.length;e++){var o=t[e],i=o.data;!i||x(i[0])||V(i[0])||(o.data=[i])}}(),fs.call(this,t,r)}Se.prototype._setAnimationOptions=Ln.prototype._setAnimationOptions,kt(Se,{animation:{type:cr}});var vs,ms=Se,Ve=((vs=P.Class)&&(xs.__proto__=vs),((xs.prototype=Object.create(vs&&vs.prototype)).constructor=xs).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color;e&&(r=e.color||e.options.color,o=Ct(o,r),i=Ct(i,r));var r=U(t.padding||{},"auto");return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:j(t.border.width),paddingTop:j(r.top),paddingBottom:j(r.bottom),paddingLeft:j(r.left),paddingRight:j(r.right)}},xs.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o);t.style=o;o=new P.Color(o.backgroundColor);lt(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},xs.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},xs.prototype.destroy=function(){delete this.chartService},xs);function xs(t,e){vs.call(this),this.chartService=t,this.options=z({},this.options,e)}kt(Ve,{border:{width:1},opacity:1});var _s,Me=Ve,Fe=((_s=Me)&&(bs.__proto__=_s),((bs.prototype=Object.create(_s&&_s.prototype)).constructor=bs).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},bs.prototype.showAt=function(t){var e=this.crosshair.axis,o=this.options,i=e[o.stickyMode?"getCategory":"getValue"](t),r=i;o.format?r=this.formatService.auto(o.format,i):e.options.type===y&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],i)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},bs.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},bs.prototype.getAnchor=function(){var t,e,o=this.crosshair,i=this.options,r=i.position,n=i.padding,i=!o.axis.options.vertical,o=o.line.bbox(),n=i?(t=C,r===w?(e=A,o.bottomLeft().translate(0,n)):(e=w,o.topLeft().translate(0,-n))):(e=C,r===S?(t=k,o.topLeft().translate(-n,0)):(t=S,o.topRight().translate(n,0)));return{point:n,align:{horizontal:t,vertical:e}}},bs);function bs(t,e,o){_s.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}kt(Fe,{padding:10});var ws,Cs=Fe,Xe=((ws=le)&&(Ss.__proto__=ws),((Ss.prototype=Object.create(ws&&ws.prototype)).constructor=Ss).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},Ss.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},Ss.prototype.moveLine=function(){var t=this.axis,e=this.point,o=t.options.vertical,i=this.getBox(),r=o?m:v,n=new P.geometry.Point(i.x1,i.y1),o=o?new P.geometry.Point(i.x2,i.y1):new P.geometry.Point(i.x1,i.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=o[r]=t.center()[r]):n[r]=o[r]=e[r]),this.box=i,this.line.moveTo(n).lineTo(o)},Ss.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,n=e.lineBox().clone(),e=r?v:m,s=0;s<i;s++){var a=o[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return n[e+1]=t[e+1],n[e+2]=t[e+2],n},Ss.prototype.createVisual=function(){ws.prototype.createVisual.call(this);var t=this.options;this.line=new P.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},Ss.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),ws.prototype.destroy.call(this)},Ss);function Ss(t,e,o){ws.call(this,o),this.axis=e,this.stickyMode=e instanceof Ko;e=this.options.tooltip;e.visible&&(this.tooltip=new Cs(t,this,z({},e,{stickyMode:this.stickyMode})))}kt(Xe,{color:r,width:2,zIndex:-1,tooltip:{visible:!1}});var ks,As=Xe,Ke=((ks=le)&&(Ps.__proto__=ks),((Ps.prototype=Object.create(ks&&ks.prototype)).constructor=Ps).prototype.shouldClip=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)if(!0===t[o].options.clip)return!0;return!1},Ps.prototype._clipBox=function(){return this.pane.chartsBox()},Ps.prototype.createVisual=function(){var t;this.visual=new P.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),T(t=P.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},Ps.prototype.stackRoot=function(){return this},Ps.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,o=0;o<t.length;o++)for(var i=t[o].points||{},r=i.length,n=0;n<r;n++){var s,a=i[n];a&&!1!==a.visible&&a.overlapsBox&&a.overlapsBox(e)&&(a.unclipElements?a.unclipElements():(s=a.label,a=a.note,s&&s.options.visible&&(s.alignToClipBox&&s.alignToClipBox(e),s.options.noclip=!0),a&&a.options.visible&&(a.options.noclip=!0)))}},Ps.prototype.destroy=function(){ks.prototype.destroy.call(this),delete this.parent},Ps);function Ps(t,e){ks.call(this,t),this.pane=e}Ke.prototype.isStackRoot=!0;var Ts,Ms=Ke,eo=((Ts=fe)&&(Bs.__proto__=Ts),((Bs.prototype=Object.create(Ts&&Ts.prototype)).constructor=Bs).prototype.createTitle=function(){var t=this.options.title;V(t)&&(t=z({},t,{align:t.position,position:A})),this.title=Ue.buildTitle(t,this,Bs.prototype.options.title)},Bs.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},Bs.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},Bs.prototype.appendChart=function(t){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(t),this.chartContainer.append(t),t.pane=this},Bs.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var o=0;o<this.charts.length;o++)t.removeChart(this.charts[o])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},Bs.prototype.reflow=function(t){var e;vt(this.children)===this.content&&(e=this.children.pop()),Ts.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},Bs.prototype.visualStyle=function(){var t=Ts.prototype.visualStyle.call(this);return t.zIndex=-10,t},Bs.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},Bs.prototype.stackRoot=function(){return this},Bs.prototype.clipRoot=function(){return this},Bs.prototype.createGridLines=function(){for(var t,e=this.axes,o=e.concat(this.parent.axes),i=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,h=a?i:r,p=0;p<o.length;p++)0!==h.length||a!==(t=o[p]).options.vertical&&ht(h,s.createGridLines(t))},Bs.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),(this.content.parent=this).title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},Bs.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new qt,i=0;i<e;i++){var r=t[i],n=r.options.vertical?m:v,r=r.lineBox();o[n+1]=r[n+1],o[n+2]=r[n+2]}if(0===o.x2)for(var s=this.parent.axes,a=s.length,h=0;h<a;h++){var p=s[h];p.options.vertical||(p=p.lineBox(),o.x1=p.x1,o.x2=p.x2)}return o},Bs.prototype.clipBox=function(){return this.chartContainer.clipBox},Bs.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new qi(this),index:this.paneIndex,name:this.options.name})},Bs),Os=1;function Bs(t){Ts.call(this,t),this.id="pane"+Os++,this.createTitle(),this.content=new le,this.chartContainer=new Ms({},this),this.append(this.content),this.axes=[],this.charts=[]}eo.prototype.isStackRoot=!0,kt(eo,{zIndex:-1,shrinkToFit:!0,title:{align:S},visible:!0});var Rs=eo;function Es(t,e){null!==e&&t.push(e)}function Ls(t,e,o){e=e.visible;if(lt(e))return e;t=t.pointVisibility;return t?t[o]:void 0}function Is(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=rr.current.bindPoint(t,n),a=s.valueFields.value;O(a=B(a)?parseFloat(a):a)?(s.visible=!1!==Ls(t,s.fields,n),s.value=Math.abs(a),o.push(s),s.visible&&(i+=s.value),0!==a&&r++):o.push(null)}return{total:i,points:o,count:r}}function zs(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Vs(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];J(n.type,i)&&o.push(n)}return o}function js(t,e,o){if(null===e)return e;var i="_date_"+t,r=e[i];return r||(r=Xo(o,Y(t)(e)),e[i]=r),r}function Ds(t,e){t=t.type,e=e instanceof Date;return!t&&e||zs(t,y)}function Hs(t){return 1===t.length?t[0]:t}var Us=/area/i;function Fs(t,e){var o,i=rr.current.bindPoint(t,null,e).valueFields;for(o in i)if(R(i[o]))return!0}function Ns(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,h=t.hasItem,p=t.series,l=i;h(l+=r)&&(e=Fs(p,(o=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return o}function Gs(t,e,o,i,r){var n,s,a,h=e.min,p=e.max,l=0<h&&h<o,c=p+1<o;(l||c)&&(((e=t).missingValues||(Us.test(e.type)||e.stack?pr:lr))!==lr?(l&&(n=i(h-1)),c&&(s=i(p+1))):(l&&(n=Fs(t,(a=i(h-1)).item)?a:Ns({start:h,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),c&&(s=Fs(t,(a=i(p+1)).item)?a:Ns({start:p,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s&&(t._outOfRangeMaxPoint=s))}var Ws,uo=((Ws=le)&&(Xs.__proto__=Ws),((Xs.prototype=Object.create(Ws&&Ws.prototype)).constructor=Xs).prototype.initFields=function(){},Xs.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},Xs.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,o=this.options.panes||[],i=Math.max(o.length,1),r=[],n=z({title:{color:t.color}},e),s=0;s<i;s++){var a=z({},n,o[s]);B(a.title)&&(a.title=z({text:a.title},n.title));a=new Rs(a);a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},Xs.prototype.crosshairOptions=function(t){return t.options.crosshair},Xs.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.axes.length;i++){var r=o.axes[i],n=this.crosshairOptions(r);n&&n.visible&&(n=new As(this.chartService,r,n),this.crosshairs.push(n),o.content.append(n))}},Xs.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,o=t.axes,i=e.length-1;0<=i;i--)for(var r=0;r<o.length;r++)if(e[i].axis===o[r]){e.splice(i,1);break}},Xs.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},Xs.prototype.findPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].options.name===t){e=o[i];break}return e||o[0]},Xs.prototype.findPointPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].box.containsPoint(t)){e=o[i];break}return e},Xs.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},Xs.prototype.removeAxis=function(t){for(var e=[],o=0;o<this.axes.length;o++){var i=this.axes[o];t!==i?e.push(i):i.destroy()}this.axes=e},Xs.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},Xs.prototype.removeChart=function(t){for(var e=[],o=0;o<this.charts.length;o++){var i=this.charts[o];i!==t?e.push(i):i.destroy()}this.charts=e},Xs.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,i=o.labels||{},r=o.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var h,p,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(h=u.name,(l=!d&&W(n)||W(i))&&(h=l({text:Jn(h)?h:"",series:u})),c=u._defaults,E(p=u.color)&&c&&(p=c.color),c=l=void 0,c=d?(l={},p):(l={color:n.color,font:n.font},r.markers.color),Jn(h)&&""!==h&&s.push({text:h,labels:l,markerColor:c,series:u,active:d}))}ht(o.items,s)},Xs.prototype.groupAxes=function(t){for(var e=[],o=[],i=0;i<t.length;i++)for(var r=t[i].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?o:e).push(s)}return{x:e,y:o,any:e.concat(o)}},Xs.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},o=0;o<t.length;o++){var i=t[o],r=this.seriesPaneName(i);e[r]?e[r].push(i):e[r]=[i]}return e},Xs.prototype.filterVisibleSeries=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];!1!==i.visible&&e.push(i)}return e},Xs.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=U(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},Xs.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();t=this.getRoot();t&&t.cleanGradients();for(var o=0;o<e.length;o++)this.removeCrosshairs(e[o]),e[o].empty();this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var i=0;i<e.length;i++)e[i].refresh()},Xs.prototype.axisCrossingValues=function(t,e){for(var t=t.options,o=[].concat(t.axisCrossingValues||t.axisCrossingValue),i=e.length-o.length,r=o[0]||0,n=0;n<i;n++)o.push(r);return o},Xs.prototype.alignAxisTo=function(t,e,o,i){var r=t.getSlot(o,o,!0),n=t.options.reverse?2:1,o=e.getSlot(i,i,!0),i=e.options.reverse?2:1,n=t.box.translate(o[v+i]-r[v+n],o[m+i]-r[m+n]);t.pane!==e.pane&&n.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(n)},Xs.prototype.alignAxes=function(t,e){for(var o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},h={},p={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,f=!1!==c.options.visible,g=Ys(t,u)||o,u=r;g!==o&&(u=this.axisCrossingValues(g,e)),this.alignAxisTo(c,g,n[l],u[l]),c.options._overlap||(bt(c.lineBox().x1)===bt(g.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,S).translate(-c.options.margin,0)),f&&(s[d]=c)),bt(c.lineBox().x2)===bt(g.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,g,n[l],u[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,k).translate(c.options.margin,0)),f&&(a[d]=c)),0!==l&&i.pane===c.pane&&(c.alignTo(i),c.reflow(c.box)))}for(var y=0;y<t.length;y++){var v=t[y],m=v.pane,x=m.id,_=!1!==v.options.visible,b=Ys(e,m)||i,m=n;b!==i&&(m=this.axisCrossingValues(b,t)),this.alignAxisTo(v,b,r[y],m[y]),v.options._overlap||(bt(v.lineBox().y1)===bt(b.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,b,r[y],m[y]),h[x]&&v.reflow(v.box.alignTo(h[x].box,A).translate(0,-v.options.margin)),_&&(h[x]=v)),bt(v.lineBox().y2,3)===bt(b.lineBox().y2,3)&&(p[x]&&v.reflow(v.box.alignTo(p[x].box,w).translate(0,v.options.margin)),_&&(p[x]=v)),0!==y&&(v.alignTo(o),v.reflow(v.box)))}},Xs.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=qs(e),i=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(i=Math.max(i,o.width()-n.contentBox.width()))}if(0!==i)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(i,0))}},Xs.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,qs(r).height()-i.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},Xs.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,o=0,i=0;i<t.length;i++){var r=t[i],n=r.axes,s=r.contentBox;if(0<n.length)for(var r=qs(n),a=Math.max(s.y1-r.y1,s.y2-r.y2),o=Math.max(o,s.x1-r.x1),h=0;h<n.length;h++){var p=n[h];p.reflow(p.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(o,0))}},Xs.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),o=0;o<t.length;o++)this.reflowPaneAxes(t[o]);0<e.x.length&&0<e.y.length&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},Xs.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=Zs(o),r=0;r<i.length;r++)i[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<o.length;n++)this.reflowPaneAxes(o[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(o))}},Xs.prototype.reflowPaneAxes=function(t){var e=t.axes,o=e.length;if(0<o)for(var i=0;i<o;i++)e[i].reflow(t.contentBox)},Xs.prototype.reflowCharts=function(t){for(var e=this.charts,o=e.length,i=this.box,r=0;r<o;r++){var n=e[r].pane;n&&!J(n,t)||e[r].reflow(i)}},Xs.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,n=t.y1,s=0;s<o;s++){var a=e[s],h=a.options.height;a.options.width=t.width(),a.options.height?(h.indexOf&&h.indexOf("%")&&(h=parseInt(h,10)/100,a.options.height=h*t.height()),a.reflow(t.clone()),i-=a.options.height):r++}for(var p=0;p<o;p++){var l=e[p];l.options.height||(l.options.height=i/r)}for(var c=0;c<o;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},Xs.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,o=0;o<e;o++)for(var i=t[o],r=0;r<e;r++){var n,s=t[r];i.options.vertical!==s.options.vertical&&(s=i.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},Xs.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},Xs.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(P.drawing.Path.fromRect(e[o].toRect()))},Xs.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},Xs.prototype.createVisual=function(){Ws.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,o=t.background,t=t.border;void 0===t&&(t={}),""!==o&&null!==o&&"none"!==o&&"transparent"!==o&<(o)||(o=a,e=0);t=this._bgVisual=new P.drawing.MultiPath({fill:{color:o,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1});this.addBackgroundPaths(t),this.appendVisual(t)},Xs.prototype.pointsByCategoryIndex=function(t){var e=this.charts,o=[];if(null!==t)for(var i=0;i<e.length;i++)if("_navigator"!==e[i].pane.options.name){var r=e[i].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&<(s.value)&&null!==s.value&&o.push(s)}}return o},Xs.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},Xs.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},Xs.prototype.filterPoints=function(t){for(var e=this.charts,o=[],i=0;i<e.length;i++)for(var r=e[i].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&o.push(s)}return o},Xs.prototype.findPoint=function(t){for(var e=this.charts,o=0;o<e.length;o++)for(var i=e[o].points,r=0;r<i.length;r++){var n=i[r];if(n&&!1!==n.visible&&t(n))return n}},Xs.prototype.paneByPoint=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.box.containsPoint(t))return i}},Xs.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},Xs.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=Ys(e,n)||e[0],s=this.createLabelAxis(r,i+o,s);s&&(o++,r=n.axes.indexOf(r)+o,n.appendAxisAt(s,r))}},Xs.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,n=i.visible;if("end"!==r&&"start"!==r||!1===n)return null;i=this.groupAxes(this.panes),n=o.options.vertical?i.x:i.y,i=this.axisCrossingValues(o,n),n="end"===r,r=o.range(),n=n?r.max:r.min;if(mt(i[e],r.min,r.max)-n==0)return null;i.splice(e+1,0,n),o.options.axisCrossingValues=i;i=t.clone();return t.clear(),i.options.name=void 0,i.options.line.visible=!1,i.options.crosshair=void 0,i.options.notes=void 0,i.options.plotBands=void 0,i},Xs);function Xs(t,e,o){Ws.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=o,this.originalOptions=e,this.createPanes(),this.render(),this.createCrosshairs()}function qs(t){for(var e,o=t.length,i=0;i<o;i++){var r=t[i],n=!1!==r.options.visible;(n||function(e){return!e.pane.axes.some(function(t){return t.options.vertical===e.options.vertical&&t!==e&&!1!==t.options.visible})}(r))&&(r=n?r.contentBox():r.lineBox(),e?e.wrap(r):e=r.clone())}return e||new qt}function Ys(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var Zs=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])};kt(uo,{series:[],plotArea:{margin:{}},background:"",border:{color:r,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var Qs=uo,Ks={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};var $s,Js,ta=((Js=P.Class)&&(oa.__proto__=Js),((oa.prototype=Object.create(Js&&Js.prototype)).constructor=oa).prototype.aggregatePoints=function(t,e){var o=this._series,i=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};!n||O(n)||x(n)||((t=function(){}).prototype=n,s=new t);for(var a=0;a<i.length;a++){var h=i[a],p=this._bindField(r.values,h.canonicalName),p=h.transform(p,o,r.dataItems,e);if(!(null===p||!V(p)||lt(p.length)||p instanceof Date)){s=p;break}lt(p)&&function(t,e,o){var i=e,r=t;if(-1<t.indexOf(".")){for(var n=t.split(".");1<n.length;)r=n.shift(),lt(i[r])||(i[r]={}),i=i[r];r=n.shift()}i[r]=o}(h.name,s,p)}return s},oa.prototype._bindPoints=function(t){for(var e=this._binder,o=this._series,i=[],r=[],n=0;n<t.length;n++){var s=t[n];i.push(e.bindPoint(o,s)),r.push(o.data[s])}return{values:i,dataItems:r}},oa.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,n=(lt(s[e])?s:n.fields)[e];o.push(n)}return o},oa),at=(($s=P.Class)&&(ea.__proto__=$s),((ea.prototype=Object.create($s&&$s.prototype)).constructor=ea).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},ea.prototype.query=function(t){return this._defaults[t]},ea);function ea(){$s.call(this),this._defaults={}}function oa(t,e,o){Js.call(this);var i=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,i),s=this._seriesFields=[],o=o.query(t.type),a=t.aggregate||o;this._series=t,this._binder=e;for(var h=0;h<i.length;h++){var p=i[h],l=void 0;if(V(a))l=a[p];else{if(0!==h&&!J(p,r))break;l=a}l&&s.push({canonicalName:p,name:n[h],transform:E(l)?l:$i[l]})}}at.current=new at;var ia,ra=at,ee=((ia=wn)&&(na.__proto__=ia),((na.prototype=Object.create(ia&&ia.prototype)).constructor=na).prototype.createLabel=function(){var t=this.options.labels,e=z({},t,t.from),t=z({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this._createLabel(t),this.append(this.labelTo))},na.prototype._createLabel=function(t){var e=W(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new mn(e,z({vertical:this.options.vertical},t),o)},na.prototype.reflow=function(t){this.render();var e=this.labelFrom,o=this.labelTo,i=this.value;this.box=t,e&&(e.options.aboveAxis=i.from>i.to,e.reflow(t)),o&&(o.options.aboveAxis=i.to>i.from,o.reflow(t)),this.note&&this.note.reflow(t)},na);function na(){ia.apply(this,arguments)}ee.prototype.defaults=z({},ee.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var sa,aa=ee,ae=((sa=Ln)&&(ha.__proto__=sa),((ha.prototype=Object.create(sa&&sa.prototype)).constructor=ha).prototype.pointType=function(){return aa},ha.prototype.pointValue=function(t){return t.valueFields},ha.prototype.formatPointValue=function(t,e){return null===t.value.from&&null===t.value.to?"":this.chartService.format.auto(e,t.value.from,t.value.to)},ha.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},ha.prototype.updateRange=function(t,e){var o=e.series.axis,i=t.from,r=t.to,e=this.valueAxisRanges[o];null!==t&&O(i)&&O(r)&&((e=this.valueAxisRanges[o]=e||{min:l,max:c}).min=Math.min(e.min,i),e.max=Math.max(e.max,i),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))},ha.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},ha);function ha(){sa.apply(this,arguments)}ae.prototype.plotLimits=Er.prototype.plotLimits;var pa,la,ca=ae,ua=((la=Vr)&&(fa.__proto__=la),((fa.prototype=Object.create(la&&la.prototype)).constructor=fa).prototype.aliasFor=function(){return this.parent},fa),_e=((pa=le)&&(da.__proto__=pa),((da.prototype=Object.create(pa&&pa.prototype)).constructor=da).prototype.render=function(){var t,e,o,i;this._rendered||(this._rendered=!0,i=(o=this.options).markers,t=o.labels,e=this.value,o=this.fromPoint=new ua(e,z({},this.options,{labels:t.from,markers:i.from})),i=this.toPoint=new ua(e,z({},this.options,{labels:t.to,markers:i.to})),this.copyFields(o),this.copyFields(i),this.append(o),this.append(i))},da.prototype.reflow=function(t){this.render();var e=t.from,t=t.to;this.positionLabels(e,t),this.fromPoint.reflow(e),this.toPoint.reflow(t),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},da.prototype.createHighlight=function(){var t=new P.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},da.prototype.highlightVisual=function(){return this.visual},da.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},da.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,o,i=this.box,r=i.center(),t=S,r=this.options.vertical?(e=r.x,o=i.y1-5,w):(e=i.x2+5,o=r.y,C);return{point:new Nt(e,o),align:{horizontal:t,vertical:r}}}},da.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},da.prototype.overlapsBox=function(t){return this.box.overlaps(t)},da.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},da.prototype.initLabelsFormat=function(){var t=this.options.labels;t.format||(t.from&&t.from.format||(t.from=Object.assign({},t.from,{format:"{0}"})),t.to&&t.to.format||(t.to=Object.assign({},t.to,{format:"{1}"})))},da.prototype.positionLabels=function(t,e){var o,i=this.options,r=i.labels,i=i.vertical;"auto"===r.position&&(t=i?e.y1<=t.y1?(o="above","below"):(o="below","above"):e.x1<=t.x1?(o=S,k):(o=k,S),r.from&&r.from.position||(this.fromPoint.options.labels.position=t),r.to&&r.to.position||(this.toPoint.options.labels.position=o))},da.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},da);function da(t,e){pa.call(this),this.value=t,this.options=e,this.aboveAxis=Ct(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}function fa(){la.apply(this,arguments)}z(_e.prototype,Lr),z(_e.prototype,ro),_e.prototype.defaults={markers:{visible:!1,background:a,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,margin:U(3),padding:U(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var ga,ya,va,ma=_e,xa=((va=on)&&(Ca.__proto__=va),((Ca.prototype=Object.create(va&&va.prototype)).constructor=Ca).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},Ca.prototype.stackSegments=function(){var t=this.fromSegments;return t=!this.fromSegments?this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse())):t},Ca.prototype.createStroke=function(t){var e=new P.drawing.Path(t),t=new P.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),t.segments.push.apply(t.segments,this.stackSegments()),this.visual.append(e),this.visual.append(t)},Ca.prototype.hasStackSegment=function(){return!0},Ca.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},Ca.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},Ca),_a=((ya=xa)&&(wa.__proto__=ya),((wa.prototype=Object.create(ya&&ya.prototype)).constructor=wa).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},wa.prototype.stackSegments=function(){var t=this.fromSegments;return t=!this.fromSegments?this.fromSegments=this.createCurveSegments(this.fromPoints().reverse()):t},wa.prototype.createCurveSegments=function(t){return(new Hi).process(this.toGeometryPoints(t))},wa),ge=((ga=xa)&&(ba.__proto__=ga),((ba.prototype=Object.create(ga&&ga.prototype)).constructor=ba).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},ba.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},ba);function ba(){ga.apply(this,arguments)}function wa(){ya.apply(this,arguments)}function Ca(){va.apply(this,arguments)}z(ge.prototype,Vt);var Sa,ka=ge,Se=((Sa=Er)&&(Aa.__proto__=Sa),((Aa.prototype=Object.create(Sa&&Sa.prototype)).constructor=Aa).prototype.render=function(){Sa.prototype.render.call(this),this.renderSegments()},Aa.prototype.pointType=function(){return ma},Aa.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!Jn(s.from)&&!Jn(s.to)){if(this.seriesMissingValues(r)!==pr)return null;s={from:0,to:0}}e=this.pointOptions(r,n),e=this.evalPointOptions(e,s,i,o,r,n),t=t.fields.color||r.color;E(r.color)&&(t=e.color);e=new ma(s,e);return e.color=t,this.append(e),e},Aa.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?_a:"step"===i?ka:xa)(t,e,o)},Aa.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},Aa.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),e=t.getSlot(e[1],e[1],!this.options.clip);if(o&&e)return{from:o,to:e}},Aa.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,e=this.options.invertAxes?(o=new qt(i.x1,t.y1,i.x2,t.y2),new qt(e.x1,t.y1,e.x2,t.y2)):(o=new qt(t.x1,i.y1,t.x2,i.y2),new qt(t.x1,e.y1,t.x2,e.y2));return{from:o,to:e}},Aa.prototype.addValue=function(t,e){var o=t.valueFields;O(o.from)||(o.from=o.to),O(o.to)||(o.to=o.from),Sa.prototype.addValue.call(this,t,e)},Aa.prototype.updateRange=function(t,e){var o;null!==t&&O(t.from)&&O(t.to)&&(o=e.series.axis,e=this.valueAxisRanges[o]=this.valueAxisRanges[o]||{min:l,max:c},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},Aa.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},Aa.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++){var i=t[o];i&&(e.push((i.fromPoint||{}).marker),e.push((i.toPoint||{}).marker))}return e.concat(this._segments)},Aa);function Aa(){Sa.apply(this,arguments)}z(Se.prototype,It,ce);var Pa,Ta,Ma,Oa=Se,Ba=((Ma=zn)&&(Ia.__proto__=Ma),((Ia.prototype=Object.create(Ma&&Ma.prototype)).constructor=Ia).prototype.reflow=function(t){var e=this.options,o=this.value,i=this.owner.seriesValueAxis(e),r=[],n=[],s=[],a=i.getSlot(o.low,o.high),e=i.getSlot(o.open,o.open),o=i.getSlot(o.close,o.close);e.x1=o.x1=a.x1=t.x1,e.x2=o.x2=a.x2=t.x2;t=a.center().x;r.push([e.x1,e.y1]),r.push([t,e.y1]),n.push([t,o.y1]),n.push([o.x2,o.y1]),s.push([t,a.y1]),s.push([t,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(e.clone().wrap(o)),this.reflowNote()},Ia.prototype.createBody=function(){},Ia),Ra=((Ta=Un)&&(La.__proto__=Ta),((La.prototype=Object.create(Ta&&Ta.prototype)).constructor=La).prototype.pointType=function(){return Ba},La),Ve=((Pa=le)&&(Ea.__proto__=Pa),((Ea.prototype=Object.create(Pa&&Pa.prototype)).constructor=Ea).prototype.linePoints=function(){var t,e=this.from,o=this.from.box,i=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?o.y1:o.y2,r.push([o.x1,t],[i.x2,t])):(e=e.aboveAxis?o.x2:o.x1,r.push([e,o.y1],[e,i.y2])),r},Ea.prototype.createVisual=function(){Pa.prototype.createVisual.call(this);var t=this.series.line||{},t=P.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});T(t),this.visual.append(t)},Ea);function Ea(t,e,o){Pa.call(this),this.from=t,this.to=e,this.series=o}function La(){Ta.apply(this,arguments)}function Ia(){Ma.apply(this,arguments)}kt(Ve,{animation:{type:"fadeIn",delay:600}});var za,Va,ja=Ve,Da=((Va=Ln)&&(Na.__proto__=Va),((Na.prototype=Object.create(Va&&Va.prototype)).constructor=Na).prototype.render=function(){Va.prototype.render.call(this),this.createSegments()},Na.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=Mr(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,h=0;h<o;h++){var p=rr.current.bindPoint(n,h),l=p.valueFields.value,c=p.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=p.valueFields.value=s):(d=u-(p.valueFields.value=a),a=0):O(l)&&(a+=l,d=s+=l),t(p,{category:this.categoryAxis.categoryAt(h),categoryIx:h,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},Na.prototype.updateRange=function(t,e){Va.prototype.updateRange.call(this,{value:e.to},e)},Na.prototype.aboveAxis=function(t){return 0<=t.value},Na.prototype.plotRange=function(t){return[t.from,t.to]},Na.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,o=this.segments=[],i=0;i<t.length;i++){var r=t[i],n=e[i];if(n)for(var s=void 0,a=0;a<n.length;a++){var h,p=n[a];p&&s&&(h=new ja(s,p,r),o.push(h),this.append(h)),s=p}}},Na),Ha=["area","verticalArea","rangeArea","verticalRangeArea"],Ua=[dr,gr].concat(Ha),Fe=((za=Qs)&&(Fa.__proto__=za),((Fa.prototype=Object.create(za&&za.prototype)).constructor=Fa).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new dn,0<t.length){this.invertAxes=J(t[0].type,[cr,"bullet",gr,"verticalArea","verticalRangeArea","rangeBar","horizontalWaterfall","verticalBoxPlot"]);for(var e=0;e<t.length;e++){var o=t[e].stack;if(o&&"100%"===o.type){this.stack100=!0;break}}}},Fa.prototype.render=function(t){void 0===t&&(t=this.panes),this.createCategoryAxes(t),this.aggregateCategories(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},Fa.prototype.removeAxis=function(t){var e=t.options.name;za.prototype.removeAxis.call(this,t),t instanceof Ko?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},Fa.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],i)}},Fa.prototype.createChartGroup=function(t,e){this.createAreaChart(Vs(t,["area","verticalArea"]),e),this.createRangeAreaChart(Vs(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Vs(t,[ur,cr]),e),this.createRangeBarChart(Vs(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Vs(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Vs(t,"candlestick"),e),this.createBoxPlotChart(Vs(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Vs(t,"ohlc"),e),this.createWaterfallChart(Vs(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Vs(t,[dr,gr]),e)},Fa.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,o=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var i=0;i<e.length;i++){var r=e[i],n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane),r=(zs(n.options.type,y)||r.categoryField)&&J(s,t)?this.aggregateSeries(r,n):this.filterSeries(r,n);o.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=o},Fa.prototype.filterSeries=function(e,o){var t=(e.data||{}).length;if(o._seriesMax=Math.max(o._seriesMax||0,t),!O(o.options.min)&&!O(o.options.max))return e;var i=o.currentRangeIndices(),r=J(e.type,Ua),n=z({},e);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&Gs(n,i,t,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return lt(e.data[t])}),n},Fa.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},Fa.prototype.seriesSourcePoints=function(t,e){var o=t.index+";"+e.categoriesHash();if(this._seriesPointsCache[o])return this._currentPointsCache[o]=this._seriesPointsCache[o],this._seriesPointsCache[o];var i=e.options,r=i.srcCategories,i=zs(i.type,y),n=t.data,s=i?js:Ji,a=[];i||e.mapCategories();for(var h=0;h<n.length;h++){var p,l=t.categoryField?s(t.categoryField,n[h],this.chartService.intl):r[h];lt(l)&&null!==l&&(a[p=e.totalIndex(l)]=a[p]||{items:[],category:l},a[p].items.push(h))}return this._currentPointsCache[o]=a},Fa.prototype.aggregateSeries=function(t,i){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,i),e=z({},t),n=new ta(z({},t),rr.current,ra.current),o=e.data=[],s=i.options.dataItems||[],a=i.currentRangeIndices(),h=function(t){var e=t-a.min,o=r[t];return(o=o||(r[t]={})).categoryIx=e,o.item||(t=i.categoryAt(t,!0),o.category=t,o.item=n.aggregatePoints(o.items,t)),o},p=a.min;p<=a.max;p++){var l=h(p);o[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return J(e.type,Ua)&&Gs(e,a,i.totalCount(),h,function(t){return r[t]}),i.options.dataItems=s,e},Fa.prototype.appendChart=function(t,e){var o=t.options.series,i=this.seriesCategoryAxis(o[0]),r=i.options.categories,n=Math.max(0,Mr(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),za.prototype.appendChart.call(this,t,e)},Fa.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=Z([].concat(e.valueAxis),function(t){return t.name===o})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},Fa.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,t=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!t)throw new Error("Unable to locate category axis with name "+e);return t},Fa.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},Fa.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],o={},i=0;i<t.length;i++){var r=t[i].categoryAxis||"$$default$$";o.hasOwnProperty(r)||(o[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=function(t,e,o){return Z(t,function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},Fa.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Ln(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Fa.prototype.createRangeBarChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new ca(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(o,e))},Fa.prototype.createBulletChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new ms(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Fa.prototype.createLineChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new en(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Fa.prototype.createAreaChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new un(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Fa.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new Oa(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},Fa.prototype.createOHLCChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Ra(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Fa.prototype.createCandlestickChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Un(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Fa.prototype.createBoxPlotChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Yn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Fa.prototype.createWaterfallChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Da(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(o,e))},Fa.prototype.axisRequiresRounding=function(t,e){for(var o=Vs(this.series,yr),i=0;i<this.series.length;i++){var r,n=this.series[i];!J(n.type,Ha)||(r=n.line)&&"step"===r.style&&o.push(n)}for(var s=0;s<o.length;s++){var a=o[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},Fa.prototype.aggregatedAxis=function(t,e){for(var o=this.series,i=0;i<o.length;i++){var r=o[i].categoryAxis||"";if((r===t||!r&&0===e)&&o[i].categoryField)return!0}},Fa.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Ko&&t[e].createLabels()},Fa.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,o=[].concat(this.options.categoryAxis),i=[],r=0;r<o.length;r++){var n=o[r];if(J(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=z({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?l:0},n),lt(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var h=void 0,h=new(Ds(n,a[0])?ai:Ko)(n,this.chartService);if(o[r].categories=h.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=h}h.axisIndex=r,i.push(h),this.appendAxis(h)}}var p=this.categoryAxis||i[0];this.categoryAxis=p,e?this.axisY=p:this.axisX=p},Fa.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!J(t[e].type,Ha))return!1;return!0},Fa.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,o=e.query(),i=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<i.length;a++){var h=i[a];if(J(this.findPane(h.pane),t)){var p=h.name,l=zs(h.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(p)||o||l;0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max));h=new(zs(h.type,"log")?Si:yi)(l.min,l.max,z({},n,h),this.chartService);if(p){if(this.namedValueAxes[p])throw new Error("Value axis with name "+p+" is already defined");this.namedValueAxes[p]=h}h.axisIndex=a,s.push(h),this.appendAxis(h)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},Fa.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),i=this.pointPane(r),n=[],s=[];if(i){for(var a=i.axes,h=0;h<a.length;h++){var p=a[h];p.getValue?Es(s,p.getValue(r)):Es(n,p.getCategory(r))}0===n.length&&Es(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:gt(e),originalEvent:e,category:Hs(n),value:Hs(s)})}},Fa.prototype.pointPane=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.contentBox.containsPoint(t))return i}},Fa.prototype.updateAxisOptions=function(t,e){Ga(this.options,t,e),Ga(this.originalOptions,t,e)},Fa);function Fa(){za.apply(this,arguments)}function Na(){Va.apply(this,arguments)}function Ga(t,e,o){z([].concat(e instanceof Ko?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}kt(Fe,{categoryAxis:{},valueAxis:{}}),z(Fe.prototype,Ks);var Wa=Fe;function Xa(){this._defaultPrevented=!0}var qa,Ya=((qa=P.Class)&&(Za.__proto__=qa),((Za.prototype=Object.create(qa&&qa.prototype)).constructor=Za).prototype.destroy=function(){this._points=[]},Za.prototype.show=function(t,e){var o=[].concat(t);this.hide();for(var i=0;i<o.length;i++){var r=o[i];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},Za.prototype.togglePointHighlight=function(t,e,o){var i=(t.options.highlight||{}).toggle;i?(i(i={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Xa,visual:t.highlightVisual(),show:e}),i._defaultPrevented||t.toggleHighlight(e,o)):t.toggleHighlight(e,o)},Za.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Za.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1},Za);function Za(){qa.call(this),this._points=[]}function Qa(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Ka(t){for(var e={},o=0;o<t.length;o++){var i=t[o];i.axis.options.name&&(e[i.axis.options.name]={min:i.range.min,max:i.range.max})}return e}var $a,Xe=(($a=P.Class)&&(Ja.__proto__=$a),((Ja.prototype=Object.create($a&&$a.prototype)).constructor=Ja).prototype.start=function(t){return this._active=Qa(t,this.options.key),this._active},Ja.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,v).concat(this._panAxes(t,m));if(t.length)return Ka(this.axisRanges=t)}},Ja.prototype.end=function(){var t=this._active;return this._active=!1,t},Ja.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var o=0;o<e.length;o++){var i=e[o];t.updateAxisOptions(i.axis,i.range)}t.redraw(t.panes)}},Ja.prototype.destroy=function(){delete this.plotArea},Ja.prototype._panAxes=function(t,e){var o=this.plotArea,i=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=i&&(t||"").toLowerCase()!==e)for(var n=o.axes,s=0;s<n.length;s++){var a,h=n[s];!(e===v&&!h.options.vertical||e===m&&h.options.vertical)||(a=h.pan(i))&&(a.limitRange=!0,r.push({axis:h,range:a}))}return r},Ja);function Ja(t,e){$a.call(this),this.plotArea=t,this.options=z({},this.options,e)}Xe.prototype.options={key:"none",lock:"none"};var th,eh=Xe,Ke=((th=P.Class)&&(oh.__proto__=th),((oh.prototype=Object.create(th&&th.prototype)).constructor=oh).prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},oh.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},oh.prototype.setStyles=function(t){H(this._marquee,t)},oh.prototype.start=function(t){if(Qa(t,this.options.key)){var e=this.chart,o=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(o),o=e?e.chartsBox().clone():null;if(e&&o){e=this._elementOffset();return o.translate(e.left,e.top),this._zoomPaneClipBox=o,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}}return!1},oh.prototype._elementOffset=function(){var t=this.chart.element,e=H(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=ut(t);return{left:o+t.left,top:e+t.top}},oh.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},oh.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),t=this._selectionPosition(t);t.left-=e.left,t.top-=e.top;e={x:t.left,y:t.top},t={x:t.left+t.width,y:t.top+t.height};return this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,Ka(this.axisRanges)}},oh.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},oh.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},oh.prototype._updateAxisRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;o===v&&!a||o===m&&a||!lt(s.axisIndex)||(a=s.pointsRange(t,e))&&i.push({axis:s,range:a})}this.axisRanges=i},oh.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},i=t.x.location,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(o.x,i),a=Math.min(o.y,r),h=Math.abs(o.x-i),t=Math.abs(o.y-r);return n===v&&(s=e.x1,h=e.width()),n===m&&(a=e.y1,t=e.height()),i>e.x2&&(h=e.x2-o.x),i<e.x1&&(h=o.x-e.x1),r>e.y2&&(t=e.y2-o.y),r<e.y1&&(t=o.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:h,height:t}},oh);function oh(t,e){th.call(this),this.chart=t,this.options=z({},this.options,e),this.createElement()}Ke.prototype.options={key:"shift",lock:"none"};var ih,rh,nh,sh,ah=Ke,hh=((sh=P.Class)&&(gh.__proto__=sh),((gh.prototype=Object.create(sh&&sh.prototype)).constructor=gh).prototype.updateRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;o===v&&!a||o===m&&a||!s.zoomRange||(a=mt(this.options.rate,.01,.9),(a=s.zoomRange(-t*a,e))&&i.push({axis:s,range:a}))}return Ka(this.axisRanges=i)},gh.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},gh.prototype.destroy=function(){delete this.chart},gh),ph=((nh=le)&&(fh.__proto__=nh),((fh.prototype=Object.create(nh&&nh.prototype)).constructor=fh).prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new P.drawing.Layout(null,{spacing:o?0:e.spacing,lineSpacing:o?e.spacing:0,orientation:o?"vertical":"horizontal",reverse:e.rtl,alignItems:o?"start":"center"});for(var i=0;i<t.length;i++){var r=t[i];r.reflow(new qt),r.renderVisual()}},fh.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Re(t):new qt},fh.prototype.renderVisual=function(){this.addVisual()},fh.prototype.createVisual=function(){},fh),lh=((rh=fe)&&(dh.__proto__=rh),((dh.prototype=Object.create(rh&&rh.prototype)).constructor=dh).prototype.createContainer=function(){this.container=new Pe({vertical:!1,wrap:!1,align:C,spacing:this.options.spacing}),this.append(this.container)},dh.prototype.createMarker=function(){this.container.append(new ve(this.markerOptions()))},dh.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return z({},t.markers,{background:e,border:{color:e}})},dh.prototype.createLabel=function(){var t=this.options,e=z({},t.labels);this.container.append(new ze(t.text,e))},dh.prototype.renderComplete=function(){rh.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=P.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},dh.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},dh.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},dh.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},dh.prototype.eventArgs=function(t){var e=this.options;return{element:gt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},dh.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;o?(this.visual=o({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{markers:this.markerOptions(),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):rh.prototype.renderVisual.call(this)},dh),ch="custom",eo=((ih=le)&&(uh.__proto__=ih),((uh.prototype=Object.create(ih&&ih.prototype)).constructor=uh).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=C;e===ch?i=S:J(e,[A,w])?(i="start"===o?S:"end"===o?k:C,r=e):o&&("start"===o?r=A:"end"===o&&(r=w)),this.container=new fe({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new fe({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},uh.prototype.createItems=function(){for(var t=this.getService(),e=this.options,o=this.isVertical(),i=new ph({vertical:o,spacing:e.spacing,rtl:t.rtl},t),r=e.items,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s];i.append(new lh(z({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},uh.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===ch&&"horizontal"!==e||(lt(e)?"horizontal"!==e:J(t,[S,k]))},uh.prototype.hasItems=function(){return 0<this.container.children[0].children.length},uh.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===ch?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new qt(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},uh.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===A||i===w?v:m,a=this.isVertical(),h=t.clone(),p=t.clone();i!==S&&i!==k||(p.y1=h.y1=0),a&&n?(p.y2=p.y1+n,p.align(h,m,o.options.vAlign)):!a&&r&&(p.x2=p.x1+r,p.align(h,v,o.options.align)),o.reflow(p);h=(p=o.box).clone();(e.offsetX||e.offsetY)&&(p.translate(e.offsetX,e.offsetY),o.reflow(p)),h[s+1]=t[s+1],h[s+2]=t[s+2],this.box=h},uh.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=e.offsetX,r=e.offsetY,n=e.width,s=e.height,e=this.isVertical(),t=t.clone();e&&s?t.y2=t.y1+s:!e&&n&&(t.x2=t.x1+n),o.reflow(t),t=o.box,o.reflow(new qt(i,r,i+t.width(),r+t.height()))},uh.prototype.renderVisual=function(){this.hasItems()&&ih.prototype.renderVisual.call(this)},uh.prototype.createLegendTitle=function(t){var e=z({},{color:r,position:A,align:C},t),o=e.text;t&&!1!==t.visible&&(lt(e)&&e.visible&&((t=W(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new ze(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},uh.prototype.createTitleLayout=function(){this.layout=new Pe({vertical:!0,wrap:!1}),this.container.append(this.layout)},uh.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},uh.prototype.appendTitleLayoutContent=function(){this.options.title.position===w?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},uh);function uh(t,e){void 0===e&&(e={}),ih.call(this,t),this.chartService=e,J(this.options.position,[A,k,w,S,ch])||(this.options.position=k),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}function dh(t){rh.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}function fh(t,e){nh.call(this,t),this.chartService=e}function gh(t,e){sh.call(this),this.chart=t,this.options=z({rate:.3},this.options,e)}kt(eo,{position:k,items:[],offsetX:0,offsetY:0,margin:U(5),padding:U(5),border:{color:r,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:S,vAlign:C}});var yh,vh=eo,uo=((yh=P.Class)&&(mh.__proto__=yh),((mh.prototype=Object.create(yh&&yh.prototype)).constructor=mh).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},mh.prototype.create=function(t,e,o){for(var i,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];if(0<(i=Vs(t,a.seriesTypes)).length){n=a;break}}return new n.type(i,e,o)},mh);function mh(){yh.call(this),this._registry=[]}uo.current=new uo;var xh=uo;function _h(t){var e=document.createElement("div");return t&&(e.className=t),e}function bh(t){for(var e=t;e&&!Q(e,"k-handle");)e=e.parentNode;return e}var wh,at=((wh=P.Class)&&(Ch.__proto__=wh),((Ch.prototype=Object.create(wh&&wh.prototype)).constructor=Ch).prototype.onPane=function(t){return this.categoryAxis.pane===t},Ch.prototype.createElements=function(){var t=this.options,e=this.wrapper=_h("k-selector");H(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var o=this.selection=_h("k-selection");this.leftMask=_h("k-mask"),this.rightMask=_h("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(_h("k-selection-bg"));var i=this.leftHandle=_h("k-handle k-left-handle"),r=this.rightHandle=_h("k-handle k-right-handle");i.appendChild(_h()),r.appendChild(_h()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e);var n=H(o,["borderLeftWidth","borderRightWidth","height"]),s=H(i,"height").height,o=H(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},H(i,{top:(n.height-s)/2}),H(r,{top:(n.height-o)/2}),e.style.cssText=e.style.cssText},Ch.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),pt(this.wrapper,((t={})[br]=this._mousewheelHandler,t))),this._domEvents=ho.create(this.wrapper,{stopPropagation:!0,start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},Ch.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl;this._dateAxis&&z(t,{min:Xo(o,t.min),max:Xo(o,t.max),from:Xo(o,t.from),to:Xo(o,t.to)});var i=H(this.chartElement,["paddingLeft","paddingTop"]),o=i.paddingLeft,i=i.paddingTop;this.options=z({},{width:e.width(),height:e.height()+.1,padding:{left:o,top:i},offset:{left:e.x1+o,top:e.y1+i},from:t.min,to:t.max},t)},Ch.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(wt(this.wrapper,((t={})[br]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},Ch.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},Ch.prototype._start=function(t){var e=this.options,o=gt(t);!this._state&&o&&(this.chart._unsetActivePoint(),this._state={moveTarget:bh(o)||o,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}},e=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)}),this.trigger("selectStart",e)&&(this._state=null))},Ch.prototype._press=function(t){(t=this._state?this._state.moveTarget:bh(gt(t)))&&_(t,"k-handle-active")},Ch.prototype._move=function(t){var e,o,i,r,n,s,a,h,p,l,c,u;this._state&&(l=this._state,p=this.options,c=this.categoryAxis,e=l.range,o=l.moveTarget,i=c.options.reverse,r=this._index(p.from),n=this._index(p.to),s=this._index(p.min),a=this._index(p.max),u=l.startLocation-t.x.location,h=e.from,p=e.to,l=e.to-e.from,t=H(this.wrapper,"width").width/(c.categoriesCount()-1),c=Math.round(u/t)*(i?-1:1),o&&(u=Q(o,"k-left-handle"),t=Q(o,"k-right-handle"),Q(o,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(s,r-c),a-l),e.to=Math.min(e.from+l,a)):u&&!i||t&&i?(e.from=Math.min(Math.max(s,r-c),a-1),e.to=Math.max(e.from+1,e.to)):(u&&i||t&&!i)&&(e.to=Math.min(Math.max(s+1,n-c),a),e.from=Math.min(e.to-1,e.from)),e.from===h&&e.to===p||(this.move(e.from,e.to),this.trigger("select",this._rangeEventArgs(e)))))},Ch.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&b(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger("selectEnd",this._rangeEventArgs(t)),delete this._state)},Ch.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),r=o.pointCategoryIndex(new Nt(i.x,o.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),h=this._index(e.max),i=s-n,e={},s=3===t.event.which,r=Math.round(n+i/2-r);this._state||s||(this.chart._unsetActivePoint(),o.options.justified||r--,e.from=Math.min(Math.max(a,n-r),h-i),e.to=Math.min(e.from+i,h),this._start(t),this._state&&(this._state.range=e,this.trigger("select",this._rangeEventArgs(e)),this._end()))},Ch.prototype._mousewheel=function(t){var e,o=this,i=nt(t);this._start({target:this.selection}),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(i)&&(i*=3),this.options.mousewheel.reverse&&(i*=-1),this.expand(i)&&this.trigger("select",{axis:this.categoryAxis.options,delta:i,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){o._end()},150))},Ch.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};e=this._rangeEventArgs(this._state.range);this.trigger("selectStart",e)?this._state=null:t.preventDefault()},Ch.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},Ch.prototype._gesturechange=function(t){var e=this.chart,o=this._state,i=this.options,r=this.categoryAxis,n=o.range,s=e._toModelCoordinates(t.touches[0].x.location).x,o=e._toModelCoordinates(t.touches[1].x.location).x,e=Math.min(s,o),o=Math.max(s,o);t.preventDefault(),n.from=r.pointCategoryIndex(new Nt(e))||i.min,n.to=r.pointCategoryIndex(new Nt(o))||i.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},Ch.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},Ch.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},Ch.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},Ch.prototype.move=function(t,e){var o=this.options,i=this.categoryAxis.options.reverse,r=o.offset,n=o.padding,s=o.selection.border,a=i?t:e,h="x"+(i?2:1),e=this._slot(i?e:t),t=bt(e[h]-r.left+n.left);H(this.leftMask,{width:t}),H(this.selection,{left:t});e=this._slot(a),r=bt(o.width-(e[h]-r.left+n.left));H(this.rightMask,{width:r});n=o.width-r;n!==o.width&&(n+=s.right),H(this.rightMask,{left:n}),H(this.selection,{width:Math.max(o.width-(t+r)-s.right,0)})},Ch.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),i=mt(this._index(t),i,r),r=mt(this._index(e),i+1,r);o.visible&&this.move(i,r),o.from=this._value(i),o.to=this._value(r)},Ch.prototype.expand=function(t){var e=this.options,o=this._index(e.min),i=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},e=z({},a);if(this._state&&(a=this._state.range),r!==k&&(a.from=mt(mt(n-t,0,s-1),o,i)),r!==S&&(a.to=mt(mt(s+t,a.from+1,i),o,i)),a.from!==e.from||a.to!==e.to)return this.set(a.from,a.to),!0},Ch.prototype.zoom=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=this._index(o.from),s=this._index(o.to),a={from:n,to:s},h=z({},a),p=this.categoryAxis.options.reverse,o=v+(p?"2":"1"),p=this.categoryAxis.lineBox(),e=Math.abs(p[o]-e.x),p=p.width(),e=bt(e/p,2),p=bt(e*t),t=bt((1-e)*t);if((a=this._state?this._state.range:a).from=mt(mt(n-p,0,s-1),i,r),a.to=mt(mt(s+t,a.from+1,r),i,r),a.from!==h.from||a.to!==h.to)return this.set(a.from,a.to),!0},Ch.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},Ch);function Ch(t,e,o,i){wh.call(this);var r=t.element;this.options=z({},this.options,o),this.chart=t,this.observer=i,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof ai,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}kt(at,{visible:!0,mousewheel:{zoom:"both"},min:c,max:l});var Sh,kh,Ah=at,Ph=((kh=Me)&&(Mh.__proto__=kh),((Mh.prototype=Object.create(kh&&kh.prototype)).constructor=Mh).prototype.show=function(t){var e,o;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=z({},this.options,t.options.tooltip),(o=t.tooltipAnchor())?(this._current=t,kh.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},Mh.prototype.hide=function(){delete this._current,kh.prototype.hide.call(this)},Mh),ee=((Sh=Me)&&(Th.__proto__=Sh),((Th.prototype=Object.create(Sh&&Sh.prototype)).constructor=Th).prototype.showAt=function(t,e){var o,i=Z(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<i.length&&(o=i[0],i=this.plotArea.categoryAxis.getSlot(o.categoryIx),i=e?this._slotAnchor(e,i):this._defaultAnchor(o,i),this.show({anchor:i,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options))},Th.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},Th.prototype._defaultAnchor=function(t,e){var o=t.owner.pane.chartsBox(),t=this.plotArea.categoryAxis.options.vertical,o=o.center(),e=e.center();return{point:t?new Nt(o.x,e.y):new Nt(e.x,o.y),align:{horizontal:"center",vertical:"center"}}},Th);function Th(t,e){Sh.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}function Mh(){kh.apply(this,arguments)}kt(ee,{categoryFormat:"{0:d}"});var Oh,Bh=ee,ae=((Oh=P.drawing.Animation)&&(Rh.__proto__=Oh),((Rh.prototype=Object.create(Oh&&Oh.prototype)).constructor=Rh).prototype.setup=function(){var t,e=this.element,o=this.options;e.bbox()?(this.origin=o.origin,t=o.vertical?m:v,(o=this.fromScale=new P.geometry.Point(1,1))[t]=hr,e.transform(P.geometry.transform().scale(o.x,o.y))):this.abort()},Rh.prototype.step=function(t){var e=tt(this.fromScale.x,1,t),t=tt(this.fromScale.y,1,t);this.element.transform(P.geometry.transform().scale(e,t,this.origin))},Rh.prototype.abort=function(){Oh.prototype.abort.call(this),this.element.transform(null)},Rh);function Rh(){Oh.apply(this,arguments)}kt(ae,{duration:600}),P.drawing.AnimationFactory.current.register(cr,ae);var Eh,_e=((Eh=P.drawing.Animation)&&(Lh.__proto__=Eh),((Lh.prototype=Object.create(Eh&&Eh.prototype)).constructor=Lh).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(P.geometry.transform().scale(hr,hr,t))},Lh.prototype.step=function(t){this.element.transform(P.geometry.transform().scale(t,t,this.center))},Lh);function Lh(){Eh.apply(this,arguments)}kt(_e,{easing:"easeOutElastic"}),P.drawing.AnimationFactory.current.register("bubble",_e);var Ih,Vt=((Ih=P.drawing.Animation)&&(zh.__proto__=Ih),((zh.prototype=Object.create(Ih&&Ih.prototype)).constructor=zh).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},zh.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},zh);function zh(){Ih.apply(this,arguments)}kt(Vt,{duration:200,easing:"linear"}),P.drawing.AnimationFactory.current.register("fadeIn",Vt);var Vh,ge=((Vh=P.drawing.Animation)&&(jh.__proto__=Vh),((jh.prototype=Object.create(Vh&&Vh.prototype)).constructor=jh).prototype.setup=function(){this.element.transform(P.geometry.transform().scale(hr,hr,this.options.center))},jh.prototype.step=function(t){this.element.transform(P.geometry.transform().scale(t,t,this.options.center))},jh);function jh(){Vh.apply(this,arguments)}kt(ge,{easing:"easeOutElastic",duration:600}),P.drawing.AnimationFactory.current.register(fr,ge);var Dh,Hh=ge,ce=((Dh=is)&&(Uh.__proto__=Dh),((Uh.prototype=Object.create(Dh&&Dh.prototype)).constructor=Uh).prototype.render=function(){Dh.prototype.render.call(this),this.renderSegments()},Uh.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?Xr:Dr)(t,e,o)},Uh.prototype.animationPoints=function(){return Dh.prototype.animationPoints.call(this).concat(this._segments)},Uh.prototype.createMissingValue=function(t,e){if(e===pr){t={x:t.x,y:t.y};return Jn(t.x)||(t.x=0),Jn(t.y)||(t.y=0),t}},Uh);function Uh(){Dh.apply(this,arguments)}z(ce.prototype,It);var Fh,Nh=ce,Se=((Fh=Qs)&&(Gh.__proto__=Fh),((Gh.prototype=Object.create(Fh&&Fh.prototype)).constructor=Gh).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new dn,this.yAxisRangeTracker=new dn},Gh.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);r&&(this.createScatterChart(Vs(r,"scatter"),i),this.createScatterLineChart(Vs(r,"scatterLine"),i),this.createBubbleChart(Vs(r,"bubble"),i))}this.createAxes(t)},Gh.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Fh.prototype.appendChart.call(this,t,e)},Gh.prototype.removeAxis=function(t){var e=t.options.name;Fh.prototype.removeAxis.call(this,t),t.options.vertical?(this.yAxisRangeTracker.reset(e),delete this.namedYAxes[e]):(this.xAxisRangeTracker.reset(e),delete this.namedXAxes[e]),t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},Gh.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Z([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Z([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},Gh.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new is(this,{series:t,clip:e.options.clip}),e)},Gh.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Nh(this,{series:t,clip:e.options.clip}),e)},Gh.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new ps(this,{series:t,clip:e.options.clip}),e)},Gh.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=z({reverse:!e&&this.chartService.rtl},t,{vertical:e}),h=zs(a.type,"log"),p=s.query(),t=h?{min:.1,max:1}:{min:0,max:1},t=s.query(r)||p||t,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],f=d[e?"yAxis":"xAxis"];if(f===a.name||0===o&&!f){d=rr.current.bindPoint(d,0).valueFields;l.push(d[e?"y":"x"]);break}}0===o&&p&&(t.min=Math.min(t.min,p.min),t.max=Math.max(t.max,p.max));for(var g=0;g<l.length;g++)if(l[g]instanceof Date){i=!0;break}t=new(zs(a.type,y)||!a.type&&i?xi:h?Si:yi)(t.min,t.max,a,this.chartService);if(t.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t},Gh.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)J(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)J(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},Gh.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p],c=l.options.vertical?h:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<h.length&&t.trigger(o,{element:gt(e),originalEvent:e,x:Hs(a),y:Hs(h)})},Gh.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),t=(o?i.y:i.x).indexOf(t);Wh(this.options,t,o,e),Wh(this.originalOptions,t,o,e)},Gh);function Gh(){Fh.apply(this,arguments)}function Wh(t,e,o,i){z([].concat(o?t.yAxis:t.xAxis)[e],i)}kt(Se,{xAxis:{},yAxis:{}}),z(Se.prototype,Ks);var Xh,qh=Se,Ve=((Xh=le)&&(Qh.__proto__=Xh),((Qh.prototype=Object.create(Xh&&Xh.prototype)).constructor=Qh).prototype.render=function(){var t,e,o=this.options.labels,i=this.owner.chartService,r=this.value;this._rendered||!1===this.visible||(this._rendered=!0,t=W(o),e=this.pointData(),t?r=t(e):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===C||"insideEnd"===o.position?(o.color||(o.color=Rt(this.options.color)),o.background||(o.background=this.options.color)):(i=i.theme.seriesDefaults.labels,o.color=o.color||i.color,o.background=o.background||i.background),this.label=new ze(r,z({},o,{align:C,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),e),this.append(this.label)))},Qh.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Qh.prototype.reflowLabel=function(){var t,e,o,i,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,h=s.middle();n&&(e=n.box.height(),o=n.box.width(),r.position===C?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(h),n.reflow(new qt(t.x,t.y-e/2,t.x,t.y))):"insideEnd"===r.position?(s.radius=s.radius-e/2,t=s.point(h),n.reflow(new qt(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(h)).x>=s.center.x?(i=t.x+o,n.orientation=k):(i=t.x-o,n.orientation=S),n.reflow(new qt(i,t.y-e,t.x,t.y))))},Qh.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;Xh.prototype.createVisual.call(this),this.value&&(i.visual?(t=(o.startAngle+180)%360,(i=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new P.geometry.Point(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:t,endAngle:t+o.angle,options:i,sender:this.getSender(),createVisual:function(){var t=new P.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(i)):this.createSegmentVisual(this.visual))},Qh.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,i=o.border||{},r=0<i.width?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},n=o.color,i={color:n,opacity:o.opacity},r=this.createSegment(e,z({fill:i,stroke:{opacity:o.opacity},zIndex:o.zIndex},r));t.append(r),xn(o)&&t.append(this.createGradientOverlay(r,{baseColor:n,fallbackFill:i},z({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},Qh.prototype.createSegment=function(t,e){return e.singleSegment?new P.drawing.Circle(new P.geometry.Circle(new P.geometry.Point(t.center.x,t.center.y),t.radius),e):se.current.createRing(t,e)},Qh.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;z(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Xh.prototype.createAnimation.call(this)},Qh.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,z({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},Qh.prototype.highlightVisual=function(){return this.visual.children[0]},Qh.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new P.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Qh.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=_t(e+180),e=bt(Math.sin(t),g),t=bt(Math.cos(t),g),{horizontal:Math.abs(e)>Zh?C:t<0?k:S,vertical:Math.abs(e)<Yh?C:e<0?w:A})}},Qh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Qh.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Qh),Yh=bt(_t(30),g),Zh=bt(_t(60),g);function Qh(t,e,o){Xh.call(this,o),this.value=t,this.sector=e}kt(Ve,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:U(.5),align:u,zIndex:1,position:"outsideEnd"},animation:{type:fr},highlight:{visible:!0,border:{width:1}},visible:!0}),z(Ve.prototype,Lr);var Kh,$h=Ve,Jh={createLegendItem:function(t,e,o){var i,r,n=this.options.legend||{},s=n.labels||{},a=n.inactiveItems||{},h=a.labels||{};o&&!1!==o.visibleInLegend&&(n=!(r=!1!==o.visible)&&W(h)||W(s),s=o.category,n&&(s=n({text:s,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),a=r?(i={},e.color):(i={color:h.color,font:h.font},(a.markers||{}).color),Jn(s)&&""!==s&&this.legendItems.push({active:r,pointIndex:o.index,text:s,series:o.series,markerColor:a,labels:i}))}},Fe=((Kh=le)&&(tp.__proto__=Kh),((tp.prototype=Object.create(Kh&&Kh.prototype)).constructor=tp).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},tp.prototype.traverseDataPoints=function(t){for(var e=this.options,o=this.plotArea.options.seriesColors,i=(o=void 0===o?[]:o).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],h=a.data,p=Is(a),l=p.total,c=p.points,p=p.count,u=360/l,d=void 0;isFinite(u)||(d=360/p);var f=void 0,f=(lt(a.startAngle)?a:e).startAngle;s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=C);for(var g=0;g<c.length;g++){var y,v,m,x,_,b=c[g];b&&(y=b.fields,v=b.value,m=b.visible,x=0!==v?d||v*u:0,_=1!==h.length&&Boolean(y.explode),E(a.color)||(a.color=y.color||o[g%i]),t(b.valueFields.value,new Jt(null,0,0,f,x),{owner:this,category:lt(y.category)?y.category:"",index:g,series:a,seriesIx:s,dataItem:h[g],percentage:0!==l?v/l:0,explode:_,visibleInLegend:y.visibleInLegend,visible:m,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==m&&(f+=x))}}},tp.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;Tr(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},tp.prototype.addValue=function(t,e,o){var i=z({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(i=new $h(t,e,i),Object.assign(i,o),this.append(i),this.points.push(i))},tp.prototype.reflow=function(t){var e=this.options,o=this.points,i=this.seriesConfigs;void 0===i&&(i=[]);var r=o.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,h=s-.85*s,p=new qt(n.x1,n.y1,n.x1+s,n.y1+s),s=p.center(),n=n.center(),l=e.series.length,c=[],u=[],h=Ct(e.padding,h);this.targetBox=t,h=a-5<h?a-5:h,p.translate(n.x-s.x,n.y-s.y);for(var d=a-h,f=new Nt(d+p.x1+h,d+p.y1+h),g=0;g<r;g++){var y,v=o[g],m=v.sector,x=v.seriesIx;m.radius=d,m.center=f,i.length&&(y=i[x],m.innerRadius=y.innerRadius,m.radius=y.radius),x===l-1&&v.explode&&(m.center=m.clone().setRadius(.15*m.radius).point(m.middle())),v.reflow(p);v=v.label;v&&"outsideEnd"===v.options.position&&x===l-1&&(v.orientation===k?u:c).push(v)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=p},tp.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},tp.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},tp.prototype.distanceBetweenLabels=function(t){var e=vt(this.points),o=e.sector,i=t.length-1,e=o.radius+e.options.labels.distance,r=[],n=t[0].box,s=bt(n.y1-(o.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<i;a++){var h=t[a+1].box,n=t[a].box,s=bt(h.y1-n.y2);r.push(s)}return s=bt(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},tp.prototype.distributeLabels=function(t,e){for(var o,i,r,n=t.length,s=0;s<n;s++)for(r=-t[s],o=i=s;0<r&&(0<=o||i<n);)r=this._takeDistance(t,s,--o,r),r=this._takeDistance(t,s,++i,r);this.reflowLabels(t,e)},tp.prototype._takeDistance=function(t,e,o,i){var r=i;return 0<t[o]&&(r-=i=Math.min(t[o],r),t[o]-=i,t[e]+=i),r},tp.prototype.reflowLabels=function(t,e){var o,i=vt(this.points),r=i.sector,n=i.options.labels,s=e.length,a=n.distance,h=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var p=0;p<s;p++){var l=e[p],c=l.box;h+=t[p],o=this.hAlignLabel(c.x2,r.clone().expand(a),h,h+c.height(),l.orientation===k),l.orientation===k?(n.align!==u&&(o=r.radius+r.center.x+a),l.reflow(new qt(o+c.width(),h,o,h))):(n.align!==u&&(o=r.center.x-r.radius-a),l.reflow(new qt(o-c.width(),h,o,h))),h+=c.height()}},tp.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,o=e.length;Kh.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<o;i++){var r,n,s,a,h,p,l,c=e[i],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(r=new P.drawing.Path({stroke:{color:g,width:t.width},animation:{type:"fadeIn",delay:c.animationDelay}}),"outsideEnd"===d.options.position&&(n=d.box,s=u.center,l=u.point(f),a=new Nt(n.x1,n.center().y),g=p=h=void 0,l=u.clone().expand(t.padding).point(f),r.moveTo(l.x,l.y),d.orientation===k?(g=ep(s,l,a,p=new Nt(n.x1-t.padding,n.center().y)),a=new Nt(p.x-4,p.y),(g=g||a).x=Math.min(g.x,a.x),this.pointInCircle(g,u.center,u.radius+4)||g.x<u.center.x?(h=u.center.x+u.radius+4,c.options.labels.align===ur||h<a.x?r.lineTo(h,l.y):r.lineTo(l.x+8,l.y),r.lineTo(a.x,p.y)):(g.y=p.y,r.lineTo(g.x,g.y))):(g=ep(s,l,a,p=new Nt(n.x2+t.padding,n.center().y)),a=new Nt(p.x+4,p.y),(g=g||a).x=Math.max(g.x,a.x),this.pointInCircle(g,u.center,u.radius+4)||g.x>u.center.x?(h=u.center.x-u.radius-4,c.options.labels.align===ur||h>a.x?r.lineTo(h,l.y):r.lineTo(l.x-8,l.y),r.lineTo(a.x,p.y)):(g.y=p.y,r.lineTo(g.x,g.y))),r.lineTo(p.x,p.y),this._connectorLines.push(r),this.visual.append(r)))}},tp.prototype.renderVisual=function(){var t,e,o,i;Kh.prototype.renderVisual.call(this),Pt(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),(o=this.visual.bbox())&&(i=o.bottomRight(),(i=Math.min((e.y-t.y1)/(e.y-o.origin.y),(t.y2-e.y)/(i.y-e.y),(e.x-t.x1)/(e.x-o.origin.x),(t.x2-e.x)/(i.x-e.x)))<1&&this.visual.transform(P.geometry.transform().scale(i,i,[e.x,e.y]))))},tp.prototype.labelComparator=function(t){var o=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*o}},tp.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,s=e.center,e=s.x,s=s.y,i=Math.min(Math.abs(s-o),Math.abs(s-i));return n<i?t:e+Math.sqrt(n*n-i*i)*(r?1:-1)},tp.prototype.pointInCircle=function(t,e,o){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(o,2)},tp.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},tp.prototype.animationDelay=function(t){return 70*t},tp.prototype.stackRoot=function(){return this},tp);function tp(t,e){Kh.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function ep(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),o=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);return r=0!=o?new Nt(t.x+(o=n/o)*(e.x-t.x),t.y+o*(e.y-t.y)):r}kt(Fe,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),z(Fe.prototype,Jh),Fe.prototype.isStackRoot=!0;var op,ip,rp=Fe,np=((ip=Qs)&&(ap.__proto__=ip),((ap.prototype=Object.create(ip&&ip.prototype)).constructor=ap).prototype.render=function(){this.createPieChart(this.series)},ap.prototype.createPieChart=function(t){var e=t[0],e=new rp(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},ap.prototype.appendChart=function(t,e){ip.prototype.appendChart.call(this,t,e),ht(this.options.legend.items,t.legendItems)},ap),Xe=((op=$h)&&(sp.__proto__=op),((sp.prototype=Object.create(op&&op.prototype)).constructor=sp).prototype.reflowLabel=function(){var t,e=this.options.labels,o=this.label,i=this.sector.clone(),r=i.middle();o&&(t=o.box.height(),e.position===C?(i.radius-=(i.radius-i.innerRadius)/2,r=i.point(r),o.reflow(new qt(r.x,r.y-t/2,r.x,r.y))):op.prototype.reflowLabel.call(this))},sp.prototype.createSegment=function(t,e){return se.current.createRing(t,e)},sp);function sp(){op.apply(this,arguments)}function ap(){ip.apply(this,arguments)}kt(Xe,{overlay:{gradient:"roundedGlass"},labels:{position:C},animation:{type:fr}}),z(Xe.prototype,Lr);var hp,pp=Xe,Ke=((hp=rp)&&(lp.__proto__=hp),((lp.prototype=Object.create(hp&&hp.prototype)).constructor=lp).prototype.addValue=function(t,e,o){var i=z({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),t&&!1!==o.visible&&(i=new pp(t,e,i),Object.assign(i,o),this.append(i),this.points.push(i))},lp.prototype.reflow=function(t){for(var e,o=this.options,i=t.clone(),r=Math.min(i.width(),i.height()),i=r/2,n=o.series,s=n.length,r=Ct(o.padding,r-.85*r),a=i-(r=i-5<r?i-5:r),h=0,p=0;p<s;p++){var l=n[p];0===p&<(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),lt(l.size)?a-=l.size:h++,lt(l.margin)&&p!==s-1&&(a-=l.margin)}lt(e)||(a-=e=(i-r)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+Ct(f.size,a/h);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}hp.prototype.reflow.call(this,t)},lp.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},lp);function lp(){hp.apply(this,arguments)}kt(Ke,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var cp,up,dp,fp=Ke,gp=((dp=np)&&(mp.__proto__=dp),((mp.prototype=Object.create(dp&&dp.prototype)).constructor=mp).prototype.render=function(){this.createDonutChart(this.series)},mp.prototype.createDonutChart=function(t){var e=t[0],e=new fp(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},mp),eo=((up=Qs)&&(vp.__proto__=up),((vp.prototype=Object.create(up&&up.prototype)).constructor=vp).prototype.initFields=function(){this.valueAxisRangeTracker=new dn},vp.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},vp.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),o=t.options.reverse?e.max:e.min,e=t.getSlot(o),o=this.polarAxis.getSlot(0).center,e=t.box.translate(o.x-e.x1,o.y-e.y1);t.reflow(e)},vp.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r="log"===i.type?(t=zi,{min:.1,max:1}):(t=Li,{min:0,max:1}),r=e.query(name)||o||r;r&&o&&(r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max));i=new t(r.min,r.max,i,this.chartService);this.valueAxis=i,this.appendAxis(i)},vp.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,o=this.polarAxis,i=this.box,r=.15*Math.min(i.width(),i.height()),r=U(t.padding||{},r),i=i.clone().unpad(r),r=i.clone();r.y2=r.y1+Math.min(r.width(),r.height()),r.align(i,m,C);i=r.clone().shrink(0,r.height()/2);o.reflow(r),e.reflow(i);i=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:i})),this.axisBox=r,this.alignAxes(r)},vp.prototype.backgroundBox=function(){return this.box},vp.prototype.detachLabels=function(){},vp),uo=((cp=is)&&(yp.__proto__=cp),((yp.prototype=Object.create(cp&&cp.prototype)).constructor=yp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Nt.onCircle(t.center,t.startAngle,e);return new qt(e.x,e.y,e.x,e.y)},yp);function yp(){cp.apply(this,arguments)}function vp(){up.apply(this,arguments)}function mp(){dp.apply(this,arguments)}kt(uo,{clip:!1});var xp,_p=uo,at=((xp=Nh)&&(bp.__proto__=xp),(bp.prototype=Object.create(xp&&xp.prototype)).constructor=bp);function bp(){xp.apply(this,arguments)}at.prototype.pointSlot=_p.prototype.pointSlot,kt(at,{clip:!1});var wp,Cp,Sp=at,kp=((Cp=cn)&&(Tp.__proto__=Cp),((Tp.prototype=Object.create(Cp&&Cp.prototype)).constructor=Tp).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},Tp.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},Tp.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new Hi(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i},Tp),Ap=((wp=on)&&(Pp.__proto__=wp),((Pp.prototype=Object.create(wp&&wp.prototype)).constructor=Pp).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new P.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},Pp);function Pp(){wp.apply(this,arguments)}function Tp(){Cp.apply(this,arguments)}function Mp(t,e){return t.value.x-e.value.x}var Op,Bp,Rp=((Bp=Sp)&&(Lp.__proto__=Bp),((Lp.prototype=Object.create(Bp&&Bp.prototype)).constructor=Lp).prototype.createSegment=function(t,e,o){return new("smooth"===(e.line||{}).style?kp:Ap)(t,e,o)},Lp.prototype.createMissingValue=function(t,e){var o;return Jn(t.x)&&e!==lr&&(o={x:t.x,y:t.y},e===pr&&(o.y=0)),o},Lp.prototype.seriesMissingValues=function(t){return t.missingValues||pr},Lp.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},Lp.prototype.sortPoints=function(t){if(t.sort(Mp),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];o&&(Jn(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e])}return t},Lp),Me=((Op=eo)&&(Ep.__proto__=Op),((Ep.prototype=Object.create(Op&&Op.prototype)).constructor=Ep).prototype.createPolarAxis=function(){var t=new Mi(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},Ep.prototype.valueAxisOptions=function(t){return z(t,{majorGridLines:{type:d},minorGridLines:{type:d}},this.options.yAxis)},Ep.prototype.createValueAxis=function(){Op.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},Ep.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Qs.prototype.appendChart.call(this,t,e)},Ep.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Vs(t,["polarLine"]),e),this.createScatterChart(Vs(t,["polarScatter"]),e),this.createAreaChart(Vs(t,["polarArea"]),e)},Ep.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Sp(this,{series:t}),this.appendChart(t,e))},Ep.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new _p(this,{series:t}),this.appendChart(t,e))},Ep.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Rp(this,{series:t}),this.appendChart(t,e))},Ep.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),i=this.axisX.getValue(r),r=this.axisY.getValue(r);null!==i&&null!==r&&t.trigger(o,{element:gt(e),x:i,y:r})},Ep.prototype.createCrosshairs=function(){},Ep);function Ep(){Op.apply(this,arguments)}function Lp(){Bp.apply(this,arguments)}kt(Me,{xAxis:{},yAxis:{}}),z(Me.prototype,Ks);var Ip,ee=Me,ae=((Ip=en)&&(zp.__proto__=Ip),((zp.prototype=Object.create(Ip&&Ip.prototype)).constructor=zp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Nt.onCircle(t.center,t.middle(),e);return new qt(e.x,e.y,e.x,e.y)},zp.prototype.renderSegments=function(){if(Ip.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[i.seriesIx]=e[i.seriesIx]||[],e[i.seriesIx].push(i)}return e}(this._segments),e=0;e<t.length;e++){var o,i,r,n=t[e];n&&1<n.length&&(o=n[0].linePoints[0],i=vt(n),r=vt(i.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i&&r&&vt(n).linePoints.push(o))}},zp.prototype.createSegment=function(t,e,o){var i=new("smooth"===e.style?Xr:Dr)(t,e,o),o=this.seriesMissingValues(e);return t.length!==e.data.length&&o!==lr||(i.options.closed=!0),i},zp);function zp(){Ip.apply(this,arguments)}kt(ae,{clip:!1,limitPoints:!1});var Vp,jp,Dp,Hp,Up=ae,Fp=((Hp=cn)&&(Yp.__proto__=Hp),((Yp.prototype=Object.create(Hp&&Hp.prototype)).constructor=Yp).prototype.fillToAxes=function(){},Yp),Np=((Dp=on)&&(qp.__proto__=Dp),((qp.prototype=Object.create(Dp&&Dp.prototype)).constructor=qp).prototype.fillToAxes=function(){},qp),Gp=((jp=Up)&&(Xp.__proto__=jp),((Xp.prototype=Object.create(jp&&jp.prototype)).constructor=Xp).prototype.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,h=(e.line||{}).style;return a&&0<o&&i&&(n=i.linePoints.slice(0),r=i),"smooth"===h?(s=new Fp(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new Np(t,e,o,r,n)),s},Xp.prototype.seriesMissingValues=function(t){return t.missingValues||pr},Xp),_e=((Vp=pp)&&(Wp.__proto__=Vp),(Wp.prototype=Object.create(Vp&&Vp.prototype)).constructor=Wp);function Wp(t,e){Vp.call(this,t,null,e)}function Xp(){jp.apply(this,arguments)}function qp(){Dp.apply(this,arguments)}function Yp(){Hp.apply(this,arguments)}kt(_e,{overlay:{gradient:"none"},labels:{distance:10}});var Zp,Qp=_e,Vt=((Zp=le)&&(Kp.__proto__=Zp),((Kp.prototype=Object.create(Zp&&Zp.prototype)).constructor=Kp).prototype.reflow=function(o){var t=this.options,e=this.children,i=t.gap,r=t.spacing,t=e.length,n=o.angle/(t+i+r*(t-1)),s=o.startAngle+i/2*n;this.forEach(e,function(t){var e=o.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})},Kp);function Kp(t){Zp.call(this,t),this.forEach=t.rtl?Sn:Cn}kt(Vt,{gap:1,spacing:0});var $p,Jp,tl=Vt,el=((Jp=le)&&(il.__proto__=Jp),((il.prototype=Object.create(Jp&&Jp.prototype)).constructor=il).prototype.reflow=function(t){var e=this.options.reverse,o=this.children,i=o.length,r=e?i-1:0,n=e?-1:1;this.box=new qt;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},il),ge=(($p=Ln)&&(ol.__proto__=$p),((ol.prototype=Object.create($p&&$p.prototype)).constructor=ol).prototype.pointType=function(){return Qp},ol.prototype.clusterType=function(){return tl},ol.prototype.stackType=function(){return el},ol.prototype.categorySlot=function(t,e){return t.getSlot(e)},ol.prototype.pointSlot=function(t,e){var o=t.clone(),t=t.center.y;return o.radius=t-e.y1,o.innerRadius=t-e.y2,o},ol.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},ol.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),$p.prototype.createAnimation.call(this)},ol);function ol(){$p.apply(this,arguments)}function il(){Jp.apply(this,arguments)}ge.prototype.reflow=Er.prototype.reflow,kt(ge,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var rl,nl=ge,It=((rl=eo)&&(sl.__proto__=rl),((sl.prototype=Object.create(rl&&rl.prototype)).constructor=sl).prototype.createPolarAxis=function(){var t=new Pi(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},sl.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&z(t,{majorGridLines:{type:d},minorGridLines:{type:d}}),this._isStacked100&&z(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),z(t,this.options.valueAxis)},sl.prototype.aggregateCategories=function(){Wa.prototype.aggregateCategories.call(this,this.panes)},sl.prototype.createCategoryAxesLabels=function(){Wa.prototype.createCategoryAxesLabels.call(this,this.panes)},sl.prototype.filterSeries=function(t){return t},sl.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Vs(t,["radarArea"]),e),this.createLineChart(Vs(t,["radarLine"]),e),this.createBarChart(Vs(t,["radarColumn"]),e)},sl.prototype.chartOptions=function(t){var e={series:t},o=t[0];return o&&(t=this.filterVisibleSeries(t),o=o.stack,e.isStacked=o&&1<t.length,e.isStacked100=o&&"100%"===o.type&&1<t.length,e.isStacked100&&(this._isStacked100=!0)),e},sl.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Gp(this,this.chartOptions(t)),this.appendChart(t,e))},sl.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Up(this,this.chartOptions(t)),this.appendChart(t,e))},sl.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],(t=this.chartOptions(t)).gap=o.gap,t.spacing=o.spacing,t=new nl(this,t),this.appendChart(t,e),this._hasBarCharts=!0)},sl.prototype.seriesCategoryAxis=function(){return this.categoryAxis},sl.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),i=this.categoryAxis.getCategory(r),r=this.valueAxis.getValue(r);null!==i&&null!==r&&t.trigger(o,{element:gt(e),category:i,value:r})},sl.prototype.createCrosshairs=function(){},sl);function sl(){rl.apply(this,arguments)}z(It.prototype,Ks,{appendChart:Wa.prototype.appendChart,aggregateSeries:Wa.prototype.aggregateSeries,seriesSourcePoints:Wa.prototype.seriesSourcePoints}),kt(It,{categoryAxis:{categories:[]},valueAxis:{}});var al,ce=It,Se=((al=le)&&(hl.__proto__=al),((hl.prototype=Object.create(al&&al.prototype)).constructor=hl).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new qt(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new qt(t.x1,e[0].y,t.x2,e[2].y))},hl.prototype.createVisual=function(){var t=this,e=this.options;al.prototype.createVisual.call(this),(e=e.visual?e.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:e,sender:this.getSender(),createVisual:function(){return t.createPath()}}):this.createPath())&&this.visual.append(e)},hl.prototype.createPath=function(){var t=this.options,e=t.border;return P.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},hl.prototype.createHighlight=function(t){return P.drawing.Path.fromPoints(this.points,t)},hl.prototype.highlightVisual=function(){return this.visual.children[0]},hl.prototype.highlightVisualArgs=function(){var t=P.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},hl.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Nt(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},hl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},hl);function hl(t,e,o){al.call(this,e),this.value=t,this.options.index=o.index}kt(Se,{color:a,border:{width:1}}),z(Se.prototype,Lr);var pl,ll=Se,Ve=((pl=le)&&(cl.__proto__=pl),((cl.prototype=Object.create(pl&&pl.prototype)).constructor=cl).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},cl.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var o=t.series[0],i=o.data;if(i)for(var t=Is(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,h,p=n[s];p&&(h=p.fields,E(o.color)||(o.color=h.color||e[s%e.length]),h=z({index:s,owner:this,series:o,dataItem:i[s],percentage:p.value/r},h,{visible:p.visible}),a=p.valueFields.value,p=this.createSegment(a,h),h=this.createLabel(a,h),p&&h&&p.append(h))}},cl.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;Tr(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},cl.prototype.createSegment=function(t,e){var o=z({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible){o=new ll(t,o,e);return Object.assign(o,e),this.append(o),this.points.push(o),o}},cl.prototype.createLabel=function(t,e){var o=e.series,i=e.dataItem,r=z({},this.options.labels,o.labels),n=t;if(r.visible){var s=W(r),i={dataItem:i,value:t,percentage:e.percentage,category:e.category,series:o};s?n=s(i):r.format&&(n=this.plotArea.chartService.format.auto(r.format,n)),r.color||(r.color=Rt(o.color),r.background||(r.background=o.color)),this.evalSegmentOptions(r,t,e);i=new ze(n,z({vAlign:r.position},r),i);return this.labels.push(i),i}},cl.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},o=0;o<t.length;o++){var i,r=t[o].options.align;r!==C&&(i=t[o].box.width(),r===S?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},cl.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=r[0],a=s,h=0;h<r.length;h++)r[h].percentage>a.percentage&&(a=r[h]);for(var p=s.percentage/a.percentage*e,l=(e-p)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],g=f?f.percentage:d,y=r[u].points=[],f=i.dynamicHeight?o*d:o/n,g=mt(d?(e-p*(g/d))/2:g?0:e/2,0,e);y.push(new P.geometry.Point(t.x1+l,t.y1+c)),y.push(new P.geometry.Point(t.x1+e-l,t.y1+c)),y.push(new P.geometry.Point(t.x1+e-g,t.y1+f+c)),y.push(new P.geometry.Point(t.x1+g,t.y1+f+c)),c+=f+i.segmentSpacing,p=mt(e-2*(l=g),0,e)}},cl.prototype.constantSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=i.neckRatio<=1,a=s?i.neckRatio*e:e,h=s?0:(e-e/i.neckRatio)/2,p=((s?e:e-2*h)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=i.dynamicHeight?p*d:p/n,d=i.dynamicHeight?o*d:o/n;u.push(new P.geometry.Point(t.x1+h,t.y1+l)),u.push(new P.geometry.Point(t.x1+e-h,t.y1+l)),u.push(new P.geometry.Point(t.x1+e-h-f,t.y1+d+l)),u.push(new P.geometry.Point(t.x1+h+f,t.y1+d+l)),h+=f,l+=d+i.segmentSpacing}},cl.prototype.reflow=function(t){var e=this.points,o=e.length;if(o){var i=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-i.segmentSpacing*(o-1),s=r.width();i.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<o;a++)e[a].reflow(t)}},cl);function cl(t,e){pl.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}kt(Ve,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:C,position:C,zIndex:1}}),z(Ve.prototype,Jh);var ul,dl,fl=Ve,Fe=((dl=Qs)&&(yl.__proto__=dl),((yl.prototype=Object.create(dl&&dl.prototype)).constructor=yl).prototype.render=function(){this.createFunnelChart(this.series)},yl.prototype.createFunnelChart=function(t){var e=t[0],e=new fl(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(e)},yl.prototype.appendChart=function(t,e){dl.prototype.appendChart.call(this,t,e),ht(this.options.legend.items,t.legendItems)},yl),Xe=((ul=le)&&(gl.__proto__=ul),((gl.prototype=Object.create(ul&&ul.prototype)).constructor=gl).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},gl.prototype.createLabel=function(){var t,e,o,i=this.options.labels;i.visible&&(t=this.pointData(),e=W(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||Rt(this.color),this.label=new ze(e,z({align:C,vAlign:C,margin:{left:5,right:5},zIndex:Ct(i.zIndex,this.series.zIndex)},i,{color:o}),t),this.append(this.label))},gl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},gl.prototype.reflow=function(t){this.render();var e=this.label;this.box=t,e&&e.reflow(this.markerBox()),this.note&&this.note.reflow(t),this.marker.reflow(this.markerBox())},gl.prototype.markerBox=function(){var t=this.options.markers,e=t.border,o=this.box.toRect(),i="roundedRect"===Ct(t.type,"rect"),r=Ct(e.width,i?1:0),e=Math.round(r/2);return t.size&&(i=o.center(),o.size.width=o.size.height=t.size,o.origin.x=Math.round(i.x-o.size.width/2),o.origin.y=Math.round(i.y-o.size.height/2)),o.size.width-=r,o.size.height-=r,o.origin.y+=e+.5,o.origin.x+=e+.5,Re(o)},gl.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=Ct(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},gl.prototype.createMarker=function(){var t=this.options,e=t.markers,t=new ve({type:Ct(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:Ct(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=t,this.append(t)},gl.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,e=new ve({type:Ct(o.type,"rect"),width:o.size,height:o.size,rotation:o.rotation,background:o.color||this.color,border:this.markerBorder(),borderRadius:o.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:Ct(e.zIndex,this.series.zIndex)});e.reflow(this.markerBox());e=e.getElement();return e.options.fill=t.fill,e.options.stroke=t.stroke,e},gl.prototype.highlightVisual=function(){return this.rectVisual},gl.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},gl.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new Nt(t,e),align:{horizontal:C,vertical:w}}},gl.prototype.overlapsBox=function(t){return this.box.overlaps(t)},gl.prototype.unclipElements=function(){},gl.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},gl);function gl(t,e){ul.call(this),this.options=e,this.color=e.color||a,this.value=t}function yl(){dl.apply(this,arguments)}z(Xe.prototype,Lr),z(Xe.prototype,ro),Xe.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var vl,ml=Xe,Ke=((vl=le)&&(xl.__proto__=vl),((xl.prototype=Object.create(vl&&vl.prototype)).constructor=xl).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:l,max:c},this._evalSeries=[]},xl.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},xl.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.data.length;i++){var r=this._bindPoint(o,e,i).valueFields;this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value)}},xl.prototype.addValue=function(t,e){var o;t&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},xl.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle"]},s=this._evalSeries[r];lt(s)||(this._evalSeries[r]=s=Tr(t,{},n,!0));r=t;return s&&Tr(r=z({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},xl.prototype.pointType=function(){return ml},xl.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=z({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},xl.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color,i=this.evalPointOptions(i,t,e),r=E(o.color)?i.color:function(t,e){void 0===e&&(e=.05);var i=Object(P.parseColor)(t),r=1-e;return function(t){var e=i.toHSL(),o=100-e.l;return e.l+=Math.min((r-t)*o,o),e.toCss()}}(r)(t.value/this.valueRange.max),i=new ml(t,i);return i.color=r,this.append(i),i},xl.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,t=e?i.namedXAxes[e]:i.axisX,i=o?i.namedYAxes[o]:i.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!i)throw new Error("Unable to locate Y axis with name "+o);return{xAxis:t,yAxis:i}},xl.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,h=0;this.traverseDataPoints(function(t,e){var o=s[h++],i=n.seriesAxes(e.series),r=i.xAxis,e=i.yAxis,i=r.categoryIndex(t.x),t=e.categoryIndex(t.y),i=r.getSlot(i,i,a),t=e.getSlot(t,t,a);o&&(i&&t?(t=n.pointSlot(i,t),o.reflow(t)):o.visible=!1)}),this.box=t},xl.prototype.pointSlot=function(t,e){return new qt(t.x1,e.y1,t.x2,e.y2)},xl.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),h=s.currentRangeIndices(),p=0;p<i.data.length;p++){var l=this._bindPoint(i,o,p),c=l.valueFields,u=l.fields,d=n.totalIndex(c.x),l=s.totalIndex(c.y),d=a.min<=d&&d<=a.max,l=h.min<=l&&l<=h.max;d&&l&&t(c,z({pointIx:p,series:i,seriesIx:o,dataItem:i.data[p],owner:this},u))}},xl.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},xl.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},xl);function xl(t,e){vl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}kt(Ke,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),z(Ke.prototype,{_bindPoint:Er.prototype._bindPoint});var _l,bl=Ke,uo=((_l=Qs)&&(wl.__proto__=_l),((wl.prototype=Object.create(_l&&_l.prototype)).constructor=wl).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},wl.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},wl.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var o=t[e],i=o.data||[],r=this.seriesAxes(o),n=r.xAxis,r=r.yAxis,s=jt(n.categories||[]),a=jt(r.categories||[]),h=0;h<i.length;h++){var p=rr.current.bindPoint(o,h).valueFields,l=p.x,p=p.y;s.has(l)||s.add(l),a.has(p)||a.add(p)}n.categories=s.values(),r.categories=a.values()}},wl.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);r&&this.createHeatmapChart(Vs(r,["heatmap"]),i)}},wl.prototype.createHeatmapChart=function(t,e){t=new bl(this,{series:t});this.appendChart(t,e)},wl.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Z([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Z([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},wl.prototype.seriesAxes=function(t){var e=this.options,o=[].concat(e.xAxis),i=t.xAxis,o=i?o.find(function(t){return t.name===i}):o[0],e=[].concat(e.yAxis),r=t.yAxis,e=r?e.find(function(t){return t.name===r}):e[0];if(!o)throw new Error("Unable to locate X axis with name "+i);if(!e)throw new Error("Unable to locate Y axis with name "+r);return{xAxis:o,yAxis:e}},wl.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},wl.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],h=this.series,p=0;p<h.length;p++){var l=h[p],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===o&&!c){l=rr.current.bindPoint(l,0).valueFields;a.push(l[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){i=!0;break}t=new(zs(s.type,y)||!s.type&&i?ai:Ko)(s,this.chartService);if(t.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t.mapCategories(),t},wl.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)J(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)J(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},wl.prototype.removeAxis=function(t){var e=t.options.name;_l.prototype.removeAxis.call(this,t),t.options.vertical?delete this.namedYAxes[e]:delete this.namedXAxes[e],t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},wl.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p];Es(l.options.vertical?h:a,l.getCategory(r))}0<a.length&&0<h.length&&t.trigger(o,{element:gt(e),originalEvent:e,x:Hs(a),y:Hs(h)})},wl.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),t=(o?i.y:i.x).indexOf(t);Cl(this.options,t,o,e),Cl(this.originalOptions,t,o,e)},wl.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},wl);function wl(){_l.apply(this,arguments)}function Cl(t,e,o,i){z([].concat(o?t.yAxis:t.xAxis)[e],i)}kt(uo,{xAxis:{},yAxis:{}}),z(uo.prototype,Ks);at=uo,Me="color",ae="first",_e="max";xh.current.register(Wa,[cr,ur,dr,gr,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),xh.current.register(qh,["scatter","scatterLine","bubble"]),xh.current.register(np,[fr]),xh.current.register(gp,["donut"]),xh.current.register(Fe,["funnel"]),xh.current.register(ee,["polarArea","polarLine","polarScatter"]),xh.current.register(ce,["radarArea","radarColumn","radarLine"]),xh.current.register(at,["heatmap"]),rr.current.register([cr,ur,dr,gr,"area","verticalArea"],[p],["category",Me,"noteText","errorLow","errorHigh"]),rr.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",Me,"noteText"]),rr.current.register(["waterfall","horizontalWaterfall"],[p],["category",Me,"noteText","summary"]),rr.current.register(["polarArea","polarLine","polarScatter"],[v,m],[Me]),rr.current.register(["radarArea","radarColumn","radarLine"],[p],[Me]),rr.current.register(["funnel"],[p],["category",Me,"visibleInLegend","visible"]),ra.current.register([cr,ur,dr,gr,"area","verticalArea","waterfall","horizontalWaterfall"],{value:_e,color:ae,noteText:ae,errorLow:"min",errorHigh:_e}),ra.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:_e,color:ae,noteText:ae}),ra.current.register(["radarArea","radarColumn","radarLine"],{value:_e,color:ae}),rr.current.register(["scatter","scatterLine","bubble"],[v,m],[Me,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),rr.current.register(["bubble"],[v,m,"size"],[Me,"category","noteText"]),rr.current.register(["heatmap"],[v,m,p],[Me,"noteText"]),rr.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",Me,"downColor","noteText"]),ra.current.register(["candlestick","ohlc"],{open:_e,high:_e,low:"min",close:_e,color:ae,downColor:ae,noteText:ae}),rr.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",Me,"noteText"]),ra.current.register(["boxPlot","verticalBoxPlot"],{lower:_e,q1:_e,median:_e,q3:_e,upper:_e,mean:_e,outliers:ae,color:ae,noteText:ae}),rr.current.register(["bullet","verticalBullet"],["current","target"],["category",Me,"visibleInLegend","noteText"]),ra.current.register(["bullet","verticalBullet"],{current:_e,target:_e,color:ae,noteText:ae}),rr.current.register([fr,"donut"],[p],["category",Me,"explode","visibleInLegend","visible"]);var Sl,kl=["category",p,v,m],Vt=((Sl=P.Class)&&(Al.__proto__=Sl),((Al.prototype=Object.create(Sl&&Sl.prototype)).constructor=Al).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},Al.prototype._setElementClass=function(t){_(t,"k-chart")},Al.prototype._initTheme=function(t,e){for(var o=[],i=t.series||[],r=0;r<i.length;r++)o.push(Object.assign({},i[r]));t.series=o,function(t){for(var e=kl,o=0;o<e.length;o++){var i=e[o]+"Axes";t[i]&&(t[e[o]+"Axis"]=t[i],delete t[i])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=z({},e,t),this.applySeriesColors()},Al.prototype.getSize=function(){var t=this.options.chartArea||{};return{width:t.width?parseInt(t.width,10):Math.floor(this.element.offsetWidth),height:t.height?parseInt(t.height,10):Math.floor(this.element.offsetHeight)}},Al.prototype.resize=function(t){var e=this.getSize(),o=this._size,i=0<e.width||0<e.height;t||i&&(!o||e.width!==o.width||e.height!==o.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):i&&this._selections&&Pt(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},Al.prototype._resize=function(){this._noTransitionsRedraw()},Al.prototype.redraw=function(t){var e;this.applyDefaults(this.options),this.applySeriesColors(),t?(t=(e=this._model._plotArea).findPane(t),e.redraw(t)):this._redraw()},Al.prototype.getAxis=function(t){return Gi(t,this._plotArea.axes)},Al.prototype.findAxisByName=function(t){return this.getAxis(t)},Al.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new qi(e[o])},Al.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new qi(e[t])},Al.prototype.plotArea=function(){return new Yi(this._plotArea)},Al.prototype.toggleHighlight=function(t,e){var o,i=this._plotArea,r=(i.srcSeries||i.series||[])[0],n=E(e)?i.filterPoints(e):(V(e)?(n=e.series,o=e.category):n=o=e,"donut"===r.type?Pl(i.pointsBySeriesName(n),o):r.type===fr||"funnel"===r.type?Pl((i.charts[0]||{}).points,o):i.pointsBySeriesName(n));n&&this.togglePointsHighlight(t,n)},Al.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},Al.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;E(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&<(t)&&(o=n.categoryAxis.categoryIndex(t)),i?0<=o&&(o=this._plotArea.pointsByCategoryIndex(o),r.showAt(o)):e&&r.show(e)},Al.prototype.hideTooltip=function(){this._tooltip.hide()},Al.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&dt(e,{width:o.width}),o.height&&dt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=P.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},Al.prototype._surfaceWrap=function(){return this.element},Al.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._model=t,this._plotArea=t._plotArea,t.renderVisual(),!1!==this.options.transitions&&t.traverse(function(t){t.animation&&t.animation.setup()}),this._initSurface(),this.surface.draw(t.visual),!1!==this.options.transitions&&t.traverse(function(t){t.animation&&t.animation.play()}),this._tooltip=this._createTooltip(),this._highlight=new Ya,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Rl(this._plotArea.panes),this._navState||this._cancelDomEvents()},Al.prototype.exportVisual=function(t){var e,o;return t&&(t.width||t.height||t.options)?(e=this.options,o=z({},t.options,{chartArea:{width:t.width,height:t.height}}),Bl(this._originalOptions,o),this.options=z({},this._originalOptions,o),this._initTheme(this.options,this._theme),this.bindCategories(),(o=this._getModel()).renderVisual(),Rl(o._plotArea.panes),o=o.visual,this.options=e):o=this.surface.exportVisual(),o},Al.prototype._sharedTooltip=function(){return this._plotArea instanceof Wa&&this.options.tooltip&&this.options.tooltip.shared},Al.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new eh(this._plotArea,t.pannable))},Al.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new ah(this,e))},Al.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new hh(this,e))},Al.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,o=!(t||!1!==e&&!1!==o||this.requiresHandlers(["dragStart",vr,mr])),e=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart",xr,_r]),i=this.element;this._dragZoomEnabled&&o&&e?(i.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||o&&e||(i.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!o,!e)},Al.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},Al.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new Ph(this.chartService,t)},Al.prototype._createSharedTooltip=function(t){return new Bh(this._plotArea,t)},Al.prototype.applyDefaults=function(t,a){!function(t){var o,i,e,r=(a||{}).axisDefaults||{};function n(t){var e=(t||{}).color||i.color,t=z({},r,r[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete t[o],t}for(var s=0;s<kl.length;s++)i=t.axisDefaults||{},e=(e=[].concat(t[o=kl[s]+"Axis"])).map(n),t[o]=1<e.length?e:e[0]}(t),function(t,e){var o=t.series,i=o.length,r=t.seriesDefaults,n=z({},t.seriesDefaults),s=e?z({},e.seriesDefaults):{},a=z({},s);Tl(n),Tl(a);for(var h=0;h<i;h++){var p=o[h].type||t.seriesDefaults.type,p=z({data:[]},a,s[p],{tooltip:t.tooltip},n,r[p]);o[h]._defaults=p,o[h]=z({},p,o[h]),o[h].data=o[h].data||[]}}(t,a)},Al.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,o=t.seriesColors||[],i=0;i<e.length;i++){var r=e[i],n=o[i%o.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},Al.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new Ce(this._modelOptions());return o.chart=this,o._plotArea=e,Ue.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new vh(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},Al.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return z({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},Al.prototype._createPlotArea=function(t){var e=this.options;return xh.current.create(t?[]:e.series,e,this.chartService)},Al.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],o=0;o<t.length;o++){var i,r=t[o],n=r.options;r instanceof Ko&&n.select&&!n.vertical&&(i=r.range(),n=new Ah(this,r,z({min:i.min,max:i.max},n.select)),e.push(n))}},Al.prototype._selectStart=function(t){return this.trigger("selectStart",t)},Al.prototype._select=function(t){return this.trigger("select",t)},Al.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},Al.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._mousewheelHandler=this._mousewheel.bind(this),this._mouseleaveHandler=this._mouseleave.bind(this),this._surfaceMouseenterHandler=this._mouseover.bind(this),this._surfaceMouseleaveHandler=this._mouseout.bind(this),this._mousemove=Object(P.throttle)(this._mousemove.bind(this),20)},Al.prototype.addObserver=function(t){t&&this.observers.push(t)},Al.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},Al.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},Al.prototype.trigger=function(t,e){void 0===e&&(e={}),"showTooltip"===t&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point));for(var o=(e.sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},Al.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,pt(e,((t={}).contextmenu=this._clickHandler,t[br]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&pt(e,((e={}).mousemove=this._mousemove,e)),this.domEvents=ho.create(this.element,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)}),this._toggleDragZoomEvents()},Al.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},Al.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},Al.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},Al.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(_r,{}))},Al.prototype._gesturechange=function(t){var e,o,i=this._mousewheelZoom;i&&!this._stopChartHandlers(t)&&(t.preventDefault(),o=this._gestureDistance,e=-t.distance/o+1,.1<=Math.abs(e)&&(e=Math.round(10*e),this._gestureDistance=t.distance,o={delta:e,axisRanges:Ml(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger("zoomStart",o)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(o.axisRanges=i.updateRanges(e,t))&&!this.trigger(xr,o)&&i.zoom())))},Al.prototype._mouseout=function(t){var e;!t.element||(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},Al.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart",vr,mr])&&this._startNavigation(t,e,"dragStart"),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger("zoomStart",{axisRanges:Ml(this._plotArea.axes),originalEvent:t}))},Al.prototype._move=function(t){var e=this._navState,o=this._pannable;if(!this._stopChartHandlers(t)){if(o){var i=o.move(t);i&&!this.trigger(vr,{axisRanges:i,originalEvent:t})&&o.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,h=n[s];!h.options.name||0!=(a=(a=h.options.vertical?t.y:t.x).startLocation-a.location)&&(r[h.options.name]=h.translateRange(a))}e.axisRanges=r,this.trigger(vr,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},Al.prototype._end=function(t){var e,o;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(mr,{axisRanges:Ml(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,mr),this._zoomSelection&&(o=this._zoomSelection.end(t))&&!this.trigger(xr,{axisRanges:o,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(_r,{axisRanges:o,originalEvent:t})))},Al.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),o=this._plotArea.paneByPoint(t);if(o)for(var i=0;i<e.length;i++)if(e[i].onPane(o))return!0},Al.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return Ct(t.rate,.3)},Al.prototype._mousewheel=function(t){var e=this,o=nt(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:Ml(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger("zoomStart",n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=i.updateRanges(o,r),n.axisRanges&&!this.trigger(xr,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(_r,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{i=this._navState;if(i=!i&&!this._startNavigation(t,r,"zoomStart")?this._navState:i){var s=i.totalDelta||o;i.totalDelta=s+o;for(var a=this._navState.axes,h={},p=0;p<a.length;p++){var l=a[p],c=l.options.name;c&&(h[c]=l.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(xr,{delta:o,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,_r)},150)}}},Al.prototype._startNavigation=function(t,e,o){var i=this._model._plotArea,r=i.findPointPane(e),e=i.axes.slice(0);r&&(i=Ml(e),this.trigger(o,{axisRanges:i,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:i,pane:r,axes:e}))},Al.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},Al.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},Al.prototype._drawingChartElement=function(t,e,o){for(var i,r=t;r&&!i;)i=r.chartElement,r=r.parent;if(i)return i.aliasFor&&(i=i.aliasFor(e,this._eventCoordinates(e))),i=o&&(i=i.closest(o))&&i.aliasFor?i.aliasFor():i},Al.prototype._eventCoordinates=function(t){t=ft(t);return this._toModelCoordinates(t.x,t.y)},Al.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=H(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},Al.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=ut(this.element);return{left:bt(t.x+e.left+o.left),top:bt(t.y+e.top+o.top)}},Al.prototype._toModelCoordinates=function(t,e){var o=this.element,i=ut(o),r=this._elementPadding(),o=Bt(o).invert(),o=new P.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new Nt(o.x,o.y)},Al.prototype._tap=function(t){var e=this,o=this.surface.eventTarget(t),i=this._drawingChartElement(o,t),r=this._sharedTooltip();this._startHover(o,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(i,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},Al.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},Al.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},Al.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var o=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Qs)}),i=this._activePoint,r=1<this._plotArea.series.length,t=this._hasInactiveOpacity();return this._updateHoveredPoint(o,e),o&&i!==o&&o.hover?(this._activePoint=o,this._sharedTooltip()||o.hover(this,e)||(this._displayTooltip(o),t?this._displayInactiveOpacity(o,r):this._highlight.show(o))):!o&&t&&(r&&this._activeChartInstance&&(this._updateSeriesOpacity(o,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),o},Al.prototype._displayTooltip=function(t){z({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},Al.prototype._displayInactiveOpacity=function(t,e,o){var i=this._activeChartInstance=this._chartInstanceFromPoint(t);i&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(i.children,null,!0),this._applySeriesOpacity(i.children,t.series),this._highlight.show(o||t)):i.supportsPointInactiveOpacity()?(i=this._getInactivePoints(t,i))&&i.length&&this._highlight.show(i,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},Al.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},Al.prototype._getAllPointsOfType=function(t,e){for(var o=[],i=0;i<t.children.length;i++){var r=t.children[i];r.constructor===e?o.push(r):r.children&&r.children.length&&(o=o.concat(this._getAllPointsOfType(r,e)))}return o},Al.prototype._updateHoveredPoint=function(t,e){var o=this._hoveredPoint;o&&o!==t&&(o.out(this,e),this._hoveredPoint=null),t&&o!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},Al.prototype._updateSeriesOpacity=function(t,e){for(var o=this._plotArea,i=o.series.length,r=0;r<i;r++){var n=o.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},Al.prototype._applySeriesOpacity=function(t,e,o,i){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||i;a&&(a.highlight||{}).visible&&s.visual&&(n=(i||s.series).opacity,a===e&&!o||s.visual.opacity(o?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,o,s.series)}},Al.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},Al.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=0<this.options.series.filter(function(t){return void 0!==t.highlight.inactiveOpacity}).length;return t||e},Al.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},Al.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},Al.prototype._mouseover=function(t){var t=this._startHover(t.element,t.originalEvent);t&&t.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),pt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)))},Al.prototype._mouseMoveTracking=function(t){var e,o=this.options,i=this._tooltip,r=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);this._plotArea.box.containsPoint(s)?n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint&&((e=n.parent.getNearestPoint(s.x,s.y,n.seriesIx))&&e!==n&&((this._activePoint=e).hover(this,t)||(z({},o.tooltip,e.options.tooltip).visible&&i.show(e),r.show(e)))):(wt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},Al.prototype._mousemove=function(t){var e,o=this._eventCoordinates(t),i=this._plotArea;this._trackCrosshairs(o),i.hover&&((e=i.backgroundContainsPoint(o))?(i.hovered=!0,this._plotArea.hover(this,t)):i.hovered&&!e&&(this.trigger("plotAreaLeave"),i.hovered=!1)),this._sharedTooltip()&&this._trackSharedTooltip(o,t)},Al.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,o=0;o<e.length;o++){var i=e[o];i.box.containsPoint(t)?i.showAt(t):i.hide()}},Al.prototype._trackSharedTooltip=function(t,e,o){var i,r,n,s,a,h,p;this._suppressHover||(i=this.options.tooltip,p=this._plotArea,h=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,p.backgroundContainsPoint(t)?(s=h.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&o?((p=(h=(a=p.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=h,0<a.length&&!this.trigger("seriesHover",p)?(i.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):o&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},Al.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},Al.prototype._unsetActivePoint=function(t){var e=this._tooltip,o=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,o&&o.hide()},Al.prototype._deferRedraw=function(){this._redraw()},Al.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},Al.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),o=0;o<e.length;o++){var i=e[o];!1!==i.autoBind&&this.bindCategoryAxisFromSeries(i,o)}},Al.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,i,r=this.options.series,n=r.length,s=new $,a=[],h=!1,p=0;p<n;p++){var l=r[p],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,h=c||h;if(c&&0<d)for(var f=(o=Ds(t,Ji(l.categoryField,u[0])))?js:Ji,g=0;g<d;g++){var y=u[g],v=f(l.categoryField,y,this.chartService.intl);!o&&s.get(v)||(a.push([v,y]),o||s.set(v,!0))}}0<a.length?(i=function(t){for(var e=t.length,o=[],i=0;i<e;i++)for(var r=t[i],n=r.length,s=0;s<n;s++)o[s]=o[s]||[],o[s].push(r[s]);return o}(a=o?function(t){for(var e=function(t,e){void 0===e&&(e=Do);for(var o=1,i=t.length;o<i;o++)if(e(t[o],t[o-1])<0){t.sort(e);break}return t}(a,t=void 0===t?Do:t),o=e.length,i=0<o?[e[0]]:[],r=1;r<o;r++)0!==t(e[r],vt(i))&&i.push(e[r]);return i}(function(t,e){return Do(t[0],e[0])}):a),t.categories=i[0]):h&&(t.categories=[])},Al.prototype._isBindable=function(t){for(var e=rr.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===p?r="field":r+="Field",!lt(t[r])){o=!1;break}}return o},Al.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},Al.prototype._legendItemHover=function(e,o){var t=this._plotArea,i=this._highlight,r=(t.srcSeries||t.series)[e],n=J(r.type,[fr,"donut","funnel"])?t.findPoint(function(t){return t.series.index===e&&t.index===o}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):i.show(n)},Al.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},Al.prototype.updateMouseMoveHandler=function(){var t;wt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&pt(this.element,((t={}).mousemove=this._mousemove,t))},Al.prototype.applyOptions=function(t,e){Bl(this._originalOptions,t),this._originalOptions=z(this._originalOptions,t),this.options=z({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},Al.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},Al.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},Al.prototype.setIntlService=function(t){this.chartService.intl=t},Al.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},Al.prototype.destroy=function(){var t;this._destroyed=!0,wt(this.element,((t={}).contextmenu=this._clickHandler,t[br]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&wt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},Al.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},Al.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},Al.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._destroySelections(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)},Al);function Al(t,e,o,i){var r=this;void 0===i&&(i={}),Sl.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new ao(this,i),this.chartService.theme=o,this._initElement(t);t=z({},this.options,e);this._originalOptions=z({},t),this._theme=o,this._initTheme(t,o),this._initHandlers(),this._initSurface(),this.bindCategories(),St.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function Pl(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function Tl(t){delete t.bar,delete t.column,delete t.rangeColumn,delete t.line,delete t.verticalLine,delete t.pie,delete t.donut,delete t.area,delete t.verticalArea,delete t.scatter,delete t.scatterLine,delete t.bubble,delete t.candlestick,delete t.ohlc,delete t.boxPlot,delete t.bullet,delete t.verticalBullet,delete t.polarArea,delete t.polarLine,delete t.radarArea,delete t.radarLine,delete t.waterfall}function Ml(t){for(var e={},o=0;o<t.length;o++){var i=t[o],r=i.options.name;r&&(e[r]=i.range())}return e}var Ol=["data","categories"];function Bl(t,e){for(var o in e){var i,r,n;!J(o,Ol)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],lt(r)&&((n=null===i)||!lt(i)?(delete t[o],n&&delete e[o]):r&&V(i)&&V(r)&&Bl(r,i)))}}function Rl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}kt(Vt,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:ur,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});var El,Ll=Vt,Il=((El=Bh)&&(Vl.__proto__=El),((Vl.prototype=Object.create(El&&El.prototype)).constructor=Vl).prototype._slotAnchor=function(t,e){var o=this.plotArea.categoryAxis.options.vertical,i=o?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:o?new Nt(this.plotArea.box.x2,e.center().y):new Nt(e.center().x,-2),align:i}},Vl.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},Vl),zl=[cr,"bullet"];function Vl(){El.apply(this,arguments)}function jl(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[o]=i.style.display,i.style.display="none"}return e}function Dl(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Hl(t){return O(t)?[t]:t}var Ul,ge=((Ul=Ll)&&(Fl.__proto__=Ul),((Fl.prototype=Object.create(Ul&&Ul.prototype)).constructor=Fl).prototype._setElementClass=function(t){_(t,"k-sparkline")},Fl.prototype._initElement=function(t){Ul.prototype._initElement.call(this,t),this._initialWidth=Math.floor(dt(t).width)},Fl.prototype._resize=function(){var t=this.element,e=jl(t.childNodes);this._initialWidth=Math.floor(dt(t).width),Dl(t.childNodes,e),Ul.prototype._resize.call(this)},Fl.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=jl(e.childNodes),i=document.createElement("span");i.innerHTML=" ",e.appendChild(i);t=z({width:this._autoWidth,height:dt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return dt(e,{width:t.width,height:t.height}),e.removeChild(i),Dl(e.childNodes,o),this.surface&&this.surface.resize(),t},Fl.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Fl.prototype._createPlotArea=function(t){t=Ul.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Fl.prototype._calculateWidth=function(t){for(var e=this.options,o=U(e.chartArea.margin),i=t.charts,r=this._surfaceWrap(),n=0,s=0;s<i.length;s++){var a=i[s],h=(a.options.series||[])[0];if(h){if(h.type===cr)return 150;if("bullet"===h.type)return 150;if(h.type===fr)return dt(r).height;var p=a.categoryAxis;p&&(a=p.categoriesCount()*(!a.options.isStacked&&J(h.type,[ur,"verticalBullet"])?a.seriesOptions.length:1),n=Math.max(n,a))}}e=n*e.pointWidth;return 0<e&&(e+=o.left+o.right),e},Fl.prototype._createSharedTooltip=function(t){return new Il(this._plotArea,t)},Fl.normalizeOptions=function(t){t=Hl(t);return(t=x(t)?{seriesDefaults:{data:t}}:z({},t)).series||(t.series=[{data:Hl(t.data)}]),z(t,{seriesDefaults:{type:t.type}}),t=J(t.series[0].type,zl)||J(t.seriesDefaults.type,zl)?z({},{categoryAxis:{crosshair:{visible:!1}}},t):t},Fl);function Fl(){Ul.apply(this,arguments)}kt(ge,{chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]});var Nl,Gl=ge,Wl=((Nl=P.drawing.Animation)&&(Xl.__proto__=Nl),((Xl.prototype=Object.create(Nl&&Nl.prototype)).constructor=Xl).prototype.setup=function(){this._initialOpacity=parseFloat(H(this.element,"opacity").opacity)},Xl.prototype.step=function(t){H(this.element,{opacity:String(tt(this._initialOpacity,0,t))})},Xl.prototype.abort=function(){Nl.prototype.abort.call(this),H(this.element,{display:"none",opacity:String(this._initialOpacity)})},Xl.prototype.cancel=function(){Nl.prototype.abort.call(this),H(this.element,{opacity:String(this._initialOpacity)})},Xl);function Xl(){Nl.apply(this,arguments)}function ql(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}var Yl,eo=((Yl=P.Class)&&(Zl.__proto__=Yl),((Zl.prototype=Object.create(Yl&&Yl.prototype)).constructor=Zl).prototype.createElements=function(){var t=this.element=ql("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=ql("k-tooltip k-chart-tooltip"),o=this.scroll=ql("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},Zl.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Lo(Uo(t)+Uo(e-t)/2),h=.4*o.width(),p=o.center().x-h,l=(o.center().x-p)/(r.max-r.min),c=a-r.min,a=this.chartService.intl.format(r.format,t,e),r=W(r);this.clearHideTimeout(),this._visible||(H(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(a=r({from:t,to:e})),s.innerHTML=a,H(s,{left:o.center().x-s.offsetWidth/2,top:o.y1});s=H(s,["marginTop","borderTopWidth","height"]);H(n,{width:h,left:p+c*l,top:o.y1+s.marginTop+s.borderTopWidth+s.height/2}),H(i,{visibility:"visible"})},Zl.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},Zl.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new Wl(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},Zl.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll},Zl);function Zl(t,e,o){Yl.call(this),this.options=z({},this.options,o),this.container=t,this.chartService=e;e=H(t,["paddingLeft","paddingTop"]);this.chartPadding={top:e.paddingTop,left:e.paddingLeft},this.createElements(),t.appendChild(this.element)}kt(eo,{format:"{0:d} - {1:d}",hideDelay:500});var Ql=eo,Kl="_navigator",$l=Kl;function Jl(){}var tc,ec,oc=((ec=P.Class)&&(rc.__proto__=ec),((rc.prototype=Object.create(ec&&ec.prototype)).constructor=rc).prototype.parseDate=function(t){return Xo(this.chart.chartService.intl,t)},rc.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},rc.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},rc.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},rc.prototype.initSelection=function(){var t=this.chart,e=this.options,o=this.mainAxis(),i=o.roundedRange(),r=i.min,n=i.max,s=e.select,a=s.from,h=s.to,i=s.mousewheel,s=(Jl.prototype=o,new Jl);0!==o.categoriesCount()&&(this.clean(),s.box=o.box,this.selection=new Ah(t,s,{min:r,max:n,from:a||r,to:h||n,mousewheel:Ct(i,{zoom:"left"}),visible:e.visible},new ot(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible&&(this.hint=new Ql(t.element,t.chartService,{min:r,max:n,template:W(e.hint),format:e.hint.format})))},rc.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[$l].roundedRange(),e=t.min,o=t.max,i=this.options.select||{},r=i.from||e,t=i.to||o;this.options.select=z({},i,{from:r=r<e?e:r,to:t=o<t?o:t}),this.filterAxes()},rc.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(vt(e.panes),t)},rc.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,o=e.panes.slice(0,-1);e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(o)},rc.prototype._drag=function(t){var e=this.chart,o=this.selection,i=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),i=r.pane.box.containsPoint(i),e=e._plotArea.categoryAxis,t=t.axisRanges[e.options.name],e=this.options.select;t&&!i&&o&&(e=e.from&&e.to?Uo(e.to)-Uo(e.from):Uo(o.options.to)-Uo(o.options.from),t=Lo(mt(Uo(t.min),n.min,Uo(n.max)-e)),n=Lo(mt(Uo(t)+e,Uo(n.min)+e,n.max)),this.options.select={from:t,to:n},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(t,n),this.showHint(t,n))},rc.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},rc.prototype.readSelection=function(){var t=this.selection.options,e=t.from,o=t.to,t=this.options.select;t.from=e,t.to=o},rc.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,o=(t=void 0===t?{}:t).from,i=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==Kl&&(n.min=o,n.max=i)}},rc.prototype.filter=function(){var t,e,o=this.chart,i=this.options.select;o.requiresHandlers(["navigatorFilter"])&&(t=this.mainAxis(),e={from:i.from,to:i.to},"category"!==t.options.type&&(o=new ai(z({baseUnit:"fit"},o.options.categoryAxis[0],{categories:[i.from,i.to]}),o.chartService).options,e.from=zo(o.min,-o.baseUnitStep,o.baseUnit),e.to=zo(o.max,o.baseUnitStep,o.baseUnit)),this.chart.trigger("navigatorFilter",e))},rc.prototype._zoom=function(t){var e,o=this.chart._plotArea.categoryAxis,i=this.selection,r=this.options,n=r.select,s=r.liveDrag,a=this.mainAxis(),h=t.delta;i&&(e=a.categoryIndex(i.options.from),r=a.categoryIndex(i.options.to),a=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(h)&&(h*=3),1<r-e?(i.zoom(h,a),this.readSelection()):(o.options.min=n.from,n.from=o.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),a).min),s&&(this.filterAxes(),this.redrawSlaves()),i.set(n.from,n.to),this.showHint(this.options.select.from,this.options.select.to))},rc.prototype._zoomEnd=function(t){this._dragEnd(t)},rc.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},rc.prototype._selectStart=function(t){return this.chart._selectStart(t)},rc.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},rc.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},rc.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[$l]},rc.prototype.select=function(t,e){var o=this.options.select;return t&&e&&(o.from=this.parseDate(t),o.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:o.from,to:o.to}},rc.setup=function(t,e){var o,i,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,o=z({},e.navigator,t.navigator),i=t.panes=[].concat(t.panes),r=z({},o.pane,{name:Kl}),o.visible||(r.visible=!1,r.height=.1),i.push(r),rc.attachAxes(t,o),rc.attachSeries(t,o,e))},rc.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis),t=0===Vs(o,yr).length,o=z({type:"date",pane:Kl,roundToBaseUnit:!t,justified:t,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),t=e.categoryAxis;i.push(z({},o,{maxDateGroups:200},t,{name:$l,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),z({},o,t,{name:$l+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),z({},o,t,{name:$l+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(z({name:$l,pane:Kl,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},rc.attachSeries=function(t,e,o){for(var i=t.series=t.series||[],r=[].concat(e.series||[]),n=o.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)i.push(z({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:$l,categoryAxis:$l,autoBind:e.autoBindElements}))},rc),It=((tc=Ll)&&(ic.__proto__=tc),((ic.prototype=Object.create(tc&&tc.prototype)).constructor=ic).prototype.applyDefaults=function(t,e){var o=dt(this.element).width||600,e=e,o={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(o/28)}}},e=e&&z({},e,o);oc.setup(t,e),tc.prototype.applyDefaults.call(this,t,e)},ic.prototype._setElementClass=function(t){_(t,"k-chart k-stockchart")},ic.prototype.setOptions=function(t){this.destroyNavigator(),tc.prototype.setOptions.call(this,t)},ic.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},ic.prototype._resize=function(){this.noTransitionsRedraw()},ic.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},ic.prototype._dirty=function(){var t=this.options,e=Z([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,t=this._seriesCount!==e;return this._seriesCount=e,t},ic.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new oc(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),tc.prototype._redraw.call(this),t.initSelection()},ic.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Kl?this._unsetActivePoint():tc.prototype._trackSharedTooltip.call(this,t)},ic.prototype.bindCategories=function(){tc.prototype.bindCategories.call(this),this.copyNavigatorCategories()},ic.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===$l?t=i.categories:t&&i.pane===Kl&&(i.categories=t)}},ic.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},ic.prototype.destroy=function(){this.destroyNavigator(),tc.prototype.destroy.call(this)},ic.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return tc.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===Kl},ic.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},ic);function ic(){tc.apply(this,arguments)}function rc(t){ec.call(this),this.chart=t;var e=this.options=z({},this.options,t.options.navigator),o=e.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),lt(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new ot(this,((e={})[vr]="_drag",e[mr]="_dragEnd",e[xr]="_zoom",e[_r]="_zoomEnd",e)),t.addObserver(this.chartObserver)}kt(It,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!0},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});var nc=It,sc=Math.PI/180;function ac(t,e){var o=t.getOrigin(),i=t.getSize(),e=U(e);return t.setOrigin([o.x-e.left,o.y-e.top]),t.setSize([i.width+(e.left+e.right),i.height+(e.top+e.bottom)]),t}var hc=P.drawing.Group,pc=P.drawing.Path,lc=P.drawing.Text;function cc(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",o=pc.fromRect(new P.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),i=new lc(t.text,new P.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),e=ac(i.bbox().clone(),e.padding),r=pc.fromRect(e,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),n=new hc;return n.append(o),n.append(r),n.append(i),n}function uc(t,e,o){var i=lt(t.from)?t.from:c,r=lt(t.to)?t.to:l;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function dc(t,e){e=U(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,ac(t,e)}var fc,gc=P.drawing.Path,yc=P.drawing.Surface,Se=((fc=P.Class)&&(vc.__proto__=fc),((vc.prototype=Object.create(fc&&fc.prototype)).constructor=vc).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},vc.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},vc.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},vc.prototype.exportVisual=function(){return this._visuals},vc.prototype.allValues=function(t){var e=this.pointers,o=[];if(0===arguments.length){for(var i=0;i<e.length;i++)o.push(e[i].value());return o}if(x(t))for(var r=0;r<t.length;r++)O(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},vc.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),o=[].concat(t),i=0;i<o.length;i++)e[i].value=o[i]},vc.prototype.resize=function(){this.noTransitionsRedraw()},vc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},vc.prototype.redraw=function(){var t=this._surfaceSize(),t=new P.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();t=dc(t.bbox(),this._gaugeAreaMargin);this.reflow(t)},vc.prototype.setOptions=function(t,e){this._originalOptions=z(this._originalOptions,t),this.options=z({},this._originalOptions),this._initTheme(e),this.redraw()},vc.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},vc.prototype.setIntlService=function(t){this.contextService.intl=t},vc.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=z({},e,this.options);var t=this.options,o=t.pointer;if(x(o)){for(var i=[],r=0;r<o.length;r++)i.push(z({},e.pointer,o[r]));t.pointer=i}},vc.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},e=new P.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<o.width&&(e=dc(e,o.width)),gc.fromRect(e,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},vc.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();dt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=yc.create(o,{type:t.renderAs}))},vc.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&z(e,t.gaugeArea),e},vc.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},vc.prototype.getSize=function(){return this._getSize()},vc.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),o=t.offsetWidth,t=t.offsetHeight;return{width:o=o||e.width,height:t=t||e.height}},vc.prototype._defaultSize=function(){return{width:200,height:200}},vc.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},vc);function vc(t,e,o,i){void 0===i&&(i={}),fc.call(this),this.element=t,this.theme=o,this.contextService=new ao(this,i),this._originalOptions=z({},this.options,e),this.options=z({},this._originalOptions),this._initTheme(o),this.redraw()}kt(Se,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var mc=Se,xc=P.drawing.Path,_c=P.drawing.Group,bc=P.geometry.Point;function wc(t,e,o,i){var r,n,s,a,h,p=e.length;if(i.visible)for(var l=o.mirror,c=o.lineBox,u=i.skip;u<p;u+=i.step)u%i.skipUnit!=0&&(o.tickX=l?c.x2:c.x2-i.size,o.tickY=l?c.y1-i.size:c.y1,o.position=e[u],t.append((r=i,a=s=n=void 0,h=void 0,s=o.position,a=o.tickX,h=o.tickY,h=o.vertical?(n=new bc(a,s),new bc(a+r.size,s)):(n=new bc(s,h),new bc(s,h+r.size)),new xc({stroke:{color:r.color,width:r.width}}).moveTo(n).lineTo(h))))}var Cc,Ve=((Cc=yi)&&(Sc.__proto__=Cc),((Sc.prototype=Object.create(Cc&&Cc.prototype)).constructor=Sc).prototype.initUserOptions=function(t){t=z({},this.options,t);return(t=z({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Ut(t.min,t.max),t},Sc.prototype.initFields=function(){},Sc.prototype.render=function(){var t=this.elements=new _c,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},Sc.prototype.renderRanges=function(){for(var t=this.options,e=t.min,o=t.max,i=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new _c,a=n.length,h=t.rangeSize||t.minorTicks.size/2,p=0;p<a;p++){var l=uc(n[p],e,o),c=this.getSlot(l.from,l.to),u=i?this.lineBox():c,c=i?c:this.lineBox();i?u.x1-=h*(r?-1:1):c.y2+=h*(r?-1:1),s.append(xc.fromRect(new P.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},Sc.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new _c,i=0;i<t.length;i++)o.append(cc(t[i],e.labels));return o},Sc.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new _c;return 0<t.width&&t.visible&&((t=new xc({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(t)),o},Sc.prototype.renderTicks=function(){var t=new _c,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return wc(t,this.getMajorTickPositions(),i,e.majorTicks),wc(t,this.getMinorTickPositions(),i,z({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},Sc);function Sc(t,e){t=t||{};!lt(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),Cc.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}kt(Ve,{min:0,max:50,majorTicks:{size:15,align:"inside",color:r,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:r,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var kc,Ac=Ve,ro=((kc=P.Class)&&(Pc.__proto__=kc),((Pc.prototype=Object.create(kc&&kc.prototype)).constructor=Pc).prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var i=this.scale.options,o=i.min,i=i.max;e._oldValue=lt(e._oldValue)?e.value:o,e.value=mt(t,o,i),this.elements&&this.repaint()},Pc);function Pc(t,e){kc.call(this);var o=t.options,i=o.min,o=o.max,e=this.options=z({},this.options,e);e.fill=e.color,this.scale=t,lt(e.value)?e.value=mt(e.value,i,o):e.value=i}kt(ro,{color:r});var Tc,Xe=ro,Ke=((Tc=Xe)&&(Mc.__proto__=Tc),((Mc.prototype=Object.create(Tc&&Tc.prototype)).constructor=Mc).prototype.reflow=function(){var t,e,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,h=r.lineBox(),p=i.track.size||i.size,n=i.size/2,r=U(i.margin),r=a?r[s?"left":"right"]:r[s?"bottom":"top"],r=s?-r:r;a?(o=new qt(h.x1+r,h.y1,h.x1+r,h.y2),s?o.x1-=p:o.x2+=p,"barPointer"!==i.shape&&(t=e=new qt(h.x2+r,h.y1-n,h.x2+r,h.y2+n))):(o=new qt(h.x1,h.y1-r,h.x2,h.y1-r),s?o.y2+=p:o.y1-=p,"barPointer"!==i.shape&&(t=e=new qt(h.x1-n,h.y1-r,h.x2+n,h.y1-r))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(i.border.width)},Mc.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:lt(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},Mc.prototype._margin=function(){var t=this.scale,e=this.options,o=t.options,t=o.mirror,o=o.vertical,e=U(e.margin);return o?e[t?"left":"right"]:e[t?"bottom":"top"]},Mc);function Mc(t,e){Tc.call(this,t,e),this.options=z({track:{visible:lt(e.track)}},this.options)}kt(Ke,{shape:"barPointer",track:{border:{width:1}},color:r,border:{width:1},opacity:1,margin:U(3),animation:{type:"barPointer"},visible:!0});var Oc,Bc=Ke,uo=((Oc=P.drawing.Animation)&&(Rc.__proto__=Oc),((Rc.prototype=Object.create(Oc&&Oc.prototype)).constructor=Rc).prototype.setup=function(){var t=this.options,e=t.margin,o=t.from,i=t.to,r=t.vertical,n=r?"x1":"y1";t.mirror===r?(o[n]-=e,i[n]-=e):(o[n]+=e,i[n]+=e);o=this.fromScale=new P.geometry.Point(o.x1,o.y1),i=this.toScale=new P.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(o.distanceTo(i)/t.duration*1e3,1))},Rc.prototype.step=function(t){var e=tt(this.fromScale.x,this.toScale.x,t),t=tt(this.fromScale.y,this.toScale.y,t);this.element.transform(P.geometry.transform().translate(e,t))},Rc);function Rc(){Oc.apply(this,arguments)}kt(uo,{easing:"linear",duration:250}),P.drawing.AnimationFactory.current.register("arrowPointer",uo);var Ec,Lc,Ic=uo,zc=P.geometry.Point,Vc=P.drawing.Path,jc=((Lc=Bc)&&(Hc.__proto__=Lc),((Hc.prototype=Object.create(Lc&&Lc.prototype)).constructor=Hc).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,o=e/2,i=t.options.mirror?-1:1;return t.options.vertical?[new zc(0,0-o),new zc(0-i*e,0),new zc(0,0+o)]:[new zc(0-o,0),new zc(0,0+i*e),new zc(0+o,0)]},Hc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Ic(this.elements,z(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(t.options.duration=0),t.setup(),t.play()},Hc.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value);e.animation.type="arrowPointer";i=new Vc({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close(),e=t.getSlot(e.value);return i.transform(P.geometry.transform().translate(e.x1,e.y1)),this.elements=i},Hc),Fe=((Ec=P.drawing.Animation)&&(Dc.__proto__=Ec),((Dc.prototype=Object.create(Ec&&Ec.prototype)).constructor=Dc).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?m:v,o=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(o-e)/t.speed*1e3,1)),this._set(e)},Dc.prototype.step=function(t){t=tt(this.from,this.to,t);this._set(t)},Dc.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},Dc);function Dc(){Ec.apply(this,arguments)}function Hc(t,e){Lc.call(this,t,e),lt(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}kt(Fe,{easing:"linear",speed:250}),P.drawing.AnimationFactory.current.register("barPointer",Fe);var Uc,Fc,Nc=Fe,Gc=P.drawing.Group,Wc=P.drawing.Path,Xc=((Fc=Bc)&&(Zc.__proto__=Fc),((Zc.prototype=Object.create(Fc&&Fc.prototype)).constructor=Zc).prototype.pointerShape=function(t){var e=this.scale,o=this.options,i=e.options,r=i.mirror,n=i.vertical,s=r===n?-1:1,a=o.size*s,i=e.getSlot(e.options.min),r=e.getSlot(t),o=n?m:v,e=n?v:m,t=this._margin()*s,s=new P.geometry.Point;s[o]=i[o+"1"],s[e]=i[e+"1"];i=new P.geometry.Point;i[o]=r[o+"1"],i[e]=r[e+"1"],n?(s.translate(t,0),i.translate(t,0)):(s.translate(0,t),i.translate(0,t));e=i.clone(),t=s.clone();return n?(e.translate(a,0),t.translate(a,0)):(e.translate(0,a),t.translate(0,a)),[s,i,e,t]},Zc.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue);i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close();o=new Nc(i,z(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]}));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},Zc.prototype.render=function(){var t=new Gc,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());e=this.pointerPath=new Wc({stroke:e.stroke,fill:e.fill});return t.append(e),this.elements=t},Zc.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new Wc.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},Zc),qc=P.drawing.Group,ee=((Uc=mc)&&(Yc.__proto__=Uc),((Yc.prototype=Object.create(Uc&&Uc.prototype)).constructor=Yc).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,t=new qt(o,i,o+t.width(),i+t.height());this.scale.reflow(t),this._shrinkScaleWidth(t);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(t),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},Yc.prototype._buildVisual=function(){var t=new qc,e=this.scale.render(),o=this.pointers;t.append(this.gaugeArea),t.append(e);for(var i=0;i<o.length;i++){var r=o[i];t.append(r.render()),r.value(r.options.value)}this._visuals=t},Yc.prototype._createModel=function(){var t=this.options,e=this.scale=new Ac(t.scale,this.contextService);this.pointers=[];for(var o=x(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=z({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?jc:Xc;this.pointers.push(new n(e,r))}},Yc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Yc.prototype._getBox=function(t){for(var e,o=this.scale,i=this.pointers,r=t.center(),n=i[0].box.clone().wrap(o.box),s=0;s<i.length;s++)n.wrap(i[s].box.clone());return n=o.options.vertical?(e=n.width()/2,new qt(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new qt(t.x1,r.y-e,t.x2,r.y+e))},Yc.prototype._alignElements=function(){for(var t,e=this.scale,o=this.pointers,i=e.box,r=o[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<o.length;s++)r.wrap(o[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new qt(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new qt(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},Yc.prototype._shrinkScaleWidth=function(t){var e,o=this.scale;o.options.vertical||0<(e=o.contentBox().width()-t.width())&&(o.box.shrink(e,0),o.box.alignTo(t,"center"),o.reflow(o.box))},Yc.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,o=t.box.clone(),i=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());o[i+1]+=Math.max(o[i+1]-r[i+1],0),o[i+2]-=Math.max(r[i+2]-o[i+2],0),t.reflow(o);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},Yc);function Yc(){Uc.apply(this,arguments)}function Zc(t,e){Fc.call(this,t,e),lt(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}kt(ee,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Qc=ee,Kc=P.drawing.Arc,$c=P.drawing.Path,Jc=P.drawing.Group;function tu(t,e,o,i){var r=new Jc,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var h=t.pointAt(e[a]),p=new P.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new $c({stroke:{color:i.color,width:i.width}}).moveTo(h).lineTo(p))}return r}function eu(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}var ou,ce=((ou=yi)&&(iu.__proto__=ou),((iu.prototype=Object.create(ou&&ou.prototype)).constructor=iu).prototype.initUserOptions=function(t){t=z({},this.options,t);return t.majorUnit=t.majorUnit||Ut(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},iu.prototype.initFields=function(){},iu.prototype.render=function(t,e){e=this.renderArc(t,e);this.bbox=e.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},iu.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!lt(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},iu.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,e=s-n;return(r?s-(t-o)/(i-o)*e:(t-o)/(i-o)*e+n)+180},iu.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},iu.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,o=t.minorTicks,t=0;return e.visible&&(t=e.size),t=o.visible?Math.max(o.size,t):t},iu.prototype.labelsCount=function(){var t=ou.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},iu.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),i=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*o,n=new Jc,s=.05*o;lt(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,h="inside"===a.position,p=lt(this.labelElements);h&&(o-=this.ticksSize(),this.hasRanges()&&!p&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,c=l.length,a=U(a.padding),u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=0;f<c;f++){var g=l[f],y=g.box.width()/2,v=g.box.height()/2,m=i[f],x=(m-180)*sc,_=e.pointAt(m),m=_.x+Math.cos(x)*(y+u)*(h?1:-1),x=_.y+Math.sin(x)*(v+d)*(h?1:-1);g.reflow(new qt(m-y,x-v,m+y,x+v));m=new P.geometry.Point(g.box.x1,g.box.y1),y=void 0;p?(x=(y=this.labelElements.children[f]).bbox().origin,(v=y.transform()||P.geometry.transform()).translate(m.x-x.x,m.y-x.y),y.transform(v)):(y=cc(g,t.labels),n.append(y)),this.bbox=P.geometry.Rect.union(this.bbox,y.bbox())}return n},iu.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,o=e.rangeDistance,i=e.rangeSize,e=this.getRangeRadius();"inside"===this.options.labels.position&&(e+=i+o);for(var r=e+i/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=P.geometry.Rect.union(this.bbox,this.ranges.bbox())}},iu.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Jc;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,i=i.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-i);for(var a=0;a<e;a++){var h=t[a],p=this.slotAngle(h[n?"to":"from"]),l=this.slotAngle(h[n?"from":"to"]);l-p!=0&&o.append(this.createRange(p,l,s,h))}}return o},iu.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,e=new P.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Kc(e,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},iu.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],o=e.length,i=[];if(o){var r=t.min,n=t.max,s=t.rangePlaceholderColor;i.push(eu(r,n,s));for(var a=0;a<o;a++)for(var h=uc(e[a],r,n),p=i.length,l=0;l<p;l++){var c=i[l];if(c.from<=h.from&&h.from<=c.to){i.push(eu(h.from,h.to,h.color,h.opacity)),c.from<=h.to&&h.to<=c.to&&i.push(eu(h.to,c.to,s,h.opacity)),c.to=h.from;break}}}return i},iu.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,i=e.rangeDistance,r=e.majorTicks.size;return"outside"===e.labels.position?t.getRadiusX()-r-i-o:t.getRadiusX()-o},iu.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new P.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},iu.prototype.renderTicks=function(){var t=this.arc,e=this.options,o=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=tu(o,this.majorTickAngles,e.majorUnit,e.majorTicks);var i=new Jc;i.append(this.majorTicks);var r,n=e.majorTicks.size,s=e.minorTicks.size;return this._tickDifference=n-s,"outside"===e.labels.position&&(r=o.getRadiusX(),o.setRadiusX(r-n+s).setRadiusY(r-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=tu(o,this.minorTickAngles,e.minorUnit,e.minorTicks),i.append(this.minorTicks),i},iu.prototype.normalizeTickAngles=function(t){for(var e=this.options,o=e.majorUnit/e.minorUnit,i=t.length-1;0<=i;i--)i%o==0&&t.splice(i,1);return t},iu.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,r=o.max-o.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,h=n/s;i&&(a+=n,h=-h),360<=n&&o.max%e==0&&--s;for(var p=[],l=0;l<s;l++)p.push(bt(a,3)),a+=h;return bt(a)<=t.endAngle&&p.push(a),p},iu.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},iu.prototype.repositionTicks=function(t,e,o){var i=o&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();o&&"outside"===this.options.labels.position&&0!==i&&(r=this.arc.clone()).setRadiusX(n-i).setRadiusY(n-i);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),h=t[s].segments,p=a.x-h[0].anchor().x,h=a.y-h[0].anchor().y;t[s].transform((new P.geometry.transform).translate(p,h))}},iu);function iu(t,e){ou.call(this,0,1,t,e)}kt(ce,{min:0,max:100,majorTicks:{size:15,align:"inside",color:r,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:r,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var ru,nu=ce,at=((ru=P.drawing.Animation)&&(su.__proto__=ru),((su.prototype=Object.create(ru&&ru.prototype)).constructor=su).prototype.step=function(t){var e=this.options,t=tt(e.oldAngle,e.newAngle,t);this.element.transform(P.geometry.transform().rotate(t,e.center))},su);function su(t,e){ru.call(this,t,e);e=this.options;e.duration=Math.max(Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,1)}kt(at,{easing:"linear",duration:150}),P.drawing.AnimationFactory.current.register("radialPointer",at);var au,hu=at,pu=P.drawing.Circle,lu=P.drawing.Group,cu=P.drawing.Path,_e=((au=Xe)&&(uu.__proto__=au),((uu.prototype=Object.create(au&&au.prototype)).constructor=uu).prototype.setAngle=function(t){this.elements.transform(P.geometry.transform().rotate(t,this.center))},uu.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new hu(this.elements,z(e.animation,{oldAngle:o,newAngle:t})).play()},uu.prototype.render=function(){var t=this.scale,e=this.options,o=new lu;return!1!==e.animation&&z(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(sc),o},uu.prototype.reflow=function(t){var e=this.center=t.center,o=mt(this.options.length||1,.1,1.5),o=this.radius=t.getRadiusX()*o,o=this.capSize=Math.round(o*this.options.cap.size);this.bbox=P.geometry.Rect.fromPoints(new P.geometry.Point(e.x-o,e.y-o),new P.geometry.Point(e.x+o,e.y+o))},uu.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,o=new cu({fill:{color:o},stroke:{color:o,width:.5}});return o.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),o},uu.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,t=new P.geometry.Circle(this.center,this.capSize);return new pu(t,{fill:{color:e},stroke:{color:e}})},uu);function uu(){au.apply(this,arguments)}kt(_e,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var du,fu=_e,gu=P.drawing.Group,ae=((du=mc)&&(yu.__proto__=du),((yu.prototype=Object.create(du&&du.prototype)).constructor=yu).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var o=0;o<e.length;o++)e[o].reflow(this.scale.arc),this._initialPlotArea=P.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},yu.prototype._buildVisual=function(t,e,o){var i=this._visuals=new gu;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},yu.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),this._visuals.append(o.elements),o.value(o.options.value)}},yu.prototype.fitScale=function(t){for(var e,o,i,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),h=bt(a,3),p=bt(-a,3),l=0,c=0;!(!(c++<100)||5<(l=n===i?l+1:0)||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||p!==r&&0<=(i=this.getPlotBox(p,t,s))&&i<=2||(r=0<e&&0<i?2*h:e<0&&i<0?2*p:bt((h+p)/2||1,3),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,0<o?(p=r,i=o):(h=r,e=o)},yu.prototype.getPlotBox=function(t,e,o){var i=this.scale,r=this.pointers,n=o.getRadiusX(),s=o.clone();s.setRadiusX(n+t).setRadiusY(n+t),i.arc=s,i.reflow(e),this.plotBbox=i.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=P.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},yu.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},yu.prototype.alignScale=function(t){var e=this.plotBbox.center(),o=t.center(),i=e.x-o.x,o=e.y-o.y,r=this.scale,n=this.pointers;r.arc.center.x-=i,r.arc.center.y-=o,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=P.geometry.Rect.union(r.bbox,n[s].bbox)},yu.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new nu(t.scale,this.contextService);this.pointers=[];for(var i=x(e)?e:[e],r=0;r<i.length;r++){var n=new fu(o,z({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},yu);function yu(){du.apply(this,arguments)}kt(ae,{transitions:!0,gaugeArea:{background:""}});var vu,mu=ae,Me=((vu=nu)&&(xu.__proto__=vu),((xu.prototype=Object.create(vu&&vu.prototype)).constructor=xu).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},xu.prototype.hasRanges=function(){return!0},xu.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},xu.prototype.addRange=function(t,e,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),e=this.slotAngle(i?t:e),o=this.createRange(r,e,this.getRangeRadius(),o);return this.ranges.append(o),o},xu);function xu(){vu.apply(this,arguments)}kt(Me,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var _u,bu=Me,Vt=((_u=P.drawing.Animation)&&(wu.__proto__=_u),((wu.prototype=Object.create(_u&&_u.prototype)).constructor=wu).prototype.step=function(t){var e=this.options,o=this.startColor,i=this.color,r=tt(e.oldAngle,e.newAngle,t);this.element.angle(r),i&&(e=bt(tt(o.r,i.r,t)),r=bt(tt(o.g,i.g,t)),t=bt(tt(o.b,i.b,t)),this.element.stroke(new P.Color(e,r,t).toHex()))},wu);function wu(t,e){_u.call(this,t,e);var o=this.options,e=Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3;o.duration=mt(e,150,800);e=t.elements.options.get("stroke.color"),t=t.currentColor();e!==t&&(this.startColor=new P.Color(e),this.color=new P.Color(t))}kt(Vt,{easing:"linear",duration:150}),P.drawing.AnimationFactory.current.register("radialRangePointer",Vt);var Cu,Su=Vt,ge=((Cu=Xe)&&(ku.__proto__=Cu),((ku.prototype=Object.create(Cu&&Cu.prototype)).constructor=ku).prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(t),this.stroke(this.currentColor())):(this.animation=new Su(this,z(e.animation,{oldAngle:o,newAngle:t})),this.animation.play())},ku.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},ku.prototype.stroke=function(t){this.elements.stroke(t)},ku.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&z(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap}))},ku.prototype.currentColor=function(){var t=this.scale.options,e=t.min,o=t.max,i=this.options,r=i.colors,t=i.color,i=i.value,n=O(i)?i:e;if(r)for(var s=0;s<r.length;s++){var a=r[s],h=a.color,p=a.from;void 0===p&&(p=e);a=a.to;if(void 0===a&&(a=o),p<=n&&n<=a)return h}return t},ku.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},ku);function ku(){Cu.apply(this,arguments)}kt(ge,{animation:{type:"radialRangePointer",duration:150}});var Au,Pu,Tu,Mu=ge,Ou=((Tu=mu)&&(Lu.__proto__=Tu),((Lu.prototype=Object.create(Tu&&Tu.prototype)).constructor=Lu).prototype._initTheme=function(t){Tu.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},Lu.prototype._createModel=function(){var t=this.options,e=this.scale=new bu(t.scale,this.contextService),t=new Mu(e,z({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[t]},Lu.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},Lu.prototype._setValueOptions=function(t){this.options.value=t},Lu.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},Lu.prototype.centerLabelPosition=function(t,e){var o,i=this.getSize(),r=this.scale.arc.center,n=r.x-t/2,r=r.y-e/2;return t<i.width&&(o=n+t,n=Math.max(n,0),o>i.width&&(n-=o-i.width)),e<i.height&&(i=(o=this.scale.bbox).bottomRight().y,e=r+e,r=Math.max(r,o.origin.y),i<e&&(r-=e-i)),{left:n,top:r}},Lu),Bu=((Pu=Ou)&&(Eu.__proto__=Pu),((Eu.prototype=Object.create(Pu&&Pu.prototype)).constructor=Eu).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,Pu.prototype._createModel.call(this)},Eu),eo=((Au=P.Class)&&(Ru.__proto__=Au),((Ru.prototype=Object.create(Au&&Au.prototype)).constructor=Ru).prototype.initProperties=function(){},Ru.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},Ru.prototype.encode=function(t,e,o){t=lt(t)?String(t):t;return this.initValue(t,e,o),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},Ru.prototype.initValue=function(){},Ru.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},Ru.prototype.addData=function(){},Ru.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},Ru);function Ru(t){Au.call(this),this.setOptions(t),this.initProperties()}function Eu(){Pu.apply(this,arguments)}function Lu(){Tu.apply(this,arguments)}kt(eo,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Iu,zu=Object.assign,It=((Iu=eo)&&(Vu.__proto__=Iu),((Vu.prototype=Object.create(Iu&&Iu.prototype)).constructor=Vu).prototype.initProperties=function(){Iu.prototype.initProperties.call(this),zu(this,{name:"Code 11",characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221"})},Vu.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},Vu.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},Vu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Vu.prototype.addCheckSum=function(){var t=this.value,e=t.length,o=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(o),this.addPattern(this.characterMap[o]),++e>=this.kCheckSumMinLength&&(e=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=e,this.addPattern(this.characterMap[e]))},Vu.prototype.getWeightedSum=function(t,e,o){for(var i=0,r=0;r<t.length;r++)i+=this.weightedValue(this.getValue(t.charAt(r)),e,r,o);return i},Vu.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},Vu.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},Vu.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},Vu.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e),this.totalUnits+=e},Vu);function Vu(){Iu.apply(this,arguments)}kt(It,{addCheckSum:!0});var ju,Du,Hu=Object.assign,Se=((Du=eo)&&(Fu.__proto__=Du),((Fu.prototype=Object.create(Du&&Du.prototype)).constructor=Fu).prototype.initProperties=function(){Du.prototype.initProperties.call(this),Hu(this,{minBaseUnitLength:.7})},Fu.prototype.addData=function(){var t=this.value;this.addStart();for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.pushCheckSum(),this.addStop(),this.prepareValues()},Fu.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Fu.prototype.addBase=function(){},Fu),Ve=((ju=Se)&&(Uu.__proto__=ju),((Uu.prototype=Object.create(ju&&ju.prototype)).constructor=Uu).prototype.initProperties=function(){ju.prototype.initProperties.call(this),Hu(this,{name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}}})},Uu.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Uu.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,o=this.minRatio,i=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<i)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+i+"px.");for(t=this.getBaseUnit(r);t<e&&o<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e){i=Math.ceil(this.getBaseWidth(o)*e);throw new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+i+"px.")}this.ratio=r,this.baseUnit=t,this.patternString=this.patternString.substring(0,this.patternString.length-1),this.pattern=this.pattern.concat(this.patternString.replace(/ratio/g,r).split(this.splitCharacter))},Uu.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Uu.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Uu.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Uu.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Uu.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Uu.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Uu.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},Uu);function Uu(){ju.apply(this,arguments)}function Fu(){Du.apply(this,arguments)}kt(Ve,{addCheckSum:!1});var Nu,Gu,Wu,Xu,qu,Yu,Zu,Qu,Ku,$u,Ju,td={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):127<t.charCodeAt(0)?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,o=0;o<this.extendedMappings.length;o++)if(e=this.extendedMappings[o].call(this,t)){for(var i=0;i<e.length;i++){var r=e[i];this.addBase(r)}return void(this.dataLength+=e.length-1)}},extendedMappings:[function(t){if(97<=t&&t<=122)return[this.characterMap[this.shiftCharacters[0]],this.characterMap[String.fromCharCode(t-32)]]},function(t){if(33<=t&&t<=58)return[this.characterMap[this.shiftCharacters[1]],this.characterMap[String.fromCharCode(t+32)]]},function(t){if(1<=t&&t<=26)return[this.characterMap[this.shiftCharacters[2]],this.characterMap[String.fromCharCode(t+64)]]},function(t){var e;if(this.specialAsciiCodes[t])for(var o=[],i=0;i<this.specialAsciiCodes[t].length;i++)o.push(this.characterMap[this.shiftCharacters[3]]),o.push(this.characterMap[this.specialAsciiCodes[t][i]]);else e=6*Math.floor(t/32)+(t-27)%32+64,o=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return o}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},ro=((Yu=Ve)&&(dd.__proto__=Yu),((dd.prototype=Object.create(Yu&&Yu.prototype)).constructor=dd).prototype.initProperties=function(){Yu.prototype.initProperties.call(this),z(this,td,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})},dd),ed=Object.assign,Ke=((qu=Se)&&(ud.__proto__=qu),((ud.prototype=Object.create(qu&&qu.prototype)).constructor=ud).prototype.initProperties=function(){qu.prototype.initProperties.call(this),ed(this,{name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}})},ud.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},ud.prototype.prepareValues=function(){var t=Math.ceil(Math.max(.15*this.width,24));if(this.height<t)throw new Error("Insufficient height for Code93 encoding: the current height is "+this.height+"px, the minimum required height is "+t+"px.");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength){t=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit));throw new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+t+"px.")}},ud.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},ud.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},ud.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},ud.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},ud.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)t=this.characterMap[this._findCharacterByValue(e[o])],this.addPattern(t.pattern)},ud.prototype._getCheckValues=function(){for(var t,e=this.values,o=e.length,i=0,r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r,this.cCheckSumTotal);for(t=i%this.checkSumMod,i=this.weightedValue(t,1,this.kCheckSumTotal),r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r+1,this.kCheckSumTotal);return[t,i%this.checkSumMod]},ud.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},ud.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},ud.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},ud),uo=((Xu=Ke)&&(cd.__proto__=Xu),((cd.prototype=Object.create(Xu&&Xu.prototype)).constructor=cd).prototype.initProperties=function(){Xu.prototype.initProperties.call(this),z(this,td,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,o=0;o<t.length;o++)e=t[o],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},cd),od=/^\d+$/,id=Object.assign,Fe=((Wu=eo)&&(ld.__proto__=Wu),((ld.prototype=Object.create(Wu&&Wu.prototype)).constructor=ld).prototype.initProperties=function(){Wu.prototype.initProperties.call(this),id(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},ld.prototype.initValue=function(t,e,o){this.height=o,this.width=e,this.baseHeight=o/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},ld.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.START),this.pattern.pop()},ld.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},ld.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},ld.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},ld.prototype.validate=function(t){if(od.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!J(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},ld.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=this.height-this.baseHeight*t.charAt(o),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},ld),rd=/^\d+$/,nd=/^[a-z0-9]+$/i,sd=Object.assign,ee=((Gu=P.Class)&&(pd.__proto__=Gu),((pd.prototype=Object.create(Gu&&Gu.prototype)).constructor=pd).prototype.initProperties=function(){},pd.prototype.addStart=function(){},pd.prototype.is=function(){},pd.prototype.isCode=function(){return!1},pd.prototype.move=function(){},pd.prototype.pushState=function(){},pd),ce=((Nu=ee)&&(hd.__proto__=Nu),((hd.prototype=Object.create(Nu&&Nu.prototype)).constructor=hd).prototype.initProperties=function(){Nu.prototype.initProperties.call(this),z(this,{FNC4:"FNC4",SHIFT:98})},hd.prototype.addStart=function(){this.encoding.addPattern(this.START)},hd.prototype.is=function(t,e){e=t.charCodeAt(e);return this.isCode(e)},hd.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},hd.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;for(!J("C",o)||(o=i.substr(t.index).match(/\d{4,}/g))&&(r=i.indexOf(o[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},hd.prototype._initMoves=function(t){this._moves=[],J(this.FNC4,t)&&this._moves.push(this._moveFNC),J(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},hd.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},hd.prototype._shiftState=function(t){if(t.previousState===this.shiftKey&&(t.index+1>=t.value.length||this.encoding[this.shiftKey].is(t.value,t.index+1)))return this.encoding.addPattern(this.SHIFT),t.shifted=!0},hd.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},hd),ad={};function hd(t,e){Nu.call(this,t),this.states=e,this._initMoves(e)}function pd(t){Gu.call(this),this.encoding=t,this.initProperties()}function ld(){Wu.apply(this,arguments)}function cd(){Xu.apply(this,arguments)}function ud(){qu.apply(this,arguments)}function dd(){Yu.apply(this,arguments)}function fd(t,e){Zu.call(this,t),this.states=e}function gd(t,e){Qu.call(this,t),this._initSubStates(e)}function yd(){Ku.apply(this,arguments)}function vd(){$u.apply(this,arguments)}function md(){Ju.apply(this,arguments)}ad.A=((Ju=ce)&&(md.__proto__=Ju),((md.prototype=Object.create(Ju&&Ju.prototype)).constructor=md).prototype.initProperties=function(){Ju.prototype.initProperties.call(this),sd(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},md.prototype.isCode=function(t){return 0<=t&&t<96},md.prototype.getValue=function(t){return t<32?t+64:t-32},md),ad.B=(($u=ce)&&(vd.__proto__=$u),((vd.prototype=Object.create($u&&$u.prototype)).constructor=vd).prototype.initProperties=function(){$u.prototype.initProperties.call(this),sd(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},vd.prototype.isCode=function(t){return 32<=t&&t<128},vd.prototype.getValue=function(t){return t-32},vd),ad.C=((Ku=ee)&&(yd.__proto__=Ku),((yd.prototype=Object.create(Ku&&Ku.prototype)).constructor=yd).prototype.initProperties=function(){Ku.prototype.initProperties.call(this),sd(this,{key:"C",MOVE:99,START:105})},yd.prototype.addStart=function(){this.encoding.addPattern(this.START)},yd.prototype.is=function(t,e){var o=Bd(t,e,4);return(e+4<=t.length||2===t.length)&&rd.test(o)},yd.prototype.move=function(){this.encoding.addPattern(this.MOVE)},yd.prototype.pushState=function(t){for(var e;(e=Bd(t.value,t.index,2))&&rd.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},yd.prototype.getValue=function(t){return t},yd),ad.FNC4=((Qu=ee)&&(gd.__proto__=Qu),((gd.prototype=Object.create(Qu&&Qu.prototype)).constructor=gd).prototype.initProperties=function(){Qu.prototype.initProperties.call(this),sd(this,{key:"FNC4",dependentStates:["A","B"]})},gd.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},gd.prototype.is=function(t,e){e=t.charCodeAt(e);return this.isCode(e)},gd.prototype.isCode=function(t){return 128<=t&&t<256},gd.prototype.pushState=function(t){var e,o=this._initSubState(t),i=this.encoding,r=o.value.length;if(t.index+=r,r<3)for(;o.index<r;o.index++)e=o.value.charCodeAt(o.index),o.state=this._getSubState(e),o.previousState!==o.state&&(o.previousState=o.state,i[o.state].move(o)),i.addPattern(i[o.state].MOVE),i.addPattern(i[o.state].getValue(e));else o.state!==o.previousState&&i[o.state].move(o),this._pushStart(o),i.pushData(o,this.subStates),t.index<t.value.length&&this._pushStart(o);t.fnc=!0,t.state=o.state},gd.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},gd.prototype._initSubState=function(t){var e={value:this._getAll(t.value,t.index),index:0};return e.state=this._getSubState(e.value.charCodeAt(0)),e.previousState=t.previousState===this.key?e.state:t.previousState,e},gd.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)J(t[e],this.dependentStates)&&this.subStates.push(t[e])},gd.prototype._getSubState=function(t){for(var e=0;e<this.subStates.length;e++)if(this.encoding[this.subStates[e]].isCode(t))return this.subStates[e]},gd.prototype._getAll=function(t,e){for(var o,i="",r=e;(o=t.charCodeAt(r++))&&this.isCode(o);)i+=String.fromCharCode(o-128);return i},gd),ad.FNC1=((Zu=ee)&&(fd.__proto__=Zu),((fd.prototype=Object.create(Zu&&Zu.prototype)).constructor=fd).prototype.initProperties=function(){Zu.prototype.initProperties.call(this),sd(this,{key:"FNC1",startState:"C",startAI:"(",endAI:")",dependentStates:["C","B"],applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102})},fd.prototype.addStart=function(){this.encoding[this.startState].addStart()},fd.prototype.is=function(){return J(this.key,this.states)},fd.prototype.pushState=function(t){var e,o,i,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,h={state:this.startState};for(r.addPattern(this.START);;){if((e=(h.index=0)<(i=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)o=a+i+e.id.length+e.ai.length;else if((o=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+i<n.length)throw new Error("Separators are required after variable length identifiers");o=n.length}if(h.value=n.substring(a,o).replace(s,""),this.validate(e,h.value),r.pushData(h,this.dependentStates),o>=n.length)break;a=o,h.state!==this.startState&&(r[this.startState].move(h),h.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},fd.prototype.validate=function(t,e){var o=e.substr(t.id.length),e=t.ai;if(!e.type&&!rd.test(o))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===e.type&&!nd.test(o))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(e.length&&e.length!==o.length)throw new Error("Application identifier "+t.id+" must be "+e.length+" characters long.");if(e.min&&e.min>o.length)throw new Error("Application identifier "+t.id+" must be at least "+e.min+" characters long.");if(e.max&&e.max<o.length)throw new Error("Application identifier "+t.id+" must be at most "+e.max+" characters long.")},fd.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=Bd(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},fd.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},fd.prototype.getBySeparator=function(t,e){var o=t.indexOf(this.startAI,e),e=t.indexOf(this.endAI,o),o=t.substring(o+1,e),e=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substr(o.length-1));return e||this.unsupportedAIError(o),{ai:e,id:o}},fd.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,o=e.multiKey;if(e[t])return e[t];for(var i=0;i<o.length;i++){if(o[i].ids&&J(t,o[i].ids))return o[i].type;if(o[i].ranges)for(var r=o[i].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return o[i].type}},fd);var xd,_d,bd,wd,Cd,Sd,at=((Sd=eo)&&(Od.__proto__=Sd),((Od.prototype=Object.create(Sd&&Sd.prototype)).constructor=Od).prototype.initProperties=function(){Sd.prototype.initProperties.call(this),sd(this,{characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106})},Od.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new ad[this.states[t]](this,this.states)},Od.prototype.initValue=function(t,e,o){this.pattern=[],this.value=t,this.width=e,this.height=o,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},Od.prototype.addData=function(){var t={value:this.value,index:0,state:""};0!==this.value.length&&(t.state=t.previousState=this.getNextState(t,this.states),this.addStart(t),this.pushData(t,this.states),this.addCheckSum(),this.addStop(),this.setBaseUnit())},Od.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var o;t.shifted?(o=t.state,t.state=t.previousState,t.previousState=o,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},Od.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},Od.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},Od.prototype.addStop=function(){this.addPattern(this.STOP)},Od.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Od.prototype.addPattern=function(t){for(var e,o=this.characterMap[t].toString(),i=0;i<o.length;i++)e=parseInt(o.charAt(i),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},Od.prototype.getNextState=function(t,e){for(var o=0;o<e.length;o++)if(this[e[o]].is(t.value,t.index))return e[o];this.invalidCharacterError(t.value.charAt(t.index))},Od),_e=((Cd=at)&&(Md.__proto__=Cd),((Md.prototype=Object.create(Cd&&Cd.prototype)).constructor=Md).prototype.initProperties=function(){Cd.prototype.initProperties.call(this),sd(this,{name:"Code 128 A",states:["A"]})},Md),ae=((wd=at)&&(Td.__proto__=wd),((Td.prototype=Object.create(wd&&wd.prototype)).constructor=Td).prototype.initProperties=function(){wd.prototype.initProperties.call(this),sd(this,{name:"Code 128 B",states:["B"]})},Td),Me=((bd=at)&&(Pd.__proto__=bd),((Pd.prototype=Object.create(bd&&bd.prototype)).constructor=Pd).prototype.initProperties=function(){bd.prototype.initProperties.call(this),sd(this,{name:"Code 128 C",states:["C"]})},Pd),Vt=((_d=at)&&(Ad.__proto__=_d),((Ad.prototype=Object.create(_d&&_d.prototype)).constructor=Ad).prototype.initProperties=function(){_d.prototype.initProperties.call(this),sd(this,{name:"Code 128",states:["C","B","A","FNC4"]})},Ad),Xe=((xd=at)&&(kd.__proto__=xd),((kd.prototype=Object.create(xd&&xd.prototype)).constructor=kd).prototype.initProperties=function(){xd.prototype.initProperties.call(this),sd(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},kd);function kd(){xd.apply(this,arguments)}function Ad(){_d.apply(this,arguments)}function Pd(){bd.apply(this,arguments)}function Td(){wd.apply(this,arguments)}function Md(){Cd.apply(this,arguments)}function Od(t){Sd.call(this,t),this._initStates()}function Bd(t,e,o){return t.substring(e,e+o)}var Rd,Ed,Ld,Id,zd,Vd,jd,Dd=Object.assign,ge=((jd=eo)&&(Qd.__proto__=jd),((Qd.prototype=Object.create(jd&&jd.prototype)).constructor=Qd).prototype.initProperties=function(){jd.prototype.initProperties.call(this),Dd(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Hd})},Qd.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Qd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Qd.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},Qd.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Qd.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Qd.prototype.addCheckSum=function(){var t=this.checkSums[this.checkSumType].call(this.checkSums,this.value);this.checksum=t.join("");for(var e=0;e<t.length;e++)this.checkSumLength++,this.addPattern(this.characterMap[t[e]])},Qd),Se=((Vd=ge)&&(Zd.__proto__=Vd),((Zd.prototype=Object.create(Vd&&Vd.prototype)).constructor=Zd).prototype.initProperties=function(){Vd.prototype.initProperties.call(this),Dd(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Zd),ce=((zd=ge)&&(Yd.__proto__=zd),((Yd.prototype=Object.create(zd&&zd.prototype)).constructor=Yd).prototype.initProperties=function(){zd.prototype.initProperties.call(this),Dd(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Yd),ee=((Id=ge)&&(qd.__proto__=Id),((qd.prototype=Object.create(Id&&Id.prototype)).constructor=qd).prototype.initProperties=function(){Id.prototype.initProperties.call(this),Dd(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},qd),at=((Ld=ge)&&(Xd.__proto__=Ld),((Xd.prototype=Object.create(Ld&&Ld.prototype)).constructor=Xd).prototype.initProperties=function(){Ld.prototype.initProperties.call(this),Dd(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Xd),Hd={Modulo10:function(t){for(var e,o,i=[0,""],r=t.length%2,n=0;n<t.length;n++)i[(n+r)%2]+=parseInt(t.charAt(n),10);for(o=i[0],e=(2*i[1]).toString(),n=0;n<e.length;n++)o+=parseInt(e.charAt(n),10);return[(10-o%10)%10]},Modulo11:function(t){for(var e,o=0,i=t.length,r=0;r<i;r++)o+=(((i-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-o%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e=this.Modulo11(t),t=t+e[0];return e.concat(this.Modulo10(t))},Modulo10Modulo10:function(t){var e=this.Modulo10(t),t=t+e[0];return e.concat(this.Modulo10(t))}},Ud=Object.assign,ge=((Ed=eo)&&(Wd.__proto__=Ed),((Wd.prototype=Object.create(Ed&&Ed.prototype)).constructor=Wd).prototype.initProperties=function(){Ed.prototype.initProperties.call(this),Ud(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},Wd.prototype.initValue=function(t,e,o){t=String(t);if(12!==t.length||/\D/.test(t))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=o,this.baseUnit=e/(95+this.quietZoneLength),this.value=t,this.checksum=this.calculateChecksum(),this.leftKey=t[0],this.leftPart=t.substr(1,6),this.rightPart=t.substr(7)+this.checksum},Wd.prototype.addData=function(){this.addPieces(this.characterMap.start),this.addSide(this.leftPart,this.leftKey),this.addPieces(this.characterMap.middle),this.addSide(this.rightPart),this.addPieces(this.characterMap.start)},Wd.prototype.addSide=function(t,e){for(var o=0;o<t.length;o++)e&&parseInt(this.keyTable[e].charAt(o),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(o)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(o)],!0)},Wd.prototype.addPieces=function(t,e){for(var o=0;o<t.length;o++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[o]}):this.pattern.push(t[o])},Wd.prototype.calculateChecksum=function(){for(var t=0,e=0,o=this.value.split("").reverse().join(""),i=0;i<o.length;i++)i%2?e+=parseInt(o.charAt(i),10):t+=parseInt(o.charAt(i),10);return(10-(3*t+e)%10)%10},Wd),Fd=Object.assign,eo=((Rd=ge)&&(Gd.__proto__=Rd),((Gd.prototype=Object.create(Rd&&Rd.prototype)).constructor=Gd).prototype.initProperties=function(){Rd.prototype.initProperties.call(this),Fd(this,{name:"EAN 8"})},Gd.prototype.initValue=function(t,e,o){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=o,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},Gd),Nd={code11:It,code39:Ve,code39extended:ro,code93:Ke,code93extended:uo,code128:Vt,code128a:_e,code128b:ae,code128c:Me};function Gd(){Rd.apply(this,arguments)}function Wd(){Ed.apply(this,arguments)}function Xd(){Ld.apply(this,arguments)}function qd(){Id.apply(this,arguments)}function Yd(){zd.apply(this,arguments)}function Zd(){Vd.apply(this,arguments)}function Qd(){jd.apply(this,arguments)}Nd["gs1-128"]=Xe,Nd.msimod10=Se,Nd.msimod11=ce,Nd.msimod1010=ee,Nd.msimod1110=at,Nd.postnet=Fe,Nd.ean8=eo,Nd.ean13=ge;var Kd,ee=((Kd=P.Class)&&($d.__proto__=Kd),(($d.prototype=Object.create(Kd&&Kd.prototype)).constructor=$d).prototype.destroy=function(){this._destroySurface()},$d.prototype._initElement=function(){_(this.element,"k-barcode")},$d.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},$d.prototype._createSurface=function(){return P.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},$d.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},$d.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},$d.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},$d.prototype.setOptions=function(t){this._setOptions(t),this.redraw()},$d.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},$d.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},$d.prototype._resize=function(){this.redraw()},$d.prototype.createVisual=function(){this.visual=this._render()},$d.prototype._render=function(){var t,e=this.options,o=e.value,i=e.text,r=U(i.margin),n=this._getSize(),s=e.border||{},a=this.encoding,h=new qt(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),p=h.height(),s=new P.drawing.Group;this.contentBox=h,s.append(this._getBackground(n)),i.visible&&(p-=P.drawing.util.measureText(o,{font:i.font}).height+r.top+r.bottom);try{t=a.encode(o,h.width(),p)}catch(t){return this.onError(t),s}return i.visible&&(o=o,e.checksum&<(a.checksum)&&(o+=" "+a.checksum),s.append(this._getText(o))),this.barHeight=p,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),s.append(this._bandsGroup),s},$d.prototype.exportVisual=function(){return this._render()},$d.prototype._getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,t=new P.geometry.Size(300,100);return 0<e&&(t.width=e),o&&(t.height=o),this.options.width&&(t.width=this.options.width),this.options.height&&(t.height=this.options.height),t},$d.prototype.value=function(t){if(!lt(t))return this.options.value;this.options.value=String(t),this.redraw()},$d.prototype._getBands=function(t,e){for(var o=this.contentBox,i=o.x1,r=new P.drawing.Group,n=0;n<t.length;n++){var s,a=(s=V(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=P.geometry.Rect.fromPoints(new P.geometry.Point(i,s.y1+o.y1),new P.geometry.Point(i+a,s.y2+o.y1)),s=P.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),i+=a}return r},$d.prototype._getBackground=function(t){var e=this.options,o=e.border||{},t=new qt(0,0,t.width,t.height).unpad(o.width/2);return P.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},$d.prototype._getText=function(t){var e=this.options.text,e=this._textbox=new ze(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return e.reflow(this.contentBox),e.renderVisual(),e.visual},$d.prototype._setOptions=function(t){if(this.type=(t.type||this.options.type).toLowerCase(),"upca"===this.type&&(this.type="ean13",t.value="0"+t.value),"upce"===this.type&&(this.type="ean8",t.value="0"+t.value),!Nd[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Nd[this.type],this.options=z({},this.options,t)},$d);function $d(t,e,o){void 0===o&&(o=Dt),Kd.call(this),this.options=z({},this.options,e),this.element=t,this.onError=o,this._initElement(),this._initSurface(),this._setOptions(e),e&<(e.value)&&this.redraw()}kt(ee,{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}});function Jd(t,e){if(void 0===e&&(e=ef),!t)throw new Error("Please specify barcode type to validate.");var o=t.toLowerCase(),i="";if("upca"===o?(o="ean13",i="0"):"upce"===o&&(o="ean8",i="0"),!Nd[o])throw new Error("Encoding '"+t+"' is not supported.");var r,n,s,o=new Nd[o];return r=o,n=e,s=i,function(t){try{r.encode(s+t,n.width,n.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}var tf=ee,ef={width:500,height:100},of=Object.assign;function rf(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function nf(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function sf(t){return parseInt(t,2)}var af,hf,pf,lf,cf,uf,df,ff=((df=P.Class)&&(Sf.__proto__=df),((Sf.prototype=Object.create(df&&df.prototype)).constructor=Sf).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Sf.prototype.getNextCell=function(){for(;void 0!==this.matrix[this.row][this.column];)this.move(),(this.row<0||this.row>=this.matrix.length)&&(this.dir=-this.dir,this.startColumn-=8!==this.startColumn?2:3,this.column=this.startColumn,this.row=this.dir<0?this.matrix.length-1:0);return{row:this.row,column:this.column}},Sf.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}},Sf),gf=((uf=P.Class)&&(Cf.__proto__=uf),(Cf.prototype=Object.create(uf&&uf.prototype)).constructor=Cf),yf=((cf=P.Class)&&(wf.__proto__=cf),((wf.prototype=Object.create(cf&&cf.prototype)).constructor=wf).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],o=0,i=n;for(e.push(eg(i,Gf,Wf,Xf,t)),t=e[0].mode,i=i.substr(e[0].modeString.length);0<i.length;){var r=eg(i,qf,Yf,Zf,t);r.mode!==t?(t=r.mode,e.push(r),o++):e[o].modeString+=r.modeString,i=i.substr(r.modeString.length)}return e}(),t=og(function(t){for(var e=0,o=0;o<t.length;o++)e+=vf[t[o].mode].getStringBitsLength(t[o].modeString.length);return Math.ceil(e/8)}(e),t),e=function(t,e){for(var o="",i=0;i<t.length;i++)o+=vf[t[i].mode].encode(t[i].modeString,e);return o}(e,t);return new gf(e,t)},wf),at=((lf=P.Class)&&(bf.__proto__=lf),((bf.prototype=Object.create(lf&&lf.prototype)).constructor=bf).prototype.initProperties=function(){of(this,{modeIndicator:"",bitsInCharacterCount:[]})},bf.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},bf.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},bf.prototype.getModeCountString=function(t,e){return this.modeIndicator+nf(t,this.getBitsCharacterCount(e))},bf.prototype.encode=function(){},bf.prototype.getStringBitsLength=function(){},bf.prototype.getValue=function(){},bf),Fe=((pf=at)&&(_f.__proto__=pf),((_f.prototype=Object.create(pf&&pf.prototype)).constructor=_f).prototype.initProperties=function(){pf.prototype.initProperties.call(this),of(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},_f.prototype.getValue=function(t){return parseInt(t,10)},_f.prototype.encode=function(t,e){for(var o=rf(t,3),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=nf(o[r],10);return i+nf(o[r],1+3*o[r].length)},_f.prototype.getStringBitsLength=function(t,e){var o=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*o+(0==o?0:1)},_f),eo=((hf=at)&&(xf.__proto__=hf),((xf.prototype=Object.create(hf&&hf.prototype)).constructor=xf).prototype.initProperties=function(){hf.prototype.initProperties.call(this),of(this,{characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010"})},xf.prototype.getValue=function(t){return this.characters[t]},xf.prototype.encode=function(t,e){for(var o=rf(t,2),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=nf(45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)),11);return i+nf(2===o[r].length?45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)):this.getValue(o[r].charAt(0)),1+5*o[r].length)},xf.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},xf),ge=((af=at)&&(mf.__proto__=af),((mf.prototype=Object.create(af&&af.prototype)).constructor=mf).prototype.initProperties=function(){af.prototype.initProperties.call(this),of(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},mf.prototype.getValue=function(t){var e=t.charCodeAt(0);if(e<=127||160<=e&&e<=255)return e;throw new Error('Unsupported character in QR Code: "'+t+'".')},mf.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=nf(this.getValue(t.charAt(i)),8);return o},mf.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},mf),vf={};function mf(){af.apply(this,arguments)}function xf(){hf.apply(this,arguments)}function _f(){pf.apply(this,arguments)}function bf(){lf.call(this),this.initProperties()}function wf(){cf.apply(this,arguments)}function Cf(t,e){uf.call(this),this.dataString=t,this.version=e}function Sf(t){df.call(this),this.matrix=t,this.row=t.length-1,this.column=t.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}vf.numeric=new Fe,vf.alphanumeric=new eo,vf.byte=new ge;var kf,Af=((kf=P.Class)&&(Kf.__proto__=kf),((Kf.prototype=Object.create(kf&&kf.prototype)).constructor=Kf).prototype.initProperties=function(){of(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Kf.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=og(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new gf(t,e)},Kf.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},Kf.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},Kf.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=nf(t,8);else{for(var e=8-e,r=0;r<o;r++)i=nf(t>>6*r&63|128,8)+i;i=(t>>6*o|255>>e<<e).toString(2)+i}return i},Kf.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1},Kf),Pf=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}],Tf="numeric",Mf="alphanumeric",Of="byte",Bf={1:0},Rf={0:1},Ef={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},Lf=[1,0,1,1,1],If=[1,0,1],zf={L:"01",M:"00",Q:"11",H:"10"},Vf=["11101100","00010001"],jf=93,Df=[function(t,e){return(t+e)%2==0},function(t){return t%2==0},function(t){return t%3==0},function(t,e){return(t+e)%3==0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0},function(t,e){return t*e%2+t*e%3==0},function(t,e){return(t*e%2+t*e%3)%2==0},function(t,e){return((t+e)%2+t*e%3)%2==0}],Hf=/^\d+/,Uf=new RegExp("^[A-Z $%*+./:-]+"),Ff=new RegExp("^[A-Z0-9 $%*+./:-]+"),Nf=new RegExp("^[^A-Z0-9 $%*+./:-]+"),Gf=8,Wf=5,Xf=8,qf=17,Yf=9,Zf=16,Qf=[[1,0],[1,25,0]];function Kf(){kf.call(this),this.initProperties(),this.mode=vf[this.encodingMode]}function $f(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function Jf(t,e,o,i){for(var r=0;r<Df.length;r++)t[r][o][i]=Df[r](o,i)?1^e:parseInt(e,10)}function tg(t,e){for(var o,i=Qf[e-1],r=new Array(e).concat(t),n=new Array(r.length-i.length).concat(i),s=t.length,a=[],h=0;h<s;h++)o=function(t,e){for(var o=[],i=t.length-1;o[i]=Rf[(t[i]+e)%255],void 0!==t[--i];);return o}(n,Bf[r[r.length-1]]),n.splice(0,1),r=function(t,e){for(var o=[],i=t.length-2;0<=i;i--)o[i]=t[i]^e[i];return o}(o,r);for(h=r.length-1;0<=h;h--)a[e-1-h]=nf(r[h],8);return a}function eg(t,e,o,i,r){var n,s=Hf.exec(t),a=s?s[0]:"",h=Uf.exec(t),s=h?h[0]:"",h=Ff.exec(t),h=h?h[0]:"",t=a&&(a.length>=e||t.length===a.length||a.length>=o&&!Ff.test(t.charAt(a.length)))?(n=Tf,a):h&&(t.length===h.length||h.length>=i||r===Mf)?(n=Mf,a||s):(n=Of,h?h+Nf.exec(t.substring(h.length))[0]:Nf.exec(t)[0]);return{mode:n,modeString:t}}function og(t,e){for(var o=0,i=Pf.length-1,r=Math.floor(Pf.length/2);t<Pf[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2),1<i-o;);return t<=Pf[o][e].totalDataCodewords?r+1:i+1}function ig(t,e,o){var i=sf(e),r=e.length-1,e=t<<r,o=nf(t,o-r),i=function(t,e){for(var o=e.toString(2).length,i=t.toString(2).length,r=t;o<=(i=(r^=e<<i-o).toString(2).length););return r}(e,i);return o+nf(i,r)}function rg(t,e){return parseInt(t.charAt(e),10)}function ng(t,e){for(var o=t[0],i=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&$f(t,rg(e,r-1-i++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&$f(t,rg(e,r-1-i++),n,s);for(i=0,s=o.length-1,n=8;s>=o.length-8;s--)$f(t,rg(e,r-1-i++),n,s);for($f(t,1,o.length-8,8),n=o.length-7,s=8;n<o.length;n++)$f(t,rg(e,r-1-i++),n,s)}function sg(t,e){for(var o,i,r,n=t[0].length,s=n-11,a=n-11,h=0;h<e.length;h++)o=Math.floor(h/3),i=h%3,$f(t,r=rg(e,e.length-h-1),0+o,s+i),$f(t,r,a+i,0+o)}function ag(t,e,o,i){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var h=a;h<n-a;h++)$f(t,r=e[a],o+h,i+a),$f(t,r,o+a,i+h),$f(t,r,o+s-h,i+s-a),$f(t,r,o+s-a,i+s-h)}function hg(t,e,o,i){for(var r=o,n=i,s=t[0];$f(t,0,r,i),$f(t,0,o,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function pg(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,e[t][i]===jf&&(o[t]+=40)}function lg(t,e,o,i,r,n){o[t][n]===i?r[t][n]++:(o[t][n]=i,5<=r[t][n]&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function cg(t,e,o){var i=(new(o&&0<=o.toLowerCase().indexOf("utf_8")?Af:yf)).getEncodingResult(t,e),r=i.version,n=Pf[r-1][e],s=function(t,e){for(var o,i=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var h=s[a][0],p=0;p<h;p++){for(var l=s[a][1],c=[],u=[],d=1;d<=l;d++)o=t.substring(i,i+8),c.push(o),u[l-d]=sf(o),i+=8;r.push(c),n.push(tg(u,e.errorCodewordsPerBlock))}return[r,n]}(function(t){for(var e=8*n.totalDataCodewords,o=0,i=0,r=t;r.length<e&&o<"0000".length;)r+="0000".charAt(o++);for(r.length%8!=0&&(r+=new Array(9-r.length%8).join("0"));r.length<e;)r+=Vf[i],i^=1;return r}(i.dataString),n),o=function(){for(var t=[],e=17+4*r,o=0;o<Df.length;o++){t[o]=new Array(e);for(var i=0;i<e;i++)t[o][i]=new Array(e)}return t}();i=(t=o)[0].length,ag(t,Lf,0,0),hg(t,[-1,-1],7,7),ag(t,Lf,i-7,0),hg(t,[1,-1],i-8,7),ag(t,Lf,0,i-7),hg(t,[-1,1],7,i-8),function(t,e){if(!(e<2)){var o,i=t[0],r=i.length,n=Math.floor(e/7),s=[6],a=0;for((e=Ef[e])?o=(r-13-e)/n:e=o=(r-13)/(n+1),s.push(s[a++]+e);s[a]+o<r;)s.push(s[a++]+o);for(var h=0;h<s.length;h++)for(var p=0;p<s.length;p++)void 0===i[s[h]][s[p]]&&ag(t,If,s[h]-2,s[p]-2)}}(o,r),function(t){for(var e=1,o=t[0].length,i=8;i<o-8;i++)$f(t,e,6,i),$f(t,e,i,6),e^=1}(o),7<=r&&sg(o,nf(0,18)),ng(o,nf(0,15)),function(t,e){for(var o,i,r,n=new ff(t[0]),s=0;s<e.length;s++)for(o=e[s],i=0;0<o.length;){for(var a=0;a<o.length;a++)for(var h=0;h<8;h++)r=n.getNextCell(),Jf(t,o[a][i].charAt(h),r.row,r.column);for(i++;o[0]&&i===o[0].length;)o.splice(0,1)}for(;r=n.getNextRemainderCell();)Jf(t,0,r.row,r.column)}(o,s);s=function(t){for(var e,o=[],i=[],r=[],n=[],s=[],a=t[0].length,h=0;h<t.length;h++)o[h]=0,r[h]=0,s[h]=[0,0],n[h]=[0,0],i[h]=[];for(var p=0;p<a;p++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[p][l],10),i[c][0]===e[p][l]&&p+1<a&&0<=l-1&&e[p+1][l]===i[c][0]&&e[p+1][l-1]===i[c][0]&&(o[c]+=3),pg(c,n,o,0,e[p][l]),pg(c,n,o,1,e[l][p]),lg(c,o,i,e[p][l],s,0),lg(c,o,i,e[l][p],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(h=0;h<o.length;h++)o[h]+=(d=r[h],f=y,g=void 0,g=Math.floor(d/f*100),d=g%5,f=Math.abs(g-d-50),d=Math.abs(g+5-d-50),10*Math.min(f/5,d/5)),o[h]<v&&(v=o[h],u=h);return u}(o),o=o[s];return 7<=r&&sg([o],ig(r,"1111100100101",18)),ng([o],function(t){var e="";if(0===sf(t))return"101010000010010";for(var o=ig(sf(t),"10100110111",15),i=0;i<o.length;i++)e+=o.charAt(i)^"101010000010010".charAt(i);return e}(zf[e]+nf(s,3))),o}!function(){for(var t,e=1;e<255;e++)255<(t=2*Rf[e-1])&&(t^=285),Rf[e]=t,Bf[t]=e;t=2*Rf[e-1]^285,Rf[e]=t,Rf[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=Qf[t-1];Qf[t]=function(t,e){for(var o=[],i=0;i<t.length;i++)for(var r=0;r<e.length;r++)void 0===o[i+r]?o[i+r]=(t[i]+(0<=e[r]?e[r]:0))%255:o[i+r]=Bf[Rf[o[i+r]]^Rf[(t[i]+e[r])%255]];return o}(e,[t,0])}}();var ug,dg=Math.round,fg=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],gg=[[0,1],[1,1],[1,0]],ee=((ug=P.Class)&&(yg.__proto__=ug),((yg.prototype=Object.create(ug&&ug.prototype)).constructor=yg).prototype.destroy=function(){this._destroySurface()},yg.prototype._initElement=function(){_(this.element,"k-qrcode")},yg.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},yg.prototype._createSurface=function(){return P.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},yg.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},yg.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},yg.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},yg.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},yg.prototype.getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,t={width:0,height:0};return 0<e&&(t.width=e),o&&(t.height=o),t},yg.prototype._resize=function(){this.redraw()},yg.prototype.createVisual=function(){this.visual=this._render()},yg.prototype.exportVisual=function(){return this._render()},yg.prototype._render=function(){var t,e,o,i,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,h=s.width||0;s.width=h;var p=new P.drawing.Group;try{n&&(o=cg(n,this.options.errorCorrection,this.options.encoding),r=(i=this._getSize())-2*(h+a),t=this._calculateBaseUnit(r,o.length),e=h+a+(r-o.length*t)/2,p.append(this._renderBackground(i,s)),p.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?p.append(this._renderLogo(i,t)):this._isSwiss()&&p.append(this._renderSwissCode(i,t)))}catch(t){this.onError(t)}return p},yg.prototype._renderLogo=function(t,e){var o=dg(t/2),t=this._getLogoSize(7*e),e=this.options.overlay.imageUrl,o={x:o-t.width/2,y:o-t.height/2},t=new P.geometry.Rect(new P.geometry.Point(o.x,o.y),new P.geometry.Size(t.width,t.height));return new P.drawing.Image(e,t)},yg.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(7*e),i=(o=Math.max(o.width,o.height))/4,r=i/2,n=t/2,s={},t=new P.drawing.Group;return s.x=s.y=Math.ceil(n-e-o/2),t.append(this._renderShape(s,Math.ceil(o+2*e),gg,"#fff")),s.x=s.y=n-o/2,t.append(this._renderShape(s,o,gg,this.options.color)),s.x=n+r-o/2,s.y=n+r+i-o/2,t.append(this._renderShape(s,i,fg,"#fff")),t},yg.prototype._renderShape=function(t,e,o,i){var r=new P.drawing.MultiPath({fill:{color:i},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<o.length;n++)r.lineTo(t.x+e*o[n][0],t.y+e*o[n][1]);return r.close(),r},yg.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=this.element,0<(t=Math.min(t.clientWidth,t.clientHeight))?t:200)},yg.prototype._calculateBaseUnit=function(t,e){var o,i=Math.floor(t/e);return i<1?(o=Math.ceil(+e),this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+o+"px."))):t<=i*e&&1<=i-1&&i--,i},yg.prototype._renderMatrix=function(t,e,o){for(var i=new P.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=o+r*e,s=0;s<t.length;){for(;0===t[r][s]&&s<t.length;)s++;if(s<t.length){for(var a=s;1===t[r][s];)s++;var h=dg(o+a*e),p=dg(n),l=dg(o+s*e),a=dg(n+e);i.moveTo(h,p).lineTo(h,a).lineTo(l,a).lineTo(l,p).close()}}return i},yg.prototype._renderBackground=function(t,e){t=new qt(0,0,t,t).unpad(e.width/2);return P.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},yg.prototype.setOptions=function(t){this.options=of(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this.redraw()},yg.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},yg.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},yg.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},yg.prototype._getLogoSize=function(t){var e=this.options.overlay.width,o=this.options.overlay.height;return e||o?e&&!o?o=e:!e&&o&&(e=o):e=o=t,{width:e,height:o}},yg);function yg(t,e,o){void 0===o&&(o=Dt),ug.call(this),this.options=z({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=o,this._initElement(),this._initSurface(),this.setOptions(e)}kt(ee,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:"L",background:"#fff",color:"#000",size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});function vg(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{cg(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}var mg=ee,xg={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function _g(t){return t*t}var bg,wg,Cg=Math,Sg=Cg.abs,kg=Cg.atan,Ag=Cg.atan2,Pg=Cg.cos,Tg=Cg.sin,Mg=Cg.tan,Og=((wg=P.Class)&&(Gg.__proto__=wg),((Gg.prototype=Object.create(wg&&wg.prototype)).constructor=Gg).prototype.initProperties=function(){z(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},Gg.prototype.toArray=function(){return[this.lat,this.lng]},Gg.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},Gg.prototype.clone=function(){return new Gg(this.lat,this.lng)},Gg.prototype.round=function(t){return this.lng=bt(this.lng,t),this.lat=bt(this.lat,t),this},Gg.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},Gg.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},Gg.prototype.destination=function(t,e,o){var i=_t(e),r=o||xg.WGS84,e=_t(this.lat),o=_t(this.lng),t=t/r.a,r=Cg.asin(Tg(e)*Pg(t)+Pg(e)*Tg(t)*Pg(i)),e=o+Ag(Tg(i)*Tg(t)*Pg(e),Pg(t)-Tg(e)*Tg(r));return new Gg(ct(r),ct(e))},Gg.prototype.greatCircleTo=function(t,e){var o=Gg.create(void 0),i=e||xg.WGS84;if(!o||this.clone().round(8).equals(o.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var r,n,s=i.a,a=i.b,h=i.f,p=_t(o.lng-this.lng),e=kg((1-h)*Mg(_t(this.lat))),l=Tg(e),c=Pg(e),i=kg((1-h)*Mg(_t(o.lat))),u=Tg(i),d=Pg(i),f=p,g=this.DISTANCE_ITERATIONS,y=!1;!y&&0<g--;){var v=Tg(f),m=Pg(f),x=Cg.sqrt(_g(d*v)+_g(c*u-l*d*m)),_=Ag(x,n=l*u+c*d*m),b=c*d*v/x,w=0;0!=(r=1-_g(b))&&(w=n-2*l*u/r);var C=f,S=h/16*r*(4+h*(4-3*r)),f=p+(1-S)*h*b*(_+S*x*(w+S*n*(2*_g(w)-1))),y=Sg(f-C)<=this.DISTANCE_CONVERGENCE}e=r*(_g(s)-_g(a))/_g(a),o=1+e/16384*(4096+e*(e*(320-175*e)-768)),i=e/1024*(256+e*(e*(74-47*e)-128)),s=i*x*(w+i/4*(n*(2*_g(w)-1)-i/6*w*(4*_g(x)-3)*(4*_g(w)-3))),e=Ag(d*v,c*u-l*d*m),i=Ag(c*v,-l*d+c*u*m);return{distance:bt(a*o*(_-s),this.DISTANCE_PRECISION),azimuthFrom:ct(e),azimuthTo:ct(i)}},Gg.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},Gg.fromLngLat=function(t){return new Gg(t[1],t[0])},Gg.fromLatLng=function(t){return new Gg(t[0],t[1])},Gg.create=function(t,e){if(lt(t))return t instanceof Gg?t.clone():1===arguments.length&&2===t.length?Gg.fromLatLng(t):new Gg(t,e)},Gg),Bg=Math,Rg=Bg.atan,Eg=Bg.exp,Lg=Bg.pow,Ig=Bg.sin,zg=Bg.log,Vg=Bg.tan,jg=P.geometry.Point,Dg=Bg.PI,Hg=Dg/2,Ug=Dg/4,Fg=Dg/180,at=xg.WGS84,Fe=((bg=P.Class)&&(Ng.__proto__=bg),((Ng.prototype=Object.create(bg&&bg.prototype)).constructor=Ng).prototype._initOptions=function(t){this.options=z({},this.options,t)},Ng.prototype.initProperties=function(){z(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},Ng.prototype.forward=function(t,e){var o=this.options,i=o.datum.a,r=o.centralMeridian,o=mt(t.lat,-this.MAX_LAT,this.MAX_LAT),t=e?mt(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,i=_t(t-r)*i,o=this._projectLat(o);return new jg(i,o)},Ng.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,i=e.a,e=_t(t),t=Vg(Ug+e/2),e=o*Ig(e),o=Lg((1-e)/(1+e),o/2);return i*zg(t*o)},Ng.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,o=t.x/(Fg*i)+o,t=mt(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(o=mt(o,-this.MAX_LNG,this.MAX_LNG)),new Og(t,o)},Ng.prototype._inverseY=function(t){for(var e=this.options.datum,o=e.a,i=e.e,r=i/2,n=Eg(-t/o),s=Hg-2*Rg(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var h=i*Ig(s),h=Lg((1-h)/(1+h),r),h=Hg-2*Rg(n*h)-s;if(s+=h,Bg.abs(h)<=this.INVERSE_CONVERGENCE)break}return ct(s)},Ng);function Ng(t){bg.call(this),this.initProperties(),this._initOptions(t)}function Gg(t,e){wg.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}kt(Fe,{centralMeridian:0,datum:at});function Wg(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Xg(t,e){e.insertBefore(t,e.firstChild)}function qg(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function Yg(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}var Zg,Qg,Kg,$g=((Kg=Fe)&&(ny.__proto__=Kg),((ny.prototype=Object.create(Kg&&Kg.prototype)).constructor=ny).prototype.initProperties=function(){Kg.prototype.initProperties.call(this),z(this,{MAX_LAT:85.0511287798})},ny.prototype._projectLat=function(t){var e=this.options.datum.a,t=_t(t),t=Vg(Ug+t/2);return e*zg(t)},ny.prototype._inverseY=function(t){var e=this.options.datum.a,e=Eg(-t/e);return ct(Hg-2*Rg(e))},ny),Jg=((Qg=P.Class)&&(ry.__proto__=Qg),((ry.prototype=Object.create(Qg&&Qg.prototype)).constructor=ry).prototype.forward=function(t){return new jg(t.lng,t.lat)},ry.prototype.inverse=function(t){return new Og(t.y,t.x)},(Zg=P.Class)&&(iy.__proto__=Zg),((iy.prototype=Object.create(Zg&&Zg.prototype)).constructor=iy).prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},iy.prototype.toLocation=function(t,e,o){e=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(e,o)},iy),ty=(P.Class,P.Class,Object.defineProperty),ey=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),oy=function(t){var e,o,i=!1,r=[],n={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},s={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},a={tablet:/playbook|ipad|fire/i},h={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(o in n)if(n.hasOwnProperty(o)&&(r=t.match(n[o]))){if("windows"===o&&"plugins"in navigator)return!1;(i={}).device=o,i.tablet=sy(o,a,!1),i.browser=sy(t,h,"default"),i.name=sy(o,s),i[i.name]=!0,i.majorVersion=r[2],i.minorVersion=(r[3]||"0").replace("_","."),e=i.minorVersion.replace(".","").substr(0,2),i.flatVersion=i.majorVersion+e+new Array(3-(e.length<3?e.length:2)).join("0");break}return i};function iy(){Zg.call(this);var t=this._proj=new $g,t=this.c=2*Dg*t.options.datum.a;this._tm=P.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=P.geometry.transform().scale(t,-t).translate(-.5,-.5)}function ry(){Qg.apply(this,arguments)}function ny(){Kg.apply(this,arguments)}function sy(t,e,o){for(var i in e)if(e.hasOwnProperty(i)&&e[i].test(t))return i;return void 0!==o?o:t}function ay(){var t=oy(navigator.userAgent),e=(r=function(t){var e,o=!1,i=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(e in r)if(r.hasOwnProperty(e)&&(i=t.match(r[e]))){(o={})[e]=!0,o[i[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,o.version=parseInt(document.documentMode||i[2],10);break}return o}(navigator.userAgent)).chrome,o=r.crios,i=r.mozilla,r=r.safari,n={};n.mobileOS=t,n.touch="ontouchstart"in window,n.pointers=!e&&!o&&!i&&!r&&window.PointerEvent,n.msPointers=!e&&window.MSPointerEvent,n.mouseAndTouchPresent=n.touch&&!(n.mobileOS.ios||n.mobileOS.android),n.eventCapture=document.documentElement.addEventListener;var s=document.createElement("table"),a=n.transitions=!1,h=n.transforms=!1;return["Moz","webkit","O","ms"].forEach(function(t){var e="string"==typeof s.style[t+"Transition"];if(e||"string"==typeof s.style[t+"Transform"]){var o=t.toLowerCase();return h={css:"ms"!==o?"-"+o+"-":"",prefix:t,event:"o"===o||"webkit"===o?o:""},e&&((a=h).event=a.event?a.event+"TransitionEnd":"transitionend"),!1}}),s=null,n.transforms=h,n.transitions=a,n.delayedClick=function(){if(n.touch){if(n.mobileOS.ios)return!0;if(n.mobileOS.android){if(!n.browser.chrome)return!0;if(n.browser.version<32)return!1;var t=document.querySelector("meta[name=viewport]");return!(t?t.getAttribute("content"):"").match(/user-scalable=no/i)}}return!1},n}function hy(t,e){return t.bind(e)}function py(t,e,o,i,r){uy(t,e,o,i,r)}function ly(t,e,o,i,r){var n,s,a;n=t,s=o,a=i,(x(e=e)?e:(e||"").split(" ")).forEach(function(t){dy(n,t,s,a)})}var cy=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=ay();return e.touch&&(e.mobileOS.ios||e.mobileOS.android)?t={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:e.pointers?t={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:e.msPointers&&(t={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),t},uy=function(s,t,a,h,p){(x(t)?t:(t||"").split(" ")).forEach(function(t){var o,e,i,r,n;n=i=h,(e=a)&&E(e)&&!i?n=e:e&&"string"==typeof e&&E(n)&&(r=e),(o=s).addEventListener(t,function(t){var e=t.target?t.target.closest(r):null;(!r||t.target&&e)&&(e=r?e:t.currentTarget,ty(t,"currentTarget",{value:e}),ty(t,"delegateTarget",{value:o}),n(t))},Boolean(p))})},dy=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},fy=cy(navigator.userAgent);function gy(t){return fy[t]||t}function yy(t){return t.replace(by,gy)}function vy(t,e){var o=t.prototype;o.events?e.forEach(function(t){o.events.indexOf(t)<0&&o.events.push(t)}):o.events=e}function my(){return Number(new Date)}function xy(){}var _y,by=/([^ ]+)/g,wy=G.compile,Cy=((_y=P.Class)&&(Sy.__proto__=_y),((Sy.prototype=Object.create(_y&&_y.prototype)).constructor=Sy).prototype._initOptions=function(t){this.options=z({},this.options,t)},Sy.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},Sy.prototype.add=function(t){var e=t;lt(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},Sy.prototype.remove=function(t){for(var e=[],o=0;o<this.items.length;o++){var i=this.items[o];i.text!==t&&e.push(i)}this.items=e,this._render()},Sy.prototype.clear=function(){this.items=[],Wg(this.element)},Sy.prototype._render=function(){for(var t=[],e=wy(this.options.itemTemplate),o=0;o<this.items.length;o++){var i=this.items[o],i=this._itemText(i);""!==i&&t.push(e({text:i}))}0<t.length?(Wg(this.element),function(t,e){var o=document.createElement("div");for(o.innerHTML=t;0<o.childNodes.length;)e.appendChild(o.childNodes[0])}(t.join(this.options.separator),this.element),this.showElement()):this.hideElement()},Sy.prototype.hideElement=function(){this.element.style.display="none"},Sy.prototype.showElement=function(){this.element.style.display=""},Sy.prototype._itemText=function(t){var e="",o=this._inZoomLevel(t.minZoom,t.maxZoom),i=this._inArea(t.extent);return o&&i&&(e+=t.text),e},Sy.prototype._inZoomLevel=function(t,e){t=Ct(t,-Number.MAX_VALUE),e=Ct(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},Sy.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},Sy);function Sy(t,e){_y.call(this),this.element=t,this._initOptions(e),this.items=[],_(this.element,"k-widget k-attribution")}kt(Cy,{name:"Attribution",separator:" | ",itemTemplate:"#= text #"});function ky(){this._defaultPrevented=!0}function Ay(){return!0===this._defaultPrevented}var Py,eo=((Py=P.Class)&&(My.__proto__=Py),((My.prototype=Object.create(Py&&Py.prototype)).constructor=My).prototype.bind=function(t,e,o){var i,r,n=this,s="string"==typeof t?[t]:t||[],a="function"==typeof e;if(void 0===e){for(h in t)n.bind(h,t[h]);return n}for(var h=0,p=s.length;h<p;h++)!function(){var t=s[h];(r=a?e:e[t])&&(o&&(i=r,(r=function(){n.unbind(t,r),i.apply(n,arguments)}).original=i),(n._events[t]=n._events[t]||[]).push(r))}();return n},My.prototype.one=function(t,e){return this.bind(t,e,!0)},My.prototype.first=function(t,e){for(var o,i="string"==typeof t?[t]:t,r="function"==typeof e,n=0,s=i.length;n<s;n++){var a=i[n];(o=r?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(o)}return this},My.prototype.trigger=function(t,e){var o,i,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=ky,n.isDefaultPrevented=Ay,o=0,i=(r=r.slice()).length;o<i;o++)r[o].call(this,n);return!0===n._defaultPrevented}return!1},My.prototype.unbind=function(t,e){var o,i=this._events[t];if(void 0===t)this._events={};else if(i)if(e)for(o=i.length-1;0<=o;o--)i[o]!==e&&i[o].original!==e||i.splice(o,1);else this._events[t]=[];return this},My),Ty={up:{className:"k-navigator-n",iconClass:"k-i-arrow-n"},down:{className:"k-navigator-s",iconClass:"k-i-arrow-s"},right:{className:"k-navigator-e",iconClass:"k-i-arrow-e"},left:{className:"k-navigator-w",iconClass:"k-i-arrow-w"}};function My(){Py.call(this),this._events={}}function Oy(t){t='<button class="k-button '+Ty[t].className+'" aria-label="move '+t+'"><span class="k-icon '+Ty[t].iconClass+'" /></button>';return ey(t)}var By,Ry=((By=eo)&&(Ey.__proto__=By),((Ey.prototype=Object.create(By&&By.prototype)).constructor=Ey).prototype.destroy=function(){this.dispose()},Ey.prototype.dispose=function(){ly(this._keyroot,this._keydown)},Ey.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,o=this.element,t=e.getAttribute("tabindex")||o.getAttribute("tabindex");o.removeAttribute("tabindex"),e.setAttribute("tabindex",isNaN(t)?0:t)},Ey.prototype._initOptions=function(t){this.options=z({},this.options,t)},Ey.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},Ey.prototype._click=function(t){var e=0,o=0,i=t.currentTarget;i.matches(".k-navigator-n")?o=1:i.matches(".k-navigator-s")?o=-1:i.matches(".k-navigator-e")?e=1:i.matches(".k-navigator-w")&&(e=-1),this._pan(e,o),t.preventDefault()},Ey.prototype._keydown=function(t){switch(t.which){case Ht.UP:this._pan(0,1),t.preventDefault();break;case Ht.DOWN:this._pan(0,-1),t.preventDefault();break;case Ht.RIGHT:this._pan(1,0),t.preventDefault();break;case Ht.LEFT:this._pan(-1,0),t.preventDefault()}},Ey);function Ey(t,e){By.call(this),this.element=t,this._initOptions(e);var o=Oy("up"),i=Oy("right"),t=Oy("down"),e=Oy("left");this.element.appendChild(o),this.element.appendChild(i),this.element.appendChild(t),this.element.appendChild(e),_(this.element,"k-widget k-navigator"),py(this.element,"click",".k-button",hy(this._click,this));e=this.element.parentNode.closest("[data-role]");this._keyroot=e||this.element,this._tabindex(this._keyroot),py(this._keyroot,"keydown",hy(this._keydown,this))}function Ly(t,e){return ey('<button class="k-button k-button-icon k-zoom-'+t+'" title="zoom-'+t+'" aria-label="zoom-'+t+'"><span class="k-icon '+e+'"></span></button>')}kt(Ry,{name:"Navigator",panStep:1}),vy(Ry,["pan"]);var Iy,zy=((Iy=eo)&&(Vy.__proto__=Iy),((Vy.prototype=Object.create(Iy&&Iy.prototype)).constructor=Vy).prototype.destroy=function(){this.element&&ly(this.element,"click",this._clickHandler),this._keyroot&&ly(this._keyroot,"keydown",this._keydownHandler)},Vy.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,o=this.element,t=e.getAttribute("tabindex")||o.getAttribute("tabindex");o.removeAttribute("tabindex"),e.setAttribute("tabindex",isNaN(t)?0:t)},Vy.prototype._initOptions=function(t){this.options=z({},this.options,t)},Vy.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Vy.prototype._click=function(t){var e=1;Q(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Vy.prototype._keydown=function(t){switch(t.which){case Ht.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case Ht.NUMPAD_MINUS:case 189:case 173:this._change(-1)}},Vy);function Vy(t,e){Iy.call(this),this.element=t,this._initOptions(e);t=Ly("in","k-i-plus"),e=Ly("out","k-i-minus");this.element.appendChild(t),this.element.appendChild(e),_(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),py(this.element,"click",".k-button",this._clickHandler);e=this.element.parentNode.closest("[data-role]");this._keyroot=e||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),py(this._keyroot,"keydown",this._keydownHandler)}kt(zy,{name:"ZoomControl",zoomStep:1}),vy(zy,["change"]);var jy,ge=Math,Dy=ge.max,Hy=ge.min,Uy=function(o){function i(t,e){o.call(this);t=Og.create(t),e=Og.create(e);t.lng+180>e.lng+180&&t.lat+90<e.lat+90?(this.se=t,this.nw=e):(this.se=e,this.nw=t)}o&&(i.__proto__=o);var t={World:{configurable:!0}};return((i.prototype=Object.create(o&&o.prototype)).constructor=i).prototype.contains=function(t){var e=this.nw,o=this.se,i=Ct(t.lng,t[1]),r=Ct(t.lat,t[0]);return t&&i+180>=e.lng+180&&i+180<=o.lng+180&&r+90>=o.lat+90&&r+90<=e.lat+90},i.prototype.center=function(){var t=this.nw,e=this.se,o=t.lng+(e.lng-t.lng)/2,t=t.lat+(e.lat-t.lat)/2;return new Og(t,o)},i.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},i.prototype.include=function(t){var e=this.nw,o=this.se,i=Ct(t.lng,t[1]),t=Ct(t.lat,t[0]);e.lng=Hy(e.lng,i),e.lat=Dy(e.lat,t),o.lng=Dy(o.lng,i),o.lat=Hy(o.lat,t)},i.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},i.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new Og(t.lat,e.lng),se:this.se,sw:new Og(e.lat,t.lng)}},i.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new Og(t.lat,e.lng),e,new Og(e.lat,t.lng)]},i.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},i.create=function(t,e){return t instanceof i?t:t&&e?new i(t,e):t&&4===t.length&&!e?new i([t[0],t[1]],[t[2],t[3]]):void 0},t.World.get=function(){return new i([90,-180],[-90,180])},Object.defineProperties(i,t),i}(P.Class),ee=((jy=P.Class)&&(Wy.__proto__=jy),((Wy.prototype=Object.create(jy&&jy.prototype)).constructor=Wy).prototype.destroy=function(){this._deactivate()},Wy.prototype._initOptions=function(t){this.options=z({},this.options,t)},Wy.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Wy.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Wy.prototype.reset=function(){this._beforeReset(),this._reset()},Wy.prototype._reset=function(){this._applyExtent()},Wy.prototype._beforeReset=function(){},Wy.prototype._resize=function(){},Wy.prototype._panEnd=function(){this._applyExtent()},Wy.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!lt(t.minZoom)||e>=t.minZoom,e=!lt(t.maxZoom)||e<=t.maxZoom,t=Uy.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(o&&e&&t)},Wy.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Wy.prototype._activate=function(){var t=this.map;this._deactivate(),t.bind("beforeReset",this._beforeReset),t.bind("reset",this._reset),t.bind("resize",this._resize),t.bind("panEnd",this._panEnd)},Wy.prototype._deactivate=function(){var t=this.map;t.unbind("beforeReset",this._beforeReset),t.unbind("reset",this._reset),t.unbind("resize",this._resize),t.unbind("panEnd",this._panEnd)},Wy.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Wy.prototype._readData=function(){return this.options.data||[]},Wy.prototype._hasData=function(){return this._data&&0<this._data.length},Wy),Fy=Math,Ny=G.compile,Gy=P.geometry.Point;function Wy(t,e){jy.call(this),this.support=ay(),this._initOptions(e),this.map=t;e=document.createElement("div");_(e,"k-layer"),e.style.zIndex=this.options.zIndex,e.style.opacity=this.options.opacity,this.element=e,t.scrollElement.appendChild(this.element),this._beforeReset=this._beforeReset.bind(this),this._reset=this._reset.bind(this),this._resize=this._resize.bind(this),this._panEnd=this._panEnd.bind(this),this._activate(),this._updateAttribution()}function Xy(t){var e=t;return"string"!=typeof t&&(e+="px"),e}var qy,at=((qy=ee)&&(Yy.__proto__=qy),((Yy.prototype=Object.create(qy&&qy.prototype)).constructor=Yy).prototype.destroy=function(){qy.prototype.destroy.call(this),this._view.destroy(),this._view=null},Yy.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},Yy.prototype._reset=function(){qy.prototype._reset.call(this),this._updateView(),this._view.reset()},Yy.prototype._viewType=function(){return Ky},Yy.prototype._activate=function(){qy.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=Object(P.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},Yy.prototype._deactivate=function(){qy.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},Yy.prototype._updateView=function(){var t=this._view,e=this.map,o=e.extent(),o={nw:e.locationToLayer(o.nw).round(),se:e.locationToLayer(o.se).round()};t.center(e.locationToLayer(e.center())),t.extent(o),t.zoom(e.zoom())},Yy.prototype._resize=function(){this._render()},Yy.prototype._panEnd=function(t){qy.prototype._panEnd.call(this,t),this._render()},Yy.prototype._render=function(){this._updateView(),this._view.render()},Yy);function Yy(t,e){qy.call(this,t,e),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));e=this._viewType();this._view=new e(this.element,this.options)}kt(at,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});var Zy,Qy,Ky=((Qy=P.Class)&&(tv.__proto__=Qy),((tv.prototype=Object.create(Qy&&Qy.prototype)).constructor=tv).prototype._initOptions=function(t){this.options=z({},this.options,t)},tv.prototype.center=function(t){this._center=t},tv.prototype.extent=function(t){this._extent=t},tv.prototype.viewOrigin=function(t){this._viewOrigin=t},tv.prototype.zoom=function(t){this._zoom=t},tv.prototype.pointToTileIndex=function(t){return new Gy(Fy.floor(t.x/this.options.tileSize),Fy.floor(t.y/this.options.tileSize))},tv.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),o=this._extent.nw,o=this.indexToPoint(e).translate(-o.x,-o.y);return{x:Fy.ceil((Fy.abs(o.x)+t.width)/this.options.tileSize),y:Fy.ceil((Fy.abs(o.y)+t.height)/this.options.tileSize)}},tv.prototype.size=function(){var t=this._extent.nw,t=this._extent.se.clone().translate(-t.x,-t.y);return{width:t.x,height:t.y}},tv.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new Gy(e*this.options.tileSize,t*this.options.tileSize)},tv.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},tv.prototype.destroy=function(){this.element.empty(),this.pool.empty()},tv.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},tv.prototype.render=function(){for(var t,e,o=this.tileCount(),i=this.pointToTileIndex(this._extent.nw),r=0;r<o.x;r++)for(e=0;e<o.y;e++)(t=this.createTile({x:i.x+r,y:i.y+e})).visible||t.show()},tv.prototype.createTile=function(t){t=this.tileOptions(t),t=this.pool.get(this._center,t);return t.element.parentNode||this.element.append(t.element),t},tv.prototype.tileOptions=function(t){var e=this.wrapIndex(t),o=this.indexToPoint(t),i=this._viewOrigin;return{index:e,currentIndex:t,point:o,offset:(i=o.clone().translate(-i.x,-i.y),new Gy(bt(i.x),bt(i.y))),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},tv.prototype.wrapIndex=function(t){var e=Fy.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:mt(t.y,0,e-1)}},tv.prototype.wrapValue=function(t,e){var o=Fy.abs(t)%e;return 0<=t?o:e-(0==o?e:o)},tv),$y=((Zy=P.Class)&&(Jy.__proto__=Zy),((Jy.prototype=Object.create(Zy&&Zy.prototype)).constructor=Jy).prototype.destroy=function(){this.element&&(this.element.remove(),this.element=null)},Jy.prototype._initOptions=function(t){this.options=z({},this.options,t)},Jy.prototype.createElement=function(){var t=document.createElement("img");_(t,"k-layer"),t.style.position="absolute",t.style.display="block",t.style.width=this.options.size,t.style.height=this.options.size,this.element=t},Jy.prototype.show=function(){var t=this.element;t.style.top=Xy(this.options.offset.y),t.style.left=Xy(this.options.offset.x);var e=this.url();e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},Jy.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},Jy.prototype.url=function(){return Ny(this.options.urlTemplate)(this.urlOptions())},Jy.prototype.errorUrl=function(){return Ny(this.options.errorUrlTemplate)(this.urlOptions())},Jy.prototype.urlOptions=function(){var t=this.options;return{zoom:t.zoom,subdomain:t.subdomain,z:t.zoom,x:t.index.x,y:t.index.y,s:t.subdomain,quadkey:t.quadkey,q:t.quadkey,culture:t.culture,c:t.culture}},Jy);function Jy(t,e){Zy.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function tv(t,e){Qy.call(this),this.element=t,this._initOptions(e),this.pool=new ov}kt($y,{urlTemplate:"",errorUrlTemplate:""});var ev,ov=((ev=P.Class)&&(iv.__proto__=ev),((iv.prototype=Object.create(ev&&ev.prototype)).constructor=iv).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},iv.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},iv.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},iv.prototype._create=function(t){for(var e,o=this._items,i=yt(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<o.length;r++)if(o[r].id===i){e=o[r];break}return e?e.show():(e=new $y(i,t),this._items.push(e)),e},iv.prototype._remove=function(t){for(var e=this._items,o=-1,i=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);o<n&&!e[r].visible&&(i=r,o=n)}-1!==i&&(e[i].destroy(),e.splice(i,1))},iv);function iv(){ev.call(this),this._items=[]}kt(ov,{maxSize:100});function rv(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"}var nv,sv,av,hv,pv,lv,cv,uv=Object.assign,dv="change",fv=((cv=eo)&&(Pv.__proto__=cv),((Pv.prototype=Object.create(cv&&cv.prototype)).constructor=Pv).prototype.captureNext=function(){this.capture=!0},Pv.prototype.cancelCapture=function(){this.capture=!1},Pv.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},Pv.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},Pv),gv=((lv=eo)&&(Av.__proto__=lv),((Av.prototype=Object.create(lv&&lv.prototype)).constructor=Av).prototype.makeVirtual=function(){uv(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},Av.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},Av.prototype.outOfBounds=function(t){return t>this.max||t<this.min},Av.prototype.forceEnabled=function(){this.forcedEnabled=!0},Av.prototype.getSize=function(){return this.container[this.measure]},Av.prototype.getTotal=function(){return this.element[this.scrollSize]},Av.prototype.rescale=function(t){this.scale=t},Av.prototype.update=function(t){var e=this.virtual?this._virtualMax:this.getTotal(),o=e*this.scale,i=this.getSize();0===e&&!this.forcedEnabled||(this.max=this.virtual?-this._virtualMin:0,this.size=i,this.total=o,this.min=Math.min(this.max,i-o),this.minScale=i/e,this.centerOffset=(o-i)/2,this.enabled=this.forcedEnabled||i<o,t||this.trigger(dv,this))},Av),yv=((pv=eo)&&(kv.__proto__=pv),((kv.prototype=Object.create(pv&&pv.prototype)).constructor=kv).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},kv.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},kv.prototype.refresh=function(){this.x.update(),this.y.update(),this.enabled=this.x.enabled||this.y.enabled,this.minScale=this.forcedMinScale||Math.min(this.x.minScale,this.y.minScale),this.fitScale=Math.max(this.x.minScale,this.y.minScale),this.trigger(dv)},kv),vv=((hv=eo)&&(Sv.__proto__=hv),((Sv.prototype=Object.create(hv&&hv.prototype)).constructor=Sv).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},Sv.prototype.dragMove=function(t){var e,o=this.dimension,i=this.axis,r=this.movable,n=r[i]+t;o.enabled&&(e=t,(n<o.min&&t<0||n>o.max&&0<t)&&(e*=this.resistance),r.translateAxis(i,e),this.trigger(dv,this))},Sv),mv=((av=P.Class)&&(Cv.__proto__=av),(Cv.prototype=Object.create(av&&av.prototype)).constructor=Cv),xv=((sv=eo)&&(wv.__proto__=sv),((wv.prototype=Object.create(sv&&sv.prototype)).constructor=wv).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},wv.prototype.scaleTo=function(t){this.scale=t,this.refresh()},wv.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},wv.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},wv.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},wv.prototype.moveTo=function(t){uv(this,t),this.refresh()},wv.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(e=rv(t,e,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=e,this._saveCoordinates(e),this.trigger(dv))},wv.prototype._saveCoordinates=function(t){this.coordinates=t},wv),_v=P.drawing.Group,Fe=((nv=ee)&&(bv.__proto__=nv),((bv.prototype=Object.create(nv&&nv.prototype)).constructor=bv).prototype.destroy=function(){nv.prototype.destroy.call(this),this.surface.destroy(),this.dataSource.unbind("change",this._dataChange)},bv.prototype._reset=function(){nv.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},bv.prototype._initRoot=function(){this._root=new _v,this.surface.draw(this._root)},bv.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},bv.prototype._resize=function(){this.surface.size(this.map.size())},bv.prototype._readData=function(){var t=nv.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},bv.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new Ov(this.map,this.options.style,this));for(var e=new _v,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},bv.prototype.shapeCreated=function(t){var e=!1;return e=!(e=t instanceof P.drawing.Circle&&this.map.options.renderPointsAsMarkers?lt(this._createMarker(t)):e)?this.map.trigger("shapeCreated",{layer:this,shape:t}):e},bv.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},bv.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},bv.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},bv.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},bv.prototype._panEnd=function(t){nv.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},bv.prototype._translateSurface=function(){var t=this.map,t=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(t),this.movable.moveTo({x:t.x,y:t.y}))},bv.prototype._handler=function(e){var o=this;return function(t){t.element&&(t={layer:o,layerIndex:(o.map.layers||[]).indexOf(o),shape:t.element,shapeIndex:(o._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent},o.map.trigger(e,t))}},bv.prototype._activate=function(){nv.prototype._activate.call(this),this._panHandler=hy(this._pan,this),this.map.bind("pan",this.panHandler)},bv.prototype._deactivate=function(){nv.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},bv);function bv(t,e){nv.call(this,t,e),this._pan=hy(this._pan,this),this.surface=P.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new xv(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseenter=this._handler("shapeMouseEnter"),this.surface.bind("mouseenter",this._mouseenter),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave)}function wv(t){sv.call(this),this.support=ay(),this.transformStyle=this.support.transitions.prefix+"Transform",this.element=t,this.element.style.webkitTransformOrigin="left top",this.x=0,this.y=0,this.scale=1;t=rv(this.x,this.y,this.scale);this.element.style[this.transformStyle]=t,this._saveCoordinates(t)}function Cv(t){av.call(this);var s,a,h,p=this;uv(p,{elastic:!0},t),t=p.elastic?.5:0,h=p.movable,p.x=s=new vv({axis:"x",dimension:p.dimensions.x,resistance:t,movable:h}),p.y=a=new vv({axis:"y",dimension:p.dimensions.y,resistance:t,movable:h}),p.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){p.gesture=t,p.offset=ut(p.dimensions.container)},press:function(t){var e=t.event.target.closest("a");e&&e.matches("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(t){var e=p.gesture,o=e.center,i=t.center,r=t.distance/e.distance,n=p.dimensions.minScale,e=p.dimensions.maxScale;h.scale<=n&&r<1&&(r+=.8*(1-r)),h.scale*r>=e&&(r=e/h.scale);n=h.x+p.offset.left,e=h.y+p.offset.top,e={x:(n-o.x)*r+i.x-n,y:(e-o.y)*r+i.y-e};h.scaleWith(r),s.dragMove(e.x),a.dragMove(e.y),p.dimensions.rescale(h.scale),(p.gesture=t).preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(s.dimension.enabled||a.dimension.enabled?(s.dragMove(t.x.delta),a.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}function Sv(t){hv.call(this),uv(this,t)}function kv(t){pv.call(this),this.x=new gv(uv({horizontal:!0},t)),this.y=new gv(uv({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(dv,t)}function Av(t){lv.call(this),this.forcedEnabled=!1,uv(this,t),this.scale=1,this.horizontal?(this.measure="offsetWidth",this.scrollSize="scrollWidth",this.axis="x"):(this.measure="offsetHeight",this.scrollSize="scrollHeight",this.axis="y")}function Pv(t,e){cv.call(this);var o=this,i=t[0]||t;o.capture=!1;t=cy(navigator.userAgent);i.addEventListener?(t.down.split(" ").forEach(function(t){i.addEventListener(t,hy(o._press,o),!0)}),t.up.split(" ").forEach(function(t){i.addEventListener(t,hy(o._release,o),!0)})):(t.down.split(" ").forEach(function(t){i.attachEvent(t,hy(o._press,o))}),t.up.split(" ").forEach(function(t){i.attachEvent(t,hy(o._release,o))})),o.bind(["press","release"],e||{})}kt(Fe,{autoBind:!0,zIndex:100});var Tv,Mv,Ov=((Mv=P.Class)&&(Rv.__proto__=Mv),((Rv.prototype=Object.create(Mv&&Mv.prototype)).constructor=Rv).prototype.parse=function(t){var e=new _v,o=!0;return"Feature"===t.type?(o=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),e=o&&e.children.length<2?e.children[0]:e},Rv.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},Rv.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},Rv.prototype._loadGeometryTo=function(t,e,o){var i,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],o),this._setLineFill(r);break;case"MultiLineString":for(i=0;i<n.length;i++)r=this._loadPolygon(t,[n[i]],o),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,o);break;case"MultiPolygon":for(i=0;i<n.length;i++)this._loadPolygon(t,n[i],o);break;case"Point":this._loadPoint(t,n,o);break;case"MultiPoint":for(i=0;i<n.length;i++)this._loadPoint(t,n[i],o)}},Rv.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(vt(e).anchor()))&&(t.options.fill=null)},Rv.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},Rv.prototype._loadPolygon=function(t,e,o){e=this._buildPolygon(e);return e.dataItem=o,this._loadShape(t,e)},Rv.prototype._buildPolygon=function(t){for(var e=new(1<t.length?P.drawing.MultiPath:P.drawing.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(Og.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},Rv.prototype._loadPoint=function(t,e,o){var i=Og.fromLngLat(e),e=this.locator.locationToView(i),e=new P.geometry.Circle(e,10),e=new P.drawing.Circle(e,this.style);return e.dataItem=o,e.location=i,this._loadShape(t,e)},Rv),ge=((Tv=Fe)&&(Bv.__proto__=Tv),((Bv.prototype=Object.create(Tv&&Tv.prototype)).constructor=Bv).prototype._readData=function(){return this.options.data||[]},Bv.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,o=Y(e.valueField),i=t.slice(0);i.sort(function(t,e){return o(e)-o(t)});for(var r=this._scaleType(),n=Y(this.options.locationField),s=0;s<i.length;s++){var a,h,p,l=i[s],c=n(l),u=o(l);lt(c)&<(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=Og.create(c),h=this.map.locationToView(c),p=a.map(u),(p=this._createSymbol({center:h,size:p,style:e.style,dataItem:l,location:c})).dataItem=l,p.location=c,p.value=u,this._drawSymbol(p))}}},Bv.prototype._scaleType=function(){var t=this.options.scale;return E(t)?t:Iv[t]},Bv.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=!E(e)?zv[e]:e)(t)},Bv.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},Bv);function Bv(){Tv.apply(this,arguments)}function Rv(t,e,o){Mv.call(this),this.observer=o,this.locator=t,this.style=e}kt(ge,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var Ev,Lv,Iv={sqrt:((Lv=P.Class)&&(Nv.__proto__=Lv),((Nv.prototype=Object.create(Lv&&Lv.prototype)).constructor=Nv).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t},Nv)},zv={circle:function(t){var e=new P.geometry.Circle(t.center,t.size/2);return new P.drawing.Circle(e,t.style)},square:function(t){var e=new P.drawing.Path(t.style),o=t.size/2,t=t.center;return e.moveTo(t.x-o,t.y-o).lineTo(t.x+o,t.y-o).lineTo(t.x+o,t.y+o).lineTo(t.x-o,t.y+o).close(),e}},Vv=Object.assign,jv=".k-marker",Dv=document,Hv=Math,Uv=((Ev=ee)&&(Fv.__proto__=Ev),((Fv.prototype=Object.create(Ev&&Ev.prototype)).constructor=Fv).prototype.destroy=function(){Ev.prototype.destroy.call(this),ly(this.element,"click",this._markerClickHandler),this.clear()},Fv.prototype.add=function(t){if(!x(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},Fv.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},Fv.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},Fv.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},Fv.prototype._reset=function(){Ev.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},Fv.prototype.bind=function(t,e){t=Wv.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},Fv.prototype._addOne=function(t){t=Wv.create(t,this.options);return t.addTo(this),t},Fv.prototype._readData=function(){return this.options.data||[]},Fv.prototype._load=function(t){this._data=t,this.clear();for(var e=Y(this.options.locationField),o=Y(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},Fv.prototype._markerClick=function(t){var e=this.map.layers||[],o=t.target._kendoNode,t={layer:this,layerIndex:e.indexOf(this),marker:o,markerIndex:(this.items||[]).indexOf(o),originalEvent:t};this.map.trigger("markerClick",t)},Fv.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},Fv.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},Fv.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Vv({},{layer:this,layerIndex:this.map.layers.indexOf(this),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},Fv);function Fv(t,e){Ev.call(this,t,e),this._markerClickHandler=hy(this._markerClick,this),py(this.element,"click",jv,this._markerClickHandler),this.items=[],this._load(this._readData())}function Nv(t,e){Lv.call(this),this._domain=t,this._range=e;t=Math.sqrt(t[1])-Math.sqrt(t[0]),e=e[1]-e[0];this._ratio=e/t}kt(Uv,{zIndex:1e3,autoBind:!0,dataSource:{},locationField:"location",titleField:"title"});var Gv,Wv=((Gv=P.Class)&&(qv.__proto__=Gv),((qv.prototype=Object.create(Gv&&Gv.prototype)).constructor=qv).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},qv.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},qv.prototype.location=function(t){return t?(this.options.location=Og.create(t).toArray(),this.layer&&this.layer.update(this),this):Og.create(this.options.location)},qv.prototype.showAt=function(t){this.render(),this.element.style.left=Yg(Hv.round(t.x)),this.element.style.top=Yg(Hv.round(t.y)),this.tooltip&&this.tooltip.popup&&this.tooltip.popup._position()},qv.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)},qv.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=hy(this._mouseEnter,this),py(this.element,"mouseenter",jv,this._mouseEnterHandler),this._mouseLeaveHandler=hy(this._mouseLeave,this),py(this.element,"mouseleave",jv,this._mouseLeaveHandler))},qv.prototype.unbindEvents=function(){this.element&&(ly(this.element,"mouseenter",this._mouseEnterHandler),ly(this.element,"mouseleave",this._mouseLeaveHandler))},qv.prototype.render=function(){var t,e,o,i;this.element||(t=this.options,e=this.layer,_(o=Dv.createElement("span"),"k-marker k-icon k-i-marker-"+qg(t.shape||"pin")),o.setAttribute("title",t.title),i=t.attributes||{},Object.keys(i).forEach(function(t){o.setAttributett(t,i[t])}),o._kendoNode=this,o.style.zIndex=t.zIndex,this.element=o,e&&e.element.appendChild(this.element),this.bindEvents(),this.renderTooltip())},qv.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t)},qv.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},qv.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},qv.prototype.renderTooltip=function(){},qv.create=function(t,e){return t instanceof qv?t:new qv(z({},e,t))},qv),Xv=Object.assign;function qv(t){Gv.call(this),this.options=t||{}}function Yv(t){window.requestAnimationFrame(t)}function Zv(t){t.preventDefault()}var Qv,Kv,ee=((Kv=P.Class)&&(cm.__proto__=Kv),((cm.prototype=Object.create(Kv&&Kv.prototype)).constructor=cm).prototype.tick=function(){},cm.prototype.done=function(){},cm.prototype.onEnd=function(){},cm.prototype.onCancel=function(){},cm.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Yv(this._tickProxy)))},cm.prototype.enabled=function(){return!0},cm.prototype.cancel=function(){this._started=!1,this.onCancel()},cm.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):Yv(this._tickProxy))},cm),$v=((Qv=ee)&&(lm.__proto__=Qv),((lm.prototype=Object.create(Qv&&Qv.prototype)).constructor=lm).prototype.done=function(){return this.timePassed()>=this.duration},lm.prototype.timePassed=function(){return Math.min(this.duration,my()-this.startDate)},lm.prototype.moveTo=function(t){var e=this.movable;this.initial=e[this.axis],this.delta=t.location-this.initial,this.duration="number"==typeof t.duration?t.duration:300,this.tick=this._easeProxy(t.ease),this.startDate=my(),this.start()},lm.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},lm.easeOutExpo=function(t,e,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},lm),Jv=Object.assign,tm=800,em=0,om="move",im="tap",rm="doubleTap",nm="release",sm="gesturechange",am="gestureend",hm="gesturetap",pm={api:0,touch:0,mouse:9,pointer:9};function lm(t){Qv.call(this),Xv(this,t)}function cm(){Kv.call(this),this._tickProxy=hy(this._tick,this),this._started=!1}function um(t){var e,o,i,r=ay(),n=[],s=t.originalEvent||t,a=t.currentTarget,h=0;if(t.api)n.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"});else if(t.type.match(/touch/))for(e=(o=s?s.changedTouches:[]).length;h<e;h++)i=o[h],n.push({location:i,event:t,target:i.target,currentTarget:a,id:i.identifier,type:"touch"});else r.pointers||r.msPointers?n.push({location:s,event:t,target:t.target,currentTarget:a,id:s.pointerId,type:"pointer"}):n.push({id:1,event:t,target:t.target,currentTarget:a,location:t,type:"mouse"});return n}var dm,fm,gm=((fm=P.Class)&&(mm.__proto__=fm),((mm.prototype=Object.create(fm&&fm.prototype)).constructor=mm).prototype.move=function(t){var e=t["page"+this.axis],o=my(),i=o-this.timeStamp||1;!e&&this.invalidZeroEvents||(this.delta=e-this.location,this._updateLocationData(t),this.initialDelta=e-this.startLocation,this.velocity=this.delta/i,this.timeStamp=o)},mm.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]},mm),ym=((dm=P.Class)&&(vm.__proto__=dm),((vm.prototype=Object.create(dm&&dm.prototype)).constructor=vm).prototype.press=function(){this._holdTimeout=setTimeout(hy(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},vm.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(im,t):e._trigger(rm,t),e.userEvents._clicks=0},300))},vm.prototype._hold=function(){this._trigger("hold",this.pressEvent)},vm.prototype.move=function(t){var e="api"!==t.type&&this.userEvents._shouldNotMove;if(!this._finished&&!e){if(this.x.move(t.location),this.y.move(t.location),!this._moved){if(this._withinIgnoreThreshold())return;if(Am.current&&Am.current!==this.userEvents)return this.dispose();this._start(t)}this._finished||this._trigger(om,t)}},vm.prototype.end=function(t){this.endTime=my(),this._finished||(this._finished=!0,this._trigger(nm,t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger(im,t)),clearTimeout(this._holdTimeout),this.dispose())},vm.prototype.dispose=function(){var t=this.userEvents.touches||[];this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout);var e=t.indexOf(this);t.splice(e,1)},vm.prototype.skip=function(){this.dispose()},vm.prototype.cancel=function(){this.dispose()},vm.prototype.isMoved=function(){return this._moved},vm.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=my(),this._moved=!0,this._trigger("start",t)},vm.prototype._trigger=function(t,e){var o=e.event,e={touch:this,x:this.x,y:this.y,target:this.target,event:o};this.userEvents.notify(t,e)&&o.preventDefault()},vm.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},vm);function vm(t,e,o){dm.call(this),Jv(this,{x:new gm("X",o.location),y:new gm("Y",o.location),type:o.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||pm[o.type],userEvents:t,target:e,currentTarget:o.currentTarget,initialTouch:o.target,id:o.id,pressEvent:o,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})}function mm(t,e){fm.call(this),this.support=ay(),this.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,this.axis=t,this._updateLocationData(e),this.startLocation=this.location,this.velocity=this.delta=0,this.timeStamp=my()}function xm(t){for(var e=cy(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}var _m,bm,wm,Cm,Sm,km,Am=((km=eo)&&(Hm.__proto__=km),((Hm.prototype=Object.create(km&&km.prototype)).constructor=Hm).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Hm.prototype.destroy=function(){var e,o=this,t=this.options,i=this.element;o._destroyed||(o._destroyed=!0,o.captureUpIfMoved&&this.support.eventCapture&&(e=o.surface,xm(function(t){e.removeEventListener(t,o.preventIfMoving)})),ly(o.surface,yy("move"),this._surfaceMoveHandler),ly(o.surface,yy("up cancel"),this._surfaceEndHandler),ly(i,yy("down"),this._elementStartHandler),o.useClickAsTap&&ly(i,yy("click"),this._elementClickHandler),t.preventDragEvent&&ly(i,yy("dragstart"),this._elementDragStartHandler),ly(i,yy("mousedown"),this._elementSelectHandler),o._disposeAll(),o.unbind(),delete o.surface,delete o.element,delete o.currentTarget)},Hm.prototype.capture=function(){Hm.current=this},Hm.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Hm.prototype.notify=function(t,e){var o,i,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case om:a=sm;break;case"end":a=am;break;case im:a=hm}Jv(e,{touches:s},(o=s[0],i=s[1],r=o.x.location,n=o.y.location,t=i.x.location,s=i.y.location,o=r-t,i=n-s,{center:{x:(r+t)/2,y:(n+s)/2},distance:Math.sqrt(o*o+i*i)}))}return this.trigger(a,Jv(e,{type:a}))},Hm.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},Hm.prototype.move=function(t,e){this._apiCall("_move",t,e)},Hm.prototype.end=function(t,e){this._apiCall("_end",t,e)},Hm.prototype._isMultiTouch=function(){return 1<this.touches.length},Hm.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Hm.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Hm.prototype._isMoved=function(){return Z(this.touches,function(t){return t.isMoved()}).length},Hm.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Hm.prototype._start=function(t){var e,o,i=0,r=this.filter,n=um(t),s=n.length,a=t.which;if(!(a&&1<a||this._maxTouchesReached()))for(Hm.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();i<s&&!this._maxTouchesReached();i++)o=n[i],(e=r?o.currentTarget:this.element)&&0===e.length||(o=new ym(this,e,o),this.touches.push(o),o.press(),this._isMultiTouch()&&this.notify("gesturestart",{}))},Hm.prototype._move=function(t){this._eachTouch("move",t)},Hm.prototype._end=function(t){this._eachTouch("end",t)},Hm.prototype._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:my(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:t.currentTarget,event:t,type:"tap"};this.trigger("tap",e)&&t.preventDefault()},Hm.prototype._eachTouch=function(t,e){for(var o,i,r,n={},s=um(e),a=this.touches,h=0;h<a.length;h++)n[(o=a[h]).id]=o;for(h=0;h<s.length;h++)(r=n[(i=s[h]).id])&&r[t](i)},Hm.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:xy,preventDefault:xy})},Hm.defaultThreshold=function(t){em=t},Hm.minHold=function(t){tm=t},Hm),Pm=Object.assign,Tm=Math.abs,Mm="change",Om=((Sm=ee)&&(Dm.__proto__=Sm),((Dm.prototype=Object.create(Sm&&Sm.prototype)).constructor=Dm).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},Dm.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},Dm.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},Dm.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},Dm),Bm=((Cm=ee)&&(jm.__proto__=Cm),((jm.prototype=Object.create(Cm&&Cm.prototype)).constructor=jm).prototype.onCancel=function(){this.transition.cancel()},jm.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},jm.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},jm.prototype.done=function(){return Tm(this.velocity)<1},jm.prototype.start=function(t){this.dimension.enabled&&(this.paneAxis.outOfBounds()?this.transition._started?(this.transition.cancel(),this.velocity=Math.min(t.touch[this.axis].velocity*this.velocityMultiplier,55),Cm.prototype.start.call(this)):this._snapBack():(t=2===t.touch.id?0:t.touch[this.axis].velocity,this.velocity=Math.max(Math.min(t*this.velocityMultiplier,55),-55),this.tapCapture.captureNext(),Cm.prototype.start.call(this)))},jm.prototype.tick=function(){var t=this.dimension,e=this.paneAxis.outOfBounds()?.5:this.friction,e=this.velocity*=e,e=this.movable[this.axis]+e;!this.elastic&&t.outOfBounds(e)&&(e=Math.max(Math.min(e,t.max),t.min),this.velocity=0),this.movable.moveAxis(this.axis,e)},jm.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},jm.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},jm.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:$v.easeOutExpo})},jm),Rm=((wm=ee)&&(Vm.__proto__=wm),((Vm.prototype=Object.create(wm&&wm.prototype)).constructor=Vm).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},Vm.prototype.done=function(){return Tm(this.offset.y)<5&&Tm(this.offset.x)<5},Vm.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},Vm.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},Vm.prototype.setCallback=function(t){t&&E(t)&&(this.callback=t)},Vm.prototype._updateCoordinates=function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}},Vm),Em=((bm=P.Class)&&(zm.__proto__=bm),((zm.prototype=Object.create(bm&&bm.prototype)).constructor=zm).prototype.refresh=function(){var t=this.axis,e=this.dimension,o=e.size,i=this.scrollMovable,r=o/e.total,e=Math.round(-i[t]*r),i=Math.round(o*r);this.element.style.display=1<=r?"none":"",o<e+i?i=o-e:e<0&&(i+=e,e=0),this.elementSize!==i&&(this.element.style[this.size]=i+"px",this.elementSize=i),this.movable.moveAxis(t,e)},zm.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},zm.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},zm),Lm=((_m=eo)&&(Im.__proto__=_m),((Im.prototype=Object.create(_m&&_m.prototype)).constructor=Im).prototype._initOptions=function(t){this.options=z({},this.options,t)},Im.prototype._wheelScroll=function(t){var e,o,i;t.ctrlKey||(this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50),o=t.originalEvent||t,i=o.wheelDeltaY,o.wheelDelta?void 0!==i&&!i||(e=o.wheelDelta):o.detail&&o.axis===o.VERTICAL_AXIS&&(e=10*-o.detail),(e=e)&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},Im.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},Im.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},Im.prototype.height=function(){return this.dimensions.y.size},Im.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},Im.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},Im.prototype._resize=function(){this._native||this.contentResized()},Im.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},Im.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},Im.prototype.contentResized=function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},Im.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},Im.prototype.enable=function(){this.enabled=!0},Im.prototype.disable=function(){this.enabled=!1},Im.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(Tm(t)),this.scrollElement.scrollTop(Tm(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},Im.prototype.animatedScrollTo=function(t,e,o){var i;this._native?this.scrollTo(t,e):(i={x:this.movable.x,y:this.movable.y},this.animatedScroller.setCoordinates(i,{x:t,y:e}),this.animatedScroller.setCallback(o),this.animatedScroller.start())},Im.prototype.pullHandled=function(){},Im.prototype.destroy=function(){var t=this.element;ly(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},Im.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},Im.prototype._initPullToRefresh=function(){},Im.prototype._dragEnd=function(){},Im.prototype._paneChange=function(){},Im.prototype._initAxis=function(t){var e=this,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new Em({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(Mm,function(){s.refresh()}),n.bind(Mm,function(){s.show()}),e[t+"inertia"]=new Bm({axis:t,paneAxis:n,movable:o,tapCapture:r,userEvents:e.userEvents,dimension:i,elastic:e.options.elastic,friction:e.options.friction||.96,velocityMultiplier:e.options.velocityMultiplier||10,end:function(){s.hide(),e.trigger("scrollEnd",{axis:t,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}})},Im);function Im(t,e){_m.call(this);var n=this;this.element=t,this._initOptions(e);var o=function(t){t=oy(t);return t.ios||t.android}(navigator.userAgent);n._native=n.options.useNative&&o;var i=ey('<div class="km-scroll-header"/>');if(n._native)return _(t,"km-native-scroller"),Xg(i,t),void Pm(n,{scrollElement:t,fixedContainer:t.children[0]});t.style.overflow="hidden",_(t,"km-scroll-wrapper"),function(t,e){for(t.appendChild(e);t.firstChild!==e;)e.appendChild(t.firstChild)}(t,ey('<div class="km-scroll-container"/>')),Xg(i,t);var r=t.children[1],s=new fv(t),a=new xv(r),h=new yv({element:r,container:t,forcedEnabled:n.options.zoom}),p=this.options.avoidScrolling,l=new Am(t,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:n.options.zoom,supportDoubleTap:n.options.supportDoubleTap,start:function(t){h.refresh();var o,e=Tm(t.x.velocity),i=Tm(t.y.velocity),r=i<=2*e,e=e<=2*i;i=n.fixedContainer,o=t.event.target,i!==o&&!function(t){if(!o)return!1;for(var e=o.parentNode;null!==e;){if(e===t)return!0;e=e.parentNode}return!1}(i)&&!p(t)&&n.enabled&&(h.x.enabled&&r||h.y.enabled&&e)?l.capture():l.cancel()}}),e=new mv({movable:a,dimensions:h,userEvents:l,elastic:n.options.elastic}),o=new Om({movable:a,dimensions:h,userEvents:l,tapCapture:s}),i=new Rm({moveTo:function(t){n.scrollTo(t.x,t.y)}});a.bind(Mm,function(){n.scrollTop=-a.y,n.scrollLeft=-a.x,n.trigger("scroll",{scrollTop:n.scrollTop,scrollLeft:n.scrollLeft})}),n.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),py(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler)),Pm(n,{movable:a,dimensions:h,zoomSnapBack:o,animatedScroller:i,userEvents:l,pane:e,tapCapture:s,pulled:!1,enabled:!0,scrollElement:r,scrollTop:0,scrollLeft:0,fixedContainer:t.children[0]}),n._initAxis("x"),n._initAxis("y"),n._wheelEnd=function(){n._wheel=!1,n.userEvents.end(0,n._wheelY)},h.refresh(),n.options.pullToRefresh&&n._initPullToRefresh()}function zm(t){bm.call(this);var e="x"===t.axis,o=ey('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');Pm(this,t,{element:o,elementSize:0,movable:new xv(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(Mm,this.refresh.bind(this)),this.container.appendChild(o),t.alwaysVisible&&this.show()}function Vm(t){wm.call(this,t),Pm(this,t,{origin:{},destination:{},offset:{}})}function jm(t){Cm.call(this);var e=this;Pm(e,t,{transition:new $v({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",hy(e.start,e)),e.userEvents.bind("gestureend",hy(e.start,e)),e.userEvents.bind("tap",hy(e.onEnd,e))}function Dm(t){Sm.call(this,t),Pm(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function Hm(t,e){km.call(this);var o,i=ay();this.support=i,o=this.filter=(e=e||{}).filter,this.threshold=e.threshold||em,this.minHold=e.minHold||tm,this.touches=[],this._maxTouches=e.multiTouch?2:1,this.allowSelection=e.allowSelection,this.captureUpIfMoved=e.captureUpIfMoved,this.useClickAsTap=!e.fastTap&&!i.delayedClick(),this._clicks=0,this.supportDoubleTap=e.supportDoubleTap;var r,n,s=!i.touch||i.mouseAndTouchPresent;Jv(this,{element:t,surface:e.global&&s?t.ownerDocument.documentElement:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=hy(this._move,this),py(this.surface,yy("move"),this._surfaceMoveHandler),this._surfaceEndHandler=hy(this._end,this),py(this.surface,yy("up cancel"),this._surfaceEndHandler),this._elementStartHandler=hy(this._start,this),py(t,yy("down"),o,this._elementStartHandler),this.useClickAsTap&&(this._elementClickHandler=hy(this._click,this),py(t,yy("click"),o,this._elementClickHandler)),(i.pointers||i.msPointers)&&(i.browser.version<11?t.style["-ms-touch-action"]=e.touchAction&&"none"!==e.touchAction?"pinch-zoom double-tap-zoom "+e.touchAction:"pinch-zoom double-tap-zoom":t.style["touch-action"]=e.touchAction||"none"),e.preventDragEvent&&(this._elementDragStartHandler=Zv,py(t,yy("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=hy(this._select,this),py(t,yy("mousedown"),o,this._elementSelectHandler),this.captureUpIfMoved&&i.eventCapture&&(r=this.surface,n=hy(this.preventIfMoving,this),xm(function(t){r.addEventListener(t,n,!0)})),this.bind(["press","hold",im,rm,"start",om,"end",nm,"cancel","gesturestart",sm,am,hm,"select"],e)}kt(Lm,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),vy(Lm,["pull","scroll","resize"]);function Um(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}Um.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};var Fm=Um,Nm=Math,Gm=Nm.min,Wm=Nm.pow,Xm=P.geometry.Point,qm="DOMMouseScroll mousewheel",Ym={bubble:ge,shape:Fe,tile:at};function Zm(t){var e=[];if(t)for(var o=qg(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}Ym.marker=Uv;var Qm,eo=((Qm=eo)&&(Km.__proto__=Qm),((Km.prototype=Object.create(Qm&&Qm.prototype)).constructor=Km).prototype.destroy=function(){this.scroller.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),x(this.markers)?this.markers.forEach(function(t){t.destroy()}):this.markers.destroy();for(var t=0;t<this.layers.length;t++)this.layers[t].destroy();ly(this.element,qm,this._mousewheelHandler),Qm.prototype.destroy.call(this)},Km.prototype._initOptions=function(t){this.options=z({},this.options,t)},Km.prototype._initElement=function(t){_(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Wg(t);t=ey("<div />");this.element.appendChild(t)},Km.prototype.initServices=function(t){this.widgetService=new Fm(this,t=void 0===t?{}:t)},Km.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},Km.prototype.addObserver=function(t){t&&this.observers.push(t)},Km.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},Km.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},Km.prototype.trigger=function(t,e){for(var o=((e=void 0===e?{}:e).sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i||Qm.prototype.trigger.call(this,t,e),i},Km.prototype._notifyObserver=function(t,e){for(var o=((e=void 0===e?{}:e).sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},Km.prototype.zoom=function(t){var e=this.options,e=lt(t)?(t=Nm.round(mt(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this._reset()),this):e.zoom;return e},Km.prototype.center=function(t){t=t?(this.options.center=Og.create(t).toArray(),this._reset(),this):Og.create(this.options.center);return t},Km.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},Km.prototype.setOptions=function(t){Qm.prototype.setOptions.call(this,t),this._reset()},Km.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,t=Og.create(t);return this.crs.toPoint(t,this._layerSize(e),o)},Km.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,t=Xm.create(t);return this.crs.toLocation(t,this._layerSize(e),o)},Km.prototype.locationToView=function(t){var e=Og.create(t),t=this.locationToLayer(this._viewOrigin);return this.locationToLayer(e).translateWith(t.scale(-1))},Km.prototype.viewToLocation=function(t,e){var o=this.locationToLayer(this._getOrigin(),e),o=Xm.create(t).clone().translateWith(o);return this.layerToLocation(o,e)},Km.prototype.eventOffset=function(t){var e,o=ut(this.element);return o=t.x&&t.x.location||t.y&&t.y.location?(e=t.x.location-o.left,t.y.location-o.top):(t=t.originalEvent||t,e=Ct(t.pageX,t.clientX)-o.left,Ct(t.pageY,t.clientY)-o.top),new P.geometry.Point(e,o)},Km.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},Km.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},Km.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},Km.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),o=t.clientWidth;return{width:o=!this.options.wraparound?Gm(e,o):o,height:Gm(e,t.clientHeight)}},Km.prototype.exportVisual=function(){return this._reset(),!1},Km.prototype._setOrigin=function(t,e){var o=this.viewSize(),t=this._origin=Og.create(t);return(t=this.locationToLayer(t,e)).x+=o.width/2,t.y+=o.height/2,this.options.center=this.layerToLocation(t,e).toArray(),this},Km.prototype._getOrigin=function(t){var e=this.viewSize();return!t&&this._origin||((t=this.locationToLayer(this.center())).x-=e.width/2,t.y-=e.height/2,this._origin=this.layerToLocation(t)),this._origin},Km.prototype._setExtent=function(t){var e=Uy.create(t),o=e.se.clone();this.options.wraparound&&o.lng<0&&0<t.nw.lng&&(o.lng=180+(180+o.lng));var i=new Uy(e.nw,o);this.center(i.center());for(var r=this.element.clientWidth,n=this.element.clientHeight,s=this.options.maxZoom;s>=this.options.minZoom;s--){var a=this.locationToLayer(i.nw,s),h=this.locationToLayer(i.se,s),p=Nm.abs(h.x-a.x),a=Nm.abs(h.y-a.y);if(p<=r&&a<=n)break}this.zoom(s)},Km.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),o=this.viewSize();e.x+=o.width,e.y+=o.height;e=this.layerToLocation(e);return new Uy(t,e)},Km.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},Km.prototype._initControls=function(){var t=this.options.controls;t.attribution&&this._createAttribution(t.attribution),this.support.mobileOS||(t.navigator&&this._createNavigator(t.navigator),t.zoom&&this._createZoomControl(t.zoom))},Km.prototype._createControlElement=function(t,e){t=t.position||e,e="."+Zm(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[];0===e.length&&(_(o=document.createElement("div"),"k-map-controls "+Zm(t)),this.element.appendChild(e=o));var o=document.createElement("div");return e.appendChild(o),o},Km.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new Cy(e,t)},Km.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),t=this.navigator=new Ry(e,t);this._navigatorPan=this._navigatorPan.bind(this),t.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),t.bind("center",this._navigatorCenter)},Km.prototype._navigatorPan=function(t){var e=this.scroller,o=e.scrollLeft+t.x,i=e.scrollTop-t.y,r=this._virtualSize,e=this.element.clientWidth,t=this.element.clientHeight,o=mt(o,r.x.min,r.x.max-e),i=mt(i,r.y.min,r.y.max-t);this.scroller.one("scroll",hy(this._scrollEnd,this)),this.scroller.scrollTo(-o,-i)},Km.prototype._navigatorCenter=function(){this.center(this.options.center)},Km.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),t=this.zoomControl=new zy(e,t);this._zoomControlChange=this._zoomControlChange.bind(this),t.bind("change",this._zoomControlChange)},Km.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},Km.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,e=this.scroller=new Lm(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});e.bind("scroll",hy(this._scroll,this)),e.bind("scrollEnd",hy(this._scrollEnd,this)),e.userEvents.bind("gesturestart",hy(this._scaleStart,this)),e.userEvents.bind("gestureend",hy(this._scale,this)),e.userEvents.bind("doubleTap",hy(this._doubleTap,this)),e.userEvents.bind("tap",hy(this._tap,this)),this.scrollElement=e.scrollElement},Km.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],o=0;o<t.length;o++){var i=t[o],i=this._createLayer(i);e.push(i)}},Km.prototype._createLayer=function(t){var e=t.type||"shape",o=this.options.layerDefaults[e],t=z({},"marker"===e?this.options.markerDefaults:o,t),t=new Ym[e](this,t);return"marker"===e&&(this.markers=t),t},Km.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&"marker"===t.type}).length||(this.markers=new Uv(this,this.options.markerDefaults),this.markers.add(this.options.markers))},Km.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),o=t.sender.movable,o=new P.geometry.Point(o.x,o.y).scale(-1).scale(1/o.scale);e.x+=o.x,e.y+=o.y,this._scrollOffset=o,this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},Km.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=my(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},Km.prototype._panComplete=function(){return 50<my()-(this._panEndTimestamp||0)},Km.prototype._scaleStart=function(t){!this.trigger("zoomStart",{originalEvent:t})||(t=t.touches[1])&&t.cancel()},Km.prototype._scale=function(t){var e=this.scroller.movable.scale,o=this._scaleToZoom(e),i=new P.geometry.Point(t.center.x,t.center.y),e=this.viewToLocation(i,o),i=this.locationToLayer(e,o).translate(-i.x,-i.y);this._zoomAround(i,o),this.trigger("zoomEnd",{originalEvent:t})},Km.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=Nm.log(t)/Nm.log(2);return Nm.round(t)},Km.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.trigger("beforeReset"),this.trigger("reset")},Km.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,o=t.dimensions.y,i=this._layerSize(),r=this.extent().nw,n=this.locationToLayer(r).round();t.movable.round=!0,t.reset(),t.userEvents.cancel();r=this.zoom();t.dimensions.forcedMinScale=Wm(2,this.options.minZoom-r),t.dimensions.maxScale=Wm(2,this.options.maxZoom-r);r={min:-n.x,max:i-n.x},n={min:-n.y,max:i-n.y};this.options.wraparound&&(r.max=20*i,r.min=-r.max),!1===this.options.pannable&&(i=this.viewSize(),r.min=n.min=0,r.max=i.width,n.max=i.height),e.makeVirtual(),o.makeVirtual(),e.virtualSize(r.min,r.max),o.virtualSize(n.min,n.max),this._virtualSize={x:r,y:n}},Km.prototype._renderLayers=function(){},Km.prototype._layerSize=function(t){t=Ct(t,this.options.zoom);return this.options.minSize*Wm(2,t)},Km.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},Km.prototype._doubleTap=function(t){var e,o,i;!1===this.options.zoomable||this.trigger("zoomStart",{originalEvent:t})||(e=this.zoom()+1,i=this.eventOffset(t),o=this.viewToLocation(i),i=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))},Km.prototype._mousewheel=function(t){t.preventDefault();var e=0<nt(t)?-1:1,o=this.options,i=this.zoom(),e=mt(i+e,o.minZoom,o.maxZoom);!1===o.zoomable||e===i||this.trigger("zoomStart",{originalEvent:t})||(o=this.eventOffset(t),i=this.viewToLocation(o),o=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},Km);function Km(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),Qm.call(this),this.support=ay(),this.initObserver(i),this.initServices(i),this._initOptions(e),this.bind(this.events,e),this.crs=new Jg,this._initElement(t),this._viewOrigin=this._getOrigin(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheelHandler=this._mousewheel.bind(this),py(this.element,qm,this._mousewheelHandler)}kt(eo,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),vy(eo,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);function $m(){return{icon:{border:{width:1}},label:{font:ex,padding:3},line:{length:10,width:2},visible:!0}}function Jm(t){return{axisDefaults:{labels:{font:ex},notes:$m(),title:{font:ox,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:"11px Arial, Helvetica, sans-serif"},overlay:(t=void 0===t?{}:t).gradients?{}:{gradient:"none"},area:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},rangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalRangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},bar:{gap:1.5,spacing:.4},boxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},bubble:{border:{width:0},labels:{background:"transparent"},opacity:.6},bullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},candlestick:{border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:"#000",width:1},spacing:.3},column:{gap:1.5,spacing:.4},heatmap:{labels:{color:"",background:"transparent",visible:!0},highlight:{border:{width:0}}},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},donut:{margin:1},funnel:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},horizontalWaterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4},line:{width:2},notes:$m(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},spacing:.3},radarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},radarLine:{markers:{visible:!1},width:2},polarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},polarLine:{markers:{visible:!1},width:2},rangeBar:{gap:1.5,spacing:.4},rangeColumn:{gap:1.5,spacing:.4},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},verticalBullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},verticalLine:{width:2},waterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4}},title:{font:ox},legend:{labels:{font:ex}}}}var tx=eo,eo="Arial, Helvetica, sans-serif",ex="12px "+eo,ox="16px "+eo;o.d(e,"autoMajorUnit",function(){return Ut}),o.d(e,"Point",function(){return Nt}),o.d(e,"Box",function(){return qt}),o.d(e,"Ring",function(){return Jt}),o.d(e,"Sector",function(){return te}),o.d(e,"ShapeBuilder",function(){return se}),o.d(e,"ShapeElement",function(){return ve}),o.d(e,"ChartElement",function(){return le}),o.d(e,"BoxElement",function(){return fe}),o.d(e,"RootElement",function(){return Ce}),o.d(e,"FloatElement",function(){return Pe}),o.d(e,"Text",function(){return Be}),o.d(e,"TextBox",function(){return ze}),o.d(e,"Title",function(){return Ue}),o.d(e,"AxisLabel",function(){return We}),o.d(e,"Axis",function(){return go}),o.d(e,"Note",function(){return Ze}),o.d(e,"CategoryAxis",function(){return Ko}),o.d(e,"DateCategoryAxis",function(){return ai}),o.d(e,"DateValueAxis",function(){return xi}),o.d(e,"NumericAxis",function(){return yi}),o.d(e,"LogarithmicAxis",function(){return Si}),o.d(e,"PolarAxis",function(){return Mi}),o.d(e,"RadarCategoryAxis",function(){return Pi}),o.d(e,"RadarNumericAxis",function(){return Li}),o.d(e,"RadarLogarithmicAxis",function(){return zi}),o.d(e,"CurveProcessor",function(){return Hi}),o.d(e,"Gradients",function(){return me}),o.d(e,"rectToBox",function(){return Re}),o.d(e,"Aggregates",function(){return $i}),o.d(e,"AreaChart",function(){return un}),o.d(e,"AreaSegment",function(){return on}),o.d(e,"AxisGroupRangeTracker",function(){return dn}),o.d(e,"Bar",function(){return wn}),o.d(e,"BarChart",function(){return Ln}),o.d(e,"BarLabel",function(){return mn}),o.d(e,"BoxPlotChart",function(){return Yn}),o.d(e,"BoxPlot",function(){return Xn}),o.d(e,"BubbleChart",function(){return ps}),o.d(e,"Bullet",function(){return gs}),o.d(e,"BulletChart",function(){return ms}),o.d(e,"CandlestickChart",function(){return Un}),o.d(e,"Candlestick",function(){return zn}),o.d(e,"CategoricalChart",function(){return Er}),o.d(e,"CategoricalErrorBar",function(){return Ar}),o.d(e,"CategoricalPlotArea",function(){return Wa}),o.d(e,"Chart",function(){return Ll}),o.d(e,"ChartContainer",function(){return Ms}),o.d(e,"ClipAnimation",function(){return Zr}),o.d(e,"ClusterLayout",function(){return Tn}),o.d(e,"Crosshair",function(){return As}),o.d(e,"CrosshairTooltip",function(){return Cs}),o.d(e,"DefaultAggregates",function(){return ra}),o.d(e,"DonutChart",function(){return fp}),o.d(e,"DonutPlotArea",function(){return gp}),o.d(e,"DonutSegment",function(){return pp}),o.d(e,"ErrorBarBase",function(){return kr}),o.d(e,"ErrorRangeCalculator",function(){return ar}),o.d(e,"Highlight",function(){return Ya}),o.d(e,"SharedTooltip",function(){return Bh}),o.d(e,"Legend",function(){return vh}),o.d(e,"LegendItem",function(){return lh}),o.d(e,"LegendLayout",function(){return ph}),o.d(e,"LineChart",function(){return en}),o.d(e,"LinePoint",function(){return Vr}),o.d(e,"LineSegment",function(){return Dr}),o.d(e,"Pane",function(){return Rs}),o.d(e,"PieAnimation",function(){return Hh}),o.d(e,"PieChart",function(){return rp}),o.d(e,"PieChartMixin",function(){return Jh}),o.d(e,"PiePlotArea",function(){return np}),o.d(e,"PieSegment",function(){return $h}),o.d(e,"PlotAreaBase",function(){return Qs}),o.d(e,"PlotAreaEventsMixin",function(){return Ks}),o.d(e,"PlotAreaFactory",function(){return xh}),o.d(e,"PointEventsMixin",function(){return Lr}),o.d(e,"RangeBar",function(){return aa}),o.d(e,"RangeBarChart",function(){return ca}),o.d(e,"RangeAreaPoint",function(){return ma}),o.d(e,"RangeAreaChart",function(){return Oa}),o.d(e,"ScatterChart",function(){return is}),o.d(e,"ScatterErrorBar",function(){return Zn}),o.d(e,"ScatterLineChart",function(){return Nh}),o.d(e,"Selection",function(){return Ah}),o.d(e,"SeriesAggregator",function(){return ta}),o.d(e,"SeriesBinder",function(){return rr}),o.d(e,"SplineSegment",function(){return Xr}),o.d(e,"SplineAreaSegment",function(){return cn}),o.d(e,"StackWrap",function(){return Bn}),o.d(e,"Tooltip",function(){return Ph}),o.d(e,"OHLCChart",function(){return Ra}),o.d(e,"OHLCPoint",function(){return Ba}),o.d(e,"WaterfallChart",function(){return Da}),o.d(e,"WaterfallSegment",function(){return ja}),o.d(e,"XYPlotArea",function(){return qh}),o.d(e,"MousewheelZoom",function(){return hh}),o.d(e,"ZoomSelection",function(){return ah}),o.d(e,"Pannable",function(){return eh}),o.d(e,"ChartAxis",function(){return Ui}),o.d(e,"ChartPane",function(){return qi}),o.d(e,"ChartPlotArea",function(){return Yi}),o.d(e,"findAxisByName",function(){return Gi}),o.d(e,"anyHasZIndex",function(){return Qr}),o.d(e,"appendIfNotNull",function(){return Es}),o.d(e,"areNumbers",function(){return Vn}),o.d(e,"bindSegments",function(){return Is}),o.d(e,"categoriesCount",function(){return Mr}),o.d(e,"countNumbers",function(){return Qi}),o.d(e,"equalsIgnoreCase",function(){return zs}),o.d(e,"evalOptions",function(){return Tr}),o.d(e,"filterSeriesByType",function(){return Vs}),o.d(e,"getDateField",function(){return js}),o.d(e,"getField",function(){return Ji}),o.d(e,"hasGradientOverlay",function(){return xn}),o.d(e,"hasValue",function(){return Jn}),o.d(e,"isDateAxis",function(){return Ds}),o.d(e,"segmentVisible",function(){return Ls}),o.d(e,"singleItemOrArray",function(){return Hs}),o.d(e,"createOutOfRangePoints",function(){return Gs}),o.d(e,"ChartService",function(){return ao}),o.d(e,"DomEventsBuilder",function(){return ho}),o.d(e,"FormatService",function(){return io}),o.d(e,"IntlService",function(){return Je}),o.d(e,"TemplateService",function(){return G}),o.d(e,"Sparkline",function(){return Gl}),o.d(e,"Navigator",function(){return oc}),o.d(e,"NavigatorHint",function(){return Ql}),o.d(e,"StockChart",function(){return nc}),o.d(e,"constants",function(){return i}),o.d(e,"Gauge",function(){return mc}),o.d(e,"LinearGauge",function(){return Qc}),o.d(e,"LinearPointer",function(){return Bc}),o.d(e,"ArrowLinearPointer",function(){return jc}),o.d(e,"BarLinearPointer",function(){return Xc}),o.d(e,"LinearScale",function(){return Ac}),o.d(e,"RadialGauge",function(){return mu}),o.d(e,"RadialPointer",function(){return fu}),o.d(e,"RadialScale",function(){return nu}),o.d(e,"ArcGauge",function(){return Ou}),o.d(e,"RangePointer",function(){return Mu}),o.d(e,"ArcScale",function(){return bu}),o.d(e,"CircularGauge",function(){return Bu}),o.d(e,"Barcode",function(){return tf}),o.d(e,"barcodeValidator",function(){return Jd}),o.d(e,"QRCode",function(){return mg}),o.d(e,"qrcodeValidator",function(){return vg}),o.d(e,"Map",function(){return tx}),o.d(e,"addClass",function(){return _}),o.d(e,"removeClass",function(){return b}),o.d(e,"alignPathToPixel",function(){return T}),o.d(e,"clockwise",function(){return M}),o.d(e,"convertableToNumber",function(){return R}),o.d(e,"deepExtend",function(){return z}),o.d(e,"elementStyles",function(){return H}),o.d(e,"getSpacing",function(){return U}),o.d(e,"getTemplate",function(){return W}),o.d(e,"getter",function(){return Y}),o.d(e,"grep",function(){return Z}),o.d(e,"hasClasses",function(){return Q}),o.d(e,"HashMap",function(){return $}),o.d(e,"inArray",function(){return J}),o.d(e,"interpolateValue",function(){return tt}),o.d(e,"InstanceObserver",function(){return ot}),o.d(e,"isArray",function(){return x}),o.d(e,"isFunction",function(){return E}),o.d(e,"isNumber",function(){return O}),o.d(e,"isObject",function(){return V}),o.d(e,"isString",function(){return B}),o.d(e,"map",function(){return it}),o.d(e,"mousewheelDelta",function(){return nt}),o.d(e,"FontLoader",function(){return St}),o.d(e,"setDefaultOptions",function(){return kt}),o.d(e,"sparseArrayLimits",function(){return At}),o.d(e,"styleValue",function(){return j}),o.d(e,"find",function(){return Pt}),o.d(e,"elementScale",function(){return Bt}),o.d(e,"autoTextColor",function(){return Rt}),o.d(e,"createHashSet",function(){return jt}),o.d(e,"defaultErrorHandler",function(){return Dt}),o.d(e,"keys",function(){return Ht}),o.d(e,"append",function(){return ht}),o.d(e,"bindEvents",function(){return pt}),o.d(e,"Class",function(){return P.Class}),o.d(e,"defined",function(){return lt}),o.d(e,"deg",function(){return ct}),o.d(e,"elementOffset",function(){return ut}),o.d(e,"elementSize",function(){return dt}),o.d(e,"eventCoordinates",function(){return ft}),o.d(e,"eventElement",function(){return gt}),o.d(e,"hashKey",function(){return yt}),o.d(e,"last",function(){return vt}),o.d(e,"limitValue",function(){return mt}),o.d(e,"logToConsole",function(){return P.logToConsole}),o.d(e,"objectKey",function(){return xt}),o.d(e,"rad",function(){return _t}),o.d(e,"round",function(){return bt}),o.d(e,"unbindEvents",function(){return wt}),o.d(e,"valueOrDefault",function(){return Ct}),o.d(e,"chartBaseTheme",function(){return Jm}),function(t){for(var e in t)ix(e,t[e])}(e)}],i.c=r,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}}});
|
|
1
|
+
System.register("@progress/kendo-charts",["@progress/kendo-drawing"],function(ix){var n;return{setters:[function(t){n=t.__useDefault?t.default:t}],execute:function(){function i(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var o,r;r={},i.m=o=[function(t,e){t.exports=n},function(t,e,o){"use strict";o.r(e);var i={};o.d(i,"NAVIGATOR_AXIS",function(){return $l}),o.d(i,"NAVIGATOR_PANE",function(){return Kl});var d="arc",r="#000",w="bottom",C="center",u="circle",y="date",g=10,s=/\{\d+:?/,S="left",l=Number.MAX_VALUE,c=-Number.MAX_VALUE,n="none",k="right",f="string",A="top",p="value",a="#fff",v="x",m="y";function x(t){return Array.isArray(t)}function _(t,e){for(var o=x(e)?e:[e],i=0;i<o.length;i++){var r=o[i];-1===t.className.indexOf(r)&&(t.className+=" "+r)}}var h=/\s+/g;function b(t,e){t&&t.className&&(t.className=t.className.replace(e,"").replace(h," "))}var P=o(0);function T(t){var e=.5;t.options.stroke&&P.drawing.util.defined(t.options.stroke.width)&&t.options.stroke.width%2==0&&(e=0);for(var o=0;o<t.segments.length;o++)t.segments[o].anchor().round(0).translate(e,e);return t}function M(t,e){return-t.x*e.y+t.y*e.x<0}function O(t){return"number"==typeof t&&!isNaN(t)}function B(t){return typeof t===f}function R(t){return O(t)||B(t)&&isFinite(t)}function E(t){return"function"==typeof t}var L="object",I="undefined";function z(t){for(var e=arguments,o=arguments.length,i=1;i<o;i++)!function t(e,o){for(var i in o){var r,n=o[i],s=typeof n;(r=s===L&&null!==n?n.constructor:null)&&r!==Array?n instanceof Date?e[i]=new Date(n.getTime()):E(n.clone)?e[i]=n.clone():(r=e[i],e[i]=typeof r===L&&r||{},t(e[i],n)):s!==I&&(e[i]=n)}return e}(t,e[i]);return t}function V(t){return"object"==typeof t}function j(t){return O(t)?t+"px":t}var D=/width|height|top|left|bottom|right/i;function H(t,e){var o=B(e)?[e]:e;if(x(o)){for(var i={},r=window.getComputedStyle(t),n=0;n<o.length;n++){var s=o[n];i[s]=D.test(s)?parseFloat(r[s]):r[s]}return i}if(V(e))for(var a in e)t.style[a]=j(e[a])}function U(t,e){void 0===e&&(e=0);var o={top:0,right:0,bottom:0,left:0};return"number"==typeof t?o[A]=o[k]=o[w]=o[S]=t:(o[A]=t[A]||e,o[k]=t[k]||e,o[w]=t[w]||e,o[S]=t[S]||e),o}function F(){}var N={compile:function(t){return t}};F.register=function(t){N=t},F.compile=function(t){return N.compile(t)};var G=F;function W(t){var e;return(t=void 0===t?{}:t).template?t.template=e=G.compile(t.template):E(t.content)&&(e=t.content),e}var X=/\[(?:(\d+)|['"](.*?)['"])\]|((?:(?!\[.*?\]|\.).)+)/g,q={};function Y(t){if(q[t])return q[t];var r=[];return t.replace(X,function(t,e,o,i){r.push(P.drawing.util.defined(e)?e:o||i)}),q[t]=function(t){for(var e=t,o=0;o<r.length&&e;o++)e=e[r[o]];return e},q[t]}function Z(t,e){for(var o=t.length,i=[],r=0;r<o;r++)e(t[r])&&i.push(t[r]);return i}function Q(t,e){if(t.className)for(var o=e.split(" "),i=0;i<o.length;i++)if(-1!==t.className.indexOf(o[i]))return!0}q[void 0]=function(t){return t};function K(){this._map={}}K.prototype.get=function(t){return this._map[this._key(t)]},K.prototype.set=function(t,e){this._map[this._key(t)]=e},K.prototype._key=function(t){return t instanceof Date?t.getTime():t};var $=K;function J(t,e){if(e)return-1!==e.indexOf(t)}function tt(t,e,o){return P.drawing.util.round(t+(e-t)*o,3)}function et(t,e){this.observer=t,this.handlerMap=z({},this.handlerMap,e)}et.prototype.trigger=function(t,e){var o,i=this.observer,r=this.handlerMap;return r[t]?o=this.callObserver(r[t],e):i.trigger&&(o=this.callObserver("trigger",t,e)),o},et.prototype.callObserver=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];return this.observer[t].apply(this.observer,e)},et.prototype.requiresHandlers=function(t){if(this.observer.requiresHandlers)return this.observer.requiresHandlers(t);for(var e=0;e<t.length;e++)if(this.handlerMap[t[e]])return!0};var ot=et;function it(t,e){for(var o=t.length,i=[],r=0;r<o;r++){var n=e(t[r]);P.drawing.util.defined(n)&&i.push(n)}return i}var rt=P.support.browser||{};function nt(t){var e=0;return t.wheelDelta?(e=-t.wheelDelta/120,rt.webkit&&(e/=2*Math.max(window.devicePixelRatio,.625))):t.detail&&(e=t.detail/3),0<e?Math.ceil(e):Math.floor(e)}function st(){}var at=P.drawing.util,ht=at.append,pt=at.bindEvents,lt=at.defined,ct=at.deg,ut=at.elementOffset,dt=at.elementSize,ft=at.eventCoordinates,gt=at.eventElement,yt=at.hashKey,vt=at.last,mt=at.limitValue,xt=at.objectKey,_t=at.rad,bt=at.round,wt=at.unbindEvents,Ct=at.valueOrDefault;st.fetchFonts=function(o,i,r){void 0===r&&(r={depth:0}),!o||5<r.depth||!document.fonts||Object.keys(o).forEach(function(t){var e=o[t];"dataSource"!==t&&"$"!==t[0]&&e&&("font"===t?i.push(e):"object"==typeof e&&(r.depth++,st.fetchFonts(e,i,r),r.depth--))})},st.loadFonts=function(t,e){var o=[];if(0<t.length&&document.fonts){try{o=t.map(function(t){return document.fonts.load(t)})}catch(t){Object(P.logToConsole)(t)}Promise.all(o).then(e,e)}else e()},st.preloadFonts=function(t,e){var o=[];st.fetchFonts(t,o),st.loadFonts(o,e)};var St=st;function kt(t,e){t=t.prototype;t.options?t.options=z({},t.options,e):t.options=e}function At(t){for(var e=l,o=c,i=0,r=t.length;i<r;i++){var n=t[i];null!==n&&isFinite(n)&&(e=Math.min(e,n),o=Math.max(o,n))}return{min:e===l?void 0:e,max:o===c?void 0:o}}function Pt(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(e(i,o,t))return i}}var Tt=P.geometry.Matrix,Mt=/matrix\((.*)\)/;function Ot(t){var e=getComputedStyle(t).transform;return"none"===e?Tt.unit():function(){var t=e.match(Mt);if(null===t||2!==t.length)return Tt.unit();t=t[1].split(",").map(function(t){return parseFloat(t)});return new(Function.prototype.bind.apply(Tt,[null].concat(t)))}()}function Bt(t){if(!t)return Tt.unit();for(var e=Ot(t),o=t.parentElement;o;)var i=Ot(o),e=e.multiplyCopy(i),o=o.parentElement;return e.b=e.c=e.e=e.f=0,e}function Rt(t){return new P.Color(t).isDark()?a:r}function Et(t){this._index={},this._values=t?t.slice(0):[];for(var e=0;e<this._values.length;e++)this._index[this._values[e]]=e}var Lt={},It={size:{configurable:!0}};Et.prototype.values=function(){return this._values.filter(function(t){return t!==Lt})},Et.prototype.has=function(t){return void 0!==this._index[t]},Et.prototype.add=function(t){this.has(t)||(this._index[t]=this._values.length,this._values.push(t))},Et.prototype.delete=function(t){var e=this._index[t];void 0!==e&&(this._values[e]=Lt,delete this._index[t])},Et.prototype.clear=function(){this._index={},this._values=[]},It.size.get=function(){return this._values.length},Object.defineProperties(Et.prototype,It);function zt(t){this._set=new Set(t)}var Vt={size:{configurable:!0}};zt.prototype.values=function(){return Array.from(this._set)},zt.prototype.has=function(t){return this._set.has(t)},zt.prototype.add=function(t){this._set.add(t)},zt.prototype.delete=function(t){this._set.delete(t)},zt.prototype.clear=function(){this._set.clear()},Vt.size.get=function(){return this._set.size},Object.defineProperties(zt.prototype,Vt);function jt(t){return e=!1,new((e="function"==typeof Set?new Set([1]).has(1):e)?zt:Et)(t);var e}function Dt(t){throw t}var Ht={INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110};function Ut(t,e){t=bt(e-t,9);if(0===t){if(0===e)return.1;t=Math.abs(e)}e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))),t=bt(t/e,g);return bt(e*(t<1.904762?.2:t<4.761904?.5:t<9.523809?1:2),g)}var Ft,Nt=((Ft=P.Class)&&(Gt.__proto__=Ft),((Gt.prototype=Object.create(Ft&&Ft.prototype)).constructor=Gt).prototype.clone=function(){return new Gt(this.x,this.y)},Gt.prototype.equals=function(t){return t&&this.x===t.x&&this.y===t.y},Gt.prototype.rotate=function(t,e){var o=_t(e),i=Math.cos(o),r=Math.sin(o),n=t.x,e=t.y,o=this.x,t=this.y;return this.x=bt(n+(o-n)*i+(t-e)*r,3),this.y=bt(e+(t-e)*i-(o-n)*r,3),this},Gt.prototype.multiply=function(t){return this.x*=t,this.y*=t,this},Gt.prototype.distanceTo=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},Gt.onCircle=function(t,e,o){e=_t(e);return new Gt(t.x-o*Math.cos(e),t.y-o*Math.sin(e))},Gt);function Gt(t,e){Ft.call(this),this.x=t||0,this.y=e||0}function Wt(t,e,o,i,r){r=_t(r);return new Nt(o+(t-o)*Math.cos(r)+(e-i)*Math.sin(r),i-(t-o)*Math.sin(r)+(e-i)*Math.cos(r))}var Xt,qt=((Xt=P.Class)&&(Yt.__proto__=Xt),((Yt.prototype=Object.create(Xt&&Xt.prototype)).constructor=Yt).prototype.equals=function(t){return this.x1===t.x1&&this.x2===t.x2&&this.y1===t.y1&&this.y2===t.y2},Yt.prototype.width=function(){return this.x2-this.x1},Yt.prototype.height=function(){return this.y2-this.y1},Yt.prototype.translate=function(t,e){return this.x1+=t,this.x2+=t,this.y1+=e,this.y2+=e,this},Yt.prototype.move=function(t,e){var o=this.height(),i=this.width();return lt(t)&&(this.x1=t,this.x2=this.x1+i),lt(e)&&(this.y1=e,this.y2=this.y1+o),this},Yt.prototype.wrap=function(t){return this.x1=Math.min(this.x1,t.x1),this.y1=Math.min(this.y1,t.y1),this.x2=Math.max(this.x2,t.x2),this.y2=Math.max(this.y2,t.y2),this},Yt.prototype.wrapPoint=function(t){var e=x(t),o=e?t[0]:t.x,t=e?t[1]:t.y;return this.wrap(new Yt(o,t,o,t)),this},Yt.prototype.snapTo=function(t,e){return e!==v&&e||(this.x1=t.x1,this.x2=t.x2),e!==m&&e||(this.y1=t.y1,this.y2=t.y2),this},Yt.prototype.alignTo=function(t,e){var o,i,r=this.height(),n=this.width(),s=e===A||e===w?m:v,a=s==m?r:n;return e===C?(o=t.center(),i=this.center(),this.x1+=o.x-i.x,this.y1+=o.y-i.y):this[s+1]=e===A||e===S?t[s+1]-a:t[s+2],this.x2=this.x1+n,this.y2=this.y1+r,this},Yt.prototype.shrink=function(t,e){return this.x2-=t,this.y2-=e,this},Yt.prototype.expand=function(t,e){return this.shrink(-t,-e),this},Yt.prototype.pad=function(t){t=U(t);return this.x1-=t.left,this.x2+=t.right,this.y1-=t.top,this.y2+=t.bottom,this},Yt.prototype.unpad=function(t){t=U(t);return t.left=-t.left,t.top=-t.top,t.right=-t.right,t.bottom=-t.bottom,this.pad(t)},Yt.prototype.clone=function(){return new Yt(this.x1,this.y1,this.x2,this.y2)},Yt.prototype.center=function(){return new Nt(this.x1+this.width()/2,this.y1+this.height()/2)},Yt.prototype.containsPoint=function(t){return t.x>=this.x1&&t.x<=this.x2&&t.y>=this.y1&&t.y<=this.y2},Yt.prototype.points=function(){return[new Nt(this.x1,this.y1),new Nt(this.x2,this.y1),new Nt(this.x2,this.y2),new Nt(this.x1,this.y2)]},Yt.prototype.getHash=function(){return[this.x1,this.y1,this.x2,this.y2].join(",")},Yt.prototype.overlaps=function(t){return!(t.y2<this.y1||this.y2<t.y1||t.x2<this.x1||this.x2<t.x1)},Yt.prototype.rotate=function(t){var e=this.width(),o=this.height(),i=this.center(),r=i.x,n=i.y,s=Wt(0,0,r,n,t),a=Wt(e,0,r,n,t),i=Wt(e,o,r,n,t),t=Wt(0,o,r,n,t),e=Math.max(s.x,a.x,i.x,t.x)-Math.min(s.x,a.x,i.x,t.x),o=Math.max(s.y,a.y,i.y,t.y)-Math.min(s.y,a.y,i.y,t.y);return this.x2=this.x1+e,this.y2=this.y1+o,this},Yt.prototype.toRect=function(){return new P.geometry.Rect([this.x1,this.y1],[this.width(),this.height()])},Yt.prototype.hasSize=function(){return 0!==this.width()&&0!==this.height()},Yt.prototype.align=function(t,e,o){var i=e+1,r=e+2,n=e===v?"width":"height",e=this[n]();J(o,[S,A])?(this[i]=t[i],this[r]=this[i]+e):J(o,[k,w])?(this[r]=t[r],this[i]=this[r]-e):o===C&&(this[i]=t[i]+(t[n]()-e)/2,this[r]=this[i]+e)},Yt);function Yt(t,e,o,i){Xt.call(this),this.x1=t||0,this.y1=e||0,this.x2=o||0,this.y2=i||0}function Zt(t,e){return t-e}var Qt,Kt,$t,Jt=(($t=P.Class)&&(re.__proto__=$t),((re.prototype=Object.create($t&&$t.prototype)).constructor=re).prototype.clone=function(){return new re(this.center,this.innerRadius,this.radius,this.startAngle,this.angle)},re.prototype.middle=function(){return this.startAngle+this.angle/2},re.prototype.setRadius=function(t,e){return e?this.innerRadius=t:this.radius=t,this},re.prototype.point=function(t,e){var o=_t(t),t=Math.cos(o),o=Math.sin(o),e=e?this.innerRadius:this.radius,t=bt(this.center.x-t*e,3),e=bt(this.center.y-o*e,3);return new Nt(t,e)},re.prototype.adjacentBox=function(t,e,o){var i=this.clone().expand(t),r=i.middle(),n=i.point(r),s=e/2,a=o/2,t=Math.sin(_t(r)),i=Math.cos(_t(r)),r=n.x-s,n=n.y-a;return Math.abs(t)<.9&&(r+=s*-i/Math.abs(i)),Math.abs(i)<.9&&(n+=a*-t/Math.abs(t)),new qt(r,n,r+e,n+o)},re.prototype.containsPoint=function(t){var e=this.center,o=this.innerRadius,i=this.radius,r=this.startAngle,n=this.startAngle+this.angle,s=t.x-e.x,a=t.y-e.y,t=new Nt(s,a),r=this.point(r),r=new Nt(r.x-e.x,r.y-e.y),n=this.point(n),e=new Nt(n.x-e.x,n.y-e.y),a=bt(s*s+a*a,3);return(r.equals(t)||M(r,t))&&!M(e,t)&&o*o<=a&&a<=i*i},re.prototype.getBBox=function(){for(var t=new qt(l,l,c,c),e=bt(this.startAngle%360),o=bt((e+this.angle)%360),i=this.innerRadius,r=[0,90,180,270,e,o].sort(Zt),n=r.indexOf(e),s=r.indexOf(o),a=e===o?r:n<s?r.slice(n,s+1):[].concat(r.slice(0,s+1),r.slice(n,r.length)),h=0;h<a.length;h++){var p=this.point(a[h]);t.wrapPoint(p),t.wrapPoint(p,i)}return i||t.wrapPoint(this.center),t},re.prototype.expand=function(t){return this.radius+=t,this},re),te=((Kt=Jt)&&(ie.__proto__=Kt),((ie.prototype=Object.create(Kt&&Kt.prototype)).constructor=ie).prototype.expand=function(t){return Kt.prototype.expand.call(this,t)},ie.prototype.clone=function(){return new ie(this.center,this.radius,this.startAngle,this.angle)},ie.prototype.setRadius=function(t){return this.radius=t,this},ie),ee=((Qt=P.Class)&&(oe.__proto__=Qt),((oe.prototype=Object.create(Qt&&Qt.prototype)).constructor=oe).prototype.createRing=function(t,e){var o=t.startAngle+180,i=t.angle+o;0<t.angle&&o===i&&(i+=.001);var r=new P.geometry.Point(t.center.x,t.center.y),n=Math.max(t.radius,0),t=Math.max(t.innerRadius,0),n=new P.geometry.Arc(r,{startAngle:o,endAngle:i,radiusX:n,radiusY:n}),e=P.drawing.Path.fromArc(n,e).close();return t?(n.radiusX=n.radiusY=t,n=n.pointAt(i),e.lineTo(n.x,n.y),e.arc(i,o,t,t,!0)):e.lineTo(r.x,r.y),e},oe);function oe(){Qt.apply(this,arguments)}function ie(t,e,o,i){Kt.call(this,t,0,e,o,i)}function re(t,e,o,i,r){$t.call(this),this.center=t,this.innerRadius=e,this.radius=o,this.startAngle=i,this.angle=r}ee.current=new ee;var ne,se=ee,ae=((ne=P.Class)&&(he.__proto__=ne),((he.prototype=Object.create(ne&&ne.prototype)).constructor=he).prototype.initUserOptions=function(t){return t},he.prototype.reflow=function(t){for(var e,o=this.children,i=0;i<o.length;i++){var r=o[i];r.reflow(t),e=e?e.wrap(r.box):r.box.clone()}this.box=e||t},he.prototype.destroy=function(){var t=this.children;this.animation&&this.animation.destroy();for(var e=0;e<t.length;e++)t[e].destroy()},he.prototype.getRoot=function(){var t=this.parent;return t?t.getRoot():null},he.prototype.getSender=function(){var t=this.getService();if(t)return t.sender},he.prototype.getService=function(){for(var t=this;t;){if(t.chartService)return t.chartService;t=t.parent}},he.prototype.translateChildren=function(t,e){for(var o=this.children,i=o.length,r=0;r<i;r++)o[r].box.translate(t,e)},he.prototype.append=function(){for(var t=arguments,e=0;e<arguments.length;e++){var o=t[e];this.children.push(o),o.parent=this}},he.prototype.renderVisual=function(){!1!==this.options.visible&&(this.createVisual(),this.addVisual(),this.renderChildren(),this.createAnimation(),this.renderComplete())},he.prototype.addVisual=function(){this.visual&&((this.visual.chartElement=this).parent&&this.parent.appendVisual(this.visual))},he.prototype.renderChildren=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)t[o].renderVisual()},he.prototype.createVisual=function(){this.visual=new P.drawing.Group({zIndex:this.options.zIndex,visible:Ct(this.options.visible,!0)})},he.prototype.createAnimation=function(){this.visual&&this.options.animation&&(this.animation=P.drawing.Animation.create(this.visual,this.options.animation))},he.prototype.appendVisual=function(t){t.chartElement||(t.chartElement=this),t.options.noclip?this.clipRoot().visual.append(t):lt(t.options.zIndex)?this.stackRoot().stackVisual(t):this.isStackRoot?this.stackVisual(t):this.visual?this.visual.append(t):this.parent.appendVisual(t)},he.prototype.clipRoot=function(){return this.parent?this.parent.clipRoot():this},he.prototype.stackRoot=function(){return this.parent?this.parent.stackRoot():this},he.prototype.stackVisual=function(t){for(var e=t.options.zIndex||0,o=this.visual.children,i=o.length,r=0;r<i;r++){var n=o[r];if(Ct(n.options.zIndex,0)>e)break}this.visual.insert(r,t)},he.prototype.traverse=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++){var r=e[i];t(r),r.traverse&&r.traverse(t)}},he.prototype.closest=function(t){for(var e=this,o=!1;e&&!o;)(o=t(e))||(e=e.parent);if(o)return e},he.prototype.renderComplete=function(){},he.prototype.hasHighlight=function(){var t=(this.options||{}).highlight;return!(!this.createHighlight||t&&!1===t.visible)},he.prototype.toggleHighlight=function(t,e){var o=this,i=(this.options||{}).highlight||{},r=i.visual,n=this._highlight;if(!n){var s={fill:{color:a,opacity:e||.2},stroke:{color:a,width:1,opacity:e||.2}};if(r){if(!(n=this._highlight=r(Object.assign(this.highlightVisualArgs(),{createVisual:function(){return o.createHighlight(s)},sender:this.getSender(),series:this.series,dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,runningTotal:this.runningTotal,total:this.total}))))return}else n=this._highlight=this.createHighlight(s);lt(n.options.zIndex)||(n.options.zIndex=Ct(i.zIndex,this.options.zIndex)),this.appendVisual(n)}n.visible(t)},he.prototype.createGradientOverlay=function(t,e,o){e=new P.drawing.Path(Object.assign({stroke:{color:"none"},fill:this.createGradient(o),closed:t.options.closed},e));return e.segments.elements(t.segments.elements()),e},he.prototype.createGradient=function(t){if(this.parent)return this.parent.createGradient(t)},he.prototype.supportsPointInactiveOpacity=function(){return!0},he);function he(t){ne.call(this),this.children=[],this.options=z({},this.options,this.initUserOptions(t))}ae.prototype.options={};var pe,le=ae,ce=((pe=le)&&(ue.__proto__=pe),((ue.prototype=Object.create(pe&&pe.prototype)).constructor=ue).prototype.reflow=function(t){function e(){i.align(t,v,r.align),i.align(t,m,r.vAlign),i.paddingBox=o.clone().unpad(p).unpad(c)}var o,i=this,r=this.options,n=r.width,s=r.height,a=r.shrinkToFit,h=n&&s,p=r.margin,l=r.padding,c=r.border.width,u=t.clone();h&&(u.x2=u.x1+n,u.y2=u.y1+s),a&&u.unpad(p).unpad(c).unpad(l),pe.prototype.reflow.call(this,u),o=h?this.box=new qt(0,0,n,s):this.box,a&&h?(e(),u=this.contentBox=this.paddingBox.clone().unpad(l)):(u=this.contentBox=o.clone(),o.pad(l).pad(c).pad(p),e()),this.translateChildren(o.x1-u.x1+p.left+c+l.left,o.y1-u.y1+p.top+c+l.top);for(var d=this.children,f=0;f<d.length;f++){var g=d[f];g.reflow(g.box)}},ue.prototype.align=function(t,e,o){this.box.align(t,e,o)},ue.prototype.hasBox=function(){var t=this.options;return t.border.width||t.background},ue.prototype.createVisual=function(){pe.prototype.createVisual.call(this),this.options.visible&&this.hasBox()&&this.visual.append(P.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()))},ue.prototype.visualStyle=function(){var t=this.options,e=t.border||{};return{stroke:{width:e.width,color:e.color,opacity:Ct(e.opacity,t.opacity),dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},cursor:t.cursor}},ue);function ue(t){pe.call(this,t),this.options.margin=U(this.options.margin),this.options.padding=U(this.options.padding)}kt(ce,{align:S,vAlign:A,margin:{},padding:{},border:{color:r,width:0},background:"",shrinkToFit:!1,width:0,height:0,visible:!0});var de,fe=ce,ge=((de=fe)&&(ye.__proto__=de),((ye.prototype=Object.create(de&&de.prototype)).constructor=ye).prototype.getElement=function(){var t=this.options,e=this.paddingBox,o=t.type,i=t.rotation,r=e.center(),n=e.width()/2,s=e.height()/2;if(!t.visible||!this.hasBox())return null;var a,h=this.visualStyle();return o===u?a=new P.drawing.Circle(new P.geometry.Circle([bt(e.x1+n,3),bt(e.y1+s,3)],Math.min(n,s)),h):"triangle"===o?a=P.drawing.Path.fromPoints([[e.x1+n,e.y1],[e.x1,e.y2],[e.x2,e.y2]],h).close():"cross"===o?((a=new P.drawing.MultiPath(h)).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),a.moveTo(e.x1,e.y2).lineTo(e.x2,e.y1)):(e=e.toRect(),"roundedRect"===o&&(o=Ct(t.borderRadius,e.width()/5),e.setCornerRadius(o)),a=P.drawing.Path.fromRect(e,h)),i&&a.transform(P.geometry.transform().rotate(-i,[r.x,r.y])),a.options.zIndex=t.zIndex,a},ye.prototype.createElement=function(){var t=this,e=this.options.visual,o=this.pointData||{};return e?e({value:o.value,dataItem:o.dataItem,sender:this.getSender(),series:o.series,category:o.category,rect:this.paddingBox.toRect(),options:this.visualOptions(),createVisual:function(){return t.getElement()}}):this.getElement()},ye.prototype.visualOptions=function(){var t=this.options;return{background:t.background,border:t.border,margin:t.margin,padding:t.padding,type:t.type,size:t.width,visible:t.visible}},ye.prototype.createVisual=function(){this.visual=this.createElement()},ye);function ye(t,e){de.call(this,t),this.pointData=e}kt(ge,{type:u,align:C,vAlign:C});var ve=ge,me={glass:{type:"linear",rotation:0,stops:[{offset:0,color:a,opacity:0},{offset:.25,color:a,opacity:.3},{offset:1,color:a,opacity:0}]},sharpBevel:{type:"radial",stops:[{offset:0,color:a,opacity:.55},{offset:.65,color:a,opacity:0},{offset:.95,color:a,opacity:.25}]},roundedBevel:{type:"radial",stops:[{offset:.33,color:a,opacity:.06},{offset:.83,color:a,opacity:.2},{offset:.95,color:a,opacity:0}]},roundedGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:0},{offset:.5,color:a,opacity:.3},{offset:.99,color:a,opacity:0}]},sharpGlass:{type:"radial",supportVML:!1,stops:[{offset:0,color:a,opacity:.2},{offset:.15,color:a,opacity:.15},{offset:.17,color:a,opacity:.35},{offset:.85,color:a,opacity:.05},{offset:.87,color:a,opacity:.15},{offset:.99,color:a,opacity:0}]},bubbleShadow:{type:"radial",center:[.5,.5],radius:.5}};var xe,_e=((xe=le)&&(be.__proto__=xe),((be.prototype=Object.create(xe&&xe.prototype)).constructor=be).prototype.reflow=function(){var t=this.options,e=this.children,o=new qt(0,0,t.width,t.height);this.box=o.unpad(t.margin);for(var i=0;i<e.length;i++)e[i].reflow(o),o=function(t,e){if(t.x1===e.x1&&t.y1===e.y1&&t.x2===e.x2&&t.y2===e.y2)return e;var o=Math.min(t.x1,e.x1),i=Math.max(t.x1,e.x1),r=Math.min(t.x2,e.x2),n=Math.max(t.x2,e.x2),s=Math.min(t.y1,e.y1),a=Math.max(t.y1,e.y1),h=Math.min(t.y2,e.y2),p=Math.max(t.y2,e.y2),l=[];return l[0]=new qt(i,s,r,a),l[1]=new qt(o,a,i,h),l[2]=new qt(r,a,n,h),l[3]=new qt(i,h,r,p),t.x1===o&&t.y1===s||e.x1===o&&e.y1===s?(l[4]=new qt(o,s,i,a),l[5]=new qt(r,h,n,p)):(l[4]=new qt(r,s,n,a),l[5]=new qt(o,h,i,p)),Z(l,function(t){return 0<t.height()&&0<t.width()})[0]}(o,e[i].box)||new qt},be.prototype.createVisual=function(){this.visual=new P.drawing.Group,this.createBackground()},be.prototype.createBackground=function(){var t=this.options,e=t.border||{},o=this.box.clone().pad(t.margin).unpad(e.width),t=P.drawing.Path.fromRect(o.toRect(),{stroke:{color:e.width?e.color:"",width:e.width,dashType:e.dashType},fill:{color:t.background,opacity:t.opacity},zIndex:-10});this.visual.append(t)},be.prototype.getRoot=function(){return this},be.prototype.createGradient=function(t){var e,s,o=this.gradients,i=xt(t),r=me[t.gradient];return o[i]?e=o[i]:(s=Object.assign({},r,t),"linear"===r.type?e=new P.drawing.LinearGradient(s):(t.innerRadius&&(s.stops=function(){for(var t=s.stops,e=s.innerRadius/s.radius*100,o=t.length,i=[],r=0;r<o;r++){var n=Object.assign({},t[r]);n.offset=(n.offset*(100-e)+e)/100,i.push(n)}return i}()),(e=new P.drawing.RadialGradient(s)).supportVML=!1!==r.supportVML),o[i]=e),e},be.prototype.cleanGradients=function(){var t,e=this.gradients;for(t in e)e[t]._observers=[]},be.prototype.size=function(){var t=this.options;return new qt(0,0,t.width,t.height)},be);function be(t){xe.call(this,t);t=this.options;t.width=parseInt(t.width,10),t.height=parseInt(t.height,10),this.gradients={}}kt(_e,{width:600,height:400,background:a,border:{color:r,width:0},margin:U(5),zIndex:-2});var we,Ce=_e,Se=((we=le)&&(ke.__proto__=we),((ke.prototype=Object.create(we&&we.prototype)).constructor=ke).prototype._initDirection=function(){var t=this.options;t.vertical?(this.groupAxis=v,this.elementAxis=m,this.groupSizeField="width",this.elementSizeField="height",this.groupSpacing=t.spacing,this.elementSpacing=t.vSpacing):(this.groupAxis=m,this.elementAxis=v,this.groupSizeField="height",this.elementSizeField="width",this.groupSpacing=t.vSpacing,this.elementSpacing=t.spacing)},ke.prototype.reflow=function(t){this.box=t.clone(),this.reflowChildren()},ke.prototype.reflowChildren=function(){var t=this.box,e=this.elementAxis,o=this.groupAxis,i=this.elementSizeField,r=this.groupSizeField,n=this.groupOptions(),s=n.groups,a=n.groupsSize,h=n.maxGroupElementsSize,p=s.length,n=t[o+1]+this.alignStart(a,t[r]());if(p){for(var l=n,c=0;c<p;c++){for(var u=s[c],d=u.groupElements,f=t[e+1],g=d.length,y=0;y<g;y++){var v=d[y],m=this.elementSize(v),x=l+this.alignStart(m[r],u.groupSize),_=new qt;_[o+1]=x,_[o+2]=x+m[r],_[e+1]=f,_[e+2]=f+m[i],v.reflow(_),f+=m[i]+this.elementSpacing}l+=u.groupSize+this.groupSpacing}t[o+1]=n,t[o+2]=n+a,t[e+2]=t[e+1]+h}},ke.prototype.alignStart=function(t,e){var o=0,i=this.options.align;return i===k||i===w?o=e-t:i===C&&(o=(e-t)/2),o},ke.prototype.groupOptions=function(){for(var t=this.box,e=this.children,o=this.elementSizeField,i=this.groupSizeField,r=this.elementSpacing,n=this.groupSpacing,s=bt(t[o]()),a=e.length,h=[],p=0,l=0,c=0,u=0,d=[],f=0;f<a;f++){var g=e[f];g.box||g.reflow(t);var y=this.elementSize(g);this.options.wrap&&bt(l+r+y[o])>s&&(h.push({groupElements:d,groupSize:p,groupElementsSize:l}),u=Math.max(u,l),c+=n+p,l=p=0,d=[]),p=Math.max(p,y[i]),0<l&&(l+=r),l+=y[o],d.push(g)}return h.push({groupElements:d,groupSize:p,groupElementsSize:l}),{groups:h,groupsSize:c+=p,maxGroupElementsSize:u=Math.max(u,l)}},ke.prototype.elementSize=function(t){return{width:t.box.width(),height:t.box.height()}},ke.prototype.createVisual=function(){},ke);function ke(t){we.call(this,t),this._initDirection()}kt(Se,{vertical:!0,wrap:!0,vSpacing:0,spacing:0});var Ae,Pe=Se,Te=P.drawing.Text,Me=((Ae=le)&&(Oe.__proto__=Ae),((Oe.prototype=Object.create(Ae&&Ae.prototype)).constructor=Oe).prototype.reflow=function(t){var e=this.options,e=e.size=P.drawing.util.measureText(this.content,{font:e.font});this.baseline=e.baseline,this.box=new qt(t.x1,t.y1,t.x1+e.width,t.y1+e.height)},Oe.prototype.createVisual=function(){var t=this.options,e=t.font,o=t.color,i=t.opacity,t=t.cursor;this.visual=new Te(this.content,this.box.toRect().topLeft(),{font:e,fill:{color:o,opacity:i},cursor:t})},Oe);function Oe(t,e){Ae.call(this,e),this.content=t,this.reflow(new qt)}kt(Me,{font:"12px sans-serif",color:r});var Be=Me;function Re(t){var e=t.origin,t=t.bottomRight();return new qt(e.x,e.y,t.x,t.y)}var Ee,Le,Ie=/\n/m,ze=((Le=fe)&&(De.__proto__=Le),((De.prototype=Object.create(Le&&Le.prototype)).constructor=De).prototype._initContainer=function(){var t=this.options,e=String(this.content).split(Ie),o=new Pe({vertical:!0,align:t.align,wrap:!1}),i=z({},t,{opacity:1,animation:null});this.container=o,this.append(o);for(var r=0;r<e.length;r++){var n=new Be(e[r].trim(),i);o.append(n)}},De.prototype.reflow=function(t){var e,o=this.options,i=o.visual;this.container.options.align=o.align,i&&!this._boxReflow?((e=t).hasSize()||(this._boxReflow=!0,this.reflow(e),this._boxReflow=!1,e=this.box),(i=this.visual=i(this.visualContext(e)))&&(e=Re(i.clippedBBox()||new P.geometry.Rect),i.options.zIndex=o.zIndex),this.box=this.contentBox=this.paddingBox=e):(Le.prototype.reflow.call(this,t),o.rotation&&(e=U(o.margin),o=this.box.unpad(e),this.targetBox=t,this.normalBox=o.clone(),(o=this.rotate()).translate(e.left-e.right,e.top-e.bottom),this.rotatedBox=o.clone(),o.pad(e)))},De.prototype.createVisual=function(){var t=this.options;this.visual=new P.drawing.Group({transform:this.rotationTransform(),zIndex:t.zIndex,noclip:t.noclip}),this.hasBox()&&(t=P.drawing.Path.fromRect(this.paddingBox.toRect(),this.visualStyle()),this.visual.append(t))},De.prototype.renderVisual=function(){var t;this.options.visible&&(this.options.visual?((t=this.visual)&&!lt(t.options.noclip)&&(t.options.noclip=this.options.noclip),this.addVisual(),this.createAnimation()):Le.prototype.renderVisual.call(this))},De.prototype.visualContext=function(t){var e=this,o={text:this.content,rect:t.toRect(),sender:this.getSender(),options:this.options,createVisual:function(){return e._boxReflow=!0,e.reflow(t),e._boxReflow=!1,e.getDefaultVisual()}};return this.data&&Object.assign(o,this.data),o},De.prototype.getDefaultVisual=function(){this.createVisual(),this.renderChildren();var t=this.visual;return delete this.visual,t},De.prototype.rotate=function(){var t=this.options;return this.box.rotate(t.rotation),this.align(this.targetBox,v,t.align),this.align(this.targetBox,m,t.vAlign),this.box},De.prototype.rotationTransform=function(){var t=this.options.rotation;if(!t)return null;var e=this.normalBox.center(),o=e.x,i=e.y,e=this.rotatedBox.center();return P.geometry.transform().translate(e.x-o,e.y-i).rotate(t,[o,i])},De),Ve=((Ee=le)&&(je.__proto__=Ee),((je.prototype=Object.create(Ee&&Ee.prototype)).constructor=je).prototype.reflow=function(t){Ee.prototype.reflow.call(this,t),this.box.snapTo(t,v)},je.buildTitle=function(t,e,o){var i,t="string"==typeof t?{text:t}:t;return(t=Object.assign({visible:!0},o,t))&&t.visible&&t.text&&(i=new je(t),e.append(i)),i},je);function je(t){Ee.call(this,t),this.append(new ze(this.options.text,Object.assign({},this.options,{vAlign:this.options.position})))}function De(t,e,o){Le.call(this,e),this.content=t,this.data=o,this._initContainer(),!1!==this.options._autoReflow&&this.reflow(new qt)}kt(Ve,{color:r,position:A,align:C,margin:U(5),padding:U(5)});var He,Ue=Ve,Fe=((He=ze)&&(Ne.__proto__=He),((Ne.prototype=Object.create(He&&He.prototype)).constructor=Ne).prototype.visualContext=function(t){t=He.prototype.visualContext.call(this,t);return t.value=this.value,t.dataItem=this.dataItem,t.format=this.options.format,t.culture=this.options.culture,t},Ne.prototype.click=function(t,e){t.trigger("axisLabelClick",{element:gt(e),value:this.value,text:this.text,index:this.index,dataItem:this.dataItem,axis:this.parent.options})},Ne.prototype.rotate=function(){var t,e;return this.options.alignRotation!==C?(t=this.normalBox.toRect(),e=this.rotationTransform(),this.box=Re(t.bbox(e.matrix()))):He.prototype.rotate.call(this),this.box},Ne.prototype.rotationTransform=function(){var t=this.options,e=t.rotation;if(!e)return null;if(t.alignRotation===C)return He.prototype.rotationTransform.call(this);var o=P.geometry.transform().rotate(e).matrix(),i=this.normalBox.toRect(),r=this.targetBox.toRect(),n=t.rotationOrigin||A,s=n===A||n===w?v:m,a=n===A||n===w?m:v,h=n===A||n===S?r.origin:r.bottomRight(),p=i.topLeft().transformCopy(o),l=i.topRight().transformCopy(o),t=i.bottomRight().transformCopy(o),n=i.bottomLeft().transformCopy(o),i=P.geometry.Rect.fromPoints(p,l,t,n),o={};o[a]=r.origin[a]-i.origin[a];var i=Math.abs(p[a]+o[a]-h[a]),a=Math.abs(l[a]+o[a]-h[a]),n=bt(i,g)===bt(a,g)?(c=p,l):a<i?(c=l,t):(c=p,n),c=c[s]+(n[s]-c[s])/2;return o[s]=r.center()[s]-c,P.geometry.transform().translate(o.x,o.y).rotate(e)},Ne);function Ne(t,e,o,i,r){He.call(this,e,r),this.text=e,this.value=t,this.index=o,this.dataItem=i,this.reflow(new qt)}kt(Fe,{_autoReflow:!1});var Ge,We=Fe,Xe=((Ge=fe)&&(qe.__proto__=Ge),((qe.prototype=Object.create(Ge&&Ge.prototype)).constructor=qe).prototype.hide=function(){this.options.visible=!1},qe.prototype.show=function(){this.options.visible=!0},qe.prototype.render=function(){var t,e,o,i,r,n,s,a,h=this,p=this.options;p.visible&&(o=p.label,a=p.icon,i=new qt,r=function(){return h},n=a.size,s=this.fields.text,lt(o)&&o.visible&&((p=W(o))?s=p(this.fields):o.format&&(s=this.chartService.format.auto(o.format,s)),o.color||(o.color="inside"===o.position?"#fff":a.background),this.label=new ze(s,z({},o)),this.label.aliasFor=r,"inside"!==o.position||lt(n)||(a.type===u?n=Math.max(this.label.box.width(),this.label.box.height()):(t=this.label.box.width(),e=this.label.box.height()),i.wrap(this.label.box))),a.width=t||n||7,a.height=e||n||7,(a=new ve(z({},a))).aliasFor=r,this.marker=a,this.append(a),this.label&&this.append(this.label),a.reflow(new qt),this.wrapperBox=i.wrap(a.box))},qe.prototype.reflow=function(t){var e,o,i,r=this.options,n=this.label,s=this.marker,a=this.wrapperBox,h=t.center(),p=r.line.length,l=r.position;r.visible&&(J(l,[S,k])?l===S?(i=a.alignTo(t,l).translate(-p,t.center().y-a.center().y),r.line.visible&&(e=[t.x1,h.y],this.linePoints=[e,[i.x2,h.y]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(p,t.center().y-a.center().y),r.line.visible&&(e=[t.x2,h.y],this.linePoints=[e,[i.x1,h.y]],o=i.clone().wrapPoint(e))):l===w?(i=a.alignTo(t,l).translate(t.center().x-a.center().x,p),r.line.visible&&(e=[h.x,t.y2],this.linePoints=[e,[h.x,i.y1]],o=i.clone().wrapPoint(e))):(i=a.alignTo(t,l).translate(t.center().x-a.center().x,-p),r.line.visible&&(e=[h.x,t.y1],this.linePoints=[e,[h.x,i.y2]],o=i.clone().wrapPoint(e))),s&&s.reflow(i),n&&(n.reflow(i),s&&("outside"===r.label.position&&n.box.alignTo(s.box,l),n.reflow(n.box))),this.contentBox=i,this.targetBox=t,this.box=o||i)},qe.prototype.createVisual=function(){Ge.prototype.createVisual.call(this),this.visual.options.noclip=this.options.noclip,this.options.visible&&this.createLine()},qe.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;t.visible&&o?(this.visual=o(Object.assign(this.fields,{sender:this.getSender(),rect:this.targetBox.toRect(),options:{background:t.background,border:t.background,icon:t.icon,label:t.label,line:t.line,position:t.position,visible:t.visible},createVisual:function(){e.createVisual(),e.renderChildren();var t=e.visual;return delete e.visual,t}})),this.addVisual()):Ge.prototype.renderVisual.call(this)},qe.prototype.createLine=function(){var t=this.options.line;this.linePoints&&(T(t=P.drawing.Path.fromPoints(this.linePoints,{stroke:{color:t.color,width:t.width,dashType:t.dashType}})),this.visual.append(t))},qe.prototype.click=function(t,e){var o=this.eventArgs(e);t.trigger("noteClick",o)||e.preventDefault()},qe.prototype.over=function(t,e){var o=this.eventArgs(e);t.trigger("noteHover",o)||e.preventDefault()},qe.prototype.out=function(t,e){e=this.eventArgs(e);t.trigger("noteLeave",e)},qe.prototype.eventArgs=function(t){var e=this.options;return Object.assign(this.fields,{element:gt(t),text:lt(e.label)?e.label.text:"",visual:this.visual})},qe);function qe(t,e,o){Ge.call(this,e),this.fields=t,this.chartService=o,this.render()}kt(Xe,{icon:{visible:!0,type:u},label:{position:"inside",visible:!0,align:C,vAlign:C},line:{visible:!0},visible:!0,position:A,zIndex:2});function Ye(){}var Ze=Xe,Qe={format:function(t,e){return e},toString:function(t){return t},parseDate:function(t){return new Date(t)},firstDay:function(){return 0}},Ke={implementation:{configurable:!0}};Ye.register=function(t){Qe=t},Ke.implementation.get=function(){return Qe},Object.defineProperties(Ye,Ke);function $e(t){this._intlService=t}var Je=Ye,to=/\{(\d+)(:[^\}]+)?\}/g,eo={intl:{configurable:!0}};eo.intl.get=function(){return this._intlService||Je.implementation},eo.intl.set=function(t){this._intlService=t},$e.prototype.auto=function(t){for(var e=[],o=arguments.length-1;0<o--;)e[o]=arguments[o+1];var i=this.intl;return B(t)&&t.match(s)?i.format.apply(i,[t].concat(e)):i.toString(e[0],t)},$e.prototype.localeAuto=function(t,i,r){var n=this.intl;return B(t)&&t.match(s)?t.replace(to,function(t,e,o){e=i[parseInt(e,10)];return n.toString(e,o?o.substring(1):"",r)}):n.toString(i[0],t,r)},Object.defineProperties($e.prototype,eo);function oo(t,e){this._intlService=(e=void 0===e?{}:e).intlService,this.sender=e.sender||t,this.format=new io(e.intlService),this.chart=t,this.rtl=Boolean(e.rtl)}var io=$e,ro={intl:{configurable:!0}};ro.intl.get=function(){return this._intlService||Je.implementation},ro.intl.set=function(t){this._intlService=t,this.format.intl=t},oo.prototype.notify=function(t,e){this.chart&&this.chart.trigger(t,e)},oo.prototype.isPannable=function(t){var e=((this.chart||{}).options||{}).pannable;return e&&e.lock!==t},Object.defineProperties(oo.prototype,ro);function no(){}var so,ao=oo;no.register=function(t){so=t},no.create=function(t,e){if(so)return so.create(t,e)};var ho=no;function po(t,e){var o=t.tickX,i=t.tickY,r=t.position,n=new P.drawing.Path({stroke:{width:e.width,color:e.color}});return t.vertical?n.moveTo(o,r).lineTo(o+e.size,r):n.moveTo(r,i).lineTo(r,i+e.size),T(n),n}function lo(t,e){var o=t.lineStart,i=t.lineEnd,r=t.position,e=new P.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}});return t.vertical?e.moveTo(o,r).lineTo(i,r):e.moveTo(r,o).lineTo(r,i),T(e),e}var co,uo=((co=le)&&(fo.__proto__=co),((fo.prototype=Object.create(co&&co.prototype)).constructor=fo).prototype.initFields=function(){},fo.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.labelsCount()}},fo.prototype.normalizeLabelRotation=function(t){var e=t.rotation;V(e)&&(t.alignRotation=e.align,t.rotation=e.angle)},fo.prototype.createLabels=function(){var t=this.options,e=t.vertical?k:C,o=z({},t.labels,{align:e,zIndex:t.zIndex}),i=Math.max(1,o.step);if(this.clearLabels(),o.visible){this.normalizeLabelRotation(o),"auto"===o.rotation&&(o.rotation=0,t.autoRotateLabels=!0);for(var r=this.labelsRange(),n=r.min;n<r.max;n+=i){var s={index:n,count:r.max},s=this.createAxisLabel(n,o,s);s&&(this.append(s),this.labels.push(s))}}},fo.prototype.clearLabels=function(){this.children=Z(this.children,function(t){return!(t instanceof We)}),this.labels=[]},fo.prototype.clearTitle=function(){var e=this;this.title&&(this.children=Z(this.children,function(t){return t!==e.title}),this.title=void 0)},fo.prototype.clear=function(){this.clearLabels(),this.clearTitle()},fo.prototype.lineBox=function(){var t=this.options,e=this.box,o=t.vertical,i=t.labels.mirror,r=i?e.x1:e.x2,i=i?e.y2:e.y1,t=t.line.width||0;return o?new qt(r,e.y1,r,e.y2-t):new qt(e.x1,i,e.x2-t,i)},fo.prototype.createTitle=function(){var t=this.options,t=z({rotation:t.vertical?-90:0,text:"",zIndex:1,visualSize:!0},t.title);t.visible&&t.text&&(t=new ze(t.text,t),this.append(t),this.title=t)},fo.prototype.createNotes=function(){var t=this.options,e=t.notes,o=e.data||[];this.notes=[];for(var i=0;i<o.length;i++){var r=z({},e,o[i]);r.value=this.parseNoteValue(r.value);r=new Ze({value:r.value,text:r.label.text,dataItem:r},r,this.chartService);r.options.visible&&(lt(r.options.position)?t.vertical&&!J(r.options.position,[S,k])?r.options.position=t.reverse?S:k:t.vertical||J(r.options.position,[A,w])||(r.options.position=t.reverse?w:A):t.vertical?r.options.position=t.reverse?S:k:r.options.position=t.reverse?w:A,this.append(r),this.notes.push(r))}},fo.prototype.parseNoteValue=function(t){return t},fo.prototype.renderVisual=function(){co.prototype.renderVisual.call(this),this.createPlotBands()},fo.prototype.createVisual=function(){co.prototype.createVisual.call(this),this.createBackground(),this.createLine()},fo.prototype.gridLinesVisual=function(){var t=this._gridLines;return t||(t=this._gridLines=new P.drawing.Group({zIndex:-2}),this.appendVisual(this._gridLines)),t},fo.prototype.createTicks=function(s){var t=this.options,a=this.lineBox(),h=t.labels.mirror,e=t.majorTicks.visible?t.majorUnit:0,p={vertical:t.vertical};function o(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r)lt(o)&&n%o==0||(p.tickX=h?a.x2:a.x2-e.size,p.tickY=h?a.y1-e.size:a.y1,p.position=t[n],s.append(po(p,e)))}o(this.getMajorTickPositions(),t.majorTicks),o(this.getMinorTickPositions(),t.minorTicks,e/t.minorUnit)},fo.prototype.createLine=function(){var t=this.options,e=t.line,o=this.lineBox();0<e.width&&e.visible&&((e=new P.drawing.Path({stroke:{width:e.width,color:e.color,dashType:e.dashType}})).moveTo(o.x1,o.y1).lineTo(o.x2,o.y2),t._alignLines&&T(e),(t=this._lineGroup=new P.drawing.Group).append(e),this.visual.append(t),this.createTicks(t))},fo.prototype.getActualTickSize=function(){var t=this.options,e=0;return t.majorTicks.visible&&t.minorTicks.visible?e=Math.max(t.majorTicks.size,t.minorTicks.size):t.majorTicks.visible?e=t.majorTicks.size:t.minorTicks.visible&&(e=t.minorTicks.size),e},fo.prototype.createBackground=function(){var t=this.options,e=this.box,t=t.background;t&&(this._backgroundPath=P.drawing.Path.fromRect(e.toRect(),{fill:{color:t},stroke:null}),this.visual.append(this._backgroundPath))},fo.prototype.createPlotBands=function(){var e=this,t=this.options,o=t.plotBands||[],i=t.vertical,r=this.plotArea;if(0!==o.length){for(var n=this._plotbandGroup=new P.drawing.Group({zIndex:-1}),s=Z(this.pane.axes,function(t){return t.options.vertical!==e.options.vertical})[0],a=0;a<o.length;a++){var h=o[a],p=void 0,l=void 0,c=h.label,u=void 0,l=i?(p=(s||r.axisX).lineBox(),this.getSlot(h.from,h.to,!0)):(p=this.getSlot(h.from,h.to,!0),(s||r.axisY).lineBox());c&&(c.vAlign=c.position||S,u=this.createPlotBandLabel(c,h,new qt(p.x1,l.y1,p.x2,l.y2))),0!==p.width()&&0!==l.height()&&(l=new P.geometry.Rect([p.x1,l.y1],[p.width(),l.height()]),h=P.drawing.Path.fromRect(l,{fill:{color:h.color,opacity:h.opacity},stroke:null}),n.append(h),u&&n.append(u))}this.appendVisual(n)}},fo.prototype.createPlotBandLabel=function(t,e,o){if(!1===t.visible)return null;var i,r=t.text;return lt(t)&&t.visible&&((i=W(t))?r=i({text:r,item:e}):t.format&&(r=this.chartService.format.auto(t.format,r)),t.color||(t.color=this.options.labels.color)),(t=new ze(r,t)).reflow(o),t.renderVisual(),t.visual},fo.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,r=e.minorUnit,n=e.vertical,a=t.options.line.visible,e=i.visible?e.majorUnit:0,t=t.lineBox(),h=t[n?"y1":"x1"],p={lineStart:t[n?"x1":"y1"],lineEnd:t[n?"x2":"y2"],vertical:n},l=[],c=this.gridLinesVisual();function s(t,e,o){var i=t.length,r=Math.max(1,e.step);if(e.visible)for(var n=e.skip;n<i;n+=r){var s=bt(t[n]);J(s,l)||n%o==0||a&&h===s||(p.position=s,c.append(lo(p,e)),l.push(s))}}return s(this.getMajorTickPositions(),i),s(this.getMinorTickPositions(),o,e/r),c.children},fo.prototype.reflow=function(t){for(var e=this.options,o=this.labels,i=this.title,r=e.vertical,n=o.length,s=r?"width":"height",i=i?i.box[s]():0,a=this.getActualTickSize()+e.margin+i,h=((this.getRoot()||{}).box||t)[s](),p=0,l=0;l<n;l++){var c=o[l].box[s]();c+a<=h&&(p=Math.max(p,c))}this.box=r?new qt(t.x1,t.y1,t.x1+p+a,t.y2):new qt(t.x1,t.y1,t.x2,t.y1+p+a),this.arrangeTitle(),this.arrangeLabels(),this.arrangeNotes()},fo.prototype.getLabelsTickPositions=function(){return this.getMajorTickPositions()},fo.prototype.labelTickIndex=function(t){return t.index},fo.prototype.arrangeLabels=function(){for(var t=this.options,e=this.labels,o=this.labelsBetweenTicks(),i=t.vertical,r=t.labels.mirror,n=this.getLabelsTickPositions(),s=0;s<e.length;s++){var a=e[s],h=this.labelTickIndex(a),p=i?a.box.height():a.box.width(),l=n[h],c=n[h+1],u=void 0,h=void 0,h=i?u=o?l+(c-l)/2-p/2:l-p/2:o?(u=l,c):(u=l-p/2)+p;this.positionLabel(a,r,u,h)}},fo.prototype.positionLabel=function(t,e,o,i){void 0===i&&(i=o);var r=this.options,n=r.vertical,s=this.lineBox(),r=this.getActualTickSize()+r.margin,a=n?(n=s.x2,e?(n+=r,t.options.rotationOrigin=S):(n-=r+t.box.width(),t.options.rotationOrigin=k),t.box.move(n,o)):(a=s.y1,e?(a-=r+t.box.height(),t.options.rotationOrigin=w):(a+=r,t.options.rotationOrigin=A),new qt(o,a,i,a+t.box.height()));t.reflow(a)},fo.prototype.autoRotateLabelAngle=function(t,e){return t.width()<e?0:t.height()>e?-90:-45},fo.prototype.autoRotateLabels=function(){if(!this.options.autoRotateLabels||this.options.vertical)return!1;for(var t=this.getMajorTickPositions(),e=this.labels,o=Math.min(e.length,t.length-1),i=0,r=0;r<o;r++){var n=Math.abs(t[r+1]-t[r]),s=e[r].box,n=this.autoRotateLabelAngle(s,n);if(-90===(i=0!==n?n:i))break}if(0!==i){for(var a=0;a<e.length;a++)e[a].options.rotation=i,e[a].reflow(new qt);return!0}},fo.prototype.arrangeTitle=function(){var t=this.options,e=this.title,o=t.labels.mirror,t=t.vertical;e&&(t?(e.options.align=o?k:S,e.options.vAlign=e.options.position):(e.options.align=e.options.position,e.options.vAlign=o?A:w),e.reflow(this.box))},fo.prototype.arrangeNotes=function(){for(var t=0;t<this.notes.length;t++){var e=this.notes[t],o=e.options.value,i=void 0;lt(o)?(this.shouldRenderNote(o)?e.show():e.hide(),i=this.noteSlot(o)):e.hide(),e.reflow(i||this.lineBox())}},fo.prototype.noteSlot=function(t){return this.getSlot(t)},fo.prototype.alignTo=function(t){var e=t.lineBox(),o=this.options.vertical,t=o?m:v;this.box.snapTo(e,t),o?this.box.shrink(0,this.lineBox().height()-e.height()):this.box.shrink(this.lineBox().width()-e.width(),0),this.box[t+1]-=this.lineBox()[t+1]-e[t+1],this.box[t+2]-=this.lineBox()[t+2]-e[t+2]},fo.prototype.axisLabelText=function(t,e,o){function i(){return e.format?r.chartService.format.localeAuto(e.format,[t],e.culture):t}var r=this,n=W(e),o=n?n(Object.assign({},o,{get text(){return i()},value:t,format:e.format,culture:e.culture})):i();return o},fo.prototype.slot=function(t,e,o){o=this.getSlot(t,e,o);if(o)return o.toRect()},fo.prototype.contentBox=function(){var t,e,o=this.box.clone(),i=this.labels;return i.length&&(t=this.options.vertical?m:v,this.chartService.isPannable(t)?(e=this.maxLabelOffset(),o[t+1]-=e.start,o[t+2]+=e.end):(i[0].options.visible&&o.wrap(i[0].box),(i=i[i.length-1]).options.visible&&o.wrap(i.box))),o},fo.prototype.maxLabelOffset=function(){for(var t=this.options,e=t.vertical,t=t.reverse,o=this.labelsBetweenTicks(),i=this.getLabelsTickPositions(),r=e?m:v,n=this.labels,s=t?1:0,a=t?0:1,h=0,p=0,l=0;l<n.length;l++){var c=n[l],u=this.labelTickIndex(c),d=void 0,f=void 0;o?(d=i[u+s],f=i[u+a]):d=f=i[u],h=Math.max(h,d-c.box[r+1]),p=Math.max(p,c.box[r+2]-f)}return{start:h,end:p}},fo.prototype.limitRange=function(t,e,o,i,r){var n=this.options;if(t<o&&r<0&&(!lt(n.min)||n.min<=o)||i<e&&0<r&&(!lt(n.max)||i<=n.max))return null;if(e<o&&0<r||i<t&&r<0)return{min:t,max:e};var s=e-t,a=t,n=e;return t<o&&r<0?(a=mt(t,o,i),n=mt(t+s,o+s,i)):i<e&&0<r&&(n=mt(e,o,i),a=mt(e-s,o,i-s)),{min:a,max:n}},fo.prototype.valueRange=function(){return{min:this.seriesMin,max:this.seriesMax}},fo.prototype.lineDir=function(){var t=this.options;return(t.vertical?-1:1)*(t.reverse?-1:1)},fo.prototype.lineInfo=function(){var t=this.options.vertical,e=this.lineBox(),o=t?e.height():e.width(),i=t?m:v,r=this.lineDir(),t=i+(1===r?1:2).toString();return{axis:i,axisOrigin:t,axisDir:r,lineBox:e,lineSize:o,lineStart:e[t]}},fo.prototype.pointOffset=function(t){var e=this.lineInfo(),o=e.axis,i=e.axisDir,r=e.axisOrigin,n=e.lineBox,e=e.lineSize;return(0<i?t[o]-n[r]:n[r]-t[o])/e},fo.prototype.scaleToDelta=function(t,e){t=mt(t,-.999,.999);return 0<t?e*Math.min(1,t):e-e/(1+t)},fo.prototype.labelsBetweenTicks=function(){return!this.options.justified},fo.prototype.prepareUserOptions=function(){},fo);function fo(t,e){void 0===e&&(e=new ao),co.call(this,t),this.chartService=e,this.options.visible||(this.options=z({},this.options,{labels:{visible:!1},line:{visible:!1},margin:0,majorTickSize:0,minorTickSize:0})),this.options.minorTicks=z({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.minorTickType!==n},this.options.minorTicks,{size:this.options.minorTickSize,align:this.options.minorTickType}),this.options.majorTicks=z({},{color:this.options.line.color,width:this.options.line.width,visible:this.options.majorTickType!==n},this.options.majorTicks,{size:this.options.majorTickSize,align:this.options.majorTickType}),this.initFields(),this.options._deferLabels||this.createLabels(),this.createTitle(),this.createNotes()}kt(uo,{labels:{visible:!0,rotation:0,mirror:!1,step:1,skip:0},line:{width:1,color:r,visible:!0},title:{visible:!0,position:C},majorTicks:{align:"outside",size:4,skip:0,step:1},minorTicks:{align:"outside",size:3,skip:0,step:1},axisCrossingValue:0,majorTickType:"outside",minorTickType:n,majorGridLines:{skip:0,step:1},minorGridLines:{visible:!1,width:1,color:r,skip:0,step:1},margin:5,visible:!0,reverse:!1,justified:!0,notes:{label:{text:""}},_alignLines:!0,_deferLabels:!1});var go=uo,yo="milliseconds",vo="seconds",mo="minutes",xo="hours",_o="days",bo="weeks",wo="months",Co="years",So=1e3,ko=60*So,Ao=60*ko,Po=24*Ao,To=7*Po,Mo=31*Po,Oo=365*Po,Bo={years:Oo,months:Mo,weeks:To,days:Po,hours:Ao,minutes:ko,seconds:So,milliseconds:1};function Ro(t,e){return t.getTime()-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ko}function Eo(t,e){return new Date(t.getTime()+e)}function Lo(t){var e;return t instanceof Date?e=t:t&&(e=new Date(t)),e}function Io(t,e){return 0===e&&23===t.getHours()&&(t.setHours(t.getHours()+2),1)}function zo(t,e,o,r){var i,n,s,a=t;return t&&(s=(i=Lo(t)).getHours(),o===Co?Io(a=new Date(i.getFullYear()+e,0,1),0):o===wo?Io(a=new Date(i.getFullYear(),i.getMonth()+e,1),s):o===bo?Io(a=zo(function(t,e){void 0===r&&(e=0);var o=0,i=t.getDay();if(!isNaN(i))for(;i!==e;)0===i?i=6:i--,o++;return Eo(t,-o*Po)}(i,r),7*e,_o),s):o===_o?Io(a=new Date(i.getFullYear(),i.getMonth(),i.getDate()+e),s):o===xo?(n=i,t=e,(s=new Date(n)).setMinutes(0,0,0),a=Eo(s,(n.getTimezoneOffset()-s.getTimezoneOffset())*ko+t*Ao)):o===mo?0<(a=Eo(i,e*ko)).getSeconds()&&a.setSeconds(0):o===vo?a=Eo(i,e*So):o===yo&&(a=Eo(i,e)),o!==yo&&0<a.getMilliseconds()&&a.setMilliseconds(0)),a}function Vo(t,e,o){return zo(Lo(t),0,e,o)}function jo(t,e,o){t=Lo(t);return t&&Vo(t,e,o).getTime()===t.getTime()?t:zo(t,1,e,o)}function Do(t,e){return t&&e?t.getTime()-e.getTime():-1}function Ho(t,e){return t.getTime()-e}function Uo(t){if(x(t)){for(var e=[],o=0;o<t.length;o++)e.push(Uo(t[o]));return e}if(t)return Lo(t).getTime()}function Fo(t,e){return t&&e?Uo(t)===Uo(e):t===e}function No(t,e,o){return Ro(t,e)/Bo[o]}function Go(t,e,o,i){var r=Lo(t),t=Lo(e);return(o===wo?r.getMonth()-t.getMonth()+12*(r.getFullYear()-t.getFullYear())+No(r,new Date(r.getFullYear(),r.getMonth()),_o)/new Date(r.getFullYear(),r.getMonth()+1,0).getDate():o===Co?r.getFullYear()-t.getFullYear()+Go(r,new Date(r.getFullYear(),0),wo,1)/12:o===_o||o===bo?No(r,t,o):Ho(r,e)/Bo[o])/i}function Wo(t,e,o){return o===Co?e.getFullYear()-t.getFullYear():o===wo?12*Wo(t,e,Co)+e.getMonth()-t.getMonth():o===_o?Math.floor(Ho(e,t)/Po):Math.floor(Ho(e,t)/Bo[o])}function Xo(t,e){return B(e)&&t.parseDate(e)||Lo(e)}function qo(t,e){if(x(e)){for(var o=[],i=0;i<e.length;i++)o.push(Xo(t,e[i]));return o}return Xo(t,e)}function Yo(t,e){return O(t.weekStartDay)?t.weekStartDay:e&&e.firstDay?e.firstDay():0}var Zo,at=((Zo=go)&&(Qo.__proto__=Zo),((Qo.prototype=Object.create(Zo&&Zo.prototype)).constructor=Qo).prototype.initFields=function(){this._ticks={}},Qo.prototype.categoriesHash=function(){return""},Qo.prototype.clone=function(){var t=new Qo(Object.assign({},this.options,{categories:this.options.srcCategories}),this.chartService);return t.createLabels(),t},Qo.prototype.initUserOptions=function(t){var e=t.categories||[],o=lt(t.min),i=lt(t.max);return t.srcCategories=t.categories=e,(o||i)&&e.length&&(o=o?Math.floor(t.min):0,e=i?t.justified?Math.floor(t.max)+1:Math.ceil(t.max):e.length,t.categories=t.categories.slice(o,e)),t},Qo.prototype.rangeIndices=function(){var t=this.options,e=t.categories.length||1;return{min:O(t.min)?t.min%1:0,max:O(t.max)&&t.max%1!=0&&t.max<this.totalRange().max?e-(1-t.max%1):e-(t.justified?1:0)}},Qo.prototype.totalRangeIndices=function(t){var e=this.options,o=O(e.min)?e.min:0;return e=O(e.max)?e.max:O(e.min)?o+e.categories.length:this.totalRange().max||1,t&&(t=this.totalRange(),o=mt(o,0,t.max),e=mt(e,0,t.max)),{min:o,max:e}},Qo.prototype.range=function(){var t=this.options;return{min:O(t.min)?t.min:0,max:(O(t.max)?t:this.totalRange()).max}},Qo.prototype.roundedRange=function(){return this.range()},Qo.prototype.totalRange=function(){var t=this.options;return{min:0,max:Math.max(this._seriesMax||0,t.srcCategories.length)-(t.justified?1:0)}},Qo.prototype.scaleOptions=function(){var t=this.rangeIndices(),e=t.min,o=t.max,t=this.lineBox();return{scale:(this.options.vertical?t.height():t.width())/(o-e||1)*(this.options.reverse?-1:1),box:t,min:e,max:o}},Qo.prototype.arrangeLabels=function(){Zo.prototype.arrangeLabels.call(this),this.hideOutOfRangeLabels()},Qo.prototype.hideOutOfRangeLabels=function(){var t,e,o,i=this.box,r=this.labels;0<r.length&&(e=i[(t=this.options.vertical?m:v)+1],o=i[t+2],i=r[0],r=vt(r),(i.box[t+1]>o||i.box[t+2]<e)&&(i.options.visible=!1),(r.box[t+1]>o||r.box[t+2]<e)&&(r.options.visible=!1))},Qo.prototype.getMajorTickPositions=function(){return this.getTicks().majorTicks},Qo.prototype.getMinorTickPositions=function(){return this.getTicks().minorTicks},Qo.prototype.getLabelsTickPositions=function(){return this.getTicks().labelTicks},Qo.prototype.tickIndices=function(t){for(var e=this.rangeIndices(),o=e.min,e=e.max,i=Math.ceil(e),r=Math.floor(o),n=[];r<=i;)n.push(r),r+=t;return n},Qo.prototype.getTickPositions=function(t){for(var e=this.options,o=e.vertical,i=e.reverse,r=this.scaleOptions(),n=r.scale,e=r.box,s=r.min,a=e[(o?m:v)+(i?2:1)],h=this.tickIndices(t),p=[],l=0;l<h.length;l++)p.push(a+bt(n*(h[l]-s),3));return p},Qo.prototype.getTicks=function(){var t=this.options,e=this._ticks,o=this.rangeIndices(),i=this.lineBox(),o=i.getHash()+o.min+","+o.max+t.reverse+t.justified;return e._hash!==o&&(t=t.minorTicks.visible||t.minorGridLines.visible,e._hash=o,e.labelTicks=this.getTickPositions(1),e.majorTicks=this.filterOutOfRangePositions(e.labelTicks,i),e.minorTicks=t?this.filterOutOfRangePositions(this.getTickPositions(.5),i):[]),e},Qo.prototype.filterOutOfRangePositions=function(t,e){if(!t.length)return t;for(var o=this.options.vertical?m:v,i=function(t){return e[o+1]<=t&&t<=e[o+2]},r=t.length-1,n=0;!i(t[n])&&n<=r;)n++;for(var s=r;!i(t[s])&&0<=s;)s--;return t.slice(n,s+1)},Qo.prototype.lineInfo=function(){var t=this.options,e=t.vertical,o=t.reverse,i=this.lineBox(),r=e?i.height():i.width(),t=e?m:v,e=o?-1:1,o=t+(1==e?1:2).toString();return{axis:t,axisOrigin:o,axisDir:e,lineBox:i,lineSize:r,lineStart:i[o]}},Qo.prototype.lineDir=function(){return this.options.reverse?-1:1},Qo.prototype.getSlot=function(t,e,o){var i=this.options,r=i.reverse,n=i.justified,s=this.scaleOptions(),a=s.scale,h=s.box,p=s.min,l=this.lineInfo(),c=l.axis,u=l.lineStart,i=h.clone(),s=!lt(e),l=Ct(t,0),t=Ct(e,l),t=Math.max(t-1,l),e=u+(l-p)*a,a=u+(Math.max(l,t)+1-p)*a;return s&&n&&(a=e),o&&(e=mt(e,h[c+1],h[c+2]),a=mt(a,h[c+1],h[c+2])),i[c+1]=r?a:e,i[c+2]=r?e:a,i},Qo.prototype.limitSlot=function(t){var e=this.options.vertical?m:v,o=this.lineBox(),i=t.clone();return i[e+1]=mt(t[e+1],o[e+1],o[e+2]),i[e+2]=mt(t[e+2],o[e+1],o[e+2]),i},Qo.prototype.slot=function(t,e,o){var i=Math.floor(this.options.min||0),t=t,e=e;return"string"==typeof t?t=this.categoryIndex(t):O(t)&&(t-=i),"string"==typeof e?e=this.categoryIndex(e):O(e)&&(e-=i),Zo.prototype.slot.call(this,t,e,o)},Qo.prototype.pointCategoryIndex=function(t){var e=this.options,o=e.reverse,i=e.justified,r=e.vertical?m:v,n=this.scaleOptions(),s=n.scale,a=n.box,h=n.min,e=n.max,n=a[r+1],a=a[r+2],r=t[r];if(r<n||a<r)return null;n=(o?e:h)+(r-n)/s,s=n%1;return i?n=Math.round(n):0==s&&0<n&&n--,Math.floor(n)},Qo.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.options.categories[t]},Qo.prototype.categoryIndex=function(t){return this.totalIndex(t)-Math.floor(this.options.min||0)},Qo.prototype.categoryAt=function(t,e){var o=this.options;return(e?o.srcCategories:o.categories)[t]},Qo.prototype.categoriesCount=function(){return(this.options.categories||[]).length},Qo.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),o=e.vertical?o.height():o.width(),e=e.categories.length,o=bt(t/(o/e),g);return{min:o,max:e+o}},Qo.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),i=this.totalRangeIndices(),e=i.max-i.min,t=this.scaleToDelta(t,e),e=i.min+o*t,t=i.max-(1-o)*t;return{min:e,max:t=t-e<.1?e+.1:t}},Qo.prototype.zoomRange=function(t,e){var o=this.totalRange(),i=o.min,o=o.max,e=this.scaleRange(t,e);return{min:mt(e.min,i,o),max:mt(e.max,i,o)}},Qo.prototype.labelsCount=function(){var t=this.labelsRange();return t.max-t.min},Qo.prototype.labelsRange=function(){var t=this.options,e=t.justified,o=t.labels,i=this.totalRangeIndices(!0),r=i.min,n=i.max,i=Math.floor(r),n=e?(r=Math.ceil(r),Math.floor(n)):(r=Math.floor(r),Math.ceil(n));return{min:(r>o.skip?o.skip+o.step*Math.ceil((r-o.skip)/o.step):o.skip)-i,max:(t.categories.length?n+(e?1:0):0)-i}},Qo.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=i.dataItems?i.dataItems[t]:null,i=Ct(i.categories[t],"");o.dataItem=r;o=this.axisLabelText(i,e,o);return new We(i,o,t,r,e)},Qo.prototype.shouldRenderNote=function(t){var e=this.totalRangeIndices();return Math.floor(e.min)<=t&&t<=Math.ceil(e.max)},Qo.prototype.noteSlot=function(t){var e=this.options,e=t-Math.floor(e.min||0);return this.getSlot(e)},Qo.prototype.arrangeNotes=function(){Zo.prototype.arrangeNotes.call(this),this.hideOutOfRangeNotes()},Qo.prototype.hideOutOfRangeNotes=function(){var t=this.notes,e=this.box;if(t&&t.length)for(var o=this.options.vertical?m:v,i=e[o+1],r=e[o+2],n=0;n<t.length;n++){var s=t[n];s.box&&(r<s.box[o+1]||s.box[o+2]<i)&&s.hide()}},Qo.prototype.pan=function(t){var e=this.totalRangeIndices(!0),o=this.scaleOptions().scale,i=bt(t/o,g),t=this.totalRange(),o=e.min+i,e=e.max+i;return this.limitRange(o,e,0,t.max,i)},Qo.prototype.pointsRange=function(t,e){var o=this.options,i=o.reverse,r=o.vertical?m:v,n=this.totalRangeIndices(!0),s=this.scaleOptions(),o=s.scale,i=s.box[r+(i?2:1)],t=t[r]-i,i=e[r]-i,t=n.min+t/o,i=n.min+i/o,o=Math.min(t,i),i=Math.max(t,i);if(.01<=i-o)return{min:o,max:i}},Qo.prototype.valueRange=function(){return this.range()},Qo.prototype.totalIndex=function(t){var e=this.options;return this._categoriesMap?this._categoriesMap.get(t):function(t,e){if(t instanceof Date){for(var o=e.length,i=0;i<o;i++)if(Fo(e[i],t))return i;return-1}return e.indexOf(t)}(t,e.srcCategories)},Qo.prototype.currentRangeIndices=function(){var t=this.options,e=0;return{min:e=O(t.min)?Math.floor(t.min):e,max:O(t.max)?t.justified?Math.floor(t.max):Math.ceil(t.max)-1:this.totalCount()-1}},Qo.prototype.mapCategories=function(){if(!this._categoriesMap)for(var t=this._categoriesMap=new $,e=this.options.srcCategories,o=0;o<e.length;o++)t.set(e[o],o)},Qo.prototype.totalCount=function(){return Math.max(this.options.srcCategories.length,this._seriesMax||0)},Qo);function Qo(){Zo.apply(this,arguments)}kt(at,{type:"category",vertical:!1,majorGridLines:{visible:!1,width:1,color:r},labels:{zIndex:1},justified:!1,_deferLabels:!0});var Ko=at,It={milliseconds:"HH:mm:ss.fff",seconds:"HH:mm:ss",minutes:"HH:mm",hours:"HH:mm",days:"M/d",weeks:"M/d",months:"MMM 'yy",years:"yyyy"},$o=[yo,vo,mo,xo,_o,bo,wo,Co],Jo="fit";function ti(t){var e=t._range;return e||((e=t._range=At(t)).min=Lo(e.min),e.max=Lo(e.max)),e}function ei(t){this.options=t}ei.prototype.displayIndices=function(){return{min:0,max:1}},ei.prototype.displayRange=function(){return{}},ei.prototype.total=function(){return{}},ei.prototype.valueRange=function(){return{}},ei.prototype.valueIndex=function(){return-1},ei.prototype.values=function(){return[]},ei.prototype.totalIndex=function(){return-1},ei.prototype.valuesCount=function(){return 0},ei.prototype.totalCount=function(){return 0},ei.prototype.dateAt=function(){return null};function oi(t,e,o){(this.options=o).baseUnitStep=o.baseUnitStep||1;var i=o.roundToBaseUnit,r=o.justified;this.start=zo(t,0,o.baseUnit,o.weekStartDay);var n=this.roundToTotalStep(e),s=!r&&Fo(e,n)&&!o.justifyEnd;this.end=this.roundToTotalStep(e,!r,s?1:0);var a=o.min||t;this.valueStart=this.roundToTotalStep(a),this.displayStart=i?this.valueStart:a,(t=o.max)?(a=!r&&Fo(t,this.roundToTotalStep(t))?-1:0,this.valueEnd=this.roundToTotalStep(t,!1,a),this.displayEnd=i?this.roundToTotalStep(t,!r):o.max):(this.valueEnd=n,this.displayEnd=i||s?this.end:e),this.valueEnd<this.valueStart&&(this.valueEnd=this.valueStart),this.displayEnd<=this.displayStart&&(this.displayEnd=this.roundToTotalStep(this.displayStart,!1,1))}function ii(t,e,o){for(var i,r,n,s=ti(t.categories),a=(t.max||s.max)-(t.min||s.min),h=t.autoBaseUnitSteps,p=t.maxDateGroups,l=t.baseUnit===Jo,c=e?$o.indexOf(e):0,u=l?$o[c++]:t.baseUnit,d=a/Bo[u],f=d;!r||p<=d;){for(i=i||h[u].slice(0);(n=i.shift())&&e===u&&n<o;);if(n)d=f/(r=n);else{if(u===vt($o)){r=Math.ceil(f/p);break}if(!l){p<d&&(r=Math.ceil(f/p));break}u=$o[c++]||vt($o),f=a/Bo[u],i=null}}t.baseUnitStep=r,t.baseUnit=u}function ri(t){var e=(t.baseUnit||"").toLowerCase();return e===Jo||J(e,$o)||function(t){for(var e,o,i=t.categories,r=lt(i)?i.length:0,n=l,s=0;s<r;s++){var a,h=i[s];h&&e&&(0<(a=Ro(h,e))&&(o=(n=Math.min(n,a))>=Oo?Co:Mo-3*Po<=n?wo:To<=n?bo:Po<=n?_o:Ao<=n?xo:ko<=n?mo:vo)),e=h}t.baseUnit=o||_o}(t),e!==Jo&&"auto"!==t.baseUnitStep||ii(t),t}oi.prototype.displayRange=function(){return{min:this.displayStart,max:this.displayEnd}},oi.prototype.displayIndices=function(){var t,e,o;return this._indices||(t=(e=this.options).baseUnit,o=e.baseUnitStep,e=Go(this.displayStart,this.valueStart,t,o),o=Go(this.displayEnd,this.valueStart,t,o),this._indices={min:e,max:o}),this._indices},oi.prototype.total=function(){return{min:this.start,max:this.end}},oi.prototype.totalCount=function(){return this.totalIndex(this.end)+(this.options.justified?1:0)},oi.prototype.valueRange=function(){return{min:this.valueStart,max:this.valueEnd}},oi.prototype.valueIndex=function(t){var e=this.options;return Math.floor(Go(t,this.valueStart,e.baseUnit,e.baseUnitStep))},oi.prototype.totalIndex=function(t){var e=this.options;return Math.floor(Go(t,this.start,e.baseUnit,e.baseUnitStep))},oi.prototype.dateIndex=function(t){var e=this.options;return Go(t,this.valueStart,e.baseUnit,e.baseUnitStep)},oi.prototype.valuesCount=function(){return this.valueIndex(this.valueEnd)+1},oi.prototype.values=function(){var t=this._values;if(!t){var e=this.options,o=this.valueRange();this._values=t=[];for(var i=o.min;i<=o.max;)t.push(i),i=zo(i,e.baseUnitStep,e.baseUnit,e.weekStartDay)}return t},oi.prototype.dateAt=function(t,e){var o=this.options;return zo(e?this.start:this.valueStart,o.baseUnitStep*t,o.baseUnit,o.weekStartDay)},oi.prototype.roundToTotalStep=function(t,e,o){var i=this.options,r=i.baseUnit,n=i.baseUnitStep,s=i.weekStartDay,i=this.start,t=Go(t,i,r,n),t=e?Math.ceil(t):Math.floor(t);return o&&(t+=o),zo(i,t*n,r,s)};var ni,Vt=((ni=Ko)&&(si.__proto__=ni),((si.prototype=Object.create(ni&&ni.prototype)).constructor=si).prototype.clone=function(){var t=new si(Object.assign({},this.options),this.chartService);return t.createLabels(),t},si.prototype.categoriesHash=function(){var t=this.dataRange.total().min;return this.options.baseUnit+this.options.baseUnitStep+t},si.prototype.initUserOptions=function(t){return t},si.prototype.initFields=function(){ni.prototype.initFields.call(this);var t=this.chartService,e=t.intl,o=this.options,i=o.categories||[];i._parsed||((i=qo(e,i))._parsed=!0),o=z({roundToBaseUnit:!0},o,{categories:i,min:Xo(e,o.min),max:Xo(e,o.max),weekStartDay:Yo(o,e)}),t.panning&&t.isPannable(o.vertical?m:v)&&(o.roundToBaseUnit=!1),o.userSetBaseUnit=o.userSetBaseUnit||o.baseUnit,o.userSetBaseUnitStep=o.userSetBaseUnitStep||o.baseUnitStep,0<((this.options=o).srcCategories=i).length?(e=ti(i),t=o.maxDivisions,this.dataRange=new oi(e.min,e.max,ri(o)),t?(i=this.dataRange.displayRange(),ii(i=Object.assign({},o,{justified:!0,roundToBaseUnit:!1,baseUnit:"fit",min:i.min,max:i.max,maxDateGroups:t}),(t=this.dataRange.options).baseUnit,t.baseUnitStep),this.divisionRange=new oi(e.min,e.max,i)):this.divisionRange=this.dataRange):(o.baseUnit=o.baseUnit||_o,this.dataRange=this.divisionRange=new ei(o)),this.rangeLabels=[]},si.prototype.tickIndices=function(t){var e=this.dataRange,o=this.divisionRange,i=o.valuesCount();if(!this.options.maxDivisions||!i)return ni.prototype.tickIndices.call(this,t);var r=[],n=o.values(),s=0;this.options.justified||(n=n.concat(o.dateAt(i)),s=.5);for(var a,h=0;h<n.length;h++)r.push(e.dateIndex(n[h])+s),1!==t&&1<=h&&(a=r.length-1,r.splice(h,0,r[a-1]+(r[a]-r[a-1])*t));return r},si.prototype.shouldRenderNote=function(t){var e=this.range(),o=this.options.categories||[];return 0<=Do(t,e.min)&&Do(t,e.max)<=0&&o.length},si.prototype.parseNoteValue=function(t){return Xo(this.chartService.intl,t)},si.prototype.noteSlot=function(t){return this.getSlot(t)},si.prototype.translateRange=function(t){var e=this.options,o=e.baseUnit,i=e.weekStartDay,r=e.vertical,n=this.lineBox(),r=r?n.height():n.width(),n=this.range(),r=r/(n.max-n.min),t=bt(t/r,g);return n.min&&n.max&&(r=Eo(e.min||n.min,t),t=Eo(e.max||n.max,t),n={min:zo(r,0,o,i),max:zo(t,0,o,i)}),n},si.prototype.labelsRange=function(){return{min:this.options.labels.skip,max:this.divisionRange.valuesCount()}},si.prototype.pan=function(t){if(this.isEmpty())return null;var e=this.options,o=this.lineBox(),i=e.vertical?o.height():o.width(),r=this.dataRange.displayRange(),n=r.min,o=r.max,r=this.dataRange.total(),i=bt(t/(i/(o-n)),g)*(e.reverse?-1:1),n=Eo(n,i),o=Eo(o,i),i=this.limitRange(Uo(n),Uo(o),Uo(r.min),Uo(r.max),i);return i?(i.min=Lo(i.min),i.max=Lo(i.max),i.baseUnit=e.baseUnit,i.baseUnitStep=e.baseUnitStep||1,i.userSetBaseUnit=e.userSetBaseUnit,i.userSetBaseUnitStep=e.userSetBaseUnitStep,i):void 0},si.prototype.pointsRange=function(t,e){if(this.isEmpty())return null;var o=ni.prototype.pointsRange.call(this,t,e),i=this.dataRange.displayRange(),t=this.dataRange.displayIndices(),e=Ho(i.max,i.min)/(t.max-t.min),t=this.options;return{min:Eo(i.min,o.min*e),max:Eo(i.min,o.max*e),baseUnit:t.userSetBaseUnit||t.baseUnit,baseUnitStep:t.userSetBaseUnitStep||t.baseUnitStep}},si.prototype.scaleRange=function(t,e){if(this.isEmpty())return{};var o=this.options,i=o.userSetBaseUnit===Jo,r=this.dataRange.total(),n=this.dataRange.displayRange(),s=n.min,a=n.max,h=Math.abs(this.pointOffset(e)),n=this.scaleToDelta(t,a-s),e=Math.round(h*n),t=Math.round((1-h)*n),p=this.dataRange.options.baseUnit,h=new Date(s.getTime()+e),n=new Date(a.getTime()-t);if(i){var l,c,u=o.autoBaseUnitSteps,e=o.maxDateGroups,t=vt(u[p])*e*Bo[p],d=Ho(a,s),i=Ho(n,h),f=$o.indexOf(p);if(i<Bo[p]&&p!==yo)p=$o[f-1],h=Eo(s,c=(d-(e-1)*(l=vt(u[p]))*Bo[p])/2),n=Eo(a,-c);else if(t<i&&p!==Co){var g=0;do{for(p=$o[++f],g=0,c=2*Bo[p];l=u[p][g],++g<u[p].length&&c*l<d;);}while(p!==Co&&c*l<d);0<(c=(c*l-d)/2)&&(h=Eo(s,-c),n=Eo(a,c),h=Eo(h,mt(n,r.min,r.max)-n),n=Eo(n,mt(h,r.min,r.max)-h))}}return h&&n&&0<Ho(n,h)?{min:h,max:n,baseUnit:o.userSetBaseUnit||o.baseUnit,baseUnitStep:o.userSetBaseUnitStep||o.baseUnitStep}:void 0},si.prototype.zoomRange=function(t,e){var o=this.dataRange.total(),e=this.scaleRange(t,e);return e&&(e.min<o.min&&(e.min=o.min),e.max>o.max&&(e.max=o.max)),e},si.prototype.range=function(){return this.dataRange.displayRange()},si.prototype.createLabels=function(){ni.prototype.createLabels.call(this),this.createRangeLabels()},si.prototype.clearLabels=function(){ni.prototype.clearLabels.call(this),this.rangeLabels=[]},si.prototype.arrangeLabels=function(){this.arrangeRangeLabels(),ni.prototype.arrangeLabels.call(this)},si.prototype.arrangeRangeLabels=function(){var t,e,o,i,r=this.options,n=this.rangeLabels;0!==n.length&&(i=this.lineBox(),t=r.vertical,e=r.rangeLabels.mirror||r.labels.mirror,(o=n[0])&&(r=t?i.y1-o.box.height()/2:i.x1,this.positionLabel(o,e,r)),(n=n[1])&&(i=t?i.y2-n.box.height()/2:i.x2,this.positionLabel(n,e,i)))},si.prototype.autoRotateLabels=function(){ni.prototype.autoRotateLabels.call(this),this.autoRotateRangeLabels()},si.prototype.hideOutOfRangeLabels=function(){ni.prototype.hideOutOfRangeLabels.call(this),this.hideOverlappingLabels()},si.prototype.hideOverlappingLabels=function(){var t=this.rangeLabels,e=this.labels;if(0!==t.length){var o=t[0];if(o&&o.options.visible)for(var i=0;i<e.length&&s(o,e[i]);i++);var r=t[1];if(r&&r.options.visible)for(var n=e.length-1;0<n&&s(r,e[n]);--n);}function s(t,e){return(!e.options.visible||e.box.overlaps(t.box))&&(e.options.visible=!1,1)}},si.prototype.contentBox=function(){for(var t=ni.prototype.contentBox.call(this),e=this.rangeLabels,o=0;o<e.length;o++){var i=e[o];i.options.visible&&t.wrap(i.box)}return t},si.prototype.createAxisLabel=function(t,e,o){void 0===o&&(o={});var i=this.options,r=i.dataItems&&!i.maxDivisions?i.dataItems[t]:null,n=this.divisionRange.dateAt(t),i=e.dateFormats[this.divisionRange.options.baseUnit];e.format=e.format||i,o.dataItem=r;o=this.axisLabelText(n,e,o);if(o)return new We(n,o,t,r,e)},si.prototype.createRangeLabels=function(){var i=this,t=this.divisionRange,e=t.displayStart,o=t.displayEnd,t=this.options,r=Object.assign({},t.labels,t.rangeLabels,{align:C,zIndex:t.zIndex});!0===r.visible&&(this.normalizeLabelRotation(r),r.alignRotation=C,"auto"===r.rotation&&(r.rotation=0,t.autoRotateRangeLabels=!0),t=r.dateFormats[this.divisionRange.options.baseUnit],r.format=r.format||t,(t=function(t,e,o){o&&(t=new We(e,o,t,null,r),i.append(t),i.rangeLabels.push(t))})(0,e,this.axisLabelText(e,r,{index:0,count:2})),t(1,o,this.axisLabelText(o,r,{index:1,count:2})))},si.prototype.autoRotateRangeLabels=function(){var t,e,i=this,o=this.rangeLabels;this.options.autoRotateRangeLabels&&!this.options.vertical&&2===o.length&&(t=function(t,e,o){o=2*Math.abs(e[o+1]-e[o]),o=i.autoRotateLabelAngle(t.box,o);0!==o&&(t.options.rotation=o,t.reflow(new qt))},e=this.getMajorTickPositions(),t(o[0],e,0),t(o[1],e,e.length-2))},si.prototype.categoryIndex=function(t){return this.dataRange.valueIndex(t)},si.prototype.slot=function(t,e,o){var i=this.dataRange,t=t,e=e;t instanceof Date&&(t=i.dateIndex(t)),e instanceof Date&&(e=i.dateIndex(e));o=this.getSlot(t,e,o);if(o)return o.toRect()},si.prototype.getSlot=function(t,e,o){return"object"==typeof t&&(t=this.categoryIndex(t)),"object"==typeof e&&(e=this.categoryIndex(e)),ni.prototype.getSlot.call(this,t,e,o)},si.prototype.valueRange=function(){var t=ti(this.options.srcCategories);return{min:Lo(t.min),max:Lo(t.max)}},si.prototype.categoryAt=function(t,e){return this.dataRange.dateAt(t,e)},si.prototype.categoriesCount=function(){return this.dataRange.valuesCount()},si.prototype.rangeIndices=function(){return this.dataRange.displayIndices()},si.prototype.labelsBetweenTicks=function(){return!this.divisionRange.options.justified},si.prototype.prepareUserOptions=function(){this.isEmpty()||(this.options.categories=this.dataRange.values())},si.prototype.getCategory=function(t){t=this.pointCategoryIndex(t);return null===t?null:this.dataRange.dateAt(t)},si.prototype.totalIndex=function(t){return this.dataRange.totalIndex(t)},si.prototype.currentRangeIndices=function(){var t=this.dataRange.valueRange();return{min:this.dataRange.totalIndex(t.min),max:this.dataRange.totalIndex(t.max)}},si.prototype.totalRange=function(){return this.dataRange.total()},si.prototype.totalCount=function(){return this.dataRange.totalCount()},si.prototype.isEmpty=function(){return!this.options.srcCategories.length},si.prototype.roundedRange=function(){if(!1!==this.options.roundToBaseUnit||this.isEmpty())return this.range();var t=this.options,e=ti(t.srcCategories);return new oi(e.min,e.max,Object.assign({},t,{justified:!1,roundToBaseUnit:!0,justifyEnd:t.justified})).displayRange()},si);function si(){ni.apply(this,arguments)}kt(Vt,{type:y,labels:{dateFormats:It},rangeLabels:{visible:!1},autoBaseUnitSteps:{milliseconds:[1,10,100],seconds:[1,2,5,15,30],minutes:[1,2,5,15,30],hours:[1,2,3],days:[1,2,3],weeks:[1,2],months:[1,2,3,6],years:[1,2,3,5,10,25,50]},maxDateGroups:10});var ai=Vt;function hi(t,e){return bt(Math.floor(t/e)*e,g)}function pi(t,e){return bt(Math.ceil(t/e)*e,g)}function li(t){return Math.max(Math.min(t,3e5),-3e5)}var ci,ui=Math.pow(10,-9),ee=((ci=go)&&(di.__proto__=ci),((di.prototype=Object.create(ci&&ci.prototype)).constructor=di).prototype.initUserOptions=function(t){var o,e,i,r,n,s,a=(s=t.seriesMin,o=t.seriesMax,i=(e=t).narrowRange,r=function(t){if(!t&&!o)return 0;if(0<=t&&0<=o){var e=t===o?0:t;if(!1===i||!i&&.2<(o-e)/o)return 0;e=Math.max(0,e-(o-e)/2)}else e=t;return e}(s),a=function(t,e,o){if(!t&&!e)return 1;if(t<=0&&e<=0){var i=t===e?0:e,r=Math.abs((i-t)/i);if(!1===o||!o&&.2<r)return 0;i=Math.min(0,i-(t-i)/2)}else i=e;return i}(s,o,i),n=Ut(r,a),!(s={majorUnit:n})!==e.roundToMajorUnit&&(r<0&&fi(r,n,1/3)&&(r-=n),0<a&&fi(a,n,1/3)&&(a+=n)),s.min=hi(r,n),s.max=pi(a,n),s);return this.totalOptions=(n=a,{min:lt((s=t).min)?Math.min(n.min,s.min):n.min,max:lt(s.max)?Math.max(n.max,s.max):n.max,majorUnit:n.majorUnit}),function(t,e){var o,i,r,n=e;e&&(function(t,e){for(var o=0;o<e.length;o++){var i=e[o];null===t[i]&&(t[i]=void 0)}}(e,["min","max"]),o=lt(e.min),i=lt(e.max),(r=o||i)&&e.min===e.max&&(0<e.min?e.min=0:e.max=1),e.majorUnit?(t.min=hi(t.min,e.majorUnit),t.max=pi(t.max,e.majorUnit)):r&&(n=z(t,e),t.majorUnit=Ut(n.min,n.max))),t.minorUnit=(n.majorUnit||t.majorUnit)/5;n=z(t,n);return n.min>=n.max&&(o&&!i?n.max=n.min+n.majorUnit:!o&&i&&(n.min=n.max-n.majorUnit)),n}(a,t)},di.prototype.initFields=function(){this.totalMin=this.totalOptions.min,this.totalMax=this.totalOptions.max,this.totalMajorUnit=this.totalOptions.majorUnit,this.seriesMin=this.options.seriesMin,this.seriesMax=this.options.seriesMax},di.prototype.clone=function(){return new di(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},di.prototype.startValue=function(){return 0},di.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},di.prototype.getDivisions=function(t){if(0===t)return 1;var e=this.options,e=e.max-e.min;return Math.floor(bt(e/t,3))+1},di.prototype.getTickPositions=function(t,e){var o=this.options,i=this.lineInfo(),r=i.axisDir,n=i.axisOrigin,s=i.lineBox,a=t*(i.lineSize/(o.max-o.min)),h=this.getDivisions(t),p=[],l=s[n],c=0;e&&(c=e/t);for(var u=0;u<h;u++)u%c!=0&&p.push(bt(l,3)),l+=a*r;return p},di.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},di.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},di.prototype.getSlot=function(t,e,o){void 0===o&&(o=!1);var i=this.options,r=this.lineInfo(),n=r.axis,s=r.axisDir,a=r.lineBox,h=r.lineSize,p=r.lineStart,r=s*(h/(i.max-i.min)),h=Ct(t,e||0),t=Ct(e,t||0);o&&(h=mt(h,i.min,i.max),t=mt(t,i.min,i.max));o=Math.min(h,t)-i.min,i=Math.max(h,t)-i.min,a=new qt(a.x1,a.y1,a.x1,a.y1);return a[n+1]=li(p+r*(0<s?o:i)),a[n+2]=li(p+r*(0<s?i:o)),a},di.prototype.getValue=function(t){var e=this.options,o=Number(e.max),e=Number(e.min),t=this.pointOffset(t);return t<0||1<t?null:bt(e+t*(o-e),g)},di.prototype.translateRange=function(t){var e=this.options,o=e.vertical,i=e.reverse,r=e.max,n=e.min,e=this.lineInfo().lineSize,e=bt(t/(e/(r-n)),g);return{min:n+(e=!(!o&&!i||o&&i)?-e:e),max:r+e,offset:e}},di.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},di.prototype.createAxisLabel=function(t,e,o){var i=this.options,i=bt(i.min+t*i.majorUnit,g),o=this.axisLabelText(i,e,o);return new We(i,o,t,null,e)},di.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},di.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},di.prototype.pointsRange=function(t,e){var o=this.getValue(t),t=this.getValue(e),e=Math.min(o,t),t=Math.max(o,t);if(this.isValidRange(e,t))return{min:e,max:t}},di.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),e=this.options.max-this.options.min,t=this.scaleToDelta(t,e),e=(1-o)*t,t=bt(this.options.min+o*t,g),e=bt(this.options.max-e,g);return{min:t,max:e=e-t<ui?t+ui:e}},di.prototype.zoomRange=function(t,e){var o=this.totalMin,i=this.totalMax,e=this.scaleRange(t,e);return{min:mt(e.min,o,i),max:mt(e.max,o,i)}},di.prototype.isValidRange=function(t,e){return ui<e-t},di);function di(t,e,o,i){ci.call(this,Object.assign({},o,{seriesMin:t,seriesMax:e}),i)}function fi(t,e,o){t=bt(Math.abs(t%e),g);return 0===t||e*(1-o)<t}kt(ee,{type:"numeric",min:0,max:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:r},labels:{format:"#.####################"},zIndex:1});var gi,yi=ee,ae=((gi=go)&&(vi.__proto__=gi),((vi.prototype=Object.create(gi&&gi.prototype)).constructor=vi).prototype.clone=function(){return new vi(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},vi.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},vi.prototype.getDivisions=function(t){var e=this.options;return Math.floor(Wo(e.min,e.max,e.baseUnit)/t+1)},vi.prototype.getTickPositions=function(t){for(var e=this.options,o=this.lineInfo(),i=o.axisDir,r=o.lineSize,n=o.lineStart,s=this.getDivisions(t),a=r/Ho(e.max,e.min),h=e.weekStartDay||0,p=[n],l=1;l<s;l++){var c=n+Ho(zo(e.min,l*t,e.baseUnit,h),e.min)*a*i;p.push(bt(c,3))}return p},vi.prototype.getMajorTickPositions=function(){return this.getTickPositions(this.options.majorUnit)},vi.prototype.getMinorTickPositions=function(){return this.getTickPositions(this.options.minorUnit)},vi.prototype.getSlot=function(t,e,o){return yi.prototype.getSlot.call(this,Xo(this.intlService,t),Xo(this.intlService,e),o)},vi.prototype.getValue=function(t){t=yi.prototype.getValue.call(this,t);return null!==t?Lo(t):null},vi.prototype.labelsCount=function(){return this.getDivisions(this.options.majorUnit)},vi.prototype.createAxisLabel=function(t,e,o){var i=this.options,r=t*i.majorUnit,n=i.weekStartDay||0,s=i.min;0<r&&(s=zo(s,r,i.baseUnit,n));i=e.dateFormats[i.baseUnit];e.format=e.format||i;o=this.axisLabelText(s,e,o);return new We(s,o,t,null,e)},vi.prototype.translateRange=function(t){var e=this.options,o=this.lineBox(),i=e.vertical,r=e.reverse,n=i?o.height():o.width(),o=this.range(),o=n/Ho(o.max,o.min),o=bt(t/o,g);return{min:Eo(e.min,o=!(!i&&!r||i&&r)?-o:o),max:Eo(e.max,o),offset:o}},vi.prototype.shouldRenderNote=function(t){var e=this.range();return 0<=Do(t,e.min)&&Do(t,e.max)<=0},vi.prototype.pan=function(t){t=this.translateRange(t,!0),t=this.limitRange(Uo(t.min),Uo(t.max),this.totalMin,this.totalMax,t.offset);if(t)return{min:Lo(t.min),max:Lo(t.max)}},vi.prototype.pointsRange=function(t,e){var o=this.getValue(t),t=this.getValue(e),e=Math.min(o,t),t=Math.max(o,t);return{min:Lo(e),max:Lo(t)}},vi.prototype.scaleRange=function(t,e){var o=Math.abs(this.pointOffset(e)),e=this.options.max-this.options.min,t=this.scaleToDelta(t,e),e=o*t,t=(1-o)*t,e=Lo(Uo(this.options.min)+e),t=Lo(Uo(this.options.max)-t);return{min:e,max:t=t-e<1e3?Lo(Uo(e)+1e3):t}},vi.prototype.zoomRange=function(t,e){e=this.scaleRange(t,e);return{min:Lo(mt(Uo(e.min),this.totalMin,this.totalMax)),max:Lo(mt(Uo(e.max),this.totalMin,this.totalMax))}},vi);function vi(t,e,o,i){var r,n,s,a,h,p=Lo(t),l=Lo(e),c=i.intl,u=o||{};r=p,n=l,s=u=z(u||{},{min:Xo(c,u.min),max:Xo(c,u.max),axisCrossingValue:qo(c,u.axisCrossingValues||u.axisCrossingValue),weekStartDay:Yo(u,c)}),t=s.min||r,e=s.max||n,o=s.baseUnit||(e&&t?(a=Ro(e,t),h=xo,Oo<=a?h=Co:Mo<=a?h=wo:To<=a?h=bo:Po<=a&&(h=_o),h):xo),r=Bo[o],n=s.weekStartDay||0,a=Vo(Uo(t)-1,o,n)||Lo(e),h=jo(Uo(e)+1,o,n),t=s.majorUnit||pi(Ut(a.getTime(),h.getTime()),r)/r,e=Wo(a,h,o),r=pi(e,t)-e,e=Math.floor(r/2),r-=e,s.baseUnit||delete s.baseUnit,s.baseUnit=s.baseUnit||o,s.min=s.min||zo(a,-e,o,n),s.max=s.max||zo(h,r,o,n),s.minorUnit=s.minorUnit||t/5,s.majorUnit=t,gi.call(this,u=s,i),this.intlService=c,this.seriesMin=p,this.seriesMax=l;c=u.weekStartDay||0;this.totalMin=Uo(Vo(Uo(p)-1,u.baseUnit,c)),this.totalMax=Uo(jo(Uo(l)+1,u.baseUnit,c))}kt(ae,{type:y,majorGridLines:{visible:!0,width:1,color:r},labels:{dateFormats:It}});var mi,xi=ae,ce=((mi=go)&&(_i.__proto__=mi),((_i.prototype=Object.create(mi&&mi.prototype)).constructor=_i).prototype.clone=function(){return new _i(this.seriesMin,this.seriesMax,Object.assign({},this.options),this.chartService)},_i.prototype.startValue=function(){return this.options.min},_i.prototype.getSlot=function(t,e,o){var i=this.options,r=this.logMin,n=this.logMax,s=i.majorUnit,a=i.min,h=i.max,p=this.lineInfo(),l=p.axis,c=p.axisDir,u=p.lineBox,i=p.lineSize,p=p.lineStart,i=c*(i/(n-r)),n=Ct(t,e||1),t=Ct(e,t||1);if(n<=0||t<=0)return null;o&&(n=mt(n,a,h),t=mt(t,a,h));n=wi(n,s),t=wi(t,s),s=Math.min(n,t)-r,r=Math.max(n,t)-r,u=new qt(u.x1,u.y1,u.x1,u.y1);return u[l+1]=li(p+i*(0<c?s:r)),u[l+2]=li(p+i*(0<c?r:s)),u},_i.prototype.getValue=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.majorUnit,n=this.lineInfo(),s=n.axis,a=n.axisDir,e=n.lineStart,n=n.lineSize,e=a*(t[s]-e);return e<0||n<e?null:bt(Math.pow(r,o+e*((i-o)/n)),g)},_i.prototype.range=function(){var t=this.options;return{min:t.min,max:t.max}},_i.prototype.translateRange=function(t){var e=this.options,o=this.logMin,i=this.logMax,r=e.reverse,n=e.vertical,s=e.majorUnit,e=this.lineBox(),e=n?e.height():e.width(),e=bt(t/(e/(i-o)),g);return!n&&!r||n&&r||(e=-e),{min:Math.pow(s,o+e),max:Math.pow(s,i+e),offset:e}},_i.prototype.labelsCount=function(){var t=Math.floor(this.logMax);return Math.floor(t-this.logMin)+1},_i.prototype.getMajorTickPositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},{step:1,skip:0}),e},_i.prototype.createTicks=function(o){var t=this.options,e=t.majorTicks,i=t.minorTicks,r=t.vertical,n=t.labels.mirror,s=this.lineBox(),a={vertical:r};function h(t,e){a.tickX=n?s.x2:s.x2-e.size,a.tickY=n?s.y1-e.size:s.y1,a.position=t,o.append(po(a,e))}return e.visible&&this.traverseMajorTicksPositions(h,e),i.visible&&this.traverseMinorTicksPositions(h,i),[]},_i.prototype.createGridLines=function(t){var e=this.options,o=e.minorGridLines,i=e.majorGridLines,e=e.vertical,t=t.lineBox(),r={lineStart:t[e?"x1":"y1"],lineEnd:t[e?"x2":"y2"],vertical:e},n=[],s=this.gridLinesVisual();function a(t,e){J(t,n)||(r.position=t,s.append(lo(r,e)),n.push(t))}return i.visible&&this.traverseMajorTicksPositions(a,i),o.visible&&this.traverseMinorTicksPositions(a,o),s.children},_i.prototype.traverseMajorTicksPositions=function(t,e){for(var o=this.lineInfo(),i=o.lineStart,r=o.step,n=this.logMin,s=this.logMax,a=Math.ceil(n)+e.skip;a<=s;a+=e.step)t(bt(i+r*(a-n),g),e)},_i.prototype.traverseMinorTicksPositions=function(t,e){for(var o=this.options,i=o.min,r=o.max,n=o.minorUnit,s=o.majorUnit,o=this.lineInfo(),a=o.lineStart,h=o.step,p=this.logMin,l=this.logMax,c=Math.floor(p);c<l;c++)for(var u=this._minorIntervalOptions(c),d=e.skip;d<n;d+=e.step){var f=u.value+d*u.minorStep;if(r<f)break;i<=f&&t(bt(a+h*(wi(f,s)-p),g),e)}},_i.prototype.createAxisLabel=function(t,e,o){var i=Math.ceil(this.logMin+t),i=Math.pow(this.options.majorUnit,i),o=this.axisLabelText(i,e,o);return new We(i,o,t,null,e)},_i.prototype.shouldRenderNote=function(t){var e=this.range();return e.min<=t&&t<=e.max},_i.prototype.pan=function(t){t=this.translateRange(t);return this.limitRange(t.min,t.max,this.totalMin,this.totalMax,t.offset)},_i.prototype.pointsRange=function(t,e){t=this.getValue(t),e=this.getValue(e);return{min:Math.min(t,e),max:Math.max(t,e)}},_i.prototype.scaleRange=function(t,e){var o=this.options.majorUnit,i=wi(this.options.min,o),r=wi(this.options.max,o),e=Math.abs(this.pointOffset(e)),t=this.scaleToDelta(t,r-i),i=Math.pow(o,i+e*t),t=Math.pow(o,r-(1-e)*t);return{min:i,max:t=t-i<1e-6?i+1e-6:t}},_i.prototype.zoomRange=function(t,e){var o=this.scaleRange(t,e),t=this.totalMin,e=this.totalMax;return{min:mt(o.min,t,e),max:mt(o.max,t,e)}},_i.prototype._minorIntervalOptions=function(t){var e=this.options,o=e.minorUnit,i=e.majorUnit,e=Math.pow(i,t);return{value:e,minorStep:(Math.pow(i,t+1)-e)/o}},_i.prototype.lineInfo=function(){var t=mi.prototype.lineInfo.call(this);return t.step=t.axisDir*(t.lineSize/(this.logMax-this.logMin)),t},_i);function _i(t,e,o,i){var r,n,s,a,h,p=z({majorUnit:10,min:t,max:e},o),l=p.majorUnit,c=(u=bt(wi(a=e,h=l),g)%1,a<=0?h:0!=u&&(u<.3||.9<u)?Math.pow(h,wi(a,h)+.2):Math.pow(h,Math.ceil(wi(a,h)))),u=(r=t,s=(n=p).majorUnit,(d=r)<=0?d=e<=1?Math.pow(s,-2):1:n.narrowRange||(d=Math.pow(s,Math.floor(wi(r,s)))),d),d=(a=u,h=c,n=o,s=(r=p).min,d=r.max,lt(r.axisCrossingValue)&&r.axisCrossingValue<=0&&bi(),lt(n.max)?n.max<=0&&bi():d=h,lt(n.min)?n.min<=0&&bi():s=a,{min:s,max:d});p.max=d.max,p.min=d.min,p.minorUnit=o.minorUnit||bt(l-1,g),mi.call(this,p,i),this.totalMin=lt(o.min)?Math.min(u,o.min):u,this.totalMax=lt(o.max)?Math.max(c,o.max):c,this.logMin=bt(wi(d.min,l),g),this.logMax=bt(wi(d.max,l),g),this.seriesMin=t,this.seriesMax=e,this.createLabels()}function bi(){throw new Error("Non positive values cannot be used for a logarithmic axis")}function wi(t,e){return Math.log(t)/Math.log(e)}kt(ce,{type:"log",majorUnit:10,minorUnit:1,axisCrossingValue:1,vertical:!0,majorGridLines:{visible:!0,width:1,color:r},zIndex:1,_deferLabels:!0});var Ci,Si=ce,ge={createGridLines:function(t){var e,o=this.options,i=Math.abs(this.box.center().y-t.lineBox().y1),r=[],n=!1;return o.majorGridLines.visible&&(e=this.majorGridLineAngles(t),n=!0,r=this.renderMajorGridLines(e,i,o.majorGridLines)),o.minorGridLines.visible&&(e=this.minorGridLineAngles(t,n),ht(r,this.renderMinorGridLines(e,i,o.minorGridLines,t,n))),r},renderMajorGridLines:function(t,e,o){return this.renderGridLines(t,e,o)},renderMinorGridLines:function(t,e,o,i,r){r=this.radiusCallback&&this.radiusCallback(e,i,r);return this.renderGridLines(t,e,o,r)},renderGridLines:function(t,e,o,i){for(var r={stroke:{width:o.width,color:o.color,dashType:o.dashType}},o=this.box.center(),n=new P.geometry.Circle([o.x,o.y],e),s=this.gridLinesVisual(),a=0;a<t.length;a++){var h=new P.drawing.Path(r);i&&(n.radius=i(t[a])),h.moveTo(n.center).lineTo(n.pointAt(t[a]+180)),s.append(h)}return s.children},gridLineAngles:function(t,e,o,i,r){var n=this,r=this.intervals(e,o,i,r),t=t.options,s=t.visible&&!1!==(t.line||{}).visible;return it(r,function(t){t=n.intervalAngle(t);if(!s||90!==t)return t})}},_e=((Ci=Ko)&&(ki.__proto__=Ci),((ki.prototype=Object.create(Ci&&Ci.prototype)).constructor=ki).prototype.range=function(){return{min:0,max:this.options.categories.length}},ki.prototype.reflow=function(t){this.box=t,this.reflowLabels()},ki.prototype.lineBox=function(){return this.box},ki.prototype.reflowLabels=function(){for(var t=this.labels,e=this.options.labels,o=e.skip||0,i=e.step||1,r=new qt,n=0;n<t.length;n++){t[n].reflow(r);var s=t[n].box;t[n].reflow(this.getSlot(o+n*i).adjacentBox(0,s.width(),s.height()))}},ki.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r,n=this.options,s=n.categories.length/t||1,a=360/s,h=o||1,p=[],l=e||0;l<s;l+=h)r=n.reverse?360-l*a:l*a,r=bt(r,3)%360,i&&J(r,i)||p.push(r);return p},ki.prototype.majorIntervals=function(){return this.intervals(1)},ki.prototype.minorIntervals=function(){return this.intervals(.5)},ki.prototype.intervalAngle=function(t){return(360+t+this.options.startAngle)%360},ki.prototype.majorAngles=function(){var e=this;return it(this.majorIntervals(),function(t){return e.intervalAngle(t)})},ki.prototype.createLine=function(){return[]},ki.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,1,e.skip,e.step)},ki.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,o=o.majorGridLines,o=e?this.intervals(1,o.skip,o.step):null;return this.gridLineAngles(t,.5,i.skip,i.step,o)},ki.prototype.radiusCallback=function(e,t,o){if(t.options.type!==d){var t=_t(360/(2*this.options.categories.length)),i=Math.cos(t)*e,r=this.majorAngles();return function(t){return!o&&J(t,r)?e:i}}},ki.prototype.createPlotBands=function(){for(var t=this.options.plotBands||[],e=this._plotbandGroup=new P.drawing.Group({zIndex:-1}),o=0;o<t.length;o++){var i=t[o],r=this.plotBandSlot(i),n=this.getSlot(i.from),s=i.from-Math.floor(i.from);r.startAngle+=s*n.angle;var a=Math.ceil(i.to)-i.to;r.angle-=(a+s)*n.angle;i=se.current.createRing(r,{fill:{color:i.color,opacity:i.opacity},stroke:{opacity:i.opacity}});e.append(i)}this.appendVisual(e)},ki.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to-1)},ki.prototype.getSlot=function(t,e){var o=this.options,i=o.justified,r=this.box,n=this.majorAngles(),s=n.length,a=360/s,t=t;o.reverse&&!i&&(t=(t+1)%s);n=n[t=mt(Math.floor(t),0,s-1)];i&&(n-=a/2)<0&&(n+=360);t=a*(mt(Math.ceil(e||t),t,s-1)-t+1);return new Jt(r.center(),0,r.height()/2,n,t)},ki.prototype.slot=function(t,e){var o=this.getSlot(t,e),t=o.startAngle+180,e=t+o.angle;return new P.geometry.Arc([o.center.x,o.center.y],{startAngle:t,endAngle:e,radiusX:o.radius,radiusY:o.radius})},ki.prototype.pointCategoryIndex=function(t){for(var e=this.options.categories.length,o=null,i=0;i<e;i++)if(this.getSlot(i).containsPoint(t)){o=i;break}return o},ki);function ki(){Ci.apply(this,arguments)}kt(_e,{startAngle:90,labels:{margin:U(10)},majorGridLines:{visible:!0},justified:!0}),z(_e.prototype,ge);var Ai,Pi=_e,Se=((Ai=go)&&(Ti.__proto__=Ai),((Ti.prototype=Object.create(Ai&&Ai.prototype)).constructor=Ti).prototype.getDivisions=function(t){return yi.prototype.getDivisions.call(this,t)-1},Ti.prototype.reflow=function(t){this.box=t,this.reflowLabels()},Ti.prototype.reflowLabels=function(){for(var t=this.options,e=this.labels,o=this.options.labels,i=o.skip||0,o=o.step||1,r=new qt,n=this.intervals(t.majorUnit,i,o),s=0;s<e.length;s++){e[s].reflow(r);var a=e[s].box;e[s].reflow(this.getSlot(n[s]).adjacentBox(0,a.width(),a.height()))}},Ti.prototype.lineBox=function(){return this.box},Ti.prototype.intervals=function(t,e,o,i){void 0===i&&(i=!1);for(var r=this.options.min,n=this.getDivisions(t),s=[],a=o||1,h=e||0;h<n;h+=a){var p=(360+r+h*t)%360;i&&J(p,i)||s.push(p)}return s},Ti.prototype.majorIntervals=function(){return this.intervals(this.options.majorUnit)},Ti.prototype.minorIntervals=function(){return this.intervals(this.options.minorUnit)},Ti.prototype.intervalAngle=function(t){return(540-t-this.options.startAngle)%360},Ti.prototype.createLine=function(){return[]},Ti.prototype.majorGridLineAngles=function(t){var e=this.options.majorGridLines;return this.gridLineAngles(t,this.options.majorUnit,e.skip,e.step)},Ti.prototype.minorGridLineAngles=function(t,e){var o=this.options,i=o.minorGridLines,r=o.majorGridLines,r=e?this.intervals(o.majorUnit,r.skip,r.step):null;return this.gridLineAngles(t,o.minorUnit,i.skip,i.step,r)},Ti.prototype.plotBandSlot=function(t){return this.getSlot(t.from,t.to)},Ti.prototype.getSlot=function(t,e){var o=this.options,i=this.box,r=o.startAngle,t=mt(t,o.min,o.max),e=mt(e||t,t,o.max);return o.reverse&&(t*=-1,e*=-1),(e=(540-e-r)%360)<(t=(540-t-r)%360)&&(r=t,t=e,e=r),new Jt(i.center(),0,i.height()/2,t,e-t)},Ti.prototype.slot=function(t,e){var o=this.options,i=360-o.startAngle,r=this.getSlot(t,e=void 0===e?t:e),n=Math.min(t,e),e=Math.max(t,e),n=o.reverse?(s=n,e):(s=360-e,360-n),s=(s+i)%360;return new P.geometry.Arc([r.center.x,r.center.y],{startAngle:s,endAngle:n=(n+i)%360,radiusX:r.radius,radiusY:r.radius})},Ti.prototype.getValue=function(t){var e=this.options,o=this.box.center(),i=t.x-o.x,o=t.y-o.y,o=Math.round(ct(Math.atan2(o,i))),i=e.startAngle;return e.reverse||(o*=-1,i*=-1),(o+i+360)%360},Ti.prototype.valueRange=function(){return{min:0,max:2*Math.PI}},Ti);function Ti(t,e){Ai.call(this,t,e);e=this.options;e.minorUnit=e.minorUnit||e.majorUnit/2}kt(Se,{type:"polar",startAngle:0,reverse:!1,majorUnit:60,min:0,max:360,labels:{margin:U(10)},majorGridLines:{color:r,visible:!0,width:1},minorGridLines:{color:"#aaa"}}),z(Se.prototype,ge,{createPlotBands:Pi.prototype.createPlotBands,majorAngles:Pi.prototype.majorAngles,range:yi.prototype.range,labelsCount:yi.prototype.labelsCount,createAxisLabel:yi.prototype.createAxisLabel});var Mi=Se;function Oi(t,e){return 180-Math.abs(Math.abs(t-e)-180)}var Bi,Me={options:{majorGridLines:{visible:!0}},createPlotBands:function(){var t=this.options,e=t.majorGridLines.type,o=t.plotBands;void 0===o&&(o=[]);for(var t=this.plotArea.polarAxis,i=t.majorAngles(),r=t.box.center(),n=this._plotbandGroup=new P.drawing.Group({zIndex:-1}),s=0;s<o.length;s++){var a=o[s],h={fill:{color:a.color,opacity:a.opacity},stroke:{opacity:a.opacity}},a=this.getSlot(a.from,a.to,!0),a=new Jt(r,r.y-a.y2,r.y-a.y1,0,360),h=e===d?se.current.createRing(a,h):P.drawing.Path.fromPoints(this.plotBandPoints(a,i),h).close();n.append(h)}this.appendVisual(n)},plotBandPoints:function(t,e){for(var o=[],i=[],r=[t.center.x,t.center.y],n=new P.geometry.Circle(r,t.innerRadius),s=new P.geometry.Circle(r,t.radius),a=0;a<e.length;a++)o.push(n.pointAt(e[a]+180)),i.push(s.pointAt(e[a]+180));return o.reverse(),o.push(o[0]),i.push(i[0]),i.concat(o)},createGridLines:function(t){var e=this.options,o=this.radarMajorGridLinePositions(),i=t.majorAngles(),r=t.box.center(),t=[];return e.majorGridLines.visible&&(t=this.renderGridLines(r,o,i,e.majorGridLines)),e.minorGridLines.visible&&(o=this.radarMinorGridLinePositions(),ht(t,this.renderGridLines(r,o,i,e.minorGridLines))),t},renderGridLines:function(t,e,o,i){var r={stroke:{width:i.width,color:i.color,dashType:i.dashType}},n=i.skip;void 0===n&&(n=0);var s=i.step;void 0===s&&(s=0);for(var a=this.gridLinesVisual(),h=n;h<e.length;h+=s){var p=t.y-e[h];if(0<p){var l=new P.geometry.Circle([t.x,t.y],p);if(i.type===d)a.append(new P.drawing.Circle(l,r));else{for(var c=new P.drawing.Path(r),u=0;u<o.length;u++)c.lineTo(l.pointAt(o[u]+180));c.close(),a.append(c)}}}return a.children},getValue:function(t){var o,e=this.lineBox(),i=this.plotArea.polarAxis,r=i.majorAngles(),n=i.box.center(),s=t.distanceTo(n),a=s;return this.options.majorGridLines.type!==d&&1<r.length&&(i=t.x-n.x,n=t.y-n.y,o=(ct(Math.atan2(n,i))+540)%360,r.sort(function(t,e){return Oi(t,o)-Oi(e,o)}),i=90-Oi(r[0],r[1])/2,r=180-Oi(o,r[0])-i,a=s*(Math.sin(_t(r))/Math.sin(_t(i)))),this.axisType().prototype.getValue.call(this,new Nt(e.x1,e.y2-a))}},Ve=((Bi=yi)&&(Ri.__proto__=Bi),((Ri.prototype=Object.create(Bi&&Bi.prototype)).constructor=Ri).prototype.radarMajorGridLinePositions=function(){return this.getTickPositions(this.options.majorUnit)},Ri.prototype.radarMinorGridLinePositions=function(){var t=this.options,e=0;return t.majorGridLines.visible&&(e=t.majorUnit),this.getTickPositions(t.minorUnit,e)},Ri.prototype.axisType=function(){return Bi},Ri);function Ri(){Bi.apply(this,arguments)}z(Ve.prototype,Me);var Ei,Li=Ve,Fe=((Ei=Si)&&(Ii.__proto__=Ei),((Ii.prototype=Object.create(Ei&&Ei.prototype)).constructor=Ii).prototype.radarMajorGridLinePositions=function(){var e=[];return this.traverseMajorTicksPositions(function(t){e.push(t)},this.options.majorGridLines),e},Ii.prototype.radarMinorGridLinePositions=function(){var e=[];return this.traverseMinorTicksPositions(function(t){e.push(t)},this.options.minorGridLines),e},Ii.prototype.axisType=function(){return Ei},Ii);function Ii(){Ei.apply(this,arguments)}z(Fe.prototype,Me);var zi=Fe;function Vi(t){return t<=0?-1:1}var ji,Di,Hi=((Di=P.Class)&&(Ni.__proto__=Di),((Ni.prototype=Object.create(Di&&Di.prototype)).constructor=Ni).prototype.process=function(t){var e=t.slice(0),o=[],i=this.closed,r=e.length;if(2<r&&(this.removeDuplicates(0,e),r=e.length),r<2||2===r&&e[0].equals(e[1]))return o;var n,s=e[0],a=e[1],h=e[2];for(o.push(new P.geometry.Segment(s));s.equals(e[r-1]);)i=!0,e.pop(),r--;if(2===r){t=this.tangent(s,a,v,m);return vt(o).controlOut(this.firstControlPoint(t,s,a,v,m)),o.push(new P.geometry.Segment(a,this.secondControlPoint(t,s,a,v,m))),o}i?(s=e[r-1],a=e[0],h=e[1],l=(n=this.controlPoints(s,a,h))[1],c=n[0]):(n=this.tangent(s,a,v,m),l=this.firstControlPoint(n,s,a,v,m));for(var p,l,c,u=l,d=0;d<=r-3;d++)this.removeDuplicates(d,e),d+3<=(r=e.length)&&(s=e[d],a=e[d+1],h=e[d+2],p=this.controlPoints(s,a,h),vt(o).controlOut(u),u=p[1],p=p[0],o.push(new P.geometry.Segment(a,p)));return i?(s=e[r-2],a=e[r-1],h=e[0],l=this.controlPoints(s,a,h),vt(o).controlOut(u),o.push(new P.geometry.Segment(a,l[0])),vt(o).controlOut(l[1]),o.push(new P.geometry.Segment(h,c))):(c=this.tangent(a,h,v,m),vt(o).controlOut(u),o.push(new P.geometry.Segment(h,this.secondControlPoint(c,a,h,v,m)))),o},Ni.prototype.removeDuplicates=function(t,e){for(;e[t+1]&&(e[t].equals(e[t+1])||e[t+1].equals(e[t+2]));)e.splice(t+1,1)},Ni.prototype.invertAxis=function(t,e,o){var i,r=!1;return t.x===e.x?r=!0:e.x===o.x?(e.y<o.y&&t.y<=e.y||o.y<e.y&&e.y<=t.y)&&(r=!0):(i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x),t.y<=e.y&&o.y<=i||e.y<=t.y&&o.y>=i||(r=!0)),r},Ni.prototype.isLine=function(t,e,o){var i=this.lineFunction(t,e),i=this.calculateFunction(i,o.x);return t.x===e.x&&e.x===o.x||bt(i,1)===bt(o.y,1)},Ni.prototype.lineFunction=function(t,e){e=(e.y-t.y)/(e.x-t.x);return[t.y-e*t.x,e]},Ni.prototype.controlPoints=function(t,e,o){var i,r=v,n=m,s=!1,a=!1;this.isLine(t,e,o)?i=this.tangent(t,e,v,m):(h={x:this.isMonotonicByField(t,e,o,v),y:this.isMonotonicByField(t,e,o,m)}).x&&h.y?(i=this.tangent(t,o,v,m),s=!0):(this.invertAxis(t,e,o)&&(r=m,n=v),h[r]?i=0:(i=.01*(o[n]<t[n]&&t[n]<=e[n]||t[n]<o[n]&&e[n]<=t[n]?Vi((o[n]-t[n])*(e[r]-t[r])):-Vi((o[r]-t[r])*(e[n]-t[n]))),a=!0));var h=this.secondControlPoint(i,t,e,r,n);a&&(a=r,r=n,n=a);n=this.firstControlPoint(i,e,o,r,n);return s&&(this.restrictControlPoint(t,e,h,i),this.restrictControlPoint(e,o,n,i)),[h,n]},Ni.prototype.restrictControlPoint=function(t,e,o,i){t.y<e.y?e.y<o.y?(o.x=t.x+(e.y-t.y)/i,o.y=e.y):o.y<t.y&&(o.x=e.x-(e.y-t.y)/i,o.y=t.y):o.y<e.y?(o.x=t.x-(t.y-e.y)/i,o.y=e.y):t.y<o.y&&(o.x=e.x+(t.y-e.y)/i,o.y=t.y)},Ni.prototype.tangent=function(t,e,o,i){o=e[o]-t[o],i=e[i]-t[i];return 0==o?0:i/o},Ni.prototype.isMonotonicByField=function(t,e,o,i){return o[i]>e[i]&&e[i]>t[i]||o[i]<e[i]&&e[i]<t[i]},Ni.prototype.firstControlPoint=function(t,e,o,i,r){var n=e[i],o=.333*(o[i]-n);return this.point(n+o,e[r]+o*t,i,r)},Ni.prototype.secondControlPoint=function(t,e,o,i,r){var n=e[i],e=o[i],n=.333*(e-n);return this.point(e-n,o[r]-n*t,i,r)},Ni.prototype.point=function(t,e,o,i){var r=new P.geometry.Point;return r[o]=t,r[i]=e,r},Ni.prototype.calculateFunction=function(t,e){for(var o=t.length,i=0,r=0;r<o;r++)i+=Math.pow(e,r)*t[r];return i},Ni),Ui=((ji=P.Class)&&(Fi.__proto__=ji),((Fi.prototype=Object.create(ji&&ji.prototype)).constructor=Fi).prototype.value=function(t){var e=this._axis;return e.getCategory?e.getCategory(t):e.getValue(t)},Fi.prototype.slot=function(t,e,o){return this._axis.slot(t,e,o=void 0===o?!0:o)},Fi.prototype.range=function(){return this._axis.range()},Fi.prototype.valueRange=function(){return this._axis.valueRange()},Fi);function Fi(t){ji.call(this),this._axis=t,this.options=t.options}function Ni(t){Di.call(this),this.closed=t}function Gi(t,e){for(var o=0;o<e.length;o++)if(e[o].options.name===t)return e[o].prepareUserOptions(),new Ui(e[o])}function Wi(t){this.visual=t.visual,this.chartsVisual=t.chartContainer.visual,this._pane=t}Wi.prototype.findAxisByName=function(t){return Gi(t,this._pane.axes)};var Xi,qi=Wi,Yi=((Xi=P.Class)&&(Zi.__proto__=Xi),(Zi.prototype=Object.create(Xi&&Xi.prototype)).constructor=Zi);function Zi(t){Xi.call(this),this._plotArea=t,this.visual=t.visual,this.backgroundVisual=t._bgVisual}function Qi(t){for(var e=t.length,o=0,i=0;i<e;i++)O(t[i])&&o++;return o}var Ki={min:function(t){for(var e=t.length,o=l,i=0;i<e;i++){var r=t[i];O(r)&&(o=Math.min(o,r))}return o===l?t[0]:o},max:function(t){for(var e=t.length,o=c,i=0;i<e;i++){var r=t[i];O(r)&&(o=Math.max(o,r))}return o===c?t[0]:o},sum:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];O(r)&&(o+=r)}return o},sumOrNull:function(t){var e=null;return e=Qi(t)?Ki.sum(t):e},count:function(t){for(var e=t.length,o=0,i=0;i<e;i++){var r=t[i];null!==r&<(r)&&o++}return o},avg:function(t){var e=Qi(t),o=t[0];return o=0<e?Ki.sum(t)/e:o},first:function(t){for(var e=t.length,o=0;o<e;o++){var i=t[o];if(null!==i&<(i))return i}return t[0]}},$i=Ki;function Ji(t,e){return null===e?e:Y(t)(e)}var tr,Xe=((tr=P.Class)&&(er.__proto__=tr),((er.prototype=Object.create(tr&&tr.prototype)).constructor=er).prototype.register=function(t,e,o){void 0===e&&(e=[p]),void 0===o&&(o={});for(var i=0;i<t.length;i++){var r=t[i];this._valueFields[r]=e,this._otherFields[r]=o,this._nullValue[r]=this._makeValue(e,null),this._undefinedValue[r]=this._makeValue(e,void 0)}},er.prototype.canonicalFields=function(t){return this.valueFields(t).concat(this.otherFields(t))},er.prototype.valueFields=function(t){return this._valueFields[t.type]||[p]},er.prototype.otherFields=function(t){return this._otherFields[t.type]||[p]},er.prototype.bindPoint=function(t,e,o){var i,r,n,s=t.data,a=lt(o)?o:s[e],h={valueFields:{value:a}},o=this.valueFields(t),s=this._otherFields[t.type];return null===a?i=this._nullValue[t.type]:lt(a)?Array.isArray(a)?(n=a.slice(o.length),i=this._bindFromArray(a,o),r=this._bindFromArray(n,s)):"object"==typeof a&&(e=this.sourceFields(t,o),n=this.sourceFields(t,s),i=this._bindFromObject(a,o,e),r=this._bindFromObject(a,s,n)):i=this._undefinedValue[t.type],lt(i)&&(1===o.length?h.valueFields.value=i[o[0]]:h.valueFields=i),h.fields=r||{},h},er.prototype._makeValue=function(t,e){for(var o={},i=t.length,r=0;r<i;r++)o[t[r]]=e;return o},er.prototype._bindFromArray=function(t,e){var o={};if(e)for(var i=Math.min(e.length,t.length),r=0;r<i;r++)o[e[r]]=t[r];return o},er.prototype._bindFromObject=function(t,e,o){void 0===o&&(o=e);var i={};if(e)for(var r=e.length,n=0;n<r;n++){var s=e[n],a=o[n];null!==a&&(i[s]=Ji(a,t))}return i},er.prototype.sourceFields=function(t,e){var o=[];if(e)for(var i=e.length,r=0;r<i;r++){var n=e[r],s=n===p?"field":n+"Field";o.push(null!==t[s]?t[s]||n:null)}return o},er);function er(){tr.call(this),this._valueFields={},this._otherFields={},this._nullValue={},this._undefinedValue={}}Xe.current=new Xe;var or,ir,rr=Xe,nr=/percent(?:\w*)\((\d+)\)/,sr=new RegExp("^stddev(?:\\((\\d+(?:\\.\\d+)?)\\))?$"),ar=((ir=P.Class)&&(Cr.__proto__=ir),((Cr.prototype=Object.create(ir&&ir.prototype)).constructor=Cr).prototype.initGlobalRanges=function(t,e,o){var i,r,n,s,a=e.data,h=sr.exec(t);h?(this.valueGetter=this.createValueGetter(e,o),i=this.getAverage(a),r=this.getStandardDeviation(a,i,!1),h=h[1]?parseFloat(h[1]):1,n={low:i.value-r*h,high:i.value+r*h},this.globalRange=function(){return n}):t.indexOf&&0<=t.indexOf("stderr")&&(this.valueGetter=this.createValueGetter(e,o),s=this.getStandardError(a,this.getAverage(a)),this.globalRange=function(t){return{low:t-s,high:t+s}})},Cr.prototype.createValueGetter=function(t,e){var o,i=t.data,r=rr.current,n=r.valueFields(t),i=lt(i[0])?i[0]:{};return x(i)?o=Y("["+(e?n.indexOf(e):0)+"]"):O(i)?o=Y():"object"==typeof i&&(o=Y(r.sourceFields(t,n)[n.indexOf(e)])),o},Cr.prototype.getErrorRange=function(t,e){if(!lt(e))return null;if(this.globalRange)return this.globalRange(t);if(x(e))i=t-e[0],r=t+e[1];else if(O(o=parseFloat(e)))i=t-o,r=t+o;else{if(!(o=nr.exec(e)))throw new Error("Invalid ErrorBar value: "+e);var o=t*(parseFloat(o[1])/100),i=t-Math.abs(o),r=t+Math.abs(o)}return{low:i,high:r}},Cr.prototype.getStandardError=function(t,e){return this.getStandardDeviation(t,e,!0)/Math.sqrt(e.count)},Cr.prototype.getStandardDeviation=function(t,e,o){for(var i=t.length,o=o?e.count-1:e.count,r=0,n=0;n<i;n++){var s=this.valueGetter(t[n]);O(s)&&(r+=Math.pow(s-e.value,2))}return Math.sqrt(r/o)},Cr.prototype.getAverage=function(t){for(var e=t.length,o=0,i=0,r=0;r<e;r++){var n=this.valueGetter(t[r]);O(n)&&(o+=n,i++)}return{value:o/i,count:i}},Cr),hr=(P.support.browser||{}).msie?.001:0,pr="zero",lr="interpolate",cr="bar",ur="column",dr="line",fr="pie",gr="verticalLine",yr=[cr,ur,"ohlc","candlestick","boxPlot","verticalBoxPlot","bullet","rangeColumn","rangeBar","waterfall","horizontalWaterfall"],vr="drag",mr="dragEnd",xr="zoom",_r="zoomEnd",br="DOMMouseScroll mousewheel",Ke=((or=le)&&(wr.__proto__=or),((wr.prototype=Object.create(or&&or.prototype)).constructor=wr).prototype.reflow=function(t){var e,o=this.options.endCaps,i=this.isVertical,r=this.getAxis().getSlot(this.low,this.high),n=t.center(),s=this.getCapsWidth(t,i),a=i?n.x:n.y,t=a-s,s=a+s;i?(e=[new Nt(n.x,r.y1),new Nt(n.x,r.y2)],o&&e.push(new Nt(t,r.y1),new Nt(s,r.y1),new Nt(t,r.y2),new Nt(s,r.y2)),this.box=new qt(t,r.y1,s,r.y2)):(e=[new Nt(r.x1,n.y),new Nt(r.x2,n.y)],o&&e.push(new Nt(r.x1,t),new Nt(r.x1,s),new Nt(r.x2,t),new Nt(r.x2,s)),this.box=new qt(r.x1,t,r.x2,s)),this.linePoints=e},wr.prototype.getCapsWidth=function(t,e){t=e?t.width():t.height();return Math.min(Math.floor(t/2),4)||4},wr.prototype.createVisual=function(){var e=this,t=this.options,o=t.visual;o?this.visual=o({low:this.low,high:this.high,rect:this.box.toRect(),sender:this.getSender(),options:{endCaps:t.endCaps,color:t.color,line:t.line},createVisual:function(){e.createDefaultVisual();var t=e.visual;return delete e.visual,t}}):this.createDefaultVisual()},wr.prototype.createDefaultVisual=function(){var t=this.options,e=this.linePoints,o={stroke:{color:t.color,width:t.line.width,dashType:t.line.dashType}};or.prototype.createVisual.call(this);for(var i=0;i<e.length;i+=2){var r=new P.drawing.Path(o).moveTo(e[i].x,e[i].y).lineTo(e[i+1].x,e[i+1].y);T(r),this.visual.append(r)}},wr);function wr(t,e,o,i,r,n){or.call(this,n),this.low=t,this.high=e,this.isVertical=o,this.chart=i,this.series=r}function Cr(t,e,o){ir.call(this),this.initGlobalRanges(t,e,o)}kt(Ke,{animation:{type:"fadeIn",delay:600},endCaps:!0,line:{width:2},zIndex:1});var Sr,kr=Ke,Ar=((Sr=kr)&&(Pr.__proto__=Sr),((Pr.prototype=Object.create(Sr&&Sr.prototype)).constructor=Pr).prototype.getAxis=function(){return this.chart.seriesValueAxis(this.series)},Pr);function Pr(){Sr.apply(this,arguments)}function Tr(t,e,o,i){void 0===i&&(i=!1);var r,n,s=(o=void 0===o?{}:o).defaults=o.defaults||{},a=o.depth=o.depth||0,h=!1;if(o.excluded=o.excluded||[],5<a)return null;for(r in t)!J(r,o.excluded)&&t.hasOwnProperty(r)&&(E(n=t[r])?(h=!0,i||(t[r]=Ct(n(e),s[r]))):V(n)&&(i||(o.defaults=s[r]),o.depth++,h=Tr(n,e,o,i)||h,o.depth--));return h}function Mr(t){for(var e=t.length,o=0,i=0;i<e;i++)o=Math.max(o,t[i].data.length);return o}var Or,eo=((Or=le)&&(Br.__proto__=Or),((Br.prototype=Object.create(Or&&Or.prototype)).constructor=Br).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},Br.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=z({},o,{vertical:!this.options.invertAxes},t)),i},Br.prototype.plotValue=function(t){if(!t)return 0;if(this.options.isStacked100&&O(t.value)){for(var e=t.categoryIx,o=this.categoryPoints[e],i=[],r=0,n=0;n<o.length;n++){var s,a,h=o[n];h&&(s=t.series.stack,a=h.series.stack,s&&a&&s.group!==a.group||O(h.value)&&(r+=Math.abs(h.value),i.push(Math.abs(h.value))))}if(0<r)return t.value/r}return t.value},Br.prototype.plotRange=function(t,e){void 0===e&&(e=0);var o=this.categoryPoints[t.categoryIx];if(this.options.isStacked){for(var i=this.plotValue(t),r=0<=i,n=e,s=!1,a=0;a<o.length;a++){var h=o[a];if(t===h)break;var p=t.series.stack,l=h.series.stack;if(p&&l){if(typeof p===f&&p!==l)continue;if(p.group&&p.group!==l.group)continue}h=this.plotValue(h);(0<=h&&r||h<0&&!r)&&(n+=h,i+=h,s=!0,this.options.isStacked100&&(i=Math.min(i,1)))}return s&&(n-=e),[n,i]}e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,R(t.value)?t.value:e]},Br.prototype.stackLimits=function(t,e){for(var o=l,i=c,r=0;r<this.categoryPoints.length;r++){var n=this.categoryPoints[r];if(n)for(var s=0;s<n.length;s++){var a=n[s];!a||a.series.stack!==e&&a.series.axis!==t||(a=this.plotRange(a,0)[1],lt(a)&&isFinite(a)&&(i=Math.max(i,a),o=Math.min(o,a)))}}return{min:o,max:i}},Br.prototype.updateStackRange=function(){var t=this.options,e=t.isStacked,o=t.series,i={};if(e)for(var r=0;r<o.length;r++){var n=o[r],s=n.axis,a=s+n.stack,h=i[a];h||(h=this.stackLimits(s,n.stack),(n=this.errorTotals)&&(n.negative.length&&(h.min=Math.min(h.min,At(n.negative).min)),n.positive.length&&(h.max=Math.max(h.max,At(n.positive).max))),h.min!==l||h.max!==c?i[a]=h:h=null),h&&(this.valueAxisRanges[s]=h)}},Br.prototype.addErrorBar=function(t,e,o){var i,r=t.value,n=t.series,s=t.seriesIx,a=t.options.errorBars,h=e.fields.errorLow,e=e.fields.errorHigh;O(h)&&O(e)?i={low:h,high:e}:a&<(a.value)&&(this.seriesErrorRanges=this.seriesErrorRanges||[],this.seriesErrorRanges[s]=this.seriesErrorRanges[s]||new ar(a.value,n,p),i=this.seriesErrorRanges[s].getErrorRange(r,a.value)),i&&(t.low=i.low,t.high=i.high,this.addPointErrorBar(t,o))},Br.prototype.addPointErrorBar=function(t,e){var o,i=!this.options.invertAxes,r=t.options.errorBars,n=t.series,s=t.low,a=t.high;this.options.isStacked?(s=(o=this.stackedErrorRange(t,e)).low,a=o.high):(this.updateRange({value:s},e={categoryIx:e,series:n}),this.updateRange({value:a},e));r=new Ar(s,a,i,this,n,r);t.errorBars=[r],t.append(r)},Br.prototype.stackedErrorRange=function(t,e){var o=this.plotRange(t,0)[1]-t.value,i=t.low+o,o=t.high+o;return this.errorTotals=this.errorTotals||{positive:[],negative:[]},i<0&&(this.errorTotals.negative[e]=Math.min(this.errorTotals.negative[e]||0,i)),0<o&&(this.errorTotals.positive[e]=Math.max(this.errorTotals.positive[e]||0,o)),{low:i,high:o}},Br.prototype.addValue=function(t,e){var o=e.categoryIx,i=e.series,r=e.seriesIx,n=this.categoryPoints[o];n||(this.categoryPoints[o]=n=[]);var s=this.seriesPoints[r];s||(this.seriesPoints[r]=s=[]);r=this.createPoint(t,e);r&&(Object.assign(r,e),r.owner=this,r.noteText=t.fields.noteText,lt(r.dataItem)||(r.dataItem=i.data[o]),this.addErrorBar(r,t,o)),this.points.push(r),s.push(r),n.push(r),this.updateRange(t.valueFields,e)},Br.prototype.evalPointOptions=function(t,e,o,i,r,n){var s={defaults:r._defaults,excluded:["data","aggregate","_events","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},a=this._evalSeries[n];lt(a)||(this._evalSeries[n]=a=Tr(t,{},s,!0));n=t;return a&&Tr(n=z({},t),{value:e,category:o,index:i,series:r,dataItem:r.data[i]},s),n},Br.prototype.updateRange=function(t,e){var o=e.series.axis,e=t.value,t=this.valueAxisRanges[o];isFinite(e)&&null!==e&&((t=this.valueAxisRanges[o]=t||{min:l,max:c}).min=Math.min(t.min,e),t.max=Math.max(t.max,e))},Br.prototype.seriesValueAxis=function(t){var e=this.plotArea,t=t.axis,e=t?e.namedValueAxes[t]:e.valueAxis;if(!e)throw new Error("Unable to locate value axis with name "+t);return e},Br.prototype.reflow=function(t){var s=this,a=this.categorySlots=[],h=this.points,p=this.categoryAxis,l=0;this.traverseDataPoints(function(t,e){var o=e.categoryIx,i=e.series,r=s.seriesValueAxis(i),n=h[l++],e=a[o];e||(a[o]=e=s.categorySlot(p,o,r)),n&&(i=s.plotRange(n,r.startValue()),(o=s.valueSlot(r,i))?(o=s.pointSlot(e,o),n.aboveAxis=s.aboveAxis(n,r),n.stackValue=i[1],s.options.isStacked100&&(n.percentage=s.plotValue(n)),s.reflowPoint(n,o)):n.visible=!1)}),this.reflowCategories(a),!this.options.clip&&this.options.limitPoints&&this.points.length&&this.limitPoints(),this.box=t},Br.prototype.valueSlot=function(t,e){return t.getSlot(e[0],e[1],!this.options.clip)},Br.prototype.limitPoints=function(){for(var t=this.categoryPoints,e=t[0].concat(vt(t)),o=0;o<e.length;o++)e[o]&&this.limitPoint(e[o])},Br.prototype.limitPoint=function(t){var e=this.categoryAxis.limitSlot(t.box);e.equals(t.box)||t.reflow(e)},Br.prototype.aboveAxis=function(t,e){var o=this.categoryAxisCrossingValue(e),t=t.value;return e.options.reverse?t<o:o<=t},Br.prototype.categoryAxisCrossingValue=function(t){var e=this.categoryAxis,t=t.options;return[].concat(t.axisCrossingValues||t.axisCrossingValue)[e.axisIndex||0]||0},Br.prototype.reflowPoint=function(t,e){t.reflow(e)},Br.prototype.reflowCategories=function(){},Br.prototype.pointSlot=function(t,e){var o=this.options.invertAxes,i=o?e:t,e=o?t:e;return new qt(i.x1,e.y1,i.x2,e.y2)},Br.prototype.categorySlot=function(t,e){return t.getSlot(e)},Br.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=Mr(e),i=e.length,r=0;r<i;r++)this._outOfRangeCallback(e[r],"_outOfRangeMinPoint",r,t);for(var n=0;n<o;n++)for(var s=0;s<i;s++){var a=e[s],h=this.categoryAxis.categoryAt(n);t(this._bindPoint(a,s,n),{category:h,categoryIx:n,categoriesCount:o,series:a,seriesIx:s})}for(var p=0;p<i;p++)this._outOfRangeCallback(e[p],"_outOfRangeMaxPoint",p,t)},Br.prototype._outOfRangeCallback=function(t,e,o,i){var r=t[e];r&&(e=r.categoryIx,i(this._bindPoint(t,o,e,r.item),{category:r.category,categoryIx:e,series:t,seriesIx:o,dataItem:r.item}))},Br.prototype._bindPoint=function(t,e,o,i){this._bindCache||(this._bindCache=[]);var r=this._bindCache[e];return(r=r||(this._bindCache[e]=[]))[o]||(r[o]=rr.current.bindPoint(t,o,i))},Br.prototype.formatPointValue=function(t,e){return null===t.value?"":this.chartService.format.auto(e,t.value)},Br.prototype.pointValue=function(t){return t.valueFields.value},Br);function Br(t,e){Or.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.categoryAxis=t.seriesCategoryAxis(e.series[0]),this.valueAxisRanges={},this.points=[],this.categoryPoints=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[],this.render()}kt(eo,{series:[],invertAxes:!1,isStacked:!1,clip:!0,limitPoints:!0});var Rr,Er=eo,Lr={click:function(t,e){return t.trigger("seriesClick",this.eventArgs(e))},hover:function(t,e){return t.trigger("seriesHover",this.eventArgs(e))},over:function(t,e){return t.trigger("seriesOver",this.eventArgs(e))},out:function(t,e){return t.trigger("seriesLeave",this.eventArgs(e))},eventArgs:function(t){return{value:this.value,percentage:this.percentage,stackValue:this.stackValue,category:this.category,series:this.series,dataItem:this.dataItem,runningTotal:this.runningTotal,total:this.total,element:gt(t),originalEvent:t,point:this}}},ro={createNote:function(){var t=this.options.notes,e=this.noteText||t.label.text;!1!==t.visible&<(e)&&null!==e&&(this.note=new Ze({value:this.value,text:e,dataItem:this.dataItem,category:this.category,series:this.series},this.options.notes,this.owner.chartService),this.append(this.note))}},uo=((Rr=le)&&(Ir.__proto__=Rr),((Ir.prototype=Object.create(Rr&&Rr.prototype)).constructor=Ir).prototype.render=function(){var t,e=this.options,o=e.markers,i=e.labels;this._rendered||(this._rendered=!0,o.visible&&o.size&&(this.marker=this.createMarker(),this.append(this.marker)),i.visible&&(t=W(i),e=this.pointData(),o=this.value,t?o=t(e):i.format&&(o=this.formatValue(i.format)),this.label=new ze(o,z({align:C,vAlign:C,margin:{left:5,right:5},zIndex:Ct(i.zIndex,this.series.zIndex)},i),e),this.append(this.label)),this.createNote(),this.errorBar&&this.append(this.errorBar))},Ir.prototype.markerBorder=function(){var t=this.options.markers,e=t.background,t=z({color:this.color},t.border);return lt(t.color)||(t.color=new P.Color(e).brightness(.8).toHex()),t},Ir.prototype.createVisual=function(){},Ir.prototype.createMarker=function(){var t=this.options.markers;return new ve({type:t.type,width:t.size,height:t.size,rotation:t.rotation,background:t.background,border:this.markerBorder(),opacity:this.series.opacity||t.opacity,zIndex:Ct(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category})},Ir.prototype.markerBox=function(){return this.marker||(this.marker=this.createMarker(),this.marker.reflow(this._childBox)),this.marker.box},Ir.prototype.reflow=function(t){var e=this.options,o=this.aboveAxis,i=e.vertical;this.render();var r=(this.box=t).clone();if(i?o?r.y1-=r.height():r.y2+=r.height():o?r.x1+=r.width():r.x2-=r.width(),this._childBox=r,this.marker&&this.marker.reflow(r),this.reflowLabel(r),this.errorBars)for(var n=0;n<this.errorBars.length;n++)this.errorBars[n].reflow(r);this.note&&(o=this.markerBox(),e.markers.visible&&e.markers.size||(e=o.center(),o=new qt(e.x,e.y,e.x,e.y)),this.note.reflow(o))},Ir.prototype.reflowLabel=function(t){var e=this.options,o=this.label,e=e.labels.position;o&&(e="below"===(e="above"===e?A:e)?w:e,o.reflow(t),o.box.alignTo(this.markerBox(),e),o.reflow(o.box))},Ir.prototype.createHighlight=function(){var t=this.options.highlight.markers,e=this.markerBorder().color,o=this.options.markers,i=o.size+(o.border.width||0)+(t.border.width||0),t=new ve({type:o.type,width:i,height:i,rotation:o.rotation,background:t.color||e,border:{color:t.border.color,width:t.border.width,opacity:Ct(t.border.opacity,1)},opacity:Ct(t.opacity,1)});return t.reflow(this._childBox),t.getElement()},Ir.prototype.highlightVisual=function(){return(this.marker||{}).visual},Ir.prototype.highlightVisualArgs=function(){var t,e,o,i,r=this.marker;return r?(i=r.paddingBox.toRect(),t=r.visual):(o=(e=this.options.markers.size)/2,r=this.box.center(),i=new P.geometry.Rect([r.x-o,r.y-o],[e,e])),{options:this.options,rect:i,visual:t}},Ir.prototype.tooltipAnchor=function(){var t=this.markerBox(),e=this.owner.pane.clipBox();if(!e||e.overlaps(t)){var o,i=t.x2+5,e=S,t=this.aboveAxis?(o=t.y1,w):(o=t.y2,A);return{point:new Nt(i,o),align:{horizontal:e,vertical:t}}}},Ir.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Ir.prototype.overlapsBox=function(t){return this.markerBox().overlaps(t)},Ir.prototype.unclipElements=function(){this.label&&(this.label.options.noclip=!0),this.note&&(this.note.options.noclip=!0)},Ir.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,series:this.series}},Ir);function Ir(t,e){Rr.call(this),this.value=t,this.options=e,this.aboveAxis=Ct(this.options.aboveAxis,!0),this.tooltipTracking=!0}uo.prototype.defaults={vertical:!0,markers:{visible:!0,background:a,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,position:"above",margin:U(3),padding:U(4),animation:{type:"fadeIn",delay:600}},notes:{label:{}},highlight:{markers:{border:{color:"#fff",width:2}},zIndex:100},errorBars:{line:{width:1}}},z(uo.prototype,Lr),z(uo.prototype,ro);var zr,Vr=uo,at=((zr=le)&&(jr.__proto__=zr),((jr.prototype=Object.create(zr&&zr.prototype)).constructor=jr).prototype.points=function(){return this.toGeometryPoints(this.linePoints)},jr.prototype.toGeometryPoints=function(t){for(var e=[],o=0,i=t.length;o<i;o++)t[o]&&!1!==t[o].visible&&e.push(t[o]._childBox.toRect().center());return e},jr.prototype.createVisual=function(){var t=this,e=this.series.visual;e?(this.visual=e({points:this.toGeometryPoints(this.linePoints),series:this.series,sender:this.getSender(),createVisual:function(){return t.segmentVisual(),t.visual}}),this.visual&&!lt(this.visual.options.zIndex)&&(this.visual.options.zIndex=this.series.zIndex)):this.segmentVisual()},jr.prototype.segmentVisual=function(){var t=this.options,e=this.series,o=e.color,i=e._defaults;E(o)&&i&&(o=i.color);e=P.drawing.Path.fromPoints(this.points(),{stroke:{color:o,width:e.width,opacity:e.opacity,dashType:e.dashType},zIndex:e.zIndex});t.closed&&e.close(),this.visual=e},jr.prototype.aliasFor=function(t,e){return this.parent.getNearestPoint(e.x,e.y,this.seriesIx)},jr);function jr(t,e,o){zr.call(this),this.linePoints=t,this.series=e,this.seriesIx=o}kt(at,{closed:!1});var Dr=at;function Hr(t,e,o,i,r){var n=t.box,t=new P.geometry.Point;return t[e]=n[e+o],t[i]=n[i+r],t}var Ur,Vt={calculateStepPoints:function(t){for(var e=this.parent.plotArea.seriesCategoryAxis(this.series).options,o=e.justified,i=e.vertical,e=e.reverse,r=i?v:m,n=i?m:v,s=e?2:1,a=s,h=Hr(t[0],r,s,n,a),p=[h],l=1;l<t.length;l++){var c,u=Hr(t[l],r,s,n,a);h[r]!==u[r]&&((c=new P.geometry.Point)[r]=h[r],c[n]=u[n],p.push(c,u)),h=u}return o?h!==vt(p)&&p.push(h):p.push(Hr(vt(t),r,s,n,e?1:2)),p}},ee=((Ur=Dr)&&(Fr.__proto__=Ur),((Fr.prototype=Object.create(Ur&&Ur.prototype)).constructor=Fr).prototype.points=function(){return this.calculateStepPoints(this.linePoints)},Fr);function Fr(){Ur.apply(this,arguments)}z(ee.prototype,Vt);var Nr,Gr,Wr=ee,Xr=((Gr=Dr)&&(Yr.__proto__=Gr),((Yr.prototype=Object.create(Gr&&Gr.prototype)).constructor=Yr).prototype.segmentVisual=function(){var t=this.series,e=t._defaults,o=t.color;E(o)&&e&&(o=e.color);e=new Hi(this.options.closed).process(this.points()),t=new P.drawing.Path({stroke:{color:o,width:t.width,opacity:t.opacity,dashType:t.dashType},zIndex:t.zIndex});t.segments.push.apply(t.segments,e),this.visual=t},Yr),It={renderSegments:function(){var t,e=this.options,o=this.seriesPoints,i=e.series,r=o.length;this._segments=[];for(var n=0;n<r;n++){for(var s=i[n],a=this.sortPoints(o[n]),h=a.length,p=[],l=0;l<h;l++){var c=a[l];c?p.push(c):this.seriesMissingValues(s)!==lr&&(1<p.length&&(t=this.createSegment(p,s,n,t),this._addSegment(t)),p=[])}1<p.length&&(t=this.createSegment(p,s,n,t),this._addSegment(t))}this.children.unshift.apply(this.children,this._segments)},_addSegment:function(t){this._segments.push(t),t.parent=this},sortPoints:function(t){return t},seriesMissingValues:function(t){t=t.missingValues;return!t&&this.options.isStacked?pr:t||lr},getNearestPoint:function(t,e,o){for(var i,r=new Nt(t,e),n=this.seriesPoints[o],s=l,a=0;a<n.length;a++){var h,p=n[a];p&<(p.value)&&null!==p.value&&!1!==p.visible&&((h=p.box.center().distanceTo(r))<s&&(i=p,s=h))}return i}},ae=((Nr=P.drawing.Animation)&&(qr.__proto__=Nr),((qr.prototype=Object.create(Nr&&Nr.prototype)).constructor=qr).prototype.setup=function(){this._setEnd(this.options.box.x1)},qr.prototype.step=function(t){var e=this.options.box;this._setEnd(tt(e.x1,e.x2,t))},qr.prototype._setEnd=function(t){var e=this.element,o=e.segments,i=o[1].anchor(),o=o[2].anchor();e.suspend(),i.setX(t),e.resume(),o.setX(t)},qr);function qr(){Nr.apply(this,arguments)}function Yr(){Gr.apply(this,arguments)}kt(ae,{duration:600}),P.drawing.AnimationFactory.current.register("clip",ae);var Zr=ae;function Qr(t){for(var e=0;e<t.length;e++)if(lt(t[e].zIndex))return!0}var Kr,ce={createAnimation:function(){var t,e=this.getRoot();e&&!1!==(e.options||{}).transitions&&(t=e.size(),e=P.drawing.Path.fromRect(t.toRect()),this.visual.clip(e),this.animation=new Zr(e,{box:t}),Qr(this.options.series)&&this._setChildrenAnimation(e))},_setChildrenAnimation:function(t){for(var e=this.animationPoints(),o=0;o<e.length;o++){var i=e[o];i&&i.visual&<(i.visual.options.zIndex)&&i.visual.clip(t)}}},_e=((Kr=Er)&&($r.__proto__=Kr),(($r.prototype=Object.create(Kr&&Kr.prototype)).constructor=$r).prototype.render=function(){Kr.prototype.render.call(this),this.updateStackRange(),this.renderSegments()},$r.prototype.pointType=function(){return Vr},$r.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.seriesMissingValues(r),e=t.valueFields.value;if(!lt(e)||null===e){if(s!==pr)return null;e=0}s=this.pointOptions(r,n),s=this.evalPointOptions(s,e,i,o,r,n),t=t.fields.color||r.color;E(r.color)&&(t=s.color);s=new Vr(e,s);return s.color=t,this.append(s),s},$r.prototype.plotRange=function(t){var e=this.plotValue(t);if(this.options.isStacked)for(var o=t.categoryIx,i=this.categoryPoints[o],r=0;r<i.length;r++){var n=i[r];if(t===n)break;e+=this.plotValue(n),this.options.isStacked100&&(e=Math.min(e,1))}return[e,e]},$r.prototype.createSegment=function(t,e,o){var i=e.style;return new("step"===i?Wr:"smooth"===i?Xr:Dr)(t,e,o)},$r.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e.concat(this._segments)},$r.prototype.supportsPointInactiveOpacity=function(){return!1},$r);function $r(){Kr.apply(this,arguments)}z(_e.prototype,It,ce);var Jr,tn,en=_e,on=((tn=Dr)&&(nn.__proto__=tn),((nn.prototype=Object.create(tn&&tn.prototype)).constructor=nn).prototype.createVisual=function(){var t=this.series,e=t._defaults,o=t.line||{},i=t.color;E(i)&&e&&(i=e.color),this.visual=new P.drawing.Group({zIndex:t.zIndex}),this.createFill({fill:{color:i,opacity:t.opacity},stroke:null}),0<o.width&&!1!==o.visible&&this.createStroke({stroke:z({color:i,opacity:t.opacity,lineCap:"butt"},o)})},nn.prototype.strokeSegments=function(){return this._strokeSegments||(this._strokeSegments=this.createStrokeSegments())},nn.prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.points())},nn.prototype.stackSegments=function(){return(this.prevSegment||this).createStackSegments(this.stackPoints)},nn.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.toGeometryPoints(t)).reverse()},nn.prototype.segmentsFromPoints=function(t){return t.map(function(t){return new P.geometry.Segment(t)})},nn.prototype.createStroke=function(t){t=new P.drawing.Path(t);t.segments.push.apply(t.segments,this.strokeSegments()),this.visual.append(t)},nn.prototype.hasStackSegment=function(){return this.prevSegment||this.stackPoints&&this.stackPoints.length},nn.prototype.createFill=function(t){var e,o=this.strokeSegments(),i=o.slice(0),r=this.hasStackSegment();r&&(e=this.stackSegments(),ht(i,e));t=new P.drawing.Path(t);t.segments.push.apply(t.segments,i),!r&&1<o.length&&this.fillToAxes(t),this.visual.append(t)},nn.prototype.fillToAxes=function(t){var e=this.parent,o=e.options.invertAxes,i=e.seriesValueAxis(this.series),r=e.categoryAxisCrossingValue(i),e=i.getSlot(r,r,!0),i=this.strokeSegments(),r=i[0].anchor(),i=vt(i).anchor(),e=o?e.x1:e.y1;o?t.lineTo(e,i.y).lineTo(e,r.y):t.lineTo(i.x,e).lineTo(r.x,e)},nn),ge=((Jr=on)&&(rn.__proto__=Jr),((rn.prototype=Object.create(Jr&&Jr.prototype)).constructor=rn).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.linePoints))},rn.prototype.createStackSegments=function(t){return this.segmentsFromPoints(this.calculateStepPoints(t)).reverse()},rn);function rn(){Jr.apply(this,arguments)}function nn(t,e,o,i,r){tn.call(this,t,e,o),this.prevSegment=i,this.stackPoints=r}z(ge.prototype,Vt);var sn,an,hn,pn,ln=ge,cn=((pn=on)&&(vn.__proto__=pn),((vn.prototype=Object.create(pn&&pn.prototype)).constructor=vn).prototype.createStrokeSegments=function(){var t=new Hi(this.options.closed),e=this.points();return t.process(e)},vn.prototype.createStackSegments=function(){for(var t=this.strokeSegments(),e=[],o=t.length-1;0<=o;o--){var i=t[o];e.push(new P.geometry.Segment(i.anchor(),i.controlOut(),i.controlIn()))}return e},vn),un=((hn=en)&&(yn.__proto__=hn),((yn.prototype=Object.create(hn&&hn.prototype)).constructor=yn).prototype.createSegment=function(t,e,o,i){var r,n,s=this.options.isStacked,a=(e.line||{}).style;return s&&0<o&&i&&("gap"!==this.seriesMissingValues(e)?(n=i.linePoints,r=i):n=this._gapStackPoints(t,o,a)),new("step"===a?ln:"smooth"===a?cn:on)(t,e,o,r,n)},yn.prototype.reflow=function(t){hn.prototype.reflow.call(this,t);var e=this._stackPoints;if(e)for(var o=0;o<e.length;o++){var i=e[o],r=this.categoryAxis.getSlot(i.categoryIx);i.reflow(r)}},yn.prototype._gapStackPoints=function(t,e,o){var i=this.seriesPoints,r=t[0].categoryIx,t=t.length;r<0&&(r=0,t--);var n=r+t,s=this.seriesOptions[0]._outOfRangeMinPoint?1:0,a=[];this._stackPoints=this._stackPoints||[];for(var h=r;h<n;h++){for(var p,l=h+s,c=e,u=void 0;u=i[--c][l],0<c&&!u;);u?("step"!==o&&r<h&&!i[c][l-1]&&a.push(this._previousSegmentPoint(h,l,l-1,c)),a.push(u),"step"!==o&&h+1<n&&!i[c][l+1]&&a.push(this._previousSegmentPoint(h,l,l+1,c))):(p=this._createGapStackPoint(h),this._stackPoints.push(p),a.push(p))}return a},yn.prototype._previousSegmentPoint=function(t,e,o,i){for(var r,n=this.seriesPoints,s=i;0<s&&!r;)r=n[--s][o];return r?r=n[s][e]:(r=this._createGapStackPoint(t),this._stackPoints.push(r)),r},yn.prototype._createGapStackPoint=function(t){var e=this.pointOptions({},0),e=new Vr(0,e);return e.categoryIx=t,e.series={},e},yn.prototype.seriesMissingValues=function(t){return t.missingValues||pr},yn.prototype.supportsPointInactiveOpacity=function(){return!1},yn),dn=((an=P.Class)&&(gn.__proto__=an),((gn.prototype=Object.create(an&&an.prototype)).constructor=gn).prototype.update=function(t){var e,o=this.axisRanges;for(e in t){var i=t[e],r=o[e];o[e]=r=r||{min:l,max:c},r.min=Math.min(r.min,i.min),r.max=Math.max(r.max,i.max)}},gn.prototype.reset=function(t){this.axisRanges[t]=void 0},gn.prototype.query=function(t){return this.axisRanges[t]},gn),Se=((sn=le)&&(fn.__proto__=sn),((fn.prototype=Object.create(sn&&sn.prototype)).constructor=fn).prototype.createVisual=function(){this.textBox.options.noclip=this.options.noclip},fn.prototype.reflow=function(t){var e=this.options,o=e.vertical,i=e.aboveAxis,r=this.children[0],n=r.options,s=r.box,a=r.options.padding,h=t;n.align=o?C:S,n.vAlign=o?A:C,"insideEnd"===e.position?o?(n.vAlign=A,!i&&s.height()<t.height()&&(n.vAlign=w)):n.align=i?k:S:e.position===C?(n.vAlign=C,n.align=C):"insideBase"===e.position?o?n.vAlign=i?w:A:n.align=i?S:k:"outsideEnd"===e.position&&(h=o?i?new qt(t.x1,t.y1-s.height(),t.x2,t.y1):new qt(t.x1,t.y2,t.x2,t.y2+s.height()):(n.align=C,i?new qt(t.x2,t.y1,t.x2+s.width(),t.y2):new qt(t.x1-s.width(),t.y1,t.x1,t.y2))),e.rotation||(o?a.left=a.right=(h.width()-r.contentBox.width())/2:a.top=a.bottom=(h.height()-r.contentBox.height())/2),r.reflow(h)},fn.prototype.alignToClipBox=function(t){var e=this.options.vertical?m:v,o=e+"1",i=e+"2",r=this.children[0],e=this.parent.box;(e[o]<t[o]||t[i]<e[i])&&((r=r.paddingBox.clone())[o]=Math.max(e[o],t[o]),r[i]=Math.min(e[i],t[i]),this.reflow(r))},fn);function fn(t,e,o){sn.call(this,e),this.textBox=new ze(t,this.options,o),this.append(this.textBox)}function gn(){an.call(this),this.axisRanges={}}function yn(){hn.apply(this,arguments)}function vn(){pn.apply(this,arguments)}kt(Se,{position:"outsideEnd",margin:U(3),padding:U(4),color:r,background:"",border:{width:1,color:""},aboveAxis:!0,vertical:!1,animation:{type:"fadeIn",delay:600},zIndex:2});var mn=Se;function xn(t){t=t.overlay;return t&&t.gradient&&"none"!==t.gradient}var _n,Ve=((_n=le)&&(bn.__proto__=_n),((bn.prototype=Object.create(_n&&_n.prototype)).constructor=bn).prototype.render=function(){this._rendered||(this._rendered=!0,this.createLabel(),this.createNote(),this.errorBar&&this.append(this.errorBar))},bn.prototype.createLabel=function(){var t,e,o=this.options,i=o.labels;i.visible&&(t=this.pointData(),e=(e=W(i))?e(t):this.formatValue(i.format),this.label=new mn(e,z({vertical:o.vertical},i),t),this.append(this.label))},bn.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},bn.prototype.reflow=function(t){this.render();var e=this.label;if(this.box=t,e&&(e.options.aboveAxis=this.aboveAxis,e.reflow(t)),this.note&&this.note.reflow(t),this.errorBars)for(var o=0;o<this.errorBars.length;o++)this.errorBars[o].reflow(t)},bn.prototype.createVisual=function(){var e=this,t=this.box,o=this.options,i=o.visual;!1!==this.visible&&(_n.prototype.createVisual.call(this),i?(o=this.rectVisual=i({category:this.category,dataItem:this.dataItem,value:this.value,sender:this.getSender(),series:this.series,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,rect:t.toRect(),createVisual:function(){var t=new P.drawing.Group;return e.createRect(t),t},options:o}))&&this.visual.append(o):0<t.width()&&0<t.height()&&this.createRect(this.visual))},bn.prototype.createRect=function(t){var e=this.options,o=e.border,i=(lt(o.opacity)?o:e).opacity,r=this.box.toRect();r.size.width=Math.round(r.size.width);r=this.rectVisual=P.drawing.Path.fromRect(r,{fill:{color:this.color,opacity:e.opacity},stroke:{color:this.getBorderColor(),width:o.width,opacity:i,dashType:o.dashType}}),i=this.box.width(),o=this.box.height();6<(e.vertical?i:o)&&(T(r),(i<1||o<1)&&(r.options.stroke.lineJoin="round")),t.append(r),xn(e)&&(e=this.createGradientOverlay(r,{baseColor:this.color},z({end:e.vertical?void 0:[0,1]},e.overlay)),t.append(e))},bn.prototype.createHighlight=function(t){return T(P.drawing.Path.fromRect(this.box.toRect(),t))},bn.prototype.highlightVisual=function(){return this.rectVisual},bn.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},bn.prototype.getBorderColor=function(){var t=this.color,e=this.options.border,o=e._brightness||.8,e=e.color;return e=!lt(e)?new P.Color(t).brightness(o).toHex():e},bn.prototype.tooltipAnchor=function(){var t,e,o,i,r=this.options,n=this.box,s=this.aboveAxis,a=this.owner.pane.clipBox()||n,h=S,p=A;return r.vertical?(t=Math.min(n.x2,a.x2)+5,s?i=Math.max(n.y1,a.y1):(i=Math.min(n.y2,a.y2),p=w)):(e=Math.max(n.x1,a.x1),o=Math.min(n.x2,a.x2),i=r.isStacked?(p=w,t=s?(h=k,o):e,Math.max(n.y1,a.y1)-5):(s?t=o+5:(t=e-5,h=k),Math.max(n.y1,a.y1))),{point:new Nt(t,i),align:{horizontal:h,vertical:p}}},bn.prototype.overlapsBox=function(t){return this.box.overlaps(t)},bn.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,percentage:this.percentage,stackValue:this.stackValue,runningTotal:this.runningTotal,total:this.total,series:this.series}},bn);function bn(t,e){_n.call(this),this.options=e,this.color=e.color||a,this.aboveAxis=Ct(this.options.aboveAxis,!0),this.value=t}z(Ve.prototype,Lr),z(Ve.prototype,ro),Ve.prototype.defaults={border:{width:1},vertical:!0,overlay:{gradient:"glass"},labels:{visible:!1,format:"{0}"},opacity:1,notes:{label:{}}};var wn=Ve;function Cn(t,e){t.forEach(e)}function Sn(t,e){for(var o=t.length,i=o-1;0<=i;i--)e(t[i],i-o-1)}var kn,Me=((kn=le)&&(An.__proto__=kn),((An.prototype=Object.create(kn&&kn.prototype)).constructor=An).prototype.reflow=function(i){var t=this.options,e=t.vertical,o=t.gap,r=t.spacing,n=this.children,s=n.length,a=e?m:v,t=s+o+r*(s-1),h=(e?i.height():i.width())/t,p=i[a+1]+o/2*h;this.forEach(n,function(t,e){var o=(t.box||i).clone();o[a+1]=p,o[a+2]=p+h,t.reflow(o),e<s-1&&(p+=h*r),p+=h})},An);function An(t){kn.call(this,t),this.forEach=t.rtl?Sn:Cn}kt(Me,{vertical:!1,gap:0,spacing:0});var Pn,Tn=Me,Fe=((Pn=le)&&(Mn.__proto__=Pn),((Mn.prototype=Object.create(Pn&&Pn.prototype)).constructor=Mn).prototype.reflow=function(t){for(var e=this.options.vertical?v:m,o=this.children,i=o.length,r=this.box=new qt,n=0;n<i;n++){var s,a=o[n];!1!==a.visible&&((s=a.box.clone()).snapTo(t,e),0===n&&(r=this.box=s.clone()),a.reflow(s),r.wrap(s))}},Mn);function Mn(){Pn.apply(this,arguments)}kt(Fe,{vertical:!0});var On,Bn=Fe,Xe=((On=Er)&&(Rn.__proto__=On),((Rn.prototype=Object.create(On&&On.prototype)).constructor=Rn).prototype.render=function(){On.prototype.render.call(this),this.updateStackRange()},Rn.prototype.pointType=function(){return wn},Rn.prototype.clusterType=function(){return Tn},Rn.prototype.stackType=function(){return Bn},Rn.prototype.stackLimits=function(t,e){return On.prototype.stackLimits.call(this,t,e)},Rn.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,h=s.isStacked,p=this.pointValue(t),l=this.pointOptions(r,n),e=l.labels;h&&"outsideEnd"===e.position&&(e.position="insideEnd"),l.isStacked=h;t=t.fields.color||r.color;p<0&&l.negativeColor&&(t=l.negativeColor),l=this.evalPointOptions(l,p,i,o,r,n),E(r.color)&&(t=l.color);l=new(this.pointType())(p,l);l.color=t;o=a[o];return o||(o=new(this.clusterType())({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),(h?this.getStackWrap(r,o):o).append(l),l},Rn.prototype.getStackWrap=function(t,e){var o,t=t.stack,i=t&&t.group||t,r=e.children;if(typeof i===f){for(var n=0;n<r.length;n++)if(r[n]._stackGroup===i){o=r[n];break}}else o=r[0];return o||((o=new(this.stackType())({vertical:!this.options.invertAxes}))._stackGroup=i,e.append(o)),o},Rn.prototype.categorySlot=function(t,e,o){var i=this.options,t=t.getSlot(e),e=o.startValue();return i.isStacked&&(e=o.getSlot(e,e,!0),t[(i=i.invertAxes?v:m)+1]=t[i+2]=e[i+1]),t},Rn.prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Rn.prototype.createAnimation=function(){this._setAnimationOptions(),On.prototype.createAnimation.call(this),Qr(this.options.series)&&this._setChildrenAnimation()},Rn.prototype._setChildrenAnimation=function(){for(var t=this.points,e=0;e<t.length;e++){var o=t[e],i=o.visual;i&<(i.options.zIndex)&&(o.options.animation=this.options.animation,o.createAnimation())}},Rn.prototype._setAnimationOptions=function(){var t,e=this.options,o=e.animation||{};t=e.isStacked?(t=this.seriesValueAxis(e.series[0])).getSlot(t.startValue()):this.categoryAxis.getSlot(0),o.origin=new P.geometry.Point(t.x1,t.y1),o.vertical=!e.invertAxes},Rn);function Rn(){On.apply(this,arguments)}kt(Xe,{animation:{type:cr}});var En,Ln=Xe,Ke=((En=le)&&(In.__proto__=En),((In.prototype=Object.create(En&&En.prototype)).constructor=In).prototype.reflow=function(t){var e=this.options,o=this.value,i=this.owner.seriesValueAxis(e),e=i.getSlot(o.open,o.close),i=i.getSlot(o.low,o.high);e.x1=i.x1=t.x1,e.x2=i.x2=t.x2,this.realBody=e;o=i.center().x,t=[];t.push([[o,i.y1],[o,e.y1]]),t.push([[o,e.y2],[o,i.y2]]),this.lines=t,this.box=i.clone().wrap(e),this._rendered||(this._rendered=!0,this.createNote()),this.reflowNote()},In.prototype.reflowNote=function(){this.note&&this.note.reflow(this.box)},In.prototype.createVisual=function(){En.prototype.createVisual.call(this),this._mainVisual=this.mainVisual(this.options),this.visual.append(this._mainVisual),this.createOverlay()},In.prototype.mainVisual=function(t){var e=new P.drawing.Group;return this.createBody(e,t),this.createLines(e,t),e},In.prototype.createBody=function(t,e){var o=P.drawing.Path.fromRect(this.realBody.toRect(),{fill:{color:this.color,opacity:e.opacity},stroke:null});0<e.border.width&&o.options.set("stroke",{color:this.getBorderColor(),width:e.border.width,dashType:e.border.dashType,opacity:Ct(e.border.opacity,e.opacity)}),T(o),t.append(o),xn(e)&&t.append(this.createGradientOverlay(o,{baseColor:this.color},z({end:e.vertical?void 0:[0,1]},e.overlay)))},In.prototype.createLines=function(t,e){this.drawLines(t,e,this.lines,e.line)},In.prototype.drawLines=function(t,e,o,i){if(o)for(var r={stroke:{color:i.color||this.color,opacity:Ct(i.opacity,e.opacity),width:i.width,dashType:i.dashType,lineCap:"butt"}},n=0;n<o.length;n++){var s=P.drawing.Path.fromPoints(o[n],r);T(s),t.append(s)}},In.prototype.getBorderColor=function(){var t=this.options.border,e=t.color;return e=!lt(e)?new P.Color(this.color).brightness(t._brightness).toHex():e},In.prototype.createOverlay=function(){var t=P.drawing.Path.fromRect(this.box.toRect(),{fill:{color:a,opacity:0},stroke:null});this.visual.append(t)},In.prototype.createHighlight=function(){var t=this.options.highlight,e=this.color;this.color=t.color||this.color;t=this.mainVisual(z({},this.options,{line:{color:this.getBorderColor()}},t));return this.color=e,t},In.prototype.highlightVisual=function(){return this._mainVisual},In.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this._mainVisual}},In.prototype.tooltipAnchor=function(){var t=this.box,e=this.owner.pane.clipBox()||t;return{point:new Nt(t.x2+5,Math.max(t.y1,e.y1)+5),align:{horizontal:S,vertical:A}}},In.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},In.prototype.overlapsBox=function(t){return this.box.overlaps(t)},In);function In(t,e){En.call(this,e),this.value=t}kt(Ke,{vertical:!0,border:{_brightness:.8},line:{width:2},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{4:d}</th></tr><tr><td>Open:</td><td>{0:C}</td></tr><tr><td>High:</td><td>{1:C}</td></tr><tr><td>Low:</td><td>{2:C}</td></tr><tr><td>Close:</td><td>{3:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}}}),z(Ke.prototype,Lr),z(Ke.prototype,ro);var zn=Ke;function Vn(t){return Qi(t)===t.length}var jn,eo=((jn=Er)&&(Dn.__proto__=jn),((Dn.prototype=Object.create(jn&&jn.prototype)).constructor=Dn).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},Dn.prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=Vn(this.splitValue(p)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e));a=a[i];a||(a=new Tn({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),o&&(this.updateRange(p,e),a.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c,o.noteText=t.fields.noteText),this.points.push(o),u.push(o)},Dn.prototype.pointType=function(){return zn},Dn.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.pointType(),a=t.valueFields,h=z({},r),e=t.fields.color||r.color,h=this.evalPointOptions(h,a,i,o,r,n);"candlestick"===r.type&&a.open>a.close&&(e=t.fields.downColor||r.downColor||r.color),E(r.color)&&(e=h.color),h.vertical=!this.options.invertAxes;h=new s(a,h);return h.color=e,h},Dn.prototype.splitValue=function(t){return[t.low,t.open,t.close,t.high]},Dn.prototype.updateRange=function(t,e){var o=e.series.axis,e=this.splitValue(t),t=this.valueAxisRanges[o],t=this.valueAxisRanges[o]=t||{min:l,max:c};this.valueAxisRanges[o]={min:Math.min.apply(Math,e.concat([t.min])),max:Math.max.apply(Math,e.concat([t.max]))}},Dn.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.open,o.high,o.low,o.close,t.category)},Dn.prototype.animationPoints=function(){return this.points},Dn);function Dn(){jn.apply(this,arguments)}z(eo.prototype,ce);var Hn,Un=eo,uo=((Hn=zn)&&(Fn.__proto__=Hn),((Fn.prototype=Object.create(Hn&&Hn.prototype)).constructor=Fn).prototype.reflow=function(t){var e,o,i=this.options,r=this.value,n=this.owner.seriesValueAxis(i);this.boxSlot=o=n.getSlot(r.q1,r.q3),this.realBody=o,this.reflowBoxSlot(t),this.whiskerSlot=e=n.getSlot(r.lower,r.upper),this.reflowWhiskerSlot(t);i=n.getSlot(r.median);r.mean&&(r=n.getSlot(r.mean),this.meanPoints=this.calcMeanPoints(t,r)),this.whiskerPoints=this.calcWhiskerPoints(o,e),this.medianPoints=this.calcMedianPoints(t,i),this.box=e.clone().wrap(o),this.reflowNote()},Fn.prototype.reflowBoxSlot=function(t){this.boxSlot.x1=t.x1,this.boxSlot.x2=t.x2},Fn.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.x1=t.x1,this.whiskerSlot.x2=t.x2},Fn.prototype.calcMeanPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Fn.prototype.calcWhiskerPoints=function(t,e){var o=e.center().x;return[[[o-5,e.y1],[o+5,e.y1],[o,e.y1],[o,t.y1]],[[o-5,e.y2],[o+5,e.y2],[o,e.y2],[o,t.y2]]]},Fn.prototype.calcMedianPoints=function(t,e){return[[[t.x1,e.y1],[t.x2,e.y1]]]},Fn.prototype.renderOutliers=function(t){for(var e=this.value,o=e.outliers||[],i=3*Math.abs(e.q3-e.q1),r=[],n=(t.markers,0);n<o.length;n++){var s=o[n],a=z({},(h=s<e.q3+i&&s>e.q1-i?t.outliers:t.extremes).border);lt(a.color)||(lt(this.color)?a.color=this.color:a.color=new P.Color(h.background).brightness(.8).toHex());var h=new ve({type:h.type,width:h.size,height:h.size,rotation:h.rotation,background:h.background,border:a,opacity:h.opacity});h.value=s,r.push(h)}return this.reflowOutliers(r),r},Fn.prototype.reflowOutliers=function(t){for(var e=this.owner.seriesValueAxis(this.options),o=this.box.center(),i=0;i<t.length;i++){var r=t[i].value,r=e.getSlot(r);this.options.vertical?r.move(o.x):r.move(void 0,o.y),this.box=this.box.wrap(r),t[i].reflow(r)}},Fn.prototype.mainVisual=function(t){for(var e=Hn.prototype.mainVisual.call(this,t),o=this.renderOutliers(t),i=0;i<o.length;i++){var r=o[i].getElement();r&&e.append(r)}return e},Fn.prototype.createLines=function(t,e){this.drawLines(t,e,this.whiskerPoints,e.whiskers),this.drawLines(t,e,this.medianPoints,e.median),this.drawLines(t,e,this.meanPoints,e.mean)},Fn.prototype.getBorderColor=function(){return(this.options.border||{}).color?this.options.border.color:this.color||Hn.prototype.getBorderColor.call(this)},Fn);function Fn(t,e){Hn.call(this,t,e),this.createNote()}kt(uo,{border:{_brightness:.8},line:{width:2},median:{color:"#f6f6f6"},mean:{width:2,dashType:"dash",color:"#f6f6f6"},overlay:{gradient:"glass"},tooltip:{format:"<table><tr><th colspan='2'>{6:d}</th></tr><tr><td>Lower:</td><td>{0:C}</td></tr><tr><td>Q1:</td><td>{1:C}</td></tr><tr><td>Median:</td><td>{2:C}</td></tr><tr><td>Mean:</td><td>{5:C}</td></tr><tr><td>Q3:</td><td>{3:C}</td></tr><tr><td>Upper:</td><td>{4:C}</td></tr></table>"},highlight:{opacity:1,border:{width:1,opacity:1},line:{width:1,opacity:1}},notes:{visible:!0,label:{}},outliers:{visible:!0,size:8,type:"cross",background:a,border:{width:2,opacity:1},opacity:0},extremes:{visible:!0,size:8,type:u,background:a,border:{width:2,opacity:1},opacity:0}}),z(uo.prototype,Lr);var Nn,Gn,Wn,Xn=uo,qn=((Wn=Xn)&&($n.__proto__=Wn),(($n.prototype=Object.create(Wn&&Wn.prototype)).constructor=$n).prototype.reflowBoxSlot=function(t){this.boxSlot.y1=t.y1,this.boxSlot.y2=t.y2},$n.prototype.reflowWhiskerSlot=function(t){this.whiskerSlot.y1=t.y1,this.whiskerSlot.y2=t.y2},$n.prototype.calcMeanPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},$n.prototype.calcWhiskerPoints=function(t,e){var o=e.center().y;return[[[e.x1,o-5],[e.x1,o+5],[e.x1,o],[t.x1,o]],[[e.x2,o-5],[e.x2,o+5],[e.x2,o],[t.x2,o]]]},$n.prototype.calcMedianPoints=function(t,e){return[[[e.x1,t.y1],[e.x1,t.y2]]]},$n),Yn=((Gn=Un)&&(Kn.__proto__=Gn),((Kn.prototype=Object.create(Gn&&Gn.prototype)).constructor=Kn).prototype.addValue=function(t,e){var o,i=e.categoryIx,r=e.category,n=e.series,s=e.seriesIx,a=this.children,h=this.options,p=t.valueFields,l=Vn(this.splitValue(p)),c=n.data[i],u=this.categoryPoints[i];u||(this.categoryPoints[i]=u=[]),l&&(o=this.createPoint(t,e));a=a[i];a||(a=new Tn({vertical:h.invertAxes,gap:h.gap,spacing:h.spacing,rtl:!h.invertAxes&&(this.chartService||{}).rtl}),this.append(a)),o&&(this.updateRange(p,e),a.append(o),o.categoryIx=i,o.category=r,o.series=n,o.seriesIx=s,o.owner=this,o.dataItem=c),this.points.push(o),u.push(o)},Kn.prototype.pointType=function(){return this.options.invertAxes?qn:Xn},Kn.prototype.splitValue=function(t){return[t.lower,t.q1,t.median,t.q3,t.upper]},Kn.prototype.updateRange=function(t,e){var o=e.series.axis,i=this.valueAxisRanges[o],e=this.splitValue(t).concat(this.filterOutliers(t.outliers));lt(t.mean)&&(e=e.concat(t.mean)),i=this.valueAxisRanges[o]=i||{min:l,max:c},this.valueAxisRanges[o]={min:Math.min.apply(Math,e.concat([i.min])),max:Math.max.apply(Math,e.concat([i.max]))}},Kn.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.lower,o.q1,o.median,o.q3,o.upper,o.mean,t.category)},Kn.prototype.filterOutliers=function(t){for(var e=(t||[]).length,o=[],i=0;i<e;i++){var r=t[i];lt(r)&&null!==r&&o.push(r)}return o},Kn.prototype.supportsPointInactiveOpacity=function(){return!1},Kn),Zn=((Nn=kr)&&(Qn.__proto__=Nn),((Qn.prototype=Object.create(Nn&&Nn.prototype)).constructor=Qn).prototype.getAxis=function(){var t=this.chart.seriesAxes(this.series);return this.isVertical?t.y:t.x},Qn);function Qn(){Nn.apply(this,arguments)}function Kn(){Gn.apply(this,arguments)}function $n(){Wn.apply(this,arguments)}function Jn(t){return lt(t)&&null!==t}var ts,at=((ts=le)&&(es.__proto__=ts),((es.prototype=Object.create(ts&&ts.prototype)).constructor=es).prototype._initFields=function(){this.xAxisRanges={},this.yAxisRanges={},this.points=[],this.seriesPoints=[],this.seriesOptions=[],this._evalSeries=[]},es.prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},es.prototype.addErrorBar=function(t,e,o){var i,r=t.value[e],n=e+"Value",s=o.seriesIx,a=o.series,h=t.options.errorBars,p=o[e+"ErrorLow"],o=o[e+"ErrorHigh"];O(r)&&(O(p)&&O(o)&&(i={low:p,high:o}),h&<(h[n])&&(this.seriesErrorRanges=this.seriesErrorRanges||{x:[],y:[]},this.seriesErrorRanges[e][s]=this.seriesErrorRanges[e][s]||new ar(h[n],a,e),i=this.seriesErrorRanges[e][s].getErrorRange(r,h[n])),i&&this.addPointErrorBar(i,t,e))},es.prototype.addPointErrorBar=function(t,e,o){var i=t.low,r=t.high,n=e.series,s=e.options.errorBars,a=o===m,t={};e[o+"Low"]=i,e[o+"High"]=r,e.errorBars=e.errorBars||[];s=new Zn(i,r,a,this,n,s);e.errorBars.push(s),e.append(s),t[o]=i,this.updateRange(t,n),t[o]=r,this.updateRange(t,n)},es.prototype.addValue=function(t,e){var o,i=t.x,r=t.y,n=e.seriesIx,s=this.options.series[n],s=this.seriesMissingValues(s),n=this.seriesPoints[n],t=t;(t=!Jn(i)||!Jn(r)?this.createMissingValue(t,s):t)&&((o=this.createPoint(t,e))&&(Object.assign(o,e),this.addErrorBar(o,v,e),this.addErrorBar(o,m,e)),this.updateRange(t,e.series)),this.points.push(o),n.push(o)},es.prototype.seriesMissingValues=function(t){return t.missingValues},es.prototype.createMissingValue=function(){},es.prototype.updateRange=function(t,e){var o=this.chartService.intl,i=e.xAxis,r=e.yAxis,n=t.x,s=t.y,e=this.xAxisRanges[i],t=this.yAxisRanges[r];Jn(n)&&(e=this.xAxisRanges[i]=e||{min:l,max:c},B(n)&&(n=Xo(o,n)),e.min=Math.min(e.min,n),e.max=Math.max(e.max,n)),Jn(s)&&(t=this.yAxisRanges[r]=t||{min:l,max:c},B(s)&&(s=Xo(o,s)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s))},es.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle","_outOfRangeMinPoint","_outOfRangeMaxPoint"]},s=this._evalSeries[r];lt(s)||(this._evalSeries[r]=s=Tr(t,{},n,!0));r=t;return s&&Tr(r=z({},t),{value:e,series:i,dataItem:o.dataItem},n),r},es.prototype.pointType=function(){return Vr},es.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=z({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},es.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color,i=this.evalPointOptions(i,t,e);E(o.color)&&(r=i.color);i=new Vr(t,i);return i.color=r,this.append(i),i},es.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,t=e?i.namedXAxes[e]:i.axisX,i=o?i.namedYAxes[o]:i.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!i)throw new Error("Unable to locate Y axis with name "+o);return{x:t,y:i}},es.prototype.reflow=function(t){var r=this,n=this.points,s=!this.options.clip,a=0;this.traverseDataPoints(function(t,e){var o=n[a++],i=r.seriesAxes(e.series),e=i.x.getSlot(t.x,t.x,s),t=i.y.getSlot(t.y,t.y,s);o&&(e&&t?(t=r.pointSlot(e,t),o.reflow(t)):o.visible=!1)}),this.box=t},es.prototype.pointSlot=function(t,e){return new qt(t.x1,e.y1,t.x2,e.y2)},es.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=this.seriesPoints,i=0;i<e.length;i++){var r=e[i];o[i]||(o[i]=[]);for(var n=0;n<r.data.length;n++){var s=this._bindPoint(r,i,n),a=s.valueFields,s=s.fields;t(a,z({pointIx:n,series:r,seriesIx:i,dataItem:r.data[n],owner:this},s))}}},es.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y)},es.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},es);function es(t,e){ts.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}kt(at,{series:[],tooltip:{format:"{0}, {1}"},labels:{format:"{0}, {1}"},clip:!0}),z(at.prototype,ce,{_bindPoint:Er.prototype._bindPoint});var os,is=at,ee=((os=Vr)&&(rs.__proto__=os),((rs.prototype=Object.create(os&&os.prototype)).constructor=rs).prototype.createHighlight=function(){var t=this.options.highlight,e=t.border,o=this.options.markers,i=this.box.center(),r=(o.size+o.border.width+e.width)/2,n=new P.drawing.Group,s=new P.drawing.Circle(new P.geometry.Circle([i.x,i.y+r/5+e.width/2],r+e.width/2),{stroke:{color:"none"},fill:this.createGradient({gradient:"bubbleShadow",color:o.background,stops:[{offset:0,color:o.background,opacity:.3},{offset:1,color:o.background,opacity:0}]})}),t=new P.drawing.Circle(new P.geometry.Circle([i.x,i.y],r),{stroke:{color:e.color||new P.Color(o.background).brightness(.8).toHex(),width:e.width,opacity:e.opacity},fill:{color:o.background,opacity:t.opacity}});return n.append(s,t),n},rs);function rs(t,e){os.call(this,t,e),this.category=t.category}ee.prototype.defaults=z({},ee.prototype.defaults,{labels:{position:C},highlight:{opacity:1,border:{color:"#fff",width:2,opacity:1}}}),ee.prototype.defaults.highlight.zIndex=void 0;var ns,ss=ee,ae=((ns=is)&&(as.__proto__=ns),((as.prototype=Object.create(ns&&ns.prototype)).constructor=as).prototype._initFields=function(){this._maxSize=c,ns.prototype._initFields.call(this)},as.prototype.addValue=function(t,e){null!==t.size&&(0<t.size||t.size<0&&e.series.negativeValues.visible)?(this._maxSize=Math.max(this._maxSize,Math.abs(t.size)),ns.prototype.addValue.call(this,t,e)):(this.points.push(null),this.seriesPoints[e.seriesIx].push(null))},as.prototype.reflow=function(t){this.updateBubblesSize(t),ns.prototype.reflow.call(this,t)},as.prototype.pointType=function(){return ss},as.prototype.createPoint=function(t,e){var o=e.series,i=o.data.length,r=e.pointIx*(600/i),n={delay:r,duration:600-r,type:"bubble"},i=e.color||o.color;t.size<0&&o.negativeValues.visible&&(i=Ct(o.negativeValues.color,i));n=z({labels:{animation:{delay:r,duration:600-r}}},this.pointOptions(o,e.seriesIx),{markers:{type:u,border:o.border,opacity:o.opacity,animation:n}}),n=this.evalPointOptions(n,t,e);E(o.color)&&(i=n.color),n.markers.background=i;n=new ss(t,n);return n.color=i,this.append(n),n},as.prototype.updateBubblesSize=function(t){for(var e=this.options.series,o=Math.min(t.width(),t.height()),i=0;i<e.length;i++)for(var r=e[i],n=this.seriesPoints[i],s=(r.minSize||Math.max(.02*o,10))/2,a=(r.maxSize||.2*o)/2,h=Math.PI*s*s,p=(Math.PI*a*a-h)/this._maxSize,l=0;l<n.length;l++){var c,u,d=n[l];d&&(u=Math.abs(d.value.size)*p,c=Math.sqrt((h+u)/Math.PI),u=Ct(d.options.zIndex,0)+(1-c/a),z(d.options,{zIndex:u,markers:{size:2*c,zIndex:u},labels:{zIndex:u+1}}))}},as.prototype.formatPointValue=function(t,e){var o=t.value;return this.chartService.format.auto(e,o.x,o.y,o.size,t.category)},as.prototype.createAnimation=function(){},as.prototype.createVisual=function(){},as);function as(){ns.apply(this,arguments)}kt(ae,{tooltip:{format:"{3}"},labels:{format:"{3}"}});var hs,ps=ae,_e=((hs=ve)&&(ls.__proto__=hs),(ls.prototype=Object.create(hs&&hs.prototype)).constructor=ls);function ls(){hs.apply(this,arguments)}z(_e.prototype,Lr);var cs,us=_e,ge=((cs=le)&&(ds.__proto__=cs),((ds.prototype=Object.create(cs&&cs.prototype)).constructor=ds).prototype.render=function(){var t=this.options;this._rendered||(this._rendered=!0,lt(this.value.target)&&(this.target=new us({type:t.target.shape,background:t.target.color||this.color,opacity:t.opacity,zIndex:t.zIndex,border:t.target.border,vAlign:A,align:k}),this.target.value=this.value,this.target.dataItem=this.dataItem,this.target.series=this.series,this.append(this.target)),this.createNote())},ds.prototype.reflow=function(t){this.render();var e=this.options,o=this.target,i=this.owner,r=e.invertAxes,n=i.seriesValueAxis(this.options),s=i.categorySlot(i.categoryAxis,e.categoryIx,n),i=n.getSlot(this.value.target),n=r?i:s,i=r?s:i;o&&(i=new qt(n.x1,i.y1,n.x2,i.y2),o.options.height=r?i.height():e.target.line.width,o.options.width=r?e.target.line.width:i.width(),o.reflow(i)),this.note&&this.note.reflow(t),this.box=t},ds.prototype.createVisual=function(){cs.prototype.createVisual.call(this);var t=this.options,e=P.drawing.Path.fromRect(this.box.toRect(),{fill:{color:this.color,opacity:t.opacity},stroke:null});0<t.border.width&&e.options.set("stroke",{color:t.border.color||this.color,width:t.border.width,dashType:t.border.dashType,opacity:Ct(t.border.opacity,t.opacity)}),T(this.bodyVisual=e),this.visual.append(e)},ds.prototype.createAnimation=function(){this.bodyVisual&&(this.animation=P.drawing.Animation.create(this.bodyVisual,this.options.animation))},ds.prototype.createHighlight=function(t){return P.drawing.Path.fromRect(this.box.toRect(),t)},ds.prototype.highlightVisual=function(){return this.bodyVisual},ds.prototype.highlightVisualArgs=function(){return{rect:this.box.toRect(),visual:this.bodyVisual,options:this.options}},ds.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},ds);function ds(t,e){cs.call(this,e),this.aboveAxis=this.options.aboveAxis,this.color=e.color||a,this.value=t}ge.prototype.tooltipAnchor=wn.prototype.tooltipAnchor,kt(ge,{border:{width:1},vertical:!1,opacity:1,target:{shape:"",border:{width:0,color:"green"},line:{width:2}},tooltip:{format:"Current: {0}<br />Target: {1}"}}),z(ge.prototype,Lr),z(ge.prototype,ro);var fs,gs=ge,Se=((fs=Er)&&(ys.__proto__=fs),((ys.prototype=Object.create(fs&&fs.prototype)).constructor=ys).prototype.reflowCategories=function(t){for(var e=this.children,o=e.length,i=0;i<o;i++)e[i].reflow(t[i])},ys.prototype.plotRange=function(t){var e=t.series,e=this.seriesValueAxis(e),e=this.categoryAxisCrossingValue(e);return[e,t.value.current||e]},ys.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=this.options,a=this.children,h=t.valueFields,e=z({vertical:!s.invertAxes,overlay:r.overlay,categoryIx:o,invertAxes:s.invertAxes},r),t=t.fields.color||r.color,e=this.evalPointOptions(e,h,i,o,r,n);E(r.color)&&(t=e.color);e=new gs(h,e);e.color=t;o=a[o];return o||(o=new Tn({vertical:s.invertAxes,gap:s.gap,spacing:s.spacing,rtl:!s.invertAxes&&(this.chartService||{}).rtl}),this.append(o)),o.append(e),e},ys.prototype.updateRange=function(t,e){var o=t.current,i=t.target,t=e.series.axis,e=this.valueAxisRanges[t];lt(o)&&!isNaN(o)&<(i&&!isNaN(i))&&((e=this.valueAxisRanges[t]=e||{min:l,max:c}).min=Math.min(e.min,o,i),e.max=Math.max(e.max,o,i))},ys.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value.current,t.value.target)},ys.prototype.pointValue=function(t){return t.valueFields.current},ys.prototype.aboveAxis=function(t){return 0<t.value.current},ys.prototype.createAnimation=function(){var t=this.points;this._setAnimationOptions();for(var e=0;e<t.length;e++){var o=t[e];o.options.animation=this.options.animation,o.createAnimation()}},ys);function ys(t,r){!function(){for(var t=r.series,e=0;e<t.length;e++){var o=t[e],i=o.data;!i||x(i[0])||V(i[0])||(o.data=[i])}}(),fs.call(this,t,r)}Se.prototype._setAnimationOptions=Ln.prototype._setAnimationOptions,kt(Se,{animation:{type:cr}});var vs,ms=Se,Ve=((vs=P.Class)&&(xs.__proto__=vs),((xs.prototype=Object.create(vs&&vs.prototype)).constructor=xs).prototype.getStyle=function(t,e){var o=t.background,i=t.border.color;e&&(r=e.color||e.options.color,o=Ct(o,r),i=Ct(i,r));var r=U(t.padding||{},"auto");return{backgroundColor:o,borderColor:i,font:t.font,color:t.color,opacity:t.opacity,borderWidth:j(t.border.width),paddingTop:j(r.top),paddingBottom:j(r.bottom),paddingLeft:j(r.left),paddingRight:j(r.right)}},xs.prototype.show=function(t,e,o){t.format=e.format;o=this.getStyle(e,o);t.style=o;o=new P.Color(o.backgroundColor);lt(e.color)||o.isDark()||(t.className="k-chart-tooltip-inverse"),this.chartService.notify("showTooltip",t),this.visible=!0},xs.prototype.hide=function(){this.chartService&&this.chartService.notify("hideTooltip"),this.visible=!1},xs.prototype.destroy=function(){delete this.chartService},xs);function xs(t,e){vs.call(this),this.chartService=t,this.options=z({},this.options,e)}kt(Ve,{border:{width:1},opacity:1});var _s,Me=Ve,Fe=((_s=Me)&&(bs.__proto__=_s),((bs.prototype=Object.create(_s&&_s.prototype)).constructor=bs).prototype.initAxisName=function(){var t=this.crosshair.axis,t=t.plotArea.categoryAxis?t.getCategory?"categoryAxis":"valueAxis":t.options.vertical?"yAxis":"xAxis";this.axisName=t},bs.prototype.showAt=function(t){var e=this.crosshair.axis,o=this.options,i=e[o.stickyMode?"getCategory":"getValue"](t),r=i;o.format?r=this.formatService.auto(o.format,i):e.options.type===y&&(r=this.formatService.auto(e.options.labels.dateFormats[e.options.baseUnit],i)),this.show({point:t,anchor:this.getAnchor(),crosshair:this.crosshair,value:r,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex},this.options)},bs.prototype.hide=function(){this.chartService.notify("hideTooltip",{crosshair:this.crosshair,axisName:this.axisName,axisIndex:this.crosshair.axis.axisIndex})},bs.prototype.getAnchor=function(){var t,e,o=this.crosshair,i=this.options,r=i.position,n=i.padding,i=!o.axis.options.vertical,o=o.line.bbox(),n=i?(t=C,r===w?(e=A,o.bottomLeft().translate(0,n)):(e=w,o.topLeft().translate(0,-n))):(e=C,r===S?(t=k,o.topLeft().translate(-n,0)):(t=S,o.topRight().translate(n,0)));return{point:n,align:{horizontal:t,vertical:e}}},bs);function bs(t,e,o){_s.call(this,t,o),this.crosshair=e,this.formatService=t.format,this.initAxisName()}kt(Fe,{padding:10});var ws,Cs=Fe,Xe=((ws=le)&&(Ss.__proto__=ws),((Ss.prototype=Object.create(ws&&ws.prototype)).constructor=Ss).prototype.showAt=function(t){this.point=t,this.moveLine(),this.line.visible(!0),this.tooltip&&this.tooltip.showAt(t)},Ss.prototype.hide=function(){this.line.visible(!1),this.tooltip&&this.tooltip.hide()},Ss.prototype.moveLine=function(){var t=this.axis,e=this.point,o=t.options.vertical,i=this.getBox(),r=o?m:v,n=new P.geometry.Point(i.x1,i.y1),o=o?new P.geometry.Point(i.x2,i.y1):new P.geometry.Point(i.x1,i.y2);e&&(this.stickyMode?(t=t.getSlot(t.pointCategoryIndex(e)),n[r]=o[r]=t.center()[r]):n[r]=o[r]=e[r]),this.box=i,this.line.moveTo(n).lineTo(o)},Ss.prototype.getBox=function(){for(var t,e=this.axis,o=e.pane.axes,i=o.length,r=e.options.vertical,n=e.lineBox().clone(),e=r?v:m,s=0;s<i;s++){var a=o[s];a.options.vertical!==r&&(t?t.wrap(a.lineBox()):t=a.lineBox().clone())}return n[e+1]=t[e+1],n[e+2]=t[e+2],n},Ss.prototype.createVisual=function(){ws.prototype.createVisual.call(this);var t=this.options;this.line=new P.drawing.Path({stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType},visible:!1}),this.moveLine(),this.visual.append(this.line)},Ss.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),ws.prototype.destroy.call(this)},Ss);function Ss(t,e,o){ws.call(this,o),this.axis=e,this.stickyMode=e instanceof Ko;e=this.options.tooltip;e.visible&&(this.tooltip=new Cs(t,this,z({},e,{stickyMode:this.stickyMode})))}kt(Xe,{color:r,width:2,zIndex:-1,tooltip:{visible:!1}});var ks,As=Xe,Ke=((ks=le)&&(Ps.__proto__=ks),((Ps.prototype=Object.create(ks&&ks.prototype)).constructor=Ps).prototype.shouldClip=function(){for(var t=this.children,e=t.length,o=0;o<e;o++)if(!0===t[o].options.clip)return!0;return!1},Ps.prototype._clipBox=function(){return this.pane.chartsBox()},Ps.prototype.createVisual=function(){var t;this.visual=new P.drawing.Group({zIndex:0}),this.shouldClip()&&(t=(this.clipBox=this._clipBox()).toRect(),T(t=P.drawing.Path.fromRect(t)),this.visual.clip(t),this.unclipLabels())},Ps.prototype.stackRoot=function(){return this},Ps.prototype.unclipLabels=function(){for(var t=this.children,e=this.clipBox,o=0;o<t.length;o++)for(var i=t[o].points||{},r=i.length,n=0;n<r;n++){var s,a=i[n];a&&!1!==a.visible&&a.overlapsBox&&a.overlapsBox(e)&&(a.unclipElements?a.unclipElements():(s=a.label,a=a.note,s&&s.options.visible&&(s.alignToClipBox&&s.alignToClipBox(e),s.options.noclip=!0),a&&a.options.visible&&(a.options.noclip=!0)))}},Ps.prototype.destroy=function(){ks.prototype.destroy.call(this),delete this.parent},Ps);function Ps(t,e){ks.call(this,t),this.pane=e}Ke.prototype.isStackRoot=!0;var Ts,Ms=Ke,eo=((Ts=fe)&&(Bs.__proto__=Ts),((Bs.prototype=Object.create(Ts&&Ts.prototype)).constructor=Bs).prototype.createTitle=function(){var t=this.options.title;V(t)&&(t=z({},t,{align:t.position,position:A})),this.title=Ue.buildTitle(t,this,Bs.prototype.options.title)},Bs.prototype.appendAxis=function(t){this.content.append(t),this.axes.push(t),t.pane=this},Bs.prototype.appendAxisAt=function(t,e){this.content.append(t),this.axes.splice(e,0,t),t.pane=this},Bs.prototype.appendChart=function(t){this.chartContainer.parent!==this.content&&this.content.append(this.chartContainer),this.charts.push(t),this.chartContainer.append(t),t.pane=this},Bs.prototype.empty=function(){var t=this.parent;if(t){for(var e=0;e<this.axes.length;e++)t.removeAxis(this.axes[e]);for(var o=0;o<this.charts.length;o++)t.removeChart(this.charts[o])}this.axes=[],this.charts=[],this.content.destroy(),this.content.children=[],this.chartContainer.children=[]},Bs.prototype.reflow=function(t){var e;vt(this.children)===this.content&&(e=this.children.pop()),Ts.prototype.reflow.call(this,t),e&&this.children.push(e),this.title&&(this.contentBox.y1+=this.title.box.height())},Bs.prototype.visualStyle=function(){var t=Ts.prototype.visualStyle.call(this);return t.zIndex=-10,t},Bs.prototype.renderComplete=function(){this.options.visible&&this.createGridLines()},Bs.prototype.stackRoot=function(){return this},Bs.prototype.clipRoot=function(){return this},Bs.prototype.createGridLines=function(){for(var t,e=this.axes,o=e.concat(this.parent.axes),i=[],r=[],n=0;n<e.length;n++)for(var s=e[n],a=s.options.vertical,h=a?i:r,p=0;p<o.length;p++)0!==h.length||a!==(t=o[p]).options.vertical&&ht(h,s.createGridLines(t))},Bs.prototype.refresh=function(){this.visual.clear(),this.content.parent=null,this.content.createGradient=this.createGradient.bind(this),this.content.renderVisual(),(this.content.parent=this).title&&this.visual.append(this.title.visual),this.visual.append(this.content.visual),this.renderComplete(),this.notifyRender()},Bs.prototype.chartsBox=function(){for(var t=this.axes,e=t.length,o=new qt,i=0;i<e;i++){var r=t[i],n=r.options.vertical?m:v,r=r.lineBox();o[n+1]=r[n+1],o[n+2]=r[n+2]}if(0===o.x2)for(var s=this.parent.axes,a=s.length,h=0;h<a;h++){var p=s[h];p.options.vertical||(p=p.lineBox(),o.x1=p.x1,o.x2=p.x2)}return o},Bs.prototype.clipBox=function(){return this.chartContainer.clipBox},Bs.prototype.notifyRender=function(){var t=this.getService();t&&t.notify("paneRender",{pane:new qi(this),index:this.paneIndex,name:this.options.name})},Bs),Os=1;function Bs(t){Ts.call(this,t),this.id="pane"+Os++,this.createTitle(),this.content=new le,this.chartContainer=new Ms({},this),this.append(this.content),this.axes=[],this.charts=[]}eo.prototype.isStackRoot=!0,kt(eo,{zIndex:-1,shrinkToFit:!0,title:{align:S},visible:!0});var Rs=eo;function Es(t,e){null!==e&&t.push(e)}function Ls(t,e,o){e=e.visible;if(lt(e))return e;t=t.pointVisibility;return t?t[o]:void 0}function Is(t){for(var e=t.data,o=[],i=0,r=0,n=0;n<e.length;n++){var s=rr.current.bindPoint(t,n),a=s.valueFields.value;O(a=B(a)?parseFloat(a):a)?(s.visible=!1!==Ls(t,s.fields,n),s.value=Math.abs(a),o.push(s),s.visible&&(i+=s.value),0!==a&&r++):o.push(null)}return{total:i,points:o,count:r}}function zs(t,e){return t&&e?t.toLowerCase()===e.toLowerCase():t===e}function Vs(t,e){for(var o=[],i=[].concat(e),r=0;r<t.length;r++){var n=t[r];J(n.type,i)&&o.push(n)}return o}function js(t,e,o){if(null===e)return e;var i="_date_"+t,r=e[i];return r||(r=Xo(o,Y(t)(e)),e[i]=r),r}function Ds(t,e){t=t.type,e=e instanceof Date;return!t&&e||zs(t,y)}function Hs(t){return 1===t.length?t[0]:t}var Us=/area/i;function Fs(t,e){var o,i=rr.current.bindPoint(t,null,e).valueFields;for(o in i)if(R(i[o]))return!0}function Ns(t){for(var e,o,i=t.start,r=t.dir,n=t.min,s=t.max,a=t.getter,h=t.hasItem,p=t.series,l=i;h(l+=r)&&(e=Fs(p,(o=a(l)).item)),n<=l&&l<=s&&!e;);if(e)return o}function Gs(t,e,o,i,r){var n,s,a,h=e.min,p=e.max,l=0<h&&h<o,c=p+1<o;(l||c)&&(((e=t).missingValues||(Us.test(e.type)||e.stack?pr:lr))!==lr?(l&&(n=i(h-1)),c&&(s=i(p+1))):(l&&(n=Fs(t,(a=i(h-1)).item)?a:Ns({start:h,dir:-1,min:0,max:o-1,getter:i,hasItem:r,series:t})),c&&(s=Fs(t,(a=i(p+1)).item)?a:Ns({start:p,dir:1,min:0,max:o-1,getter:i,hasItem:r,series:t}))),n&&(t._outOfRangeMinPoint=n),s&&(t._outOfRangeMaxPoint=s))}var Ws,uo=((Ws=le)&&(Xs.__proto__=Ws),((Xs.prototype=Object.create(Ws&&Ws.prototype)).constructor=Xs).prototype.initFields=function(){},Xs.prototype.initSeries=function(){for(var t=this.series,e=0;e<t.length;e++)t[e].index=e},Xs.prototype.createPanes=function(){for(var t=this.options.title||{},e=this.options.paneDefaults,o=this.options.panes||[],i=Math.max(o.length,1),r=[],n=z({title:{color:t.color}},e),s=0;s<i;s++){var a=z({},n,o[s]);B(a.title)&&(a.title=z({text:a.title},n.title));a=new Rs(a);a.paneIndex=s,r.push(a),this.append(a)}this.panes=r},Xs.prototype.crosshairOptions=function(t){return t.options.crosshair},Xs.prototype.createCrosshairs=function(t){void 0===t&&(t=this.panes);for(var e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.axes.length;i++){var r=o.axes[i],n=this.crosshairOptions(r);n&&n.visible&&(n=new As(this.chartService,r,n),this.crosshairs.push(n),o.content.append(n))}},Xs.prototype.removeCrosshairs=function(t){for(var e=this.crosshairs,o=t.axes,i=e.length-1;0<=i;i--)for(var r=0;r<o.length;r++)if(e[i].axis===o[r]){e.splice(i,1);break}},Xs.prototype.hideCrosshairs=function(){for(var t=this.crosshairs,e=0;e<t.length;e++)t[e].hide()},Xs.prototype.findPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].options.name===t){e=o[i];break}return e||o[0]},Xs.prototype.findPointPane=function(t){for(var e,o=this.panes,i=0;i<o.length;i++)if(o[i].box.containsPoint(t)){e=o[i];break}return e},Xs.prototype.appendAxis=function(t){this.findPane(t.options.pane).appendAxis(t),this.axes.push(t),t.plotArea=this},Xs.prototype.removeAxis=function(t){for(var e=[],o=0;o<this.axes.length;o++){var i=this.axes[o];t!==i?e.push(i):i.destroy()}this.axes=e},Xs.prototype.appendChart=function(t,e){this.charts.push(t),e?e.appendChart(t):this.append(t)},Xs.prototype.removeChart=function(t){for(var e=[],o=0;o<this.charts.length;o++){var i=this.charts[o];i!==t?e.push(i):i.destroy()}this.charts=e},Xs.prototype.addToLegend=function(t){for(var e=t.length,o=this.options.legend,i=o.labels||{},r=o.inactiveItems||{},n=r.labels||{},s=[],a=0;a<e;a++){var h,p,l,c,u=t[a],d=!1!==u.visible;!1!==u.visibleInLegend&&(h=u.name,(l=!d&&W(n)||W(i))&&(h=l({text:Jn(h)?h:"",series:u})),c=u._defaults,E(p=u.color)&&c&&(p=c.color),c=l=void 0,c=d?(l={},p):(l={color:n.color,font:n.font},r.markers.color),Jn(h)&&""!==h&&s.push({text:h,labels:l,markerColor:c,series:u,active:d}))}ht(o.items,s)},Xs.prototype.groupAxes=function(t){for(var e=[],o=[],i=0;i<t.length;i++)for(var r=t[i].axes,n=0;n<r.length;n++){var s=r[n];(s.options.vertical?o:e).push(s)}return{x:e,y:o,any:e.concat(o)}},Xs.prototype.groupSeriesByPane=function(){for(var t=this.series,e={},o=0;o<t.length;o++){var i=t[o],r=this.seriesPaneName(i);e[r]?e[r].push(i):e[r]=[i]}return e},Xs.prototype.filterVisibleSeries=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];!1!==i.visible&&e.push(i)}return e},Xs.prototype.reflow=function(t){var e=this.options.plotArea,o=this.panes,e=U(e.margin);this.box=t.clone().unpad(e),this.reflowPanes(),this.detachLabels(),this.reflowAxes(o),this.reflowCharts(o)},Xs.prototype.redraw=function(t){var e=[].concat(t);this.initSeries();t=this.getRoot();t&&t.cleanGradients();for(var o=0;o<e.length;o++)this.removeCrosshairs(e[o]),e[o].empty();this.render(e),this.detachLabels(),this.reflowAxes(this.panes),this.reflowCharts(e),this.createCrosshairs(e);for(var i=0;i<e.length;i++)e[i].refresh()},Xs.prototype.axisCrossingValues=function(t,e){for(var t=t.options,o=[].concat(t.axisCrossingValues||t.axisCrossingValue),i=e.length-o.length,r=o[0]||0,n=0;n<i;n++)o.push(r);return o},Xs.prototype.alignAxisTo=function(t,e,o,i){var r=t.getSlot(o,o,!0),n=t.options.reverse?2:1,o=e.getSlot(i,i,!0),i=e.options.reverse?2:1,n=t.box.translate(o[v+i]-r[v+n],o[m+i]-r[m+n]);t.pane!==e.pane&&n.translate(0,t.pane.box.y1-e.pane.box.y1),t.reflow(n)},Xs.prototype.alignAxes=function(t,e){for(var o=t[0],i=e[0],r=this.axisCrossingValues(o,e),n=this.axisCrossingValues(i,t),s={},a={},h={},p={},l=0;l<e.length;l++){var c=e[l],u=c.pane,d=u.id,f=!1!==c.options.visible,g=Ys(t,u)||o,u=r;g!==o&&(u=this.axisCrossingValues(g,e)),this.alignAxisTo(c,g,n[l],u[l]),c.options._overlap||(bt(c.lineBox().x1)===bt(g.lineBox().x1)&&(s[d]&&c.reflow(c.box.alignTo(s[d].box,S).translate(-c.options.margin,0)),f&&(s[d]=c)),bt(c.lineBox().x2)===bt(g.lineBox().x2)&&(c._mirrored||(c.options.labels.mirror=!c.options.labels.mirror,c._mirrored=!0),this.alignAxisTo(c,g,n[l],u[l]),a[d]&&c.reflow(c.box.alignTo(a[d].box,k).translate(c.options.margin,0)),f&&(a[d]=c)),0!==l&&i.pane===c.pane&&(c.alignTo(i),c.reflow(c.box)))}for(var y=0;y<t.length;y++){var v=t[y],m=v.pane,x=m.id,_=!1!==v.options.visible,b=Ys(e,m)||i,m=n;b!==i&&(m=this.axisCrossingValues(b,t)),this.alignAxisTo(v,b,r[y],m[y]),v.options._overlap||(bt(v.lineBox().y1)===bt(b.lineBox().y1)&&(v._mirrored||(v.options.labels.mirror=!v.options.labels.mirror,v._mirrored=!0),this.alignAxisTo(v,b,r[y],m[y]),h[x]&&v.reflow(v.box.alignTo(h[x].box,A).translate(0,-v.options.margin)),_&&(h[x]=v)),bt(v.lineBox().y2,3)===bt(b.lineBox().y2,3)&&(p[x]&&v.reflow(v.box.alignTo(p[x].box,w).translate(0,v.options.margin)),_&&(p[x]=v)),0!==y&&(v.alignTo(o),v.reflow(v.box)))}},Xs.prototype.shrinkAxisWidth=function(t){for(var e=this.groupAxes(t).any,o=qs(e),i=0,r=0;r<t.length;r++){var n=t[r];0<n.axes.length&&(i=Math.max(i,o.width()-n.contentBox.width()))}if(0!==i)for(var s=0;s<e.length;s++){var a=e[s];a.options.vertical||a.reflow(a.box.shrink(i,0))}},Xs.prototype.shrinkAxisHeight=function(t){for(var e,o=0;o<t.length;o++){var i=t[o],r=i.axes,n=Math.max(0,qs(r).height()-i.contentBox.height());if(0!==n){for(var s=0;s<r.length;s++){var a=r[s];a.options.vertical&&a.reflow(a.box.shrink(0,n))}e=!0}}return e},Xs.prototype.fitAxes=function(t){for(var e=this.groupAxes(t).any,o=0,i=0;i<t.length;i++){var r=t[i],n=r.axes,s=r.contentBox;if(0<n.length)for(var r=qs(n),a=Math.max(s.y1-r.y1,s.y2-r.y2),o=Math.max(o,s.x1-r.x1),h=0;h<n.length;h++){var p=n[h];p.reflow(p.box.translate(0,a))}}for(var l=0;l<e.length;l++){var c=e[l];c.reflow(c.box.translate(o,0))}},Xs.prototype.reflowAxes=function(t){for(var e=this.groupAxes(t),o=0;o<t.length;o++)this.reflowPaneAxes(t[o]);0<e.x.length&&0<e.y.length&&(this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t),this.autoRotateAxisLabels(e),this.alignAxes(e.x,e.y),this.shrinkAxisWidth(t)&&this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t),this.alignAxes(e.x,e.y),this.shrinkAxisHeight(t)&&this.alignAxes(e.x,e.y),this.fitAxes(t))},Xs.prototype.autoRotateAxisLabels=function(t){for(var e,o=this.panes,i=Zs(o),r=0;r<i.length;r++)i[r].autoRotateLabels()&&(e=!0);if(e){for(var n=0;n<o.length;n++)this.reflowPaneAxes(o[n]);0<t.x.length&&0<t.y.length&&(this.alignAxes(t.x,t.y),this.shrinkAxisWidth(o))}},Xs.prototype.reflowPaneAxes=function(t){var e=t.axes,o=e.length;if(0<o)for(var i=0;i<o;i++)e[i].reflow(t.contentBox)},Xs.prototype.reflowCharts=function(t){for(var e=this.charts,o=e.length,i=this.box,r=0;r<o;r++){var n=e[r].pane;n&&!J(n,t)||e[r].reflow(i)}},Xs.prototype.reflowPanes=function(){for(var t=this.box,e=this.panes,o=e.length,i=t.height(),r=0,n=t.y1,s=0;s<o;s++){var a=e[s],h=a.options.height;a.options.width=t.width(),a.options.height?(h.indexOf&&h.indexOf("%")&&(h=parseInt(h,10)/100,a.options.height=h*t.height()),a.reflow(t.clone()),i-=a.options.height):r++}for(var p=0;p<o;p++){var l=e[p];l.options.height||(l.options.height=i/r)}for(var c=0;c<o;c++){var u=e[c],d=t.clone().move(t.x1,n);u.reflow(d),n+=u.options.height}},Xs.prototype.backgroundBox=function(){for(var t=this.axes,e=t.length,o=0;o<e;o++)for(var i=t[o],r=0;r<e;r++){var n,s=t[r];i.options.vertical!==s.options.vertical&&(s=i.lineBox().clone().wrap(s.lineBox()),n=n?n.wrap(s):s)}return n||this.box},Xs.prototype.chartsBoxes=function(){for(var t=this.panes,e=[],o=0;o<t.length;o++)e.push(t[o].chartsBox());return e},Xs.prototype.addBackgroundPaths=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)t.paths.push(P.drawing.Path.fromRect(e[o].toRect()))},Xs.prototype.backgroundContainsPoint=function(t){for(var e=this.chartsBoxes(),o=0;o<e.length;o++)if(e[o].containsPoint(t))return!0},Xs.prototype.createVisual=function(){Ws.prototype.createVisual.call(this);var t=this.options.plotArea,e=t.opacity,o=t.background,t=t.border;void 0===t&&(t={}),""!==o&&null!==o&&"none"!==o&&"transparent"!==o&<(o)||(o=a,e=0);t=this._bgVisual=new P.drawing.MultiPath({fill:{color:o,opacity:e},stroke:{color:t.width?t.color:"",width:t.width,dashType:t.dashType},zIndex:-1});this.addBackgroundPaths(t),this.appendVisual(t)},Xs.prototype.pointsByCategoryIndex=function(t){var e=this.charts,o=[];if(null!==t)for(var i=0;i<e.length;i++)if("_navigator"!==e[i].pane.options.name){var r=e[i].categoryPoints[t];if(r&&r.length)for(var n=0;n<r.length;n++){var s=r[n];s&<(s.value)&&null!==s.value&&o.push(s)}}return o},Xs.prototype.pointsBySeriesIndex=function(e){return this.filterPoints(function(t){return t.series.index===e})},Xs.prototype.pointsBySeriesName=function(e){return this.filterPoints(function(t){return t.series.name===e})},Xs.prototype.filterPoints=function(t){for(var e=this.charts,o=[],i=0;i<e.length;i++)for(var r=e[i].points,n=0;n<r.length;n++){var s=r[n];s&&!1!==s.visible&&t(s)&&o.push(s)}return o},Xs.prototype.findPoint=function(t){for(var e=this.charts,o=0;o<e.length;o++)for(var i=e[o].points,r=0;r<i.length;r++){var n=i[r];if(n&&!1!==n.visible&&t(n))return n}},Xs.prototype.paneByPoint=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.box.containsPoint(t))return i}},Xs.prototype.detachLabels=function(){var t=this.groupAxes(this.panes),e=t.x,t=t.y;this.detachAxisGroupLabels(t,e),this.detachAxisGroupLabels(e,t)},Xs.prototype.detachAxisGroupLabels=function(t,e){for(var o=0,i=0;i<t.length;i++){var r=t[i],n=r.pane,s=Ys(e,n)||e[0],s=this.createLabelAxis(r,i+o,s);s&&(o++,r=n.axes.indexOf(r)+o,n.appendAxisAt(s,r))}},Xs.prototype.createLabelAxis=function(t,e,o){var i=t.options.labels,r=i.position,n=i.visible;if("end"!==r&&"start"!==r||!1===n)return null;i=this.groupAxes(this.panes),n=o.options.vertical?i.x:i.y,i=this.axisCrossingValues(o,n),n="end"===r,r=o.range(),n=n?r.max:r.min;if(mt(i[e],r.min,r.max)-n==0)return null;i.splice(e+1,0,n),o.options.axisCrossingValues=i;i=t.clone();return t.clear(),i.options.name=void 0,i.options.line.visible=!1,i.options.crosshair=void 0,i.options.notes=void 0,i.options.plotBands=void 0,i},Xs);function Xs(t,e,o){Ws.call(this,e),this.initFields(t,e),this.series=t,this.initSeries(),this.charts=[],this.options.legend=this.options.legend||{},this.options.legend.items=[],this.axes=[],this.crosshairs=[],this.chartService=o,this.originalOptions=e,this.createPanes(),this.render(),this.createCrosshairs()}function qs(t){for(var e,o=t.length,i=0;i<o;i++){var r=t[i],n=!1!==r.options.visible;(n||function(e){return!e.pane.axes.some(function(t){return t.options.vertical===e.options.vertical&&t!==e&&!1!==t.options.visible})}(r))&&(r=n?r.contentBox():r.lineBox(),e?e.wrap(r):e=r.clone())}return e||new qt}function Ys(t,e){for(var o=0;o<t.length;o++){var i=t[o];if(i&&i.pane===e)return i}}var Zs=function(t){return t.reduce(function(t,e){return t.concat(e.axes)},[])};kt(uo,{series:[],plotArea:{margin:{}},background:"",border:{color:r,width:0},paneDefaults:{title:{}},legend:{inactiveItems:{labels:{color:"#919191"},markers:{color:"#919191"}}}});var Qs=uo,Ks={hover:function(t,e){this._dispatchEvent(t,e,"plotAreaHover")},click:function(t,e){this._dispatchEvent(t,e,"plotAreaClick")}};var $s,Js,ta=((Js=P.Class)&&(oa.__proto__=Js),((oa.prototype=Object.create(Js&&Js.prototype)).constructor=oa).prototype.aggregatePoints=function(t,e){var o=this._series,i=this._seriesFields,r=this._bindPoints(t||[]),n=r.dataItems[0],s={};!n||O(n)||x(n)||((t=function(){}).prototype=n,s=new t);for(var a=0;a<i.length;a++){var h=i[a],p=this._bindField(r.values,h.canonicalName),p=h.transform(p,o,r.dataItems,e);if(!(null===p||!V(p)||lt(p.length)||p instanceof Date)){s=p;break}lt(p)&&function(t,e,o){var i=e,r=t;if(-1<t.indexOf(".")){for(var n=t.split(".");1<n.length;)r=n.shift(),lt(i[r])||(i[r]={}),i=i[r];r=n.shift()}i[r]=o}(h.name,s,p)}return s},oa.prototype._bindPoints=function(t){for(var e=this._binder,o=this._series,i=[],r=[],n=0;n<t.length;n++){var s=t[n];i.push(e.bindPoint(o,s)),r.push(o.data[s])}return{values:i,dataItems:r}},oa.prototype._bindField=function(t,e){for(var o=[],i=t.length,r=0;r<i;r++){var n=t[r],s=n.valueFields,n=(lt(s[e])?s:n.fields)[e];o.push(n)}return o},oa),at=(($s=P.Class)&&(ea.__proto__=$s),((ea.prototype=Object.create($s&&$s.prototype)).constructor=ea).prototype.register=function(t,e){for(var o=0;o<t.length;o++)this._defaults[t[o]]=e},ea.prototype.query=function(t){return this._defaults[t]},ea);function ea(){$s.call(this),this._defaults={}}function oa(t,e,o){Js.call(this);var i=e.canonicalFields(t),r=e.valueFields(t),n=e.sourceFields(t,i),s=this._seriesFields=[],o=o.query(t.type),a=t.aggregate||o;this._series=t,this._binder=e;for(var h=0;h<i.length;h++){var p=i[h],l=void 0;if(V(a))l=a[p];else{if(0!==h&&!J(p,r))break;l=a}l&&s.push({canonicalName:p,name:n[h],transform:E(l)?l:$i[l]})}}at.current=new at;var ia,ra=at,ee=((ia=wn)&&(na.__proto__=ia),((na.prototype=Object.create(ia&&ia.prototype)).constructor=na).prototype.createLabel=function(){var t=this.options.labels,e=z({},t,t.from),t=z({},t,t.to);e.visible&&(this.labelFrom=this._createLabel(e),this.append(this.labelFrom)),t.visible&&(this.labelTo=this._createLabel(t),this.append(this.labelTo))},na.prototype._createLabel=function(t){var e=W(t),o=this.pointData(),e=e?e(o):this.formatValue(t.format);return new mn(e,z({vertical:this.options.vertical},t),o)},na.prototype.reflow=function(t){this.render();var e=this.labelFrom,o=this.labelTo,i=this.value;this.box=t,e&&(e.options.aboveAxis=i.from>i.to,e.reflow(t)),o&&(o.options.aboveAxis=i.to>i.from,o.reflow(t)),this.note&&this.note.reflow(t)},na);function na(){ia.apply(this,arguments)}ee.prototype.defaults=z({},ee.prototype.defaults,{labels:{format:"{0} - {1}"},tooltip:{format:"{1}"}});var sa,aa=ee,ae=((sa=Ln)&&(ha.__proto__=sa),((ha.prototype=Object.create(sa&&sa.prototype)).constructor=ha).prototype.pointType=function(){return aa},ha.prototype.pointValue=function(t){return t.valueFields},ha.prototype.formatPointValue=function(t,e){return null===t.value.from&&null===t.value.to?"":this.chartService.format.auto(e,t.value.from,t.value.to)},ha.prototype.plotRange=function(t){return t?[t.value.from,t.value.to]:0},ha.prototype.updateRange=function(t,e){var o=e.series.axis,i=t.from,r=t.to,e=this.valueAxisRanges[o];null!==t&&O(i)&&O(r)&&((e=this.valueAxisRanges[o]=e||{min:l,max:c}).min=Math.min(e.min,i),e.max=Math.max(e.max,i),e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))},ha.prototype.aboveAxis=function(t){t=t.value;return t.from<t.to},ha);function ha(){sa.apply(this,arguments)}ae.prototype.plotLimits=Er.prototype.plotLimits;var pa,la,ca=ae,ua=((la=Vr)&&(fa.__proto__=la),((fa.prototype=Object.create(la&&la.prototype)).constructor=fa).prototype.aliasFor=function(){return this.parent},fa),_e=((pa=le)&&(da.__proto__=pa),((da.prototype=Object.create(pa&&pa.prototype)).constructor=da).prototype.render=function(){var t,e,o,i;this._rendered||(this._rendered=!0,i=(o=this.options).markers,t=o.labels,e=this.value,o=this.fromPoint=new ua(e,z({},this.options,{labels:t.from,markers:i.from})),i=this.toPoint=new ua(e,z({},this.options,{labels:t.to,markers:i.to})),this.copyFields(o),this.copyFields(i),this.append(o),this.append(i))},da.prototype.reflow=function(t){this.render();var e=t.from,t=t.to;this.positionLabels(e,t),this.fromPoint.reflow(e),this.toPoint.reflow(t),this.box=this.fromPoint.markerBox().clone().wrap(this.toPoint.markerBox())},da.prototype.createHighlight=function(){var t=new P.drawing.Group;return t.append(this.fromPoint.createHighlight()),t.append(this.toPoint.createHighlight()),t},da.prototype.highlightVisual=function(){return this.visual},da.prototype.highlightVisualArgs=function(){return{options:this.options,from:this.fromPoint.highlightVisualArgs(),to:this.toPoint.highlightVisualArgs()}},da.prototype.tooltipAnchor=function(){var t=this.owner.pane.clipBox();if(!t||t.overlaps(this.box)){var e,o,i=this.box,r=i.center(),t=S,r=this.options.vertical?(e=r.x,o=i.y1-5,w):(e=i.x2+5,o=r.y,C);return{point:new Nt(e,o),align:{horizontal:t,vertical:r}}}},da.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},da.prototype.overlapsBox=function(t){return this.box.overlaps(t)},da.prototype.unclipElements=function(){this.fromPoint.unclipElements(),this.toPoint.unclipElements()},da.prototype.initLabelsFormat=function(){var t=this.options.labels;t.format||(t.from&&t.from.format||(t.from=Object.assign({},t.from,{format:"{0}"})),t.to&&t.to.format||(t.to=Object.assign({},t.to,{format:"{1}"})))},da.prototype.positionLabels=function(t,e){var o,i=this.options,r=i.labels,i=i.vertical;"auto"===r.position&&(t=i?e.y1<=t.y1?(o="above","below"):(o="below","above"):e.x1<=t.x1?(o=S,k):(o=k,S),r.from&&r.from.position||(this.fromPoint.options.labels.position=t),r.to&&r.to.position||(this.toPoint.options.labels.position=o))},da.prototype.copyFields=function(t){t.dataItem=this.dataItem,t.category=this.category,t.series=this.series,t.color=this.color,t.owner=this.owner},da);function da(t,e){pa.call(this),this.value=t,this.options=e,this.aboveAxis=Ct(this.options.aboveAxis,!0),this.tooltipTracking=!0,this.initLabelsFormat()}function fa(){la.apply(this,arguments)}z(_e.prototype,Lr),z(_e.prototype,ro),_e.prototype.defaults={markers:{visible:!1,background:a,size:8,type:u,border:{width:2},opacity:1},labels:{visible:!1,margin:U(3),padding:U(4),animation:{type:"fadeIn",delay:600},position:"auto"},notes:{label:{}},highlight:{markers:{border:{color:a,width:2}},zIndex:100},tooltip:{format:"{0} - {1}"}};var ga,ya,va,ma=_e,xa=((va=on)&&(Ca.__proto__=va),((Ca.prototype=Object.create(va&&va.prototype)).constructor=Ca).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.toGeometryPoints(this.toPoints()))},Ca.prototype.stackSegments=function(){var t=this.fromSegments;return t=!this.fromSegments?this.fromSegments=this.segmentsFromPoints(this.toGeometryPoints(this.fromPoints().reverse())):t},Ca.prototype.createStroke=function(t){var e=new P.drawing.Path(t),t=new P.drawing.Path(t);e.segments.push.apply(e.segments,this.strokeSegments()),t.segments.push.apply(t.segments,this.stackSegments()),this.visual.append(e),this.visual.append(t)},Ca.prototype.hasStackSegment=function(){return!0},Ca.prototype.fromPoints=function(){return this.linePoints.map(function(t){return t.fromPoint})},Ca.prototype.toPoints=function(){return this.linePoints.map(function(t){return t.toPoint})},Ca),_a=((ya=xa)&&(wa.__proto__=ya),((wa.prototype=Object.create(ya&&ya.prototype)).constructor=wa).prototype.createStrokeSegments=function(){return this.createCurveSegments(this.toPoints())},wa.prototype.stackSegments=function(){var t=this.fromSegments;return t=!this.fromSegments?this.fromSegments=this.createCurveSegments(this.fromPoints().reverse()):t},wa.prototype.createCurveSegments=function(t){return(new Hi).process(this.toGeometryPoints(t))},wa),ge=((ga=xa)&&(ba.__proto__=ga),((ba.prototype=Object.create(ga&&ga.prototype)).constructor=ba).prototype.createStrokeSegments=function(){return this.segmentsFromPoints(this.calculateStepPoints(this.toPoints()))},ba.prototype.stackSegments=function(){var t=this.fromSegments;return this.fromSegments||(t=this.fromSegments=this.segmentsFromPoints(this.calculateStepPoints(this.fromPoints()))).reverse(),t},ba);function ba(){ga.apply(this,arguments)}function wa(){ya.apply(this,arguments)}function Ca(){va.apply(this,arguments)}z(ge.prototype,Vt);var Sa,ka=ge,Se=((Sa=Er)&&(Aa.__proto__=Sa),((Aa.prototype=Object.create(Sa&&Sa.prototype)).constructor=Aa).prototype.render=function(){Sa.prototype.render.call(this),this.renderSegments()},Aa.prototype.pointType=function(){return ma},Aa.prototype.createPoint=function(t,e){var o=e.categoryIx,i=e.category,r=e.series,n=e.seriesIx,s=t.valueFields;if(!Jn(s.from)&&!Jn(s.to)){if(this.seriesMissingValues(r)!==pr)return null;s={from:0,to:0}}e=this.pointOptions(r,n),e=this.evalPointOptions(e,s,i,o,r,n),t=t.fields.color||r.color;E(r.color)&&(t=e.color);e=new ma(s,e);return e.color=t,this.append(e),e},Aa.prototype.createSegment=function(t,e,o){var i=(e.line||{}).style;return new("smooth"===i?_a:"step"===i?ka:xa)(t,e,o)},Aa.prototype.plotRange=function(t,e){return t?[t.value.from,t.value.to]:[e,e]},Aa.prototype.valueSlot=function(t,e){var o=t.getSlot(e[0],e[0],!this.options.clip),e=t.getSlot(e[1],e[1],!this.options.clip);if(o&&e)return{from:o,to:e}},Aa.prototype.pointSlot=function(t,e){var o,i=e.from,e=e.to,e=this.options.invertAxes?(o=new qt(i.x1,t.y1,i.x2,t.y2),new qt(e.x1,t.y1,e.x2,t.y2)):(o=new qt(t.x1,i.y1,t.x2,i.y2),new qt(t.x1,e.y1,t.x2,e.y2));return{from:o,to:e}},Aa.prototype.addValue=function(t,e){var o=t.valueFields;O(o.from)||(o.from=o.to),O(o.to)||(o.to=o.from),Sa.prototype.addValue.call(this,t,e)},Aa.prototype.updateRange=function(t,e){var o;null!==t&&O(t.from)&&O(t.to)&&(o=e.series.axis,e=this.valueAxisRanges[o]=this.valueAxisRanges[o]||{min:l,max:c},o=t.from,t=t.to,e.min=Math.min(e.min,o,t),e.max=Math.max(e.max,o,t))},Aa.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.from,t.to)},Aa.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++){var i=t[o];i&&(e.push((i.fromPoint||{}).marker),e.push((i.toPoint||{}).marker))}return e.concat(this._segments)},Aa);function Aa(){Sa.apply(this,arguments)}z(Se.prototype,It,ce);var Pa,Ta,Ma,Oa=Se,Ba=((Ma=zn)&&(Ia.__proto__=Ma),((Ia.prototype=Object.create(Ma&&Ma.prototype)).constructor=Ia).prototype.reflow=function(t){var e=this.options,o=this.value,i=this.owner.seriesValueAxis(e),r=[],n=[],s=[],a=i.getSlot(o.low,o.high),e=i.getSlot(o.open,o.open),o=i.getSlot(o.close,o.close);e.x1=o.x1=a.x1=t.x1,e.x2=o.x2=a.x2=t.x2;t=a.center().x;r.push([e.x1,e.y1]),r.push([t,e.y1]),n.push([t,o.y1]),n.push([o.x2,o.y1]),s.push([t,a.y1]),s.push([t,a.y2]),this.lines=[r,n,s],this.box=a.clone().wrap(e.clone().wrap(o)),this.reflowNote()},Ia.prototype.createBody=function(){},Ia),Ra=((Ta=Un)&&(La.__proto__=Ta),((La.prototype=Object.create(Ta&&Ta.prototype)).constructor=La).prototype.pointType=function(){return Ba},La),Ve=((Pa=le)&&(Ea.__proto__=Pa),((Ea.prototype=Object.create(Pa&&Pa.prototype)).constructor=Ea).prototype.linePoints=function(){var t,e=this.from,o=this.from.box,i=this.to.box,r=[];return e.isVertical?(t=e.aboveAxis?o.y1:o.y2,r.push([o.x1,t],[i.x2,t])):(e=e.aboveAxis?o.x2:o.x1,r.push([e,o.y1],[e,i.y2])),r},Ea.prototype.createVisual=function(){Pa.prototype.createVisual.call(this);var t=this.series.line||{},t=P.drawing.Path.fromPoints(this.linePoints(),{stroke:{color:t.color,width:t.width,opacity:t.opacity,dashType:t.dashType}});T(t),this.visual.append(t)},Ea);function Ea(t,e,o){Pa.call(this),this.from=t,this.to=e,this.series=o}function La(){Ta.apply(this,arguments)}function Ia(){Ma.apply(this,arguments)}kt(Ve,{animation:{type:"fadeIn",delay:600}});var za,Va,ja=Ve,Da=((Va=Ln)&&(Na.__proto__=Va),((Na.prototype=Object.create(Va&&Va.prototype)).constructor=Na).prototype.render=function(){Va.prototype.render.call(this),this.createSegments()},Na.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=Mr(e),i=!this.options.invertAxes,r=0;r<e.length;r++)for(var n=e[r],s=0,a=0,h=0;h<o;h++){var p=rr.current.bindPoint(n,h),l=p.valueFields.value,c=p.fields.summary,u=s,d=void 0;c?"total"===c.toLowerCase()?(u=0,d=p.valueFields.value=s):(d=u-(p.valueFields.value=a),a=0):O(l)&&(a+=l,d=s+=l),t(p,{category:this.categoryAxis.categoryAt(h),categoryIx:h,series:n,seriesIx:r,total:s,runningTotal:a,from:u,to:d,isVertical:i})}},Na.prototype.updateRange=function(t,e){Va.prototype.updateRange.call(this,{value:e.to},e)},Na.prototype.aboveAxis=function(t){return 0<=t.value},Na.prototype.plotRange=function(t){return[t.from,t.to]},Na.prototype.createSegments=function(){for(var t=this.options.series,e=this.seriesPoints,o=this.segments=[],i=0;i<t.length;i++){var r=t[i],n=e[i];if(n)for(var s=void 0,a=0;a<n.length;a++){var h,p=n[a];p&&s&&(h=new ja(s,p,r),o.push(h),this.append(h)),s=p}}},Na),Ha=["area","verticalArea","rangeArea","verticalRangeArea"],Ua=[dr,gr].concat(Ha),Fe=((za=Qs)&&(Fa.__proto__=za),((Fa.prototype=Object.create(za&&za.prototype)).constructor=Fa).prototype.initFields=function(t){if(this.namedCategoryAxes={},this.namedValueAxes={},this.valueAxisRangeTracker=new dn,0<t.length){this.invertAxes=J(t[0].type,[cr,"bullet",gr,"verticalArea","verticalRangeArea","rangeBar","horizontalWaterfall","verticalBoxPlot"]);for(var e=0;e<t.length;e++){var o=t[e].stack;if(o&&"100%"===o.type){this.stack100=!0;break}}}},Fa.prototype.render=function(t){void 0===t&&(t=this.panes),this.createCategoryAxes(t),this.aggregateCategories(t),this.createCategoryAxesLabels(t),this.createCharts(t),this.createValueAxes(t)},Fa.prototype.removeAxis=function(t){var e=t.options.name;za.prototype.removeAxis.call(this,t),t instanceof Ko?delete this.namedCategoryAxes[e]:(this.valueAxisRangeTracker.reset(e),delete this.namedValueAxes[e]),t===this.categoryAxis&&delete this.categoryAxis,t===this.valueAxis&&delete this.valueAxis},Fa.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);if(r)for(var n=this.groupSeriesByCategoryAxis(r),s=0;s<n.length;s++)this.createChartGroup(n[s],i)}},Fa.prototype.createChartGroup=function(t,e){this.createAreaChart(Vs(t,["area","verticalArea"]),e),this.createRangeAreaChart(Vs(t,["rangeArea","verticalRangeArea"]),e),this.createBarChart(Vs(t,[ur,cr]),e),this.createRangeBarChart(Vs(t,["rangeColumn","rangeBar"]),e),this.createBulletChart(Vs(t,["bullet","verticalBullet"]),e),this.createCandlestickChart(Vs(t,"candlestick"),e),this.createBoxPlotChart(Vs(t,["boxPlot","verticalBoxPlot"]),e),this.createOHLCChart(Vs(t,"ohlc"),e),this.createWaterfallChart(Vs(t,["waterfall","horizontalWaterfall"]),e),this.createLineChart(Vs(t,[dr,gr]),e)},Fa.prototype.aggregateCategories=function(t){var e=this.srcSeries||this.series,o=[];this._currentPointsCache={},this._seriesPointsCache=this._seriesPointsCache||{};for(var i=0;i<e.length;i++){var r=e[i],n=this.seriesCategoryAxis(r),s=this.findPane(n.options.pane),r=(zs(n.options.type,y)||r.categoryField)&&J(s,t)?this.aggregateSeries(r,n):this.filterSeries(r,n);o.push(r)}this._seriesPointsCache=this._currentPointsCache,this._currentPointsCache=null,this.srcSeries=e,this.series=o},Fa.prototype.filterSeries=function(e,o){var t=(e.data||{}).length;if(o._seriesMax=Math.max(o._seriesMax||0,t),!O(o.options.min)&&!O(o.options.max))return e;var i=o.currentRangeIndices(),r=J(e.type,Ua),n=z({},e);return n.data=(n.data||[]).slice(i.min,i.max+1),r&&Gs(n,i,t,function(t){return{item:e.data[t],category:o.categoryAt(t,!0),categoryIx:t-i.min}},function(t){return lt(e.data[t])}),n},Fa.prototype.clearSeriesPointsCache=function(){this._seriesPointsCache={}},Fa.prototype.seriesSourcePoints=function(t,e){var o=t.index+";"+e.categoriesHash();if(this._seriesPointsCache[o])return this._currentPointsCache[o]=this._seriesPointsCache[o],this._seriesPointsCache[o];var i=e.options,r=i.srcCategories,i=zs(i.type,y),n=t.data,s=i?js:Ji,a=[];i||e.mapCategories();for(var h=0;h<n.length;h++){var p,l=t.categoryField?s(t.categoryField,n[h],this.chartService.intl):r[h];lt(l)&&null!==l&&(a[p=e.totalIndex(l)]=a[p]||{items:[],category:l},a[p].items.push(h))}return this._currentPointsCache[o]=a},Fa.prototype.aggregateSeries=function(t,i){if(!t.data.length)return t;for(var r=this.seriesSourcePoints(t,i),e=z({},t),n=new ta(z({},t),rr.current,ra.current),o=e.data=[],s=i.options.dataItems||[],a=i.currentRangeIndices(),h=function(t){var e=t-a.min,o=r[t];return(o=o||(r[t]={})).categoryIx=e,o.item||(t=i.categoryAt(t,!0),o.category=t,o.item=n.aggregatePoints(o.items,t)),o},p=a.min;p<=a.max;p++){var l=h(p);o[l.categoryIx]=l.item,l.items&&l.items.length&&(s[l.categoryIx]=l.item)}return J(e.type,Ua)&&Gs(e,a,i.totalCount(),h,function(t){return r[t]}),i.options.dataItems=s,e},Fa.prototype.appendChart=function(t,e){var o=t.options.series,i=this.seriesCategoryAxis(o[0]),r=i.options.categories,n=Math.max(0,Mr(o)-r.length);if(0<n)for(r=i.options.categories=i.options.categories.slice(0);n--;)r.push("");this.valueAxisRangeTracker.update(t.valueAxisRanges),za.prototype.appendChart.call(this,t,e)},Fa.prototype.seriesPaneName=function(t){var e=this.options,o=t.axis,t=Z([].concat(e.valueAxis),function(t){return t.name===o})[0],e=((e.panes||[{}])[0]||{}).name||"default";return(t||{}).pane||e},Fa.prototype.seriesCategoryAxis=function(t){var e=t.categoryAxis,t=e?this.namedCategoryAxes[e]:this.categoryAxis;if(!t)throw new Error("Unable to locate category axis with name "+e);return t},Fa.prototype.stackableChartOptions=function(t,e){t=t.stack;return{isStacked:t,isStacked100:t&&"100%"===t.type,clip:e.options.clip}},Fa.prototype.groupSeriesByCategoryAxis=function(t){for(var e=[],o={},i=0;i<t.length;i++){var r=t[i].categoryAxis||"$$default$$";o.hasOwnProperty(r)||(o[r]=!0,e.push(r))}for(var n=[],s=0;s<e.length;s++){var a=function(t,e,o){return Z(t,function(t){return 0===o&&!t.categoryAxis||t.categoryAxis===e})}(t,e[s],s);0!==a.length&&n.push(a)}return n},Fa.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Ln(this,Object.assign({series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Fa.prototype.createRangeBarChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new ca(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(o,e))},Fa.prototype.createBulletChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new ms(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Fa.prototype.createLineChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new en(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Fa.prototype.createAreaChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new un(this,Object.assign({invertAxes:this.invertAxes,series:t},this.stackableChartOptions(o,e))),this.appendChart(o,e))},Fa.prototype.createRangeAreaChart=function(t,e){0!==t.length&&(t=new Oa(this,{invertAxes:this.invertAxes,series:t,clip:e.options.clip}),this.appendChart(t,e))},Fa.prototype.createOHLCChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Ra(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Fa.prototype.createCandlestickChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Un(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Fa.prototype.createBoxPlotChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Yn(this,{invertAxes:this.invertAxes,gap:o.gap,series:t,spacing:o.spacing,clip:e.options.clip}),this.appendChart(o,e))},Fa.prototype.createWaterfallChart=function(t,e){var o;0!==t.length&&(o=t[0],o=new Da(this,{series:t,invertAxes:this.invertAxes,gap:o.gap,spacing:o.spacing}),this.appendChart(o,e))},Fa.prototype.axisRequiresRounding=function(t,e){for(var o=Vs(this.series,yr),i=0;i<this.series.length;i++){var r,n=this.series[i];!J(n.type,Ha)||(r=n.line)&&"step"===r.style&&o.push(n)}for(var s=0;s<o.length;s++){var a=o[s].categoryAxis||"";if(a===t||!a&&0===e)return!0}},Fa.prototype.aggregatedAxis=function(t,e){for(var o=this.series,i=0;i<o.length;i++){var r=o[i].categoryAxis||"";if((r===t||!r&&0===e)&&o[i].categoryField)return!0}},Fa.prototype.createCategoryAxesLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e]instanceof Ko&&t[e].createLabels()},Fa.prototype.createCategoryAxes=function(t){for(var e=this.invertAxes,o=[].concat(this.options.categoryAxis),i=[],r=0;r<o.length;r++){var n=o[r];if(J(this.findPane(n.pane),t)){var s=n.name,a=n.categories;void 0===a&&(a=[]),n=z({vertical:e,reverse:!e&&this.chartService.rtl,axisCrossingValue:e?l:0},n),lt(n.justified)||(n.justified=this.isJustified()),this.axisRequiresRounding(s,r)&&(n.justified=!1);var h=void 0,h=new(Ds(n,a[0])?ai:Ko)(n,this.chartService);if(o[r].categories=h.options.srcCategories,s){if(this.namedCategoryAxes[s])throw new Error("Category axis with name "+s+" is already defined");this.namedCategoryAxes[s]=h}h.axisIndex=r,i.push(h),this.appendAxis(h)}}var p=this.categoryAxis||i[0];this.categoryAxis=p,e?this.axisY=p:this.axisX=p},Fa.prototype.isJustified=function(){for(var t=this.series,e=0;e<t.length;e++)if(!J(t[e].type,Ha))return!1;return!0},Fa.prototype.createValueAxes=function(t){var e=this.valueAxisRangeTracker,o=e.query(),i=[].concat(this.options.valueAxis),r=this.invertAxes,n={vertical:!r,reverse:r&&this.chartService.rtl},s=[];this.stack100&&(n.roundToMajorUnit=!1,n.labels={format:"P0"});for(var a=0;a<i.length;a++){var h=i[a];if(J(this.findPane(h.pane),t)){var p=h.name,l=zs(h.type,"log")?{min:.1,max:1}:{min:0,max:1},l=e.query(p)||o||l;0===a&&l&&o&&(l.min=Math.min(l.min,o.min),l.max=Math.max(l.max,o.max));h=new(zs(h.type,"log")?Si:yi)(l.min,l.max,z({},n,h),this.chartService);if(p){if(this.namedValueAxes[p])throw new Error("Value axis with name "+p+" is already defined");this.namedValueAxes[p]=h}h.axisIndex=a,s.push(h),this.appendAxis(h)}}var c=this.valueAxis||s[0];this.valueAxis=c,r?this.axisX=c:this.axisY=c},Fa.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),i=this.pointPane(r),n=[],s=[];if(i){for(var a=i.axes,h=0;h<a.length;h++){var p=a[h];p.getValue?Es(s,p.getValue(r)):Es(n,p.getCategory(r))}0===n.length&&Es(n,this.categoryAxis.getCategory(r)),0<n.length&&0<s.length&&t.trigger(o,{element:gt(e),originalEvent:e,category:Hs(n),value:Hs(s)})}},Fa.prototype.pointPane=function(t){for(var e=this.panes,o=0;o<e.length;o++){var i=e[o];if(i.contentBox.containsPoint(t))return i}},Fa.prototype.updateAxisOptions=function(t,e){Ga(this.options,t,e),Ga(this.originalOptions,t,e)},Fa);function Fa(){za.apply(this,arguments)}function Na(){Va.apply(this,arguments)}function Ga(t,e,o){z([].concat(e instanceof Ko?t.categoryAxis:t.valueAxis)[e.axisIndex],o)}kt(Fe,{categoryAxis:{},valueAxis:{}}),z(Fe.prototype,Ks);var Wa=Fe;function Xa(){this._defaultPrevented=!0}var qa,Ya=((qa=P.Class)&&(Za.__proto__=qa),((Za.prototype=Object.create(qa&&qa.prototype)).constructor=Za).prototype.destroy=function(){this._points=[]},Za.prototype.show=function(t,e){var o=[].concat(t);this.hide();for(var i=0;i<o.length;i++){var r=o[i];r&&r.toggleHighlight&&r.hasHighlight()&&(this.togglePointHighlight(r,!0,e),this._points.push(r))}},Za.prototype.togglePointHighlight=function(t,e,o){var i=(t.options.highlight||{}).toggle;i?(i(i={category:t.category,series:t.series,dataItem:t.dataItem,value:t.value,stackValue:t.stackValue,preventDefault:Xa,visual:t.highlightVisual(),show:e}),i._defaultPrevented||t.toggleHighlight(e,o)):t.toggleHighlight(e,o)},Za.prototype.hide=function(){for(var t=this._points;t.length;)this.togglePointHighlight(t.pop(),!1)},Za.prototype.isHighlighted=function(t){for(var e=this._points,o=0;o<e.length;o++)if(t===e[o])return!0;return!1},Za);function Za(){qa.call(this),this._points=[]}function Qa(t,e){e=(e||"").toLowerCase(),t=t.event;return"none"===e&&!(t.ctrlKey||t.shiftKey||t.altKey)||t[e+"Key"]}function Ka(t){for(var e={},o=0;o<t.length;o++){var i=t[o];i.axis.options.name&&(e[i.axis.options.name]={min:i.range.min,max:i.range.max})}return e}var $a,Xe=(($a=P.Class)&&(Ja.__proto__=$a),((Ja.prototype=Object.create($a&&$a.prototype)).constructor=Ja).prototype.start=function(t){return this._active=Qa(t,this.options.key),this._active},Ja.prototype.move=function(t){if(this._active){t=this.axisRanges=this._panAxes(t,v).concat(this._panAxes(t,m));if(t.length)return Ka(this.axisRanges=t)}},Ja.prototype.end=function(){var t=this._active;return this._active=!1,t},Ja.prototype.pan=function(){var t=this.plotArea,e=this.axisRanges;if(e.length){for(var o=0;o<e.length;o++){var i=e[o];t.updateAxisOptions(i.axis,i.range)}t.redraw(t.panes)}},Ja.prototype.destroy=function(){delete this.plotArea},Ja.prototype._panAxes=function(t,e){var o=this.plotArea,i=-t[e].delta,t=(this.options.lock||"").toLowerCase(),r=[];if(0!=i&&(t||"").toLowerCase()!==e)for(var n=o.axes,s=0;s<n.length;s++){var a,h=n[s];!(e===v&&!h.options.vertical||e===m&&h.options.vertical)||(a=h.pan(i))&&(a.limitRange=!0,r.push({axis:h,range:a}))}return r},Ja);function Ja(t,e){$a.call(this),this.plotArea=t,this.options=z({},this.options,e)}Xe.prototype.options={key:"none",lock:"none"};var th,eh=Xe,Ke=((th=P.Class)&&(oh.__proto__=th),((oh.prototype=Object.create(th&&th.prototype)).constructor=oh).prototype.createElement=function(){var t=this._marquee=document.createElement("div");t.className="k-marquee";var e=document.createElement("div");e.className="k-marquee-color",t.appendChild(e)},oh.prototype.removeElement=function(){this._marquee.parentNode&&this._marquee.parentNode.removeChild(this._marquee)},oh.prototype.setStyles=function(t){H(this._marquee,t)},oh.prototype.start=function(t){if(Qa(t,this.options.key)){var e=this.chart,o=e._eventCoordinates(t),e=this._zoomPane=e._plotArea.paneByPoint(o),o=e?e.chartsBox().clone():null;if(e&&o){e=this._elementOffset();return o.translate(e.left,e.top),this._zoomPaneClipBox=o,document.body.appendChild(this._marquee),this.setStyles({left:t.pageX+1,top:t.pageY+1,width:0,height:0}),!0}}return!1},oh.prototype._elementOffset=function(){var t=this.chart.element,e=H(t,["paddingLeft","paddingTop"]),o=e.paddingLeft,e=e.paddingTop,t=ut(t);return{left:o+t.left,top:e+t.top}},oh.prototype.move=function(t){this._zoomPane&&this.setStyles(this._selectionPosition(t))},oh.prototype.end=function(t){if(this._zoomPane){var e=this._elementOffset(),t=this._selectionPosition(t);t.left-=e.left,t.top-=e.top;e={x:t.left,y:t.top},t={x:t.left+t.width,y:t.top+t.height};return this._updateAxisRanges(e,t),this.removeElement(),delete this._zoomPane,Ka(this.axisRanges)}},oh.prototype.zoom=function(){var t=this.axisRanges;if(t&&t.length){for(var e=this.chart._plotArea,o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},oh.prototype.destroy=function(){this.removeElement(),delete this._marquee,delete this.chart},oh.prototype._updateAxisRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this._zoomPane.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;o===v&&!a||o===m&&a||!lt(s.axisIndex)||(a=s.pointsRange(t,e))&&i.push({axis:s,range:a})}this.axisRanges=i},oh.prototype._selectionPosition=function(t){var e=this._zoomPaneClipBox,o={x:t.x.startLocation,y:t.y.startLocation},i=t.x.location,r=t.y.location,n=(this.options.lock||"").toLowerCase(),s=Math.min(o.x,i),a=Math.min(o.y,r),h=Math.abs(o.x-i),t=Math.abs(o.y-r);return n===v&&(s=e.x1,h=e.width()),n===m&&(a=e.y1,t=e.height()),i>e.x2&&(h=e.x2-o.x),i<e.x1&&(h=o.x-e.x1),r>e.y2&&(t=e.y2-o.y),r<e.y1&&(t=o.y-e.y1),{left:Math.max(s,e.x1),top:Math.max(a,e.y1),width:h,height:t}},oh);function oh(t,e){th.call(this),this.chart=t,this.options=z({},this.options,e),this.createElement()}Ke.prototype.options={key:"shift",lock:"none"};var ih,rh,nh,sh,ah=Ke,hh=((sh=P.Class)&&(gh.__proto__=sh),((gh.prototype=Object.create(sh&&sh.prototype)).constructor=gh).prototype.updateRanges=function(t,e){for(var o=(this.options.lock||"").toLowerCase(),i=[],r=this.chart._plotArea.axes,n=0;n<r.length;n++){var s=r[n],a=s.options.vertical;o===v&&!a||o===m&&a||!s.zoomRange||(a=mt(this.options.rate,.01,.9),(a=s.zoomRange(-t*a,e))&&i.push({axis:s,range:a}))}return Ka(this.axisRanges=i)},gh.prototype.zoom=function(){var t=this.axisRanges,e=this.chart._plotArea;if(t&&t.length&&e.updateAxisOptions){for(var o=0;o<t.length;o++){var i=t[o];e.updateAxisOptions(i.axis,i.range)}e.redraw(e.panes)}},gh.prototype.destroy=function(){delete this.chart},gh),ph=((nh=le)&&(fh.__proto__=nh),((fh.prototype=Object.create(nh&&nh.prototype)).constructor=fh).prototype.render=function(){var t=this.children,e=this.options,o=e.vertical;this.visual=new P.drawing.Layout(null,{spacing:o?0:e.spacing,lineSpacing:o?e.spacing:0,orientation:o?"vertical":"horizontal",reverse:e.rtl,alignItems:o?"start":"center"});for(var i=0;i<t.length;i++){var r=t[i];r.reflow(new qt),r.renderVisual()}},fh.prototype.reflow=function(t){this.visual.rect(t.toRect()),this.visual.reflow();t=this.visual.clippedBBox();this.box=t?Re(t):new qt},fh.prototype.renderVisual=function(){this.addVisual()},fh.prototype.createVisual=function(){},fh),lh=((rh=fe)&&(dh.__proto__=rh),((dh.prototype=Object.create(rh&&rh.prototype)).constructor=dh).prototype.createContainer=function(){this.container=new Pe({vertical:!1,wrap:!1,align:C,spacing:this.options.spacing}),this.append(this.container)},dh.prototype.createMarker=function(){this.container.append(new ve(this.markerOptions()))},dh.prototype.markerOptions=function(){var t=this.options,e=t.markerColor;return z({},t.markers,{background:e,border:{color:e}})},dh.prototype.createLabel=function(){var t=this.options,e=z({},t.labels);this.container.append(new ze(t.text,e))},dh.prototype.renderComplete=function(){rh.prototype.renderComplete.call(this);var t=this.options.cursor||{},t=this._itemOverlay=P.drawing.Path.fromRect(this.container.box.toRect(),{fill:{color:a,opacity:0},stroke:null,cursor:t.style||t});this.appendVisual(t)},dh.prototype.click=function(t,e){var o=this.eventArgs(e);!t.trigger("legendItemClick",o)&&e&&"contextmenu"===e.type&&e.preventDefault()},dh.prototype.over=function(t,e){e=this.eventArgs(e);return t.trigger("legendItemHover",e)||t._legendItemHover(e.seriesIndex,e.pointIndex),!0},dh.prototype.out=function(t,e){t._unsetActivePoint(),t.trigger("legendItemLeave",this.eventArgs(e))},dh.prototype.eventArgs=function(t){var e=this.options;return{element:gt(t),text:e.text,series:e.series,seriesIndex:e.series.index,pointIndex:e.pointIndex}},dh.prototype.renderVisual=function(){var e=this,t=this.options,o=t.visual;o?(this.visual=o({active:t.active,series:t.series,sender:this.getSender(),pointIndex:t.pointIndex,options:{markers:this.markerOptions(),labels:t.labels},createVisual:function(){e.createVisual(),e.renderChildren(),e.renderComplete();var t=e.visual;return delete e.visual,t}}),this.addVisual()):rh.prototype.renderVisual.call(this)},dh),ch="custom",eo=((ih=le)&&(uh.__proto__=ih),((uh.prototype=Object.create(ih&&ih.prototype)).constructor=uh).prototype.createContainers=function(){var t=this.options,e=t.position,o=t.align,i=e,r=C;e===ch?i=S:J(e,[A,w])?(i="start"===o?S:"end"===o?k:C,r=e):o&&("start"===o?r=A:"end"===o&&(r=w)),this.container=new fe({margin:t.margin,padding:t.padding,background:t.background,border:t.border,vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}),this.hasTitle()?this.itemsContainer=new fe({vAlign:r,align:i,zIndex:t.zIndex,shrinkToFit:!0}):this.itemsContainer=this.container,this.append(this.container)},uh.prototype.createItems=function(){for(var t=this.getService(),e=this.options,o=this.isVertical(),i=new ph({vertical:o,spacing:e.spacing,rtl:t.rtl},t),r=e.items,n=(r=e.reverse?r.slice(0).reverse():r).length,s=0;s<n;s++){var a=r[s];i.append(new lh(z({},{markers:e.markers,labels:e.labels,rtl:t.rtl},e.item,a)))}i.render(),this.itemsContainer.append(i)},uh.prototype.isVertical=function(){var t=this.options,e=t.orientation,t=t.position;return t===ch&&"horizontal"!==e||(lt(e)?"horizontal"!==e:J(t,[S,k]))},uh.prototype.hasItems=function(){return 0<this.container.children[0].children.length},uh.prototype.reflow=function(t){var e=this.options,t=t.clone();this.hasItems()?(e.position===ch?(this.containerCustomReflow(t),this.box=t):this.containerReflow(t),this.hasTitle()&&this.title.reflow(new qt(this.container.box.x1,this.title.box.y1,this.container.box.x2,this.title.box.y2))):this.box=t},uh.prototype.containerReflow=function(t){var e=this.options,o=this.container,i=e.position,r=e.width,n=e.height,s=i===A||i===w?v:m,a=this.isVertical(),h=t.clone(),p=t.clone();i!==S&&i!==k||(p.y1=h.y1=0),a&&n?(p.y2=p.y1+n,p.align(h,m,o.options.vAlign)):!a&&r&&(p.x2=p.x1+r,p.align(h,v,o.options.align)),o.reflow(p);h=(p=o.box).clone();(e.offsetX||e.offsetY)&&(p.translate(e.offsetX,e.offsetY),o.reflow(p)),h[s+1]=t[s+1],h[s+2]=t[s+2],this.box=h},uh.prototype.containerCustomReflow=function(t){var e=this.options,o=this.container,i=e.offsetX,r=e.offsetY,n=e.width,s=e.height,e=this.isVertical(),t=t.clone();e&&s?t.y2=t.y1+s:!e&&n&&(t.x2=t.x1+n),o.reflow(t),t=o.box,o.reflow(new qt(i,r,i+t.width(),r+t.height()))},uh.prototype.renderVisual=function(){this.hasItems()&&ih.prototype.renderVisual.call(this)},uh.prototype.createLegendTitle=function(t){var e=z({},{color:r,position:A,align:C},t),o=e.text;t&&!1!==t.visible&&(lt(e)&&e.visible&&((t=W(e))?o=t({text:o}):e.format&&(o=this.chartService.format.auto(e.format,o))),this.title=new ze(o,e),this.createTitleLayout(),this.appendTitleLayoutContent())},uh.prototype.createTitleLayout=function(){this.layout=new Pe({vertical:!0,wrap:!1}),this.container.append(this.layout)},uh.prototype.hasTitle=function(){return Boolean(this.options.title&&!1!==this.options.title.visible)},uh.prototype.appendTitleLayoutContent=function(){this.options.title.position===w?(this.layout.append(this.itemsContainer),this.layout.append(this.title)):(this.layout.append(this.title),this.layout.append(this.itemsContainer))},uh);function uh(t,e){void 0===e&&(e={}),ih.call(this,t),this.chartService=e,J(this.options.position,[A,k,w,S,ch])||(this.options.position=k),this.createContainers(),this.createLegendTitle(t.title),this.createItems()}function dh(t){rh.call(this,t),this.createContainer(),t.rtl?(this.createLabel(),this.createMarker()):(this.createMarker(),this.createLabel())}function fh(t,e){nh.call(this,t),this.chartService=e}function gh(t,e){sh.call(this),this.chart=t,this.options=z({rate:.3},this.options,e)}kt(eo,{position:k,items:[],offsetX:0,offsetY:0,margin:U(5),padding:U(5),border:{color:r,width:0},item:{cursor:"pointer",spacing:6},spacing:6,background:"",zIndex:1,markers:{border:{width:0},width:15,height:3,type:"rect",align:S,vAlign:C}});var yh,vh=eo,uo=((yh=P.Class)&&(mh.__proto__=yh),((mh.prototype=Object.create(yh&&yh.prototype)).constructor=mh).prototype.register=function(t,e){this._registry.push({type:t,seriesTypes:e})},mh.prototype.create=function(t,e,o){for(var i,r=this._registry,n=r[0],s=0;s<r.length;s++){var a=r[s];if(0<(i=Vs(t,a.seriesTypes)).length){n=a;break}}return new n.type(i,e,o)},mh);function mh(){yh.call(this),this._registry=[]}uo.current=new uo;var xh=uo;function _h(t){var e=document.createElement("div");return t&&(e.className=t),e}function bh(t){for(var e=t;e&&!Q(e,"k-handle");)e=e.parentNode;return e}var wh,at=((wh=P.Class)&&(Ch.__proto__=wh),((Ch.prototype=Object.create(wh&&wh.prototype)).constructor=Ch).prototype.onPane=function(t){return this.categoryAxis.pane===t},Ch.prototype.createElements=function(){var t=this.options,e=this.wrapper=_h("k-selector");H(e,{top:t.offset.top,left:t.offset.left,width:t.width,height:t.height,direction:"ltr"});var o=this.selection=_h("k-selection");this.leftMask=_h("k-mask"),this.rightMask=_h("k-mask"),e.appendChild(this.leftMask),e.appendChild(this.rightMask),e.appendChild(o),o.appendChild(_h("k-selection-bg"));var i=this.leftHandle=_h("k-handle k-left-handle"),r=this.rightHandle=_h("k-handle k-right-handle");i.appendChild(_h()),r.appendChild(_h()),o.appendChild(i),o.appendChild(r),this.chartElement.appendChild(e);var n=H(o,["borderLeftWidth","borderRightWidth","height"]),s=H(i,"height").height,o=H(r,"height").height;t.selection={border:{left:n.borderLeftWidth,right:n.borderRightWidth}},H(i,{top:(n.height-s)/2}),H(r,{top:(n.height-o)/2}),e.style.cssText=e.style.cssText},Ch.prototype.bindEvents=function(){var t;!1!==this.options.mousewheel&&(this._mousewheelHandler=this._mousewheel.bind(this),pt(this.wrapper,((t={})[br]=this._mousewheelHandler,t))),this._domEvents=ho.create(this.wrapper,{stopPropagation:!0,start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),press:this._press.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)})},Ch.prototype.initOptions=function(){var t=this.options,e=this.categoryAxis.pane.chartsBox(),o=this.chart.chartService.intl;this._dateAxis&&z(t,{min:Xo(o,t.min),max:Xo(o,t.max),from:Xo(o,t.from),to:Xo(o,t.to)});var i=H(this.chartElement,["paddingLeft","paddingTop"]),o=i.paddingLeft,i=i.paddingTop;this.options=z({},{width:e.width(),height:e.height()+.1,padding:{left:o,top:i},offset:{left:e.x1+o,top:e.y1+i},from:t.min,to:t.max},t)},Ch.prototype.destroy=function(){var t;this._domEvents&&(this._domEvents.destroy(),delete this._domEvents),clearTimeout(this._mwTimeout),this._state=null,this.wrapper&&(this._mousewheelHandler&&(wt(this.wrapper,((t={})[br]=this._mousewheelHandler,t)),this._mousewheelHandler=null),this.chartElement.removeChild(this.wrapper),this.wrapper=null)},Ch.prototype._rangeEventArgs=function(t){return{axis:this.categoryAxis.options,from:this._value(t.from),to:this._value(t.to)}},Ch.prototype._start=function(t){var e=this.options,o=gt(t);!this._state&&o&&(this.chart._unsetActivePoint(),this._state={moveTarget:bh(o)||o,startLocation:t.x?t.x.location:0,range:{from:this._index(e.from),to:this._index(e.to)}},e=this._rangeEventArgs({from:this._index(e.from),to:this._index(e.to)}),this.trigger("selectStart",e)&&(this._state=null))},Ch.prototype._press=function(t){(t=this._state?this._state.moveTarget:bh(gt(t)))&&_(t,"k-handle-active")},Ch.prototype._move=function(t){var e,o,i,r,n,s,a,h,p,l,c,u;this._state&&(l=this._state,p=this.options,c=this.categoryAxis,e=l.range,o=l.moveTarget,i=c.options.reverse,r=this._index(p.from),n=this._index(p.to),s=this._index(p.min),a=this._index(p.max),u=l.startLocation-t.x.location,h=e.from,p=e.to,l=e.to-e.from,t=H(this.wrapper,"width").width/(c.categoriesCount()-1),c=Math.round(u/t)*(i?-1:1),o&&(u=Q(o,"k-left-handle"),t=Q(o,"k-right-handle"),Q(o,"k-selection k-selection-bg")?(e.from=Math.min(Math.max(s,r-c),a-l),e.to=Math.min(e.from+l,a)):u&&!i||t&&i?(e.from=Math.min(Math.max(s,r-c),a-1),e.to=Math.max(e.from+1,e.to)):(u&&i||t&&!i)&&(e.to=Math.min(Math.max(s+1,n-c),a),e.from=Math.min(e.to-1,e.from)),e.from===h&&e.to===p||(this.move(e.from,e.to),this.trigger("select",this._rangeEventArgs(e)))))},Ch.prototype._end=function(){var t;this._state&&((t=this._state.moveTarget)&&b(t,"k-handle-active"),t=this._state.range,this.set(t.from,t.to),this.trigger("selectEnd",this._rangeEventArgs(t)),delete this._state)},Ch.prototype._tap=function(t){var e=this.options,o=this.categoryAxis,i=this.chart._eventCoordinates(t),r=o.pointCategoryIndex(new Nt(i.x,o.box.y1)),n=this._index(e.from),s=this._index(e.to),a=this._index(e.min),h=this._index(e.max),i=s-n,e={},s=3===t.event.which,r=Math.round(n+i/2-r);this._state||s||(this.chart._unsetActivePoint(),o.options.justified||r--,e.from=Math.min(Math.max(a,n-r),h-i),e.to=Math.min(e.from+i,h),this._start(t),this._state&&(this._state.range=e,this.trigger("select",this._rangeEventArgs(e)),this._end()))},Ch.prototype._mousewheel=function(t){var e,o=this,i=nt(t);this._start({target:this.selection}),this._state&&(e=this._state.range,t.preventDefault(),t.stopPropagation(),1<Math.abs(i)&&(i*=3),this.options.mousewheel.reverse&&(i*=-1),this.expand(i)&&this.trigger("select",{axis:this.categoryAxis.options,delta:i,originalEvent:t,from:this._value(e.from),to:this._value(e.to)}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){o._end()},150))},Ch.prototype._gesturestart=function(t){var e=this.options;this._state={range:{from:this._index(e.from),to:this._index(e.to)}};e=this._rangeEventArgs(this._state.range);this.trigger("selectStart",e)?this._state=null:t.preventDefault()},Ch.prototype._gestureend=function(){this._state&&(this.trigger("selectEnd",this._rangeEventArgs(this._state.range)),delete this._state)},Ch.prototype._gesturechange=function(t){var e=this.chart,o=this._state,i=this.options,r=this.categoryAxis,n=o.range,s=e._toModelCoordinates(t.touches[0].x.location).x,o=e._toModelCoordinates(t.touches[1].x.location).x,e=Math.min(s,o),o=Math.max(s,o);t.preventDefault(),n.from=r.pointCategoryIndex(new Nt(e))||i.min,n.to=r.pointCategoryIndex(new Nt(o))||i.max,this.move(n.from,n.to),this.trigger("select",this._rangeEventArgs(n))},Ch.prototype._index=function(t){var e=t;return e=t instanceof Date?this.categoryAxis.categoryIndex(t):e},Ch.prototype._value=function(t){var e=t;return e=this._dateAxis&&(e=this.categoryAxis.categoryAt(t))>this.options.max?this.options.max:e},Ch.prototype._slot=function(t){var e=this.categoryAxis,t=this._index(t);return e.getSlot(t,t,!0)},Ch.prototype.move=function(t,e){var o=this.options,i=this.categoryAxis.options.reverse,r=o.offset,n=o.padding,s=o.selection.border,a=i?t:e,h="x"+(i?2:1),e=this._slot(i?e:t),t=bt(e[h]-r.left+n.left);H(this.leftMask,{width:t}),H(this.selection,{left:t});e=this._slot(a),r=bt(o.width-(e[h]-r.left+n.left));H(this.rightMask,{width:r});n=o.width-r;n!==o.width&&(n+=s.right),H(this.rightMask,{left:n}),H(this.selection,{width:Math.max(o.width-(t+r)-s.right,0)})},Ch.prototype.set=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),i=mt(this._index(t),i,r),r=mt(this._index(e),i+1,r);o.visible&&this.move(i,r),o.from=this._value(i),o.to=this._value(r)},Ch.prototype.expand=function(t){var e=this.options,o=this._index(e.min),i=this._index(e.max),r=e.mousewheel.zoom,n=this._index(e.from),s=this._index(e.to),a={from:n,to:s},e=z({},a);if(this._state&&(a=this._state.range),r!==k&&(a.from=mt(mt(n-t,0,s-1),o,i)),r!==S&&(a.to=mt(mt(s+t,a.from+1,i),o,i)),a.from!==e.from||a.to!==e.to)return this.set(a.from,a.to),!0},Ch.prototype.zoom=function(t,e){var o=this.options,i=this._index(o.min),r=this._index(o.max),n=this._index(o.from),s=this._index(o.to),a={from:n,to:s},h=z({},a),p=this.categoryAxis.options.reverse,o=v+(p?"2":"1"),p=this.categoryAxis.lineBox(),e=Math.abs(p[o]-e.x),p=p.width(),e=bt(e/p,2),p=bt(e*t),t=bt((1-e)*t);if((a=this._state?this._state.range:a).from=mt(mt(n-p,0,s-1),i,r),a.to=mt(mt(s+t,a.from+1,r),i,r),a.from!==h.from||a.to!==h.to)return this.set(a.from,a.to),!0},Ch.prototype.trigger=function(t,e){return(this.observer||this.chart).trigger(t,e)},Ch);function Ch(t,e,o,i){wh.call(this);var r=t.element;this.options=z({},this.options,o),this.chart=t,this.observer=i,this.chartElement=r,this.categoryAxis=e,this._dateAxis=this.categoryAxis instanceof ai,this.initOptions(),this.visible=this.options.visible&&r.offsetHeight,this.visible&&(this.createElements(),this.set(this._index(this.options.from),this._index(this.options.to)),this.bindEvents())}kt(at,{visible:!0,mousewheel:{zoom:"both"},min:c,max:l});var Sh,kh,Ah=at,Ph=((kh=Me)&&(Mh.__proto__=kh),((Mh.prototype=Object.create(kh&&kh.prototype)).constructor=Mh).prototype.show=function(t){var e,o;!t||!t.tooltipAnchor||this._current&&this._current===t||(e=z({},this.options,t.options.tooltip),(o=t.tooltipAnchor())?(this._current=t,kh.prototype.show.call(this,{point:t,anchor:o},e,t)):this.hide())},Mh.prototype.hide=function(){delete this._current,kh.prototype.hide.call(this)},Mh),ee=((Sh=Me)&&(Th.__proto__=Sh),((Th.prototype=Object.create(Sh&&Sh.prototype)).constructor=Th).prototype.showAt=function(t,e){var o,i=Z(t,function(t){t=t.series.tooltip;return!t||!1!==t.visible});0<i.length&&(o=i[0],i=this.plotArea.categoryAxis.getSlot(o.categoryIx),i=e?this._slotAnchor(e,i):this._defaultAnchor(o,i),this.show({anchor:i,shared:!0,points:t,category:o.category,categoryText:this.formatService.auto(this.options.categoryFormat,o.category),series:this.plotArea.series},this.options))},Th.prototype._slotAnchor=function(t,e){return this.plotArea.categoryAxis.options.vertical||(t.x=e.center().x),{point:t,align:{horizontal:"left",vertical:"center"}}},Th.prototype._defaultAnchor=function(t,e){var o=t.owner.pane.chartsBox(),t=this.plotArea.categoryAxis.options.vertical,o=o.center(),e=e.center();return{point:t?new Nt(o.x,e.y):new Nt(e.x,o.y),align:{horizontal:"center",vertical:"center"}}},Th);function Th(t,e){Sh.call(this,t.chartService,e),this.plotArea=t,this.formatService=t.chartService.format}function Mh(){kh.apply(this,arguments)}kt(ee,{categoryFormat:"{0:d}"});var Oh,Bh=ee,ae=((Oh=P.drawing.Animation)&&(Rh.__proto__=Oh),((Rh.prototype=Object.create(Oh&&Oh.prototype)).constructor=Rh).prototype.setup=function(){var t,e=this.element,o=this.options;e.bbox()?(this.origin=o.origin,t=o.vertical?m:v,(o=this.fromScale=new P.geometry.Point(1,1))[t]=hr,e.transform(P.geometry.transform().scale(o.x,o.y))):this.abort()},Rh.prototype.step=function(t){var e=tt(this.fromScale.x,1,t),t=tt(this.fromScale.y,1,t);this.element.transform(P.geometry.transform().scale(e,t,this.origin))},Rh.prototype.abort=function(){Oh.prototype.abort.call(this),this.element.transform(null)},Rh);function Rh(){Oh.apply(this,arguments)}kt(ae,{duration:600}),P.drawing.AnimationFactory.current.register(cr,ae);var Eh,_e=((Eh=P.drawing.Animation)&&(Lh.__proto__=Eh),((Lh.prototype=Object.create(Eh&&Eh.prototype)).constructor=Lh).prototype.setup=function(){var t=this.center=this.element.bbox().center();this.element.transform(P.geometry.transform().scale(hr,hr,t))},Lh.prototype.step=function(t){this.element.transform(P.geometry.transform().scale(t,t,this.center))},Lh);function Lh(){Eh.apply(this,arguments)}kt(_e,{easing:"easeOutElastic"}),P.drawing.AnimationFactory.current.register("bubble",_e);var Ih,Vt=((Ih=P.drawing.Animation)&&(zh.__proto__=Ih),((zh.prototype=Object.create(Ih&&Ih.prototype)).constructor=zh).prototype.setup=function(){this.fadeTo=this.element.opacity(),this.element.opacity(0)},zh.prototype.step=function(t){this.element.opacity(t*this.fadeTo)},zh);function zh(){Ih.apply(this,arguments)}kt(Vt,{duration:200,easing:"linear"}),P.drawing.AnimationFactory.current.register("fadeIn",Vt);var Vh,ge=((Vh=P.drawing.Animation)&&(jh.__proto__=Vh),((jh.prototype=Object.create(Vh&&Vh.prototype)).constructor=jh).prototype.setup=function(){this.element.transform(P.geometry.transform().scale(hr,hr,this.options.center))},jh.prototype.step=function(t){this.element.transform(P.geometry.transform().scale(t,t,this.options.center))},jh);function jh(){Vh.apply(this,arguments)}kt(ge,{easing:"easeOutElastic",duration:600}),P.drawing.AnimationFactory.current.register(fr,ge);var Dh,Hh=ge,ce=((Dh=is)&&(Uh.__proto__=Dh),((Uh.prototype=Object.create(Dh&&Dh.prototype)).constructor=Uh).prototype.render=function(){Dh.prototype.render.call(this),this.renderSegments()},Uh.prototype.createSegment=function(t,e,o){return new("smooth"===e.style?Xr:Dr)(t,e,o)},Uh.prototype.animationPoints=function(){return Dh.prototype.animationPoints.call(this).concat(this._segments)},Uh.prototype.createMissingValue=function(t,e){if(e===pr){t={x:t.x,y:t.y};return Jn(t.x)||(t.x=0),Jn(t.y)||(t.y=0),t}},Uh);function Uh(){Dh.apply(this,arguments)}z(ce.prototype,It);var Fh,Nh=ce,Se=((Fh=Qs)&&(Gh.__proto__=Fh),((Gh.prototype=Object.create(Fh&&Fh.prototype)).constructor=Gh).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={},this.xAxisRangeTracker=new dn,this.yAxisRangeTracker=new dn},Gh.prototype.render=function(t){void 0===t&&(t=this.panes);for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);r&&(this.createScatterChart(Vs(r,"scatter"),i),this.createScatterLineChart(Vs(r,"scatterLine"),i),this.createBubbleChart(Vs(r,"bubble"),i))}this.createAxes(t)},Gh.prototype.appendChart=function(t,e){this.xAxisRangeTracker.update(t.xAxisRanges),this.yAxisRangeTracker.update(t.yAxisRanges),Fh.prototype.appendChart.call(this,t,e)},Gh.prototype.removeAxis=function(t){var e=t.options.name;Fh.prototype.removeAxis.call(this,t),t.options.vertical?(this.yAxisRangeTracker.reset(e),delete this.namedYAxes[e]):(this.xAxisRangeTracker.reset(e),delete this.namedXAxes[e]),t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},Gh.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Z([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Z([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},Gh.prototype.createScatterChart=function(t,e){0<t.length&&this.appendChart(new is(this,{series:t,clip:e.options.clip}),e)},Gh.prototype.createScatterLineChart=function(t,e){0<t.length&&this.appendChart(new Nh(this,{series:t,clip:e.options.clip}),e)},Gh.prototype.createBubbleChart=function(t,e){0<t.length&&this.appendChart(new ps(this,{series:t,clip:e.options.clip}),e)},Gh.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=e?this.yAxisRangeTracker:this.xAxisRangeTracker,a=z({reverse:!e&&this.chartService.rtl},t,{vertical:e}),h=zs(a.type,"log"),p=s.query(),t=h?{min:.1,max:1}:{min:0,max:1},t=s.query(r)||p||t,l=[a.min,a.max],c=this.series,u=0;u<c.length;u++){var d=c[u],f=d[e?"yAxis":"xAxis"];if(f===a.name||0===o&&!f){d=rr.current.bindPoint(d,0).valueFields;l.push(d[e?"y":"x"]);break}}0===o&&p&&(t.min=Math.min(t.min,p.min),t.max=Math.max(t.max,p.max));for(var g=0;g<l.length;g++)if(l[g]instanceof Date){i=!0;break}t=new(zs(a.type,y)||!a.type&&i?xi:h?Si:yi)(t.min,t.max,a,this.chartService);if(t.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t},Gh.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)J(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)J(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},Gh.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p],c=l.options.vertical?h:a,l=l.getValue(r);null!==l&&c.push(l)}0<a.length&&0<h.length&&t.trigger(o,{element:gt(e),originalEvent:e,x:Hs(a),y:Hs(h)})},Gh.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),t=(o?i.y:i.x).indexOf(t);Wh(this.options,t,o,e),Wh(this.originalOptions,t,o,e)},Gh);function Gh(){Fh.apply(this,arguments)}function Wh(t,e,o,i){z([].concat(o?t.yAxis:t.xAxis)[e],i)}kt(Se,{xAxis:{},yAxis:{}}),z(Se.prototype,Ks);var Xh,qh=Se,Ve=((Xh=le)&&(Qh.__proto__=Xh),((Qh.prototype=Object.create(Xh&&Xh.prototype)).constructor=Qh).prototype.render=function(){var t,e,o=this.options.labels,i=this.owner.chartService,r=this.value;this._rendered||!1===this.visible||(this._rendered=!0,t=W(o),e=this.pointData(),t?r=t(e):o.format&&(r=i.format.auto(o.format,r)),o.visible&&(r||0===r)&&(o.position===C||"insideEnd"===o.position?(o.color||(o.color=Rt(this.options.color)),o.background||(o.background=this.options.color)):(i=i.theme.seriesDefaults.labels,o.color=o.color||i.color,o.background=o.background||i.background),this.label=new ze(r,z({},o,{align:C,vAlign:"",animation:{type:"fadeIn",delay:this.animationDelay}}),e),this.append(this.label)))},Qh.prototype.reflow=function(t){this.render(),this.box=t,this.reflowLabel()},Qh.prototype.reflowLabel=function(){var t,e,o,i,r=this.options.labels,n=this.label,s=this.sector.clone(),a=r.distance,h=s.middle();n&&(e=n.box.height(),o=n.box.width(),r.position===C?(s.radius=Math.abs((s.radius-e)/2)+e,t=s.point(h),n.reflow(new qt(t.x,t.y-e/2,t.x,t.y))):"insideEnd"===r.position?(s.radius=s.radius-e/2,t=s.point(h),n.reflow(new qt(t.x,t.y-e/2,t.x,t.y))):((t=s.clone().expand(a).point(h)).x>=s.center.x?(i=t.x+o,n.orientation=k):(i=t.x-o,n.orientation=S),n.reflow(new qt(i,t.y-e,t.x,t.y))))},Qh.prototype.createVisual=function(){var t,e=this,o=this.sector,i=this.options;Xh.prototype.createVisual.call(this),this.value&&(i.visual?(t=(o.startAngle+180)%360,(i=i.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,center:new P.geometry.Point(o.center.x,o.center.y),radius:o.radius,innerRadius:o.innerRadius,startAngle:t,endAngle:t+o.angle,options:i,sender:this.getSender(),createVisual:function(){var t=new P.drawing.Group;return e.createSegmentVisual(t),t}}))&&this.visual.append(i)):this.createSegmentVisual(this.visual))},Qh.prototype.createSegmentVisual=function(t){var e=this.sector,o=this.options,i=o.border||{},r=0<i.width?{stroke:{color:i.color,width:i.width,opacity:i.opacity,dashType:i.dashType}}:{},n=o.color,i={color:n,opacity:o.opacity},r=this.createSegment(e,z({fill:i,stroke:{opacity:o.opacity},zIndex:o.zIndex},r));t.append(r),xn(o)&&t.append(this.createGradientOverlay(r,{baseColor:n,fallbackFill:i},z({center:[e.center.x,e.center.y],innerRadius:e.innerRadius,radius:e.radius,userSpace:!0},o.overlay)))},Qh.prototype.createSegment=function(t,e){return e.singleSegment?new P.drawing.Circle(new P.geometry.Circle(new P.geometry.Point(t.center.x,t.center.y),t.radius),e):se.current.createRing(t,e)},Qh.prototype.createAnimation=function(){var t=this.options,e=this.sector.center;z(t,{animation:{center:[e.x,e.y],delay:this.animationDelay}}),Xh.prototype.createAnimation.call(this)},Qh.prototype.createHighlight=function(t){var e=this.options.highlight||{},o=e.border||{};return this.createSegment(this.sector,z({},t,{fill:{color:e.color,opacity:e.opacity},stroke:{opacity:o.opacity,width:o.width,color:o.color}}))},Qh.prototype.highlightVisual=function(){return this.visual.children[0]},Qh.prototype.highlightVisualArgs=function(){var t=this.sector;return{options:this.options,radius:t.radius,innerRadius:t.innerRadius,center:new P.geometry.Point(t.center.x,t.center.y),startAngle:t.startAngle,endAngle:t.angle+t.startAngle,visual:this.visual}},Qh.prototype.tooltipAnchor=function(){var t=this.sector.clone().expand(5),e=t.middle();return{point:t.point(e),align:(t=_t(e+180),e=bt(Math.sin(t),g),t=bt(Math.cos(t),g),{horizontal:Math.abs(e)>Zh?C:t<0?k:S,vertical:Math.abs(e)<Yh?C:e<0?w:A})}},Qh.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},Qh.prototype.pointData=function(){return{dataItem:this.dataItem,category:this.category,value:this.value,series:this.series,percentage:this.percentage}},Qh),Yh=bt(_t(30),g),Zh=bt(_t(60),g);function Qh(t,e,o){Xh.call(this,o),this.value=t,this.sector=e}kt(Ve,{color:a,overlay:{gradient:"roundedBevel"},border:{width:.5},labels:{visible:!1,distance:35,font:"12px sans-serif",margin:U(.5),align:u,zIndex:1,position:"outsideEnd"},animation:{type:fr},highlight:{visible:!0,border:{width:1}},visible:!0}),z(Ve.prototype,Lr);var Kh,$h=Ve,Jh={createLegendItem:function(t,e,o){var i,r,n=this.options.legend||{},s=n.labels||{},a=n.inactiveItems||{},h=a.labels||{};o&&!1!==o.visibleInLegend&&(n=!(r=!1!==o.visible)&&W(h)||W(s),s=o.category,n&&(s=n({text:s,series:o.series,dataItem:o.dataItem,percentage:o.percentage,value:t})),a=r?(i={},e.color):(i={color:h.color,font:h.font},(a.markers||{}).color),Jn(s)&&""!==s&&this.legendItems.push({active:r,pointIndex:o.index,text:s,series:o.series,markerColor:a,labels:i}))}},Fe=((Kh=le)&&(tp.__proto__=Kh),((tp.prototype=Object.create(Kh&&Kh.prototype)).constructor=tp).prototype.render=function(){this.traverseDataPoints(this.addValue.bind(this))},tp.prototype.traverseDataPoints=function(t){for(var e=this.options,o=this.plotArea.options.seriesColors,i=(o=void 0===o?[]:o).length,r=e.series,n=r.length,s=0;s<n;s++){var a=r[s],h=a.data,p=Is(a),l=p.total,c=p.points,p=p.count,u=360/l,d=void 0;isFinite(u)||(d=360/p);var f=void 0,f=(lt(a.startAngle)?a:e).startAngle;s!==n-1&&"outsideEnd"===a.labels.position&&(a.labels.position=C);for(var g=0;g<c.length;g++){var y,v,m,x,_,b=c[g];b&&(y=b.fields,v=b.value,m=b.visible,x=0!==v?d||v*u:0,_=1!==h.length&&Boolean(y.explode),E(a.color)||(a.color=y.color||o[g%i]),t(b.valueFields.value,new Jt(null,0,0,f,x),{owner:this,category:lt(y.category)?y.category:"",index:g,series:a,seriesIx:s,dataItem:h[g],percentage:0!==l?v/l:0,explode:_,visibleInLegend:y.visibleInLegend,visible:m,zIndex:n-s,animationDelay:this.animationDelay(g,s,n)}),!1!==m&&(f+=x))}}},tp.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;Tr(t,{value:e,series:i,dataItem:o.dataItem,category:o.category,percentage:o.percentage},{defaults:i._defaults,excluded:["data","content","template","visual","toggle"]})},tp.prototype.addValue=function(t,e,o){var i=z({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),!1!==o.visible&&(i=new $h(t,e,i),Object.assign(i,o),this.append(i),this.points.push(i))},tp.prototype.reflow=function(t){var e=this.options,o=this.points,i=this.seriesConfigs;void 0===i&&(i=[]);var r=o.length,n=t.clone(),s=Math.min(n.width(),n.height()),a=s/2,h=s-.85*s,p=new qt(n.x1,n.y1,n.x1+s,n.y1+s),s=p.center(),n=n.center(),l=e.series.length,c=[],u=[],h=Ct(e.padding,h);this.targetBox=t,h=a-5<h?a-5:h,p.translate(n.x-s.x,n.y-s.y);for(var d=a-h,f=new Nt(d+p.x1+h,d+p.y1+h),g=0;g<r;g++){var y,v=o[g],m=v.sector,x=v.seriesIx;m.radius=d,m.center=f,i.length&&(y=i[x],m.innerRadius=y.innerRadius,m.radius=y.radius),x===l-1&&v.explode&&(m.center=m.clone().setRadius(.15*m.radius).point(m.middle())),v.reflow(p);v=v.label;v&&"outsideEnd"===v.options.position&&x===l-1&&(v.orientation===k?u:c).push(v)}0<c.length&&(c.sort(this.labelComparator(!0)),this.leftLabelsReflow(c)),0<u.length&&(u.sort(this.labelComparator(!1)),this.rightLabelsReflow(u)),this.box=p},tp.prototype.leftLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},tp.prototype.rightLabelsReflow=function(t){var e=this.distanceBetweenLabels(t);this.distributeLabels(e,t)},tp.prototype.distanceBetweenLabels=function(t){var e=vt(this.points),o=e.sector,i=t.length-1,e=o.radius+e.options.labels.distance,r=[],n=t[0].box,s=bt(n.y1-(o.center.y-e-n.height()-n.height()/2));r.push(s);for(var a=0;a<i;a++){var h=t[a+1].box,n=t[a].box,s=bt(h.y1-n.y2);r.push(s)}return s=bt(o.center.y+e-t[i].box.y2-t[i].box.height()/2),r.push(s),r},tp.prototype.distributeLabels=function(t,e){for(var o,i,r,n=t.length,s=0;s<n;s++)for(r=-t[s],o=i=s;0<r&&(0<=o||i<n);)r=this._takeDistance(t,s,--o,r),r=this._takeDistance(t,s,++i,r);this.reflowLabels(t,e)},tp.prototype._takeDistance=function(t,e,o,i){var r=i;return 0<t[o]&&(r-=i=Math.min(t[o],r),t[o]-=i,t[e]+=i),r},tp.prototype.reflowLabels=function(t,e){var o,i=vt(this.points),r=i.sector,n=i.options.labels,s=e.length,a=n.distance,h=r.center.y-(r.radius+a)-e[0].box.height();t[0]+=2;for(var p=0;p<s;p++){var l=e[p],c=l.box;h+=t[p],o=this.hAlignLabel(c.x2,r.clone().expand(a),h,h+c.height(),l.orientation===k),l.orientation===k?(n.align!==u&&(o=r.radius+r.center.x+a),l.reflow(new qt(o+c.width(),h,o,h))):(n.align!==u&&(o=r.center.x-r.radius-a),l.reflow(new qt(o-c.width(),h,o,h))),h+=c.height()}},tp.prototype.createVisual=function(){var t=this.options.connectors,e=this.points,o=e.length;Kh.prototype.createVisual.call(this),this._connectorLines=[];for(var i=0;i<o;i++){var r,n,s,a,h,p,l,c=e[i],u=c.sector,d=c.label,f=u.middle(),g=(c.options.connectors||{}).color||t.color;d&&(r=new P.drawing.Path({stroke:{color:g,width:t.width},animation:{type:"fadeIn",delay:c.animationDelay}}),"outsideEnd"===d.options.position&&(n=d.box,s=u.center,l=u.point(f),a=new Nt(n.x1,n.center().y),g=p=h=void 0,l=u.clone().expand(t.padding).point(f),r.moveTo(l.x,l.y),d.orientation===k?(g=ep(s,l,a,p=new Nt(n.x1-t.padding,n.center().y)),a=new Nt(p.x-4,p.y),(g=g||a).x=Math.min(g.x,a.x),this.pointInCircle(g,u.center,u.radius+4)||g.x<u.center.x?(h=u.center.x+u.radius+4,c.options.labels.align===ur||h<a.x?r.lineTo(h,l.y):r.lineTo(l.x+8,l.y),r.lineTo(a.x,p.y)):(g.y=p.y,r.lineTo(g.x,g.y))):(g=ep(s,l,a,p=new Nt(n.x2+t.padding,n.center().y)),a=new Nt(p.x+4,p.y),(g=g||a).x=Math.max(g.x,a.x),this.pointInCircle(g,u.center,u.radius+4)||g.x>u.center.x?(h=u.center.x-u.radius-4,c.options.labels.align===ur||h>a.x?r.lineTo(h,l.y):r.lineTo(l.x-8,l.y),r.lineTo(a.x,p.y)):(g.y=p.y,r.lineTo(g.x,g.y))),r.lineTo(p.x,p.y),this._connectorLines.push(r),this.visual.append(r)))}},tp.prototype.renderVisual=function(){var t,e,o,i;Kh.prototype.renderVisual.call(this),Pt(this.options.series,function(t){return t.autoFit})&&(t=this.targetBox,e=this.box.center(),(o=this.visual.bbox())&&(i=o.bottomRight(),(i=Math.min((e.y-t.y1)/(e.y-o.origin.y),(t.y2-e.y)/(i.y-e.y),(e.x-t.x1)/(e.x-o.origin.x),(t.x2-e.x)/(i.x-e.x)))<1&&this.visual.transform(P.geometry.transform().scale(i,i,[e.x,e.y]))))},tp.prototype.labelComparator=function(t){var o=t?-1:1;return function(t,e){return((t.parent.sector.middle()+270)%360-(e.parent.sector.middle()+270)%360)*o}},tp.prototype.hAlignLabel=function(t,e,o,i,r){var n=e.radius,s=e.center,e=s.x,s=s.y,i=Math.min(Math.abs(s-o),Math.abs(s-i));return n<i?t:e+Math.sqrt(n*n-i*i)*(r?1:-1)},tp.prototype.pointInCircle=function(t,e,o){return Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)<Math.pow(o,2)},tp.prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},tp.prototype.animationDelay=function(t){return 70*t},tp.prototype.stackRoot=function(){return this},tp);function tp(t,e){Kh.call(this,e),this.plotArea=t,this.chartService=t.chartService,this.points=[],this.legendItems=[],this.render()}function ep(t,e,o,i){var r,n=(i.x-o.x)*(t.y-o.y)-(i.y-o.y)*(t.x-o.x),o=(i.y-o.y)*(e.x-t.x)-(i.x-o.x)*(e.y-t.y);return r=0!=o?new Nt(t.x+(o=n/o)*(e.x-t.x),t.y+o*(e.y-t.y)):r}kt(Fe,{startAngle:90,connectors:{width:2,color:"#939393",padding:8},inactiveItems:{markers:{},labels:{}}}),z(Fe.prototype,Jh),Fe.prototype.isStackRoot=!0;var op,ip,rp=Fe,np=((ip=Qs)&&(ap.__proto__=ip),((ap.prototype=Object.create(ip&&ip.prototype)).constructor=ap).prototype.render=function(){this.createPieChart(this.series)},ap.prototype.createPieChart=function(t){var e=t[0],e=new rp(this,{series:t,padding:e.padding,startAngle:e.startAngle,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},ap.prototype.appendChart=function(t,e){ip.prototype.appendChart.call(this,t,e),ht(this.options.legend.items,t.legendItems)},ap),Xe=((op=$h)&&(sp.__proto__=op),((sp.prototype=Object.create(op&&op.prototype)).constructor=sp).prototype.reflowLabel=function(){var t,e=this.options.labels,o=this.label,i=this.sector.clone(),r=i.middle();o&&(t=o.box.height(),e.position===C?(i.radius-=(i.radius-i.innerRadius)/2,r=i.point(r),o.reflow(new qt(r.x,r.y-t/2,r.x,r.y))):op.prototype.reflowLabel.call(this))},sp.prototype.createSegment=function(t,e){return se.current.createRing(t,e)},sp);function sp(){op.apply(this,arguments)}function ap(){ip.apply(this,arguments)}kt(Xe,{overlay:{gradient:"roundedGlass"},labels:{position:C},animation:{type:fr}}),z(Xe.prototype,Lr);var hp,pp=Xe,Ke=((hp=rp)&&(lp.__proto__=hp),((lp.prototype=Object.create(hp&&hp.prototype)).constructor=lp).prototype.addValue=function(t,e,o){var i=z({},o.series,{index:o.index});this.evalSegmentOptions(i,t,o),this.createLegendItem(t,i,o),t&&!1!==o.visible&&(i=new pp(t,e,i),Object.assign(i,o),this.append(i),this.points.push(i))},lp.prototype.reflow=function(t){for(var e,o=this.options,i=t.clone(),r=Math.min(i.width(),i.height()),i=r/2,n=o.series,s=n.length,r=Ct(o.padding,r-.85*r),a=i-(r=i-5<r?i-5:r),h=0,p=0;p<s;p++){var l=n[p];0===p&<(l.holeSize)&&(e=l.holeSize,a-=l.holeSize),lt(l.size)?a-=l.size:h++,lt(l.margin)&&p!==s-1&&(a-=l.margin)}lt(e)||(a-=e=(i-r)/(s+.75)*.75);var c=e,u=0;this.seriesConfigs=[];for(var d=0;d<s;d++){var f=n[d],g=(c+=u)+Ct(f.size,a/h);this.seriesConfigs.push({innerRadius:c,radius:g}),u=f.margin||0,c=g}hp.prototype.reflow.call(this,t)},lp.prototype.animationDelay=function(t,e,o){return 50*t+600*(e+1)/(o+1)},lp);function lp(){hp.apply(this,arguments)}kt(Ke,{startAngle:90,connectors:{width:2,color:"#939393",padding:8}});var cp,up,dp,fp=Ke,gp=((dp=np)&&(mp.__proto__=dp),((mp.prototype=Object.create(dp&&dp.prototype)).constructor=mp).prototype.render=function(){this.createDonutChart(this.series)},mp.prototype.createDonutChart=function(t){var e=t[0],e=new fp(this,{series:t,padding:e.padding,connectors:e.connectors,legend:this.options.legend});this.appendChart(e)},mp),eo=((up=Qs)&&(vp.__proto__=up),((vp.prototype=Object.create(up&&up.prototype)).constructor=vp).prototype.initFields=function(){this.valueAxisRangeTracker=new dn},vp.prototype.render=function(){this.addToLegend(this.series),this.createPolarAxis(),this.createCharts(),this.createValueAxis()},vp.prototype.alignAxes=function(){var t=this.valueAxis,e=t.range(),o=t.options.reverse?e.max:e.min,e=t.getSlot(o),o=this.polarAxis.getSlot(0).center,e=t.box.translate(o.x-e.x1,o.y-e.y1);t.reflow(e)},vp.prototype.createValueAxis=function(){var t,e=this.valueAxisRangeTracker,o=e.query(),i=this.valueAxisOptions({roundToMajorUnit:!1,zIndex:-1}),r="log"===i.type?(t=zi,{min:.1,max:1}):(t=Li,{min:0,max:1}),r=e.query(name)||o||r;r&&o&&(r.min=Math.min(r.min,o.min),r.max=Math.max(r.max,o.max));i=new t(r.min,r.max,i,this.chartService);this.valueAxis=i,this.appendAxis(i)},vp.prototype.reflowAxes=function(){var t=this.options.plotArea,e=this.valueAxis,o=this.polarAxis,i=this.box,r=.15*Math.min(i.width(),i.height()),r=U(t.padding||{},r),i=i.clone().unpad(r),r=i.clone();r.y2=r.y1+Math.min(r.width(),r.height()),r.align(i,m,C);i=r.clone().shrink(0,r.height()/2);o.reflow(r),e.reflow(i);i=e.lineBox().height()-e.box.height();e.reflow(e.box.unpad({top:i})),this.axisBox=r,this.alignAxes(r)},vp.prototype.backgroundBox=function(){return this.box},vp.prototype.detachLabels=function(){},vp),uo=((cp=is)&&(yp.__proto__=cp),((yp.prototype=Object.create(cp&&cp.prototype)).constructor=yp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Nt.onCircle(t.center,t.startAngle,e);return new qt(e.x,e.y,e.x,e.y)},yp);function yp(){cp.apply(this,arguments)}function vp(){up.apply(this,arguments)}function mp(){dp.apply(this,arguments)}kt(uo,{clip:!1});var xp,_p=uo,at=((xp=Nh)&&(bp.__proto__=xp),(bp.prototype=Object.create(xp&&xp.prototype)).constructor=bp);function bp(){xp.apply(this,arguments)}at.prototype.pointSlot=_p.prototype.pointSlot,kt(at,{clip:!1});var wp,Cp,Sp=at,kp=((Cp=cn)&&(Tp.__proto__=Cp),((Tp.prototype=Object.create(Cp&&Cp.prototype)).constructor=Tp).prototype.fillToAxes=function(t){var e=this._polarAxisCenter();t.lineTo(e.x,e.y)},Tp.prototype._polarAxisCenter=function(){return this.parent.plotArea.polarAxis.box.center()},Tp.prototype.strokeSegments=function(){var t,e,o,i=this._strokeSegments;return i||(t=this._polarAxisCenter(),e=new Hi(!1),(o=this.points()).push(t),(i=this._strokeSegments=e.process(o)).pop()),i},Tp),Ap=((wp=on)&&(Pp.__proto__=wp),((Pp.prototype=Object.create(wp&&wp.prototype)).constructor=Pp).prototype.fillToAxes=function(t){var e=this.parent.plotArea.polarAxis.box.center(),e=new P.geometry.Segment([e.x,e.y]);t.segments.unshift(e),t.segments.push(e)},Pp);function Pp(){wp.apply(this,arguments)}function Tp(){Cp.apply(this,arguments)}function Mp(t,e){return t.value.x-e.value.x}var Op,Bp,Rp=((Bp=Sp)&&(Lp.__proto__=Bp),((Lp.prototype=Object.create(Bp&&Bp.prototype)).constructor=Lp).prototype.createSegment=function(t,e,o){return new("smooth"===(e.line||{}).style?kp:Ap)(t,e,o)},Lp.prototype.createMissingValue=function(t,e){var o;return Jn(t.x)&&e!==lr&&(o={x:t.x,y:t.y},e===pr&&(o.y=0)),o},Lp.prototype.seriesMissingValues=function(t){return t.missingValues||pr},Lp.prototype._hasMissingValuesGap=function(){for(var t=this.options.series,e=0;e<t.length;e++)if("gap"===this.seriesMissingValues(t[e]))return!0},Lp.prototype.sortPoints=function(t){if(t.sort(Mp),this._hasMissingValuesGap())for(var e=0;e<t.length;e++){var o=t[e];o&&(Jn(o.value.y)||"gap"!==this.seriesMissingValues(o.series)||delete t[e])}return t},Lp),Me=((Op=eo)&&(Ep.__proto__=Op),((Ep.prototype=Object.create(Op&&Op.prototype)).constructor=Ep).prototype.createPolarAxis=function(){var t=new Mi(this.options.xAxis,this.chartService);this.polarAxis=t,this.axisX=t,this.appendAxis(t)},Ep.prototype.valueAxisOptions=function(t){return z(t,{majorGridLines:{type:d},minorGridLines:{type:d}},this.options.yAxis)},Ep.prototype.createValueAxis=function(){Op.prototype.createValueAxis.call(this),this.axisY=this.valueAxis},Ep.prototype.appendChart=function(t,e){this.valueAxisRangeTracker.update(t.yAxisRanges),Qs.prototype.appendChart.call(this,t,e)},Ep.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createLineChart(Vs(t,["polarLine"]),e),this.createScatterChart(Vs(t,["polarScatter"]),e),this.createAreaChart(Vs(t,["polarArea"]),e)},Ep.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Sp(this,{series:t}),this.appendChart(t,e))},Ep.prototype.createScatterChart=function(t,e){0!==t.length&&(t=new _p(this,{series:t}),this.appendChart(t,e))},Ep.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Rp(this,{series:t}),this.appendChart(t,e))},Ep.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),i=this.axisX.getValue(r),r=this.axisY.getValue(r);null!==i&&null!==r&&t.trigger(o,{element:gt(e),x:i,y:r})},Ep.prototype.createCrosshairs=function(){},Ep);function Ep(){Op.apply(this,arguments)}function Lp(){Bp.apply(this,arguments)}kt(Me,{xAxis:{},yAxis:{}}),z(Me.prototype,Ks);var Ip,ee=Me,ae=((Ip=en)&&(zp.__proto__=Ip),((zp.prototype=Object.create(Ip&&Ip.prototype)).constructor=zp).prototype.pointSlot=function(t,e){e=t.center.y-e.y1,e=Nt.onCircle(t.center,t.middle(),e);return new qt(e.x,e.y,e.x,e.y)},zp.prototype.renderSegments=function(){if(Ip.prototype.renderSegments.call(this),this._segments&&1<this._segments.length)for(var t=function(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[i.seriesIx]=e[i.seriesIx]||[],e[i.seriesIx].push(i)}return e}(this._segments),e=0;e<t.length;e++){var o,i,r,n=t[e];n&&1<n.length&&(o=n[0].linePoints[0],i=vt(n),r=vt(i.linePoints),i=0===o.categoryIx,r=r.categoryIx===r.categoriesCount-1,i&&r&&vt(n).linePoints.push(o))}},zp.prototype.createSegment=function(t,e,o){var i=new("smooth"===e.style?Xr:Dr)(t,e,o),o=this.seriesMissingValues(e);return t.length!==e.data.length&&o!==lr||(i.options.closed=!0),i},zp);function zp(){Ip.apply(this,arguments)}kt(ae,{clip:!1,limitPoints:!1});var Vp,jp,Dp,Hp,Up=ae,Fp=((Hp=cn)&&(Yp.__proto__=Hp),((Yp.prototype=Object.create(Hp&&Hp.prototype)).constructor=Yp).prototype.fillToAxes=function(){},Yp),Np=((Dp=on)&&(qp.__proto__=Dp),((qp.prototype=Object.create(Dp&&Dp.prototype)).constructor=qp).prototype.fillToAxes=function(){},qp),Gp=((jp=Up)&&(Xp.__proto__=jp),((Xp.prototype=Object.create(jp&&jp.prototype)).constructor=Xp).prototype.createSegment=function(t,e,o,i){var r,n,s,a=this.options.isStacked,h=(e.line||{}).style;return a&&0<o&&i&&(n=i.linePoints.slice(0),r=i),"smooth"===h?(s=new Fp(t,e,o,r,n)).options.closed=!0:(t.push(t[0]),s=new Np(t,e,o,r,n)),s},Xp.prototype.seriesMissingValues=function(t){return t.missingValues||pr},Xp),_e=((Vp=pp)&&(Wp.__proto__=Vp),(Wp.prototype=Object.create(Vp&&Vp.prototype)).constructor=Wp);function Wp(t,e){Vp.call(this,t,null,e)}function Xp(){jp.apply(this,arguments)}function qp(){Dp.apply(this,arguments)}function Yp(){Hp.apply(this,arguments)}kt(_e,{overlay:{gradient:"none"},labels:{distance:10}});var Zp,Qp=_e,Vt=((Zp=le)&&(Kp.__proto__=Zp),((Kp.prototype=Object.create(Zp&&Zp.prototype)).constructor=Kp).prototype.reflow=function(o){var t=this.options,e=this.children,i=t.gap,r=t.spacing,t=e.length,n=o.angle/(t+i+r*(t-1)),s=o.startAngle+i/2*n;this.forEach(e,function(t){var e=o.clone();e.startAngle=s,e.angle=n,t.sector&&(e.radius=t.sector.radius),t.reflow(e),t.sector=e,s+=n+n*r})},Kp);function Kp(t){Zp.call(this,t),this.forEach=t.rtl?Sn:Cn}kt(Vt,{gap:1,spacing:0});var $p,Jp,tl=Vt,el=((Jp=le)&&(il.__proto__=Jp),((il.prototype=Object.create(Jp&&Jp.prototype)).constructor=il).prototype.reflow=function(t){var e=this.options.reverse,o=this.children,i=o.length,r=e?i-1:0,n=e?-1:1;this.box=new qt;for(var s=r;0<=s&&s<i;s+=n){var a=o[s].sector;a.startAngle=t.startAngle,a.angle=t.angle}},il),ge=(($p=Ln)&&(ol.__proto__=$p),((ol.prototype=Object.create($p&&$p.prototype)).constructor=ol).prototype.pointType=function(){return Qp},ol.prototype.clusterType=function(){return tl},ol.prototype.stackType=function(){return el},ol.prototype.categorySlot=function(t,e){return t.getSlot(e)},ol.prototype.pointSlot=function(t,e){var o=t.clone(),t=t.center.y;return o.radius=t-e.y1,o.innerRadius=t-e.y2,o},ol.prototype.reflowPoint=function(t,e){t.sector=e,t.reflow()},ol.prototype.createAnimation=function(){this.options.animation.center=this.box.toRect().center(),$p.prototype.createAnimation.call(this)},ol);function ol(){$p.apply(this,arguments)}function il(){Jp.apply(this,arguments)}ge.prototype.reflow=Er.prototype.reflow,kt(ge,{clip:!1,limitPoints:!1,animation:{type:"pie"}});var rl,nl=ge,It=((rl=eo)&&(sl.__proto__=rl),((sl.prototype=Object.create(rl&&rl.prototype)).constructor=sl).prototype.createPolarAxis=function(){var t=new Pi(this.options.categoryAxis,this.chartService);this.polarAxis=t,this.categoryAxis=t,this.appendAxis(t),this.aggregateCategories(),this.createCategoryAxesLabels()},sl.prototype.valueAxisOptions=function(t){return this._hasBarCharts&&z(t,{majorGridLines:{type:d},minorGridLines:{type:d}}),this._isStacked100&&z(t,{roundToMajorUnit:!1,labels:{format:"P0"}}),z(t,this.options.valueAxis)},sl.prototype.aggregateCategories=function(){Wa.prototype.aggregateCategories.call(this,this.panes)},sl.prototype.createCategoryAxesLabels=function(){Wa.prototype.createCategoryAxesLabels.call(this,this.panes)},sl.prototype.filterSeries=function(t){return t},sl.prototype.createCharts=function(){var t=this.filterVisibleSeries(this.series),e=this.panes[0];this.createAreaChart(Vs(t,["radarArea"]),e),this.createLineChart(Vs(t,["radarLine"]),e),this.createBarChart(Vs(t,["radarColumn"]),e)},sl.prototype.chartOptions=function(t){var e={series:t},o=t[0];return o&&(t=this.filterVisibleSeries(t),o=o.stack,e.isStacked=o&&1<t.length,e.isStacked100=o&&"100%"===o.type&&1<t.length,e.isStacked100&&(this._isStacked100=!0)),e},sl.prototype.createAreaChart=function(t,e){0!==t.length&&(t=new Gp(this,this.chartOptions(t)),this.appendChart(t,e))},sl.prototype.createLineChart=function(t,e){0!==t.length&&(t=new Up(this,this.chartOptions(t)),this.appendChart(t,e))},sl.prototype.createBarChart=function(t,e){var o;0!==t.length&&(o=t[0],(t=this.chartOptions(t)).gap=o.gap,t.spacing=o.spacing,t=new nl(this,t),this.appendChart(t,e),this._hasBarCharts=!0)},sl.prototype.seriesCategoryAxis=function(){return this.categoryAxis},sl.prototype._dispatchEvent=function(t,e,o){var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),i=this.categoryAxis.getCategory(r),r=this.valueAxis.getValue(r);null!==i&&null!==r&&t.trigger(o,{element:gt(e),category:i,value:r})},sl.prototype.createCrosshairs=function(){},sl);function sl(){rl.apply(this,arguments)}z(It.prototype,Ks,{appendChart:Wa.prototype.appendChart,aggregateSeries:Wa.prototype.aggregateSeries,seriesSourcePoints:Wa.prototype.seriesSourcePoints}),kt(It,{categoryAxis:{categories:[]},valueAxis:{}});var al,ce=It,Se=((al=le)&&(hl.__proto__=al),((hl.prototype=Object.create(al&&al.prototype)).constructor=hl).prototype.reflow=function(t){var e=this.points,o=this.children[0];this.box=new qt(e[0].x,e[0].y,e[1].x,e[2].y),o&&o.reflow(new qt(t.x1,e[0].y,t.x2,e[2].y))},hl.prototype.createVisual=function(){var t=this,e=this.options;al.prototype.createVisual.call(this),(e=e.visual?e.visual({category:this.category,dataItem:this.dataItem,value:this.value,series:this.series,percentage:this.percentage,points:this.points,options:e,sender:this.getSender(),createVisual:function(){return t.createPath()}}):this.createPath())&&this.visual.append(e)},hl.prototype.createPath=function(){var t=this.options,e=t.border;return P.drawing.Path.fromPoints(this.points,{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.color,opacity:e.opacity,width:e.width}}).close()},hl.prototype.createHighlight=function(t){return P.drawing.Path.fromPoints(this.points,t)},hl.prototype.highlightVisual=function(){return this.visual.children[0]},hl.prototype.highlightVisualArgs=function(){var t=P.drawing.Path.fromPoints(this.points).close();return{options:this.options,path:t}},hl.prototype.tooltipAnchor=function(){var t=this.box;return{point:new Nt(t.center().x,t.y1),align:{horizontal:"center",vertical:"top"}}},hl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},hl);function hl(t,e,o){al.call(this,e),this.value=t,this.options.index=o.index}kt(Se,{color:a,border:{width:1}}),z(Se.prototype,Lr);var pl,ll=Se,Ve=((pl=le)&&(cl.__proto__=pl),((cl.prototype=Object.create(pl&&pl.prototype)).constructor=cl).prototype.formatPointValue=function(t,e){return this.chartService.format.auto(e,t.value)},cl.prototype.render=function(){var t=this.options,e=this.plotArea.options.seriesColors;void 0===e&&(e=[]);var o=t.series[0],i=o.data;if(i)for(var t=Is(o),r=t.total,n=t.points,s=0;s<n.length;s++){var a,h,p=n[s];p&&(h=p.fields,E(o.color)||(o.color=h.color||e[s%e.length]),h=z({index:s,owner:this,series:o,dataItem:i[s],percentage:p.value/r},h,{visible:p.visible}),a=p.valueFields.value,p=this.createSegment(a,h),h=this.createLabel(a,h),p&&h&&p.append(h))}},cl.prototype.evalSegmentOptions=function(t,e,o){var i=o.series;Tr(t,{value:e,series:i,dataItem:o.dataItem,index:o.index},{defaults:i._defaults,excluded:["data","content","template","toggle","visual"]})},cl.prototype.createSegment=function(t,e){var o=z({},e.series);if(this.evalSegmentOptions(o,t,e),this.createLegendItem(t,o,e),!1!==e.visible){o=new ll(t,o,e);return Object.assign(o,e),this.append(o),this.points.push(o),o}},cl.prototype.createLabel=function(t,e){var o=e.series,i=e.dataItem,r=z({},this.options.labels,o.labels),n=t;if(r.visible){var s=W(r),i={dataItem:i,value:t,percentage:e.percentage,category:e.category,series:o};s?n=s(i):r.format&&(n=this.plotArea.chartService.format.auto(r.format,n)),r.color||(r.color=Rt(o.color),r.background||(r.background=o.color)),this.evalSegmentOptions(r,t,e);i=new ze(n,z({vAlign:r.position},r),i);return this.labels.push(i),i}},cl.prototype.labelPadding=function(){for(var t=this.labels,e={left:0,right:0},o=0;o<t.length;o++){var i,r=t[o].options.align;r!==C&&(i=t[o].box.width(),r===S?e.left=Math.max(e.left,i):e.right=Math.max(e.right,i))}return e},cl.prototype.dynamicSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=r[0],a=s,h=0;h<r.length;h++)r[h].percentage>a.percentage&&(a=r[h]);for(var p=s.percentage/a.percentage*e,l=(e-p)/2,c=0,u=0;u<n;u++){var d=r[u].percentage,f=r[u+1],g=f?f.percentage:d,y=r[u].points=[],f=i.dynamicHeight?o*d:o/n,g=mt(d?(e-p*(g/d))/2:g?0:e/2,0,e);y.push(new P.geometry.Point(t.x1+l,t.y1+c)),y.push(new P.geometry.Point(t.x1+e-l,t.y1+c)),y.push(new P.geometry.Point(t.x1+e-g,t.y1+f+c)),y.push(new P.geometry.Point(t.x1+g,t.y1+f+c)),c+=f+i.segmentSpacing,p=mt(e-2*(l=g),0,e)}},cl.prototype.constantSlopeReflow=function(t,e,o){for(var i=this.options,r=this.points,n=r.length,s=i.neckRatio<=1,a=s?i.neckRatio*e:e,h=s?0:(e-e/i.neckRatio)/2,p=((s?e:e-2*h)-a)/2,l=0,c=0;c<n;c++){var u=r[c].points=[],d=r[c].percentage,f=i.dynamicHeight?p*d:p/n,d=i.dynamicHeight?o*d:o/n;u.push(new P.geometry.Point(t.x1+h,t.y1+l)),u.push(new P.geometry.Point(t.x1+e-h,t.y1+l)),u.push(new P.geometry.Point(t.x1+e-h-f,t.y1+d+l)),u.push(new P.geometry.Point(t.x1+h+f,t.y1+d+l)),h+=f,l+=d+i.segmentSpacing}},cl.prototype.reflow=function(t){var e=this.points,o=e.length;if(o){var i=this.options,r=t.clone().unpad(this.labelPadding()),n=r.height()-i.segmentSpacing*(o-1),s=r.width();i.dynamicSlope?this.dynamicSlopeReflow(r,s,n):this.constantSlopeReflow(r,s,n);for(var a=0;a<o;a++)e[a].reflow(t)}},cl);function cl(t,e){pl.call(this,e),this.plotArea=t,this.points=[],this.labels=[],this.legendItems=[],this.render()}kt(Ve,{neckRatio:.3,width:300,dynamicSlope:!1,dynamicHeight:!0,segmentSpacing:0,labels:{visible:!1,align:C,position:C,zIndex:1}}),z(Ve.prototype,Jh);var ul,dl,fl=Ve,Fe=((dl=Qs)&&(yl.__proto__=dl),((yl.prototype=Object.create(dl&&dl.prototype)).constructor=yl).prototype.render=function(){this.createFunnelChart(this.series)},yl.prototype.createFunnelChart=function(t){var e=t[0],e=new fl(this,{series:t,legend:this.options.legend,neckRatio:e.neckRatio,dynamicHeight:e.dynamicHeight,dynamicSlope:e.dynamicSlope,segmentSpacing:e.segmentSpacing,highlight:e.highlight});this.appendChart(e)},yl.prototype.appendChart=function(t,e){dl.prototype.appendChart.call(this,t,e),ht(this.options.legend.items,t.legendItems)},yl),Xe=((ul=le)&&(gl.__proto__=ul),((gl.prototype=Object.create(ul&&ul.prototype)).constructor=gl).prototype.render=function(){this._rendered||(this._rendered=!0,this.createMarker(),this.createLabel(),this.createNote())},gl.prototype.createLabel=function(){var t,e,o,i=this.options.labels;i.visible&&(t=this.pointData(),e=W(i),o=i.color,e=e?e(t):this.formatValue(i.format),o=o||Rt(this.color),this.label=new ze(e,z({align:C,vAlign:C,margin:{left:5,right:5},zIndex:Ct(i.zIndex,this.series.zIndex)},i,{color:o}),t),this.append(this.label))},gl.prototype.formatValue=function(t){return this.owner.formatPointValue(this,t)},gl.prototype.reflow=function(t){this.render();var e=this.label;this.box=t,e&&e.reflow(this.markerBox()),this.note&&this.note.reflow(t),this.marker.reflow(this.markerBox())},gl.prototype.markerBox=function(){var t=this.options.markers,e=t.border,o=this.box.toRect(),i="roundedRect"===Ct(t.type,"rect"),r=Ct(e.width,i?1:0),e=Math.round(r/2);return t.size&&(i=o.center(),o.size.width=o.size.height=t.size,o.origin.x=Math.round(i.x-o.size.width/2),o.origin.y=Math.round(i.y-o.size.height/2)),o.size.width-=r,o.size.height-=r,o.origin.y+=e+.5,o.origin.x+=e+.5,Re(o)},gl.prototype.markerBorder=function(){var t=this.options,e=t.markers.border,t=Ct(e.opacity,t.opacity);return{color:e.color||this.color,width:e.width,opacity:t,dashType:e.dashType}},gl.prototype.createMarker=function(){var t=this.options,e=t.markers,t=new ve({type:Ct(e.type,"rect"),width:e.size,height:e.size,rotation:e.rotation,background:this.color,border:this.markerBorder(),borderRadius:e.borderRadius,opacity:this.series.opacity||t.opacity,zIndex:Ct(t.zIndex,this.series.zIndex),animation:t.animation,visual:t.visual},{dataItem:this.dataItem,value:this.value,series:this.series,category:this.category});this.marker=t,this.append(t)},gl.prototype.createHighlight=function(t){var e=this.options,o=this.options.highlight.markers||this.options.markers,e=new ve({type:Ct(o.type,"rect"),width:o.size,height:o.size,rotation:o.rotation,background:o.color||this.color,border:this.markerBorder(),borderRadius:o.borderRadius,opacity:this.series.opacity||e.opacity,zIndex:Ct(e.zIndex,this.series.zIndex)});e.reflow(this.markerBox());e=e.getElement();return e.options.fill=t.fill,e.options.stroke=t.stroke,e},gl.prototype.highlightVisual=function(){return this.rectVisual},gl.prototype.highlightVisualArgs=function(){return{options:this.options,rect:this.box.toRect(),visual:this.rectVisual}},gl.prototype.tooltipAnchor=function(){var t=this.box.center().x,e=this.box.y1-5;return{point:new Nt(t,e),align:{horizontal:C,vertical:w}}},gl.prototype.overlapsBox=function(t){return this.box.overlaps(t)},gl.prototype.unclipElements=function(){},gl.prototype.pointData=function(){return{x:this.value.x,y:this.value.y,value:this.value.value,dataItem:this.dataItem,series:this.series}},gl);function gl(t,e){ul.call(this),this.options=e,this.color=e.color||a,this.value=t}function yl(){dl.apply(this,arguments)}z(Xe.prototype,Lr),z(Xe.prototype,ro),Xe.prototype.defaults={markers:{type:"rect",borderRadius:4,border:{color:"transparent"}},padding:{top:1},labels:{visible:!1,padding:3},opacity:1,notes:{label:{}}};var vl,ml=Xe,Ke=((vl=le)&&(xl.__proto__=vl),((xl.prototype=Object.create(vl&&vl.prototype)).constructor=xl).prototype._initFields=function(){this.points=[],this.seriesOptions=[],this.valueRange={min:l,max:c},this._evalSeries=[]},xl.prototype.render=function(){this.setRange(),this.traverseDataPoints(this.addValue.bind(this))},xl.prototype.setRange=function(){for(var t=this.options.series,e=0;e<t.length;e++)for(var o=t[e],i=0;i<o.data.length;i++){var r=this._bindPoint(o,e,i).valueFields;this.valueRange.min=Math.min(this.valueRange.min,r.value),this.valueRange.max=Math.max(this.valueRange.max,r.value)}},xl.prototype.addValue=function(t,e){var o;t&&(o=this.createPoint(t,e))&&Object.assign(o,e),this.points.push(o)},xl.prototype.evalPointOptions=function(t,e,o){var i=o.series,r=o.seriesIx,n={defaults:i._defaults,excluded:["data","tooltip","content","template","visual","toggle"]},s=this._evalSeries[r];lt(s)||(this._evalSeries[r]=s=Tr(t,{},n,!0));r=t;return s&&Tr(r=z({},t),{value:e,series:i,dataItem:o.dataItem,min:this.valueRange.min,max:this.valueRange.max},n),r},xl.prototype.pointType=function(){return ml},xl.prototype.pointOptions=function(t,e){var o,i=this.seriesOptions[e];return i||(o=this.pointType().prototype.defaults,this.seriesOptions[e]=i=z({},o,{markers:{opacity:t.opacity},tooltip:{format:this.options.tooltip.format},labels:{format:this.options.labels.format}},t)),i},xl.prototype.createPoint=function(t,e){var o=e.series,i=this.pointOptions(o,e.seriesIx),r=e.color||o.color,i=this.evalPointOptions(i,t,e),r=E(o.color)?i.color:function(t,e){void 0===e&&(e=.05);var i=Object(P.parseColor)(t),r=1-e;return function(t){var e=i.toHSL(),o=100-e.l;return e.l+=Math.min((r-t)*o,o),e.toCss()}}(r)(t.value/this.valueRange.max),i=new ml(t,i);return i.color=r,this.append(i),i},xl.prototype.seriesAxes=function(t){var e=t.xAxis,o=t.yAxis,i=this.plotArea,t=e?i.namedXAxes[e]:i.axisX,i=o?i.namedYAxes[o]:i.axisY;if(!t)throw new Error("Unable to locate X axis with name "+e);if(!i)throw new Error("Unable to locate Y axis with name "+o);return{xAxis:t,yAxis:i}},xl.prototype.reflow=function(t){var n=this,s=this.points,a=!this.options.clip,h=0;this.traverseDataPoints(function(t,e){var o=s[h++],i=n.seriesAxes(e.series),r=i.xAxis,e=i.yAxis,i=r.categoryIndex(t.x),t=e.categoryIndex(t.y),i=r.getSlot(i,i,a),t=e.getSlot(t,t,a);o&&(i&&t?(t=n.pointSlot(i,t),o.reflow(t)):o.visible=!1)}),this.box=t},xl.prototype.pointSlot=function(t,e){return new qt(t.x1,e.y1,t.x2,e.y2)},xl.prototype.traverseDataPoints=function(t){for(var e=this.options.series,o=0;o<e.length;o++)for(var i=e[o],r=this.seriesAxes(i),n=r.xAxis,s=r.yAxis,a=n.currentRangeIndices(),h=s.currentRangeIndices(),p=0;p<i.data.length;p++){var l=this._bindPoint(i,o,p),c=l.valueFields,u=l.fields,d=n.totalIndex(c.x),l=s.totalIndex(c.y),d=a.min<=d&&d<=a.max,l=h.min<=l&&l<=h.max;d&&l&&t(c,z({pointIx:p,series:i,seriesIx:o,dataItem:i.data[p],owner:this},u))}},xl.prototype.formatPointValue=function(t,e){t=t.value;return this.chartService.format.auto(e,t.x,t.y,t.value)},xl.prototype.animationPoints=function(){for(var t=this.points,e=[],o=0;o<t.length;o++)e.push((t[o]||{}).marker);return e},xl);function xl(t,e){vl.call(this,e),this.plotArea=t,this.chartService=t.chartService,this._initFields(),this.render()}kt(Ke,{series:[],tooltip:{format:"{0}, {1}: {2}"},labels:{format:"{2}"},clip:!0}),z(Ke.prototype,{_bindPoint:Er.prototype._bindPoint});var _l,bl=Ke,uo=((_l=Qs)&&(wl.__proto__=_l),((wl.prototype=Object.create(_l&&_l.prototype)).constructor=wl).prototype.initFields=function(){this.namedXAxes={},this.namedYAxes={}},wl.prototype.render=function(t){void 0===t&&(t=this.panes),this.bindCategories(),this.createAxes(t),this.createCharts(t),this.createAxisLabels()},wl.prototype.bindCategories=function(){for(var t=this.srcSeries||this.series,e=0;e<t.length;e++){for(var o=t[e],i=o.data||[],r=this.seriesAxes(o),n=r.xAxis,r=r.yAxis,s=jt(n.categories||[]),a=jt(r.categories||[]),h=0;h<i.length;h++){var p=rr.current.bindPoint(o,h).valueFields,l=p.x,p=p.y;s.has(l)||s.add(l),a.has(p)||a.add(p)}n.categories=s.values(),r.categories=a.values()}},wl.prototype.createCharts=function(t){for(var e=this.groupSeriesByPane(),o=0;o<t.length;o++){var i=t[o],r=e[i.options.name||"default"]||[];this.addToLegend(r);r=this.filterVisibleSeries(r);r&&this.createHeatmapChart(Vs(r,["heatmap"]),i)}},wl.prototype.createHeatmapChart=function(t,e){t=new bl(this,{series:t});this.appendChart(t,e)},wl.prototype.seriesPaneName=function(t){var e=this.options,o=t.xAxis,i=Z([].concat(e.xAxis),function(t){return t.name===o})[0],r=t.yAxis,t=Z([].concat(e.yAxis),function(t){return t.name===r})[0],e=(e.panes||[{}])[0].name||"default";return(i||{}).pane||(t||{}).pane||e},wl.prototype.seriesAxes=function(t){var e=this.options,o=[].concat(e.xAxis),i=t.xAxis,o=i?o.find(function(t){return t.name===i}):o[0],e=[].concat(e.yAxis),r=t.yAxis,e=r?e.find(function(t){return t.name===r}):e[0];if(!o)throw new Error("Unable to locate X axis with name "+i);if(!e)throw new Error("Unable to locate Y axis with name "+r);return{xAxis:o,yAxis:e}},wl.prototype.createAxisLabels=function(){for(var t=this.axes,e=0;e<t.length;e++)t[e].createLabels()},wl.prototype.createXYAxis=function(t,e,o){for(var i,r=t.name,n=e?this.namedYAxes:this.namedXAxes,s=Object.assign({axisCrossingValue:0},t,{vertical:e,reverse:e||this.chartService.rtl?!t.reverse:t.reverse,justified:!1}),t=s.categories?s.categories[0]:null,a=[s.min,s.max,t],h=this.series,p=0;p<h.length;p++){var l=h[p],c=l[e?"yAxis":"xAxis"];if(c===s.name||0===o&&!c){l=rr.current.bindPoint(l,0).valueFields;a.push(l[e?"y":"x"]);break}}for(var u=0;u<a.length;u++)if(a[u]instanceof Date){i=!0;break}t=new(zs(s.type,y)||!s.type&&i?ai:Ko)(s,this.chartService);if(t.axisIndex=o,r){if(n[r])throw new Error((e?"Y":"X")+" axis with name "+r+" is already defined");n[r]=t}return this.appendAxis(t),t.mapCategories(),t},wl.prototype.createAxes=function(t){for(var e=this.options,o=[].concat(e.xAxis),i=[],r=[].concat(e.yAxis),n=[],s=0;s<o.length;s++)J(this.findPane(o[s].pane),t)&&i.push(this.createXYAxis(o[s],!1,s));for(var a=0;a<r.length;a++)J(this.findPane(r[a].pane),t)&&n.push(this.createXYAxis(r[a],!0,a));this.axisX=this.axisX||i[0],this.axisY=this.axisY||n[0]},wl.prototype.removeAxis=function(t){var e=t.options.name;_l.prototype.removeAxis.call(this,t),t.options.vertical?delete this.namedYAxes[e]:delete this.namedXAxes[e],t===this.axisX&&delete this.axisX,t===this.axisY&&delete this.axisY},wl.prototype._dispatchEvent=function(t,e,o){for(var i=t._eventCoordinates(e),r=new Nt(i.x,i.y),n=this.axes,s=n.length,a=[],h=[],p=0;p<s;p++){var l=n[p];Es(l.options.vertical?h:a,l.getCategory(r))}0<a.length&&0<h.length&&t.trigger(o,{element:gt(e),originalEvent:e,x:Hs(a),y:Hs(h)})},wl.prototype.updateAxisOptions=function(t,e){var o=t.options.vertical,i=this.groupAxes(this.panes),t=(o?i.y:i.x).indexOf(t);Cl(this.options,t,o,e),Cl(this.originalOptions,t,o,e)},wl.prototype.crosshairOptions=function(t){return Object.assign({},t.options.crosshair,{zIndex:0})},wl);function wl(){_l.apply(this,arguments)}function Cl(t,e,o,i){z([].concat(o?t.yAxis:t.xAxis)[e],i)}kt(uo,{xAxis:{},yAxis:{}}),z(uo.prototype,Ks);at=uo,Me="color",ae="first",_e="max";xh.current.register(Wa,[cr,ur,dr,gr,"area","verticalArea","candlestick","ohlc","bullet","verticalBullet","boxPlot","verticalBoxPlot","rangeColumn","rangeBar","waterfall","horizontalWaterfall","rangeArea","verticalRangeArea"]),xh.current.register(qh,["scatter","scatterLine","bubble"]),xh.current.register(np,[fr]),xh.current.register(gp,["donut"]),xh.current.register(Fe,["funnel"]),xh.current.register(ee,["polarArea","polarLine","polarScatter"]),xh.current.register(ce,["radarArea","radarColumn","radarLine"]),xh.current.register(at,["heatmap"]),rr.current.register([cr,ur,dr,gr,"area","verticalArea"],[p],["category",Me,"noteText","errorLow","errorHigh"]),rr.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],["from","to"],["category",Me,"noteText"]),rr.current.register(["waterfall","horizontalWaterfall"],[p],["category",Me,"noteText","summary"]),rr.current.register(["polarArea","polarLine","polarScatter"],[v,m],[Me]),rr.current.register(["radarArea","radarColumn","radarLine"],[p],[Me]),rr.current.register(["funnel"],[p],["category",Me,"visibleInLegend","visible"]),ra.current.register([cr,ur,dr,gr,"area","verticalArea","waterfall","horizontalWaterfall"],{value:_e,color:ae,noteText:ae,errorLow:"min",errorHigh:_e}),ra.current.register(["rangeColumn","rangeBar","rangeArea","verticalRangeArea"],{from:"min",to:_e,color:ae,noteText:ae}),ra.current.register(["radarArea","radarColumn","radarLine"],{value:_e,color:ae}),rr.current.register(["scatter","scatterLine","bubble"],[v,m],[Me,"noteText","xErrorLow","xErrorHigh","yErrorLow","yErrorHigh"]),rr.current.register(["bubble"],[v,m,"size"],[Me,"category","noteText"]),rr.current.register(["heatmap"],[v,m,p],[Me,"noteText"]),rr.current.register(["candlestick","ohlc"],["open","high","low","close"],["category",Me,"downColor","noteText"]),ra.current.register(["candlestick","ohlc"],{open:_e,high:_e,low:"min",close:_e,color:ae,downColor:ae,noteText:ae}),rr.current.register(["boxPlot","verticalBoxPlot"],["lower","q1","median","q3","upper","mean","outliers"],["category",Me,"noteText"]),ra.current.register(["boxPlot","verticalBoxPlot"],{lower:_e,q1:_e,median:_e,q3:_e,upper:_e,mean:_e,outliers:ae,color:ae,noteText:ae}),rr.current.register(["bullet","verticalBullet"],["current","target"],["category",Me,"visibleInLegend","noteText"]),ra.current.register(["bullet","verticalBullet"],{current:_e,target:_e,color:ae,noteText:ae}),rr.current.register([fr,"donut"],[p],["category",Me,"explode","visibleInLegend","visible"]);var Sl,kl=["category",p,v,m],Vt=((Sl=P.Class)&&(Al.__proto__=Sl),((Al.prototype=Object.create(Sl&&Sl.prototype)).constructor=Al).prototype._initElement=function(t){for(this._setElementClass(t),t.style.position="relative";t.firstChild;)t.removeChild(t.firstChild);this.element=t},Al.prototype._setElementClass=function(t){_(t,"k-chart")},Al.prototype._initTheme=function(t,e){for(var o=[],i=t.series||[],r=0;r<i.length;r++)o.push(Object.assign({},i[r]));t.series=o,function(t){for(var e=kl,o=0;o<e.length;o++){var i=e[o]+"Axes";t[i]&&(t[e[o]+"Axis"]=t[i],delete t[i])}}(t),this.applyDefaults(t,e),null===t.seriesColors&&delete t.seriesColors,this.options=z({},e,t),this.applySeriesColors()},Al.prototype.getSize=function(){var t=this.options.chartArea||{};return{width:t.width?parseInt(t.width,10):Math.floor(this.element.offsetWidth),height:t.height?parseInt(t.height,10):Math.floor(this.element.offsetHeight)}},Al.prototype.resize=function(t){var e=this.getSize(),o=this._size,i=0<e.width||0<e.height;t||i&&(!o||e.width!==o.width||e.height!==o.height)?(this._size=e,this._resize(e,t),this.trigger("resize",e)):i&&this._selections&&Pt(this._selections,function(t){return!t.visible})&&(this._destroySelections(),this._setupSelection())},Al.prototype._resize=function(){this._noTransitionsRedraw()},Al.prototype.redraw=function(t){var e;this.applyDefaults(this.options),this.applySeriesColors(),t?(t=(e=this._model._plotArea).findPane(t),e.redraw(t)):this._redraw()},Al.prototype.getAxis=function(t){return Gi(t,this._plotArea.axes)},Al.prototype.findAxisByName=function(t){return this.getAxis(t)},Al.prototype.findPaneByName=function(t){for(var e=this._plotArea.panes,o=0;o<e.length;o++)if(e[o].options.name===t)return new qi(e[o])},Al.prototype.findPaneByIndex=function(t){var e=this._plotArea.panes;if(e[t])return new qi(e[t])},Al.prototype.plotArea=function(){return new Yi(this._plotArea)},Al.prototype.toggleHighlight=function(t,e){var o,i=this._plotArea,r=(i.srcSeries||i.series||[])[0],n=E(e)?i.filterPoints(e):(V(e)?(n=e.series,o=e.category):n=o=e,"donut"===r.type?Pl(i.pointsBySeriesName(n),o):r.type===fr||"funnel"===r.type?Pl((i.charts[0]||{}).points,o):i.pointsBySeriesName(n));n&&this.togglePointsHighlight(t,n)},Al.prototype.togglePointsHighlight=function(t,e){for(var o=this._highlight,i=0;i<e.length;i++)o.togglePointHighlight(e[i],t)},Al.prototype.showTooltip=function(t){var e,o,i=this._sharedTooltip(),r=this._tooltip,n=this._plotArea;E(t)?(e=n.findPoint(t))&&i&&(o=e.categoryIx):i&<(t)&&(o=n.categoryAxis.categoryIndex(t)),i?0<=o&&(o=this._plotArea.pointsByCategoryIndex(o),r.showAt(o)):e&&r.show(e)},Al.prototype.hideTooltip=function(){this._tooltip.hide()},Al.prototype._initSurface=function(){var t=this.surface,e=this._surfaceWrap(),o=this.options.chartArea||{};o.width&&dt(e,{width:o.width}),o.height&&dt(e,{height:o.height}),t&&t.options.type===this.options.renderAs?(this.surface.clear(),this.surface.resize()):(this._destroySurface(),this.surface=P.drawing.Surface.create(e,{type:this.options.renderAs}),this.surface.bind("mouseenter",this._surfaceMouseenterHandler),this.surface.bind("mouseleave",this._surfaceMouseleaveHandler))},Al.prototype._surfaceWrap=function(){return this.element},Al.prototype._redraw=function(){var t=this._getModel();this._size={width:t.options.width,height:t.options.height},this._destroyView(),this._model=t,this._plotArea=t._plotArea,t.renderVisual(),!1!==this.options.transitions&&t.traverse(function(t){t.animation&&t.animation.setup()}),this._initSurface(),this.surface.draw(t.visual),!1!==this.options.transitions&&t.traverse(function(t){t.animation&&t.animation.play()}),this._tooltip=this._createTooltip(),this._highlight=new Ya,this._setupSelection(),this._createPannable(),this._createZoomSelection(),this._createMousewheelZoom(),this.trigger("render"),Rl(this._plotArea.panes),this._navState||this._cancelDomEvents()},Al.prototype.exportVisual=function(t){var e,o;return t&&(t.width||t.height||t.options)?(e=this.options,o=z({},t.options,{chartArea:{width:t.width,height:t.height}}),Bl(this._originalOptions,o),this.options=z({},this._originalOptions,o),this._initTheme(this.options,this._theme),this.bindCategories(),(o=this._getModel()).renderVisual(),Rl(o._plotArea.panes),o=o.visual,this.options=e):o=this.surface.exportVisual(),o},Al.prototype._sharedTooltip=function(){return this._plotArea instanceof Wa&&this.options.tooltip&&this.options.tooltip.shared},Al.prototype._createPannable=function(){var t=this.options;!1!==t.pannable&&(this._pannable=new eh(this._plotArea,t.pannable))},Al.prototype._createZoomSelection=function(){var t=this.options.zoomable,e=(t||{}).selection;!1!==t&&!1!==e&&(this._zoomSelection=new ah(this,e))},Al.prototype._createMousewheelZoom=function(){var t=this.options.zoomable,e=(t||{}).mousewheel;!1!==t&&!1!==e&&(this._mousewheelZoom=new hh(this,e))},Al.prototype._toggleDragZoomEvents=function(){var t=this.options.pannable,e=this.options.zoomable,o=(e||{}).selection,i=(e||{}).mousewheel,o=!(t||!1!==e&&!1!==o||this.requiresHandlers(["dragStart",vr,mr])),e=(!1===e||!1===i)&&!this.requiresHandlers(["zoomStart",xr,_r]),i=this.element;this._dragZoomEnabled&&o&&e?(i.style.touchAction=this._touchAction||"",this._dragZoomEnabled=!1):this._dragZoomEnabled||o&&e||(i.style.touchAction="none",this._dragZoomEnabled=!0),this._toggleDomEvents(!o,!e)},Al.prototype._toggleDomEvents=function(t,e){var o=this.domEvents;o&&(o.toggleDrag&&o.toggleDrag(t),o.toggleZoom&&o.toggleZoom(e))},Al.prototype._createTooltip=function(){var t=this.options.tooltip;return this._sharedTooltip()?this._createSharedTooltip(t):new Ph(this.chartService,t)},Al.prototype._createSharedTooltip=function(t){return new Bh(this._plotArea,t)},Al.prototype.applyDefaults=function(t,a){!function(t){var o,i,e,r=(a||{}).axisDefaults||{};function n(t){var e=(t||{}).color||i.color,t=z({},r,r[o],i,i[o],{line:{color:e},labels:{color:e},title:{color:e}},t);return delete t[o],t}for(var s=0;s<kl.length;s++)i=t.axisDefaults||{},e=(e=[].concat(t[o=kl[s]+"Axis"])).map(n),t[o]=1<e.length?e:e[0]}(t),function(t,e){var o=t.series,i=o.length,r=t.seriesDefaults,n=z({},t.seriesDefaults),s=e?z({},e.seriesDefaults):{},a=z({},s);Tl(n),Tl(a);for(var h=0;h<i;h++){var p=o[h].type||t.seriesDefaults.type,p=z({data:[]},a,s[p],{tooltip:t.tooltip},n,r[p]);o[h]._defaults=p,o[h]=z({},p,o[h]),o[h].data=o[h].data||[]}}(t,a)},Al.prototype.applySeriesColors=function(){for(var t=this.options,e=t.series,o=t.seriesColors||[],i=0;i<e.length;i++){var r=e[i],n=o[i%o.length],s=r._defaults;r.color=r.color||n,s&&(s.color=s.color||n)}},Al.prototype._getModel=function(){var t=this.options,e=this._createPlotArea(),o=new Ce(this._modelOptions());return o.chart=this,o._plotArea=e,Ue.buildTitle(t.title,o),t.legend&&t.legend.visible&&o.append(new vh(e.options.legend,this.chartService)),o.append(e),o.reflow(),o},Al.prototype._modelOptions=function(){var t=this.options,e=this.getSize();return z({transitions:t.transitions,width:e.width||600,height:e.height||400},t.chartArea)},Al.prototype._createPlotArea=function(t){var e=this.options;return xh.current.create(t?[]:e.series,e,this.chartService)},Al.prototype._setupSelection=function(){for(var t=this._plotArea.axes,e=this._selections=[],o=0;o<t.length;o++){var i,r=t[o],n=r.options;r instanceof Ko&&n.select&&!n.vertical&&(i=r.range(),n=new Ah(this,r,z({min:i.min,max:i.max},n.select)),e.push(n))}},Al.prototype._selectStart=function(t){return this.trigger("selectStart",t)},Al.prototype._select=function(t){return this.trigger("select",t)},Al.prototype._selectEnd=function(t){return this.trigger("selectEnd",t)},Al.prototype._initHandlers=function(){this._clickHandler=this._click.bind(this),this._mousewheelHandler=this._mousewheel.bind(this),this._mouseleaveHandler=this._mouseleave.bind(this),this._surfaceMouseenterHandler=this._mouseover.bind(this),this._surfaceMouseleaveHandler=this._mouseout.bind(this),this._mousemove=Object(P.throttle)(this._mousemove.bind(this),20)},Al.prototype.addObserver=function(t){t&&this.observers.push(t)},Al.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},Al.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},Al.prototype.trigger=function(t,e){void 0===e&&(e={}),"showTooltip"===t&&(e.anchor.point=this._toDocumentCoordinates(e.anchor.point));for(var o=(e.sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},Al.prototype._attachEvents=function(){var t,e=this.element;this._touchAction=e.style.touchAction,pt(e,((t={}).contextmenu=this._clickHandler,t[br]=this._mousewheelHandler,t.mouseleave=this._mouseleaveHandler,t)),this._shouldAttachMouseMove()&&pt(e,((e={}).mousemove=this._mousemove,e)),this.domEvents=ho.create(this.element,{start:this._start.bind(this),move:this._move.bind(this),end:this._end.bind(this),tap:this._tap.bind(this),gesturestart:this._gesturestart.bind(this),gesturechange:this._gesturechange.bind(this),gestureend:this._gestureend.bind(this)}),this._toggleDragZoomEvents()},Al.prototype._mouseleave=function(t){this._hoveredPoint&&(this._hoveredPoint.out(this,t),this._hoveredPoint=null),this._plotArea.hovered&&(this.trigger("plotAreaLeave"),this._plotArea.hovered=!1)},Al.prototype._cancelDomEvents=function(){this.domEvents&&this.domEvents.cancel&&this.domEvents.cancel()},Al.prototype._gesturestart=function(t){this._mousewheelZoom&&!this._stopChartHandlers(t)&&(this._gestureDistance=t.distance,this._unsetActivePoint(),this.surface.suspendTracking())},Al.prototype._gestureend=function(t){this._zooming&&!this._stopChartHandlers(t)&&(this.surface&&this.surface.resumeTracking(),this._zooming=!1,this.trigger(_r,{}))},Al.prototype._gesturechange=function(t){var e,o,i=this._mousewheelZoom;i&&!this._stopChartHandlers(t)&&(t.preventDefault(),o=this._gestureDistance,e=-t.distance/o+1,.1<=Math.abs(e)&&(e=Math.round(10*e),this._gestureDistance=t.distance,o={delta:e,axisRanges:Ml(this._plotArea.axes),originalEvent:t},!this._zooming&&this.trigger("zoomStart",o)||(t=this._eventCoordinates(t),this._zooming||(this._zooming=!0),(o.axisRanges=i.updateRanges(e,t))&&!this.trigger(xr,o)&&i.zoom())))},Al.prototype._mouseout=function(t){var e;!t.element||(e=this._drawingChartElement(t.element,t))&&e.leave&&e.leave(this,t.originalEvent)},Al.prototype._start=function(t){var e=this._eventCoordinates(t);!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(e)&&(this.requiresHandlers(["dragStart",vr,mr])&&this._startNavigation(t,e,"dragStart"),this._pannable&&this._pannable.start(t)&&(this.surface.suspendTracking(),this._unsetActivePoint(),this._suppressHover=!0,this.chartService.panning=!0),this._zoomSelection&&this._zoomSelection.start(t)&&this.trigger("zoomStart",{axisRanges:Ml(this._plotArea.axes),originalEvent:t}))},Al.prototype._move=function(t){var e=this._navState,o=this._pannable;if(!this._stopChartHandlers(t)){if(o){var i=o.move(t);i&&!this.trigger(vr,{axisRanges:i,originalEvent:t})&&o.pan()}else if(e){for(var r={},n=e.axes,s=0;s<n.length;s++){var a,h=n[s];!h.options.name||0!=(a=(a=h.options.vertical?t.y:t.x).startLocation-a.location)&&(r[h.options.name]=h.translateRange(a))}e.axisRanges=r,this.trigger(vr,{axisRanges:r,originalEvent:t})}this._zoomSelection&&this._zoomSelection.move(t)}},Al.prototype._end=function(t){var e,o;this._stopChartHandlers(t)||((e=this._pannable)&&e.end(t)?(this.surface.resumeTracking(),this.trigger(mr,{axisRanges:Ml(this._plotArea.axes),originalEvent:t}),this._suppressHover=!1,this.chartService.panning=!1):this._endNavigation(t,mr),this._zoomSelection&&(o=this._zoomSelection.end(t))&&!this.trigger(xr,{axisRanges:o,originalEvent:t})&&(this._zoomSelection.zoom(),this.trigger(_r,{axisRanges:o,originalEvent:t})))},Al.prototype._stopChartHandlers=function(t){var e=this._selections||[];if(!e.length)return!1;var t=this._eventCoordinates(t),o=this._plotArea.paneByPoint(t);if(o)for(var i=0;i<e.length;i++)if(e[i].onPane(o))return!0},Al.prototype._mousewheelZoomRate=function(){var t=(this.options.zoomable||{}).mousewheel||{};return Ct(t.rate,.3)},Al.prototype._mousewheel=function(t){var e=this,o=nt(t),i=this._mousewheelZoom,r=this._eventCoordinates(t);if(!this._stopChartHandlers(t)&&this._plotArea.backgroundContainsPoint(r))if(i){var n={delta:o,axisRanges:Ml(this._plotArea.axes),originalEvent:t};!this._zooming&&this.trigger("zoomStart",n)||(t.preventDefault(),this._zooming||(this._unsetActivePoint(),this.surface.suspendTracking(),this._zooming=!0),this._mwTimeout&&clearTimeout(this._mwTimeout),n.axisRanges=i.updateRanges(o,r),n.axisRanges&&!this.trigger(xr,n)&&i.zoom(),this._mwTimeout=setTimeout(function(){e.trigger(_r,n),e._zooming=!1,e.surface&&e.surface.resumeTracking()},150))}else{i=this._navState;if(i=!i&&!this._startNavigation(t,r,"zoomStart")?this._navState:i){var s=i.totalDelta||o;i.totalDelta=s+o;for(var a=this._navState.axes,h={},p=0;p<a.length;p++){var l=a[p],c=l.options.name;c&&(h[c]=l.scaleRange(-s*this._mousewheelZoomRate(),r))}this.trigger(xr,{delta:o,axisRanges:h,originalEvent:t}),this._mwTimeout&&clearTimeout(this._mwTimeout),this._mwTimeout=setTimeout(function(){e._endNavigation(t,_r)},150)}}},Al.prototype._startNavigation=function(t,e,o){var i=this._model._plotArea,r=i.findPointPane(e),e=i.axes.slice(0);r&&(i=Ml(e),this.trigger(o,{axisRanges:i,originalEvent:t})?this._cancelDomEvents():(this._suppressHover=!0,this._unsetActivePoint(),this._navState={axisRanges:i,pane:r,axes:e}))},Al.prototype._endNavigation=function(t,e){this._navState&&(this.trigger(e,{axisRanges:this._navState.axisRanges,originalEvent:t}),this._suppressHover=!1,this._navState=null)},Al.prototype._getChartElement=function(t,e){var o=this.surface.eventTarget(t);if(o)return this._drawingChartElement(o,t,e)},Al.prototype._drawingChartElement=function(t,e,o){for(var i,r=t;r&&!i;)i=r.chartElement,r=r.parent;if(i)return i.aliasFor&&(i=i.aliasFor(e,this._eventCoordinates(e))),i=o&&(i=i.closest(o))&&i.aliasFor?i.aliasFor():i},Al.prototype._eventCoordinates=function(t){t=ft(t);return this._toModelCoordinates(t.x,t.y)},Al.prototype._elementPadding=function(){var t,e;return this._padding||(t=(e=H(this.element,["paddingLeft","paddingTop"])).paddingLeft,e=e.paddingTop,this._padding={top:e,left:t}),this._padding},Al.prototype._toDocumentCoordinates=function(t){var e=this._elementPadding(),o=ut(this.element);return{left:bt(t.x+e.left+o.left),top:bt(t.y+e.top+o.top)}},Al.prototype._toModelCoordinates=function(t,e){var o=this.element,i=ut(o),r=this._elementPadding(),o=Bt(o).invert(),o=new P.geometry.Point(t-i.left-r.left,e-i.top-r.top).transform(o);return new Nt(o.x,o.y)},Al.prototype._tap=function(t){var e=this,o=this.surface.eventTarget(t),i=this._drawingChartElement(o,t),r=this._sharedTooltip();this._startHover(o,t)||r||this._unsetActivePoint(),r&&this._trackSharedTooltip(this._eventCoordinates(t),t,!0),this._propagateClick(i,t),this.handlingTap=!0,setTimeout(function(){e.handlingTap=!1},0)},Al.prototype._click=function(t){var e=this._getChartElement(t);this._propagateClick(e,t)},Al.prototype._propagateClick=function(t,e){for(var o=t;o;)o.click&&o.click(this,e),o=o.parent},Al.prototype._startHover=function(t,e){if(this._suppressHover)return!1;var o=this._drawingChartElement(t,e,function(t){return(t.hover||t.over)&&!(t instanceof Qs)}),i=this._activePoint,r=1<this._plotArea.series.length,t=this._hasInactiveOpacity();return this._updateHoveredPoint(o,e),o&&i!==o&&o.hover?(this._activePoint=o,this._sharedTooltip()||o.hover(this,e)||(this._displayTooltip(o),t?this._displayInactiveOpacity(o,r):this._highlight.show(o))):!o&&t&&(r&&this._activeChartInstance&&(this._updateSeriesOpacity(o,!0),this._applySeriesOpacity(this._activeChartInstance.children,null,!0),this._activeChartInstance=null),this._highlight&&this._highlight.hide(),this._activePoint=null),o},Al.prototype._displayTooltip=function(t){z({},this.options.tooltip,t.options.tooltip).visible&&this._tooltip.show(t)},Al.prototype._displayInactiveOpacity=function(t,e,o){var i=this._activeChartInstance=this._chartInstanceFromPoint(t);i&&(e?(this._updateSeriesOpacity(t),this._applySeriesOpacity(i.children,null,!0),this._applySeriesOpacity(i.children,t.series),this._highlight.show(o||t)):i.supportsPointInactiveOpacity()?(i=this._getInactivePoints(t,i))&&i.length&&this._highlight.show(i,1-this._getInactiveOpacityForSeries(t.series)):this._highlight.show(t))},Al.prototype._getInactivePoints=function(e,t){return this._getAllPointsOfType(t,e.constructor).filter(function(t){return t!==e})},Al.prototype._getAllPointsOfType=function(t,e){for(var o=[],i=0;i<t.children.length;i++){var r=t.children[i];r.constructor===e?o.push(r):r.children&&r.children.length&&(o=o.concat(this._getAllPointsOfType(r,e)))}return o},Al.prototype._updateHoveredPoint=function(t,e){var o=this._hoveredPoint;o&&o!==t&&(o.out(this,e),this._hoveredPoint=null),t&&o!==t&&t.over&&(this._hoveredPoint=t).over(this,e)},Al.prototype._updateSeriesOpacity=function(t,e){for(var o=this._plotArea,i=o.series.length,r=0;r<i;r++){var n=o.series[r],s=this._getDefaultOpacityForSeries(n),a=this._getInactiveOpacityForSeries(n);e||n===t.series?(n.opacity=s,n.line&&(n.line.opacity=s)):(n.defaultOpacity=s,n.opacity=a,n.line&&(n.line.opacity=a))}},Al.prototype._applySeriesOpacity=function(t,e,o,i){for(var r=0;r<t.length;r++){var n,s=t[r],a=s.series||i;a&&(a.highlight||{}).visible&&s.visual&&(n=(i||s.series).opacity,a===e&&!o||s.visual.opacity(o?1:n)),s.children&&s.children.length&&this._applySeriesOpacity(s.children,e,o,s.series)}},Al.prototype._chartInstanceFromPoint=function(t){for(var e=t.parent;e&&!e.plotArea;)e=e.parent;return e},Al.prototype._hasInactiveOpacity=function(){var t=void 0!==this.options.seriesDefaults.highlight.inactiveOpacity,e=0<this.options.series.filter(function(t){return void 0!==t.highlight.inactiveOpacity}).length;return t||e},Al.prototype._getInactiveOpacityForSeries=function(t){var e=this.options.seriesDefaults.highlight.inactiveOpacity;return t.highlight.inactiveOpacity||e||t.opacity||1},Al.prototype._getDefaultOpacityForSeries=function(t){return t.defaultOpacity||t.opacity||1},Al.prototype._mouseover=function(t){var t=this._startHover(t.element,t.originalEvent);t&&t.tooltipTracking&&!this._mouseMoveTrackHandler&&!this._sharedTooltip()&&(this._mouseMoveTrackHandler=this._mouseMoveTracking.bind(this),pt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)))},Al.prototype._mouseMoveTracking=function(t){var e,o=this.options,i=this._tooltip,r=this._highlight,n=this._activePoint,s=this._eventCoordinates(t);this._plotArea.box.containsPoint(s)?n&&n.tooltipTracking&&n.series&&n.parent.getNearestPoint&&((e=n.parent.getNearestPoint(s.x,s.y,n.seriesIx))&&e!==n&&((this._activePoint=e).hover(this,t)||(z({},o.tooltip,e.options.tooltip).visible&&i.show(e),r.show(e)))):(wt(document,((e={}).mousemove=this._mouseMoveTrackHandler,e)),this._unsetActivePoint(),this._mouseMoveTrackHandler=null)},Al.prototype._mousemove=function(t){var e,o=this._eventCoordinates(t),i=this._plotArea;this._trackCrosshairs(o),i.hover&&((e=i.backgroundContainsPoint(o))?(i.hovered=!0,this._plotArea.hover(this,t)):i.hovered&&!e&&(this.trigger("plotAreaLeave"),i.hovered=!1)),this._sharedTooltip()&&this._trackSharedTooltip(o,t)},Al.prototype._trackCrosshairs=function(t){for(var e=this._plotArea.crosshairs,o=0;o<e.length;o++){var i=e[o];i.box.containsPoint(t)?i.showAt(t):i.hide()}},Al.prototype._trackSharedTooltip=function(t,e,o){var i,r,n,s,a,h,p;this._suppressHover||(i=this.options.tooltip,p=this._plotArea,h=this._plotArea.categoryAxis,r=this._tooltip,n=this._highlight,p.backgroundContainsPoint(t)?(s=h.pointCategoryIndex(t))!==this._tooltipCategoryIx||!this._sharedHighlight&&o?((p=(h=(a=p.pointsByCategoryIndex(s)).map(function(t){return t.eventArgs(e)}))[0]||{}).categoryPoints=h,0<a.length&&!this.trigger("seriesHover",p)?(i.visible&&r.showAt(a,t),n.show(a),this._sharedHighlight=!0):r.hide(),this._tooltipCategoryIx=s):o&&this._sharedHighlight&&(n.hide(),r.hide(),this._sharedHighlight=!1):this._sharedHighlight&&(n.hide(),r.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1))},Al.prototype.hideElements=function(t){var e=this._plotArea;this._mousemove.cancel(),e.hideCrosshairs(),this._unsetActivePoint(t)},Al.prototype._unsetActivePoint=function(t){var e=this._tooltip,o=this._highlight;this._activePoint=null,this._hoveredPoint=null,!e||t&&t.keepTooltipOpen||e.hide(),this._tooltipCategoryIx=null,this._sharedHighlight=!1,o&&o.hide()},Al.prototype._deferRedraw=function(){this._redraw()},Al.prototype._clearRedrawTimeout=function(){this._redrawTimeout&&(clearInterval(this._redrawTimeout),this._redrawTimeout=null)},Al.prototype.bindCategories=function(){for(var t=this.options,e=[].concat(t.categoryAxis),o=0;o<e.length;o++){var i=e[o];!1!==i.autoBind&&this.bindCategoryAxisFromSeries(i,o)}},Al.prototype.bindCategoryAxisFromSeries=function(t,e){for(var o,i,r=this.options.series,n=r.length,s=new $,a=[],h=!1,p=0;p<n;p++){var l=r[p],c=l.categoryAxis===t.name||!l.categoryAxis&&0===e,u=l.data,d=u.length,c=l.categoryField&&c,h=c||h;if(c&&0<d)for(var f=(o=Ds(t,Ji(l.categoryField,u[0])))?js:Ji,g=0;g<d;g++){var y=u[g],v=f(l.categoryField,y,this.chartService.intl);!o&&s.get(v)||(a.push([v,y]),o||s.set(v,!0))}}0<a.length?(i=function(t){for(var e=t.length,o=[],i=0;i<e;i++)for(var r=t[i],n=r.length,s=0;s<n;s++)o[s]=o[s]||[],o[s].push(r[s]);return o}(a=o?function(t){for(var e=function(t,e){void 0===e&&(e=Do);for(var o=1,i=t.length;o<i;o++)if(e(t[o],t[o-1])<0){t.sort(e);break}return t}(a,t=void 0===t?Do:t),o=e.length,i=0<o?[e[0]]:[],r=1;r<o;r++)0!==t(e[r],vt(i))&&i.push(e[r]);return i}(function(t,e){return Do(t[0],e[0])}):a),t.categories=i[0]):h&&(t.categories=[])},Al.prototype._isBindable=function(t){for(var e=rr.current.valueFields(t),o=!0,i=0;i<e.length;i++){var r=e[i];if(r===p?r="field":r+="Field",!lt(t[r])){o=!1;break}}return o},Al.prototype._noTransitionsRedraw=function(){var t,e=this.options;!1!==e.transitions&&(t=!(e.transitions=!1)),this._redraw(),t&&(e.transitions=!0)},Al.prototype._legendItemHover=function(e,o){var t=this._plotArea,i=this._highlight,r=(t.srcSeries||t.series)[e],n=J(r.type,[fr,"donut","funnel"])?t.findPoint(function(t){return t.series.index===e&&t.index===o}):t.pointsBySeriesIndex(e);this._hasInactiveOpacity()&&r.visible&&n?(r=1<t.series.length,t=n.length?n[0]:n,this._displayInactiveOpacity(t,r,n)):i.show(n)},Al.prototype._shouldAttachMouseMove=function(){return this._plotArea.crosshairs.length||this._tooltip&&this._sharedTooltip()||this.requiresHandlers(["plotAreaHover","plotAreaLeave"])},Al.prototype.updateMouseMoveHandler=function(){var t;wt(this.element,((t={}).mousemove=this._mousemove,t)),this._shouldAttachMouseMove()&&pt(this.element,((t={}).mousemove=this._mousemove,t))},Al.prototype.applyOptions=function(t,e){Bl(this._originalOptions,t),this._originalOptions=z(this._originalOptions,t),this.options=z({},this._originalOptions),e&&(this._theme=e,this.chartService.theme=e),this._initTheme(this.options,this._theme),this._toggleDragZoomEvents()},Al.prototype.setOptions=function(t,e){this.applyOptions(t,e),this.bindCategories(),this.redraw(),this.updateMouseMoveHandler()},Al.prototype.setDirection=function(t){this.chartService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&this._destroySurface()},Al.prototype.setIntlService=function(t){this.chartService.intl=t},Al.prototype.noTransitionsRedraw=function(){this._noTransitionsRedraw()},Al.prototype.destroy=function(){var t;this._destroyed=!0,wt(this.element,((t={}).contextmenu=this._clickHandler,t[br]=this._mousewheelHandler,t.mousemove=this._mousemove,t.mouseleave=this._mouseleaveHandler,t)),this.domEvents&&(this.domEvents.destroy(),delete this.domEvents),this._mouseMoveTrackHandler&&wt(document,((t={}).mousemove=this._mouseMoveTrackHandler,t)),this._destroyView(),this._destroySurface(),this._clearRedrawTimeout()},Al.prototype._destroySurface=function(){var t=this.surface;t&&(t.unbind("mouseenter",this._surfaceMouseenterHandler),t.unbind("mouseleave",this._surfaceMouseleaveHandler),t.destroy(),this.surface=null)},Al.prototype._destroySelections=function(){var t=this._selections;if(t)for(;0<t.length;)t.shift().destroy()},Al.prototype._destroyView=function(){var t=this._model;t&&(t.destroy(),this._model=null),this._unsetActivePoint(),this._destroySelections(),this._tooltip&&this._tooltip.destroy(),this._highlight&&this._highlight.destroy(),this._zoomSelection&&(this._zoomSelection.destroy(),delete this._zoomSelection),this._pannable&&(this._pannable.destroy(),delete this._pannable),this._mousewheelZoom&&(this._mousewheelZoom.destroy(),delete this._mousewheelZoom)},Al);function Al(t,e,o,i){var r=this;void 0===i&&(i={}),Sl.call(this),this.observers=[],this.addObserver(i.observer),this.chartService=new ao(this,i),this.chartService.theme=o,this._initElement(t);t=z({},this.options,e);this._originalOptions=z({},t),this._theme=o,this._initTheme(t,o),this._initHandlers(),this._initSurface(),this.bindCategories(),St.preloadFonts(e,function(){r.fontLoaded=!0,r._destroyed||(r.trigger("init"),r._redraw(),r._attachEvents())})}function Pl(t,e){if(t)for(var o=0;o<t.length;o++)if(t[o].category===e)return[t[o]]}function Tl(t){delete t.bar,delete t.column,delete t.rangeColumn,delete t.line,delete t.verticalLine,delete t.pie,delete t.donut,delete t.area,delete t.verticalArea,delete t.scatter,delete t.scatterLine,delete t.bubble,delete t.candlestick,delete t.ohlc,delete t.boxPlot,delete t.bullet,delete t.verticalBullet,delete t.polarArea,delete t.polarLine,delete t.radarArea,delete t.radarLine,delete t.waterfall}function Ml(t){for(var e={},o=0;o<t.length;o++){var i=t[o],r=i.options.name;r&&(e[r]=i.range())}return e}var Ol=["data","categories"];function Bl(t,e){for(var o in e){var i,r,n;!J(o,Ol)&&e.hasOwnProperty(o)&&(i=e[o],r=t[o],lt(r)&&((n=null===i)||!lt(i)?(delete t[o],n&&delete e[o]):r&&V(i)&&V(r)&&Bl(r,i)))}}function Rl(t){for(var e=0;e<t.length;e++)t[e].notifyRender()}kt(Vt,{renderAs:"",chartArea:{},legend:{visible:!0,labels:{}},categoryAxis:{},seriesDefaults:{type:ur,data:[],highlight:{visible:!0},labels:{},negativeValues:{visible:!1}},series:[],seriesColors:null,tooltip:{visible:!1},transitions:!0,valueAxis:{},plotArea:{},title:{},xAxis:{},yAxis:{},panes:[{}],pannable:!1,zoomable:!1});var El,Ll=Vt,Il=((El=Bh)&&(Vl.__proto__=El),((Vl.prototype=Object.create(El&&El.prototype)).constructor=Vl).prototype._slotAnchor=function(t,e){var o=this.plotArea.categoryAxis.options.vertical,i=o?{horizontal:"left",vertical:"center"}:{horizontal:"center",vertical:"bottom"};return{point:o?new Nt(this.plotArea.box.x2,e.center().y):new Nt(e.center().x,-2),align:i}},Vl.prototype._defaultAnchor=function(t,e){return this._slotAnchor({},e)},Vl),zl=[cr,"bullet"];function Vl(){El.apply(this,arguments)}function jl(t){for(var e=[],o=0;o<t.length;o++){var i=t[o];e[o]=i.style.display,i.style.display="none"}return e}function Dl(t,e){for(var o=0;o<t.length;o++)t[o].style.display=e[o]}function Hl(t){return O(t)?[t]:t}var Ul,ge=((Ul=Ll)&&(Fl.__proto__=Ul),((Fl.prototype=Object.create(Ul&&Ul.prototype)).constructor=Fl).prototype._setElementClass=function(t){_(t,"k-sparkline")},Fl.prototype._initElement=function(t){Ul.prototype._initElement.call(this,t),this._initialWidth=Math.floor(dt(t).width)},Fl.prototype._resize=function(){var t=this.element,e=jl(t.childNodes);this._initialWidth=Math.floor(dt(t).width),Dl(t.childNodes,e),Ul.prototype._resize.call(this)},Fl.prototype._modelOptions=function(){var t=this.options,e=this._surfaceWrap(),o=jl(e.childNodes),i=document.createElement("span");i.innerHTML=" ",e.appendChild(i);t=z({width:this._autoWidth,height:dt(e).height,transitions:t.transitions},t.chartArea,{inline:!0,align:!1});return dt(e,{width:t.width,height:t.height}),e.removeChild(i),Dl(e.childNodes,o),this.surface&&this.surface.resize(),t},Fl.prototype._surfaceWrap=function(){var t;return this.stage||(t=this.stage=document.createElement("span"),this.element.appendChild(t)),this.stage},Fl.prototype._createPlotArea=function(t){t=Ul.prototype._createPlotArea.call(this,t);return this._autoWidth=this._initialWidth||this._calculateWidth(t),t},Fl.prototype._calculateWidth=function(t){for(var e=this.options,o=U(e.chartArea.margin),i=t.charts,r=this._surfaceWrap(),n=0,s=0;s<i.length;s++){var a=i[s],h=(a.options.series||[])[0];if(h){if(h.type===cr)return 150;if("bullet"===h.type)return 150;if(h.type===fr)return dt(r).height;var p=a.categoryAxis;p&&(a=p.categoriesCount()*(!a.options.isStacked&&J(h.type,[ur,"verticalBullet"])?a.seriesOptions.length:1),n=Math.max(n,a))}}e=n*e.pointWidth;return 0<e&&(e+=o.left+o.right),e},Fl.prototype._createSharedTooltip=function(t){return new Il(this._plotArea,t)},Fl.normalizeOptions=function(t){t=Hl(t);return(t=x(t)?{seriesDefaults:{data:t}}:z({},t)).series||(t.series=[{data:Hl(t.data)}]),z(t,{seriesDefaults:{type:t.type}}),t=J(t.series[0].type,zl)||J(t.seriesDefaults.type,zl)?z({},{categoryAxis:{crosshair:{visible:!1}}},t):t},Fl);function Fl(){Ul.apply(this,arguments)}kt(ge,{chartArea:{margin:2},axisDefaults:{visible:!1,majorGridLines:{visible:!1},valueAxis:{narrowRange:!0}},seriesDefaults:{type:"line",area:{line:{width:.5}},bar:{stack:!0},padding:2,width:.5,overlay:{gradient:null},highlight:{visible:!1},border:{width:0},markers:{size:2,visible:!1}},tooltip:{visible:!0,shared:!0},categoryAxis:{crosshair:{visible:!0,tooltip:{visible:!1}}},legend:{visible:!1},transitions:!1,pointWidth:5,panes:[{clip:!1}]});var Nl,Gl=ge,Wl=((Nl=P.drawing.Animation)&&(Xl.__proto__=Nl),((Xl.prototype=Object.create(Nl&&Nl.prototype)).constructor=Xl).prototype.setup=function(){this._initialOpacity=parseFloat(H(this.element,"opacity").opacity)},Xl.prototype.step=function(t){H(this.element,{opacity:String(tt(this._initialOpacity,0,t))})},Xl.prototype.abort=function(){Nl.prototype.abort.call(this),H(this.element,{display:"none",opacity:String(this._initialOpacity)})},Xl.prototype.cancel=function(){Nl.prototype.abort.call(this),H(this.element,{opacity:String(this._initialOpacity)})},Xl);function Xl(){Nl.apply(this,arguments)}function ql(t,e){var o=document.createElement("div");return o.className=t,e&&(o.style.cssText=e),o}var Yl,eo=((Yl=P.Class)&&(Zl.__proto__=Yl),((Zl.prototype=Object.create(Yl&&Yl.prototype)).constructor=Zl).prototype.createElements=function(){var t=this.element=ql("k-navigator-hint","display: none; position: absolute; top: 1px; left: 1px;"),e=this.tooltip=ql("k-tooltip k-chart-tooltip"),o=this.scroll=ql("k-scroll");e.innerHTML=" ",t.appendChild(e),t.appendChild(o)},Zl.prototype.show=function(t,e,o){var i=this.element,r=this.options,n=this.scroll,s=this.tooltip,a=Lo(Uo(t)+Uo(e-t)/2),h=.4*o.width(),p=o.center().x-h,l=(o.center().x-p)/(r.max-r.min),c=a-r.min,a=this.chartService.intl.format(r.format,t,e),r=W(r);this.clearHideTimeout(),this._visible||(H(i,{visibility:"hidden",display:"block"}),this._visible=!0),r&&(a=r({from:t,to:e})),s.innerHTML=a,H(s,{left:o.center().x-s.offsetWidth/2,top:o.y1});s=H(s,["marginTop","borderTopWidth","height"]);H(n,{width:h,left:p+c*l,top:o.y1+s.marginTop+s.borderTopWidth+s.height/2}),H(i,{visibility:"visible"})},Zl.prototype.clearHideTimeout=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideAnimation&&this._hideAnimation.cancel()},Zl.prototype.hide=function(){var t=this;this.clearHideTimeout(),this._hideTimeout=setTimeout(function(){t._visible=!1,t._hideAnimation=new Wl(t.element),t._hideAnimation.setup(),t._hideAnimation.play()},this.options.hideDelay)},Zl.prototype.destroy=function(){this.clearHideTimeout(),this.container&&this.container.removeChild(this.element),delete this.container,delete this.chartService,delete this.element,delete this.tooltip,delete this.scroll},Zl);function Zl(t,e,o){Yl.call(this),this.options=z({},this.options,o),this.container=t,this.chartService=e;e=H(t,["paddingLeft","paddingTop"]);this.chartPadding={top:e.paddingTop,left:e.paddingLeft},this.createElements(),t.appendChild(this.element)}kt(eo,{format:"{0:d} - {1:d}",hideDelay:500});var Ql=eo,Kl="_navigator",$l=Kl;function Jl(){}var tc,ec,oc=((ec=P.Class)&&(rc.__proto__=ec),((rc.prototype=Object.create(ec&&ec.prototype)).constructor=rc).prototype.parseDate=function(t){return Xo(this.chart.chartService.intl,t)},rc.prototype.clean=function(){this.selection&&(this.selection.destroy(),this.selection=null),this.hint&&(this.hint.destroy(),this.hint=null)},rc.prototype.destroy=function(){this.chart&&(this.chart.removeObserver(this.chartObserver),delete this.chart),this.clean()},rc.prototype.redraw=function(){this._redrawSelf(),this.initSelection()},rc.prototype.initSelection=function(){var t=this.chart,e=this.options,o=this.mainAxis(),i=o.roundedRange(),r=i.min,n=i.max,s=e.select,a=s.from,h=s.to,i=s.mousewheel,s=(Jl.prototype=o,new Jl);0!==o.categoriesCount()&&(this.clean(),s.box=o.box,this.selection=new Ah(t,s,{min:r,max:n,from:a||r,to:h||n,mousewheel:Ct(i,{zoom:"left"}),visible:e.visible},new ot(this,{selectStart:"_selectStart",select:"_select",selectEnd:"_selectEnd"})),e.hint.visible&&(this.hint=new Ql(t.element,t.chartService,{min:r,max:n,template:W(e.hint),format:e.hint.format})))},rc.prototype.setRange=function(){var t=this.chart._createPlotArea(!0).namedCategoryAxes[$l].roundedRange(),e=t.min,o=t.max,i=this.options.select||{},r=i.from||e,t=i.to||o;this.options.select=z({},i,{from:r=r<e?e:r,to:t=o<t?o:t}),this.filterAxes()},rc.prototype._redrawSelf=function(t){var e=this.chart._plotArea;e&&e.redraw(vt(e.panes),t)},rc.prototype.redrawSlaves=function(){var t=this.chart,e=t._plotArea,o=e.panes.slice(0,-1);e.srcSeries=t.options.series,e.options.categoryAxis=t.options.categoryAxis,e.clearSeriesPointsCache(),e.redraw(o)},rc.prototype._drag=function(t){var e=this.chart,o=this.selection,i=e._eventCoordinates(t.originalEvent),r=this.mainAxis(),n=r.roundedRange(),i=r.pane.box.containsPoint(i),e=e._plotArea.categoryAxis,t=t.axisRanges[e.options.name],e=this.options.select;t&&!i&&o&&(e=e.from&&e.to?Uo(e.to)-Uo(e.from):Uo(o.options.to)-Uo(o.options.from),t=Lo(mt(Uo(t.min),n.min,Uo(n.max)-e)),n=Lo(mt(Uo(t)+e,Uo(n.min)+e,n.max)),this.options.select={from:t,to:n},this.options.liveDrag&&(this.filterAxes(),this.redrawSlaves()),o.set(t,n),this.showHint(t,n))},rc.prototype._dragEnd=function(){this.filterAxes(),this.filter(),this.redrawSlaves(),this.hint&&this.hint.hide()},rc.prototype.readSelection=function(){var t=this.selection.options,e=t.from,o=t.to,t=this.options.select;t.from=e,t.to=o},rc.prototype.filterAxes=function(){for(var t=this.options.select,e=this.chart.options.categoryAxis,o=(t=void 0===t?{}:t).from,i=t.to,r=0;r<e.length;r++){var n=e[r];n.pane!==Kl&&(n.min=o,n.max=i)}},rc.prototype.filter=function(){var t,e,o=this.chart,i=this.options.select;o.requiresHandlers(["navigatorFilter"])&&(t=this.mainAxis(),e={from:i.from,to:i.to},"category"!==t.options.type&&(o=new ai(z({baseUnit:"fit"},o.options.categoryAxis[0],{categories:[i.from,i.to]}),o.chartService).options,e.from=zo(o.min,-o.baseUnitStep,o.baseUnit),e.to=zo(o.max,o.baseUnitStep,o.baseUnit)),this.chart.trigger("navigatorFilter",e))},rc.prototype._zoom=function(t){var e,o=this.chart._plotArea.categoryAxis,i=this.selection,r=this.options,n=r.select,s=r.liveDrag,a=this.mainAxis(),h=t.delta;i&&(e=a.categoryIndex(i.options.from),r=a.categoryIndex(i.options.to),a=this.chart._eventCoordinates(t.originalEvent),t.originalEvent.preventDefault(),1<Math.abs(h)&&(h*=3),1<r-e?(i.zoom(h,a),this.readSelection()):(o.options.min=n.from,n.from=o.scaleRange(-t.delta*this.chart._mousewheelZoomRate(),a).min),s&&(this.filterAxes(),this.redrawSlaves()),i.set(n.from,n.to),this.showHint(this.options.select.from,this.options.select.to))},rc.prototype._zoomEnd=function(t){this._dragEnd(t)},rc.prototype.showHint=function(t,e){var o=this.chart._plotArea;this.hint&&this.hint.show(t,e,o.backgroundBox())},rc.prototype._selectStart=function(t){return this.chart._selectStart(t)},rc.prototype._select=function(t){return this.showHint(t.from,t.to),this.chart._select(t)},rc.prototype._selectEnd=function(t){return this.hint&&this.hint.hide(),this.readSelection(),this.filterAxes(),this.filter(),this.redrawSlaves(),this.chart._selectEnd(t)},rc.prototype.mainAxis=function(){var t=this.chart._plotArea;if(t)return t.namedCategoryAxes[$l]},rc.prototype.select=function(t,e){var o=this.options.select;return t&&e&&(o.from=this.parseDate(t),o.to=this.parseDate(e),this.filterAxes(),this.filter(),this.redrawSlaves(),this.selection.set(t,e)),{from:o.from,to:o.to}},rc.setup=function(t,e){var o,i,r;void 0===e&&(e={}),(t=void 0===t?{}:t).__navi||(t.__navi=!0,o=z({},e.navigator,t.navigator),i=t.panes=[].concat(t.panes),r=z({},o.pane,{name:Kl}),o.visible||(r.visible=!1,r.height=.1),i.push(r),rc.attachAxes(t,o),rc.attachSeries(t,o,e))},rc.attachAxes=function(t,e){var o=e.series||[],i=t.categoryAxis=[].concat(t.categoryAxis),r=t.valueAxis=[].concat(t.valueAxis),t=0===Vs(o,yr).length,o=z({type:"date",pane:Kl,roundToBaseUnit:!t,justified:t,_collapse:!1,majorTicks:{visible:!0},tooltip:{visible:!1},labels:{step:1},autoBind:e.autoBindElements,autoBaseUnitSteps:{minutes:[1],hours:[1,2],days:[1,2],weeks:[],months:[1],years:[1]}}),t=e.categoryAxis;i.push(z({},o,{maxDateGroups:200},t,{name:$l,title:null,baseUnit:"fit",baseUnitStep:"auto",labels:{visible:!1},majorTicks:{visible:!1}}),z({},o,t,{name:$l+"_labels",maxDateGroups:20,baseUnitStep:"auto",labels:{position:""},plotBands:[],autoBaseUnitSteps:{minutes:[]},_overlap:!0}),z({},o,t,{name:$l+"_ticks",maxDateGroups:200,majorTicks:{width:.5},plotBands:[],title:null,labels:{visible:!1,mirror:!0},_overlap:!0})),r.push(z({name:$l,pane:Kl,majorGridLines:{visible:!1},visible:!1},e.valueAxis))},rc.attachSeries=function(t,e,o){for(var i=t.series=t.series||[],r=[].concat(e.series||[]),n=o.seriesColors,s=e.seriesDefaults,a=0;a<r.length;a++)i.push(z({color:n[a%n.length],categoryField:e.dateField,visibleInLegend:!1,tooltip:{visible:!1}},s,r[a],{axis:$l,categoryAxis:$l,autoBind:e.autoBindElements}))},rc),It=((tc=Ll)&&(ic.__proto__=tc),((ic.prototype=Object.create(tc&&tc.prototype)).constructor=ic).prototype.applyDefaults=function(t,e){var o=dt(this.element).width||600,e=e,o={seriesDefaults:{categoryField:t.dateField},axisDefaults:{categoryAxis:{name:"default",majorGridLines:{visible:!1},labels:{step:2},majorTicks:{visible:!1},maxDateGroups:Math.floor(o/28)}}},e=e&&z({},e,o);oc.setup(t,e),tc.prototype.applyDefaults.call(this,t,e)},ic.prototype._setElementClass=function(t){_(t,"k-chart k-stockchart")},ic.prototype.setOptions=function(t){this.destroyNavigator(),tc.prototype.setOptions.call(this,t)},ic.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this.options.transitions=!1,this._fullRedraw(),this.options.transitions=t},ic.prototype._resize=function(){this.noTransitionsRedraw()},ic.prototype._redraw=function(){var t=this.navigator;!this._dirty()&&t&&t.options.partialRedraw?t.redrawSlaves():this._fullRedraw()},ic.prototype._dirty=function(){var t=this.options,e=Z([].concat(t.series,t.navigator.series),function(t){return t&&t.visible}).length,t=this._seriesCount!==e;return this._seriesCount=e,t},ic.prototype._fullRedraw=function(){var t=this.navigator;t||(t=this.navigator=new oc(this),this.trigger("navigatorCreated",{navigator:t})),t.clean(),t.setRange(),tc.prototype._redraw.call(this),t.initSelection()},ic.prototype._trackSharedTooltip=function(t){var e=this._plotArea.paneByPoint(t);e&&e.options.name===Kl?this._unsetActivePoint():tc.prototype._trackSharedTooltip.call(this,t)},ic.prototype.bindCategories=function(){tc.prototype.bindCategories.call(this),this.copyNavigatorCategories()},ic.prototype.copyNavigatorCategories=function(){for(var t,e=[].concat(this.options.categoryAxis),o=0;o<e.length;o++){var i=e[o];i.name===$l?t=i.categories:t&&i.pane===Kl&&(i.categories=t)}},ic.prototype.destroyNavigator=function(){this.navigator&&(this.navigator.destroy(),this.navigator=null)},ic.prototype.destroy=function(){this.destroyNavigator(),tc.prototype.destroy.call(this)},ic.prototype._stopChartHandlers=function(t){var e=this._eventCoordinates(t),e=this._plotArea.paneByPoint(e);return tc.prototype._stopChartHandlers.call(this,t)||e&&e.options.name===Kl},ic.prototype._toggleDragZoomEvents=function(){this._dragZoomEnabled||(this.element.style.touchAction="none",this._dragZoomEnabled=!0)},ic);function ic(){tc.apply(this,arguments)}function rc(t){ec.call(this),this.chart=t;var e=this.options=z({},this.options,t.options.navigator),o=e.select;o&&(o.from=this.parseDate(o.from),o.to=this.parseDate(o.to)),lt(e.hint.visible)||(e.hint.visible=e.visible),this.chartObserver=new ot(this,((e={})[vr]="_drag",e[mr]="_dragEnd",e[xr]="_zoom",e[_r]="_zoomEnd",e)),t.addObserver(this.chartObserver)}kt(It,{dateField:"date",axisDefaults:{categoryAxis:{type:"date",baseUnit:"fit",justified:!0},valueAxis:{narrowRange:!0,labels:{format:"C"}}},navigator:{select:{},seriesDefaults:{markers:{visible:!1},tooltip:{visible:!0},line:{width:2}},hint:{},visible:!0},tooltip:{visible:!0},legend:{visible:!1}});var nc=It,sc=Math.PI/180;function ac(t,e){var o=t.getOrigin(),i=t.getSize(),e=U(e);return t.setOrigin([o.x-e.left,o.y-e.top]),t.setSize([i.width+(e.left+e.right),i.height+(e.top+e.bottom)]),t}var hc=P.drawing.Group,pc=P.drawing.Path,lc=P.drawing.Text;function cc(t,e){var o=t.box,i=t.children[0].box,r=e.border||{},n=e.background||"",o=pc.fromRect(new P.geometry.Rect([o.x1,o.y1],[o.width(),o.height()]),{stroke:{}}),i=new lc(t.text,new P.geometry.Point(i.x1,i.y1),{font:e.font,fill:{color:e.color}}),e=ac(i.bbox().clone(),e.padding),r=pc.fromRect(e,{stroke:{color:r.width?r.color:"",width:r.width,opacity:r.opacity,dashType:r.dashType,lineJoin:"round",lineCap:"round"},fill:{color:n}}),n=new hc;return n.append(o),n.append(r),n.append(i),n}function uc(t,e,o){var i=lt(t.from)?t.from:c,r=lt(t.to)?t.to:l;return t.from=Math.max(Math.min(r,i),e),t.to=Math.min(Math.max(r,i),o),t}function dc(t,e){e=U(e);return e.left=-e.left,e.top=-e.top,e.right=-e.right,e.bottom=-e.bottom,ac(t,e)}var fc,gc=P.drawing.Path,yc=P.drawing.Surface,Se=((fc=P.Class)&&(vc.__proto__=fc),((vc.prototype=Object.create(fc&&fc.prototype)).constructor=vc).prototype.destroy=function(){this.surface&&(this.surface.destroy(),this.surface=null),delete this.element,delete this.surfaceElement},vc.prototype.value=function(t){var e=this.pointers[0];if(0===arguments.length)return e.value();e.value(t),this._setValueOptions(t)},vc.prototype._draw=function(){var t=this.surface;t.clear(),t.draw(this._visuals)},vc.prototype.exportVisual=function(){return this._visuals},vc.prototype.allValues=function(t){var e=this.pointers,o=[];if(0===arguments.length){for(var i=0;i<e.length;i++)o.push(e[i].value());return o}if(x(t))for(var r=0;r<t.length;r++)O(t[r])&&e[r].value(t[r]);this._setValueOptions(t)},vc.prototype._setValueOptions=function(t){for(var e=[].concat(this.options.pointer),o=[].concat(t),i=0;i<o.length;i++)e[i].value=o[i]},vc.prototype.resize=function(){this.noTransitionsRedraw()},vc.prototype.noTransitionsRedraw=function(){var t=this.options.transitions;this._toggleTransitions(!1),this.redraw(),this._toggleTransitions(t)},vc.prototype.redraw=function(){var t=this._surfaceSize(),t=new P.geometry.Rect([0,0],[t.width,t.height]);this._initSurface(),this.gaugeArea=this._createGaugeArea(),this._createModel();t=dc(t.bbox(),this._gaugeAreaMargin);this.reflow(t)},vc.prototype.setOptions=function(t,e){this._originalOptions=z(this._originalOptions,t),this.options=z({},this._originalOptions),this._initTheme(e),this.redraw()},vc.prototype.setDirection=function(t){this.contextService.rtl=Boolean(t),this.surface&&"svg"===this.surface.type&&(this.surface.destroy(),this.surface=null)},vc.prototype.setIntlService=function(t){this.contextService.intl=t},vc.prototype._initTheme=function(t){var e=t||this.theme||{};this.theme=e,this.options=z({},e,this.options);var t=this.options,o=t.pointer;if(x(o)){for(var i=[],r=0;r<o.length;r++)i.push(z({},e.pointer,o[r]));t.pointer=i}},vc.prototype._createGaugeArea=function(){var t=this.options.gaugeArea,e=this.surface.size(),o=t.border||{},e=new P.geometry.Rect([0,0],[e.width,e.height]);return this._gaugeAreaMargin=t.margin||5,0<o.width&&(e=dc(e,o.width)),gc.fromRect(e,{stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType,lineJoin:"round",lineCap:"round"},fill:{color:t.background}})},vc.prototype._initSurface=function(){var t=this.options,e=this.surface,o=this._surfaceElement(),i=this._surfaceSize();dt(o,i),e&&e.options.type===t.renderAs?(this.surface.clear(),this.surface.resize()):(e&&e.destroy(),this.surface=yc.create(o,{type:t.renderAs}))},vc.prototype._surfaceSize=function(){var t=this.options,e=this._getSize();return t.gaugeArea&&z(e,t.gaugeArea),e},vc.prototype._surfaceElement=function(){return this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.element.appendChild(this.surfaceElement)),this.surfaceElement},vc.prototype.getSize=function(){return this._getSize()},vc.prototype._getSize=function(){var t=this.element,e=this._defaultSize(),o=t.offsetWidth,t=t.offsetHeight;return{width:o=o||e.width,height:t=t||e.height}},vc.prototype._defaultSize=function(){return{width:200,height:200}},vc.prototype._toggleTransitions=function(t){this.options.transitions=t;for(var e=0;e<this.pointers.length;e++)this.pointers[e].options.animation.transitions=t},vc);function vc(t,e,o,i){void 0===i&&(i={}),fc.call(this),this.element=t,this.theme=o,this.contextService=new ao(this,i),this._originalOptions=z({},this.options,e),this.options=z({},this._originalOptions),this._initTheme(o),this.redraw()}kt(Se,{plotArea:{},theme:"default",renderAs:"",pointer:{},scale:{},gaugeArea:{}});var mc=Se,xc=P.drawing.Path,_c=P.drawing.Group,bc=P.geometry.Point;function wc(t,e,o,i){var r,n,s,a,h,p=e.length;if(i.visible)for(var l=o.mirror,c=o.lineBox,u=i.skip;u<p;u+=i.step)u%i.skipUnit!=0&&(o.tickX=l?c.x2:c.x2-i.size,o.tickY=l?c.y1-i.size:c.y1,o.position=e[u],t.append((r=i,a=s=n=void 0,h=void 0,s=o.position,a=o.tickX,h=o.tickY,h=o.vertical?(n=new bc(a,s),new bc(a+r.size,s)):(n=new bc(s,h),new bc(s,h+r.size)),new xc({stroke:{color:r.color,width:r.width}}).moveTo(n).lineTo(h))))}var Cc,Ve=((Cc=yi)&&(Sc.__proto__=Cc),((Sc.prototype=Object.create(Cc&&Cc.prototype)).constructor=Sc).prototype.initUserOptions=function(t){t=z({},this.options,t);return(t=z({},t,{labels:{mirror:t.mirror}})).majorUnit=t.majorUnit||Ut(t.min,t.max),t},Sc.prototype.initFields=function(){},Sc.prototype.render=function(){var t=this.elements=new _c,e=this.renderLabels(),o=this.renderLine(),i=this.renderTicks(),r=this.renderRanges();return t.append(o,e,i,r),t},Sc.prototype.renderRanges=function(){for(var t=this.options,e=t.min,o=t.max,i=t.vertical,r=t.labels.mirror,n=t.ranges||[],s=new _c,a=n.length,h=t.rangeSize||t.minorTicks.size/2,p=0;p<a;p++){var l=uc(n[p],e,o),c=this.getSlot(l.from,l.to),u=i?this.lineBox():c,c=i?c:this.lineBox();i?u.x1-=h*(r?-1:1):c.y2+=h*(r?-1:1),s.append(xc.fromRect(new P.geometry.Rect([u.x1,c.y1],[u.x2-u.x1,c.y2-c.y1]),{fill:{color:l.color,opacity:l.opacity},stroke:{}}))}return s},Sc.prototype.renderLabels=function(){for(var t=this.labels,e=this.options,o=new _c,i=0;i<t.length;i++)o.append(cc(t[i],e.labels));return o},Sc.prototype.renderLine=function(){var t=this.options.line,e=this.lineBox(),o=new _c;return 0<t.width&&t.visible&&((t=new xc({stroke:{color:t.color,dashType:t.dashType,width:t.width}})).moveTo(e.x1,e.y1).lineTo(e.x2,e.y2),o.append(t)),o},Sc.prototype.renderTicks=function(){var t=new _c,e=this.options,o=e.majorTicks.visible?e.majorUnit:0,i={vertical:e.vertical,mirror:e.labels.mirror,lineBox:this.lineBox()};return wc(t,this.getMajorTickPositions(),i,e.majorTicks),wc(t,this.getMinorTickPositions(),i,z({},{skipUnit:o/e.minorUnit},e.minorTicks)),t},Sc);function Sc(t,e){t=t||{};!lt(t.reverse)&&!1===t.vertical&&(e||{}).rtl&&(t=Object.assign({},t,{reverse:!0})),Cc.call(this,0,1,t,e),this.options.minorUnit=this.options.minorUnit||this.options.majorUnit/10}kt(Ve,{min:0,max:50,majorTicks:{size:15,align:"inside",color:r,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:r,width:.5,visible:!0},line:{width:.5},labels:{position:"inside",padding:2},mirror:!1,_alignLines:!1});var kc,Ac=Ve,ro=((kc=P.Class)&&(Pc.__proto__=kc),((Pc.prototype=Object.create(kc&&kc.prototype)).constructor=Pc).prototype.value=function(t){var e=this.options,o=e.value;if(0===arguments.length)return o;var i=this.scale.options,o=i.min,i=i.max;e._oldValue=lt(e._oldValue)?e.value:o,e.value=mt(t,o,i),this.elements&&this.repaint()},Pc);function Pc(t,e){kc.call(this);var o=t.options,i=o.min,o=o.max,e=this.options=z({},this.options,e);e.fill=e.color,this.scale=t,lt(e.value)?e.value=mt(e.value,i,o):e.value=i}kt(ro,{color:r});var Tc,Xe=ro,Ke=((Tc=Xe)&&(Mc.__proto__=Tc),((Mc.prototype=Object.create(Tc&&Tc.prototype)).constructor=Mc).prototype.reflow=function(){var t,e,o,i=this.options,r=this.scale,n=r.options,s=n.mirror,a=n.vertical,h=r.lineBox(),p=i.track.size||i.size,n=i.size/2,r=U(i.margin),r=a?r[s?"left":"right"]:r[s?"bottom":"top"],r=s?-r:r;a?(o=new qt(h.x1+r,h.y1,h.x1+r,h.y2),s?o.x1-=p:o.x2+=p,"barPointer"!==i.shape&&(t=e=new qt(h.x2+r,h.y1-n,h.x2+r,h.y2+n))):(o=new qt(h.x1,h.y1-r,h.x2,h.y1-r),s?o.y2+=p:o.y1-=p,"barPointer"!==i.shape&&(t=e=new qt(h.x1-n,h.y1-r,h.x2+n,h.y1-r))),this.trackBox=o,this.pointerRangeBox=e,this.box=t||o.clone().pad(i.border.width)},Mc.prototype.getElementOptions=function(){var t=this.options;return{fill:{color:t.color,opacity:t.opacity},stroke:lt(t.border)?{color:t.border.width?t.border.color||t.color:"",width:t.border.width,dashType:t.border.dashType,opacity:t.opacity}:null}},Mc.prototype._margin=function(){var t=this.scale,e=this.options,o=t.options,t=o.mirror,o=o.vertical,e=U(e.margin);return o?e[t?"left":"right"]:e[t?"bottom":"top"]},Mc);function Mc(t,e){Tc.call(this,t,e),this.options=z({track:{visible:lt(e.track)}},this.options)}kt(Ke,{shape:"barPointer",track:{border:{width:1}},color:r,border:{width:1},opacity:1,margin:U(3),animation:{type:"barPointer"},visible:!0});var Oc,Bc=Ke,uo=((Oc=P.drawing.Animation)&&(Rc.__proto__=Oc),((Rc.prototype=Object.create(Oc&&Oc.prototype)).constructor=Rc).prototype.setup=function(){var t=this.options,e=t.margin,o=t.from,i=t.to,r=t.vertical,n=r?"x1":"y1";t.mirror===r?(o[n]-=e,i[n]-=e):(o[n]+=e,i[n]+=e);o=this.fromScale=new P.geometry.Point(o.x1,o.y1),i=this.toScale=new P.geometry.Point(i.x1,i.y1);0!==t.duration&&(t.duration=Math.max(o.distanceTo(i)/t.duration*1e3,1))},Rc.prototype.step=function(t){var e=tt(this.fromScale.x,this.toScale.x,t),t=tt(this.fromScale.y,this.toScale.y,t);this.element.transform(P.geometry.transform().translate(e,t))},Rc);function Rc(){Oc.apply(this,arguments)}kt(uo,{easing:"linear",duration:250}),P.drawing.AnimationFactory.current.register("arrowPointer",uo);var Ec,Lc,Ic=uo,zc=P.geometry.Point,Vc=P.drawing.Path,jc=((Lc=Bc)&&(Hc.__proto__=Lc),((Hc.prototype=Object.create(Lc&&Lc.prototype)).constructor=Hc).prototype.pointerShape=function(){var t=this.scale,e=this.options.size,o=e/2,i=t.options.mirror?-1:1;return t.options.vertical?[new zc(0,0-o),new zc(0-i*e,0),new zc(0,0+o)]:[new zc(0-o,0),new zc(0,0+i*e),new zc(0+o,0)]},Hc.prototype.repaint=function(){var t=this.scale,e=this.options,t=new Ic(this.elements,z(e.animation,{vertical:t.options.vertical,mirror:t.options.mirror,margin:this._margin(e.margin),from:t.getSlot(e._oldValue),to:t.getSlot(e.value)}));!1===e.animation.transitions&&(t.options.duration=0),t.setup(),t.play()},Hc.prototype.render=function(){var t=this.scale,e=this.options,o=this.getElementOptions(),i=this.pointerShape(e.value);e.animation.type="arrowPointer";i=new Vc({stroke:o.stroke,fill:o.fill}).moveTo(i[0]).lineTo(i[1]).lineTo(i[2]).close(),e=t.getSlot(e.value);return i.transform(P.geometry.transform().translate(e.x1,e.y1)),this.elements=i},Hc),Fe=((Ec=P.drawing.Animation)&&(Dc.__proto__=Ec),((Dc.prototype=Object.create(Ec&&Ec.prototype)).constructor=Dc).prototype.setup=function(){var t=this.options,e=this.axis=t.vertical?m:v,o=this.to=t.newPoints[0][e],e=this.from=t.oldPoints[0][e];0!==t.duration&&(t.duration=Math.max(Math.abs(o-e)/t.speed*1e3,1)),this._set(e)},Dc.prototype.step=function(t){t=tt(this.from,this.to,t);this._set(t)},Dc.prototype._set=function(t){var e="set"+this.axis.toUpperCase(),o=this.options.newPoints;o[0][e](t),o[1][e](t)},Dc);function Dc(){Ec.apply(this,arguments)}function Hc(t,e){Lc.call(this,t,e),lt(this.options.size)||(this.options.size=.6*this.scale.options.majorTicks.size)}kt(Fe,{easing:"linear",speed:250}),P.drawing.AnimationFactory.current.register("barPointer",Fe);var Uc,Fc,Nc=Fe,Gc=P.drawing.Group,Wc=P.drawing.Path,Xc=((Fc=Bc)&&(Zc.__proto__=Fc),((Zc.prototype=Object.create(Fc&&Fc.prototype)).constructor=Zc).prototype.pointerShape=function(t){var e=this.scale,o=this.options,i=e.options,r=i.mirror,n=i.vertical,s=r===n?-1:1,a=o.size*s,i=e.getSlot(e.options.min),r=e.getSlot(t),o=n?m:v,e=n?v:m,t=this._margin()*s,s=new P.geometry.Point;s[o]=i[o+"1"],s[e]=i[e+"1"];i=new P.geometry.Point;i[o]=r[o+"1"],i[e]=r[e+"1"],n?(s.translate(t,0),i.translate(t,0)):(s.translate(0,t),i.translate(0,t));e=i.clone(),t=s.clone();return n?(e.translate(a,0),t.translate(a,0)):(e.translate(0,a),t.translate(0,a)),[s,i,e,t]},Zc.prototype.repaint=function(){var t=this.scale,e=this.options,o=this.pointerShape(e.value),i=this.pointerPath,r=this.pointerShape(e._oldValue);i.moveTo(o[0]).lineTo(o[1]).lineTo(o[2]).lineTo(o[3]).close();o=new Nc(i,z(e.animation,{reverse:t.options.reverse,vertical:t.options.vertical,oldPoints:[r[1],r[2]],newPoints:[o[1],o[2]]}));!1===e.animation.transitions&&(o.options.duration=0),o.setup(),o.play()},Zc.prototype.render=function(){var t=new Gc,e=this.getElementOptions();this.options.track.visible&&t.append(this.renderTrack());e=this.pointerPath=new Wc({stroke:e.stroke,fill:e.fill});return t.append(e),this.elements=t},Zc.prototype.renderTrack=function(){var t=this.options.track,e=t.border||{},o=this.trackBox.clone().pad(e.width||0);return new Wc.fromRect(o.toRect(),{fill:{color:t.color,opacity:t.opacity},stroke:{color:e.width?e.color||t.color:"",width:e.width,dashType:e.dashType}})},Zc),qc=P.drawing.Group,ee=((Uc=mc)&&(Yc.__proto__=Uc),((Yc.prototype=Object.create(Uc&&Uc.prototype)).constructor=Yc).prototype.reflow=function(t){var e=this.pointers,o=t.origin.x,i=t.origin.y,t=new qt(o,i,o+t.width(),i+t.height());this.scale.reflow(t),this._shrinkScaleWidth(t);for(var r=0;r<e.length;r++)e[r].reflow();this.bbox=this._getBox(t),this._alignElements(),this._shrinkElements(),this._buildVisual(),this._draw()},Yc.prototype._buildVisual=function(){var t=new qc,e=this.scale.render(),o=this.pointers;t.append(this.gaugeArea),t.append(e);for(var i=0;i<o.length;i++){var r=o[i];t.append(r.render()),r.value(r.options.value)}this._visuals=t},Yc.prototype._createModel=function(){var t=this.options,e=this.scale=new Ac(t.scale,this.contextService);this.pointers=[];for(var o=x(o=t.pointer)?o:[o],i=0;i<o.length;i++){var r=z({},o[i],{animation:{transitions:t.transitions}}),n="arrow"===r.shape?jc:Xc;this.pointers.push(new n(e,r))}},Yc.prototype._defaultSize=function(){var t=this.options.scale.vertical;return{width:t?60:200,height:t?200:60}},Yc.prototype._getBox=function(t){for(var e,o=this.scale,i=this.pointers,r=t.center(),n=i[0].box.clone().wrap(o.box),s=0;s<i.length;s++)n.wrap(i[s].box.clone());return n=o.options.vertical?(e=n.width()/2,new qt(r.x-e,t.y1,r.x+e,t.y2)):(e=n.height()/2,new qt(t.x1,r.y-e,t.x2,r.y+e))},Yc.prototype._alignElements=function(){for(var t,e=this.scale,o=this.pointers,i=e.box,r=o[0].box.clone().wrap(e.box),n=this.bbox,s=0;s<o.length;s++)r.wrap(o[s].box.clone());e.options.vertical?(t=n.center().x-r.center().x,e.reflow(new qt(i.x1+t,n.y1,i.x2+t,n.y2))):(t=n.center().y-r.center().y,e.reflow(new qt(i.x1,i.y1+t,i.x2,i.y2+t)));for(var a=0;a<o.length;a++)o[a].reflow(this.bbox)},Yc.prototype._shrinkScaleWidth=function(t){var e,o=this.scale;o.options.vertical||0<(e=o.contentBox().width()-t.width())&&(o.box.shrink(e,0),o.box.alignTo(t,"center"),o.reflow(o.box))},Yc.prototype._shrinkElements=function(){for(var t=this.scale,e=this.pointers,o=t.box.clone(),i=t.options.vertical?"y":"x",r=e[0].box,n=0;n<e.length;n++)r.wrap(e[n].box.clone());o[i+1]+=Math.max(o[i+1]-r[i+1],0),o[i+2]-=Math.max(r[i+2]-o[i+2],0),t.reflow(o);for(var s=0;s<e.length;s++)e[s].reflow(this.bbox)},Yc);function Yc(){Uc.apply(this,arguments)}function Zc(t,e){Fc.call(this,t,e),lt(this.options.size)||(this.options.size=.3*this.scale.options.majorTicks.size)}kt(ee,{transitions:!0,gaugeArea:{background:""},scale:{vertical:!0}});var Qc=ee,Kc=P.drawing.Arc,$c=P.drawing.Path,Jc=P.drawing.Group;function tu(t,e,o,i){var r=new Jc,n=t.center,s=t.getRadiusX();if(i.visible)for(var a=0;a<e.length;a++){var h=t.pointAt(e[a]),p=new P.geometry.Point(n.x+s-i.size,n.y).rotate(e[a],n);r.append(new $c({stroke:{color:i.color,width:i.width}}).moveTo(h).lineTo(p))}return r}function eu(t,e,o,i){return{from:t,to:e,color:o,opacity:i}}var ou,ce=((ou=yi)&&(iu.__proto__=ou),((iu.prototype=Object.create(ou&&ou.prototype)).constructor=iu).prototype.initUserOptions=function(t){t=z({},this.options,t);return t.majorUnit=t.majorUnit||Ut(t.min,t.max),t.minorUnit=t.minorUnit||t.majorUnit/10,t},iu.prototype.initFields=function(){},iu.prototype.render=function(t,e){e=this.renderArc(t,e);this.bbox=e.bbox(),this.labelElements=this.renderLabels(),this.ticks=this.renderTicks(),this.ranges=this.renderRanges()},iu.prototype.reflow=function(t){var e=t.center(),t=Math.min(t.height(),t.width())/2;if(!lt(this.bbox))return this.render(e,t);this.bbox=this.arc.bbox(),this.radius(this.arc.getRadiusX()),this.repositionRanges(),this.renderLabels()},iu.prototype.slotAngle=function(t){var e=this.options,o=e.min,i=e.max,r=e.reverse,n=e.startAngle,s=e.endAngle,e=s-n;return(r?s-(t-o)/(i-o)*e:(t-o)/(i-o)*e+n)+180},iu.prototype.hasRanges=function(){var t=this.options.ranges;return t&&t.length},iu.prototype.ticksSize=function(){var t=this.options,e=t.majorTicks,o=t.minorTicks,t=0;return e.visible&&(t=e.size),t=o.visible?Math.max(o.size,t):t},iu.prototype.labelsCount=function(){var t=ou.prototype.labelsCount.call(this),e=this.options;return 360<=e.endAngle-e.startAngle&&e.max%e.majorUnit==0&&--t,t},iu.prototype.renderLabels=function(){var t=this.options,e=this.arc.clone(),o=e.getRadiusX(),i=this.tickAngles(e,t.majorUnit),r=t.rangeSize=t.rangeSize||.1*o,n=new Jc,s=.05*o;lt(t.rangeDistance)?s=t.rangeDistance:t.rangeDistance=s;var a=t.labels,h="inside"===a.position,p=lt(this.labelElements);h&&(o-=this.ticksSize(),this.hasRanges()&&!p&&(o-=r+s),e.setRadiusX(o).setRadiusY(o));for(var l=this.labels,c=l.length,a=U(a.padding),u=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=0;f<c;f++){var g=l[f],y=g.box.width()/2,v=g.box.height()/2,m=i[f],x=(m-180)*sc,_=e.pointAt(m),m=_.x+Math.cos(x)*(y+u)*(h?1:-1),x=_.y+Math.sin(x)*(v+d)*(h?1:-1);g.reflow(new qt(m-y,x-v,m+y,x+v));m=new P.geometry.Point(g.box.x1,g.box.y1),y=void 0;p?(x=(y=this.labelElements.children[f]).bbox().origin,(v=y.transform()||P.geometry.transform()).translate(m.x-x.x,m.y-x.y),y.transform(v)):(y=cc(g,t.labels),n.append(y)),this.bbox=P.geometry.Rect.union(this.bbox,y.bbox())}return n},iu.prototype.repositionRanges=function(){var t=this.ranges.children;if(0<t.length){var e=this.options,o=e.rangeDistance,i=e.rangeSize,e=this.getRangeRadius();"inside"===this.options.labels.position&&(e+=i+o);for(var r=e+i/2,n=0;n<t.length;n++)t[n]._geometry.setRadiusX(r).setRadiusY(r);this.bbox=P.geometry.Rect.union(this.bbox,this.ranges.bbox())}},iu.prototype.renderRanges=function(){var t=this.rangeSegments(),e=t.length,o=new Jc;if(e){var i=this.options,r=i.rangeSize,n=i.reverse,i=i.rangeDistance,s=this.getRangeRadius();this.radius(this.radius()-r-i);for(var a=0;a<e;a++){var h=t[a],p=this.slotAngle(h[n?"to":"from"]),l=this.slotAngle(h[n?"from":"to"]);l-p!=0&&o.append(this.createRange(p,l,s,h))}}return o},iu.prototype.createRange=function(t,e,o,i){var r=this.options.rangeSize,e=new P.geometry.Arc(this.arc.center,{radiusX:o+r/2,radiusY:o+r/2,startAngle:t,endAngle:e});return new Kc(e,{stroke:{width:r,color:i.color,opacity:i.opacity,lineCap:i.lineCap}})},iu.prototype.rangeSegments=function(){var t=this.options,e=t.ranges||[],o=e.length,i=[];if(o){var r=t.min,n=t.max,s=t.rangePlaceholderColor;i.push(eu(r,n,s));for(var a=0;a<o;a++)for(var h=uc(e[a],r,n),p=i.length,l=0;l<p;l++){var c=i[l];if(c.from<=h.from&&h.from<=c.to){i.push(eu(h.from,h.to,h.color,h.opacity)),c.from<=h.to&&h.to<=c.to&&i.push(eu(h.to,c.to,s,h.opacity)),c.to=h.from;break}}}return i},iu.prototype.getRangeRadius=function(){var t=this.arc,e=this.options,o=e.rangeSize,i=e.rangeDistance,r=e.majorTicks.size;return"outside"===e.labels.position?t.getRadiusX()-r-i-o:t.getRadiusX()-o},iu.prototype.renderArc=function(t,e){var o=this.options;return this.arc=new P.geometry.Arc(t,{radiusX:e,radiusY:e,startAngle:o.startAngle+180,endAngle:o.endAngle+180})},iu.prototype.renderTicks=function(){var t=this.arc,e=this.options,o=t.clone();this.majorTickAngles=this.tickAngles(t,e.majorUnit),this.majorTicks=tu(o,this.majorTickAngles,e.majorUnit,e.majorTicks);var i=new Jc;i.append(this.majorTicks);var r,n=e.majorTicks.size,s=e.minorTicks.size;return this._tickDifference=n-s,"outside"===e.labels.position&&(r=o.getRadiusX(),o.setRadiusX(r-n+s).setRadiusY(r-n+s)),this.minorTickAngles=this.normalizeTickAngles(this.tickAngles(t,e.minorUnit)),this.minorTicks=tu(o,this.minorTickAngles,e.minorUnit,e.minorTicks),i.append(this.minorTicks),i},iu.prototype.normalizeTickAngles=function(t){for(var e=this.options,o=e.majorUnit/e.minorUnit,i=t.length-1;0<=i;i--)i%o==0&&t.splice(i,1);return t},iu.prototype.tickAngles=function(t,e){var o=this.options,i=o.reverse,r=o.max-o.min,n=t.endAngle-t.startAngle,s=r/e,a=t.startAngle,h=n/s;i&&(a+=n,h=-h),360<=n&&o.max%e==0&&--s;for(var p=[],l=0;l<s;l++)p.push(bt(a,3)),a+=h;return bt(a)<=t.endAngle&&p.push(a),p},iu.prototype.radius=function(t){if(!t)return this.arc.getRadiusX();this.arc.setRadiusX(t).setRadiusY(t),this.repositionTicks(this.majorTicks.children,this.majorTickAngles),this.repositionTicks(this.minorTicks.children,this.minorTickAngles,!0)},iu.prototype.repositionTicks=function(t,e,o){var i=o&&this._tickDifference||0,r=this.arc,n=r.getRadiusX();o&&"outside"===this.options.labels.position&&0!==i&&(r=this.arc.clone()).setRadiusX(n-i).setRadiusY(n-i);for(var s=0;s<t.length;s++){var a=r.pointAt(e[s]),h=t[s].segments,p=a.x-h[0].anchor().x,h=a.y-h[0].anchor().y;t[s].transform((new P.geometry.transform).translate(p,h))}},iu);function iu(t,e){ou.call(this,0,1,t,e)}kt(ce,{min:0,max:100,majorTicks:{size:15,align:"inside",color:r,width:.5,visible:!0},minorTicks:{size:10,align:"inside",color:r,width:.5,visible:!0},startAngle:-30,endAngle:210,labels:{position:"inside",padding:2}});var ru,nu=ce,at=((ru=P.drawing.Animation)&&(su.__proto__=ru),((su.prototype=Object.create(ru&&ru.prototype)).constructor=su).prototype.step=function(t){var e=this.options,t=tt(e.oldAngle,e.newAngle,t);this.element.transform(P.geometry.transform().rotate(t,e.center))},su);function su(t,e){ru.call(this,t,e);e=this.options;e.duration=Math.max(Math.abs(e.newAngle-e.oldAngle)/e.duration*1e3,1)}kt(at,{easing:"linear",duration:150}),P.drawing.AnimationFactory.current.register("radialPointer",at);var au,hu=at,pu=P.drawing.Circle,lu=P.drawing.Group,cu=P.drawing.Path,_e=((au=Xe)&&(uu.__proto__=au),((uu.prototype=Object.create(au&&au.prototype)).constructor=uu).prototype.setAngle=function(t){this.elements.transform(P.geometry.transform().rotate(t,this.center))},uu.prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);!1===e.animation.transitions?this.setAngle(t):new hu(this.elements,z(e.animation,{oldAngle:o,newAngle:t})).play()},uu.prototype.render=function(){var t=this.scale,e=this.options,o=new lu;return!1!==e.animation&&z(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),o.append(this._renderNeedle(),this._renderCap()),this.elements=o,this.setAngle(sc),o},uu.prototype.reflow=function(t){var e=this.center=t.center,o=mt(this.options.length||1,.1,1.5),o=this.radius=t.getRadiusX()*o,o=this.capSize=Math.round(o*this.options.cap.size);this.bbox=P.geometry.Rect.fromPoints(new P.geometry.Point(e.x-o,e.y-o),new P.geometry.Point(e.x+o,e.y+o))},uu.prototype._renderNeedle=function(){var t=this.scale.options.minorTicks.size,e=this.center,o=this.options.color,o=new cu({fill:{color:o},stroke:{color:o,width:.5}});return o.moveTo(e.x+this.radius-t,e.y).lineTo(e.x,e.y-this.capSize/2).lineTo(e.x,e.y+this.capSize/2).close(),o},uu.prototype._renderCap=function(){var t=this.options,e=t.cap.color||t.color,t=new P.geometry.Circle(this.center,this.capSize);return new pu(t,{fill:{color:e},stroke:{color:e}})},uu);function uu(){au.apply(this,arguments)}kt(_e,{cap:{size:.05},arrow:{width:16,height:14},animation:{type:"radialPointer",duration:150}});var du,fu=_e,gu=P.drawing.Group,ae=((du=mc)&&(yu.__proto__=du),((yu.prototype=Object.create(du&&du.prototype)).constructor=yu).prototype.reflow=function(t){var e=this.pointers;this.scale.reflow(t),this._initialPlotArea=this.scale.bbox;for(var o=0;o<e.length;o++)e[o].reflow(this.scale.arc),this._initialPlotArea=P.geometry.Rect.union(this._initialPlotArea,e[o].bbox);this.fitScale(t),this.alignScale(t),this._buildVisual(this.gaugeArea,e,this.scale),this._draw()},yu.prototype._buildVisual=function(t,e,o){var i=this._visuals=new gu;i.append(t),i.append(o.ticks),i.append(o.ranges),this._buildPointers(e),i.append(o.labelElements)},yu.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),this._visuals.append(o.elements),o.value(o.options.value)}},yu.prototype.fitScale=function(t){for(var e,o,i,r,n,s=this.scale.arc,a=this._initialPlotArea,a=Math.abs(this.getDiff(a,t)),h=bt(a,3),p=bt(-a,3),l=0,c=0;!(!(c++<100)||5<(l=n===i?l+1:0)||h!==r&&0<=(e=this.getPlotBox(h,t,s))&&e<=2||p!==r&&0<=(i=this.getPlotBox(p,t,s))&&i<=2||(r=0<e&&0<i?2*h:e<0&&i<0?2*p:bt((h+p)/2||1,3),0<=(o=this.getPlotBox(r,t,s))&&o<=2));)n=i,0<o?(p=r,i=o):(h=r,e=o)},yu.prototype.getPlotBox=function(t,e,o){var i=this.scale,r=this.pointers,n=o.getRadiusX(),s=o.clone();s.setRadiusX(n+t).setRadiusY(n+t),i.arc=s,i.reflow(e),this.plotBbox=i.bbox;for(var a=0;a<r.length;a++)r[a].reflow(s),this.plotBbox=P.geometry.Rect.union(this.plotBbox,r[a].bbox);return this.getDiff(this.plotBbox,e)},yu.prototype.getDiff=function(t,e){return Math.min(e.width()-t.width(),e.height()-t.height())},yu.prototype.alignScale=function(t){var e=this.plotBbox.center(),o=t.center(),i=e.x-o.x,o=e.y-o.y,r=this.scale,n=this.pointers;r.arc.center.x-=i,r.arc.center.y-=o,r.reflow(t);for(var s=0;s<n.length;s++)n[s].reflow(r.arc),this.plotBbox=P.geometry.Rect.union(r.bbox,n[s].bbox)},yu.prototype._createModel=function(){var t=this.options,e=t.pointer,o=this.scale=new nu(t.scale,this.contextService);this.pointers=[];for(var i=x(e)?e:[e],r=0;r<i.length;r++){var n=new fu(o,z({},i[r],{animation:{transitions:t.transitions}}));this.pointers.push(n)}},yu);function yu(){du.apply(this,arguments)}kt(ae,{transitions:!0,gaugeArea:{background:""}});var vu,mu=ae,Me=((vu=nu)&&(xu.__proto__=vu),((xu.prototype=Object.create(vu&&vu.prototype)).constructor=xu).prototype.rangeSegments=function(){var t=this.options;return[{from:t.min,to:t.max,color:t.rangePlaceholderColor,lineCap:t.rangeLineCap}]},xu.prototype.hasRanges=function(){return!0},xu.prototype.placeholderRangeAngle=function(t){var e=this.ranges.children[0].geometry();this.options.reverse?e.setEndAngle(t):e.setStartAngle(t)},xu.prototype.addRange=function(t,e,o){var i=this.options.reverse,r=this.slotAngle(i?e:t),e=this.slotAngle(i?t:e),o=this.createRange(r,e,this.getRangeRadius(),o);return this.ranges.append(o),o},xu);function xu(){vu.apply(this,arguments)}kt(Me,{min:0,max:100,majorTicks:{visible:!1},minorTicks:{visible:!1},labels:{visible:!1},startAngle:0,endAngle:180,rangeLineCap:"round"});var _u,bu=Me,Vt=((_u=P.drawing.Animation)&&(wu.__proto__=_u),((wu.prototype=Object.create(_u&&_u.prototype)).constructor=wu).prototype.step=function(t){var e=this.options,o=this.startColor,i=this.color,r=tt(e.oldAngle,e.newAngle,t);this.element.angle(r),i&&(e=bt(tt(o.r,i.r,t)),r=bt(tt(o.g,i.g,t)),t=bt(tt(o.b,i.b,t)),this.element.stroke(new P.Color(e,r,t).toHex()))},wu);function wu(t,e){_u.call(this,t,e);var o=this.options,e=Math.abs(o.newAngle-o.oldAngle)/o.duration*1e3;o.duration=mt(e,150,800);e=t.elements.options.get("stroke.color"),t=t.currentColor();e!==t&&(this.startColor=new P.Color(e),this.color=new P.Color(t))}kt(Vt,{easing:"linear",duration:150}),P.drawing.AnimationFactory.current.register("radialRangePointer",Vt);var Cu,Su=Vt,ge=((Cu=Xe)&&(ku.__proto__=Cu),((ku.prototype=Object.create(Cu&&Cu.prototype)).constructor=ku).prototype.repaint=function(){var t=this.scale,e=this.options,o=t.slotAngle(e._oldValue),t=t.slotAngle(e.value);this.animation&&this.animation.abort(),!1===e.animation.transitions?(this.angle(t),this.stroke(this.currentColor())):(this.animation=new Su(this,z(e.animation,{oldAngle:o,newAngle:t})),this.animation.play())},ku.prototype.angle=function(t){var e=this.elements.geometry();this.scale.options.reverse?e.setStartAngle(t):e.setEndAngle(t),this.scale.placeholderRangeAngle(t)},ku.prototype.stroke=function(t){this.elements.stroke(t)},ku.prototype.render=function(){var t,e;this.elements||(t=this.scale,!1!==(e=this.options).animation&&z(e.animation,{startAngle:0,center:t.arc.center,reverse:t.options.reverse}),this.elements=t.addRange(t.options.min,this.options.value,{color:this.currentColor(),opacity:e.opacity,lineCap:t.options.rangeLineCap}))},ku.prototype.currentColor=function(){var t=this.scale.options,e=t.min,o=t.max,i=this.options,r=i.colors,t=i.color,i=i.value,n=O(i)?i:e;if(r)for(var s=0;s<r.length;s++){var a=r[s],h=a.color,p=a.from;void 0===p&&(p=e);a=a.to;if(void 0===a&&(a=o),p<=n&&n<=a)return h}return t},ku.prototype.reflow=function(){this.render(),this.bbox=this.elements.bbox()},ku);function ku(){Cu.apply(this,arguments)}kt(ge,{animation:{type:"radialRangePointer",duration:150}});var Au,Pu,Tu,Mu=ge,Ou=((Tu=mu)&&(Lu.__proto__=Tu),((Lu.prototype=Object.create(Tu&&Tu.prototype)).constructor=Lu).prototype._initTheme=function(t){Tu.prototype._initTheme.call(this,t),this.options.color=this.options.color||(this.theme.pointer||{}).color},Lu.prototype._createModel=function(){var t=this.options,e=this.scale=new bu(t.scale,this.contextService),t=new Mu(e,z({},{colors:t.colors,color:t.color,value:t.value,opacity:t.opacity,animation:{transitions:t.transitions}}));this.pointers=[t]},Lu.prototype._buildPointers=function(t){for(var e=0;e<t.length;e++){var o=t[e];o.render(),o.value(o.options.value)}},Lu.prototype._setValueOptions=function(t){this.options.value=t},Lu.prototype.currentColor=function(){var t=this.pointers[0];if(t)return t.currentColor()},Lu.prototype.centerLabelPosition=function(t,e){var o,i=this.getSize(),r=this.scale.arc.center,n=r.x-t/2,r=r.y-e/2;return t<i.width&&(o=n+t,n=Math.max(n,0),o>i.width&&(n-=o-i.width)),e<i.height&&(i=(o=this.scale.bbox).bottomRight().y,e=r+e,r=Math.max(r,o.origin.y),i<e&&(r-=e-i)),{left:n,top:r}},Lu),Bu=((Pu=Ou)&&(Eu.__proto__=Pu),((Eu.prototype=Object.create(Pu&&Pu.prototype)).constructor=Eu).prototype._createModel=function(){var t=this.options.scale;"number"!=typeof t.startAngle&&(t.startAngle=90),t.endAngle=t.startAngle+360,Pu.prototype._createModel.call(this)},Eu),eo=((Au=P.Class)&&(Ru.__proto__=Au),((Ru.prototype=Object.create(Au&&Au.prototype)).constructor=Ru).prototype.initProperties=function(){},Ru.prototype.setOptions=function(t){this.options=Object.assign({},this.options,t),this.quietZoneLength=this.options.addQuietZone?2*this.options.quietZoneLength:0},Ru.prototype.encode=function(t,e,o){t=lt(t)?String(t):t;return this.initValue(t,e,o),this.options.addQuietZone&&this.addQuietZone(),this.addData(),this.options.addQuietZone&&this.addQuietZone(),{baseUnit:this.baseUnit,pattern:this.pattern}},Ru.prototype.initValue=function(){},Ru.prototype.addQuietZone=function(){this.pattern.push(this.options.quietZoneLength||10)},Ru.prototype.addData=function(){},Ru.prototype.invalidCharacterError=function(t){throw new Error('Character "'+t+'" is not valid for symbology '+this.name+".")},Ru);function Ru(t){Au.call(this),this.setOptions(t),this.initProperties()}function Eu(){Pu.apply(this,arguments)}function Lu(){Tu.apply(this,arguments)}kt(eo,{quietZoneLength:10,addQuietZone:!0,addCheckSum:!0});var Iu,zu=Object.assign,It=((Iu=eo)&&(Vu.__proto__=Iu),((Vu.prototype=Object.create(Iu&&Iu.prototype)).constructor=Vu).prototype.initProperties=function(){Iu.prototype.initProperties.call(this),zu(this,{name:"Code 11",characterMap:["111121","211121","121121","221111","112121","212111","122111","111221","211211","211111","112111"],cCheckSumTotal:10,kCheckSumTotal:9,kCheckSumMinLength:10,checkSumMod:11,DASH_VALUE:10,DASH:"-",START:"112211",STOP:"11221"})},Vu.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.width=e,this.totalUnits=0},Vu.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},Vu.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Vu.prototype.addCheckSum=function(){var t=this.value,e=t.length,o=this.getWeightedSum(t,e,this.cCheckSumTotal)%this.checkSumMod;this.checksum=String(o),this.addPattern(this.characterMap[o]),++e>=this.kCheckSumMinLength&&(e=(o+this.getWeightedSum(t,e,this.kCheckSumTotal))%this.checkSumMod,this.checksum+=e,this.addPattern(this.characterMap[e]))},Vu.prototype.getWeightedSum=function(t,e,o){for(var i=0,r=0;r<t.length;r++)i+=this.weightedValue(this.getValue(t.charAt(r)),e,r,o);return i},Vu.prototype.weightedValue=function(t,e,o,i){return((e-o)%i||i)*t},Vu.prototype.getValue=function(t){return isNaN(t)?(t!==this.DASH&&this.invalidCharacterError(t),this.DASH_VALUE):parseInt(t,10)},Vu.prototype.addCharacter=function(t){t=this.getValue(t),t=this.characterMap[t];this.addPattern(t)},Vu.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e),this.totalUnits+=e},Vu);function Vu(){Iu.apply(this,arguments)}kt(It,{addCheckSum:!0});var ju,Du,Hu=Object.assign,Se=((Du=eo)&&(Fu.__proto__=Du),((Fu.prototype=Object.create(Du&&Du.prototype)).constructor=Fu).prototype.initProperties=function(){Du.prototype.initProperties.call(this),Hu(this,{minBaseUnitLength:.7})},Fu.prototype.addData=function(){var t=this.value;this.addStart();for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.pushCheckSum(),this.addStop(),this.prepareValues()},Fu.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addBase(e)},Fu.prototype.addBase=function(){},Fu),Ve=((ju=Se)&&(Uu.__proto__=ju),((Uu.prototype=Object.create(ju&&ju.prototype)).constructor=Uu).prototype.initProperties=function(){ju.prototype.initProperties.call(this),Hu(this,{name:"Code 39",checkSumMod:43,minRatio:2.5,maxRatio:3,gapWidth:1,splitCharacter:"|",patternMappings:{b:"1|",w:"1|",B:"ratio|",W:"ratio|"},characterMap:{0:{pattern:"bwbWBwBwb",value:0},1:{pattern:"BwbWbwbwB",value:1},2:{pattern:"bwBWbwbwB",value:2},3:{pattern:"BwBWbwbwb",value:3},4:{pattern:"bwbWBwbwB",value:4},5:{pattern:"BwbWBwbwb",value:5},6:{pattern:"bwBWBwbwb",value:6},7:{pattern:"bwbWbwBwB",value:7},8:{pattern:"BwbWbwBwb",value:8},9:{pattern:"bwBWbwBwb",value:9},A:{pattern:"BwbwbWbwB",value:10},B:{pattern:"bwBwbWbwB",value:11},C:{pattern:"BwBwbWbwb",value:12},D:{pattern:"bwbwBWbwB",value:13},E:{pattern:"BwbwBWbwb",value:14},F:{pattern:"bwBwBWbwb",value:15},G:{pattern:"bwbwbWBwB",value:16},H:{pattern:"BwbwbWBwb",value:17},I:{pattern:"bwBwbWBwb",value:18},J:{pattern:"bwbwBWBwb",value:19},K:{pattern:"BwbwbwbWB",value:20},L:{pattern:"bwBwbwbWB",value:21},M:{pattern:"BwBwbwbWb",value:22},N:{pattern:"bwbwBwbWB",value:23},O:{pattern:"BwbwBwbWb",value:24},P:{pattern:"bwBwBwbWb",value:25},Q:{pattern:"bwbwbwBWB",value:26},R:{pattern:"BwbwbwBWb",value:27},S:{pattern:"bwBwbwBWb",value:28},T:{pattern:"bwbwBwBWb",value:29},U:{pattern:"BWbwbwbwB",value:30},V:{pattern:"bWBwbwbwB",value:31},W:{pattern:"BWBwbwbwb",value:32},X:{pattern:"bWbwBwbwB",value:33},Y:{pattern:"BWbwBwbwb",value:34},Z:{pattern:"bWBwBwbwb",value:35},"-":{pattern:"bWbwbwBwB",value:36},".":{pattern:"BWbwbwBwb",value:37}," ":{pattern:"bWBwbwBwb",value:38},$:{pattern:"bWbWbWbwb",value:39},"/":{pattern:"bWbWbwbWb",value:40},"+":{pattern:"bWbwbWbWb",value:41},"%":{pattern:"bwbWbWbWb",value:42},START:{pattern:"bWbwBwBwb"}}})},Uu.prototype.initValue=function(t,e,o){this.width=e,this.height=o,this.value=t,this.dataLength=t.length,this.pattern=[],this.patternString=""},Uu.prototype.prepareValues=function(){var t,e=this.minBaseUnitLength,o=this.minRatio,i=Math.ceil(Math.max(.15*this.width,24)),r=this.maxRatio;if(this.height<i)throw new Error("Insufficient height for Code39 encoding: the current height is "+this.height+"px and the minimum height is "+i+"px.");for(t=this.getBaseUnit(r);t<e&&o<r;)r=parseFloat((r-.1).toFixed(1)),t=this.getBaseUnit(r);if(t<e){i=Math.ceil(this.getBaseWidth(o)*e);throw new Error("Insufficient width for Code39 encoding: the current width is "+this.width+'px and the minimum width for value "'+this.value+'" is '+i+"px.")}this.ratio=r,this.baseUnit=t,this.patternString=this.patternString.substring(0,this.patternString.length-1),this.pattern=this.pattern.concat(this.patternString.replace(/ratio/g,r).split(this.splitCharacter))},Uu.prototype.getBaseUnit=function(t){return this.width/this.getBaseWidth(t)},Uu.prototype.getBaseWidth=function(t){return this.quietZoneLength+3*(t+2)*(this.dataLength+2)+this.gapWidth*(this.dataLength+1)},Uu.prototype.addStart=function(){this.addPattern(this.characterMap.START.pattern),this.addCharacterGap()},Uu.prototype.addBase=function(t){this.addPattern(t.pattern),this.addCharacterGap()},Uu.prototype.addStop=function(){this.addPattern(this.characterMap.START.pattern)},Uu.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.patternString+=this.patternMappings[t.charAt(e)]},Uu.prototype.addCharacterGap=function(){this.patternString+=this.gapWidth+this.splitCharacter},Uu);function Uu(){ju.apply(this,arguments)}function Fu(){Du.apply(this,arguments)}kt(Ve,{addCheckSum:!1});var Nu,Gu,Wu,Xu,qu,Yu,Zu,Qu,Ku,$u,Ju,td={addCharacter:function(t){this.characterMap[t]?this.addBase(this.characterMap[t]):127<t.charCodeAt(0)?this.invalidCharacterError(t):this.addExtended(t.charCodeAt(0))},addExtended:function(t){for(var e,o=0;o<this.extendedMappings.length;o++)if(e=this.extendedMappings[o].call(this,t)){for(var i=0;i<e.length;i++){var r=e[i];this.addBase(r)}return void(this.dataLength+=e.length-1)}},extendedMappings:[function(t){if(97<=t&&t<=122)return[this.characterMap[this.shiftCharacters[0]],this.characterMap[String.fromCharCode(t-32)]]},function(t){if(33<=t&&t<=58)return[this.characterMap[this.shiftCharacters[1]],this.characterMap[String.fromCharCode(t+32)]]},function(t){if(1<=t&&t<=26)return[this.characterMap[this.shiftCharacters[2]],this.characterMap[String.fromCharCode(t+64)]]},function(t){var e;if(this.specialAsciiCodes[t])for(var o=[],i=0;i<this.specialAsciiCodes[t].length;i++)o.push(this.characterMap[this.shiftCharacters[3]]),o.push(this.characterMap[this.specialAsciiCodes[t][i]]);else e=6*Math.floor(t/32)+(t-27)%32+64,o=[this.characterMap[this.shiftCharacters[3]],this.characterMap[String.fromCharCode(e)]];return o}],specialAsciiCodes:{0:["U"],64:["V"],96:["W"],127:["T","X","Y","Z"]},shiftValuesAsciiCodes:{39:36,40:47,41:43,42:37},characterMap:{"+":!1,"/":!1,$:!1,"%":!1},shiftCharacters:["SHIFT0","SHIFT1","SHIFT2","SHIFT3"]},ro=((Yu=Ve)&&(dd.__proto__=Yu),((dd.prototype=Object.create(Yu&&Yu.prototype)).constructor=dd).prototype.initProperties=function(){Yu.prototype.initProperties.call(this),z(this,td,{name:"Code 39 extended",characterMap:{SHIFT0:{pattern:"bWbwbWbWb",value:41},SHIFT1:{pattern:"bWbWbwbWb",value:40},SHIFT2:{pattern:"bWbWbWbwb",value:39},SHIFT3:{pattern:"bwbWbWbWb",value:42}}})},dd),ed=Object.assign,Ke=((qu=Se)&&(ud.__proto__=qu),((ud.prototype=Object.create(qu&&qu.prototype)).constructor=ud).prototype.initProperties=function(){qu.prototype.initProperties.call(this),ed(this,{name:"Code 93",cCheckSumTotal:20,kCheckSumTotal:15,checkSumMod:47,characterMap:{0:{pattern:"131112",value:0},1:{pattern:"111213",value:1},2:{pattern:"111312",value:2},3:{pattern:"111411",value:3},4:{pattern:"121113",value:4},5:{pattern:"121212",value:5},6:{pattern:"121311",value:6},7:{pattern:"111114",value:7},8:{pattern:"131211",value:8},9:{pattern:"141111",value:9},A:{pattern:"211113",value:10},B:{pattern:"211212",value:11},C:{pattern:"211311",value:12},D:{pattern:"221112",value:13},E:{pattern:"221211",value:14},F:{pattern:"231111",value:15},G:{pattern:"112113",value:16},H:{pattern:"112212",value:17},I:{pattern:"112311",value:18},J:{pattern:"122112",value:19},K:{pattern:"132111",value:20},L:{pattern:"111123",value:21},M:{pattern:"111222",value:22},N:{pattern:"111321",value:23},O:{pattern:"121122",value:24},P:{pattern:"131121",value:25},Q:{pattern:"212112",value:26},R:{pattern:"212211",value:27},S:{pattern:"211122",value:28},T:{pattern:"211221",value:29},U:{pattern:"221121",value:30},V:{pattern:"222111",value:31},W:{pattern:"112122",value:32},X:{pattern:"112221",value:33},Y:{pattern:"122121",value:34},Z:{pattern:"123111",value:35},"-":{pattern:"121131",value:36},".":{pattern:"311112",value:37}," ":{pattern:"311211",value:38},$:{pattern:"321111",value:39},"/":{pattern:"112131",value:40},"+":{pattern:"113121",value:41},"%":{pattern:"211131",value:42},SHIFT0:{pattern:"122211",value:46},SHIFT1:{pattern:"311121",value:45},SHIFT2:{pattern:"121221",value:43},SHIFT3:{pattern:"312111",value:44},START:{pattern:"111141"},TERMINATION_BAR:"1"}})},ud.prototype.initValue=function(t,e,o){this.value=t,this.width=e,this.height=o,this.pattern=[],this.values=[],this.dataLength=t.length},ud.prototype.prepareValues=function(){var t=Math.ceil(Math.max(.15*this.width,24));if(this.height<t)throw new Error("Insufficient height for Code93 encoding: the current height is "+this.height+"px, the minimum required height is "+t+"px.");if(this.setBaseUnit(),this.baseUnit<this.minBaseUnitLength){t=Math.ceil(this.minBaseUnitLength*(this.width/this.baseUnit));throw new Error("Insufficient width for Code93 encoding: the current width is "+this.width+'px and the minimum required width for value "'+this.value+'" is '+t+"px.")}},ud.prototype.setBaseUnit=function(){this.baseUnit=this.width/(9*(this.dataLength+2+2)+this.quietZoneLength+1)},ud.prototype.addStart=function(){var t=this.characterMap.START.pattern;this.addPattern(t)},ud.prototype.addStop=function(){this.addStart(),this.pattern.push(this.characterMap.TERMINATION_BAR)},ud.prototype.addBase=function(t){this.addPattern(t.pattern),this.values.push(t.value)},ud.prototype.pushCheckSum=function(){var t,e=this._getCheckValues();this.checksum=e.join("");for(var o=0;o<e.length;o++)t=this.characterMap[this._findCharacterByValue(e[o])],this.addPattern(t.pattern)},ud.prototype._getCheckValues=function(){for(var t,e=this.values,o=e.length,i=0,r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r,this.cCheckSumTotal);for(t=i%this.checkSumMod,i=this.weightedValue(t,1,this.kCheckSumTotal),r=o-1;0<=r;r--)i+=this.weightedValue(e[r],o-r+1,this.kCheckSumTotal);return[t,i%this.checkSumMod]},ud.prototype._findCharacterByValue=function(t){for(var e in this.characterMap)if(this.characterMap[e].value===t)return e},ud.prototype.weightedValue=function(t,e,o){return(e%o||o)*t},ud.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=parseInt(t.charAt(o),10),this.pattern.push(e)},ud),uo=((Xu=Ke)&&(cd.__proto__=Xu),((cd.prototype=Object.create(Xu&&Xu.prototype)).constructor=cd).prototype.initProperties=function(){Xu.prototype.initProperties.call(this),z(this,td,{name:"Code 93 extended",pushCheckSum:function(){var t=this._getCheckValues();this.checksum=t.join("");for(var e,o=0;o<t.length;o++)e=t[o],this.shiftValuesAsciiCodes[e]?this.addExtended(this.shiftValuesAsciiCodes[e]):(e=this._findCharacterByValue(e),this.addPattern(this.characterMap[e].pattern))}})},cd),od=/^\d+$/,id=Object.assign,Fe=((Wu=eo)&&(ld.__proto__=Wu),((ld.prototype=Object.create(Wu&&Wu.prototype)).constructor=ld).prototype.initProperties=function(){Wu.prototype.initProperties.call(this),id(this,{name:"Postnet",START:"2",VALID_CODE_LENGTHS:[5,9,11],DIGIT_SEPARATOR:"-",characterMap:["22111","11122","11212","11221","12112","12121","12211","21112","21121","21211"]})},ld.prototype.initValue=function(t,e,o){this.height=o,this.width=e,this.baseHeight=o/2,this.value=t.replace(new RegExp(this.DIGIT_SEPARATOR,"g"),""),this.pattern=[],this.validate(this.value),this.checkSum=0,this.setBaseUnit()},ld.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.START),this.pattern.pop()},ld.prototype.addCharacter=function(t){var e=this.characterMap[t];this.checkSum+=parseInt(t,10),this.addPattern(e)},ld.prototype.addCheckSum=function(){this.checksum=(10-this.checkSum%10)%10,this.addCharacter(this.checksum)},ld.prototype.setBaseUnit=function(){this.baseUnit=this.width/(10*(this.value.length+1)+3+this.quietZoneLength)},ld.prototype.validate=function(t){if(od.test(t)||this.invalidCharacterError(t.match(/[^0-9]/)[0]),!J(t.length,this.VALID_CODE_LENGTHS))throw new Error("Invalid value length. Valid lengths for the Postnet symbology are "+this.VALID_CODE_LENGTHS.join(",")+".")},ld.prototype.addPattern=function(t){for(var e,o=0;o<t.length;o++)e=this.height-this.baseHeight*t.charAt(o),this.pattern.push({width:1,y1:e,y2:this.height}),this.pattern.push(1)},ld),rd=/^\d+$/,nd=/^[a-z0-9]+$/i,sd=Object.assign,ee=((Gu=P.Class)&&(pd.__proto__=Gu),((pd.prototype=Object.create(Gu&&Gu.prototype)).constructor=pd).prototype.initProperties=function(){},pd.prototype.addStart=function(){},pd.prototype.is=function(){},pd.prototype.isCode=function(){return!1},pd.prototype.move=function(){},pd.prototype.pushState=function(){},pd),ce=((Nu=ee)&&(hd.__proto__=Nu),((hd.prototype=Object.create(Nu&&Nu.prototype)).constructor=hd).prototype.initProperties=function(){Nu.prototype.initProperties.call(this),z(this,{FNC4:"FNC4",SHIFT:98})},hd.prototype.addStart=function(){this.encoding.addPattern(this.START)},hd.prototype.is=function(t,e){e=t.charCodeAt(e);return this.isCode(e)},hd.prototype.move=function(t){for(var e=0;!this._moves[e].call(this,t)&&e<this._moves.length;)e++},hd.prototype.pushState=function(t){var e,o=this.states,i=t.value,r=i.length;for(!J("C",o)||(o=i.substr(t.index).match(/\d{4,}/g))&&(r=i.indexOf(o[0],t.index));0<=(e=t.value.charCodeAt(t.index))&&this.isCode(e)&&t.index<r;)this.encoding.addPattern(this.getValue(e)),t.index++},hd.prototype._initMoves=function(t){this._moves=[],J(this.FNC4,t)&&this._moves.push(this._moveFNC),J(this.shiftKey,t)&&this._moves.push(this._shiftState),this._moves.push(this._moveState)},hd.prototype._moveFNC=function(t){if(t.fnc)return t.fnc=!1,t.previousState===this.key},hd.prototype._shiftState=function(t){if(t.previousState===this.shiftKey&&(t.index+1>=t.value.length||this.encoding[this.shiftKey].is(t.value,t.index+1)))return this.encoding.addPattern(this.SHIFT),t.shifted=!0},hd.prototype._moveState=function(){return this.encoding.addPattern(this.MOVE),!0},hd),ad={};function hd(t,e){Nu.call(this,t),this.states=e,this._initMoves(e)}function pd(t){Gu.call(this),this.encoding=t,this.initProperties()}function ld(){Wu.apply(this,arguments)}function cd(){Xu.apply(this,arguments)}function ud(){qu.apply(this,arguments)}function dd(){Yu.apply(this,arguments)}function fd(t,e){Zu.call(this,t),this.states=e}function gd(t,e){Qu.call(this,t),this._initSubStates(e)}function yd(){Ku.apply(this,arguments)}function vd(){$u.apply(this,arguments)}function md(){Ju.apply(this,arguments)}ad.A=((Ju=ce)&&(md.__proto__=Ju),((md.prototype=Object.create(Ju&&Ju.prototype)).constructor=md).prototype.initProperties=function(){Ju.prototype.initProperties.call(this),sd(this,{key:"A",shiftKey:"B",MOVE:101,START:103})},md.prototype.isCode=function(t){return 0<=t&&t<96},md.prototype.getValue=function(t){return t<32?t+64:t-32},md),ad.B=(($u=ce)&&(vd.__proto__=$u),((vd.prototype=Object.create($u&&$u.prototype)).constructor=vd).prototype.initProperties=function(){$u.prototype.initProperties.call(this),sd(this,{key:"B",shiftKey:"A",MOVE:100,START:104})},vd.prototype.isCode=function(t){return 32<=t&&t<128},vd.prototype.getValue=function(t){return t-32},vd),ad.C=((Ku=ee)&&(yd.__proto__=Ku),((yd.prototype=Object.create(Ku&&Ku.prototype)).constructor=yd).prototype.initProperties=function(){Ku.prototype.initProperties.call(this),sd(this,{key:"C",MOVE:99,START:105})},yd.prototype.addStart=function(){this.encoding.addPattern(this.START)},yd.prototype.is=function(t,e){var o=Bd(t,e,4);return(e+4<=t.length||2===t.length)&&rd.test(o)},yd.prototype.move=function(){this.encoding.addPattern(this.MOVE)},yd.prototype.pushState=function(t){for(var e;(e=Bd(t.value,t.index,2))&&rd.test(e)&&2===e.length;)this.encoding.addPattern(parseInt(e,10)),t.index+=2},yd.prototype.getValue=function(t){return t},yd),ad.FNC4=((Qu=ee)&&(gd.__proto__=Qu),((gd.prototype=Object.create(Qu&&Qu.prototype)).constructor=gd).prototype.initProperties=function(){Qu.prototype.initProperties.call(this),sd(this,{key:"FNC4",dependentStates:["A","B"]})},gd.prototype.addStart=function(t){t=t.value.charCodeAt(0)-128,t=this._getSubState(t);this.encoding[t].addStart()},gd.prototype.is=function(t,e){e=t.charCodeAt(e);return this.isCode(e)},gd.prototype.isCode=function(t){return 128<=t&&t<256},gd.prototype.pushState=function(t){var e,o=this._initSubState(t),i=this.encoding,r=o.value.length;if(t.index+=r,r<3)for(;o.index<r;o.index++)e=o.value.charCodeAt(o.index),o.state=this._getSubState(e),o.previousState!==o.state&&(o.previousState=o.state,i[o.state].move(o)),i.addPattern(i[o.state].MOVE),i.addPattern(i[o.state].getValue(e));else o.state!==o.previousState&&i[o.state].move(o),this._pushStart(o),i.pushData(o,this.subStates),t.index<t.value.length&&this._pushStart(o);t.fnc=!0,t.state=o.state},gd.prototype._pushStart=function(t){this.encoding.addPattern(this.encoding[t.state].MOVE),this.encoding.addPattern(this.encoding[t.state].MOVE)},gd.prototype._initSubState=function(t){var e={value:this._getAll(t.value,t.index),index:0};return e.state=this._getSubState(e.value.charCodeAt(0)),e.previousState=t.previousState===this.key?e.state:t.previousState,e},gd.prototype._initSubStates=function(t){this.subStates=[];for(var e=0;e<t.length;e++)J(t[e],this.dependentStates)&&this.subStates.push(t[e])},gd.prototype._getSubState=function(t){for(var e=0;e<this.subStates.length;e++)if(this.encoding[this.subStates[e]].isCode(t))return this.subStates[e]},gd.prototype._getAll=function(t,e){for(var o,i="",r=e;(o=t.charCodeAt(r++))&&this.isCode(o);)i+=String.fromCharCode(o-128);return i},gd),ad.FNC1=((Zu=ee)&&(fd.__proto__=Zu),((fd.prototype=Object.create(Zu&&Zu.prototype)).constructor=fd).prototype.initProperties=function(){Zu.prototype.initProperties.call(this),sd(this,{key:"FNC1",startState:"C",startAI:"(",endAI:")",dependentStates:["C","B"],applicationIdentifiers:{22:{max:29,type:"alphanumeric"},402:{length:17},7004:{max:4,type:"alphanumeric"},242:{max:6,type:"alphanumeric"},8020:{max:25,type:"alphanumeric"},703:{min:3,max:30,type:"alphanumeric"},8008:{min:8,max:12,type:"alphanumeric"},253:{min:13,max:17,type:"alphanumeric"},8003:{min:14,max:30,type:"alphanumeric"},multiKey:[{ids:["15","17","8005","8100"],ranges:[[11,13],[310,316],[320,336],[340,369]],type:{length:6}},{ids:["240","241","250","251","400","401","403","7002","8004","8007","8110"],ranges:[[-9]],type:{max:30,type:"alphanumeric"}},{ids:["7001"],ranges:[[410,414]],type:{length:13}},{ids:["10","21","254","420","8002"],type:{max:20,type:"alphanumeric"}},{ids:["00","8006","8017","8018"],type:{length:18}},{ids:["01","02","8001"],type:{length:14}},{ids:["422"],ranges:[[424,426]],type:{length:3}},{ids:["20","8102"],type:{length:2}},{ids:["30","37"],type:{max:8,type:"alphanumeric"}},{ids:["390","392"],type:{max:15,type:"alphanumeric"}},{ids:["421","423"],type:{min:3,max:15,type:"alphanumeric"}},{ids:["391","393"],type:{min:3,max:18,type:"alphanumeric"}},{ids:["7003","8101"],type:{length:10}}]},START:102})},fd.prototype.addStart=function(){this.encoding[this.startState].addStart()},fd.prototype.is=function(){return J(this.key,this.states)},fd.prototype.pushState=function(t){var e,o,i,r=this.encoding,n=t.value.replace(/\s/g,""),s=new RegExp("["+this.startAI+this.endAI+"]","g"),a=t.index,h={state:this.startState};for(r.addPattern(this.START);;){if((e=(h.index=0)<(i=n.charAt(a)===this.startAI?2:0)?this.getBySeparator(n,a):this.getByLength(n,a)).ai.length)o=a+i+e.id.length+e.ai.length;else if((o=n.indexOf(this.startAI,a+1))<0){if(a+e.ai.max+e.id.length+i<n.length)throw new Error("Separators are required after variable length identifiers");o=n.length}if(h.value=n.substring(a,o).replace(s,""),this.validate(e,h.value),r.pushData(h,this.dependentStates),o>=n.length)break;a=o,h.state!==this.startState&&(r[this.startState].move(h),h.state=this.startState),e.ai.length||r.addPattern(this.START)}t.index=t.value.length},fd.prototype.validate=function(t,e){var o=e.substr(t.id.length),e=t.ai;if(!e.type&&!rd.test(o))throw new Error("Application identifier "+t.id+" is numeric only but contains non numeric character(s).");if("alphanumeric"===e.type&&!nd.test(o))throw new Error("Application identifier "+t.id+" is alphanumeric only but contains non alphanumeric character(s).");if(e.length&&e.length!==o.length)throw new Error("Application identifier "+t.id+" must be "+e.length+" characters long.");if(e.min&&e.min>o.length)throw new Error("Application identifier "+t.id+" must be at least "+e.min+" characters long.");if(e.max&&e.max<o.length)throw new Error("Application identifier "+t.id+" must be at most "+e.max+" characters long.")},fd.prototype.getByLength=function(t,e){for(var o,i,r=2;r<=4;r++)if(o=Bd(t,e,r),i=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substring(0,o.length-1)))return{id:o,ai:i};this.unsupportedAIError(o)},fd.prototype.unsupportedAIError=function(t){throw new Error("'"+t+"' is not a supported Application Identifier")},fd.prototype.getBySeparator=function(t,e){var o=t.indexOf(this.startAI,e),e=t.indexOf(this.endAI,o),o=t.substring(o+1,e),e=this.getApplicationIdentifier(o)||this.getApplicationIdentifier(o.substr(o.length-1));return e||this.unsupportedAIError(o),{ai:e,id:o}},fd.prototype.getApplicationIdentifier=function(t){var e=this.applicationIdentifiers,o=e.multiKey;if(e[t])return e[t];for(var i=0;i<o.length;i++){if(o[i].ids&&J(t,o[i].ids))return o[i].type;if(o[i].ranges)for(var r=o[i].ranges,n=0;n<r.length;n++)if(r[n][0]<=t&&t<=r[n][1])return o[i].type}},fd);var xd,_d,bd,wd,Cd,Sd,at=((Sd=eo)&&(Od.__proto__=Sd),((Od.prototype=Object.create(Sd&&Sd.prototype)).constructor=Od).prototype.initProperties=function(){Sd.prototype.initProperties.call(this),sd(this,{characterMap:[212222,222122,222221,121223,121322,131222,122213,122312,132212,221213,221312,231212,112232,122132,122231,113222,123122,123221,223211,221132,221231,213212,223112,312131,311222,321122,321221,312212,322112,322211,212123,212321,232121,111323,131123,131321,112313,132113,132311,211313,231113,231311,112133,112331,132131,113123,113321,133121,313121,211331,231131,213113,213311,213131,311123,311321,331121,312113,312311,332111,314111,221411,431111,111224,111422,121124,121421,141122,141221,112214,112412,122114,122411,142112,142211,241211,221114,413111,241112,134111,111242,121142,121241,114212,124112,124211,411212,421112,421211,212141,214121,412121,111143,111341,131141,114113,114311,411113,411311,113141,114131,311141,411131,211412,211214,211232,2331112],STOP:106})},Od.prototype._initStates=function(){for(var t=0;t<this.states.length;t++)this[this.states[t]]=new ad[this.states[t]](this,this.states)},Od.prototype.initValue=function(t,e,o){this.pattern=[],this.value=t,this.width=e,this.height=o,this.checkSum=0,this.totalUnits=0,this.index=0,this.position=1},Od.prototype.addData=function(){var t={value:this.value,index:0,state:""};0!==this.value.length&&(t.state=t.previousState=this.getNextState(t,this.states),this.addStart(t),this.pushData(t,this.states),this.addCheckSum(),this.addStop(),this.setBaseUnit())},Od.prototype.pushData=function(t,e){for(;this[t.state].pushState(t),!(t.index>=t.value.length);){var o;t.shifted?(o=t.state,t.state=t.previousState,t.previousState=o,t.shifted=!1):(t.previousState=t.state,t.state=this.getNextState(t,e),this[t.state].move(t))}},Od.prototype.addStart=function(t){this[t.state].addStart(t),this.position=1},Od.prototype.addCheckSum=function(){this.checksum=this.checkSum%103,this.addPattern(this.checksum)},Od.prototype.addStop=function(){this.addPattern(this.STOP)},Od.prototype.setBaseUnit=function(){this.baseUnit=this.width/(this.totalUnits+this.quietZoneLength)},Od.prototype.addPattern=function(t){for(var e,o=this.characterMap[t].toString(),i=0;i<o.length;i++)e=parseInt(o.charAt(i),10),this.pattern.push(e),this.totalUnits+=e;this.checkSum+=t*this.position++},Od.prototype.getNextState=function(t,e){for(var o=0;o<e.length;o++)if(this[e[o]].is(t.value,t.index))return e[o];this.invalidCharacterError(t.value.charAt(t.index))},Od),_e=((Cd=at)&&(Md.__proto__=Cd),((Md.prototype=Object.create(Cd&&Cd.prototype)).constructor=Md).prototype.initProperties=function(){Cd.prototype.initProperties.call(this),sd(this,{name:"Code 128 A",states:["A"]})},Md),ae=((wd=at)&&(Td.__proto__=wd),((Td.prototype=Object.create(wd&&wd.prototype)).constructor=Td).prototype.initProperties=function(){wd.prototype.initProperties.call(this),sd(this,{name:"Code 128 B",states:["B"]})},Td),Me=((bd=at)&&(Pd.__proto__=bd),((Pd.prototype=Object.create(bd&&bd.prototype)).constructor=Pd).prototype.initProperties=function(){bd.prototype.initProperties.call(this),sd(this,{name:"Code 128 C",states:["C"]})},Pd),Vt=((_d=at)&&(Ad.__proto__=_d),((Ad.prototype=Object.create(_d&&_d.prototype)).constructor=Ad).prototype.initProperties=function(){_d.prototype.initProperties.call(this),sd(this,{name:"Code 128",states:["C","B","A","FNC4"]})},Ad),Xe=((xd=at)&&(kd.__proto__=xd),((kd.prototype=Object.create(xd&&xd.prototype)).constructor=kd).prototype.initProperties=function(){xd.prototype.initProperties.call(this),sd(this,{name:"Code GS1-128",states:["FNC1","C","B"]})},kd);function kd(){xd.apply(this,arguments)}function Ad(){_d.apply(this,arguments)}function Pd(){bd.apply(this,arguments)}function Td(){wd.apply(this,arguments)}function Md(){Cd.apply(this,arguments)}function Od(t){Sd.call(this,t),this._initStates()}function Bd(t,e,o){return t.substring(e,e+o)}var Rd,Ed,Ld,Id,zd,Vd,jd,Dd=Object.assign,ge=((jd=eo)&&(Qd.__proto__=jd),((Qd.prototype=Object.create(jd&&jd.prototype)).constructor=Qd).prototype.initProperties=function(){jd.prototype.initProperties.call(this),Dd(this,{characterMap:["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221"],START:"21",STOP:"121",checkSumType:"",checkSums:Hd})},Qd.prototype.initValue=function(t,e){this.pattern=[],this.value=t,this.checkSumLength=0,this.width=e},Qd.prototype.setBaseUnit=function(){this.baseUnit=this.width/(12*(this.value.length+this.checkSumLength)+this.quietZoneLength+7)},Qd.prototype.addData=function(){var t=this.value;this.addPattern(this.START);for(var e=0;e<t.length;e++)this.addCharacter(t.charAt(e));this.options.addCheckSum&&this.addCheckSum(),this.addPattern(this.STOP),this.setBaseUnit()},Qd.prototype.addCharacter=function(t){var e=this.characterMap[t];e||this.invalidCharacterError(t),this.addPattern(e)},Qd.prototype.addPattern=function(t){for(var e=0;e<t.length;e++)this.pattern.push(parseInt(t.charAt(e),10))},Qd.prototype.addCheckSum=function(){var t=this.checkSums[this.checkSumType].call(this.checkSums,this.value);this.checksum=t.join("");for(var e=0;e<t.length;e++)this.checkSumLength++,this.addPattern(this.characterMap[t[e]])},Qd),Se=((Vd=ge)&&(Zd.__proto__=Vd),((Zd.prototype=Object.create(Vd&&Vd.prototype)).constructor=Zd).prototype.initProperties=function(){Vd.prototype.initProperties.call(this),Dd(this,{name:"MSI Modulo10",checkSumType:"Modulo10"})},Zd),ce=((zd=ge)&&(Yd.__proto__=zd),((Yd.prototype=Object.create(zd&&zd.prototype)).constructor=Yd).prototype.initProperties=function(){zd.prototype.initProperties.call(this),Dd(this,{name:"MSI Modulo11",checkSumType:"Modulo11"})},Yd),ee=((Id=ge)&&(qd.__proto__=Id),((qd.prototype=Object.create(Id&&Id.prototype)).constructor=qd).prototype.initProperties=function(){Id.prototype.initProperties.call(this),Dd(this,{name:"MSI Modulo10 Modulo10",checkSumType:"Modulo10Modulo10"})},qd),at=((Ld=ge)&&(Xd.__proto__=Ld),((Xd.prototype=Object.create(Ld&&Ld.prototype)).constructor=Xd).prototype.initProperties=function(){Ld.prototype.initProperties.call(this),Dd(this,{name:"MSI Modulo11 Modulo10",checkSumType:"Modulo11Modulo10"})},Xd),Hd={Modulo10:function(t){for(var e,o,i=[0,""],r=t.length%2,n=0;n<t.length;n++)i[(n+r)%2]+=parseInt(t.charAt(n),10);for(o=i[0],e=(2*i[1]).toString(),n=0;n<e.length;n++)o+=parseInt(e.charAt(n),10);return[(10-o%10)%10]},Modulo11:function(t){for(var e,o=0,i=t.length,r=0;r<i;r++)o+=(((i-r)%6||6)+1)*t.charAt(r);return 10!=(e=(11-o%11)%11)?[e]:[1,0]},Modulo11Modulo10:function(t){var e=this.Modulo11(t),t=t+e[0];return e.concat(this.Modulo10(t))},Modulo10Modulo10:function(t){var e=this.Modulo10(t),t=t+e[0];return e.concat(this.Modulo10(t))}},Ud=Object.assign,ge=((Ed=eo)&&(Wd.__proto__=Ed),((Wd.prototype=Object.create(Ed&&Ed.prototype)).constructor=Wd).prototype.initProperties=function(){Ed.prototype.initProperties.call(this),Ud(this,{name:"EAN 13",keyTable:["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"],characterMap:{digits:[[3,2,1,1],[2,2,2,1],[2,1,2,2],[1,4,1,1],[1,1,3,2],[1,2,3,1],[1,1,1,4],[1,3,1,2],[1,2,1,3],[3,1,1,2]],start:[1,1,1],middle:[1,1,1,1,1]}})},Wd.prototype.initValue=function(t,e,o){t=String(t);if(12!==t.length||/\D/.test(t))throw new Error('The value of the "EAN13" encoding should be 12 symbols');this.pattern=[],this.options.height=o,this.baseUnit=e/(95+this.quietZoneLength),this.value=t,this.checksum=this.calculateChecksum(),this.leftKey=t[0],this.leftPart=t.substr(1,6),this.rightPart=t.substr(7)+this.checksum},Wd.prototype.addData=function(){this.addPieces(this.characterMap.start),this.addSide(this.leftPart,this.leftKey),this.addPieces(this.characterMap.middle),this.addSide(this.rightPart),this.addPieces(this.characterMap.start)},Wd.prototype.addSide=function(t,e){for(var o=0;o<t.length;o++)e&&parseInt(this.keyTable[e].charAt(o),10)?this.addPieces(Array.prototype.slice.call(this.characterMap.digits[t.charAt(o)]).reverse(),!0):this.addPieces(this.characterMap.digits[t.charAt(o)],!0)},Wd.prototype.addPieces=function(t,e){for(var o=0;o<t.length;o++)e?this.pattern.push({y1:0,y2:.95*this.options.height,width:t[o]}):this.pattern.push(t[o])},Wd.prototype.calculateChecksum=function(){for(var t=0,e=0,o=this.value.split("").reverse().join(""),i=0;i<o.length;i++)i%2?e+=parseInt(o.charAt(i),10):t+=parseInt(o.charAt(i),10);return(10-(3*t+e)%10)%10},Wd),Fd=Object.assign,eo=((Rd=ge)&&(Gd.__proto__=Rd),((Gd.prototype=Object.create(Rd&&Rd.prototype)).constructor=Gd).prototype.initProperties=function(){Rd.prototype.initProperties.call(this),Fd(this,{name:"EAN 8"})},Gd.prototype.initValue=function(t,e,o){if(7!==t.length||/\D/.test(t))throw new Error("Invalid value provided");this.value=t,this.options.height=o,this.checksum=this.calculateChecksum(this.value),this.leftPart=this.value.substr(0,4),this.rightPart=this.value.substr(4)+this.checksum,this.pattern=[],this.baseUnit=e/(67+this.quietZoneLength)},Gd),Nd={code11:It,code39:Ve,code39extended:ro,code93:Ke,code93extended:uo,code128:Vt,code128a:_e,code128b:ae,code128c:Me};function Gd(){Rd.apply(this,arguments)}function Wd(){Ed.apply(this,arguments)}function Xd(){Ld.apply(this,arguments)}function qd(){Id.apply(this,arguments)}function Yd(){zd.apply(this,arguments)}function Zd(){Vd.apply(this,arguments)}function Qd(){jd.apply(this,arguments)}Nd["gs1-128"]=Xe,Nd.msimod10=Se,Nd.msimod11=ce,Nd.msimod1010=ee,Nd.msimod1110=at,Nd.postnet=Fe,Nd.ean8=eo,Nd.ean13=ge;var Kd,ee=((Kd=P.Class)&&($d.__proto__=Kd),(($d.prototype=Object.create(Kd&&Kd.prototype)).constructor=$d).prototype.destroy=function(){this._destroySurface()},$d.prototype._initElement=function(){_(this.element,"k-barcode")},$d.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},$d.prototype._createSurface=function(){return P.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},$d.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},$d.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},$d.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},$d.prototype.setOptions=function(t){this._setOptions(t),this.redraw()},$d.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t.width,height:t.height}),this.createVisual(),this.surface.draw(this.visual)},$d.prototype.getSize=function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},$d.prototype._resize=function(){this.redraw()},$d.prototype.createVisual=function(){this.visual=this._render()},$d.prototype._render=function(){var t,e=this.options,o=e.value,i=e.text,r=U(i.margin),n=this._getSize(),s=e.border||{},a=this.encoding,h=new qt(0,0,n.width,n.height).unpad(s.width).unpad(e.padding),p=h.height(),s=new P.drawing.Group;this.contentBox=h,s.append(this._getBackground(n)),i.visible&&(p-=P.drawing.util.measureText(o,{font:i.font}).height+r.top+r.bottom);try{t=a.encode(o,h.width(),p)}catch(t){return this.onError(t),s}return i.visible&&(o=o,e.checksum&<(a.checksum)&&(o+=" "+a.checksum),s.append(this._getText(o))),this.barHeight=p,this._bandsGroup=this._getBands(t.pattern,t.baseUnit),s.append(this._bandsGroup),s},$d.prototype.exportVisual=function(){return this._render()},$d.prototype._getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,t=new P.geometry.Size(300,100);return 0<e&&(t.width=e),o&&(t.height=o),this.options.width&&(t.width=this.options.width),this.options.height&&(t.height=this.options.height),t},$d.prototype.value=function(t){if(!lt(t))return this.options.value;this.options.value=String(t),this.redraw()},$d.prototype._getBands=function(t,e){for(var o=this.contentBox,i=o.x1,r=new P.drawing.Group,n=0;n<t.length;n++){var s,a=(s=V(t[n])?t[n]:{width:t[n],y1:0,y2:this.barHeight}).width*e;n%2&&(s=P.geometry.Rect.fromPoints(new P.geometry.Point(i,s.y1+o.y1),new P.geometry.Point(i+a,s.y2+o.y1)),s=P.drawing.Path.fromRect(s,{fill:{color:this.options.color},stroke:null}),r.append(s)),i+=a}return r},$d.prototype._getBackground=function(t){var e=this.options,o=e.border||{},t=new qt(0,0,t.width,t.height).unpad(o.width/2);return P.drawing.Path.fromRect(t.toRect(),{fill:{color:e.background},stroke:{color:o.width?o.color:"",width:o.width,dashType:o.dashType}})},$d.prototype._getText=function(t){var e=this.options.text,e=this._textbox=new ze(t,{font:e.font,color:e.color,align:"center",vAlign:"bottom",margin:e.margin});return e.reflow(this.contentBox),e.renderVisual(),e.visual},$d.prototype._setOptions=function(t){if(this.type=(t.type||this.options.type).toLowerCase(),"upca"===this.type&&(this.type="ean13",t.value="0"+t.value),"upce"===this.type&&(this.type="ean8",t.value="0"+t.value),!Nd[this.type])throw new Error("Encoding '"+this.type+"' is not supported.");this.encoding=new Nd[this.type],this.options=z({},this.options,t)},$d);function $d(t,e,o){void 0===o&&(o=Dt),Kd.call(this),this.options=z({},this.options,e),this.element=t,this.onError=o,this._initElement(),this._initSurface(),this._setOptions(e),e&<(e.value)&&this.redraw()}kt(ee,{name:"Barcode",renderAs:"svg",value:"",type:"code39",checksum:!1,width:0,height:0,color:"black",background:"white",text:{visible:!0,font:"16px Consolas, Monaco, Sans Mono, monospace, sans-serif",color:"black",margin:{top:0,bottom:0,left:0,right:0}},border:{width:0,dashType:"solid",color:"black"},padding:{top:0,bottom:0,left:0,right:0}});function Jd(t,e){if(void 0===e&&(e=ef),!t)throw new Error("Please specify barcode type to validate.");var o=t.toLowerCase(),i="";if("upca"===o?(o="ean13",i="0"):"upce"===o&&(o="ean8",i="0"),!Nd[o])throw new Error("Encoding '"+t+"' is not supported.");var r,n,s,o=new Nd[o];return r=o,n=e,s=i,function(t){try{r.encode(s+t,n.width,n.height)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}var tf=ee,ef={width:500,height:100},of=Object.assign;function rf(t,e){for(var o=[],i=0;i<t.length;)o.push(t.substring(i,i+e)),i+=e;return o}function nf(t,e){t=Number(t).toString(2);return t=t.length<e?new Array(e-t.length+1).join(0)+t:t}function sf(t){return parseInt(t,2)}var af,hf,pf,lf,cf,uf,df,ff=((df=P.Class)&&(Sf.__proto__=df),((Sf.prototype=Object.create(df&&df.prototype)).constructor=Sf).prototype.move=function(){this.row+=this.dir*this.c,this.c^=1,this.column=this.startColumn-this.c},Sf.prototype.getNextCell=function(){for(;void 0!==this.matrix[this.row][this.column];)this.move(),(this.row<0||this.row>=this.matrix.length)&&(this.dir=-this.dir,this.startColumn-=8!==this.startColumn?2:3,this.column=this.startColumn,this.row=this.dir<0?this.matrix.length-1:0);return{row:this.row,column:this.column}},Sf.prototype.getNextRemainderCell=function(){if(this.move(),void 0===this.matrix[this.row][this.column])return{row:this.row,column:this.column}},Sf),gf=((uf=P.Class)&&(Cf.__proto__=uf),(Cf.prototype=Object.create(uf&&uf.prototype)).constructor=Cf),yf=((cf=P.Class)&&(wf.__proto__=cf),((wf.prototype=Object.create(cf&&cf.prototype)).constructor=wf).prototype.getEncodingResult=function(n,t){var e=function(){var t,e=[],o=0,i=n;for(e.push(eg(i,Gf,Wf,Xf,t)),t=e[0].mode,i=i.substr(e[0].modeString.length);0<i.length;){var r=eg(i,qf,Yf,Zf,t);r.mode!==t?(t=r.mode,e.push(r),o++):e[o].modeString+=r.modeString,i=i.substr(r.modeString.length)}return e}(),t=og(function(t){for(var e=0,o=0;o<t.length;o++)e+=vf[t[o].mode].getStringBitsLength(t[o].modeString.length);return Math.ceil(e/8)}(e),t),e=function(t,e){for(var o="",i=0;i<t.length;i++)o+=vf[t[i].mode].encode(t[i].modeString,e);return o}(e,t);return new gf(e,t)},wf),at=((lf=P.Class)&&(bf.__proto__=lf),((bf.prototype=Object.create(lf&&lf.prototype)).constructor=bf).prototype.initProperties=function(){of(this,{modeIndicator:"",bitsInCharacterCount:[]})},bf.prototype.getVersionIndex=function(t){return t<10?0:26<t?2:1},bf.prototype.getBitsCharacterCount=function(t){return this.bitsInCharacterCount[this.getVersionIndex(t||40)]},bf.prototype.getModeCountString=function(t,e){return this.modeIndicator+nf(t,this.getBitsCharacterCount(e))},bf.prototype.encode=function(){},bf.prototype.getStringBitsLength=function(){},bf.prototype.getValue=function(){},bf),Fe=((pf=at)&&(_f.__proto__=pf),((_f.prototype=Object.create(pf&&pf.prototype)).constructor=_f).prototype.initProperties=function(){pf.prototype.initProperties.call(this),of(this,{bitsInCharacterCount:[10,12,14],modeIndicator:"0001"})},_f.prototype.getValue=function(t){return parseInt(t,10)},_f.prototype.encode=function(t,e){for(var o=rf(t,3),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=nf(o[r],10);return i+nf(o[r],1+3*o[r].length)},_f.prototype.getStringBitsLength=function(t,e){var o=t%3;return 4+this.getBitsCharacterCount(e)+10*Math.floor(t/3)+3*o+(0==o?0:1)},_f),eo=((hf=at)&&(xf.__proto__=hf),((xf.prototype=Object.create(hf&&hf.prototype)).constructor=xf).prototype.initProperties=function(){hf.prototype.initProperties.call(this),of(this,{characters:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:18,J:19,K:20,L:21,M:22,N:23,O:24,P:25,Q:26,R:27,S:28,T:29,U:30,V:31,W:32,X:33,Y:34,Z:35," ":36,$:37,"%":38,"*":39,"+":40,"-":41,".":42,"/":43,":":44},bitsInCharacterCount:[9,11,13],modeIndicator:"0010"})},xf.prototype.getValue=function(t){return this.characters[t]},xf.prototype.encode=function(t,e){for(var o=rf(t,2),i=this.getModeCountString(t.length,e),r=0;r<o.length-1;r++)i+=nf(45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)),11);return i+nf(2===o[r].length?45*this.getValue(o[r].charAt(0))+this.getValue(o[r].charAt(1)):this.getValue(o[r].charAt(0)),1+5*o[r].length)},xf.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+11*Math.floor(t/2)+t%2*6},xf),ge=((af=at)&&(mf.__proto__=af),((mf.prototype=Object.create(af&&af.prototype)).constructor=mf).prototype.initProperties=function(){af.prototype.initProperties.call(this),of(this,{bitsInCharacterCount:[8,16,16],modeIndicator:"0100"})},mf.prototype.getValue=function(t){var e=t.charCodeAt(0);if(e<=127||160<=e&&e<=255)return e;throw new Error('Unsupported character in QR Code: "'+t+'".')},mf.prototype.encode=function(t,e){for(var o=this.getModeCountString(t.length,e),i=0;i<t.length;i++)o+=nf(this.getValue(t.charAt(i)),8);return o},mf.prototype.getStringBitsLength=function(t,e){return 4+this.getBitsCharacterCount(e)+8*t},mf),vf={};function mf(){af.apply(this,arguments)}function xf(){hf.apply(this,arguments)}function _f(){pf.apply(this,arguments)}function bf(){lf.call(this),this.initProperties()}function wf(){cf.apply(this,arguments)}function Cf(t,e){uf.call(this),this.dataString=t,this.version=e}function Sf(t){df.call(this),this.matrix=t,this.row=t.length-1,this.column=t.length-1,this.startColumn=this.column,this.dir=-1,this.c=0}vf.numeric=new Fe,vf.alphanumeric=new eo,vf.byte=new ge;var kf,Af=((kf=P.Class)&&(Kf.__proto__=kf),((Kf.prototype=Object.create(kf&&kf.prototype)).constructor=Kf).prototype.initProperties=function(){of(this,{encodingMode:"byte",utfBOM:"111011111011101110111111",initialModeCountStringLength:20,ranges:[128,2048,65536,2097152,67108864]})},Kf.prototype.getEncodingResult=function(t,e){t=this.encode(t),e=og(this.getDataCodewordsCount(t),e),t=this.mode.getModeCountString(t.length/8,e)+t;return new gf(t,e)},Kf.prototype.getDataCodewordsCount=function(t){t=t.length;return Math.ceil((this.initialModeCountStringLength+t)/8)},Kf.prototype.encode=function(t){for(var e=this.utfBOM,o=0;o<t.length;o++)e+=this.encodeCharacter(t.charCodeAt(o));return e},Kf.prototype.encodeCharacter=function(t){var e=this.getBytesCount(t),o=e-1,i="";if(1===e)i=nf(t,8);else{for(var e=8-e,r=0;r<o;r++)i=nf(t>>6*r&63|128,8)+i;i=(t>>6*o|255>>e<<e).toString(2)+i}return i},Kf.prototype.getBytesCount=function(t){for(var e=this.ranges,o=0;o<e.length;o++)if(t<e[o])return o+1},Kf),Pf=[{L:{groups:[[1,19]],totalDataCodewords:19,errorCodewordsPerBlock:7},M:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:10},Q:{groups:[[1,13]],totalDataCodewords:13,errorCodewordsPerBlock:13},H:{groups:[[1,9]],totalDataCodewords:9,errorCodewordsPerBlock:17}},{L:{groups:[[1,34]],totalDataCodewords:34,errorCodewordsPerBlock:10},M:{groups:[[1,28]],totalDataCodewords:28,errorCodewordsPerBlock:16},Q:{groups:[[1,22]],totalDataCodewords:22,errorCodewordsPerBlock:22},H:{groups:[[1,16]],totalDataCodewords:16,errorCodewordsPerBlock:28}},{L:{groups:[[1,55]],totalDataCodewords:55,errorCodewordsPerBlock:15},M:{groups:[[1,44]],totalDataCodewords:44,errorCodewordsPerBlock:26},Q:{groups:[[2,17]],totalDataCodewords:34,errorCodewordsPerBlock:18},H:{groups:[[2,13]],totalDataCodewords:26,errorCodewordsPerBlock:22}},{L:{groups:[[1,80]],totalDataCodewords:80,errorCodewordsPerBlock:20},M:{groups:[[2,32]],totalDataCodewords:64,errorCodewordsPerBlock:18},Q:{groups:[[2,24]],totalDataCodewords:48,errorCodewordsPerBlock:26},H:{groups:[[4,9]],totalDataCodewords:36,errorCodewordsPerBlock:16}},{L:{groups:[[1,108]],totalDataCodewords:108,errorCodewordsPerBlock:26},M:{groups:[[2,43]],totalDataCodewords:86,errorCodewordsPerBlock:24},Q:{groups:[[2,15],[2,16]],totalDataCodewords:62,errorCodewordsPerBlock:18},H:{groups:[[2,11],[2,12]],totalDataCodewords:46,errorCodewordsPerBlock:22}},{L:{groups:[[2,68]],totalDataCodewords:136,errorCodewordsPerBlock:18},M:{groups:[[4,27]],totalDataCodewords:108,errorCodewordsPerBlock:16},Q:{groups:[[4,19]],totalDataCodewords:76,errorCodewordsPerBlock:24},H:{groups:[[4,15]],totalDataCodewords:60,errorCodewordsPerBlock:28}},{L:{groups:[[2,78]],totalDataCodewords:156,errorCodewordsPerBlock:20},M:{groups:[[4,31]],totalDataCodewords:124,errorCodewordsPerBlock:18},Q:{groups:[[2,14],[4,15]],totalDataCodewords:88,errorCodewordsPerBlock:18},H:{groups:[[4,13],[1,14]],totalDataCodewords:66,errorCodewordsPerBlock:26}},{L:{groups:[[2,97]],totalDataCodewords:194,errorCodewordsPerBlock:24},M:{groups:[[2,38],[2,39]],totalDataCodewords:154,errorCodewordsPerBlock:22},Q:{groups:[[4,18],[2,19]],totalDataCodewords:110,errorCodewordsPerBlock:22},H:{groups:[[4,14],[2,15]],totalDataCodewords:86,errorCodewordsPerBlock:26}},{L:{groups:[[2,116]],totalDataCodewords:232,errorCodewordsPerBlock:30},M:{groups:[[3,36],[2,37]],totalDataCodewords:182,errorCodewordsPerBlock:22},Q:{groups:[[4,16],[4,17]],totalDataCodewords:132,errorCodewordsPerBlock:20},H:{groups:[[4,12],[4,13]],totalDataCodewords:100,errorCodewordsPerBlock:24}},{L:{groups:[[2,68],[2,69]],totalDataCodewords:274,errorCodewordsPerBlock:18},M:{groups:[[4,43],[1,44]],totalDataCodewords:216,errorCodewordsPerBlock:26},Q:{groups:[[6,19],[2,20]],totalDataCodewords:154,errorCodewordsPerBlock:24},H:{groups:[[6,15],[2,16]],totalDataCodewords:122,errorCodewordsPerBlock:28}},{L:{groups:[[4,81]],totalDataCodewords:324,errorCodewordsPerBlock:20},M:{groups:[[1,50],[4,51]],totalDataCodewords:254,errorCodewordsPerBlock:30},Q:{groups:[[4,22],[4,23]],totalDataCodewords:180,errorCodewordsPerBlock:28},H:{groups:[[3,12],[8,13]],totalDataCodewords:140,errorCodewordsPerBlock:24}},{L:{groups:[[2,92],[2,93]],totalDataCodewords:370,errorCodewordsPerBlock:24},M:{groups:[[6,36],[2,37]],totalDataCodewords:290,errorCodewordsPerBlock:22},Q:{groups:[[4,20],[6,21]],totalDataCodewords:206,errorCodewordsPerBlock:26},H:{groups:[[7,14],[4,15]],totalDataCodewords:158,errorCodewordsPerBlock:28}},{L:{groups:[[4,107]],totalDataCodewords:428,errorCodewordsPerBlock:26},M:{groups:[[8,37],[1,38]],totalDataCodewords:334,errorCodewordsPerBlock:22},Q:{groups:[[8,20],[4,21]],totalDataCodewords:244,errorCodewordsPerBlock:24},H:{groups:[[12,11],[4,12]],totalDataCodewords:180,errorCodewordsPerBlock:22}},{L:{groups:[[3,115],[1,116]],totalDataCodewords:461,errorCodewordsPerBlock:30},M:{groups:[[4,40],[5,41]],totalDataCodewords:365,errorCodewordsPerBlock:24},Q:{groups:[[11,16],[5,17]],totalDataCodewords:261,errorCodewordsPerBlock:20},H:{groups:[[11,12],[5,13]],totalDataCodewords:197,errorCodewordsPerBlock:24}},{L:{groups:[[5,87],[1,88]],totalDataCodewords:523,errorCodewordsPerBlock:22},M:{groups:[[5,41],[5,42]],totalDataCodewords:415,errorCodewordsPerBlock:24},Q:{groups:[[5,24],[7,25]],totalDataCodewords:295,errorCodewordsPerBlock:30},H:{groups:[[11,12],[7,13]],totalDataCodewords:223,errorCodewordsPerBlock:24}},{L:{groups:[[5,98],[1,99]],totalDataCodewords:589,errorCodewordsPerBlock:24},M:{groups:[[7,45],[3,46]],totalDataCodewords:453,errorCodewordsPerBlock:28},Q:{groups:[[15,19],[2,20]],totalDataCodewords:325,errorCodewordsPerBlock:24},H:{groups:[[3,15],[13,16]],totalDataCodewords:253,errorCodewordsPerBlock:30}},{L:{groups:[[1,107],[5,108]],totalDataCodewords:647,errorCodewordsPerBlock:28},M:{groups:[[10,46],[1,47]],totalDataCodewords:507,errorCodewordsPerBlock:28},Q:{groups:[[1,22],[15,23]],totalDataCodewords:367,errorCodewordsPerBlock:28},H:{groups:[[2,14],[17,15]],totalDataCodewords:283,errorCodewordsPerBlock:28}},{L:{groups:[[5,120],[1,121]],totalDataCodewords:721,errorCodewordsPerBlock:30},M:{groups:[[9,43],[4,44]],totalDataCodewords:563,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[1,23]],totalDataCodewords:397,errorCodewordsPerBlock:28},H:{groups:[[2,14],[19,15]],totalDataCodewords:313,errorCodewordsPerBlock:28}},{L:{groups:[[3,113],[4,114]],totalDataCodewords:795,errorCodewordsPerBlock:28},M:{groups:[[3,44],[11,45]],totalDataCodewords:627,errorCodewordsPerBlock:26},Q:{groups:[[17,21],[4,22]],totalDataCodewords:445,errorCodewordsPerBlock:26},H:{groups:[[9,13],[16,14]],totalDataCodewords:341,errorCodewordsPerBlock:26}},{L:{groups:[[3,107],[5,108]],totalDataCodewords:861,errorCodewordsPerBlock:28},M:{groups:[[3,41],[13,42]],totalDataCodewords:669,errorCodewordsPerBlock:26},Q:{groups:[[15,24],[5,25]],totalDataCodewords:485,errorCodewordsPerBlock:30},H:{groups:[[15,15],[10,16]],totalDataCodewords:385,errorCodewordsPerBlock:28}},{L:{groups:[[4,116],[4,117]],totalDataCodewords:932,errorCodewordsPerBlock:28},M:{groups:[[17,42]],totalDataCodewords:714,errorCodewordsPerBlock:26},Q:{groups:[[17,22],[6,23]],totalDataCodewords:512,errorCodewordsPerBlock:28},H:{groups:[[19,16],[6,17]],totalDataCodewords:406,errorCodewordsPerBlock:30}},{L:{groups:[[2,111],[7,112]],totalDataCodewords:1006,errorCodewordsPerBlock:28},M:{groups:[[17,46]],totalDataCodewords:782,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[16,25]],totalDataCodewords:568,errorCodewordsPerBlock:30},H:{groups:[[34,13]],totalDataCodewords:442,errorCodewordsPerBlock:24}},{L:{groups:[[4,121],[5,122]],totalDataCodewords:1094,errorCodewordsPerBlock:30},M:{groups:[[4,47],[14,48]],totalDataCodewords:860,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[14,25]],totalDataCodewords:614,errorCodewordsPerBlock:30},H:{groups:[[16,15],[14,16]],totalDataCodewords:464,errorCodewordsPerBlock:30}},{L:{groups:[[6,117],[4,118]],totalDataCodewords:1174,errorCodewordsPerBlock:30},M:{groups:[[6,45],[14,46]],totalDataCodewords:914,errorCodewordsPerBlock:28},Q:{groups:[[11,24],[16,25]],totalDataCodewords:664,errorCodewordsPerBlock:30},H:{groups:[[30,16],[2,17]],totalDataCodewords:514,errorCodewordsPerBlock:30}},{L:{groups:[[8,106],[4,107]],totalDataCodewords:1276,errorCodewordsPerBlock:26},M:{groups:[[8,47],[13,48]],totalDataCodewords:1e3,errorCodewordsPerBlock:28},Q:{groups:[[7,24],[22,25]],totalDataCodewords:718,errorCodewordsPerBlock:30},H:{groups:[[22,15],[13,16]],totalDataCodewords:538,errorCodewordsPerBlock:30}},{L:{groups:[[10,114],[2,115]],totalDataCodewords:1370,errorCodewordsPerBlock:28},M:{groups:[[19,46],[4,47]],totalDataCodewords:1062,errorCodewordsPerBlock:28},Q:{groups:[[28,22],[6,23]],totalDataCodewords:754,errorCodewordsPerBlock:28},H:{groups:[[33,16],[4,17]],totalDataCodewords:596,errorCodewordsPerBlock:30}},{L:{groups:[[8,122],[4,123]],totalDataCodewords:1468,errorCodewordsPerBlock:30},M:{groups:[[22,45],[3,46]],totalDataCodewords:1128,errorCodewordsPerBlock:28},Q:{groups:[[8,23],[26,24]],totalDataCodewords:808,errorCodewordsPerBlock:30},H:{groups:[[12,15],[28,16]],totalDataCodewords:628,errorCodewordsPerBlock:30}},{L:{groups:[[3,117],[10,118]],totalDataCodewords:1531,errorCodewordsPerBlock:30},M:{groups:[[3,45],[23,46]],totalDataCodewords:1193,errorCodewordsPerBlock:28},Q:{groups:[[4,24],[31,25]],totalDataCodewords:871,errorCodewordsPerBlock:30},H:{groups:[[11,15],[31,16]],totalDataCodewords:661,errorCodewordsPerBlock:30}},{L:{groups:[[7,116],[7,117]],totalDataCodewords:1631,errorCodewordsPerBlock:30},M:{groups:[[21,45],[7,46]],totalDataCodewords:1267,errorCodewordsPerBlock:28},Q:{groups:[[1,23],[37,24]],totalDataCodewords:911,errorCodewordsPerBlock:30},H:{groups:[[19,15],[26,16]],totalDataCodewords:701,errorCodewordsPerBlock:30}},{L:{groups:[[5,115],[10,116]],totalDataCodewords:1735,errorCodewordsPerBlock:30},M:{groups:[[19,47],[10,48]],totalDataCodewords:1373,errorCodewordsPerBlock:28},Q:{groups:[[15,24],[25,25]],totalDataCodewords:985,errorCodewordsPerBlock:30},H:{groups:[[23,15],[25,16]],totalDataCodewords:745,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[3,116]],totalDataCodewords:1843,errorCodewordsPerBlock:30},M:{groups:[[2,46],[29,47]],totalDataCodewords:1455,errorCodewordsPerBlock:28},Q:{groups:[[42,24],[1,25]],totalDataCodewords:1033,errorCodewordsPerBlock:30},H:{groups:[[23,15],[28,16]],totalDataCodewords:793,errorCodewordsPerBlock:30}},{L:{groups:[[17,115]],totalDataCodewords:1955,errorCodewordsPerBlock:30},M:{groups:[[10,46],[23,47]],totalDataCodewords:1541,errorCodewordsPerBlock:28},Q:{groups:[[10,24],[35,25]],totalDataCodewords:1115,errorCodewordsPerBlock:30},H:{groups:[[19,15],[35,16]],totalDataCodewords:845,errorCodewordsPerBlock:30}},{L:{groups:[[17,115],[1,116]],totalDataCodewords:2071,errorCodewordsPerBlock:30},M:{groups:[[14,46],[21,47]],totalDataCodewords:1631,errorCodewordsPerBlock:28},Q:{groups:[[29,24],[19,25]],totalDataCodewords:1171,errorCodewordsPerBlock:30},H:{groups:[[11,15],[46,16]],totalDataCodewords:901,errorCodewordsPerBlock:30}},{L:{groups:[[13,115],[6,116]],totalDataCodewords:2191,errorCodewordsPerBlock:30},M:{groups:[[14,46],[23,47]],totalDataCodewords:1725,errorCodewordsPerBlock:28},Q:{groups:[[44,24],[7,25]],totalDataCodewords:1231,errorCodewordsPerBlock:30},H:{groups:[[59,16],[1,17]],totalDataCodewords:961,errorCodewordsPerBlock:30}},{L:{groups:[[12,121],[7,122]],totalDataCodewords:2306,errorCodewordsPerBlock:30},M:{groups:[[12,47],[26,48]],totalDataCodewords:1812,errorCodewordsPerBlock:28},Q:{groups:[[39,24],[14,25]],totalDataCodewords:1286,errorCodewordsPerBlock:30},H:{groups:[[22,15],[41,16]],totalDataCodewords:986,errorCodewordsPerBlock:30}},{L:{groups:[[6,121],[14,122]],totalDataCodewords:2434,errorCodewordsPerBlock:30},M:{groups:[[6,47],[34,48]],totalDataCodewords:1914,errorCodewordsPerBlock:28},Q:{groups:[[46,24],[10,25]],totalDataCodewords:1354,errorCodewordsPerBlock:30},H:{groups:[[2,15],[64,16]],totalDataCodewords:1054,errorCodewordsPerBlock:30}},{L:{groups:[[17,122],[4,123]],totalDataCodewords:2566,errorCodewordsPerBlock:30},M:{groups:[[29,46],[14,47]],totalDataCodewords:1992,errorCodewordsPerBlock:28},Q:{groups:[[49,24],[10,25]],totalDataCodewords:1426,errorCodewordsPerBlock:30},H:{groups:[[24,15],[46,16]],totalDataCodewords:1096,errorCodewordsPerBlock:30}},{L:{groups:[[4,122],[18,123]],totalDataCodewords:2702,errorCodewordsPerBlock:30},M:{groups:[[13,46],[32,47]],totalDataCodewords:2102,errorCodewordsPerBlock:28},Q:{groups:[[48,24],[14,25]],totalDataCodewords:1502,errorCodewordsPerBlock:30},H:{groups:[[42,15],[32,16]],totalDataCodewords:1142,errorCodewordsPerBlock:30}},{L:{groups:[[20,117],[4,118]],totalDataCodewords:2812,errorCodewordsPerBlock:30},M:{groups:[[40,47],[7,48]],totalDataCodewords:2216,errorCodewordsPerBlock:28},Q:{groups:[[43,24],[22,25]],totalDataCodewords:1582,errorCodewordsPerBlock:30},H:{groups:[[10,15],[67,16]],totalDataCodewords:1222,errorCodewordsPerBlock:30}},{L:{groups:[[19,118],[6,119]],totalDataCodewords:2956,errorCodewordsPerBlock:30},M:{groups:[[18,47],[31,48]],totalDataCodewords:2334,errorCodewordsPerBlock:28},Q:{groups:[[34,24],[34,25]],totalDataCodewords:1666,errorCodewordsPerBlock:30},H:{groups:[[20,15],[61,16]],totalDataCodewords:1276,errorCodewordsPerBlock:30}}],Tf="numeric",Mf="alphanumeric",Of="byte",Bf={1:0},Rf={0:1},Ef={15:20,16:20,18:24,19:24,22:20,24:22,26:24,28:20,30:20,31:24,32:28,33:24,36:18,37:22,39:20,40:24},Lf=[1,0,1,1,1],If=[1,0,1],zf={L:"01",M:"00",Q:"11",H:"10"},Vf=["11101100","00010001"],jf=93,Df=[function(t,e){return(t+e)%2==0},function(t){return t%2==0},function(t){return t%3==0},function(t,e){return(t+e)%3==0},function(t,e){return(Math.floor(t/2)+Math.floor(e/3))%2==0},function(t,e){return t*e%2+t*e%3==0},function(t,e){return(t*e%2+t*e%3)%2==0},function(t,e){return((t+e)%2+t*e%3)%2==0}],Hf=/^\d+/,Uf=new RegExp("^[A-Z $%*+./:-]+"),Ff=new RegExp("^[A-Z0-9 $%*+./:-]+"),Nf=new RegExp("^[^A-Z0-9 $%*+./:-]+"),Gf=8,Wf=5,Xf=8,qf=17,Yf=9,Zf=16,Qf=[[1,0],[1,25,0]];function Kf(){kf.call(this),this.initProperties(),this.mode=vf[this.encodingMode]}function $f(t,e,o,i){for(var r=0;r<t.length;r++)t[r][o][i]=e}function Jf(t,e,o,i){for(var r=0;r<Df.length;r++)t[r][o][i]=Df[r](o,i)?1^e:parseInt(e,10)}function tg(t,e){for(var o,i=Qf[e-1],r=new Array(e).concat(t),n=new Array(r.length-i.length).concat(i),s=t.length,a=[],h=0;h<s;h++)o=function(t,e){for(var o=[],i=t.length-1;o[i]=Rf[(t[i]+e)%255],void 0!==t[--i];);return o}(n,Bf[r[r.length-1]]),n.splice(0,1),r=function(t,e){for(var o=[],i=t.length-2;0<=i;i--)o[i]=t[i]^e[i];return o}(o,r);for(h=r.length-1;0<=h;h--)a[e-1-h]=nf(r[h],8);return a}function eg(t,e,o,i,r){var n,s=Hf.exec(t),a=s?s[0]:"",h=Uf.exec(t),s=h?h[0]:"",h=Ff.exec(t),h=h?h[0]:"",t=a&&(a.length>=e||t.length===a.length||a.length>=o&&!Ff.test(t.charAt(a.length)))?(n=Tf,a):h&&(t.length===h.length||h.length>=i||r===Mf)?(n=Mf,a||s):(n=Of,h?h+Nf.exec(t.substring(h.length))[0]:Nf.exec(t)[0]);return{mode:n,modeString:t}}function og(t,e){for(var o=0,i=Pf.length-1,r=Math.floor(Pf.length/2);t<Pf[r][e].totalDataCodewords?i=r:o=r,r=o+Math.floor((i-o)/2),1<i-o;);return t<=Pf[o][e].totalDataCodewords?r+1:i+1}function ig(t,e,o){var i=sf(e),r=e.length-1,e=t<<r,o=nf(t,o-r),i=function(t,e){for(var o=e.toString(2).length,i=t.toString(2).length,r=t;o<=(i=(r^=e<<i-o).toString(2).length););return r}(e,i);return o+nf(i,r)}function rg(t,e){return parseInt(t.charAt(e),10)}function ng(t,e){for(var o=t[0],i=0,r=e.length,n=0,s=8;n<=8;n++)6!==n&&$f(t,rg(e,r-1-i++),n,s);for(n=8,s=7;0<=s;s--)6!==s&&$f(t,rg(e,r-1-i++),n,s);for(i=0,s=o.length-1,n=8;s>=o.length-8;s--)$f(t,rg(e,r-1-i++),n,s);for($f(t,1,o.length-8,8),n=o.length-7,s=8;n<o.length;n++)$f(t,rg(e,r-1-i++),n,s)}function sg(t,e){for(var o,i,r,n=t[0].length,s=n-11,a=n-11,h=0;h<e.length;h++)o=Math.floor(h/3),i=h%3,$f(t,r=rg(e,e.length-h-1),0+o,s+i),$f(t,r,a+i,0+o)}function ag(t,e,o,i){for(var r,n=e.length+2,s=e.length+1,a=0;a<e.length;a++)for(var h=a;h<n-a;h++)$f(t,r=e[a],o+h,i+a),$f(t,r,o+a,i+h),$f(t,r,o+s-h,i+s-a),$f(t,r,o+s-a,i+s-h)}function hg(t,e,o,i){for(var r=o,n=i,s=t[0];$f(t,0,r,i),$f(t,0,o,n),r+=e[0],n+=e[1],0<=r&&r<s.length;);}function pg(t,e,o,i,r){e[t][i]=(e[t][i]<<1^r)%128,e[t][i]===jf&&(o[t]+=40)}function lg(t,e,o,i,r,n){o[t][n]===i?r[t][n]++:(o[t][n]=i,5<=r[t][n]&&(e[t]+=3+r[t][n]-5),r[t][n]=1)}function cg(t,e,o){var i=(new(o&&0<=o.toLowerCase().indexOf("utf_8")?Af:yf)).getEncodingResult(t,e),r=i.version,n=Pf[r-1][e],s=function(t,e){for(var o,i=0,r=[],n=[],s=e.groups,a=0;a<s.length;a++)for(var h=s[a][0],p=0;p<h;p++){for(var l=s[a][1],c=[],u=[],d=1;d<=l;d++)o=t.substring(i,i+8),c.push(o),u[l-d]=sf(o),i+=8;r.push(c),n.push(tg(u,e.errorCodewordsPerBlock))}return[r,n]}(function(t){for(var e=8*n.totalDataCodewords,o=0,i=0,r=t;r.length<e&&o<"0000".length;)r+="0000".charAt(o++);for(r.length%8!=0&&(r+=new Array(9-r.length%8).join("0"));r.length<e;)r+=Vf[i],i^=1;return r}(i.dataString),n),o=function(){for(var t=[],e=17+4*r,o=0;o<Df.length;o++){t[o]=new Array(e);for(var i=0;i<e;i++)t[o][i]=new Array(e)}return t}();i=(t=o)[0].length,ag(t,Lf,0,0),hg(t,[-1,-1],7,7),ag(t,Lf,i-7,0),hg(t,[1,-1],i-8,7),ag(t,Lf,0,i-7),hg(t,[-1,1],7,i-8),function(t,e){if(!(e<2)){var o,i=t[0],r=i.length,n=Math.floor(e/7),s=[6],a=0;for((e=Ef[e])?o=(r-13-e)/n:e=o=(r-13)/(n+1),s.push(s[a++]+e);s[a]+o<r;)s.push(s[a++]+o);for(var h=0;h<s.length;h++)for(var p=0;p<s.length;p++)void 0===i[s[h]][s[p]]&&ag(t,If,s[h]-2,s[p]-2)}}(o,r),function(t){for(var e=1,o=t[0].length,i=8;i<o-8;i++)$f(t,e,6,i),$f(t,e,i,6),e^=1}(o),7<=r&&sg(o,nf(0,18)),ng(o,nf(0,15)),function(t,e){for(var o,i,r,n=new ff(t[0]),s=0;s<e.length;s++)for(o=e[s],i=0;0<o.length;){for(var a=0;a<o.length;a++)for(var h=0;h<8;h++)r=n.getNextCell(),Jf(t,o[a][i].charAt(h),r.row,r.column);for(i++;o[0]&&i===o[0].length;)o.splice(0,1)}for(;r=n.getNextRemainderCell();)Jf(t,0,r.row,r.column)}(o,s);s=function(t){for(var e,o=[],i=[],r=[],n=[],s=[],a=t[0].length,h=0;h<t.length;h++)o[h]=0,r[h]=0,s[h]=[0,0],n[h]=[0,0],i[h]=[];for(var p=0;p<a;p++)for(var l=0;l<a;l++)for(var c=0;c<t.length;c++)e=t[c],r[c]+=parseInt(e[p][l],10),i[c][0]===e[p][l]&&p+1<a&&0<=l-1&&e[p+1][l]===i[c][0]&&e[p+1][l-1]===i[c][0]&&(o[c]+=3),pg(c,n,o,0,e[p][l]),pg(c,n,o,1,e[l][p]),lg(c,o,i,e[p][l],s,0),lg(c,o,i,e[l][p],s,1);var u,d,f,g,y=a*a,v=Number.MAX_VALUE;for(h=0;h<o.length;h++)o[h]+=(d=r[h],f=y,g=void 0,g=Math.floor(d/f*100),d=g%5,f=Math.abs(g-d-50),d=Math.abs(g+5-d-50),10*Math.min(f/5,d/5)),o[h]<v&&(v=o[h],u=h);return u}(o),o=o[s];return 7<=r&&sg([o],ig(r,"1111100100101",18)),ng([o],function(t){var e="";if(0===sf(t))return"101010000010010";for(var o=ig(sf(t),"10100110111",15),i=0;i<o.length;i++)e+=o.charAt(i)^"101010000010010".charAt(i);return e}(zf[e]+nf(s,3))),o}!function(){for(var t,e=1;e<255;e++)255<(t=2*Rf[e-1])&&(t^=285),Rf[e]=t,Bf[t]=e;t=2*Rf[e-1]^285,Rf[e]=t,Rf[-1]=0}(),function(){for(var t=2;t<=68;t++){var e=Qf[t-1];Qf[t]=function(t,e){for(var o=[],i=0;i<t.length;i++)for(var r=0;r<e.length;r++)void 0===o[i+r]?o[i+r]=(t[i]+(0<=e[r]?e[r]:0))%255:o[i+r]=Bf[Rf[o[i+r]]^Rf[(t[i]+e[r])%255]];return o}(e,[t,0])}}();var ug,dg=Math.round,fg=[[0,1],[1,1],[1,2],[2,2],[2,1],[3,1],[3,0],[2,0],[2,-1],[1,-1],[1,0]],gg=[[0,1],[1,1],[1,0]],ee=((ug=P.Class)&&(yg.__proto__=ug),((yg.prototype=Object.create(ug&&ug.prototype)).constructor=yg).prototype.destroy=function(){this._destroySurface()},yg.prototype._initElement=function(){_(this.element,"k-qrcode")},yg.prototype._initSurface=function(){var t=this.options,e=this.surface;e&&e.options.type===t.renderAs||(this._destroySurface(),this._initSurfaceElement(),this.surface=this._createSurface())},yg.prototype._createSurface=function(){return P.drawing.Surface.create(this.surfaceElement,{type:this.options.renderAs})},yg.prototype._destroySurface=function(){this.surface&&(this.surface.destroy(),this.surface=null,this._destroySurfaceElement())},yg.prototype._initSurfaceElement=function(){this.surfaceElement||(this.surfaceElement=document.createElement("div"),this.surfaceElement.style.position="relative",this.element.appendChild(this.surfaceElement))},yg.prototype._destroySurfaceElement=function(){this.surfaceElement&&this.surfaceElement.parentNode&&(this.surfaceElement.parentNode.removeChild(this.surfaceElement),this.surfaceElement=null)},yg.prototype.redraw=function(){var t=this._getSize();this.surface.clear(),this.surface.setSize({width:t,height:t}),this.createVisual(),this.surface.draw(this.visual)},yg.prototype.getSize=function(){var t=this.element,e=t.clientWidth,o=t.clientHeight,t={width:0,height:0};return 0<e&&(t.width=e),o&&(t.height=o),t},yg.prototype._resize=function(){this.redraw()},yg.prototype.createVisual=function(){this.visual=this._render()},yg.prototype.exportVisual=function(){return this._render()},yg.prototype._render=function(){var t,e,o,i,r,n=this._value,s=this.options.border||{},a=this.options.padding||0,h=s.width||0;s.width=h;var p=new P.drawing.Group;try{n&&(o=cg(n,this.options.errorCorrection,this.options.encoding),r=(i=this._getSize())-2*(h+a),t=this._calculateBaseUnit(r,o.length),e=h+a+(r-o.length*t)/2,p.append(this._renderBackground(i,s)),p.append(this._renderMatrix(o,t,e)),this._hasCustomLogo()?p.append(this._renderLogo(i,t)):this._isSwiss()&&p.append(this._renderSwissCode(i,t)))}catch(t){this.onError(t)}return p},yg.prototype._renderLogo=function(t,e){var o=dg(t/2),t=this._getLogoSize(7*e),e=this.options.overlay.imageUrl,o={x:o-t.width/2,y:o-t.height/2},t=new P.geometry.Rect(new P.geometry.Point(o.x,o.y),new P.geometry.Size(t.width,t.height));return new P.drawing.Image(e,t)},yg.prototype._renderSwissCode=function(t,e){var o=this._getLogoSize(7*e),i=(o=Math.max(o.width,o.height))/4,r=i/2,n=t/2,s={},t=new P.drawing.Group;return s.x=s.y=Math.ceil(n-e-o/2),t.append(this._renderShape(s,Math.ceil(o+2*e),gg,"#fff")),s.x=s.y=n-o/2,t.append(this._renderShape(s,o,gg,this.options.color)),s.x=n+r-o/2,s.y=n+r+i-o/2,t.append(this._renderShape(s,i,fg,"#fff")),t},yg.prototype._renderShape=function(t,e,o,i){var r=new P.drawing.MultiPath({fill:{color:i},stroke:null});r.moveTo(t.x,t.y);for(var n=0;n<o.length;n++)r.lineTo(t.x+e*o[n][0],t.y+e*o[n][1]);return r.close(),r},yg.prototype._getSize=function(){var t;return this.options.size?parseInt(this.options.size,10):(t=this.element,0<(t=Math.min(t.clientWidth,t.clientHeight))?t:200)},yg.prototype._calculateBaseUnit=function(t,e){var o,i=Math.floor(t/e);return i<1?(o=Math.ceil(+e),this.onError(new Error("Insufficient size for QR Code: the current size is "+t+"px and the minimum size is "+o+"px."))):t<=i*e&&1<=i-1&&i--,i},yg.prototype._renderMatrix=function(t,e,o){for(var i=new P.drawing.MultiPath({fill:{color:this.options.color},stroke:null}),r=0;r<t.length;r++)for(var n=o+r*e,s=0;s<t.length;){for(;0===t[r][s]&&s<t.length;)s++;if(s<t.length){for(var a=s;1===t[r][s];)s++;var h=dg(o+a*e),p=dg(n),l=dg(o+s*e),a=dg(n+e);i.moveTo(h,p).lineTo(h,a).lineTo(l,a).lineTo(l,p).close()}}return i},yg.prototype._renderBackground=function(t,e){t=new qt(0,0,t,t).unpad(e.width/2);return P.drawing.Path.fromRect(t.toRect(),{fill:{color:this.options.background},stroke:{color:e.color,width:e.width}})},yg.prototype.setOptions=function(t){this.options=of(this.options,t||{}),void 0!==t.value&&(this._value=String(this.options.value)),this.redraw()},yg.prototype.value=function(t){if(void 0===t)return this._value;this._value=String(t),this.redraw()},yg.prototype._hasCustomLogo=function(){return Boolean(this.options.overlay.imageUrl)},yg.prototype._isSwiss=function(){return"swiss"===this.options.overlay.type},yg.prototype._getLogoSize=function(t){var e=this.options.overlay.width,o=this.options.overlay.height;return e||o?e&&!o?o=e:!e&&o&&(e=o):e=o=t,{width:e,height:o}},yg);function yg(t,e,o){void 0===o&&(o=Dt),ug.call(this),this.options=z({},this.options,e),this.element=t,this.wrapper=this.element,this.onError=o,this._initElement(),this._initSurface(),this.setOptions(e)}kt(ee,{name:"QRCode",renderAs:"svg",encoding:"ISO_8859_1",value:"",errorCorrection:"L",background:"#fff",color:"#000",size:"",padding:0,border:{color:"",width:0},overlay:{type:"image",imageUrl:"",width:0,height:0}});function vg(e){return void 0===e&&(e="ISO_8859_1"),function(t){try{cg(t,"L",e)}catch(t){return{valid:!1,error:t}}return{valid:!0}}}var mg=ee,xg={WGS84:{a:6378137,b:6356752.314245179,f:.0033528106647474805,e:.08181919084262149}};function _g(t){return t*t}var bg,wg,Cg=Math,Sg=Cg.abs,kg=Cg.atan,Ag=Cg.atan2,Pg=Cg.cos,Tg=Cg.sin,Mg=Cg.tan,Og=((wg=P.Class)&&(Gg.__proto__=wg),((Gg.prototype=Object.create(wg&&wg.prototype)).constructor=Gg).prototype.initProperties=function(){z(this,{DISTANCE_ITERATIONS:100,DISTANCE_CONVERGENCE:1e-12,DISTANCE_PRECISION:2,FORMAT:"{0:N6}{1:N6}"})},Gg.prototype.toArray=function(){return[this.lat,this.lng]},Gg.prototype.equals=function(t){return t&&t.lat===this.lat&&t.lng===this.lng},Gg.prototype.clone=function(){return new Gg(this.lat,this.lng)},Gg.prototype.round=function(t){return this.lng=bt(this.lng,t),this.lat=bt(this.lat,t),this},Gg.prototype.wrap=function(){return this.lng=this.lng%180,this.lat=this.lat%90,this},Gg.prototype.distanceTo=function(t,e){return this.greatCircleTo(t,e).distance},Gg.prototype.destination=function(t,e,o){var i=_t(e),r=o||xg.WGS84,e=_t(this.lat),o=_t(this.lng),t=t/r.a,r=Cg.asin(Tg(e)*Pg(t)+Pg(e)*Tg(t)*Pg(i)),e=o+Ag(Tg(i)*Tg(t)*Pg(e),Pg(t)-Tg(e)*Tg(r));return new Gg(ct(r),ct(e))},Gg.prototype.greatCircleTo=function(t,e){var o=Gg.create(void 0),i=e||xg.WGS84;if(!o||this.clone().round(8).equals(o.clone().round(8)))return{distance:0,azimuthFrom:0,azimuthTo:0};for(var r,n,s=i.a,a=i.b,h=i.f,p=_t(o.lng-this.lng),e=kg((1-h)*Mg(_t(this.lat))),l=Tg(e),c=Pg(e),i=kg((1-h)*Mg(_t(o.lat))),u=Tg(i),d=Pg(i),f=p,g=this.DISTANCE_ITERATIONS,y=!1;!y&&0<g--;){var v=Tg(f),m=Pg(f),x=Cg.sqrt(_g(d*v)+_g(c*u-l*d*m)),_=Ag(x,n=l*u+c*d*m),b=c*d*v/x,w=0;0!=(r=1-_g(b))&&(w=n-2*l*u/r);var C=f,S=h/16*r*(4+h*(4-3*r)),f=p+(1-S)*h*b*(_+S*x*(w+S*n*(2*_g(w)-1))),y=Sg(f-C)<=this.DISTANCE_CONVERGENCE}e=r*(_g(s)-_g(a))/_g(a),o=1+e/16384*(4096+e*(e*(320-175*e)-768)),i=e/1024*(256+e*(e*(74-47*e)-128)),s=i*x*(w+i/4*(n*(2*_g(w)-1)-i/6*w*(4*_g(x)-3)*(4*_g(w)-3))),e=Ag(d*v,c*u-l*d*m),i=Ag(c*v,-l*d+c*u*m);return{distance:bt(a*o*(_-s),this.DISTANCE_PRECISION),azimuthFrom:ct(e),azimuthTo:ct(i)}},Gg.prototype.toString=function(){return String(this.lat)+","+String(this.lng)},Gg.fromLngLat=function(t){return new Gg(t[1],t[0])},Gg.fromLatLng=function(t){return new Gg(t[0],t[1])},Gg.create=function(t,e){if(lt(t))return t instanceof Gg?t.clone():1===arguments.length&&2===t.length?Gg.fromLatLng(t):new Gg(t,e)},Gg),Bg=Math,Rg=Bg.atan,Eg=Bg.exp,Lg=Bg.pow,Ig=Bg.sin,zg=Bg.log,Vg=Bg.tan,jg=P.geometry.Point,Dg=Bg.PI,Hg=Dg/2,Ug=Dg/4,Fg=Dg/180,at=xg.WGS84,Fe=((bg=P.Class)&&(Ng.__proto__=bg),((Ng.prototype=Object.create(bg&&bg.prototype)).constructor=Ng).prototype._initOptions=function(t){this.options=z({},this.options,t)},Ng.prototype.initProperties=function(){z(this,{MAX_LNG:180,MAX_LAT:85.0840590501,INVERSE_ITERATIONS:15,INVERSE_CONVERGENCE:1e-12})},Ng.prototype.forward=function(t,e){var o=this.options,i=o.datum.a,r=o.centralMeridian,o=mt(t.lat,-this.MAX_LAT,this.MAX_LAT),t=e?mt(t.lng,-this.MAX_LNG,this.MAX_LNG):t.lng,i=_t(t-r)*i,o=this._projectLat(o);return new jg(i,o)},Ng.prototype._projectLat=function(t){var e=this.options.datum,o=e.e,i=e.a,e=_t(t),t=Vg(Ug+e/2),e=o*Ig(e),o=Lg((1-e)/(1+e),o/2);return i*zg(t*o)},Ng.prototype.inverse=function(t,e){var o=this.options,i=o.datum.a,o=o.centralMeridian,o=t.x/(Fg*i)+o,t=mt(this._inverseY(t.y),-this.MAX_LAT,this.MAX_LAT);return e&&(o=mt(o,-this.MAX_LNG,this.MAX_LNG)),new Og(t,o)},Ng.prototype._inverseY=function(t){for(var e=this.options.datum,o=e.a,i=e.e,r=i/2,n=Eg(-t/o),s=Hg-2*Rg(n),a=0;a<=this.INVERSE_ITERATIONS;a++){var h=i*Ig(s),h=Lg((1-h)/(1+h),r),h=Hg-2*Rg(n*h)-s;if(s+=h,Bg.abs(h)<=this.INVERSE_CONVERGENCE)break}return ct(s)},Ng);function Ng(t){bg.call(this),this.initProperties(),this._initOptions(t)}function Gg(t,e){wg.call(this),this.initProperties(),1===arguments.length?(this.lat=t[0],this.lng=t[1]):(this.lat=t,this.lng=e)}kt(Fe,{centralMeridian:0,datum:at});function Wg(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Xg(t,e){e.insertBefore(t,e.firstChild)}function qg(t){return t.replace(/([a-z][A-Z])/g,function(t){return t.charAt(0)+"-"+t.charAt(1).toLowerCase()})}function Yg(t){return t&&String(t).endsWith("px")?t:String(t)+"px"}var Zg,Qg,Kg,$g=((Kg=Fe)&&(ny.__proto__=Kg),((ny.prototype=Object.create(Kg&&Kg.prototype)).constructor=ny).prototype.initProperties=function(){Kg.prototype.initProperties.call(this),z(this,{MAX_LAT:85.0511287798})},ny.prototype._projectLat=function(t){var e=this.options.datum.a,t=_t(t),t=Vg(Ug+t/2);return e*zg(t)},ny.prototype._inverseY=function(t){var e=this.options.datum.a,e=Eg(-t/e);return ct(Hg-2*Rg(e))},ny),Jg=((Qg=P.Class)&&(ry.__proto__=Qg),((ry.prototype=Object.create(Qg&&Qg.prototype)).constructor=ry).prototype.forward=function(t){return new jg(t.lng,t.lat)},ry.prototype.inverse=function(t){return new Og(t.y,t.x)},(Zg=P.Class)&&(iy.__proto__=Zg),((iy.prototype=Object.create(Zg&&Zg.prototype)).constructor=iy).prototype.toPoint=function(t,e,o){return this._proj.forward(t,o).transform(this._tm).scale(e||1)},iy.prototype.toLocation=function(t,e,o){e=t.clone().scale(1/(e||1)).transform(this._itm);return this._proj.inverse(e,o)},iy),ty=(P.Class,P.Class,Object.defineProperty),ey=(Object.assign,function(t){var e=document.createElement("div");return e.innerHTML=t,e.firstChild}),oy=function(t){var e,o,i=!1,r=[],n={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.?(\d+(\.\d+)?)?/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},s={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},a={tablet:/playbook|ipad|fire/i},h={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(o in n)if(n.hasOwnProperty(o)&&(r=t.match(n[o]))){if("windows"===o&&"plugins"in navigator)return!1;(i={}).device=o,i.tablet=sy(o,a,!1),i.browser=sy(t,h,"default"),i.name=sy(o,s),i[i.name]=!0,i.majorVersion=r[2],i.minorVersion=(r[3]||"0").replace("_","."),e=i.minorVersion.replace(".","").substr(0,2),i.flatVersion=i.majorVersion+e+new Array(3-(e.length<3?e.length:2)).join("0");break}return i};function iy(){Zg.call(this);var t=this._proj=new $g,t=this.c=2*Dg*t.options.datum.a;this._tm=P.geometry.transform().translate(.5,.5).scale(1/t,-1/t),this._itm=P.geometry.transform().scale(t,-t).translate(-.5,-.5)}function ry(){Qg.apply(this,arguments)}function ny(){Kg.apply(this,arguments)}function sy(t,e,o){for(var i in e)if(e.hasOwnProperty(i)&&e[i].test(t))return i;return void 0!==o?o:t}function ay(){var t=oy(navigator.userAgent),e=(r=function(t){var e,o=!1,i=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(e in r)if(r.hasOwnProperty(e)&&(i=t.match(r[e]))){(o={})[e]=!0,o[i[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,o.version=parseInt(document.documentMode||i[2],10);break}return o}(navigator.userAgent)).chrome,o=r.crios,i=r.mozilla,r=r.safari,n={};n.mobileOS=t,n.touch="ontouchstart"in window,n.pointers=!e&&!o&&!i&&!r&&window.PointerEvent,n.msPointers=!e&&window.MSPointerEvent,n.mouseAndTouchPresent=n.touch&&!(n.mobileOS.ios||n.mobileOS.android),n.eventCapture=document.documentElement.addEventListener;var s=document.createElement("table"),a=n.transitions=!1,h=n.transforms=!1;return["Moz","webkit","O","ms"].forEach(function(t){var e="string"==typeof s.style[t+"Transition"];if(e||"string"==typeof s.style[t+"Transform"]){var o=t.toLowerCase();return h={css:"ms"!==o?"-"+o+"-":"",prefix:t,event:"o"===o||"webkit"===o?o:""},e&&((a=h).event=a.event?a.event+"TransitionEnd":"transitionend"),!1}}),s=null,n.transforms=h,n.transitions=a,n.delayedClick=function(){if(n.touch){if(n.mobileOS.ios)return!0;if(n.mobileOS.android){if(!n.browser.chrome)return!0;if(n.browser.version<32)return!1;var t=document.querySelector("meta[name=viewport]");return!(t?t.getAttribute("content"):"").match(/user-scalable=no/i)}}return!1},n}function hy(t,e){return t.bind(e)}function py(t,e,o,i,r){uy(t,e,o,i,r)}function ly(t,e,o,i,r){var n,s,a;n=t,s=o,a=i,(x(e=e)?e:(e||"").split(" ")).forEach(function(t){dy(n,t,s,a)})}var cy=function(){var t={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},e=ay();return e.touch&&(e.mobileOS.ios||e.mobileOS.android)?t={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:e.pointers?t={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:e.msPointers&&(t={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),t},uy=function(s,t,a,h,p){(x(t)?t:(t||"").split(" ")).forEach(function(t){var o,e,i,r,n;n=i=h,(e=a)&&E(e)&&!i?n=e:e&&"string"==typeof e&&E(n)&&(r=e),(o=s).addEventListener(t,function(t){var e=t.target?t.target.closest(r):null;(!r||t.target&&e)&&(e=r?e:t.currentTarget,ty(t,"currentTarget",{value:e}),ty(t,"delegateTarget",{value:o}),n(t))},Boolean(p))})},dy=function(t,e,o,i){t.removeEventListener(e,o,Boolean(i))},fy=cy(navigator.userAgent);function gy(t){return fy[t]||t}function yy(t){return t.replace(by,gy)}function vy(t,e){var o=t.prototype;o.events?e.forEach(function(t){o.events.indexOf(t)<0&&o.events.push(t)}):o.events=e}function my(){return Number(new Date)}function xy(){}var _y,by=/([^ ]+)/g,wy=G.compile,Cy=((_y=P.Class)&&(Sy.__proto__=_y),((Sy.prototype=Object.create(_y&&_y.prototype)).constructor=Sy).prototype._initOptions=function(t){this.options=z({},this.options,t)},Sy.prototype.filter=function(t,e){this._extent=t,this._zoom=e,this._render()},Sy.prototype.add=function(t){var e=t;lt(t)&&(this.items.push(e="string"==typeof t?{text:t}:e),this._render())},Sy.prototype.remove=function(t){for(var e=[],o=0;o<this.items.length;o++){var i=this.items[o];i.text!==t&&e.push(i)}this.items=e,this._render()},Sy.prototype.clear=function(){this.items=[],Wg(this.element)},Sy.prototype._render=function(){for(var t=[],e=wy(this.options.itemTemplate),o=0;o<this.items.length;o++){var i=this.items[o],i=this._itemText(i);""!==i&&t.push(e({text:i}))}0<t.length?(Wg(this.element),function(t,e){var o=document.createElement("div");for(o.innerHTML=t;0<o.childNodes.length;)e.appendChild(o.childNodes[0])}(t.join(this.options.separator),this.element),this.showElement()):this.hideElement()},Sy.prototype.hideElement=function(){this.element.style.display="none"},Sy.prototype.showElement=function(){this.element.style.display=""},Sy.prototype._itemText=function(t){var e="",o=this._inZoomLevel(t.minZoom,t.maxZoom),i=this._inArea(t.extent);return o&&i&&(e+=t.text),e},Sy.prototype._inZoomLevel=function(t,e){t=Ct(t,-Number.MAX_VALUE),e=Ct(e,Number.MAX_VALUE);return this._zoom>t&&this._zoom<e},Sy.prototype._inArea=function(t){var e=!0;return e=t?t.contains(this._extent):e},Sy);function Sy(t,e){_y.call(this),this.element=t,this._initOptions(e),this.items=[],_(this.element,"k-widget k-attribution")}kt(Cy,{name:"Attribution",separator:" | ",itemTemplate:"#= text #"});function ky(){this._defaultPrevented=!0}function Ay(){return!0===this._defaultPrevented}var Py,eo=((Py=P.Class)&&(My.__proto__=Py),((My.prototype=Object.create(Py&&Py.prototype)).constructor=My).prototype.bind=function(t,e,o){var i,r,n=this,s="string"==typeof t?[t]:t||[],a="function"==typeof e;if(void 0===e){for(h in t)n.bind(h,t[h]);return n}for(var h=0,p=s.length;h<p;h++)!function(){var t=s[h];(r=a?e:e[t])&&(o&&(i=r,(r=function(){n.unbind(t,r),i.apply(n,arguments)}).original=i),(n._events[t]=n._events[t]||[]).push(r))}();return n},My.prototype.one=function(t,e){return this.bind(t,e,!0)},My.prototype.first=function(t,e){for(var o,i="string"==typeof t?[t]:t,r="function"==typeof e,n=0,s=i.length;n<s;n++){var a=i[n];(o=r?e:e[a])&&(this._events[a]=this._events[a]||[]).unshift(o)}return this},My.prototype.trigger=function(t,e){var o,i,r=this._events[t];if(r){var n=e||{};for(n.sender=this,n._defaultPrevented=!1,n.preventDefault=ky,n.isDefaultPrevented=Ay,o=0,i=(r=r.slice()).length;o<i;o++)r[o].call(this,n);return!0===n._defaultPrevented}return!1},My.prototype.unbind=function(t,e){var o,i=this._events[t];if(void 0===t)this._events={};else if(i)if(e)for(o=i.length-1;0<=o;o--)i[o]!==e&&i[o].original!==e||i.splice(o,1);else this._events[t]=[];return this},My),Ty={up:{className:"k-navigator-n",iconClass:"k-i-arrow-n"},down:{className:"k-navigator-s",iconClass:"k-i-arrow-s"},right:{className:"k-navigator-e",iconClass:"k-i-arrow-e"},left:{className:"k-navigator-w",iconClass:"k-i-arrow-w"}};function My(){Py.call(this),this._events={}}function Oy(t){t='<button class="k-button k-button-square k-rounded-full k-button-flat k-button-flat-base k-icon-button '+Ty[t].className+'" aria-label="move '+t+'"><span class="k-icon '+Ty[t].iconClass+'" /></button>';return ey(t)}var By,Ry=((By=eo)&&(Ey.__proto__=By),((Ey.prototype=Object.create(By&&By.prototype)).constructor=Ey).prototype.destroy=function(){this.dispose()},Ey.prototype.dispose=function(){ly(this._keyroot,this._keydown)},Ey.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,o=this.element,t=e.getAttribute("tabindex")||o.getAttribute("tabindex");o.removeAttribute("tabindex"),e.setAttribute("tabindex",isNaN(t)?0:t)},Ey.prototype._initOptions=function(t){this.options=z({},this.options,t)},Ey.prototype._pan=function(t,e){var o=this.options.panStep;this.trigger("pan",{x:t*o,y:e*o})},Ey.prototype._click=function(t){var e=0,o=0,i=t.currentTarget;i.matches(".k-navigator-n")?o=1:i.matches(".k-navigator-s")?o=-1:i.matches(".k-navigator-e")?e=1:i.matches(".k-navigator-w")&&(e=-1),this._pan(e,o),t.preventDefault()},Ey.prototype._keydown=function(t){switch(t.which){case Ht.UP:this._pan(0,1),t.preventDefault();break;case Ht.DOWN:this._pan(0,-1),t.preventDefault();break;case Ht.RIGHT:this._pan(1,0),t.preventDefault();break;case Ht.LEFT:this._pan(-1,0),t.preventDefault()}},Ey);function Ey(t,e){By.call(this),this.element=t,this._initOptions(e);var o=Oy("up"),i=Oy("right"),t=Oy("down"),e=Oy("left");this.element.appendChild(o),this.element.appendChild(i),this.element.appendChild(t),this.element.appendChild(e),_(this.element,"k-widget k-navigator"),py(this.element,"click",".k-button",hy(this._click,this));e=this.element.parentNode.closest("[data-role]");this._keyroot=e||this.element,this._tabindex(this._keyroot),py(this._keyroot,"keydown",hy(this._keydown,this))}function Ly(t,e){return ey('<button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-zoom-'+t+'" title="zoom-'+t+'" aria-label="zoom-'+t+'"><span class="k-icon '+e+'"></span></button>')}kt(Ry,{name:"Navigator",panStep:1}),vy(Ry,["pan"]);var Iy,zy=((Iy=eo)&&(Vy.__proto__=Iy),((Vy.prototype=Object.create(Iy&&Iy.prototype)).constructor=Vy).prototype.destroy=function(){this.element&&ly(this.element,"click",this._clickHandler),this._keyroot&&ly(this._keyroot,"keydown",this._keydownHandler)},Vy.prototype._tabindex=function(t){var e=t||this.wrapper||this.element,o=this.element,t=e.getAttribute("tabindex")||o.getAttribute("tabindex");o.removeAttribute("tabindex"),e.setAttribute("tabindex",isNaN(t)?0:t)},Vy.prototype._initOptions=function(t){this.options=z({},this.options,t)},Vy.prototype._change=function(t){var e=this.options.zoomStep;this.trigger("change",{delta:t*e})},Vy.prototype._click=function(t){var e=1;Q(t.currentTarget,"k-zoom-out")&&(e=-1),this._change(e),t.preventDefault()},Vy.prototype._keydown=function(t){switch(t.which){case Ht.NUMPAD_PLUS:case 187:case 61:this._change(1);break;case Ht.NUMPAD_MINUS:case 189:case 173:this._change(-1)}},Vy);function Vy(t,e){Iy.call(this),this.element=t,this._initOptions(e);t=Ly("in","k-i-plus"),e=Ly("out","k-i-minus");this.element.appendChild(t),this.element.appendChild(e),_(this.element,"k-widget k-zoom-control k-button-group k-group-horizontal"),this._clickHandler=this._click.bind(this),py(this.element,"click",".k-button",this._clickHandler);e=this.element.parentNode.closest("[data-role]");this._keyroot=e||this.element,this._tabindex(this._keyroot),this._keydownHandler=this._keydown.bind(this),py(this._keyroot,"keydown",this._keydownHandler)}kt(zy,{name:"ZoomControl",zoomStep:1}),vy(zy,["change"]);var jy,ge=Math,Dy=ge.max,Hy=ge.min,Uy=function(o){function i(t,e){o.call(this);t=Og.create(t),e=Og.create(e);t.lng+180>e.lng+180&&t.lat+90<e.lat+90?(this.se=t,this.nw=e):(this.se=e,this.nw=t)}o&&(i.__proto__=o);var t={World:{configurable:!0}};return((i.prototype=Object.create(o&&o.prototype)).constructor=i).prototype.contains=function(t){var e=this.nw,o=this.se,i=Ct(t.lng,t[1]),r=Ct(t.lat,t[0]);return t&&i+180>=e.lng+180&&i+180<=o.lng+180&&r+90>=o.lat+90&&r+90<=e.lat+90},i.prototype.center=function(){var t=this.nw,e=this.se,o=t.lng+(e.lng-t.lng)/2,t=t.lat+(e.lat-t.lat)/2;return new Og(t,o)},i.prototype.containsAny=function(t){for(var e=!1,o=0;o<t.length;o++)e=e||this.contains(t[o]);return e},i.prototype.include=function(t){var e=this.nw,o=this.se,i=Ct(t.lng,t[1]),t=Ct(t.lat,t[0]);e.lng=Hy(e.lng,i),e.lat=Dy(e.lat,t),o.lng=Dy(o.lng,i),o.lat=Hy(o.lat,t)},i.prototype.includeAll=function(t){for(var e=0;e<t.length;e++)this.include(t[e])},i.prototype.edges=function(){var t=this.nw,e=this.se;return{nw:this.nw,ne:new Og(t.lat,e.lng),se:this.se,sw:new Og(e.lat,t.lng)}},i.prototype.toArray=function(){var t=this.nw,e=this.se;return[t,new Og(t.lat,e.lng),e,new Og(e.lat,t.lng)]},i.prototype.overlaps=function(t){return this.containsAny(t.toArray())||t.containsAny(this.toArray())},i.create=function(t,e){return t instanceof i?t:t&&e?new i(t,e):t&&4===t.length&&!e?new i([t[0],t[1]],[t[2],t[3]]):void 0},t.World.get=function(){return new i([90,-180],[-90,180])},Object.defineProperties(i,t),i}(P.Class),ee=((jy=P.Class)&&(Wy.__proto__=jy),((Wy.prototype=Object.create(jy&&jy.prototype)).constructor=Wy).prototype.destroy=function(){this._deactivate()},Wy.prototype._initOptions=function(t){this.options=z({},this.options,t)},Wy.prototype.show=function(){this.reset(),this._activate(),this._applyExtent(!0)},Wy.prototype.hide=function(){this._deactivate(),this._setVisibility(!1)},Wy.prototype.reset=function(){this._beforeReset(),this._reset()},Wy.prototype._reset=function(){this._applyExtent()},Wy.prototype._beforeReset=function(){},Wy.prototype._resize=function(){},Wy.prototype._panEnd=function(){this._applyExtent()},Wy.prototype._applyExtent=function(){var t=this.options,e=this.map.zoom(),o=!lt(t.minZoom)||e>=t.minZoom,e=!lt(t.maxZoom)||e<=t.maxZoom,t=Uy.create(t.extent),t=!t||t.overlaps(this.map.extent());this._setVisibility(o&&e&&t)},Wy.prototype._setVisibility=function(t){this.element.style.display=t?"":"none"},Wy.prototype._activate=function(){var t=this.map;this._deactivate(),t.bind("beforeReset",this._beforeReset),t.bind("reset",this._reset),t.bind("resize",this._resize),t.bind("panEnd",this._panEnd)},Wy.prototype._deactivate=function(){var t=this.map;t.unbind("beforeReset",this._beforeReset),t.unbind("reset",this._reset),t.unbind("resize",this._resize),t.unbind("panEnd",this._panEnd)},Wy.prototype._updateAttribution=function(){var t=this.map.attribution;t&&t.add(this.options.attribution)},Wy.prototype._readData=function(){return this.options.data||[]},Wy.prototype._hasData=function(){return this._data&&0<this._data.length},Wy),Fy=Math,Ny=G.compile,Gy=P.geometry.Point;function Wy(t,e){jy.call(this),this.support=ay(),this._initOptions(e),this.map=t;e=document.createElement("div");_(e,"k-layer"),e.style.zIndex=this.options.zIndex,e.style.opacity=this.options.opacity,this.element=e,t.scrollElement.appendChild(this.element),this._beforeReset=this._beforeReset.bind(this),this._reset=this._reset.bind(this),this._resize=this._resize.bind(this),this._panEnd=this._panEnd.bind(this),this._activate(),this._updateAttribution()}function Xy(t){var e=t;return"string"!=typeof t&&(e+="px"),e}var qy,at=((qy=ee)&&(Yy.__proto__=qy),((Yy.prototype=Object.create(qy&&qy.prototype)).constructor=Yy).prototype.destroy=function(){qy.prototype.destroy.call(this),this._view.destroy(),this._view=null},Yy.prototype._beforeReset=function(){var t=this.map,t=t.locationToLayer(t.extent().nw).round();this._view.viewOrigin(t)},Yy.prototype._reset=function(){qy.prototype._reset.call(this),this._updateView(),this._view.reset()},Yy.prototype._viewType=function(){return Ky},Yy.prototype._activate=function(){qy.prototype._activate.call(this),this.support.mobileOS||(this._pan||(this._pan=Object(P.throttle)(this._render.bind(this),100)),this.map.bind("pan",this._pan))},Yy.prototype._deactivate=function(){qy.prototype._deactivate.call(this),this._pan&&this.map.unbind("pan",this._pan)},Yy.prototype._updateView=function(){var t=this._view,e=this.map,o=e.extent(),o={nw:e.locationToLayer(o.nw).round(),se:e.locationToLayer(o.se).round()};t.center(e.locationToLayer(e.center())),t.extent(o),t.zoom(e.zoom())},Yy.prototype._resize=function(){this._render()},Yy.prototype._panEnd=function(t){qy.prototype._panEnd.call(this,t),this._render()},Yy.prototype._render=function(){this._updateView(),this._view.render()},Yy);function Yy(t,e){qy.call(this,t,e),"string"==typeof this.options.subdomains&&(this.options.subdomains=this.options.subdomains.split(""));e=this._viewType();this._view=new e(this.element,this.options)}kt(at,{tileSize:256,subdomains:["a","b","c"],urlTemplate:"",zIndex:1});var Zy,Qy,Ky=((Qy=P.Class)&&(tv.__proto__=Qy),((tv.prototype=Object.create(Qy&&Qy.prototype)).constructor=tv).prototype._initOptions=function(t){this.options=z({},this.options,t)},tv.prototype.center=function(t){this._center=t},tv.prototype.extent=function(t){this._extent=t},tv.prototype.viewOrigin=function(t){this._viewOrigin=t},tv.prototype.zoom=function(t){this._zoom=t},tv.prototype.pointToTileIndex=function(t){return new Gy(Fy.floor(t.x/this.options.tileSize),Fy.floor(t.y/this.options.tileSize))},tv.prototype.tileCount=function(){var t=this.size(),e=this.pointToTileIndex(this._extent.nw),o=this._extent.nw,o=this.indexToPoint(e).translate(-o.x,-o.y);return{x:Fy.ceil((Fy.abs(o.x)+t.width)/this.options.tileSize),y:Fy.ceil((Fy.abs(o.y)+t.height)/this.options.tileSize)}},tv.prototype.size=function(){var t=this._extent.nw,t=this._extent.se.clone().translate(-t.x,-t.y);return{width:t.x,height:t.y}},tv.prototype.indexToPoint=function(t){var e=t.x,t=t.y;return new Gy(e*this.options.tileSize,t*this.options.tileSize)},tv.prototype.subdomainText=function(){var t=this.options.subdomains;return t[this.subdomainIndex++%t.length]},tv.prototype.destroy=function(){this.element.empty(),this.pool.empty()},tv.prototype.reset=function(){this.pool.reset(),this.subdomainIndex=0,this.render()},tv.prototype.render=function(){for(var t,e,o=this.tileCount(),i=this.pointToTileIndex(this._extent.nw),r=0;r<o.x;r++)for(e=0;e<o.y;e++)(t=this.createTile({x:i.x+r,y:i.y+e})).visible||t.show()},tv.prototype.createTile=function(t){t=this.tileOptions(t),t=this.pool.get(this._center,t);return t.element.parentNode||this.element.append(t.element),t},tv.prototype.tileOptions=function(t){var e=this.wrapIndex(t),o=this.indexToPoint(t),i=this._viewOrigin;return{index:e,currentIndex:t,point:o,offset:(i=o.clone().translate(-i.x,-i.y),new Gy(bt(i.x),bt(i.y))),zoom:this._zoom,size:this.options.tileSize,subdomain:this.subdomainText(),urlTemplate:this.options.urlTemplate,errorUrlTemplate:this.options.errorUrlTemplate}},tv.prototype.wrapIndex=function(t){var e=Fy.pow(2,this._zoom);return{x:this.wrapValue(t.x,e),y:mt(t.y,0,e-1)}},tv.prototype.wrapValue=function(t,e){var o=Fy.abs(t)%e;return 0<=t?o:e-(0==o?e:o)},tv),$y=((Zy=P.Class)&&(Jy.__proto__=Zy),((Jy.prototype=Object.create(Zy&&Zy.prototype)).constructor=Jy).prototype.destroy=function(){this.element&&(this.element.remove(),this.element=null)},Jy.prototype._initOptions=function(t){this.options=z({},this.options,t)},Jy.prototype.createElement=function(){var t=document.createElement("img");_(t,"k-layer"),t.style.position="absolute",t.style.display="block",t.style.width=this.options.size,t.style.height=this.options.size,this.element=t},Jy.prototype.show=function(){var t=this.element;t.style.top=Xy(this.options.offset.y),t.style.left=Xy(this.options.offset.x);var e=this.url();e&&t.setAttribute("src",e),t.style.visibility="visible",this.visible=!0},Jy.prototype.hide=function(){this.element.style.visibility="hidden",this.visible=!1},Jy.prototype.url=function(){return Ny(this.options.urlTemplate)(this.urlOptions())},Jy.prototype.errorUrl=function(){return Ny(this.options.errorUrlTemplate)(this.urlOptions())},Jy.prototype.urlOptions=function(){var t=this.options;return{zoom:t.zoom,subdomain:t.subdomain,z:t.zoom,x:t.index.x,y:t.index.y,s:t.subdomain,quadkey:t.quadkey,q:t.quadkey,culture:t.culture,c:t.culture}},Jy);function Jy(t,e){Zy.call(this),this.id=t,this.visible=!0,this._initOptions(e),this.createElement(),this.show()}function tv(t,e){Qy.call(this),this.element=t,this._initOptions(e),this.pool=new ov}kt($y,{urlTemplate:"",errorUrlTemplate:""});var ev,ov=((ev=P.Class)&&(iv.__proto__=ev),((iv.prototype=Object.create(ev&&ev.prototype)).constructor=iv).prototype.get=function(t,e){return this._items.length>=this.options.maxSize&&this._remove(t),this._create(e)},iv.prototype.empty=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].destroy();this._items=[]},iv.prototype.reset=function(){for(var t=this._items,e=0;e<t.length;e++)t[e].hide()},iv.prototype._create=function(t){for(var e,o=this._items,i=yt(t.point.toString()+t.offset.toString()+t.zoom+t.urlTemplate),r=0;r<o.length;r++)if(o[r].id===i){e=o[r];break}return e?e.show():(e=new $y(i,t),this._items.push(e)),e},iv.prototype._remove=function(t){for(var e=this._items,o=-1,i=-1,r=0;r<e.length;r++){var n=e[r].options.point.distanceTo(t);o<n&&!e[r].visible&&(i=r,o=n)}-1!==i&&(e[i].destroy(),e.splice(i,1))},iv);function iv(){ev.call(this),this._items=[]}kt(ov,{maxSize:100});function rv(t,e,o){return"translate3d("+t+"px,"+e+"px,0) scale("+o+")"}var nv,sv,av,hv,pv,lv,cv,uv=Object.assign,dv="change",fv=((cv=eo)&&(Pv.__proto__=cv),((Pv.prototype=Object.create(cv&&cv.prototype)).constructor=Pv).prototype.captureNext=function(){this.capture=!0},Pv.prototype.cancelCapture=function(){this.capture=!1},Pv.prototype._press=function(t){this.trigger("press"),this.capture&&t.preventDefault()},Pv.prototype._release=function(t){this.trigger("release"),this.capture&&(t.preventDefault(),this.cancelCapture())},Pv),gv=((lv=eo)&&(Av.__proto__=lv),((Av.prototype=Object.create(lv&&lv.prototype)).constructor=Av).prototype.makeVirtual=function(){uv(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},Av.prototype.virtualSize=function(t,e){this._virtualMin===t&&this._virtualMax===e||(this._virtualMin=t,this._virtualMax=e,this.update())},Av.prototype.outOfBounds=function(t){return t>this.max||t<this.min},Av.prototype.forceEnabled=function(){this.forcedEnabled=!0},Av.prototype.getSize=function(){return this.container[this.measure]},Av.prototype.getTotal=function(){return this.element[this.scrollSize]},Av.prototype.rescale=function(t){this.scale=t},Av.prototype.update=function(t){var e=this.virtual?this._virtualMax:this.getTotal(),o=e*this.scale,i=this.getSize();0===e&&!this.forcedEnabled||(this.max=this.virtual?-this._virtualMin:0,this.size=i,this.total=o,this.min=Math.min(this.max,i-o),this.minScale=i/e,this.centerOffset=(o-i)/2,this.enabled=this.forcedEnabled||i<o,t||this.trigger(dv,this))},Av),yv=((pv=eo)&&(kv.__proto__=pv),((kv.prototype=Object.create(pv&&pv.prototype)).constructor=kv).prototype.rescale=function(t){this.x.rescale(t),this.y.rescale(t),this.refresh()},kv.prototype.centerCoordinates=function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},kv.prototype.refresh=function(){this.x.update(),this.y.update(),this.enabled=this.x.enabled||this.y.enabled,this.minScale=this.forcedMinScale||Math.min(this.x.minScale,this.y.minScale),this.fitScale=Math.max(this.x.minScale,this.y.minScale),this.trigger(dv)},kv),vv=((hv=eo)&&(Sv.__proto__=hv),((Sv.prototype=Object.create(hv&&hv.prototype)).constructor=Sv).prototype.outOfBounds=function(){return this.dimension.outOfBounds(this.movable[this.axis])},Sv.prototype.dragMove=function(t){var e,o=this.dimension,i=this.axis,r=this.movable,n=r[i]+t;o.enabled&&(e=t,(n<o.min&&t<0||n>o.max&&0<t)&&(e*=this.resistance),r.translateAxis(i,e),this.trigger(dv,this))},Sv),mv=((av=P.Class)&&(Cv.__proto__=av),(Cv.prototype=Object.create(av&&av.prototype)).constructor=Cv),xv=((sv=eo)&&(wv.__proto__=sv),((wv.prototype=Object.create(sv&&sv.prototype)).constructor=wv).prototype.translateAxis=function(t,e){this[t]+=e,this.refresh()},wv.prototype.scaleTo=function(t){this.scale=t,this.refresh()},wv.prototype.scaleWith=function(t){this.scale*=t,this.refresh()},wv.prototype.translate=function(t){this.x+=t.x,this.y+=t.y,this.refresh()},wv.prototype.moveAxis=function(t,e){this[t]=e,this.refresh()},wv.prototype.moveTo=function(t){uv(this,t),this.refresh()},wv.prototype.refresh=function(){var t=this.x,e=this.y;this.round&&(t=Math.round(t),e=Math.round(e)),(e=rv(t,e,this.scale))!==this.coordinates&&(this.element.style[this.transformStyle]=e,this._saveCoordinates(e),this.trigger(dv))},wv.prototype._saveCoordinates=function(t){this.coordinates=t},wv),_v=P.drawing.Group,Fe=((nv=ee)&&(bv.__proto__=nv),((bv.prototype=Object.create(nv&&nv.prototype)).constructor=bv).prototype.destroy=function(){nv.prototype.destroy.call(this),this.surface.destroy(),this.dataSource.unbind("change",this._dataChange)},bv.prototype._reset=function(){nv.prototype._reset.call(this),this._translateSurface(),this._data=this._readData(),this._hasData()&&this._load(this._data)},bv.prototype._initRoot=function(){this._root=new _v,this.surface.draw(this._root)},bv.prototype._beforeReset=function(){this.surface.clear(),this._initRoot()},bv.prototype._resize=function(){this.surface.size(this.map.size())},bv.prototype._readData=function(){var t=nv.prototype._readData.call(this);return"FeatureCollection"===t.type?t.features:"GeometryCollection"===t.type?t.geometries:t},bv.prototype._load=function(t){this._data=t,this._clearMarkers(),this._loader||(this._loader=new Ov(this.map,this.options.style,this));for(var e=new _v,o=0;o<t.length;o++){var i=this._loader.parse(t[o]);i&&e.append(i)}this._root.clear(),this._root.append(e)},bv.prototype.shapeCreated=function(t){var e=!1;return e=!(e=t instanceof P.drawing.Circle&&this.map.options.renderPointsAsMarkers?lt(this._createMarker(t)):e)?this.map.trigger("shapeCreated",{layer:this,shape:t}):e},bv.prototype.featureCreated=function(t){(t.layer=this).map.trigger("shapeFeatureCreated",t)},bv.prototype._createMarker=function(t){t=this.map.markers.bind({location:t.location},t.dataItem);return t&&this._markers.push(t),t},bv.prototype._clearMarkers=function(){for(var t=0;t<this._markers.length;t++)this.map.markers.remove(this._markers[t]);this._markers=[]},bv.prototype._pan=function(){this._panning||(this._panning=!0,this.surface.suspendTracking())},bv.prototype._panEnd=function(t){nv.prototype._panEnd.call(this,t),this._translateSurface(),this.surface.resumeTracking(),this._panning=!1},bv.prototype._translateSurface=function(){var t=this.map,t=t.locationToView(t.extent().nw);this.surface.translate&&(this.surface.translate(t),this.movable.moveTo({x:t.x,y:t.y}))},bv.prototype._handler=function(e){var o=this;return function(t){t.element&&(t={layer:o,layerIndex:(o.map.layers||[]).indexOf(o),shape:t.element,shapeIndex:(o._data||[]).indexOf(t.element.dataItem),originalEvent:t.originalEvent},o.map.trigger(e,t))}},bv.prototype._activate=function(){nv.prototype._activate.call(this),this._panHandler=hy(this._pan,this),this.map.bind("pan",this.panHandler)},bv.prototype._deactivate=function(){nv.prototype._deactivate.call(this),this.map.unbind("pan",this._panHandler)},bv);function bv(t,e){nv.call(this,t,e),this._pan=hy(this._pan,this),this.surface=P.drawing.Surface.create(this.element,{width:t.scrollElement.clientWidth,height:t.scrollElement.clientHeight}),this._initRoot(),this.movable=new xv(this.surface.element),this._markers=[],this._click=this._handler("shapeClick"),this.surface.bind("click",this._click),this._mouseenter=this._handler("shapeMouseEnter"),this.surface.bind("mouseenter",this._mouseenter),this._mouseleave=this._handler("shapeMouseLeave"),this.surface.bind("mouseleave",this._mouseleave)}function wv(t){sv.call(this),this.support=ay(),this.transformStyle=this.support.transitions.prefix+"Transform",this.element=t,this.element.style.webkitTransformOrigin="left top",this.x=0,this.y=0,this.scale=1;t=rv(this.x,this.y,this.scale);this.element.style[this.transformStyle]=t,this._saveCoordinates(t)}function Cv(t){av.call(this);var s,a,h,p=this;uv(p,{elastic:!0},t),t=p.elastic?.5:0,h=p.movable,p.x=s=new vv({axis:"x",dimension:p.dimensions.x,resistance:t,movable:h}),p.y=a=new vv({axis:"y",dimension:p.dimensions.y,resistance:t,movable:h}),p.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(t){p.gesture=t,p.offset=ut(p.dimensions.container)},press:function(t){var e=t.event.target.closest("a");e&&e.matches("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(t){var e=p.gesture,o=e.center,i=t.center,r=t.distance/e.distance,n=p.dimensions.minScale,e=p.dimensions.maxScale;h.scale<=n&&r<1&&(r+=.8*(1-r)),h.scale*r>=e&&(r=e/h.scale);n=h.x+p.offset.left,e=h.y+p.offset.top,e={x:(n-o.x)*r+i.x-n,y:(e-o.y)*r+i.y-e};h.scaleWith(r),s.dragMove(e.x),a.dragMove(e.y),p.dimensions.rescale(h.scale),(p.gesture=t).preventDefault()},move:function(t){t.event.target.tagName.match(/textarea|input/i)||(s.dimension.enabled||a.dimension.enabled?(s.dragMove(t.x.delta),a.dragMove(t.y.delta),t.preventDefault()):t.touch.skip())},end:function(t){t.preventDefault()}})}function Sv(t){hv.call(this),uv(this,t)}function kv(t){pv.call(this),this.x=new gv(uv({horizontal:!0},t)),this.y=new gv(uv({horizontal:!1},t)),this.container=t.container,this.forcedMinScale=t.minScale,this.maxScale=t.maxScale||100,this.bind(dv,t)}function Av(t){lv.call(this),this.forcedEnabled=!1,uv(this,t),this.scale=1,this.horizontal?(this.measure="offsetWidth",this.scrollSize="scrollWidth",this.axis="x"):(this.measure="offsetHeight",this.scrollSize="scrollHeight",this.axis="y")}function Pv(t,e){cv.call(this);var o=this,i=t[0]||t;o.capture=!1;t=cy(navigator.userAgent);i.addEventListener?(t.down.split(" ").forEach(function(t){i.addEventListener(t,hy(o._press,o),!0)}),t.up.split(" ").forEach(function(t){i.addEventListener(t,hy(o._release,o),!0)})):(t.down.split(" ").forEach(function(t){i.attachEvent(t,hy(o._press,o))}),t.up.split(" ").forEach(function(t){i.attachEvent(t,hy(o._release,o))})),o.bind(["press","release"],e||{})}kt(Fe,{autoBind:!0,zIndex:100});var Tv,Mv,Ov=((Mv=P.Class)&&(Rv.__proto__=Mv),((Rv.prototype=Object.create(Mv&&Mv.prototype)).constructor=Rv).prototype.parse=function(t){var e=new _v,o=!0;return"Feature"===t.type?(o=!1,this._loadGeometryTo(e,t.geometry,t),this._featureCreated(e,t)):this._loadGeometryTo(e,t,t),e=o&&e.children.length<2?e.children[0]:e},Rv.prototype._shapeCreated=function(t){var e=!1;return e=this.observer&&this.observer.shapeCreated?this.observer.shapeCreated(t):e},Rv.prototype._featureCreated=function(t,e){this.observer&&this.observer.featureCreated&&this.observer.featureCreated({group:t,dataItem:e,properties:e.properties})},Rv.prototype._loadGeometryTo=function(t,e,o){var i,r,n=e.coordinates;switch(e.type){case"LineString":r=this._loadPolygon(t,[n],o),this._setLineFill(r);break;case"MultiLineString":for(i=0;i<n.length;i++)r=this._loadPolygon(t,[n[i]],o),this._setLineFill(r);break;case"Polygon":this._loadPolygon(t,n,o);break;case"MultiPolygon":for(i=0;i<n.length;i++)this._loadPolygon(t,n[i],o);break;case"Point":this._loadPoint(t,n,o);break;case"MultiPoint":for(i=0;i<n.length;i++)this._loadPoint(t,n[i],o)}},Rv.prototype._setLineFill=function(t){var e=t.segments;(e.length<4||!e[0].anchor().equals(vt(e).anchor()))&&(t.options.fill=null)},Rv.prototype._loadShape=function(t,e){return this._shapeCreated(e)||t.append(e),e},Rv.prototype._loadPolygon=function(t,e,o){e=this._buildPolygon(e);return e.dataItem=o,this._loadShape(t,e)},Rv.prototype._buildPolygon=function(t){for(var e=new(1<t.length?P.drawing.MultiPath:P.drawing.Path)(this.style),o=0;o<t.length;o++)for(var i=0;i<t[o].length;i++){var r=this.locator.locationToView(Og.fromLngLat(t[o][i]));0===i?e.moveTo(r.x,r.y):e.lineTo(r.x,r.y)}return e},Rv.prototype._loadPoint=function(t,e,o){var i=Og.fromLngLat(e),e=this.locator.locationToView(i),e=new P.geometry.Circle(e,10),e=new P.drawing.Circle(e,this.style);return e.dataItem=o,e.location=i,this._loadShape(t,e)},Rv),ge=((Tv=Fe)&&(Bv.__proto__=Tv),((Bv.prototype=Object.create(Tv&&Tv.prototype)).constructor=Bv).prototype._readData=function(){return this.options.data||[]},Bv.prototype._load=function(t){if(this._data=t,this.surface.clear(),0!==t.length){var e=this.options,o=Y(e.valueField),i=t.slice(0);i.sort(function(t,e){return o(e)-o(t)});for(var r=this._scaleType(),n=Y(this.options.locationField),s=0;s<i.length;s++){var a,h,p,l=i[s],c=n(l),u=o(l);lt(c)&<(u)&&(a=a||new r([0,u],[e.minSize,e.maxSize]),c=Og.create(c),h=this.map.locationToView(c),p=a.map(u),(p=this._createSymbol({center:h,size:p,style:e.style,dataItem:l,location:c})).dataItem=l,p.location=c,p.value=u,this._drawSymbol(p))}}},Bv.prototype._scaleType=function(){var t=this.options.scale;return E(t)?t:Iv[t]},Bv.prototype._createSymbol=function(t){var e=this.options.symbol;return(e=!E(e)?zv[e]:e)(t)},Bv.prototype._drawSymbol=function(t){this.map.trigger("shapeCreated",{layer:this,shape:t})||this.surface.draw(t)},Bv);function Bv(){Tv.apply(this,arguments)}function Rv(t,e,o){Mv.call(this),this.observer=o,this.locator=t,this.style=e}kt(ge,{locationField:"location",valueField:"value",minSize:0,maxSize:100,scale:"sqrt",symbol:"circle",zIndex:200});var Ev,Lv,Iv={sqrt:((Lv=P.Class)&&(Nv.__proto__=Lv),((Nv.prototype=Object.create(Lv&&Lv.prototype)).constructor=Nv).prototype.map=function(t){t=(Math.sqrt(t)-Math.sqrt(this._domain[0]))*this._ratio;return this._range[0]+t},Nv)},zv={circle:function(t){var e=new P.geometry.Circle(t.center,t.size/2);return new P.drawing.Circle(e,t.style)},square:function(t){var e=new P.drawing.Path(t.style),o=t.size/2,t=t.center;return e.moveTo(t.x-o,t.y-o).lineTo(t.x+o,t.y-o).lineTo(t.x+o,t.y+o).lineTo(t.x-o,t.y+o).close(),e}},Vv=Object.assign,jv=".k-marker",Dv=document,Hv=Math,Uv=((Ev=ee)&&(Fv.__proto__=Ev),((Fv.prototype=Object.create(Ev&&Ev.prototype)).constructor=Fv).prototype.destroy=function(){Ev.prototype.destroy.call(this),ly(this.element,"click",this._markerClickHandler),this.clear()},Fv.prototype.add=function(t){if(!x(t))return this._addOne(t);for(var e=0;e<t.length;e++)this._addOne(t[e])},Fv.prototype.remove=function(t){t.destroy();t=(this.items||[]).indexOf(t);-1<t&&this.items.splice(t,1)},Fv.prototype.clear=function(){for(var t=0;t<this.items.length;t++)this.items[t].destroy();this.items=[]},Fv.prototype.update=function(t){var e=t.location();e&&(t.showAt(this.map.locationToView(e)),this.map.trigger("markerActivate",{marker:t,layer:this}))},Fv.prototype._reset=function(){Ev.prototype._reset.call(this);for(var t=this.items,e=0;e<t.length;e++)this.update(t[e])},Fv.prototype.bind=function(t,e){t=Wv.create(t,this.options);if(t.dataItem=e,!this.map.trigger("markerCreated",{marker:t,layer:this}))return this.add(t),t},Fv.prototype._addOne=function(t){t=Wv.create(t,this.options);return t.addTo(this),t},Fv.prototype._readData=function(){return this.options.data||[]},Fv.prototype._load=function(t){this._data=t,this.clear();for(var e=Y(this.options.locationField),o=Y(this.options.titleField),i=0;i<t.length;i++){var r=t[i];this.bind({location:e(r),title:o(r)},r)}},Fv.prototype._markerClick=function(t){var e=this.map.layers||[],o=t.target._kendoNode,t={layer:this,layerIndex:e.indexOf(this),marker:o,markerIndex:(this.items||[]).indexOf(o),originalEvent:t};this.map.trigger("markerClick",t)},Fv.prototype._markerMouseEnter=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseEnter",t)},Fv.prototype._markerMouseLeave=function(t){t=this._createMarkerEventArgs(t);this.map.trigger("markerMouseLeave",t)},Fv.prototype._createMarkerEventArgs=function(t){var e=t.marker;return Vv({},{layer:this,layerIndex:this.map.layers.indexOf(this),marker:e,markerIndex:(this.items||[]).indexOf(e)},t)},Fv);function Fv(t,e){Ev.call(this,t,e),this._markerClickHandler=hy(this._markerClick,this),py(this.element,"click",jv,this._markerClickHandler),this.items=[],this._load(this._readData())}function Nv(t,e){Lv.call(this),this._domain=t,this._range=e;t=Math.sqrt(t[1])-Math.sqrt(t[0]),e=e[1]-e[0];this._ratio=e/t}kt(Uv,{zIndex:1e3,autoBind:!0,dataSource:{},locationField:"location",titleField:"title"});var Gv,Wv=((Gv=P.Class)&&(qv.__proto__=Gv),((qv.prototype=Object.create(Gv&&Gv.prototype)).constructor=qv).prototype.destroy=function(){this.layer=null,this.unbindEvents(),this.hide()},qv.prototype.addTo=function(t){this.layer=t.markers||t,this.layer.items.push(this),this.layer.update(this)},qv.prototype.location=function(t){return t?(this.options.location=Og.create(t).toArray(),this.layer&&this.layer.update(this),this):Og.create(this.options.location)},qv.prototype.showAt=function(t){this.render(),this.element.style.left=Yg(Hv.round(t.x)),this.element.style.top=Yg(Hv.round(t.y)),this.tooltip&&this.tooltip.popup&&this.tooltip.popup._position()},qv.prototype.hide=function(){this.element&&(this.element.remove(),this.element=null),this.tooltip&&(this.tooltip.destroy(),this.tooltip=null)},qv.prototype.bindEvents=function(){this.element&&(this._mouseEnterHandler=hy(this._mouseEnter,this),py(this.element,"mouseenter",jv,this._mouseEnterHandler),this._mouseLeaveHandler=hy(this._mouseLeave,this),py(this.element,"mouseleave",jv,this._mouseLeaveHandler))},qv.prototype.unbindEvents=function(){this.element&&(ly(this.element,"mouseenter",this._mouseEnterHandler),ly(this.element,"mouseleave",this._mouseLeaveHandler))},qv.prototype.render=function(){var t,e,o,i;this.element||(t=this.options,e=this.layer,_(o=Dv.createElement("span"),"k-marker k-icon k-i-marker-"+qg(t.shape||"pin")),o.setAttribute("title",t.title),i=t.attributes||{},Object.keys(i).forEach(function(t){o.setAttributett(t,i[t])}),o._kendoNode=this,o.style.zIndex=t.zIndex,this.element=o,e&&e.element.appendChild(this.element),this.bindEvents(),this.renderTooltip())},qv.prototype._mouseEnter=function(t){t=this._createEventArgs(t);this.layer._markerMouseEnter(t)},qv.prototype._mouseLeave=function(t){t=this._createEventArgs(t);this.layer._markerMouseLeave(t)},qv.prototype._createEventArgs=function(t){return{marker:this,originalEvent:t}},qv.prototype.renderTooltip=function(){},qv.create=function(t,e){return t instanceof qv?t:new qv(z({},e,t))},qv),Xv=Object.assign;function qv(t){Gv.call(this),this.options=t||{}}function Yv(t){window.requestAnimationFrame(t)}function Zv(t){t.preventDefault()}var Qv,Kv,ee=((Kv=P.Class)&&(cm.__proto__=Kv),((cm.prototype=Object.create(Kv&&Kv.prototype)).constructor=cm).prototype.tick=function(){},cm.prototype.done=function(){},cm.prototype.onEnd=function(){},cm.prototype.onCancel=function(){},cm.prototype.start=function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,Yv(this._tickProxy)))},cm.prototype.enabled=function(){return!0},cm.prototype.cancel=function(){this._started=!1,this.onCancel()},cm.prototype._tick=function(){this._started&&(this.tick(),this.done()?(this._started=!1,this.onEnd()):Yv(this._tickProxy))},cm),$v=((Qv=ee)&&(lm.__proto__=Qv),((lm.prototype=Object.create(Qv&&Qv.prototype)).constructor=lm).prototype.done=function(){return this.timePassed()>=this.duration},lm.prototype.timePassed=function(){return Math.min(this.duration,my()-this.startDate)},lm.prototype.moveTo=function(t){var e=this.movable;this.initial=e[this.axis],this.delta=t.location-this.initial,this.duration="number"==typeof t.duration?t.duration:300,this.tick=this._easeProxy(t.ease),this.startDate=my(),this.start()},lm.prototype._easeProxy=function(t){var e=this;return function(){e.movable.moveAxis(e.axis,t(e.timePassed(),e.initial,e.delta,e.duration))}},lm.easeOutExpo=function(t,e,o,i){return t===i?e+o:o*(1-Math.pow(2,-10*t/i))+e},lm),Jv=Object.assign,tm=800,em=0,om="move",im="tap",rm="doubleTap",nm="release",sm="gesturechange",am="gestureend",hm="gesturetap",pm={api:0,touch:0,mouse:9,pointer:9};function lm(t){Qv.call(this),Xv(this,t)}function cm(){Kv.call(this),this._tickProxy=hy(this._tick,this),this._started=!1}function um(t){var e,o,i,r=ay(),n=[],s=t.originalEvent||t,a=t.currentTarget,h=0;if(t.api)n.push({id:2,event:t,target:t.target,currentTarget:t.target,location:t,type:"api"});else if(t.type.match(/touch/))for(e=(o=s?s.changedTouches:[]).length;h<e;h++)i=o[h],n.push({location:i,event:t,target:i.target,currentTarget:a,id:i.identifier,type:"touch"});else r.pointers||r.msPointers?n.push({location:s,event:t,target:t.target,currentTarget:a,id:s.pointerId,type:"pointer"}):n.push({id:1,event:t,target:t.target,currentTarget:a,location:t,type:"mouse"});return n}var dm,fm,gm=((fm=P.Class)&&(mm.__proto__=fm),((mm.prototype=Object.create(fm&&fm.prototype)).constructor=mm).prototype.move=function(t){var e=t["page"+this.axis],o=my(),i=o-this.timeStamp||1;!e&&this.invalidZeroEvents||(this.delta=e-this.location,this._updateLocationData(t),this.initialDelta=e-this.startLocation,this.velocity=this.delta/i,this.timeStamp=o)},mm.prototype._updateLocationData=function(t){var e=this.axis;this.location=t["page"+e],this.client=t["client"+e],this.screen=t["screen"+e]},mm),ym=((dm=P.Class)&&(vm.__proto__=dm),((vm.prototype=Object.create(dm&&dm.prototype)).constructor=vm).prototype.press=function(){this._holdTimeout=setTimeout(hy(this._hold,this),this.userEvents.minHold),this._trigger("press",this.pressEvent)},vm.prototype._tap=function(t){var e=this;e.userEvents._clicks++,1===e.userEvents._clicks&&(e._clickTimeout=setTimeout(function(){1===e.userEvents._clicks?e._trigger(im,t):e._trigger(rm,t),e.userEvents._clicks=0},300))},vm.prototype._hold=function(){this._trigger("hold",this.pressEvent)},vm.prototype.move=function(t){var e="api"!==t.type&&this.userEvents._shouldNotMove;if(!this._finished&&!e){if(this.x.move(t.location),this.y.move(t.location),!this._moved){if(this._withinIgnoreThreshold())return;if(Am.current&&Am.current!==this.userEvents)return this.dispose();this._start(t)}this._finished||this._trigger(om,t)}},vm.prototype.end=function(t){this.endTime=my(),this._finished||(this._finished=!0,this._trigger(nm,t),this._moved?this._trigger("end",t):this.useClickAsTap||(this.supportDoubleTap?this._tap(t):this._trigger(im,t)),clearTimeout(this._holdTimeout),this.dispose())},vm.prototype.dispose=function(){var t=this.userEvents.touches||[];this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout);var e=t.indexOf(this);t.splice(e,1)},vm.prototype.skip=function(){this.dispose()},vm.prototype.cancel=function(){this.dispose()},vm.prototype.isMoved=function(){return this._moved},vm.prototype._start=function(t){clearTimeout(this._holdTimeout),this.startTime=my(),this._moved=!0,this._trigger("start",t)},vm.prototype._trigger=function(t,e){var o=e.event,e={touch:this,x:this.x,y:this.y,target:this.target,event:o};this.userEvents.notify(t,e)&&o.preventDefault()},vm.prototype._withinIgnoreThreshold=function(){var t=this.x.initialDelta,e=this.y.initialDelta;return Math.sqrt(t*t+e*e)<=this.threshold},vm);function vm(t,e,o){dm.call(this),Jv(this,{x:new gm("X",o.location),y:new gm("Y",o.location),type:o.type,useClickAsTap:t.useClickAsTap,threshold:t.threshold||pm[o.type],userEvents:t,target:e,currentTarget:o.currentTarget,initialTouch:o.target,id:o.id,pressEvent:o,_clicks:t._clicks,supportDoubleTap:t.supportDoubleTap,_moved:!1,_finished:!1})}function mm(t,e){fm.call(this),this.support=ay(),this.invalidZeroEvents=this.support.mobileOS&&this.support.mobileOS.android,this.axis=t,this._updateLocationData(e),this.startLocation=this.location,this.velocity=this.delta=0,this.timeStamp=my()}function xm(t){for(var e=cy(navigator.userAgent).up.split(" "),o=0,i=e.length;o<i;o++)t(e[o])}var _m,bm,wm,Cm,Sm,km,Am=((km=eo)&&(Hm.__proto__=km),((Hm.prototype=Object.create(km&&km.prototype)).constructor=Hm).prototype.preventIfMoving=function(t){this._isMoved()&&t.preventDefault()},Hm.prototype.destroy=function(){var e,o=this,t=this.options,i=this.element;o._destroyed||(o._destroyed=!0,o.captureUpIfMoved&&this.support.eventCapture&&(e=o.surface,xm(function(t){e.removeEventListener(t,o.preventIfMoving)})),ly(o.surface,yy("move"),this._surfaceMoveHandler),ly(o.surface,yy("up cancel"),this._surfaceEndHandler),ly(i,yy("down"),this._elementStartHandler),o.useClickAsTap&&ly(i,yy("click"),this._elementClickHandler),t.preventDragEvent&&ly(i,yy("dragstart"),this._elementDragStartHandler),ly(i,yy("mousedown"),this._elementSelectHandler),o._disposeAll(),o.unbind(),delete o.surface,delete o.element,delete o.currentTarget)},Hm.prototype.capture=function(){Hm.current=this},Hm.prototype.cancel=function(){this._disposeAll(),this.trigger("cancel")},Hm.prototype.notify=function(t,e){var o,i,r,n,s=this.touches,a=t;if(this._isMultiTouch()){switch(a){case om:a=sm;break;case"end":a=am;break;case im:a=hm}Jv(e,{touches:s},(o=s[0],i=s[1],r=o.x.location,n=o.y.location,t=i.x.location,s=i.y.location,o=r-t,i=n-s,{center:{x:(r+t)/2,y:(n+s)/2},distance:Math.sqrt(o*o+i*i)}))}return this.trigger(a,Jv(e,{type:a}))},Hm.prototype.press=function(t,e,o){this._apiCall("_start",t,e,o)},Hm.prototype.move=function(t,e){this._apiCall("_move",t,e)},Hm.prototype.end=function(t,e){this._apiCall("_end",t,e)},Hm.prototype._isMultiTouch=function(){return 1<this.touches.length},Hm.prototype._maxTouchesReached=function(){return this.touches.length>=this._maxTouches},Hm.prototype._disposeAll=function(){for(var t=this.touches;0<t.length;)t.pop().dispose()},Hm.prototype._isMoved=function(){return Z(this.touches,function(t){return t.isMoved()}).length},Hm.prototype._select=function(t){this.allowSelection&&!this.trigger("select",{event:t})||t.preventDefault()},Hm.prototype._start=function(t){var e,o,i=0,r=this.filter,n=um(t),s=n.length,a=t.which;if(!(a&&1<a||this._maxTouchesReached()))for(Hm.current=null,this.currentTarget=t.currentTarget,this.stopPropagation&&t.stopPropagation();i<s&&!this._maxTouchesReached();i++)o=n[i],(e=r?o.currentTarget:this.element)&&0===e.length||(o=new ym(this,e,o),this.touches.push(o),o.press(),this._isMultiTouch()&&this.notify("gesturestart",{}))},Hm.prototype._move=function(t){this._eachTouch("move",t)},Hm.prototype._end=function(t){this._eachTouch("end",t)},Hm.prototype._click=function(t){var e={touch:{initialTouch:t.target,target:t.currentTarget,endTime:my(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:t.currentTarget,event:t,type:"tap"};this.trigger("tap",e)&&t.preventDefault()},Hm.prototype._eachTouch=function(t,e){for(var o,i,r,n={},s=um(e),a=this.touches,h=0;h<a.length;h++)n[(o=a[h]).id]=o;for(h=0;h<s.length;h++)(r=n[(i=s[h]).id])&&r[t](i)},Hm.prototype._apiCall=function(t,e,o,i){this[t]({api:!0,pageX:e,pageY:o,clientX:e,clientY:o,target:i||this.element,stopPropagation:xy,preventDefault:xy})},Hm.defaultThreshold=function(t){em=t},Hm.minHold=function(t){tm=t},Hm),Pm=Object.assign,Tm=Math.abs,Mm="change",Om=((Sm=ee)&&(Dm.__proto__=Sm),((Dm.prototype=Object.create(Sm&&Sm.prototype)).constructor=Dm).prototype.enabled=function(){return this.movable.scale<this.dimensions.minScale},Dm.prototype.done=function(){return this.dimensions.minScale-this.movable.scale<.01},Dm.prototype.tick=function(){var t=this.movable;t.scaleWith(1.1),this.dimensions.rescale(t.scale)},Dm.prototype.onEnd=function(){var t=this.movable;t.scaleTo(this.dimensions.minScale),this.dimensions.rescale(t.scale)},Dm),Bm=((Cm=ee)&&(jm.__proto__=Cm),((jm.prototype=Object.create(Cm&&Cm.prototype)).constructor=jm).prototype.onCancel=function(){this.transition.cancel()},jm.prototype.freeze=function(t){this.cancel(),this._moveTo(t)},jm.prototype.onEnd=function(){this.paneAxis.outOfBounds()?this._snapBack():this._end()},jm.prototype.done=function(){return Tm(this.velocity)<1},jm.prototype.start=function(t){this.dimension.enabled&&(this.paneAxis.outOfBounds()?this.transition._started?(this.transition.cancel(),this.velocity=Math.min(t.touch[this.axis].velocity*this.velocityMultiplier,55),Cm.prototype.start.call(this)):this._snapBack():(t=2===t.touch.id?0:t.touch[this.axis].velocity,this.velocity=Math.max(Math.min(t*this.velocityMultiplier,55),-55),this.tapCapture.captureNext(),Cm.prototype.start.call(this)))},jm.prototype.tick=function(){var t=this.dimension,e=this.paneAxis.outOfBounds()?.5:this.friction,e=this.velocity*=e,e=this.movable[this.axis]+e;!this.elastic&&t.outOfBounds(e)&&(e=Math.max(Math.min(e,t.max),t.min),this.velocity=0),this.movable.moveAxis(this.axis,e)},jm.prototype._end=function(){this.tapCapture.cancelCapture(),this.end()},jm.prototype._snapBack=function(){var t=this.dimension,t=this.movable[this.axis]>t.max?t.max:t.min;this._moveTo(t)},jm.prototype._moveTo=function(t){this.transition.moveTo({location:t,duration:500,ease:$v.easeOutExpo})},jm),Rm=((wm=ee)&&(Vm.__proto__=wm),((Vm.prototype=Object.create(wm&&wm.prototype)).constructor=Vm).prototype.tick=function(){this._updateCoordinates(),this.moveTo(this.origin)},Vm.prototype.done=function(){return Tm(this.offset.y)<5&&Tm(this.offset.x)<5},Vm.prototype.onEnd=function(){this.moveTo(this.destination),this.callback&&this.callback.call()},Vm.prototype.setCoordinates=function(t,e){this.offset={},this.origin=t,this.destination=e},Vm.prototype.setCallback=function(t){t&&E(t)&&(this.callback=t)},Vm.prototype._updateCoordinates=function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}},Vm),Em=((bm=P.Class)&&(zm.__proto__=bm),((zm.prototype=Object.create(bm&&bm.prototype)).constructor=zm).prototype.refresh=function(){var t=this.axis,e=this.dimension,o=e.size,i=this.scrollMovable,r=o/e.total,e=Math.round(-i[t]*r),i=Math.round(o*r);this.element.style.display=1<=r?"none":"",o<e+i?i=o-e:e<0&&(i+=e,e=0),this.elementSize!==i&&(this.element.style[this.size]=i+"px",this.elementSize=i),this.movable.moveAxis(t,e)},zm.prototype.show=function(){this.element.style.opacity=.7,this.element.style.visibility="visible"},zm.prototype.hide=function(){this.alwaysVisible||(this.element.style.opacity=0)},zm),Lm=((_m=eo)&&(Im.__proto__=_m),((Im.prototype=Object.create(_m&&_m.prototype)).constructor=Im).prototype._initOptions=function(t){this.options=z({},this.options,t)},Im.prototype._wheelScroll=function(t){var e,o,i;t.ctrlKey||(this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50),o=t.originalEvent||t,i=o.wheelDeltaY,o.wheelDelta?void 0!==i&&!i||(e=o.wheelDelta):o.detail&&o.axis===o.VERTICAL_AXIS&&(e=10*-o.detail),(e=e)&&(this._wheelY+=e,this.userEvents.move(0,this._wheelY)),t.preventDefault())},Im.prototype.makeVirtual=function(){this.dimensions.y.makeVirtual()},Im.prototype.virtualSize=function(t,e){this.dimensions.y.virtualSize(t,e)},Im.prototype.height=function(){return this.dimensions.y.size},Im.prototype.scrollHeight=function(){return this.scrollElement.scrollHeight},Im.prototype.scrollWidth=function(){return this.scrollElement.scrollWidth},Im.prototype._resize=function(){this._native||this.contentResized()},Im.prototype.setOptions=function(t){this._initOptions(t),t.pullToRefresh&&this._initPullToRefresh()},Im.prototype.reset=function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},Im.prototype.contentResized=function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},Im.prototype.zoomOut=function(){var t=this.dimensions;t.refresh(),this._scale(t.fitScale),this.movable.moveTo(t.centerCoordinates())},Im.prototype.enable=function(){this.enabled=!0},Im.prototype.disable=function(){this.enabled=!1},Im.prototype.scrollTo=function(t,e){this._native?(this.scrollElement.scrollLeft(Tm(t)),this.scrollElement.scrollTop(Tm(e))):(this.dimensions.refresh(),this.movable.moveTo({x:t,y:e}))},Im.prototype.animatedScrollTo=function(t,e,o){var i;this._native?this.scrollTo(t,e):(i={x:this.movable.x,y:this.movable.y},this.animatedScroller.setCoordinates(i,{x:t,y:e}),this.animatedScroller.setCallback(o),this.animatedScroller.start())},Im.prototype.pullHandled=function(){},Im.prototype.destroy=function(){var t=this.element;ly(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler),this.userEvents&&this.userEvents.destroy()},Im.prototype._scale=function(t){this.dimensions.rescale(t),this.movable.scaleTo(t)},Im.prototype._initPullToRefresh=function(){},Im.prototype._dragEnd=function(){},Im.prototype._paneChange=function(){},Im.prototype._initAxis=function(t){var e=this,o=e.movable,i=e.dimensions[t],r=e.tapCapture,n=e.pane[t],s=new Em({axis:t,movable:o,dimension:i,container:e.element,alwaysVisible:e.options.visibleScrollHints});i.bind(Mm,function(){s.refresh()}),n.bind(Mm,function(){s.show()}),e[t+"inertia"]=new Bm({axis:t,paneAxis:n,movable:o,tapCapture:r,userEvents:e.userEvents,dimension:i,elastic:e.options.elastic,friction:e.options.friction||.96,velocityMultiplier:e.options.velocityMultiplier||10,end:function(){s.hide(),e.trigger("scrollEnd",{axis:t,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})}})},Im);function Im(t,e){_m.call(this);var n=this;this.element=t,this._initOptions(e);var o=function(t){t=oy(t);return t.ios||t.android}(navigator.userAgent);n._native=n.options.useNative&&o;var i=ey('<div class="km-scroll-header"/>');if(n._native)return _(t,"km-native-scroller"),Xg(i,t),void Pm(n,{scrollElement:t,fixedContainer:t.children[0]});t.style.overflow="hidden",_(t,"km-scroll-wrapper"),function(t,e){for(t.appendChild(e);t.firstChild!==e;)e.appendChild(t.firstChild)}(t,ey('<div class="km-scroll-container"/>')),Xg(i,t);var r=t.children[1],s=new fv(t),a=new xv(r),h=new yv({element:r,container:t,forcedEnabled:n.options.zoom}),p=this.options.avoidScrolling,l=new Am(t,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:n.options.zoom,supportDoubleTap:n.options.supportDoubleTap,start:function(t){h.refresh();var o,e=Tm(t.x.velocity),i=Tm(t.y.velocity),r=i<=2*e,e=e<=2*i;i=n.fixedContainer,o=t.event.target,i!==o&&!function(t){if(!o)return!1;for(var e=o.parentNode;null!==e;){if(e===t)return!0;e=e.parentNode}return!1}(i)&&!p(t)&&n.enabled&&(h.x.enabled&&r||h.y.enabled&&e)?l.capture():l.cancel()}}),e=new mv({movable:a,dimensions:h,userEvents:l,elastic:n.options.elastic}),o=new Om({movable:a,dimensions:h,userEvents:l,tapCapture:s}),i=new Rm({moveTo:function(t){n.scrollTo(t.x,t.y)}});a.bind(Mm,function(){n.scrollTop=-a.y,n.scrollLeft=-a.x,n.trigger("scroll",{scrollTop:n.scrollTop,scrollLeft:n.scrollLeft})}),n.options.mousewheelScrolling&&(this._wheelScrollHandler=this._wheelScroll.bind(this),py(t,"DOMMouseScroll mousewheel",this._wheelScrollHandler)),Pm(n,{movable:a,dimensions:h,zoomSnapBack:o,animatedScroller:i,userEvents:l,pane:e,tapCapture:s,pulled:!1,enabled:!0,scrollElement:r,scrollTop:0,scrollLeft:0,fixedContainer:t.children[0]}),n._initAxis("x"),n._initAxis("y"),n._wheelEnd=function(){n._wheel=!1,n.userEvents.end(0,n._wheelY)},h.refresh(),n.options.pullToRefresh&&n._initPullToRefresh()}function zm(t){bm.call(this);var e="x"===t.axis,o=ey('<div class="km-touch-scrollbar km-'+(e?"horizontal":"vertical")+'-scrollbar" />');Pm(this,t,{element:o,elementSize:0,movable:new xv(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:e?"width":"height"}),this.scrollMovable.bind(Mm,this.refresh.bind(this)),this.container.appendChild(o),t.alwaysVisible&&this.show()}function Vm(t){wm.call(this,t),Pm(this,t,{origin:{},destination:{},offset:{}})}function jm(t){Cm.call(this);var e=this;Pm(e,t,{transition:new $v({axis:t.axis,movable:t.movable,onEnd:function(){e._end()}})}),e.tapCapture.bind("press",function(){e.cancel()}),e.userEvents.bind("end",hy(e.start,e)),e.userEvents.bind("gestureend",hy(e.start,e)),e.userEvents.bind("tap",hy(e.onEnd,e))}function Dm(t){Sm.call(this,t),Pm(this,t),this.userEvents.bind("gestureend",this.start.bind(this)),this.tapCapture.bind("press",this.cancel.bind(this))}function Hm(t,e){km.call(this);var o,i=ay();this.support=i,o=this.filter=(e=e||{}).filter,this.threshold=e.threshold||em,this.minHold=e.minHold||tm,this.touches=[],this._maxTouches=e.multiTouch?2:1,this.allowSelection=e.allowSelection,this.captureUpIfMoved=e.captureUpIfMoved,this.useClickAsTap=!e.fastTap&&!i.delayedClick(),this._clicks=0,this.supportDoubleTap=e.supportDoubleTap;var r,n,s=!i.touch||i.mouseAndTouchPresent;Jv(this,{element:t,surface:e.global&&s?t.ownerDocument.documentElement:e.surface||t,stopPropagation:e.stopPropagation,pressed:!1}),this._surfaceMoveHandler=hy(this._move,this),py(this.surface,yy("move"),this._surfaceMoveHandler),this._surfaceEndHandler=hy(this._end,this),py(this.surface,yy("up cancel"),this._surfaceEndHandler),this._elementStartHandler=hy(this._start,this),py(t,yy("down"),o,this._elementStartHandler),this.useClickAsTap&&(this._elementClickHandler=hy(this._click,this),py(t,yy("click"),o,this._elementClickHandler)),(i.pointers||i.msPointers)&&(i.browser.version<11?t.style["-ms-touch-action"]=e.touchAction&&"none"!==e.touchAction?"pinch-zoom double-tap-zoom "+e.touchAction:"pinch-zoom double-tap-zoom":t.style["touch-action"]=e.touchAction||"none"),e.preventDragEvent&&(this._elementDragStartHandler=Zv,py(t,yy("dragstart"),this._elementDragStartHandler)),this._elementSelectHandler=hy(this._select,this),py(t,yy("mousedown"),o,this._elementSelectHandler),this.captureUpIfMoved&&i.eventCapture&&(r=this.surface,n=hy(this.preventIfMoving,this),xm(function(t){r.addEventListener(t,n,!0)})),this.bind(["press","hold",im,rm,"start",om,"end",nm,"cancel","gesturestart",sm,am,hm,"select"],e)}kt(Lm,{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}}),vy(Lm,["pull","scroll","resize"]);function Um(t,e){this.sender=(e=void 0===e?{}:e).sender||t,this.widget=t,this.rtl=Boolean(e.rtl)}Um.prototype.notify=function(t,e){this.widget&&this.widget.trigger(t,e)};var Fm=Um,Nm=Math,Gm=Nm.min,Wm=Nm.pow,Xm=P.geometry.Point,qm="DOMMouseScroll mousewheel",Ym={bubble:ge,shape:Fe,tile:at};function Zm(t){var e=[];if(t)for(var o=qg(t).split("-"),i=0;i<o.length;i++)e.push("k-pos-"+o[i]);return e.join(" ")}Ym.marker=Uv;var Qm,eo=((Qm=eo)&&(Km.__proto__=Qm),((Km.prototype=Object.create(Qm&&Qm.prototype)).constructor=Km).prototype.destroy=function(){this.scroller.destroy(),this.navigator&&this.navigator.destroy(),this.attribution&&this.attribution.destroy(),this.zoomControl&&this.zoomControl.destroy(),x(this.markers)?this.markers.forEach(function(t){t.destroy()}):this.markers.destroy();for(var t=0;t<this.layers.length;t++)this.layers[t].destroy();ly(this.element,qm,this._mousewheelHandler),Qm.prototype.destroy.call(this)},Km.prototype._initOptions=function(t){this.options=z({},this.options,t)},Km.prototype._initElement=function(t){_(this.element=t,"k-map"),t.style.position="relative",t.setAttribute("data-role","map"),Wg(t);t=ey("<div />");this.element.appendChild(t)},Km.prototype.initServices=function(t){this.widgetService=new Fm(this,t=void 0===t?{}:t)},Km.prototype.initObserver=function(t){void 0===t&&(t={}),this.observers=[],this.addObserver(t.observer)},Km.prototype.addObserver=function(t){t&&this.observers.push(t)},Km.prototype.removeObserver=function(t){t=this.observers.indexOf(t);0<=t&&this.observers.splice(t,1)},Km.prototype.requiresHandlers=function(t){for(var e=this.observers,o=0;o<e.length;o++)if(e[o].requiresHandlers(t))return!0},Km.prototype.trigger=function(t,e){for(var o=((e=void 0===e?{}:e).sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i||Qm.prototype.trigger.call(this,t,e),i},Km.prototype._notifyObserver=function(t,e){for(var o=((e=void 0===e?{}:e).sender=this).observers,i=!1,r=0;r<o.length;r++)o[r].trigger(t,e)&&(i=!0);return i},Km.prototype.zoom=function(t){var e=this.options,e=lt(t)?(t=Nm.round(mt(t,e.minZoom,e.maxZoom)),e.zoom!==t&&(e.zoom=t,this._reset()),this):e.zoom;return e},Km.prototype.center=function(t){t=t?(this.options.center=Og.create(t).toArray(),this._reset(),this):Og.create(this.options.center);return t},Km.prototype.extent=function(t){t=t?(this._setExtent(t),this):this._getExtent();return t},Km.prototype.setOptions=function(t){Qm.prototype.setOptions.call(this,t),this._reset()},Km.prototype.locationToLayer=function(t,e){var o=!this.options.wraparound,t=Og.create(t);return this.crs.toPoint(t,this._layerSize(e),o)},Km.prototype.layerToLocation=function(t,e){var o=!this.options.wraparound,t=Xm.create(t);return this.crs.toLocation(t,this._layerSize(e),o)},Km.prototype.locationToView=function(t){var e=Og.create(t),t=this.locationToLayer(this._viewOrigin);return this.locationToLayer(e).translateWith(t.scale(-1))},Km.prototype.viewToLocation=function(t,e){var o=this.locationToLayer(this._getOrigin(),e),o=Xm.create(t).clone().translateWith(o);return this.layerToLocation(o,e)},Km.prototype.eventOffset=function(t){var e,o=ut(this.element);return o=t.x&&t.x.location||t.y&&t.y.location?(e=t.x.location-o.left,t.y.location-o.top):(t=t.originalEvent||t,e=Ct(t.pageX,t.clientX)-o.left,Ct(t.pageY,t.clientY)-o.top),new P.geometry.Point(e,o)},Km.prototype.eventToView=function(t){t=this.eventOffset(t);return this.locationToView(this.viewToLocation(t))},Km.prototype.eventToLayer=function(t){return this.locationToLayer(this.eventToLocation(t))},Km.prototype.eventToLocation=function(t){t=this.eventOffset(t);return this.viewToLocation(t)},Km.prototype.viewSize=function(){var t=this.element,e=this._layerSize(),o=t.clientWidth;return{width:o=!this.options.wraparound?Gm(e,o):o,height:Gm(e,t.clientHeight)}},Km.prototype.exportVisual=function(){return this._reset(),!1},Km.prototype._setOrigin=function(t,e){var o=this.viewSize(),t=this._origin=Og.create(t);return(t=this.locationToLayer(t,e)).x+=o.width/2,t.y+=o.height/2,this.options.center=this.layerToLocation(t,e).toArray(),this},Km.prototype._getOrigin=function(t){var e=this.viewSize();return!t&&this._origin||((t=this.locationToLayer(this.center())).x-=e.width/2,t.y-=e.height/2,this._origin=this.layerToLocation(t)),this._origin},Km.prototype._setExtent=function(t){var e=Uy.create(t),o=e.se.clone();this.options.wraparound&&o.lng<0&&0<t.nw.lng&&(o.lng=180+(180+o.lng));var i=new Uy(e.nw,o);this.center(i.center());for(var r=this.element.clientWidth,n=this.element.clientHeight,s=this.options.maxZoom;s>=this.options.minZoom;s--){var a=this.locationToLayer(i.nw,s),h=this.locationToLayer(i.se,s),p=Nm.abs(h.x-a.x),a=Nm.abs(h.y-a.y);if(p<=r&&a<=n)break}this.zoom(s)},Km.prototype._getExtent=function(){var t=this._getOrigin(),e=this.locationToLayer(t),o=this.viewSize();e.x+=o.width,e.y+=o.height;e=this.layerToLocation(e);return new Uy(t,e)},Km.prototype._zoomAround=function(t,e){this._setOrigin(this.layerToLocation(t,e),e),this.zoom(e)},Km.prototype._initControls=function(){var t=this.options.controls;t.attribution&&this._createAttribution(t.attribution),this.support.mobileOS||(t.navigator&&this._createNavigator(t.navigator),t.zoom&&this._createZoomControl(t.zoom))},Km.prototype._createControlElement=function(t,e){t=t.position||e,e="."+Zm(t).replace(" ","."),e=this.element.querySelector(".k-map-controls"+e)||[];0===e.length&&(_(o=document.createElement("div"),"k-map-controls "+Zm(t)),this.element.appendChild(e=o));var o=document.createElement("div");return e.appendChild(o),o},Km.prototype._createAttribution=function(t){var e=this._createControlElement(t,"bottomRight");this.attribution=new Cy(e,t)},Km.prototype._createNavigator=function(t){var e=this._createControlElement(t,"topLeft"),t=this.navigator=new Ry(e,t);this._navigatorPan=this._navigatorPan.bind(this),t.bind("pan",this._navigatorPan),this._navigatorCenter=this._navigatorCenter.bind(this),t.bind("center",this._navigatorCenter)},Km.prototype._navigatorPan=function(t){var e=this.scroller,o=e.scrollLeft+t.x,i=e.scrollTop-t.y,r=this._virtualSize,e=this.element.clientWidth,t=this.element.clientHeight,o=mt(o,r.x.min,r.x.max-e),i=mt(i,r.y.min,r.y.max-t);this.scroller.one("scroll",hy(this._scrollEnd,this)),this.scroller.scrollTo(-o,-i)},Km.prototype._navigatorCenter=function(){this.center(this.options.center)},Km.prototype._createZoomControl=function(t){var e=this._createControlElement(t,"topLeft"),t=this.zoomControl=new zy(e,t);this._zoomControlChange=this._zoomControlChange.bind(this),t.bind("change",this._zoomControlChange)},Km.prototype._zoomControlChange=function(t){this.trigger("zoomStart",{originalEvent:t})||(this.zoom(this.zoom()+t.delta),this.trigger("zoomEnd",{originalEvent:t}))},Km.prototype._initScroller=function(){var t=this.support.mobileOS?.93:.9,e=!1!==this.options.zoomable,e=this.scroller=new Lm(this.element.children[0],{friction:t,velocityMultiplier:5,zoom:e,mousewheelScrolling:!1,supportDoubleTap:!0});e.bind("scroll",hy(this._scroll,this)),e.bind("scrollEnd",hy(this._scrollEnd,this)),e.userEvents.bind("gesturestart",hy(this._scaleStart,this)),e.userEvents.bind("gestureend",hy(this._scale,this)),e.userEvents.bind("doubleTap",hy(this._doubleTap,this)),e.userEvents.bind("tap",hy(this._tap,this)),this.scrollElement=e.scrollElement},Km.prototype._initLayers=function(){for(var t=this.options.layers,e=this.layers=[],o=0;o<t.length;o++){var i=t[o],i=this._createLayer(i);e.push(i)}},Km.prototype._createLayer=function(t){var e=t.type||"shape",o=this.options.layerDefaults[e],t=z({},"marker"===e?this.options.markerDefaults:o,t),t=new Ym[e](this,t);return"marker"===e&&(this.markers=t),t},Km.prototype._initMarkers=function(){0<(this.options.layers||[]).filter(function(t){return t&&"marker"===t.type}).length||(this.markers=new Uv(this,this.options.markerDefaults),this.markers.add(this.options.markers))},Km.prototype._scroll=function(t){var e=this.locationToLayer(this._viewOrigin).round(),o=t.sender.movable,o=new P.geometry.Point(o.x,o.y).scale(-1).scale(1/o.scale);e.x+=o.x,e.y+=o.y,this._scrollOffset=o,this._setOrigin(this.layerToLocation(e)),this.trigger("pan",{originalEvent:t,origin:this._getOrigin(),center:this.center()})},Km.prototype._scrollEnd=function(t){this._scrollOffset&&this._panComplete()&&(this._scrollOffset=null,this._panEndTimestamp=my(),this.trigger("panEnd",{originalEvent:t,origin:this._getOrigin(),center:this.center()}))},Km.prototype._panComplete=function(){return 50<my()-(this._panEndTimestamp||0)},Km.prototype._scaleStart=function(t){!this.trigger("zoomStart",{originalEvent:t})||(t=t.touches[1])&&t.cancel()},Km.prototype._scale=function(t){var e=this.scroller.movable.scale,o=this._scaleToZoom(e),i=new P.geometry.Point(t.center.x,t.center.y),e=this.viewToLocation(i,o),i=this.locationToLayer(e,o).translate(-i.x,-i.y);this._zoomAround(i,o),this.trigger("zoomEnd",{originalEvent:t})},Km.prototype._scaleToZoom=function(t){t=this._layerSize()*t/this.options.minSize,t=Nm.log(t)/Nm.log(2);return Nm.round(t)},Km.prototype._reset=function(){this.attribution&&this.attribution.filter(this.center(),this.zoom()),this._viewOrigin=this._getOrigin(!0),this._resetScroller(),this.trigger("beforeReset"),this.trigger("reset")},Km.prototype._resetScroller=function(){var t=this.scroller,e=t.dimensions.x,o=t.dimensions.y,i=this._layerSize(),r=this.extent().nw,n=this.locationToLayer(r).round();t.movable.round=!0,t.reset(),t.userEvents.cancel();r=this.zoom();t.dimensions.forcedMinScale=Wm(2,this.options.minZoom-r),t.dimensions.maxScale=Wm(2,this.options.maxZoom-r);r={min:-n.x,max:i-n.x},n={min:-n.y,max:i-n.y};this.options.wraparound&&(r.max=20*i,r.min=-r.max),!1===this.options.pannable&&(i=this.viewSize(),r.min=n.min=0,r.max=i.width,n.max=i.height),e.makeVirtual(),o.makeVirtual(),e.virtualSize(r.min,r.max),o.virtualSize(n.min,n.max),this._virtualSize={x:r,y:n}},Km.prototype._renderLayers=function(){},Km.prototype._layerSize=function(t){t=Ct(t,this.options.zoom);return this.options.minSize*Wm(2,t)},Km.prototype._tap=function(t){var e;this._panComplete()&&(e=this.eventOffset(t),this.trigger("click",{originalEvent:t,location:this.viewToLocation(e)}))},Km.prototype._doubleTap=function(t){var e,o,i;!1===this.options.zoomable||this.trigger("zoomStart",{originalEvent:t})||(e=this.zoom()+1,i=this.eventOffset(t),o=this.viewToLocation(i),i=this.locationToLayer(o,e).translate(-i.x,-i.y),this._zoomAround(i,e),this.trigger("zoomEnd",{originalEvent:t}))},Km.prototype._mousewheel=function(t){t.preventDefault();var e=0<nt(t)?-1:1,o=this.options,i=this.zoom(),e=mt(i+e,o.minZoom,o.maxZoom);!1===o.zoomable||e===i||this.trigger("zoomStart",{originalEvent:t})||(o=this.eventOffset(t),i=this.viewToLocation(o),o=this.locationToLayer(i,e).translate(-o.x,-o.y),this._zoomAround(o,e),this.trigger("zoomEnd",{originalEvent:t}))},Km);function Km(t,e,o,i){void 0===e&&(e={}),void 0===o&&(o={}),void 0===i&&(i={}),Qm.call(this),this.support=ay(),this.initObserver(i),this.initServices(i),this._initOptions(e),this.bind(this.events,e),this.crs=new Jg,this._initElement(t),this._viewOrigin=this._getOrigin(),this._initScroller(),this._initMarkers(),this._initControls(),this._initLayers(),this._reset(),this._mousewheelHandler=this._mousewheel.bind(this),py(this.element,qm,this._mousewheelHandler)}kt(eo,{name:"Map",controls:{attribution:!0,navigator:{panStep:100},zoom:!0},layers:[],layerDefaults:{shape:{style:{fill:{color:"#fff"},stroke:{color:"#aaa",width:.5}}},bubble:{style:{fill:{color:"#fff",opacity:.5},stroke:{color:"#aaa",width:.5}}},marker:{shape:"pinTarget",tooltip:{position:"top"}}},center:[0,0],zoom:3,minSize:256,minZoom:1,maxZoom:19,markers:[],markerDefaults:{shape:"pinTarget",tooltip:{position:"top"}},wraparound:!0,renderPointsAsMarkers:!1}),vy(eo,["beforeReset","click","markerActivate","markerClick","markerCreated","markerMouseEnter","markerMouseLeave","pan","panEnd","reset","shapeClick","shapeCreated","shapeFeatureCreated","shapeMouseEnter","shapeMouseLeave","zoomEnd","zoomStart"]);function $m(){return{icon:{border:{width:1}},label:{font:ex,padding:3},line:{length:10,width:2},visible:!0}}function Jm(t){return{axisDefaults:{labels:{font:ex},notes:$m(),title:{font:ox,margin:5}},categoryAxis:{majorGridLines:{visible:!0}},navigator:{pane:{height:90,margin:{top:10}}},seriesDefaults:{visible:!0,labels:{font:"11px Arial, Helvetica, sans-serif"},overlay:(t=void 0===t?{}:t).gradients?{}:{gradient:"none"},area:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},rangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalRangeArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},bar:{gap:1.5,spacing:.4},boxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},bubble:{border:{width:0},labels:{background:"transparent"},opacity:.6},bullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},candlestick:{border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},line:{width:2}},line:{color:"#000",width:1},spacing:.3},column:{gap:1.5,spacing:.4},heatmap:{labels:{color:"",background:"transparent",visible:!0},highlight:{border:{width:0}}},pie:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},donut:{margin:1},funnel:{labels:{background:"",color:"",padding:{top:5,bottom:5,left:7,right:7}}},horizontalWaterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4},line:{width:2},notes:$m(),ohlc:{gap:1,highlight:{line:{opacity:1,width:3}},line:{width:1},spacing:.3},radarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},radarLine:{markers:{visible:!1},width:2},polarArea:{line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.5},polarLine:{markers:{visible:!1},width:2},rangeBar:{gap:1.5,spacing:.4},rangeColumn:{gap:1.5,spacing:.4},scatterLine:{width:1},verticalArea:{highlight:{markers:{border:{}}},line:{opacity:1,width:0},markers:{size:6,visible:!1},opacity:.4},verticalBoxPlot:{outliersField:"",meanField:"",border:{_brightness:.8,width:1},downColor:"#fff",gap:1,highlight:{border:{opacity:1,width:2},whiskers:{width:3},mean:{width:2},median:{width:2}},mean:{width:2},median:{width:2},spacing:.3,whiskers:{width:2}},verticalBullet:{gap:1.5,spacing:.4,target:{color:"#ff0000"}},verticalLine:{width:2},waterfall:{gap:.5,line:{color:"#000",width:1},spacing:.4}},title:{font:ox},legend:{labels:{font:ex}}}}var tx=eo,eo="Arial, Helvetica, sans-serif",ex="12px "+eo,ox="16px "+eo;o.d(e,"autoMajorUnit",function(){return Ut}),o.d(e,"Point",function(){return Nt}),o.d(e,"Box",function(){return qt}),o.d(e,"Ring",function(){return Jt}),o.d(e,"Sector",function(){return te}),o.d(e,"ShapeBuilder",function(){return se}),o.d(e,"ShapeElement",function(){return ve}),o.d(e,"ChartElement",function(){return le}),o.d(e,"BoxElement",function(){return fe}),o.d(e,"RootElement",function(){return Ce}),o.d(e,"FloatElement",function(){return Pe}),o.d(e,"Text",function(){return Be}),o.d(e,"TextBox",function(){return ze}),o.d(e,"Title",function(){return Ue}),o.d(e,"AxisLabel",function(){return We}),o.d(e,"Axis",function(){return go}),o.d(e,"Note",function(){return Ze}),o.d(e,"CategoryAxis",function(){return Ko}),o.d(e,"DateCategoryAxis",function(){return ai}),o.d(e,"DateValueAxis",function(){return xi}),o.d(e,"NumericAxis",function(){return yi}),o.d(e,"LogarithmicAxis",function(){return Si}),o.d(e,"PolarAxis",function(){return Mi}),o.d(e,"RadarCategoryAxis",function(){return Pi}),o.d(e,"RadarNumericAxis",function(){return Li}),o.d(e,"RadarLogarithmicAxis",function(){return zi}),o.d(e,"CurveProcessor",function(){return Hi}),o.d(e,"Gradients",function(){return me}),o.d(e,"rectToBox",function(){return Re}),o.d(e,"Aggregates",function(){return $i}),o.d(e,"AreaChart",function(){return un}),o.d(e,"AreaSegment",function(){return on}),o.d(e,"AxisGroupRangeTracker",function(){return dn}),o.d(e,"Bar",function(){return wn}),o.d(e,"BarChart",function(){return Ln}),o.d(e,"BarLabel",function(){return mn}),o.d(e,"BoxPlotChart",function(){return Yn}),o.d(e,"BoxPlot",function(){return Xn}),o.d(e,"BubbleChart",function(){return ps}),o.d(e,"Bullet",function(){return gs}),o.d(e,"BulletChart",function(){return ms}),o.d(e,"CandlestickChart",function(){return Un}),o.d(e,"Candlestick",function(){return zn}),o.d(e,"CategoricalChart",function(){return Er}),o.d(e,"CategoricalErrorBar",function(){return Ar}),o.d(e,"CategoricalPlotArea",function(){return Wa}),o.d(e,"Chart",function(){return Ll}),o.d(e,"ChartContainer",function(){return Ms}),o.d(e,"ClipAnimation",function(){return Zr}),o.d(e,"ClusterLayout",function(){return Tn}),o.d(e,"Crosshair",function(){return As}),o.d(e,"CrosshairTooltip",function(){return Cs}),o.d(e,"DefaultAggregates",function(){return ra}),o.d(e,"DonutChart",function(){return fp}),o.d(e,"DonutPlotArea",function(){return gp}),o.d(e,"DonutSegment",function(){return pp}),o.d(e,"ErrorBarBase",function(){return kr}),o.d(e,"ErrorRangeCalculator",function(){return ar}),o.d(e,"Highlight",function(){return Ya}),o.d(e,"SharedTooltip",function(){return Bh}),o.d(e,"Legend",function(){return vh}),o.d(e,"LegendItem",function(){return lh}),o.d(e,"LegendLayout",function(){return ph}),o.d(e,"LineChart",function(){return en}),o.d(e,"LinePoint",function(){return Vr}),o.d(e,"LineSegment",function(){return Dr}),o.d(e,"Pane",function(){return Rs}),o.d(e,"PieAnimation",function(){return Hh}),o.d(e,"PieChart",function(){return rp}),o.d(e,"PieChartMixin",function(){return Jh}),o.d(e,"PiePlotArea",function(){return np}),o.d(e,"PieSegment",function(){return $h}),o.d(e,"PlotAreaBase",function(){return Qs}),o.d(e,"PlotAreaEventsMixin",function(){return Ks}),o.d(e,"PlotAreaFactory",function(){return xh}),o.d(e,"PointEventsMixin",function(){return Lr}),o.d(e,"RangeBar",function(){return aa}),o.d(e,"RangeBarChart",function(){return ca}),o.d(e,"RangeAreaPoint",function(){return ma}),o.d(e,"RangeAreaChart",function(){return Oa}),o.d(e,"ScatterChart",function(){return is}),o.d(e,"ScatterErrorBar",function(){return Zn}),o.d(e,"ScatterLineChart",function(){return Nh}),o.d(e,"Selection",function(){return Ah}),o.d(e,"SeriesAggregator",function(){return ta}),o.d(e,"SeriesBinder",function(){return rr}),o.d(e,"SplineSegment",function(){return Xr}),o.d(e,"SplineAreaSegment",function(){return cn}),o.d(e,"StackWrap",function(){return Bn}),o.d(e,"Tooltip",function(){return Ph}),o.d(e,"OHLCChart",function(){return Ra}),o.d(e,"OHLCPoint",function(){return Ba}),o.d(e,"WaterfallChart",function(){return Da}),o.d(e,"WaterfallSegment",function(){return ja}),o.d(e,"XYPlotArea",function(){return qh}),o.d(e,"MousewheelZoom",function(){return hh}),o.d(e,"ZoomSelection",function(){return ah}),o.d(e,"Pannable",function(){return eh}),o.d(e,"ChartAxis",function(){return Ui}),o.d(e,"ChartPane",function(){return qi}),o.d(e,"ChartPlotArea",function(){return Yi}),o.d(e,"findAxisByName",function(){return Gi}),o.d(e,"anyHasZIndex",function(){return Qr}),o.d(e,"appendIfNotNull",function(){return Es}),o.d(e,"areNumbers",function(){return Vn}),o.d(e,"bindSegments",function(){return Is}),o.d(e,"categoriesCount",function(){return Mr}),o.d(e,"countNumbers",function(){return Qi}),o.d(e,"equalsIgnoreCase",function(){return zs}),o.d(e,"evalOptions",function(){return Tr}),o.d(e,"filterSeriesByType",function(){return Vs}),o.d(e,"getDateField",function(){return js}),o.d(e,"getField",function(){return Ji}),o.d(e,"hasGradientOverlay",function(){return xn}),o.d(e,"hasValue",function(){return Jn}),o.d(e,"isDateAxis",function(){return Ds}),o.d(e,"segmentVisible",function(){return Ls}),o.d(e,"singleItemOrArray",function(){return Hs}),o.d(e,"createOutOfRangePoints",function(){return Gs}),o.d(e,"ChartService",function(){return ao}),o.d(e,"DomEventsBuilder",function(){return ho}),o.d(e,"FormatService",function(){return io}),o.d(e,"IntlService",function(){return Je}),o.d(e,"TemplateService",function(){return G}),o.d(e,"Sparkline",function(){return Gl}),o.d(e,"Navigator",function(){return oc}),o.d(e,"NavigatorHint",function(){return Ql}),o.d(e,"StockChart",function(){return nc}),o.d(e,"constants",function(){return i}),o.d(e,"Gauge",function(){return mc}),o.d(e,"LinearGauge",function(){return Qc}),o.d(e,"LinearPointer",function(){return Bc}),o.d(e,"ArrowLinearPointer",function(){return jc}),o.d(e,"BarLinearPointer",function(){return Xc}),o.d(e,"LinearScale",function(){return Ac}),o.d(e,"RadialGauge",function(){return mu}),o.d(e,"RadialPointer",function(){return fu}),o.d(e,"RadialScale",function(){return nu}),o.d(e,"ArcGauge",function(){return Ou}),o.d(e,"RangePointer",function(){return Mu}),o.d(e,"ArcScale",function(){return bu}),o.d(e,"CircularGauge",function(){return Bu}),o.d(e,"Barcode",function(){return tf}),o.d(e,"barcodeValidator",function(){return Jd}),o.d(e,"QRCode",function(){return mg}),o.d(e,"qrcodeValidator",function(){return vg}),o.d(e,"Map",function(){return tx}),o.d(e,"addClass",function(){return _}),o.d(e,"removeClass",function(){return b}),o.d(e,"alignPathToPixel",function(){return T}),o.d(e,"clockwise",function(){return M}),o.d(e,"convertableToNumber",function(){return R}),o.d(e,"deepExtend",function(){return z}),o.d(e,"elementStyles",function(){return H}),o.d(e,"getSpacing",function(){return U}),o.d(e,"getTemplate",function(){return W}),o.d(e,"getter",function(){return Y}),o.d(e,"grep",function(){return Z}),o.d(e,"hasClasses",function(){return Q}),o.d(e,"HashMap",function(){return $}),o.d(e,"inArray",function(){return J}),o.d(e,"interpolateValue",function(){return tt}),o.d(e,"InstanceObserver",function(){return ot}),o.d(e,"isArray",function(){return x}),o.d(e,"isFunction",function(){return E}),o.d(e,"isNumber",function(){return O}),o.d(e,"isObject",function(){return V}),o.d(e,"isString",function(){return B}),o.d(e,"map",function(){return it}),o.d(e,"mousewheelDelta",function(){return nt}),o.d(e,"FontLoader",function(){return St}),o.d(e,"setDefaultOptions",function(){return kt}),o.d(e,"sparseArrayLimits",function(){return At}),o.d(e,"styleValue",function(){return j}),o.d(e,"find",function(){return Pt}),o.d(e,"elementScale",function(){return Bt}),o.d(e,"autoTextColor",function(){return Rt}),o.d(e,"createHashSet",function(){return jt}),o.d(e,"defaultErrorHandler",function(){return Dt}),o.d(e,"keys",function(){return Ht}),o.d(e,"append",function(){return ht}),o.d(e,"bindEvents",function(){return pt}),o.d(e,"Class",function(){return P.Class}),o.d(e,"defined",function(){return lt}),o.d(e,"deg",function(){return ct}),o.d(e,"elementOffset",function(){return ut}),o.d(e,"elementSize",function(){return dt}),o.d(e,"eventCoordinates",function(){return ft}),o.d(e,"eventElement",function(){return gt}),o.d(e,"hashKey",function(){return yt}),o.d(e,"last",function(){return vt}),o.d(e,"limitValue",function(){return mt}),o.d(e,"logToConsole",function(){return P.logToConsole}),o.d(e,"objectKey",function(){return xt}),o.d(e,"rad",function(){return _t}),o.d(e,"round",function(){return bt}),o.d(e,"unbindEvents",function(){return wt}),o.d(e,"valueOrDefault",function(){return Ct}),o.d(e,"chartBaseTheme",function(){return Jm}),function(t){for(var e in t)ix(e,t[e])}(e)}],i.c=r,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1)}}});
|